twilio 3.83.3 → 3.84.0
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/README.md +6 -0
- package/lib/rest/FlexApi.d.ts +6 -0
- package/lib/rest/FlexApi.js +27 -0
- package/lib/rest/Messaging.d.ts +4 -0
- package/lib/rest/Messaging.js +18 -0
- package/lib/rest/Oauth.d.ts +2 -0
- package/lib/rest/Oauth.js +8 -0
- package/lib/rest/Preview.d.ts +0 -10
- package/lib/rest/Preview.js +0 -46
- package/lib/rest/api/v2010/account/address.d.ts +6 -0
- package/lib/rest/api/v2010/account/address.js +13 -2
- package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +3 -6
- package/lib/rest/content/v1/content/approvalFetch.d.ts +139 -0
- package/lib/rest/content/v1/content/approvalFetch.js +328 -0
- package/lib/rest/content/v1/content.d.ts +7 -6
- package/lib/rest/content/v1/content.js +31 -31
- package/lib/rest/flexApi/V1.d.ts +3 -0
- package/lib/rest/flexApi/V1.js +11 -0
- package/lib/rest/flexApi/V2.d.ts +25 -0
- package/lib/rest/flexApi/V2.js +46 -0
- package/lib/rest/flexApi/v1/assessments.d.ts +113 -0
- package/lib/rest/flexApi/v1/assessments.js +300 -0
- package/lib/rest/flexApi/v1/goodData.d.ts +2 -2
- package/lib/rest/flexApi/v1/goodData.js +4 -4
- package/lib/rest/flexApi/v1/userRoles.js +1 -1
- package/lib/rest/flexApi/v2/webChannels.d.ts +101 -0
- package/lib/rest/flexApi/v2/webChannels.js +244 -0
- package/lib/rest/lookups/v2/phoneNumber.d.ts +22 -0
- package/lib/rest/lookups/v2/phoneNumber.js +43 -1
- package/lib/rest/messaging/V1.d.ts +6 -0
- package/lib/rest/messaging/V1.js +24 -0
- package/lib/rest/messaging/v1/domainCert.d.ts +178 -0
- package/lib/rest/messaging/v1/domainCert.js +447 -0
- package/lib/rest/messaging/v1/domainConfig.d.ts +172 -0
- package/lib/rest/messaging/v1/domainConfig.js +421 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +1 -1
- package/lib/rest/messaging/v1/service/usAppToPerson.js +5 -2
- package/lib/rest/microvisor/v1/device.d.ts +2 -0
- package/lib/rest/microvisor/v1/device.js +2 -0
- package/lib/rest/oauth/V1.d.ts +3 -0
- package/lib/rest/oauth/V1.js +11 -0
- package/lib/rest/oauth/v1/deviceCode.d.ts +107 -0
- package/lib/rest/oauth/v1/deviceCode.js +258 -0
- package/lib/rest/oauth/v1/openidDiscovery.js +1 -1
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/lib/rest/supersim/v1/settingsUpdate.d.ts +6 -0
- package/lib/rest/supersim/v1/settingsUpdate.js +7 -0
- package/lib/twiml/VoiceResponse.d.ts +7 -7
- package/lib/twiml/VoiceResponse.js +14 -14
- package/package.json +1 -1
- package/lib/rest/preview/TrustedComms.d.ts +0 -34
- package/lib/rest/preview/TrustedComms.js +0 -84
- package/lib/rest/preview/trusted_comms/brandedChannel/channel.d.ts +0 -120
- package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +0 -257
- package/lib/rest/preview/trusted_comms/brandedChannel.d.ts +0 -150
- package/lib/rest/preview/trusted_comms/brandedChannel.js +0 -362
- package/lib/rest/preview/trusted_comms/brandsInformation.d.ts +0 -158
- package/lib/rest/preview/trusted_comms/brandsInformation.js +0 -338
- package/lib/rest/preview/trusted_comms/cps.d.ts +0 -156
- package/lib/rest/preview/trusted_comms/cps.js +0 -332
- package/lib/rest/preview/trusted_comms/currentCall.d.ts +0 -180
- package/lib/rest/preview/trusted_comms/currentCall.js +0 -367
package/README.md
CHANGED
|
@@ -32,6 +32,12 @@ TypeScript is supported for TypeScript version 2.9 and above.
|
|
|
32
32
|
|
|
33
33
|
`npm install twilio` or `yarn add twilio`
|
|
34
34
|
|
|
35
|
+
### Installing Release Candidates
|
|
36
|
+
|
|
37
|
+
Or, if you're wanting to install the latest release candidate use:
|
|
38
|
+
|
|
39
|
+
`npm install twilio@rc` or `yarn add twilio@rc`
|
|
40
|
+
|
|
35
41
|
## Sample Usage
|
|
36
42
|
|
|
37
43
|
Check out these [code examples](examples) in JavaScript and TypeScript to get up and running quickly.
|
package/lib/rest/FlexApi.d.ts
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import Domain = require('../base/Domain');
|
|
9
9
|
import Twilio = require('./Twilio');
|
|
10
10
|
import V1 = require('./flexApi/V1');
|
|
11
|
+
import V2 = require('./flexApi/V2');
|
|
12
|
+
import { AssessmentsListInstance } from './flexApi/v1/assessments';
|
|
11
13
|
import { ChannelListInstance } from './flexApi/v1/channel';
|
|
12
14
|
import { ConfigurationListInstance } from './flexApi/v1/configuration';
|
|
13
15
|
import { FlexFlowListInstance } from './flexApi/v1/flexFlow';
|
|
@@ -15,6 +17,7 @@ import { GoodDataListInstance } from './flexApi/v1/goodData';
|
|
|
15
17
|
import { InteractionListInstance } from './flexApi/v1/interaction';
|
|
16
18
|
import { UserRolesListInstance } from './flexApi/v1/userRoles';
|
|
17
19
|
import { WebChannelListInstance } from './flexApi/v1/webChannel';
|
|
20
|
+
import { WebChannelsListInstance } from './flexApi/v2/webChannels';
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
declare class FlexApi extends Domain {
|
|
@@ -25,6 +28,7 @@ declare class FlexApi extends Domain {
|
|
|
25
28
|
*/
|
|
26
29
|
constructor(twilio: Twilio);
|
|
27
30
|
|
|
31
|
+
readonly assessments: AssessmentsListInstance;
|
|
28
32
|
readonly channel: ChannelListInstance;
|
|
29
33
|
readonly configuration: ConfigurationListInstance;
|
|
30
34
|
readonly flexFlow: FlexFlowListInstance;
|
|
@@ -32,7 +36,9 @@ declare class FlexApi extends Domain {
|
|
|
32
36
|
readonly interaction: InteractionListInstance;
|
|
33
37
|
readonly userRoles: UserRolesListInstance;
|
|
34
38
|
readonly v1: V1;
|
|
39
|
+
readonly v2: V2;
|
|
35
40
|
readonly webChannel: WebChannelListInstance;
|
|
41
|
+
readonly webChannels: WebChannelsListInstance;
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
export = FlexApi;
|
package/lib/rest/FlexApi.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
13
|
var Domain = require('../base/Domain'); /* jshint ignore:line */
|
|
14
14
|
var V1 = require('./flexApi/V1'); /* jshint ignore:line */
|
|
15
|
+
var V2 = require('./flexApi/V2'); /* jshint ignore:line */
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
/* jshint ignore:start */
|
|
@@ -21,6 +22,8 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
|
|
|
21
22
|
* @constructor Twilio.FlexApi
|
|
22
23
|
*
|
|
23
24
|
* @property {Twilio.FlexApi.V1} v1 - v1 version
|
|
25
|
+
* @property {Twilio.FlexApi.V2} v2 - v2 version
|
|
26
|
+
* @property {Twilio.FlexApi.V1.AssessmentsList} assessments - assessments resource
|
|
24
27
|
* @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
|
|
25
28
|
* @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
|
|
26
29
|
* configuration resource
|
|
@@ -29,6 +32,7 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
|
|
|
29
32
|
* @property {Twilio.FlexApi.V1.InteractionList} interaction - interaction resource
|
|
30
33
|
* @property {Twilio.FlexApi.V1.UserRolesList} userRoles - userRoles resource
|
|
31
34
|
* @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource
|
|
35
|
+
* @property {Twilio.FlexApi.V2.WebChannelsList} webChannels - webChannels resource
|
|
32
36
|
*
|
|
33
37
|
* @param {Twilio} twilio - The twilio client
|
|
34
38
|
*/
|
|
@@ -38,6 +42,7 @@ function FlexApi(twilio) {
|
|
|
38
42
|
|
|
39
43
|
// Versions
|
|
40
44
|
this._v1 = undefined;
|
|
45
|
+
this._v2 = undefined;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
_.extend(FlexApi.prototype, Domain.prototype);
|
|
@@ -51,6 +56,21 @@ Object.defineProperty(FlexApi.prototype,
|
|
|
51
56
|
}
|
|
52
57
|
});
|
|
53
58
|
|
|
59
|
+
Object.defineProperty(FlexApi.prototype,
|
|
60
|
+
'v2', {
|
|
61
|
+
get: function() {
|
|
62
|
+
this._v2 = this._v2 || new V2(this);
|
|
63
|
+
return this._v2;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
Object.defineProperty(FlexApi.prototype,
|
|
68
|
+
'assessments', {
|
|
69
|
+
get: function() {
|
|
70
|
+
return this.v1.assessments;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
54
74
|
Object.defineProperty(FlexApi.prototype,
|
|
55
75
|
'channel', {
|
|
56
76
|
get: function() {
|
|
@@ -100,4 +120,11 @@ Object.defineProperty(FlexApi.prototype,
|
|
|
100
120
|
}
|
|
101
121
|
});
|
|
102
122
|
|
|
123
|
+
Object.defineProperty(FlexApi.prototype,
|
|
124
|
+
'webChannels', {
|
|
125
|
+
get: function() {
|
|
126
|
+
return this.v2.webChannels;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
103
130
|
module.exports = FlexApi;
|
package/lib/rest/Messaging.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import Twilio = require('./Twilio');
|
|
|
10
10
|
import V1 = require('./messaging/V1');
|
|
11
11
|
import { BrandRegistrationListInstance } from './messaging/v1/brandRegistration';
|
|
12
12
|
import { DeactivationsListInstance } from './messaging/v1/deactivation';
|
|
13
|
+
import { DomainCertsListInstance } from './messaging/v1/domainCert';
|
|
14
|
+
import { DomainConfigListInstance } from './messaging/v1/domainConfig';
|
|
13
15
|
import { ExternalCampaignListInstance } from './messaging/v1/externalCampaign';
|
|
14
16
|
import { ServiceListInstance } from './messaging/v1/service';
|
|
15
17
|
import { TollfreeVerificationListInstance } from './messaging/v1/tollfreeVerification';
|
|
@@ -26,6 +28,8 @@ declare class Messaging extends Domain {
|
|
|
26
28
|
|
|
27
29
|
readonly brandRegistrations: BrandRegistrationListInstance;
|
|
28
30
|
readonly deactivations: DeactivationsListInstance;
|
|
31
|
+
readonly domainCerts: DomainCertsListInstance;
|
|
32
|
+
readonly domainConfig: DomainConfigListInstance;
|
|
29
33
|
readonly externalCampaign: ExternalCampaignListInstance;
|
|
30
34
|
readonly services: ServiceListInstance;
|
|
31
35
|
readonly tollfreeVerifications: TollfreeVerificationListInstance;
|
package/lib/rest/Messaging.js
CHANGED
|
@@ -25,6 +25,10 @@ var V1 = require('./messaging/V1'); /* jshint ignore:line */
|
|
|
25
25
|
* brandRegistrations resource
|
|
26
26
|
* @property {Twilio.Messaging.V1.DeactivationsList} deactivations -
|
|
27
27
|
* deactivations resource
|
|
28
|
+
* @property {Twilio.Messaging.V1.DomainCertsList} domainCerts -
|
|
29
|
+
* domainCerts resource
|
|
30
|
+
* @property {Twilio.Messaging.V1.DomainConfigList} domainConfig -
|
|
31
|
+
* domainConfig resource
|
|
28
32
|
* @property {Twilio.Messaging.V1.ExternalCampaignList} externalCampaign -
|
|
29
33
|
* externalCampaign resource
|
|
30
34
|
* @property {Twilio.Messaging.V1.ServiceList} services - services resource
|
|
@@ -67,6 +71,20 @@ Object.defineProperty(Messaging.prototype,
|
|
|
67
71
|
}
|
|
68
72
|
});
|
|
69
73
|
|
|
74
|
+
Object.defineProperty(Messaging.prototype,
|
|
75
|
+
'domainCerts', {
|
|
76
|
+
get: function() {
|
|
77
|
+
return this.v1.domainCerts;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
Object.defineProperty(Messaging.prototype,
|
|
82
|
+
'domainConfig', {
|
|
83
|
+
get: function() {
|
|
84
|
+
return this.v1.domainConfig;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
70
88
|
Object.defineProperty(Messaging.prototype,
|
|
71
89
|
'externalCampaign', {
|
|
72
90
|
get: function() {
|
package/lib/rest/Oauth.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import Domain = require('../base/Domain');
|
|
9
9
|
import Twilio = require('./Twilio');
|
|
10
10
|
import V1 = require('./oauth/V1');
|
|
11
|
+
import { DeviceCodeListInstance } from './oauth/v1/deviceCode';
|
|
11
12
|
import { OauthListInstance } from './oauth/v1/oauth';
|
|
12
13
|
import { OpenidDiscoveryListInstance } from './oauth/v1/openidDiscovery';
|
|
13
14
|
import { TokenListInstance } from './oauth/v1/token';
|
|
@@ -22,6 +23,7 @@ declare class Oauth extends Domain {
|
|
|
22
23
|
*/
|
|
23
24
|
constructor(twilio: Twilio);
|
|
24
25
|
|
|
26
|
+
readonly deviceCode: DeviceCodeListInstance;
|
|
25
27
|
readonly oauth: OauthListInstance;
|
|
26
28
|
readonly openidDiscovery: OpenidDiscoveryListInstance;
|
|
27
29
|
readonly token: TokenListInstance;
|
package/lib/rest/Oauth.js
CHANGED
|
@@ -22,6 +22,7 @@ var V1 = require('./oauth/V1'); /* jshint ignore:line */
|
|
|
22
22
|
*
|
|
23
23
|
* @property {Twilio.Oauth.V1} v1 - v1 version
|
|
24
24
|
* @property {Twilio.Oauth.V1.OauthList} oauth - oauth resource
|
|
25
|
+
* @property {Twilio.Oauth.V1.DeviceCodeList} deviceCode - deviceCode resource
|
|
25
26
|
* @property {Twilio.Oauth.V1.OpenidDiscoveryList} openidDiscovery -
|
|
26
27
|
* openidDiscovery resource
|
|
27
28
|
* @property {Twilio.Oauth.V1.TokenList} token - token resource
|
|
@@ -55,6 +56,13 @@ Object.defineProperty(Oauth.prototype,
|
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
|
|
59
|
+
Object.defineProperty(Oauth.prototype,
|
|
60
|
+
'deviceCode', {
|
|
61
|
+
get: function() {
|
|
62
|
+
return this.v1.deviceCode;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
58
66
|
Object.defineProperty(Oauth.prototype,
|
|
59
67
|
'openidDiscovery', {
|
|
60
68
|
get: function() {
|
package/lib/rest/Preview.d.ts
CHANGED
|
@@ -10,18 +10,13 @@ import Domain = require('../base/Domain');
|
|
|
10
10
|
import HostedNumbers = require('./preview/HostedNumbers');
|
|
11
11
|
import Marketplace = require('./preview/Marketplace');
|
|
12
12
|
import Sync = require('./preview/Sync');
|
|
13
|
-
import TrustedComms = require('./preview/TrustedComms');
|
|
14
13
|
import Twilio = require('./Twilio');
|
|
15
14
|
import Understand = require('./preview/Understand');
|
|
16
15
|
import Wireless = require('./preview/Wireless');
|
|
17
16
|
import { AssistantListInstance } from './preview/understand/assistant';
|
|
18
17
|
import { AuthorizationDocumentListInstance } from './preview/hosted_numbers/authorizationDocument';
|
|
19
18
|
import { AvailableAddOnListInstance } from './preview/marketplace/availableAddOn';
|
|
20
|
-
import { BrandedChannelListInstance } from './preview/trusted_comms/brandedChannel';
|
|
21
|
-
import { BrandsInformationListInstance } from './preview/trusted_comms/brandsInformation';
|
|
22
19
|
import { CommandListInstance } from './preview/wireless/command';
|
|
23
|
-
import { CpsListInstance } from './preview/trusted_comms/cps';
|
|
24
|
-
import { CurrentCallListInstance } from './preview/trusted_comms/currentCall';
|
|
25
20
|
import { FleetListInstance } from './preview/deployed_devices/fleet';
|
|
26
21
|
import { HostedNumberOrderListInstance } from './preview/hosted_numbers/hostedNumberOrder';
|
|
27
22
|
import { InstalledAddOnListInstance } from './preview/marketplace/installedAddOn';
|
|
@@ -41,11 +36,7 @@ declare class Preview extends Domain {
|
|
|
41
36
|
readonly assistants: AssistantListInstance;
|
|
42
37
|
readonly authorizationDocuments: AuthorizationDocumentListInstance;
|
|
43
38
|
readonly availableAddOns: AvailableAddOnListInstance;
|
|
44
|
-
readonly brandedChannels: BrandedChannelListInstance;
|
|
45
|
-
readonly brandsInformation: BrandsInformationListInstance;
|
|
46
39
|
readonly commands: CommandListInstance;
|
|
47
|
-
readonly cps: CpsListInstance;
|
|
48
|
-
readonly currentCalls: CurrentCallListInstance;
|
|
49
40
|
readonly deployed_devices: DeployedDevices;
|
|
50
41
|
readonly fleets: FleetListInstance;
|
|
51
42
|
readonly hostedNumberOrders: HostedNumberOrderListInstance;
|
|
@@ -56,7 +47,6 @@ declare class Preview extends Domain {
|
|
|
56
47
|
readonly services: ServiceListInstance;
|
|
57
48
|
readonly sims: SimListInstance;
|
|
58
49
|
readonly sync: Sync;
|
|
59
|
-
readonly trusted_comms: TrustedComms;
|
|
60
50
|
readonly understand: Understand;
|
|
61
51
|
readonly wireless: Wireless;
|
|
62
52
|
}
|
package/lib/rest/Preview.js
CHANGED
|
@@ -17,7 +17,6 @@ var HostedNumbers = require(
|
|
|
17
17
|
'./preview/HostedNumbers'); /* jshint ignore:line */
|
|
18
18
|
var Marketplace = require('./preview/Marketplace'); /* jshint ignore:line */
|
|
19
19
|
var Sync = require('./preview/Sync'); /* jshint ignore:line */
|
|
20
|
-
var TrustedComms = require('./preview/TrustedComms'); /* jshint ignore:line */
|
|
21
20
|
var Understand = require('./preview/Understand'); /* jshint ignore:line */
|
|
22
21
|
var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
|
|
23
22
|
|
|
@@ -35,7 +34,6 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
|
|
|
35
34
|
* @property {Twilio.Preview.Sync} sync - sync version
|
|
36
35
|
* @property {Twilio.Preview.Understand} understand - understand version
|
|
37
36
|
* @property {Twilio.Preview.Wireless} wireless - wireless version
|
|
38
|
-
* @property {Twilio.Preview.TrustedComms} trusted_comms - trusted_comms version
|
|
39
37
|
* @property {Twilio.Preview.DeployedDevices.FleetList} fleets - fleets resource
|
|
40
38
|
* @property {Twilio.Preview.HostedNumbers.AuthorizationDocumentList} authorizationDocuments -
|
|
41
39
|
* authorizationDocuments resource
|
|
@@ -51,13 +49,6 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
|
|
|
51
49
|
* @property {Twilio.Preview.Wireless.CommandList} commands - commands resource
|
|
52
50
|
* @property {Twilio.Preview.Wireless.RatePlanList} ratePlans - ratePlans resource
|
|
53
51
|
* @property {Twilio.Preview.Wireless.SimList} sims - sims resource
|
|
54
|
-
* @property {Twilio.Preview.TrustedComms.BrandedChannelList} brandedChannels -
|
|
55
|
-
* brandedChannels resource
|
|
56
|
-
* @property {Twilio.Preview.TrustedComms.BrandsInformationList} brandsInformation -
|
|
57
|
-
* brandsInformation resource
|
|
58
|
-
* @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource
|
|
59
|
-
* @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -
|
|
60
|
-
* currentCalls resource
|
|
61
52
|
*
|
|
62
53
|
* @param {Twilio} twilio - The twilio client
|
|
63
54
|
*/
|
|
@@ -72,7 +63,6 @@ function Preview(twilio) {
|
|
|
72
63
|
this._sync = undefined;
|
|
73
64
|
this._understand = undefined;
|
|
74
65
|
this._wireless = undefined;
|
|
75
|
-
this._trusted_comms = undefined;
|
|
76
66
|
}
|
|
77
67
|
|
|
78
68
|
_.extend(Preview.prototype, Domain.prototype);
|
|
@@ -126,14 +116,6 @@ Object.defineProperty(Preview.prototype,
|
|
|
126
116
|
}
|
|
127
117
|
});
|
|
128
118
|
|
|
129
|
-
Object.defineProperty(Preview.prototype,
|
|
130
|
-
'trusted_comms', {
|
|
131
|
-
get: function() {
|
|
132
|
-
this._trusted_comms = this._trusted_comms || new TrustedComms(this);
|
|
133
|
-
return this._trusted_comms;
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
119
|
Object.defineProperty(Preview.prototype,
|
|
138
120
|
'fleets', {
|
|
139
121
|
get: function() {
|
|
@@ -204,32 +186,4 @@ Object.defineProperty(Preview.prototype,
|
|
|
204
186
|
}
|
|
205
187
|
});
|
|
206
188
|
|
|
207
|
-
Object.defineProperty(Preview.prototype,
|
|
208
|
-
'brandedChannels', {
|
|
209
|
-
get: function() {
|
|
210
|
-
return this.trusted_comms.brandedChannels;
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
Object.defineProperty(Preview.prototype,
|
|
215
|
-
'brandsInformation', {
|
|
216
|
-
get: function() {
|
|
217
|
-
return this.trusted_comms.brandsInformation;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
Object.defineProperty(Preview.prototype,
|
|
222
|
-
'cps', {
|
|
223
|
-
get: function() {
|
|
224
|
-
return this.trusted_comms.cps;
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
Object.defineProperty(Preview.prototype,
|
|
229
|
-
'currentCalls', {
|
|
230
|
-
get: function() {
|
|
231
|
-
return this.trusted_comms.currentCalls;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
|
|
235
189
|
module.exports = Preview;
|
|
@@ -31,6 +31,7 @@ declare function AddressList(version: V2010, accountSid: string): AddressListIns
|
|
|
31
31
|
* @property postalCode - The postal code of the address
|
|
32
32
|
* @property region - The state or region of the address
|
|
33
33
|
* @property street - The number and street address of the address
|
|
34
|
+
* @property streetSecondary - The additional number and street address of the address
|
|
34
35
|
*/
|
|
35
36
|
interface AddressInstanceUpdateOptions {
|
|
36
37
|
autoCorrectAddress?: boolean;
|
|
@@ -41,6 +42,7 @@ interface AddressInstanceUpdateOptions {
|
|
|
41
42
|
postalCode?: string;
|
|
42
43
|
region?: string;
|
|
43
44
|
street?: string;
|
|
45
|
+
streetSecondary?: string;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
interface AddressListInstance {
|
|
@@ -175,6 +177,7 @@ interface AddressListInstance {
|
|
|
175
177
|
* @property postalCode - The postal code of the new address
|
|
176
178
|
* @property region - The state or region of the new address
|
|
177
179
|
* @property street - The number and street address of the new address
|
|
180
|
+
* @property streetSecondary - The additional number and street address of the address
|
|
178
181
|
*/
|
|
179
182
|
interface AddressListInstanceCreateOptions {
|
|
180
183
|
autoCorrectAddress?: boolean;
|
|
@@ -186,6 +189,7 @@ interface AddressListInstanceCreateOptions {
|
|
|
186
189
|
postalCode: string;
|
|
187
190
|
region: string;
|
|
188
191
|
street: string;
|
|
192
|
+
streetSecondary?: string;
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
/**
|
|
@@ -279,6 +283,7 @@ interface AddressResource {
|
|
|
279
283
|
region: string;
|
|
280
284
|
sid: string;
|
|
281
285
|
street: string;
|
|
286
|
+
street_secondary: string;
|
|
282
287
|
uri: string;
|
|
283
288
|
validated: boolean;
|
|
284
289
|
verified: boolean;
|
|
@@ -372,6 +377,7 @@ declare class AddressInstance extends SerializableClass {
|
|
|
372
377
|
remove(callback?: (error: Error | null, items: AddressInstance) => any): Promise<boolean>;
|
|
373
378
|
sid: string;
|
|
374
379
|
street: string;
|
|
380
|
+
streetSecondary: string;
|
|
375
381
|
/**
|
|
376
382
|
* Provide a user-friendly representation
|
|
377
383
|
*/
|
|
@@ -74,6 +74,8 @@ AddressList = function AddressList(version, accountSid) {
|
|
|
74
74
|
* Whether to enable emergency calling on the new address
|
|
75
75
|
* @param {boolean} [opts.autoCorrectAddress] -
|
|
76
76
|
* Whether we should automatically correct the address
|
|
77
|
+
* @param {string} [opts.streetSecondary] -
|
|
78
|
+
* The additional number and street address of the address
|
|
77
79
|
* @param {function} [callback] - Callback to handle processed record
|
|
78
80
|
*
|
|
79
81
|
* @returns {Promise} Resolves to processed AddressInstance
|
|
@@ -112,7 +114,8 @@ AddressList = function AddressList(version, accountSid) {
|
|
|
112
114
|
'IsoCountry': _.get(opts, 'isoCountry'),
|
|
113
115
|
'FriendlyName': _.get(opts, 'friendlyName'),
|
|
114
116
|
'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),
|
|
115
|
-
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))
|
|
117
|
+
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress')),
|
|
118
|
+
'StreetSecondary': _.get(opts, 'streetSecondary')
|
|
116
119
|
});
|
|
117
120
|
|
|
118
121
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -533,6 +536,8 @@ AddressPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
533
536
|
* Whether the address has been validated to comply with local regulation
|
|
534
537
|
* @property {boolean} verified -
|
|
535
538
|
* Whether the address has been verified to comply with regulation
|
|
539
|
+
* @property {string} streetSecondary -
|
|
540
|
+
* The additional number and street address of the address
|
|
536
541
|
*
|
|
537
542
|
* @param {V2010} version - Version of the resource
|
|
538
543
|
* @param {AddressPayload} payload - The instance payload
|
|
@@ -560,6 +565,7 @@ AddressInstance = function AddressInstance(version, payload, accountSid, sid) {
|
|
|
560
565
|
this.emergencyEnabled = payload.emergency_enabled; // jshint ignore:line
|
|
561
566
|
this.validated = payload.validated; // jshint ignore:line
|
|
562
567
|
this.verified = payload.verified; // jshint ignore:line
|
|
568
|
+
this.streetSecondary = payload.street_secondary; // jshint ignore:line
|
|
563
569
|
|
|
564
570
|
// Context
|
|
565
571
|
this._context = undefined;
|
|
@@ -627,6 +633,8 @@ AddressInstance.prototype.fetch = function fetch(callback) {
|
|
|
627
633
|
* Whether to enable emergency calling on the address
|
|
628
634
|
* @param {boolean} [opts.autoCorrectAddress] -
|
|
629
635
|
* Whether we should automatically correct the address
|
|
636
|
+
* @param {string} [opts.streetSecondary] -
|
|
637
|
+
* The additional number and street address of the address
|
|
630
638
|
* @param {function} [callback] - Callback to handle processed record
|
|
631
639
|
*
|
|
632
640
|
* @returns {Promise} Resolves to processed AddressInstance
|
|
@@ -788,6 +796,8 @@ AddressContext.prototype.fetch = function fetch(callback) {
|
|
|
788
796
|
* Whether to enable emergency calling on the address
|
|
789
797
|
* @param {boolean} [opts.autoCorrectAddress] -
|
|
790
798
|
* Whether we should automatically correct the address
|
|
799
|
+
* @param {string} [opts.streetSecondary] -
|
|
800
|
+
* The additional number and street address of the address
|
|
791
801
|
* @param {function} [callback] - Callback to handle processed record
|
|
792
802
|
*
|
|
793
803
|
* @returns {Promise} Resolves to processed AddressInstance
|
|
@@ -809,7 +819,8 @@ AddressContext.prototype.update = function update(opts, callback) {
|
|
|
809
819
|
'Region': _.get(opts, 'region'),
|
|
810
820
|
'PostalCode': _.get(opts, 'postalCode'),
|
|
811
821
|
'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),
|
|
812
|
-
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))
|
|
822
|
+
'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress')),
|
|
823
|
+
'StreetSecondary': _.get(opts, 'streetSecondary')
|
|
813
824
|
});
|
|
814
825
|
|
|
815
826
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
@@ -53,7 +53,7 @@ interface UserDefinedMessageSubscriptionListInstance {
|
|
|
53
53
|
interface UserDefinedMessageSubscriptionListInstanceCreateOptions {
|
|
54
54
|
callback: string;
|
|
55
55
|
idempotencyKey?: string;
|
|
56
|
-
method
|
|
56
|
+
method?: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface UserDefinedMessageSubscriptionPayload extends UserDefinedMessageSubscriptionResource, Page.TwilioResponsePayload {
|
|
@@ -63,9 +63,9 @@ UserDefinedMessageSubscriptionList = function
|
|
|
63
63
|
* @param {object} opts - Options for request
|
|
64
64
|
* @param {string} opts.callback -
|
|
65
65
|
* The URL we should call to send user defined messages.
|
|
66
|
-
* @param {string} opts.method - HTTP method used with the callback.
|
|
67
66
|
* @param {string} [opts.idempotencyKey] -
|
|
68
67
|
* A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.
|
|
68
|
+
* @param {string} [opts.method] - HTTP method used with the callback.
|
|
69
69
|
* @param {function} [callback] - Callback to handle processed record
|
|
70
70
|
*
|
|
71
71
|
* @returns {Promise} Resolves to processed UserDefinedMessageSubscriptionInstance
|
|
@@ -79,15 +79,12 @@ UserDefinedMessageSubscriptionList = function
|
|
|
79
79
|
if (_.isUndefined(opts['callback'])) {
|
|
80
80
|
throw new Error('Required parameter "opts[\'callback\']" missing.');
|
|
81
81
|
}
|
|
82
|
-
if (_.isUndefined(opts['method'])) {
|
|
83
|
-
throw new Error('Required parameter "opts[\'method\']" missing.');
|
|
84
|
-
}
|
|
85
82
|
|
|
86
83
|
var deferred = Q.defer();
|
|
87
84
|
var data = values.of({
|
|
88
85
|
'Callback': _.get(opts, 'callback'),
|
|
89
|
-
'
|
|
90
|
-
'
|
|
86
|
+
'IdempotencyKey': _.get(opts, 'idempotencyKey'),
|
|
87
|
+
'Method': _.get(opts, 'method')
|
|
91
88
|
});
|
|
92
89
|
|
|
93
90
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by
|
|
3
|
+
* \ / _ _ _| _ _
|
|
4
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
* / /
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import Page = require('../../../../base/Page');
|
|
9
|
+
import Response = require('../../../../http/response');
|
|
10
|
+
import V1 = require('../../V1');
|
|
11
|
+
import { SerializableClass } from '../../../../interfaces';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Initialize the ApprovalFetchList
|
|
15
|
+
*
|
|
16
|
+
* PLEASE NOTE that this class contains preview products that are subject to
|
|
17
|
+
* change. Use them with caution. If you currently do not have developer preview
|
|
18
|
+
* access, please contact help@twilio.com.
|
|
19
|
+
*
|
|
20
|
+
* @param version - Version of the resource
|
|
21
|
+
* @param sid - The unique string that identifies the Content resource
|
|
22
|
+
*/
|
|
23
|
+
declare function ApprovalFetchList(version: V1, sid: string): ApprovalFetchListInstance;
|
|
24
|
+
|
|
25
|
+
interface ApprovalFetchListInstance {
|
|
26
|
+
/**
|
|
27
|
+
* @param sid - sid of instance
|
|
28
|
+
*/
|
|
29
|
+
(sid: string): ApprovalFetchContext;
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a approval_fetch
|
|
32
|
+
*/
|
|
33
|
+
get(): ApprovalFetchContext;
|
|
34
|
+
/**
|
|
35
|
+
* Provide a user-friendly representation
|
|
36
|
+
*/
|
|
37
|
+
toJSON(): any;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface ApprovalFetchPayload extends ApprovalFetchResource, Page.TwilioResponsePayload {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface ApprovalFetchResource {
|
|
44
|
+
account_sid: string;
|
|
45
|
+
sid: string;
|
|
46
|
+
url: string;
|
|
47
|
+
whatsapp: object;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface ApprovalFetchSolution {
|
|
51
|
+
sid?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
declare class ApprovalFetchContext {
|
|
56
|
+
/**
|
|
57
|
+
* Initialize the ApprovalFetchContext
|
|
58
|
+
*
|
|
59
|
+
* PLEASE NOTE that this class contains preview products that are subject to
|
|
60
|
+
* change. Use them with caution. If you currently do not have developer preview
|
|
61
|
+
* access, please contact help@twilio.com.
|
|
62
|
+
*
|
|
63
|
+
* @param version - Version of the resource
|
|
64
|
+
* @param sid - The unique string that identifies the Content resource
|
|
65
|
+
*/
|
|
66
|
+
constructor(version: V1, sid: string);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* fetch a ApprovalFetchInstance
|
|
70
|
+
*
|
|
71
|
+
* @param callback - Callback to handle processed record
|
|
72
|
+
*/
|
|
73
|
+
fetch(callback?: (error: Error | null, items: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
|
|
74
|
+
/**
|
|
75
|
+
* Provide a user-friendly representation
|
|
76
|
+
*/
|
|
77
|
+
toJSON(): any;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
declare class ApprovalFetchInstance extends SerializableClass {
|
|
82
|
+
/**
|
|
83
|
+
* Initialize the ApprovalFetchContext
|
|
84
|
+
*
|
|
85
|
+
* PLEASE NOTE that this class contains preview products that are subject to
|
|
86
|
+
* change. Use them with caution. If you currently do not have developer preview
|
|
87
|
+
* access, please contact help@twilio.com.
|
|
88
|
+
*
|
|
89
|
+
* @param version - Version of the resource
|
|
90
|
+
* @param payload - The instance payload
|
|
91
|
+
* @param sid - The unique string that identifies the Content resource
|
|
92
|
+
*/
|
|
93
|
+
constructor(version: V1, payload: ApprovalFetchPayload, sid: string);
|
|
94
|
+
|
|
95
|
+
private _proxy: ApprovalFetchContext;
|
|
96
|
+
accountSid: string;
|
|
97
|
+
/**
|
|
98
|
+
* fetch a ApprovalFetchInstance
|
|
99
|
+
*
|
|
100
|
+
* @param callback - Callback to handle processed record
|
|
101
|
+
*/
|
|
102
|
+
fetch(callback?: (error: Error | null, items: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
|
|
103
|
+
sid: string;
|
|
104
|
+
/**
|
|
105
|
+
* Provide a user-friendly representation
|
|
106
|
+
*/
|
|
107
|
+
toJSON(): any;
|
|
108
|
+
url: string;
|
|
109
|
+
whatsapp: any;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
declare class ApprovalFetchPage extends Page<V1, ApprovalFetchPayload, ApprovalFetchResource, ApprovalFetchInstance> {
|
|
114
|
+
/**
|
|
115
|
+
* Initialize the ApprovalFetchPage
|
|
116
|
+
*
|
|
117
|
+
* PLEASE NOTE that this class contains preview products that are subject to
|
|
118
|
+
* change. Use them with caution. If you currently do not have developer preview
|
|
119
|
+
* access, please contact help@twilio.com.
|
|
120
|
+
*
|
|
121
|
+
* @param version - Version of the resource
|
|
122
|
+
* @param response - Response from the API
|
|
123
|
+
* @param solution - Path solution
|
|
124
|
+
*/
|
|
125
|
+
constructor(version: V1, response: Response<string>, solution: ApprovalFetchSolution);
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Build an instance of ApprovalFetchInstance
|
|
129
|
+
*
|
|
130
|
+
* @param payload - Payload response from the API
|
|
131
|
+
*/
|
|
132
|
+
getInstance(payload: ApprovalFetchPayload): ApprovalFetchInstance;
|
|
133
|
+
/**
|
|
134
|
+
* Provide a user-friendly representation
|
|
135
|
+
*/
|
|
136
|
+
toJSON(): any;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export { ApprovalFetchContext, ApprovalFetchInstance, ApprovalFetchList, ApprovalFetchListInstance, ApprovalFetchPage, ApprovalFetchPayload, ApprovalFetchResource, ApprovalFetchSolution }
|