dispatch-node-sdk
Advanced tools
Comparing version 0.0.33 to 0.0.35
@@ -710,3 +710,5 @@ 'use strict'; | ||
return new Promise(function (resolve, reject) { | ||
_this8.entities.customers.create(customerInfo).then(function (customer) { | ||
_this8.entities.customers.create(customerInfo).then(function (response) { | ||
var customer = response.customer; | ||
returnData.customer = customer; | ||
@@ -724,3 +726,5 @@ jobInfo.customer_id = customer.id; | ||
return new Promise(function (resolve, reject) { | ||
_this8.entities.jobs.create(jobInfo).then(function (job) { | ||
_this8.entities.jobs.create(jobInfo).then(function (response) { | ||
var job = response.job; | ||
returnData.job = job; | ||
@@ -743,3 +747,5 @@ if (appointmentInfo) { | ||
return new Promise(function (resolve, reject) { | ||
_this8.entities.appointments.create(appointmentInfo).then(function (appointment) { | ||
_this8.entities.appointments.create(appointmentInfo).then(function (response) { | ||
var appointment = response.appointment; | ||
returnData.appointment = appointment; | ||
@@ -746,0 +752,0 @@ resolve(); |
@@ -527,3 +527,4 @@ import _ from 'underscore'; | ||
this.entities.customers.create(customerInfo) | ||
.then(customer => { | ||
.then(response => { | ||
const { customer } = response; | ||
returnData.customer = customer; | ||
@@ -542,3 +543,4 @@ jobInfo.customer_id = customer.id; | ||
this.entities.jobs.create(jobInfo) | ||
.then(job => { | ||
.then(response => { | ||
const { job } = response; | ||
returnData.job = job; | ||
@@ -563,3 +565,4 @@ if (appointmentInfo) { | ||
this.entities.appointments.create(appointmentInfo) | ||
.then(appointment => { | ||
.then(response => { | ||
const { appointment } = response; | ||
returnData.appointment = appointment; | ||
@@ -566,0 +569,0 @@ resolve(); |
@@ -360,4 +360,6 @@ import nock from 'nock'; | ||
spyOn(client.entities.customers, 'create').andReturn(Promise.resolve({ | ||
id: 123, | ||
full_name: 'Testy Mcgee', | ||
customer: { | ||
id: 123, | ||
full_name: 'Testy Mcgee', | ||
}, | ||
})); | ||
@@ -383,8 +385,12 @@ spyOn(client.entities.jobs, 'create').andReturn(Promise.reject(new UnauthorizedError())); | ||
spyOn(client.entities.customers, 'create').andReturn(Promise.resolve({ | ||
id: 123, | ||
full_name: 'Testy Mcgee', | ||
customer: { | ||
id: 123, | ||
full_name: 'Testy Mcgee', | ||
}, | ||
})); | ||
spyOn(client.entities.jobs, 'create').andReturn(Promise.resolve({ | ||
id: 456, | ||
title: 'Test Job', | ||
job: { | ||
id: 456, | ||
title: 'Test Job', | ||
}, | ||
})); | ||
@@ -414,14 +420,20 @@ spyOn(client.entities.appointments, 'create').andReturn(Promise.reject(new UnauthorizedError())); | ||
spyOn(client.entities.customers, 'create').andReturn(Promise.resolve({ | ||
id: 123, | ||
full_name: 'Testy Mcgee', | ||
customer: { | ||
id: 123, | ||
full_name: 'Testy Mcgee', | ||
}, | ||
})); | ||
spyOn(client.entities.jobs, 'create').andReturn(Promise.resolve({ | ||
id: 456, | ||
title: 'Test Job', | ||
customer_id: 123, | ||
job: { | ||
id: 456, | ||
title: 'Test Job', | ||
customer_id: 123, | ||
}, | ||
})); | ||
spyOn(client.entities.appointments, 'create').andReturn(Promise.resolve({ | ||
id: 789, | ||
job_id: 456, | ||
time: '12345', | ||
appointment: { | ||
id: 789, | ||
job_id: 456, | ||
time: '12345', | ||
}, | ||
})); | ||
@@ -473,5 +485,7 @@ | ||
spyOn(client.entities.jobs, 'create').andReturn(Promise.resolve({ | ||
id: 456, | ||
title: 'Test Job', | ||
customer_id: 123, | ||
job: { | ||
id: 456, | ||
title: 'Test Job', | ||
customer_id: 123, | ||
}, | ||
})); | ||
@@ -478,0 +492,0 @@ |
{ | ||
"name": "dispatch-node-sdk", | ||
"version": "0.0.33", | ||
"version": "0.0.35", | ||
"description": "High- and low-level libraries for interacting with the Dispatch API", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
164337
4221
1