Socket
Socket
Sign inDemoInstall

dispatch-node-sdk

Package Overview
Dependencies
Maintainers
3
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dispatch-node-sdk - npm Package Compare versions

Comparing version 2.7.0 to 2.7.1

10

dist/lib/analytics.js

@@ -10,12 +10,14 @@ 'use strict';

ADD_APPOINTMENT: 'appointment_created', // 'Appointment created',
APPOINTMENT_CANCELED: 'appointment_canceled', // Appointment started
APPOINTMENT_COMPLETED: 'appointment_completed', // Appointment completed
APPOINTMENT_ENROUTE: 'appointment_enroute', // en route to appointment
APPOINTMENT_SCHEDULED: 'appointment_scheduled', // Appointment scheduled
APPOINTMENT_STARTED: 'appointment_started', // Appointment started
RESCHEDULE_APPOINTMENT: 'appointment_rescheduled', // 'Appointment rescheduled'
SUGGESTED_TIME_SELECTED: 'suggested_time_selected', // Suggested time was selected to schedule an appointment
UNABLE_TO_ADD_TECH: 'add_tech_error', // 'Unable to add tech'
APPOINTMENT_SCHEDULED: 'appointment_scheduled', // Appointment scheduled
APPOINTMENT_ENROUTE: 'appointment_enroute', // en route to appointment
APPOINTMENT_STARTED: 'appointment_started', // Appointment started
APPOINTMENT_CANCELED: 'appointment_canceled', // Appointment started
// Jobs
ACCEPT_OFFER: 'offer_accepted', // 'Tapped accept offer button',
ACCEPT_OFFER_WITH_SUGGESTED_TIME: 'offer_accepted_with_suggested_time', // Accept an offer with a selected suggested time
ADD_FILTER: 'filter_added', // 'Applied job filter',

@@ -22,0 +24,0 @@ ADD_LABEL: 'label_added', // Added a label

@@ -21,2 +21,8 @@ 'use strict';

return client.doAuthenticatedRequest('PATCH', endpoints.APPOINTMENTS + '/' + id + '/notify', appointmentProperties, headerOptions);
},
selectSuggestedTime: function selectSuggestedTime(appointmentProperties) {
var uuid = appointmentProperties.uuid;
return client.doAuthenticatedRequest('PATCH', endpoints.APPOINTMENTS + '/' + id + '/suggested_times/' + uuid);
}

@@ -23,0 +29,0 @@ };

@@ -5,12 +5,14 @@ const Analytics = {

ADD_APPOINTMENT: 'appointment_created', // 'Appointment created',
APPOINTMENT_CANCELED: 'appointment_canceled', // Appointment started
APPOINTMENT_COMPLETED: 'appointment_completed', // Appointment completed
APPOINTMENT_ENROUTE: 'appointment_enroute', // en route to appointment
APPOINTMENT_SCHEDULED: 'appointment_scheduled', // Appointment scheduled
APPOINTMENT_STARTED: 'appointment_started', // Appointment started
RESCHEDULE_APPOINTMENT: 'appointment_rescheduled', // 'Appointment rescheduled'
SUGGESTED_TIME_SELECTED: 'suggested_time_selected', // Suggested time was selected to schedule an appointment
UNABLE_TO_ADD_TECH: 'add_tech_error', // 'Unable to add tech'
APPOINTMENT_SCHEDULED: 'appointment_scheduled', // Appointment scheduled
APPOINTMENT_ENROUTE: 'appointment_enroute', // en route to appointment
APPOINTMENT_STARTED: 'appointment_started', // Appointment started
APPOINTMENT_CANCELED: 'appointment_canceled', // Appointment started
// Jobs
ACCEPT_OFFER: 'offer_accepted', // 'Tapped accept offer button',
ACCEPT_OFFER_WITH_SUGGESTED_TIME: 'offer_accepted_with_suggested_time', // Accept an offer with a selected suggested time
ADD_FILTER: 'filter_added', // 'Applied job filter',

@@ -17,0 +19,0 @@ ADD_LABEL: 'label_added', // Added a label

@@ -10,3 +10,9 @@ import * as endpoints from '../endpoints';

},
selectSuggestedTime: (appointmentProperties) => {
const { uuid } = appointmentProperties;
return client
.doAuthenticatedRequest('PATCH', `${endpoints.APPOINTMENTS}/${id}/suggested_times/${uuid}`);
},
});
}

@@ -27,2 +27,19 @@ import expect from 'expect';

});
describe('suggested times', () => {
const client = new Dispatch(testClientID, testClientSecret);
const dispatchUrl = 'https://api.dispatch.me';
const properties = { uuid: 12345 };
it('should make a PATCH request with appointment ID and selected UUID', () => {
const scope = nock(dispatchUrl)
.patch(`${endpoints.APPOINTMENTS}/5555/suggested_times/12345`)
.reply(200);
client.setBearerToken(testBearerToken, testRefreshToken);
client.entities.appointment(5555).selectSuggestedTime(properties);
expect(scope.isDone()).toEqual(true);
});
});
});

2

package.json
{
"name": "dispatch-node-sdk",
"version": "2.7.0",
"version": "2.7.1",
"description": "High- and low-level libraries for interacting with the Dispatch API",

@@ -5,0 +5,0 @@ "main": "dist/lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc