twilio 3.68.0 → 3.71.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +104 -0
- package/README.md +1 -1
- package/lib/jwt/AccessToken.d.ts +16 -0
- package/lib/jwt/AccessToken.js +20 -0
- package/lib/jwt/ClientCapability.d.ts +1 -1
- package/lib/rest/Media.d.ts +28 -0
- package/lib/rest/Media.js +64 -0
- package/lib/rest/Twilio.d.ts +2 -0
- package/lib/rest/Twilio.js +14 -0
- package/lib/rest/Verify.d.ts +2 -2
- package/lib/rest/Verify.js +3 -4
- package/lib/rest/api/v2010/account/call/siprec.d.ts +776 -0
- package/lib/rest/api/v2010/account/call/siprec.js +811 -0
- package/lib/rest/api/v2010/account/call.d.ts +8 -1
- package/lib/rest/api/v2010/account/call.js +29 -1
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +5 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +5 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +5 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +7 -3
- package/lib/rest/api/v2010/account/incomingPhoneNumber.js +7 -4
- package/lib/rest/conversations/v1/service/configuration/notification.d.ts +6 -0
- package/lib/rest/conversations/v1/service/configuration/notification.js +11 -1
- package/lib/rest/flexApi/v1/configuration.d.ts +2 -0
- package/lib/rest/flexApi/v1/configuration.js +2 -0
- package/lib/rest/frontlineApi/v1/user.d.ts +4 -0
- package/lib/rest/frontlineApi/v1/user.js +10 -1
- package/lib/rest/insights/v1/callSummaries.d.ts +27 -27
- package/lib/rest/insights/v1/callSummaries.js +36 -36
- package/lib/rest/media/V1.d.ts +28 -0
- package/lib/rest/media/V1.js +59 -0
- package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
- package/lib/rest/media/v1/mediaProcessor.js +702 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
- package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
- package/lib/rest/media/v1/playerStreamer.js +729 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +330 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +655 -0
- package/lib/rest/messaging/v1/brandRegistration.d.ts +15 -2
- package/lib/rest/messaging/v1/brandRegistration.js +37 -1
- package/lib/rest/messaging/v1/service.d.ts +8 -0
- package/lib/rest/messaging/v1/service.js +14 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +133 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +268 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +127 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +271 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +14 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +56 -0
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/lib/rest/serverless/v1/service/environment.js +1 -1
- package/lib/rest/serverless/v1/service.d.ts +2 -0
- package/lib/rest/serverless/v1/service.js +3 -0
- package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +2 -0
- package/lib/rest/taskrouter/v1/workspace/task/reservation.js +4 -1
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +2 -0
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +4 -1
- package/lib/rest/taskrouter/v1/workspace/worker.d.ts +27 -2
- package/lib/rest/taskrouter/v1/workspace/worker.js +22 -7
- package/lib/rest/trunking/v1/trunk.d.ts +9 -1
- package/lib/rest/trunking/v1/trunk.js +13 -2
- package/lib/rest/verify/V2.d.ts +3 -3
- package/lib/rest/verify/V2.js +6 -8
- package/lib/rest/verify/v2/service/entity/factor.d.ts +4 -2
- package/lib/rest/verify/v2/service/entity/factor.js +8 -3
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +2 -2
- package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
- package/lib/rest/verify/v2/service/verification.d.ts +5 -1
- package/lib/rest/verify/v2/service/verification.js +7 -2
- package/lib/rest/verify/v2/service.d.ts +6 -0
- package/lib/rest/verify/v2/service.js +12 -2
- package/lib/rest/verify/v2/{verificationTemplate.d.ts → template.d.ts} +35 -37
- package/lib/rest/verify/v2/{verificationTemplate.js → template.js} +58 -64
- package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
- package/lib/rest/video/v1/room.d.ts +4 -0
- package/lib/rest/video/v1/room.js +7 -1
- package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
- package/lib/rest/wireless/v1/ratePlan.js +3 -3
- package/lib/rest/wireless/v1/sim.d.ts +4 -4
- package/lib/rest/wireless/v1/sim.js +18 -24
- package/lib/twiml/VoiceResponse.d.ts +1296 -24
- package/lib/twiml/VoiceResponse.js +2170 -82
- package/package.json +2 -2
|
@@ -20,6 +20,8 @@ import { PaymentListInstance } from './call/payment';
|
|
|
20
20
|
import { RecordingList } from './call/recording';
|
|
21
21
|
import { RecordingListInstance } from './call/recording';
|
|
22
22
|
import { SerializableClass } from '../../../../interfaces';
|
|
23
|
+
import { SiprecList } from './call/siprec';
|
|
24
|
+
import { SiprecListInstance } from './call/siprec';
|
|
23
25
|
|
|
24
26
|
type CallEvent = 'initiated'|'ringing'|'answered'|'completed';
|
|
25
27
|
|
|
@@ -190,7 +192,7 @@ interface CallListInstance {
|
|
|
190
192
|
* @property asyncAmdStatusCallbackMethod - HTTP Method to use with async_amd_status_callback
|
|
191
193
|
* @property byoc - BYOC trunk SID (Beta)
|
|
192
194
|
* @property callReason - Reason for the call (Branded Calls Beta)
|
|
193
|
-
* @property callToken - A token string needed to invoke a forwarded call with a
|
|
195
|
+
* @property callToken - A token string needed to invoke a forwarded call with a CallerId recieved on a previous incoming call
|
|
194
196
|
* @property callerId - The phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
|
|
195
197
|
* @property fallbackMethod - HTTP Method to use with fallback_url
|
|
196
198
|
* @property fallbackUrl - Fallback URL in case of error
|
|
@@ -440,6 +442,7 @@ declare class CallContext {
|
|
|
440
442
|
* @param callback - Callback to handle processed record
|
|
441
443
|
*/
|
|
442
444
|
remove(callback?: (error: Error | null, items: CallInstance) => any): Promise<boolean>;
|
|
445
|
+
siprec: SiprecListInstance;
|
|
443
446
|
/**
|
|
444
447
|
* Provide a user-friendly representation
|
|
445
448
|
*/
|
|
@@ -524,6 +527,10 @@ declare class CallInstance extends SerializableClass {
|
|
|
524
527
|
*/
|
|
525
528
|
remove(callback?: (error: Error | null, items: CallInstance) => any): Promise<boolean>;
|
|
526
529
|
sid: string;
|
|
530
|
+
/**
|
|
531
|
+
* Access the siprec
|
|
532
|
+
*/
|
|
533
|
+
siprec(): SiprecListInstance;
|
|
527
534
|
startTime: Date;
|
|
528
535
|
status: CallStatus;
|
|
529
536
|
subresourceUris: string;
|
|
@@ -19,6 +19,7 @@ var NotificationList = require('./call/notification').NotificationList;
|
|
|
19
19
|
var Page = require('../../../../base/Page'); /* jshint ignore:line */
|
|
20
20
|
var PaymentList = require('./call/payment').PaymentList;
|
|
21
21
|
var RecordingList = require('./call/recording').RecordingList;
|
|
22
|
+
var SiprecList = require('./call/siprec').SiprecList;
|
|
22
23
|
var deserialize = require(
|
|
23
24
|
'../../../../base/deserialize'); /* jshint ignore:line */
|
|
24
25
|
var serialize = require('../../../../base/serialize'); /* jshint ignore:line */
|
|
@@ -120,7 +121,7 @@ CallList = function CallList(version, accountSid) {
|
|
|
120
121
|
* @param {string} [opts.byoc] - BYOC trunk SID (Beta)
|
|
121
122
|
* @param {string} [opts.callReason] - Reason for the call (Branded Calls Beta)
|
|
122
123
|
* @param {string} [opts.callToken] -
|
|
123
|
-
* A token string needed to invoke a forwarded call with a
|
|
124
|
+
* A token string needed to invoke a forwarded call with a CallerId recieved on a previous incoming call
|
|
124
125
|
* @param {string} [opts.recordingTrack] - Which track(s) to record
|
|
125
126
|
* @param {number} [opts.timeLimit] - The maximum duration of the call in seconds.
|
|
126
127
|
* @param {string} [opts.url] - The absolute URL that returns TwiML for this call
|
|
@@ -851,6 +852,20 @@ CallInstance.prototype.payments = function payments() {
|
|
|
851
852
|
return this._proxy.payments;
|
|
852
853
|
};
|
|
853
854
|
|
|
855
|
+
/* jshint ignore:start */
|
|
856
|
+
/**
|
|
857
|
+
* Access the siprec
|
|
858
|
+
*
|
|
859
|
+
* @function siprec
|
|
860
|
+
* @memberof Twilio.Api.V2010.AccountContext.CallInstance#
|
|
861
|
+
*
|
|
862
|
+
* @returns {Twilio.Api.V2010.AccountContext.CallContext.SiprecList}
|
|
863
|
+
*/
|
|
864
|
+
/* jshint ignore:end */
|
|
865
|
+
CallInstance.prototype.siprec = function siprec() {
|
|
866
|
+
return this._proxy.siprec;
|
|
867
|
+
};
|
|
868
|
+
|
|
854
869
|
/* jshint ignore:start */
|
|
855
870
|
/**
|
|
856
871
|
* Provide a user-friendly representation
|
|
@@ -892,6 +907,8 @@ CallInstance.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
892
907
|
* events resource
|
|
893
908
|
* @property {Twilio.Api.V2010.AccountContext.CallContext.PaymentList} payments -
|
|
894
909
|
* payments resource
|
|
910
|
+
* @property {Twilio.Api.V2010.AccountContext.CallContext.SiprecList} siprec -
|
|
911
|
+
* siprec resource
|
|
895
912
|
*
|
|
896
913
|
* @param {V2010} version - Version of the resource
|
|
897
914
|
* @param {sid} accountSid -
|
|
@@ -912,6 +929,7 @@ CallContext = function CallContext(version, accountSid, sid) {
|
|
|
912
929
|
this._feedback = undefined;
|
|
913
930
|
this._events = undefined;
|
|
914
931
|
this._payments = undefined;
|
|
932
|
+
this._siprec = undefined;
|
|
915
933
|
};
|
|
916
934
|
|
|
917
935
|
/* jshint ignore:start */
|
|
@@ -1102,6 +1120,16 @@ Object.defineProperty(CallContext.prototype,
|
|
|
1102
1120
|
}
|
|
1103
1121
|
});
|
|
1104
1122
|
|
|
1123
|
+
Object.defineProperty(CallContext.prototype,
|
|
1124
|
+
'siprec', {
|
|
1125
|
+
get: function() {
|
|
1126
|
+
if (!this._siprec) {
|
|
1127
|
+
this._siprec = new SiprecList(this._version, this._solution.accountSid, this._solution.sid);
|
|
1128
|
+
}
|
|
1129
|
+
return this._siprec;
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
|
|
1105
1133
|
/* jshint ignore:start */
|
|
1106
1134
|
/**
|
|
1107
1135
|
* Provide a user-friendly representation
|
|
@@ -13,6 +13,8 @@ import { SerializableClass } from '../../../../../interfaces';
|
|
|
13
13
|
|
|
14
14
|
type LocalAddressRequirement = 'none'|'any'|'local'|'foreign';
|
|
15
15
|
|
|
16
|
+
type LocalEmergencyAddressStatus = 'registered'|'unregistered'|'pending-registration'|'registration-failure'|'pending-unregistration'|'unregistration-failure';
|
|
17
|
+
|
|
16
18
|
type LocalEmergencyStatus = 'Active'|'Inactive';
|
|
17
19
|
|
|
18
20
|
type LocalVoiceReceiveMode = 'voice'|'fax';
|
|
@@ -142,7 +144,7 @@ interface LocalListInstance {
|
|
|
142
144
|
* @property apiVersion - The API version to use for incoming calls made to the new phone number
|
|
143
145
|
* @property bundleSid - The SID of the Bundle resource associated with number
|
|
144
146
|
* @property emergencyAddressSid - The emergency address configuration to use for emergency calling
|
|
145
|
-
* @property emergencyStatus -
|
|
147
|
+
* @property emergencyStatus - Displays if emergency calling is enabled for this number.
|
|
146
148
|
* @property friendlyName - A string to describe the new phone number
|
|
147
149
|
* @property identitySid - The SID of the Identity resource to associate with the new phone number
|
|
148
150
|
* @property phoneNumber - The phone number to purchase in E.164 format
|
|
@@ -283,6 +285,7 @@ interface LocalResource {
|
|
|
283
285
|
date_created: Date;
|
|
284
286
|
date_updated: Date;
|
|
285
287
|
emergency_address_sid: string;
|
|
288
|
+
emergency_address_status: LocalEmergencyAddressStatus;
|
|
286
289
|
emergency_status: LocalEmergencyStatus;
|
|
287
290
|
friendly_name: string;
|
|
288
291
|
identity_sid: string;
|
|
@@ -333,6 +336,7 @@ declare class LocalInstance extends SerializableClass {
|
|
|
333
336
|
dateCreated: Date;
|
|
334
337
|
dateUpdated: Date;
|
|
335
338
|
emergencyAddressSid: string;
|
|
339
|
+
emergencyAddressStatus: LocalEmergencyAddressStatus;
|
|
336
340
|
emergencyStatus: LocalEmergencyStatus;
|
|
337
341
|
friendlyName: string;
|
|
338
342
|
identitySid: string;
|
|
@@ -385,4 +389,4 @@ declare class LocalPage extends Page<V2010, LocalPayload, LocalResource, LocalIn
|
|
|
385
389
|
toJSON(): any;
|
|
386
390
|
}
|
|
387
391
|
|
|
388
|
-
export { LocalAddressRequirement, LocalEmergencyStatus, LocalInstance, LocalList, LocalListInstance, LocalListInstanceCreateOptions, LocalListInstanceEachOptions, LocalListInstanceOptions, LocalListInstancePageOptions, LocalPage, LocalPayload, LocalResource, LocalSolution, LocalVoiceReceiveMode }
|
|
392
|
+
export { LocalAddressRequirement, LocalEmergencyAddressStatus, LocalEmergencyStatus, LocalInstance, LocalList, LocalListInstance, LocalListInstanceCreateOptions, LocalListInstanceEachOptions, LocalListInstanceOptions, LocalListInstancePageOptions, LocalPage, LocalPayload, LocalResource, LocalSolution, LocalVoiceReceiveMode }
|
|
@@ -357,7 +357,7 @@ LocalList = function LocalList(version, accountSid) {
|
|
|
357
357
|
* @param {string} [opts.addressSid] -
|
|
358
358
|
* The SID of the Address resource associated with the phone number
|
|
359
359
|
* @param {local.emergency_status} [opts.emergencyStatus] -
|
|
360
|
-
*
|
|
360
|
+
* Displays if emergency calling is enabled for this number.
|
|
361
361
|
* @param {string} [opts.emergencyAddressSid] -
|
|
362
362
|
* The emergency address configuration to use for emergency calling
|
|
363
363
|
* @param {string} [opts.trunkSid] -
|
|
@@ -566,9 +566,11 @@ LocalPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
566
566
|
* @property {string} voiceUrl -
|
|
567
567
|
* The URL we call when this phone number receives a call
|
|
568
568
|
* @property {local.emergency_status} emergencyStatus -
|
|
569
|
-
*
|
|
569
|
+
* Displays if emergency calling is enabled for this number.
|
|
570
570
|
* @property {string} emergencyAddressSid -
|
|
571
571
|
* The emergency address configuration to use for emergency calling
|
|
572
|
+
* @property {local.emergency_address_status} emergencyAddressStatus -
|
|
573
|
+
* State of the emergency address configuration for the phone number
|
|
572
574
|
* @property {string} bundleSid -
|
|
573
575
|
* The SID of the Bundle resource associated with number
|
|
574
576
|
* @property {string} status - The status
|
|
@@ -613,6 +615,7 @@ LocalInstance = function LocalInstance(version, payload, accountSid) {
|
|
|
613
615
|
this.voiceUrl = payload.voice_url; // jshint ignore:line
|
|
614
616
|
this.emergencyStatus = payload.emergency_status; // jshint ignore:line
|
|
615
617
|
this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line
|
|
618
|
+
this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line
|
|
616
619
|
this.bundleSid = payload.bundle_sid; // jshint ignore:line
|
|
617
620
|
this.status = payload.status; // jshint ignore:line
|
|
618
621
|
|
|
@@ -13,6 +13,8 @@ import { SerializableClass } from '../../../../../interfaces';
|
|
|
13
13
|
|
|
14
14
|
type MobileAddressRequirement = 'none'|'any'|'local'|'foreign';
|
|
15
15
|
|
|
16
|
+
type MobileEmergencyAddressStatus = 'registered'|'unregistered'|'pending-registration'|'registration-failure'|'pending-unregistration'|'unregistration-failure';
|
|
17
|
+
|
|
16
18
|
type MobileEmergencyStatus = 'Active'|'Inactive';
|
|
17
19
|
|
|
18
20
|
type MobileVoiceReceiveMode = 'voice'|'fax';
|
|
@@ -142,7 +144,7 @@ interface MobileListInstance {
|
|
|
142
144
|
* @property apiVersion - The API version to use for incoming calls made to the new phone number
|
|
143
145
|
* @property bundleSid - The SID of the Bundle resource associated with number
|
|
144
146
|
* @property emergencyAddressSid - The emergency address configuration to use for emergency calling
|
|
145
|
-
* @property emergencyStatus -
|
|
147
|
+
* @property emergencyStatus - Displays if emergency calling is enabled for this number.
|
|
146
148
|
* @property friendlyName - A string to describe the new phone number
|
|
147
149
|
* @property identitySid - The SID of the Identity resource to associate with the new phone number
|
|
148
150
|
* @property phoneNumber - The phone number to purchase in E.164 format
|
|
@@ -283,6 +285,7 @@ interface MobileResource {
|
|
|
283
285
|
date_created: Date;
|
|
284
286
|
date_updated: Date;
|
|
285
287
|
emergency_address_sid: string;
|
|
288
|
+
emergency_address_status: MobileEmergencyAddressStatus;
|
|
286
289
|
emergency_status: MobileEmergencyStatus;
|
|
287
290
|
friendly_name: string;
|
|
288
291
|
identity_sid: string;
|
|
@@ -333,6 +336,7 @@ declare class MobileInstance extends SerializableClass {
|
|
|
333
336
|
dateCreated: Date;
|
|
334
337
|
dateUpdated: Date;
|
|
335
338
|
emergencyAddressSid: string;
|
|
339
|
+
emergencyAddressStatus: MobileEmergencyAddressStatus;
|
|
336
340
|
emergencyStatus: MobileEmergencyStatus;
|
|
337
341
|
friendlyName: string;
|
|
338
342
|
identitySid: string;
|
|
@@ -385,4 +389,4 @@ declare class MobilePage extends Page<V2010, MobilePayload, MobileResource, Mobi
|
|
|
385
389
|
toJSON(): any;
|
|
386
390
|
}
|
|
387
391
|
|
|
388
|
-
export { MobileAddressRequirement, MobileEmergencyStatus, MobileInstance, MobileList, MobileListInstance, MobileListInstanceCreateOptions, MobileListInstanceEachOptions, MobileListInstanceOptions, MobileListInstancePageOptions, MobilePage, MobilePayload, MobileResource, MobileSolution, MobileVoiceReceiveMode }
|
|
392
|
+
export { MobileAddressRequirement, MobileEmergencyAddressStatus, MobileEmergencyStatus, MobileInstance, MobileList, MobileListInstance, MobileListInstanceCreateOptions, MobileListInstanceEachOptions, MobileListInstanceOptions, MobileListInstancePageOptions, MobilePage, MobilePayload, MobileResource, MobileSolution, MobileVoiceReceiveMode }
|
|
@@ -357,7 +357,7 @@ MobileList = function MobileList(version, accountSid) {
|
|
|
357
357
|
* @param {string} [opts.addressSid] -
|
|
358
358
|
* The SID of the Address resource associated with the phone number
|
|
359
359
|
* @param {mobile.emergency_status} [opts.emergencyStatus] -
|
|
360
|
-
*
|
|
360
|
+
* Displays if emergency calling is enabled for this number.
|
|
361
361
|
* @param {string} [opts.emergencyAddressSid] -
|
|
362
362
|
* The emergency address configuration to use for emergency calling
|
|
363
363
|
* @param {string} [opts.trunkSid] -
|
|
@@ -566,9 +566,11 @@ MobilePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
566
566
|
* @property {string} voiceUrl -
|
|
567
567
|
* The URL we call when the phone number receives a call
|
|
568
568
|
* @property {mobile.emergency_status} emergencyStatus -
|
|
569
|
-
*
|
|
569
|
+
* Displays if emergency calling is enabled for this number.
|
|
570
570
|
* @property {string} emergencyAddressSid -
|
|
571
571
|
* The emergency address configuration to use for emergency calling
|
|
572
|
+
* @property {mobile.emergency_address_status} emergencyAddressStatus -
|
|
573
|
+
* State of the emergency address configuration for the phone number
|
|
572
574
|
* @property {string} bundleSid -
|
|
573
575
|
* The SID of the Bundle resource associated with number
|
|
574
576
|
* @property {string} status - The status
|
|
@@ -613,6 +615,7 @@ MobileInstance = function MobileInstance(version, payload, accountSid) {
|
|
|
613
615
|
this.voiceUrl = payload.voice_url; // jshint ignore:line
|
|
614
616
|
this.emergencyStatus = payload.emergency_status; // jshint ignore:line
|
|
615
617
|
this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line
|
|
618
|
+
this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line
|
|
616
619
|
this.bundleSid = payload.bundle_sid; // jshint ignore:line
|
|
617
620
|
this.status = payload.status; // jshint ignore:line
|
|
618
621
|
|
|
@@ -13,6 +13,8 @@ import { SerializableClass } from '../../../../../interfaces';
|
|
|
13
13
|
|
|
14
14
|
type TollFreeAddressRequirement = 'none'|'any'|'local'|'foreign';
|
|
15
15
|
|
|
16
|
+
type TollFreeEmergencyAddressStatus = 'registered'|'unregistered'|'pending-registration'|'registration-failure'|'pending-unregistration'|'unregistration-failure';
|
|
17
|
+
|
|
16
18
|
type TollFreeEmergencyStatus = 'Active'|'Inactive';
|
|
17
19
|
|
|
18
20
|
type TollFreeVoiceReceiveMode = 'voice'|'fax';
|
|
@@ -142,7 +144,7 @@ interface TollFreeListInstance {
|
|
|
142
144
|
* @property apiVersion - The API version to use for incoming calls made to the new phone number
|
|
143
145
|
* @property bundleSid - The SID of the Bundle resource associated with number
|
|
144
146
|
* @property emergencyAddressSid - The emergency address configuration to use for emergency calling
|
|
145
|
-
* @property emergencyStatus -
|
|
147
|
+
* @property emergencyStatus - Displays if emergency calling is enabled for this number.
|
|
146
148
|
* @property friendlyName - A string to describe the new phone number
|
|
147
149
|
* @property identitySid - The SID of the Identity resource to associate with the new phone number
|
|
148
150
|
* @property phoneNumber - The phone number to purchase in E.164 format
|
|
@@ -283,6 +285,7 @@ interface TollFreeResource {
|
|
|
283
285
|
date_created: Date;
|
|
284
286
|
date_updated: Date;
|
|
285
287
|
emergency_address_sid: string;
|
|
288
|
+
emergency_address_status: TollFreeEmergencyAddressStatus;
|
|
286
289
|
emergency_status: TollFreeEmergencyStatus;
|
|
287
290
|
friendly_name: string;
|
|
288
291
|
identity_sid: string;
|
|
@@ -333,6 +336,7 @@ declare class TollFreeInstance extends SerializableClass {
|
|
|
333
336
|
dateCreated: Date;
|
|
334
337
|
dateUpdated: Date;
|
|
335
338
|
emergencyAddressSid: string;
|
|
339
|
+
emergencyAddressStatus: TollFreeEmergencyAddressStatus;
|
|
336
340
|
emergencyStatus: TollFreeEmergencyStatus;
|
|
337
341
|
friendlyName: string;
|
|
338
342
|
identitySid: string;
|
|
@@ -385,4 +389,4 @@ declare class TollFreePage extends Page<V2010, TollFreePayload, TollFreeResource
|
|
|
385
389
|
toJSON(): any;
|
|
386
390
|
}
|
|
387
391
|
|
|
388
|
-
export { TollFreeAddressRequirement, TollFreeEmergencyStatus, TollFreeInstance, TollFreeList, TollFreeListInstance, TollFreeListInstanceCreateOptions, TollFreeListInstanceEachOptions, TollFreeListInstanceOptions, TollFreeListInstancePageOptions, TollFreePage, TollFreePayload, TollFreeResource, TollFreeSolution, TollFreeVoiceReceiveMode }
|
|
392
|
+
export { TollFreeAddressRequirement, TollFreeEmergencyAddressStatus, TollFreeEmergencyStatus, TollFreeInstance, TollFreeList, TollFreeListInstance, TollFreeListInstanceCreateOptions, TollFreeListInstanceEachOptions, TollFreeListInstanceOptions, TollFreeListInstancePageOptions, TollFreePage, TollFreePayload, TollFreeResource, TollFreeSolution, TollFreeVoiceReceiveMode }
|
|
@@ -357,7 +357,7 @@ TollFreeList = function TollFreeList(version, accountSid) {
|
|
|
357
357
|
* @param {string} [opts.addressSid] -
|
|
358
358
|
* The SID of the Address resource associated with the phone number
|
|
359
359
|
* @param {toll_free.emergency_status} [opts.emergencyStatus] -
|
|
360
|
-
*
|
|
360
|
+
* Displays if emergency calling is enabled for this number.
|
|
361
361
|
* @param {string} [opts.emergencyAddressSid] -
|
|
362
362
|
* The emergency address configuration to use for emergency calling
|
|
363
363
|
* @param {string} [opts.trunkSid] -
|
|
@@ -567,9 +567,11 @@ TollFreePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
567
567
|
* @property {string} voiceUrl -
|
|
568
568
|
* The URL we call when the phone number receives a call
|
|
569
569
|
* @property {toll_free.emergency_status} emergencyStatus -
|
|
570
|
-
*
|
|
570
|
+
* Displays if emergency calling is enabled for this number.
|
|
571
571
|
* @property {string} emergencyAddressSid -
|
|
572
572
|
* The emergency address configuration to use for emergency calling
|
|
573
|
+
* @property {toll_free.emergency_address_status} emergencyAddressStatus -
|
|
574
|
+
* State of the emergency address configuration for the phone number
|
|
573
575
|
* @property {string} bundleSid -
|
|
574
576
|
* The SID of the Bundle resource associated with number
|
|
575
577
|
* @property {string} status - The status
|
|
@@ -614,6 +616,7 @@ TollFreeInstance = function TollFreeInstance(version, payload, accountSid) {
|
|
|
614
616
|
this.voiceUrl = payload.voice_url; // jshint ignore:line
|
|
615
617
|
this.emergencyStatus = payload.emergency_status; // jshint ignore:line
|
|
616
618
|
this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line
|
|
619
|
+
this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line
|
|
617
620
|
this.bundleSid = payload.bundle_sid; // jshint ignore:line
|
|
618
621
|
this.status = payload.status; // jshint ignore:line
|
|
619
622
|
|
|
@@ -18,6 +18,8 @@ import { TollFreeListInstance } from './incomingPhoneNumber/tollFree';
|
|
|
18
18
|
|
|
19
19
|
type IncomingPhoneNumberAddressRequirement = 'none'|'any'|'local'|'foreign';
|
|
20
20
|
|
|
21
|
+
type IncomingPhoneNumberEmergencyAddressStatus = 'registered'|'unregistered'|'pending-registration'|'registration-failure'|'pending-unregistration'|'unregistration-failure';
|
|
22
|
+
|
|
21
23
|
type IncomingPhoneNumberEmergencyStatus = 'Active'|'Inactive';
|
|
22
24
|
|
|
23
25
|
type IncomingPhoneNumberVoiceReceiveMode = 'voice'|'fax';
|
|
@@ -38,7 +40,7 @@ declare function IncomingPhoneNumberList(version: V2010, accountSid: string): In
|
|
|
38
40
|
* @property apiVersion - The API version to use for incoming calls made to the phone number
|
|
39
41
|
* @property bundleSid - The SID of the Bundle resource associated with number
|
|
40
42
|
* @property emergencyAddressSid - The emergency address configuration to use for emergency calling
|
|
41
|
-
* @property emergencyStatus -
|
|
43
|
+
* @property emergencyStatus - Displays if emergency calling is enabled for this number.
|
|
42
44
|
* @property friendlyName - A string to describe the resource
|
|
43
45
|
* @property identitySid - Unique string that identifies the identity associated with number
|
|
44
46
|
* @property smsApplicationSid - Unique string that identifies the application
|
|
@@ -222,7 +224,7 @@ interface IncomingPhoneNumberListInstance {
|
|
|
222
224
|
* @property areaCode - The desired area code for the new phone number
|
|
223
225
|
* @property bundleSid - The SID of the Bundle resource associated with number
|
|
224
226
|
* @property emergencyAddressSid - The emergency address configuration to use for emergency calling
|
|
225
|
-
* @property emergencyStatus -
|
|
227
|
+
* @property emergencyStatus - Displays if emergency calling is enabled for this number.
|
|
226
228
|
* @property friendlyName - A string to describe the new phone number
|
|
227
229
|
* @property identitySid - The SID of the Identity resource to associate with the new phone number
|
|
228
230
|
* @property phoneNumber - The phone number to purchase in E.164 format
|
|
@@ -364,6 +366,7 @@ interface IncomingPhoneNumberResource {
|
|
|
364
366
|
date_created: Date;
|
|
365
367
|
date_updated: Date;
|
|
366
368
|
emergency_address_sid: string;
|
|
369
|
+
emergency_address_status: IncomingPhoneNumberEmergencyAddressStatus;
|
|
367
370
|
emergency_status: IncomingPhoneNumberEmergencyStatus;
|
|
368
371
|
friendly_name: string;
|
|
369
372
|
identity_sid: string;
|
|
@@ -463,6 +466,7 @@ declare class IncomingPhoneNumberInstance extends SerializableClass {
|
|
|
463
466
|
dateCreated: Date;
|
|
464
467
|
dateUpdated: Date;
|
|
465
468
|
emergencyAddressSid: string;
|
|
469
|
+
emergencyAddressStatus: IncomingPhoneNumberEmergencyAddressStatus;
|
|
466
470
|
emergencyStatus: IncomingPhoneNumberEmergencyStatus;
|
|
467
471
|
/**
|
|
468
472
|
* fetch a IncomingPhoneNumberInstance
|
|
@@ -540,4 +544,4 @@ declare class IncomingPhoneNumberPage extends Page<V2010, IncomingPhoneNumberPay
|
|
|
540
544
|
toJSON(): any;
|
|
541
545
|
}
|
|
542
546
|
|
|
543
|
-
export { IncomingPhoneNumberAddressRequirement, IncomingPhoneNumberContext, IncomingPhoneNumberEmergencyStatus, IncomingPhoneNumberInstance, IncomingPhoneNumberInstanceUpdateOptions, IncomingPhoneNumberList, IncomingPhoneNumberListInstance, IncomingPhoneNumberListInstanceCreateOptions, IncomingPhoneNumberListInstanceEachOptions, IncomingPhoneNumberListInstanceOptions, IncomingPhoneNumberListInstancePageOptions, IncomingPhoneNumberPage, IncomingPhoneNumberPayload, IncomingPhoneNumberResource, IncomingPhoneNumberSolution, IncomingPhoneNumberVoiceReceiveMode }
|
|
547
|
+
export { IncomingPhoneNumberAddressRequirement, IncomingPhoneNumberContext, IncomingPhoneNumberEmergencyAddressStatus, IncomingPhoneNumberEmergencyStatus, IncomingPhoneNumberInstance, IncomingPhoneNumberInstanceUpdateOptions, IncomingPhoneNumberList, IncomingPhoneNumberListInstance, IncomingPhoneNumberListInstanceCreateOptions, IncomingPhoneNumberListInstanceEachOptions, IncomingPhoneNumberListInstanceOptions, IncomingPhoneNumberListInstancePageOptions, IncomingPhoneNumberPage, IncomingPhoneNumberPayload, IncomingPhoneNumberResource, IncomingPhoneNumberSolution, IncomingPhoneNumberVoiceReceiveMode }
|
|
@@ -369,7 +369,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid)
|
|
|
369
369
|
* @param {string} [opts.voiceUrl] -
|
|
370
370
|
* The URL we should call when the phone number receives a call
|
|
371
371
|
* @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -
|
|
372
|
-
*
|
|
372
|
+
* Displays if emergency calling is enabled for this number.
|
|
373
373
|
* @param {string} [opts.emergencyAddressSid] -
|
|
374
374
|
* The emergency address configuration to use for emergency calling
|
|
375
375
|
* @param {string} [opts.trunkSid] -
|
|
@@ -643,9 +643,11 @@ IncomingPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
643
643
|
* @property {string} voiceUrl -
|
|
644
644
|
* The URL we call when the phone number receives a call
|
|
645
645
|
* @property {incoming_phone_number.emergency_status} emergencyStatus -
|
|
646
|
-
*
|
|
646
|
+
* Displays if emergency calling is enabled for this number.
|
|
647
647
|
* @property {string} emergencyAddressSid -
|
|
648
648
|
* The emergency address configuration to use for emergency calling
|
|
649
|
+
* @property {incoming_phone_number.emergency_address_status} emergencyAddressStatus -
|
|
650
|
+
* State of the emergency address configuration for the phone number
|
|
649
651
|
* @property {string} bundleSid -
|
|
650
652
|
* The SID of the Bundle resource associated with number
|
|
651
653
|
* @property {string} status - The status
|
|
@@ -692,6 +694,7 @@ IncomingPhoneNumberInstance = function IncomingPhoneNumberInstance(version,
|
|
|
692
694
|
this.voiceUrl = payload.voice_url; // jshint ignore:line
|
|
693
695
|
this.emergencyStatus = payload.emergency_status; // jshint ignore:line
|
|
694
696
|
this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line
|
|
697
|
+
this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line
|
|
695
698
|
this.bundleSid = payload.bundle_sid; // jshint ignore:line
|
|
696
699
|
this.status = payload.status; // jshint ignore:line
|
|
697
700
|
|
|
@@ -753,7 +756,7 @@ Object.defineProperty(IncomingPhoneNumberInstance.prototype,
|
|
|
753
756
|
* @param {string} [opts.voiceUrl] -
|
|
754
757
|
* The URL we should call when the phone number receives a call
|
|
755
758
|
* @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -
|
|
756
|
-
*
|
|
759
|
+
* Displays if emergency calling is enabled for this number.
|
|
757
760
|
* @param {string} [opts.emergencyAddressSid] -
|
|
758
761
|
* The emergency address configuration to use for emergency calling
|
|
759
762
|
* @param {string} [opts.trunkSid] -
|
|
@@ -913,7 +916,7 @@ IncomingPhoneNumberContext = function IncomingPhoneNumberContext(version,
|
|
|
913
916
|
* @param {string} [opts.voiceUrl] -
|
|
914
917
|
* The URL we should call when the phone number receives a call
|
|
915
918
|
* @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -
|
|
916
|
-
*
|
|
919
|
+
* Displays if emergency calling is enabled for this number.
|
|
917
920
|
* @param {string} [opts.emergencyAddressSid] -
|
|
918
921
|
* The emergency address configuration to use for emergency calling
|
|
919
922
|
* @param {string} [opts.trunkSid] -
|
|
@@ -29,6 +29,8 @@ declare function NotificationList(version: V1, chatServiceSid: string): Notifica
|
|
|
29
29
|
* @property newMessage.enabled - Whether to send a notification when a new message is added to a conversation.
|
|
30
30
|
* @property newMessage.sound - The name of the sound to play when a new message is added to a conversation.
|
|
31
31
|
* @property newMessage.template - The template to use to create the notification text displayed when a new message is added to a conversation.
|
|
32
|
+
* @property newMessage.withMedia.enabled - Whether to send a notification when a new message with media/file attachments is added to a conversation.
|
|
33
|
+
* @property newMessage.withMedia.template - The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.
|
|
32
34
|
* @property removedFromConversation.enabled - Whether to send a notification to a user when they are removed from a conversation.
|
|
33
35
|
* @property removedFromConversation.sound - The name of the sound to play to a user when they are removed from a conversation.
|
|
34
36
|
* @property removedFromConversation.template - The template to use to create the notification text displayed to a user when they are removed.
|
|
@@ -45,6 +47,10 @@ interface NotificationInstanceUpdateOptions {
|
|
|
45
47
|
template?: string;
|
|
46
48
|
sound?: string;
|
|
47
49
|
badgeCountEnabled?: boolean;
|
|
50
|
+
withMedia?: {
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
template?: string;
|
|
53
|
+
};
|
|
48
54
|
};
|
|
49
55
|
removedFromConversation?: {
|
|
50
56
|
enabled?: boolean;
|
|
@@ -235,6 +235,10 @@ Object.defineProperty(NotificationInstance.prototype,
|
|
|
235
235
|
* The template to use to create the notification text displayed to a user when they are removed.
|
|
236
236
|
* @param {string} [opts.removedFromConversation.sound] -
|
|
237
237
|
* The name of the sound to play to a user when they are removed from a conversation.
|
|
238
|
+
* @param {boolean} [opts.newMessage.withMedia.enabled] -
|
|
239
|
+
* Whether to send a notification when a new message with media/file attachments is added to a conversation.
|
|
240
|
+
* @param {string} [opts.newMessage.withMedia.template] -
|
|
241
|
+
* The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.
|
|
238
242
|
* @param {function} [callback] - Callback to handle processed record
|
|
239
243
|
*
|
|
240
244
|
* @returns {Promise} Resolves to processed NotificationInstance
|
|
@@ -335,6 +339,10 @@ NotificationContext = function NotificationContext(version, chatServiceSid) {
|
|
|
335
339
|
* The template to use to create the notification text displayed to a user when they are removed.
|
|
336
340
|
* @param {string} [opts.removedFromConversation.sound] -
|
|
337
341
|
* The name of the sound to play to a user when they are removed from a conversation.
|
|
342
|
+
* @param {boolean} [opts.newMessage.withMedia.enabled] -
|
|
343
|
+
* Whether to send a notification when a new message with media/file attachments is added to a conversation.
|
|
344
|
+
* @param {string} [opts.newMessage.withMedia.template] -
|
|
345
|
+
* The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.
|
|
338
346
|
* @param {function} [callback] - Callback to handle processed record
|
|
339
347
|
*
|
|
340
348
|
* @returns {Promise} Resolves to processed NotificationInstance
|
|
@@ -359,7 +367,9 @@ NotificationContext.prototype.update = function update(opts, callback) {
|
|
|
359
367
|
'AddedToConversation.Sound': _.get(opts, 'addedToConversation.sound'),
|
|
360
368
|
'RemovedFromConversation.Enabled': serialize.bool(_.get(opts, 'removedFromConversation.enabled')),
|
|
361
369
|
'RemovedFromConversation.Template': _.get(opts, 'removedFromConversation.template'),
|
|
362
|
-
'RemovedFromConversation.Sound': _.get(opts, 'removedFromConversation.sound')
|
|
370
|
+
'RemovedFromConversation.Sound': _.get(opts, 'removedFromConversation.sound'),
|
|
371
|
+
'NewMessage.WithMedia.Enabled': serialize.bool(_.get(opts, 'newMessage.withMedia.enabled')),
|
|
372
|
+
'NewMessage.WithMedia.Template': _.get(opts, 'newMessage.withMedia.template')
|
|
363
373
|
});
|
|
364
374
|
|
|
365
375
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
@@ -59,6 +59,7 @@ interface ConfigurationResource {
|
|
|
59
59
|
crm_type: string;
|
|
60
60
|
date_created: Date;
|
|
61
61
|
date_updated: Date;
|
|
62
|
+
flex_insights_hr: object;
|
|
62
63
|
flex_service_instance_sid: string;
|
|
63
64
|
integrations: object[];
|
|
64
65
|
markdown: object;
|
|
@@ -173,6 +174,7 @@ declare class ConfigurationInstance extends SerializableClass {
|
|
|
173
174
|
* @param callback - Callback to handle processed record
|
|
174
175
|
*/
|
|
175
176
|
fetch(opts?: ConfigurationInstanceFetchOptions, callback?: (error: Error | null, items: ConfigurationInstance) => any): Promise<ConfigurationInstance>;
|
|
177
|
+
flexInsightsHr: any;
|
|
176
178
|
flexServiceInstanceSid: string;
|
|
177
179
|
integrations: object[];
|
|
178
180
|
markdown: any;
|
|
@@ -210,6 +210,7 @@ ConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,
|
|
|
210
210
|
* @property {object} notifications - Configurable parameters for Notifications
|
|
211
211
|
* @property {object} markdown - Configurable parameters for Markdown
|
|
212
212
|
* @property {string} url - The absolute URL of the Configuration resource
|
|
213
|
+
* @property {object} flexInsightsHr - Object that controls workspace reporting
|
|
213
214
|
*
|
|
214
215
|
* @param {V1} version - Version of the resource
|
|
215
216
|
* @param {ConfigurationPayload} payload - The instance payload
|
|
@@ -258,6 +259,7 @@ ConfigurationInstance = function ConfigurationInstance(version, payload) {
|
|
|
258
259
|
this.notifications = payload.notifications; // jshint ignore:line
|
|
259
260
|
this.markdown = payload.markdown; // jshint ignore:line
|
|
260
261
|
this.url = payload.url; // jshint ignore:line
|
|
262
|
+
this.flexInsightsHr = payload.flex_insights_hr; // jshint ignore:line
|
|
261
263
|
|
|
262
264
|
// Context
|
|
263
265
|
this._context = undefined;
|
|
@@ -27,11 +27,13 @@ declare function UserList(version: V1): UserListInstance;
|
|
|
27
27
|
*
|
|
28
28
|
* @property avatar - The avatar URL which will be shown in Frontline application
|
|
29
29
|
* @property friendlyName - The string that you assigned to describe the User
|
|
30
|
+
* @property isAvailable - Whether the User is available for new conversations
|
|
30
31
|
* @property state - Current state of this user
|
|
31
32
|
*/
|
|
32
33
|
interface UserInstanceUpdateOptions {
|
|
33
34
|
avatar?: string;
|
|
34
35
|
friendlyName?: string;
|
|
36
|
+
isAvailable?: boolean;
|
|
35
37
|
state?: UserStateType;
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -59,6 +61,7 @@ interface UserResource {
|
|
|
59
61
|
avatar: string;
|
|
60
62
|
friendly_name: string;
|
|
61
63
|
identity: string;
|
|
64
|
+
is_available: boolean;
|
|
62
65
|
sid: string;
|
|
63
66
|
state: UserStateType;
|
|
64
67
|
url: string;
|
|
@@ -129,6 +132,7 @@ declare class UserInstance extends SerializableClass {
|
|
|
129
132
|
fetch(callback?: (error: Error | null, items: UserInstance) => any): Promise<UserInstance>;
|
|
130
133
|
friendlyName: string;
|
|
131
134
|
identity: string;
|
|
135
|
+
isAvailable: boolean;
|
|
132
136
|
sid: string;
|
|
133
137
|
state: UserStateType;
|
|
134
138
|
/**
|
|
@@ -13,6 +13,7 @@ var Q = require('q'); /* jshint ignore:line */
|
|
|
13
13
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
14
|
var util = require('util'); /* jshint ignore:line */
|
|
15
15
|
var Page = require('../../../base/Page'); /* jshint ignore:line */
|
|
16
|
+
var serialize = require('../../../base/serialize'); /* jshint ignore:line */
|
|
16
17
|
var values = require('../../../base/values'); /* jshint ignore:line */
|
|
17
18
|
|
|
18
19
|
var UserList;
|
|
@@ -171,6 +172,8 @@ UserPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
171
172
|
* @property {string} avatar -
|
|
172
173
|
* The avatar URL which will be shown in Frontline application
|
|
173
174
|
* @property {user.state_type} state - Current state of this user
|
|
175
|
+
* @property {boolean} isAvailable -
|
|
176
|
+
* Whether the User is available for new conversations
|
|
174
177
|
* @property {string} url - An absolute URL for this user.
|
|
175
178
|
*
|
|
176
179
|
* @param {V1} version - Version of the resource
|
|
@@ -187,6 +190,7 @@ UserInstance = function UserInstance(version, payload, sid) {
|
|
|
187
190
|
this.friendlyName = payload.friendly_name; // jshint ignore:line
|
|
188
191
|
this.avatar = payload.avatar; // jshint ignore:line
|
|
189
192
|
this.state = payload.state; // jshint ignore:line
|
|
193
|
+
this.isAvailable = payload.is_available; // jshint ignore:line
|
|
190
194
|
this.url = payload.url; // jshint ignore:line
|
|
191
195
|
|
|
192
196
|
// Context
|
|
@@ -234,6 +238,8 @@ UserInstance.prototype.fetch = function fetch(callback) {
|
|
|
234
238
|
* @param {string} [opts.avatar] -
|
|
235
239
|
* The avatar URL which will be shown in Frontline application
|
|
236
240
|
* @param {user.state_type} [opts.state] - Current state of this user
|
|
241
|
+
* @param {boolean} [opts.isAvailable] -
|
|
242
|
+
* Whether the User is available for new conversations
|
|
237
243
|
* @param {function} [callback] - Callback to handle processed record
|
|
238
244
|
*
|
|
239
245
|
* @returns {Promise} Resolves to processed UserInstance
|
|
@@ -333,6 +339,8 @@ UserContext.prototype.fetch = function fetch(callback) {
|
|
|
333
339
|
* @param {string} [opts.avatar] -
|
|
334
340
|
* The avatar URL which will be shown in Frontline application
|
|
335
341
|
* @param {user.state_type} [opts.state] - Current state of this user
|
|
342
|
+
* @param {boolean} [opts.isAvailable] -
|
|
343
|
+
* Whether the User is available for new conversations
|
|
336
344
|
* @param {function} [callback] - Callback to handle processed record
|
|
337
345
|
*
|
|
338
346
|
* @returns {Promise} Resolves to processed UserInstance
|
|
@@ -349,7 +357,8 @@ UserContext.prototype.update = function update(opts, callback) {
|
|
|
349
357
|
var data = values.of({
|
|
350
358
|
'FriendlyName': _.get(opts, 'friendlyName'),
|
|
351
359
|
'Avatar': _.get(opts, 'avatar'),
|
|
352
|
-
'State': _.get(opts, 'state')
|
|
360
|
+
'State': _.get(opts, 'state'),
|
|
361
|
+
'IsAvailable': serialize.bool(_.get(opts, 'isAvailable'))
|
|
353
362
|
});
|
|
354
363
|
|
|
355
364
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|