twilio 4.8.0 → 4.9.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.
Files changed (111) hide show
  1. package/lib/base/BaseTwilio.d.ts +1 -0
  2. package/lib/jwt/AccessToken.d.ts +168 -173
  3. package/lib/jwt/AccessToken.js +180 -185
  4. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +15 -20
  5. package/lib/rest/api/v2010/account/application.d.ts +15 -20
  6. package/lib/rest/api/v2010/account/call/feedback.d.ts +5 -5
  7. package/lib/rest/api/v2010/account/call/feedbackSummary.d.ts +4 -4
  8. package/lib/rest/api/v2010/account/call/notification.d.ts +3 -4
  9. package/lib/rest/api/v2010/account/call/payment.d.ts +10 -10
  10. package/lib/rest/api/v2010/account/call/recording.d.ts +9 -9
  11. package/lib/rest/api/v2010/account/conference/recording.d.ts +9 -9
  12. package/lib/rest/api/v2010/account/connectApp.d.ts +3 -4
  13. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +33 -38
  14. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +33 -38
  15. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +33 -38
  16. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +15 -20
  17. package/lib/rest/api/v2010/account/message/feedback.d.ts +5 -5
  18. package/lib/rest/api/v2010/account/notification.d.ts +3 -4
  19. package/lib/rest/api/v2010/account/queue.d.ts +3 -3
  20. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +4 -4
  21. package/lib/rest/api/v2010/account/recording/transcription.d.ts +4 -4
  22. package/lib/rest/api/v2010/account/shortCode.d.ts +6 -8
  23. package/lib/rest/api/v2010/account/sip/domain.d.ts +9 -12
  24. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +7 -7
  25. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +7 -7
  26. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +7 -7
  27. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +7 -7
  28. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +7 -7
  29. package/lib/rest/api/v2010/account/usage/record/today.d.ts +7 -7
  30. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +7 -7
  31. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +7 -7
  32. package/lib/rest/api/v2010/account/usage/record.d.ts +7 -7
  33. package/lib/rest/api/v2010/account/usage/trigger.d.ts +27 -28
  34. package/lib/rest/api/v2010/account/usage.d.ts +1 -1
  35. package/lib/rest/chat/v2/service/channel/webhook.d.ts +5 -5
  36. package/lib/rest/content/V1.d.ts +5 -0
  37. package/lib/rest/content/V1.js +7 -0
  38. package/lib/rest/content/v1/contentAndApprovals.d.ts +190 -0
  39. package/lib/rest/content/v1/contentAndApprovals.js +134 -0
  40. package/lib/rest/conversations/v1/addressConfiguration.d.ts +8 -8
  41. package/lib/rest/conversations/v1/configuration/webhook.d.ts +9 -9
  42. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +4 -4
  43. package/lib/rest/conversations/v1/conversation/message.d.ts +8 -8
  44. package/lib/rest/conversations/v1/conversation/participant.d.ts +4 -4
  45. package/lib/rest/conversations/v1/conversation/webhook.d.ts +5 -5
  46. package/lib/rest/conversations/v1/service/binding.d.ts +7 -7
  47. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +4 -4
  48. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +4 -4
  49. package/lib/rest/conversations/v1/service/conversation/message.d.ts +8 -8
  50. package/lib/rest/conversations/v1/service/conversation/participant.d.ts +4 -4
  51. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +5 -5
  52. package/lib/rest/conversations/v1/service/conversation.d.ts +10 -10
  53. package/lib/rest/conversations/v1/service/participantConversation.d.ts +4 -4
  54. package/lib/rest/conversations/v1/service/role.d.ts +5 -5
  55. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +9 -9
  56. package/lib/rest/conversations/v1/service/user.d.ts +4 -4
  57. package/lib/rest/flexApi/V1.d.ts +5 -0
  58. package/lib/rest/flexApi/V1.js +7 -0
  59. package/lib/rest/flexApi/v1/assessments.d.ts +117 -0
  60. package/lib/rest/flexApi/v1/assessments.js +70 -1
  61. package/lib/rest/flexApi/v1/insightsConversations.d.ts +172 -0
  62. package/lib/rest/flexApi/v1/insightsConversations.js +128 -0
  63. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +2 -2
  64. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +2 -4
  65. package/lib/rest/insights/v1/call/callSummary.d.ts +17 -17
  66. package/lib/rest/insights/v1/room/participant.d.ts +16 -16
  67. package/lib/rest/insights/v1/room.d.ts +41 -42
  68. package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +5 -5
  69. package/lib/rest/media/v1/mediaProcessor.d.ts +3 -4
  70. package/lib/rest/media/v1/mediaRecording.d.ts +3 -4
  71. package/lib/rest/media/v1/playerStreamer.d.ts +3 -4
  72. package/lib/rest/messaging/V1.d.ts +10 -0
  73. package/lib/rest/messaging/V1.js +16 -0
  74. package/lib/rest/messaging/v1/brandRegistration.d.ts +12 -12
  75. package/lib/rest/messaging/v1/domainCerts.d.ts +4 -4
  76. package/lib/rest/messaging/v1/domainCerts.js +2 -2
  77. package/lib/rest/messaging/v1/domainConfigMessagingService.d.ts +121 -0
  78. package/lib/rest/messaging/v1/domainConfigMessagingService.js +122 -0
  79. package/lib/rest/messaging/v1/linkshorteningMessagingService.d.ts +109 -0
  80. package/lib/rest/messaging/v1/linkshorteningMessagingService.js +135 -0
  81. package/lib/rest/messaging/v1/service.d.ts +6 -8
  82. package/lib/rest/microvisor/v1/app/appManifest.d.ts +101 -0
  83. package/lib/rest/microvisor/v1/app/appManifest.js +115 -0
  84. package/lib/rest/microvisor/v1/app.d.ts +11 -0
  85. package/lib/rest/microvisor/v1/app.js +15 -0
  86. package/lib/rest/monitor/v1/alert.d.ts +3 -4
  87. package/lib/rest/preview/wireless/sim.d.ts +12 -16
  88. package/lib/rest/supersim/v1/esimProfile.d.ts +14 -0
  89. package/lib/rest/supersim/v1/esimProfile.js +6 -0
  90. package/lib/rest/supersim/v1/fleet.d.ts +6 -8
  91. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +14 -14
  92. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +12 -12
  93. package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +15 -20
  94. package/lib/rest/trunking/v1/trunk.d.ts +3 -4
  95. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +4 -4
  96. package/lib/rest/trusthub/v1/customerProfiles.d.ts +8 -8
  97. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +4 -4
  98. package/lib/rest/trusthub/v1/trustProducts.d.ts +8 -8
  99. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  100. package/lib/rest/video/v1/composition.d.ts +3 -4
  101. package/lib/rest/video/v1/compositionHook.d.ts +3 -4
  102. package/lib/rest/video/v1/recording.d.ts +3 -4
  103. package/lib/rest/video/v1/room/participant/anonymize.d.ts +4 -4
  104. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +4 -4
  105. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +4 -4
  106. package/lib/rest/video/v1/room/participant.d.ts +8 -8
  107. package/lib/rest/video/v1/room.d.ts +3 -4
  108. package/lib/rest/voice/v1/byocTrunk.d.ts +9 -12
  109. package/lib/rest/wireless/v1/sim.d.ts +15 -20
  110. package/lib/rest/wireless/v1/usageRecord.d.ts +4 -4
  111. package/package.json +1 -1
@@ -91,7 +91,7 @@ class DomainCertsInstance {
91
91
  this.domainName = payload.domain_name;
92
92
  this.certificateSid = payload.certificate_sid;
93
93
  this.url = payload.url;
94
- this.validated = payload.validated;
94
+ this.certInValidation = payload.cert_in_validation;
95
95
  this._solution = { domainSid: domainSid || this.domainSid };
96
96
  }
97
97
  get _proxy() {
@@ -137,7 +137,7 @@ class DomainCertsInstance {
137
137
  domainName: this.domainName,
138
138
  certificateSid: this.certificateSid,
139
139
  url: this.url,
140
- validated: this.validated,
140
+ certInValidation: this.certInValidation,
141
141
  };
142
142
  }
143
143
  [util_1.inspect.custom](_depth, options) {
@@ -0,0 +1,121 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ export interface DomainConfigMessagingServiceContext {
5
+ /**
6
+ * Fetch a DomainConfigMessagingServiceInstance
7
+ *
8
+ * @param callback - Callback to handle processed record
9
+ *
10
+ * @returns Resolves to processed DomainConfigMessagingServiceInstance
11
+ */
12
+ fetch(callback?: (error: Error | null, item?: DomainConfigMessagingServiceInstance) => any): Promise<DomainConfigMessagingServiceInstance>;
13
+ /**
14
+ * Provide a user-friendly representation
15
+ */
16
+ toJSON(): any;
17
+ [inspect.custom](_depth: any, options: InspectOptions): any;
18
+ }
19
+ export interface DomainConfigMessagingServiceContextSolution {
20
+ messagingServiceSid: string;
21
+ }
22
+ export declare class DomainConfigMessagingServiceContextImpl implements DomainConfigMessagingServiceContext {
23
+ protected _version: V1;
24
+ protected _solution: DomainConfigMessagingServiceContextSolution;
25
+ protected _uri: string;
26
+ constructor(_version: V1, messagingServiceSid: string);
27
+ fetch(callback?: (error: Error | null, item?: DomainConfigMessagingServiceInstance) => any): Promise<DomainConfigMessagingServiceInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ *
31
+ * @returns Object
32
+ */
33
+ toJSON(): DomainConfigMessagingServiceContextSolution;
34
+ [inspect.custom](_depth: any, options: InspectOptions): string;
35
+ }
36
+ interface DomainConfigMessagingServiceResource {
37
+ domain_sid: string;
38
+ config_sid: string;
39
+ messaging_service_sid: string;
40
+ fallback_url: string;
41
+ callback_url: string;
42
+ date_created: Date;
43
+ date_updated: Date;
44
+ url: string;
45
+ }
46
+ export declare class DomainConfigMessagingServiceInstance {
47
+ protected _version: V1;
48
+ protected _solution: DomainConfigMessagingServiceContextSolution;
49
+ protected _context?: DomainConfigMessagingServiceContext;
50
+ constructor(_version: V1, payload: DomainConfigMessagingServiceResource, messagingServiceSid?: string);
51
+ /**
52
+ * The unique string that we created to identify the Domain resource.
53
+ */
54
+ domainSid: string;
55
+ /**
56
+ * The unique string that we created to identify the Domain config (prefix ZK).
57
+ */
58
+ configSid: string;
59
+ /**
60
+ * The unique string that identifies the messaging service
61
+ */
62
+ messagingServiceSid: string;
63
+ /**
64
+ * Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
65
+ */
66
+ fallbackUrl: string;
67
+ /**
68
+ * URL to receive click events to your webhook whenever the recipients click on the shortened links.
69
+ */
70
+ callbackUrl: string;
71
+ /**
72
+ * Date this Domain Config was created.
73
+ */
74
+ dateCreated: Date;
75
+ /**
76
+ * Date that this Domain Config was last updated.
77
+ */
78
+ dateUpdated: Date;
79
+ url: string;
80
+ private get _proxy();
81
+ /**
82
+ * Fetch a DomainConfigMessagingServiceInstance
83
+ *
84
+ * @param callback - Callback to handle processed record
85
+ *
86
+ * @returns Resolves to processed DomainConfigMessagingServiceInstance
87
+ */
88
+ fetch(callback?: (error: Error | null, item?: DomainConfigMessagingServiceInstance) => any): Promise<DomainConfigMessagingServiceInstance>;
89
+ /**
90
+ * Provide a user-friendly representation
91
+ *
92
+ * @returns Object
93
+ */
94
+ toJSON(): {
95
+ domainSid: string;
96
+ configSid: string;
97
+ messagingServiceSid: string;
98
+ fallbackUrl: string;
99
+ callbackUrl: string;
100
+ dateCreated: Date;
101
+ dateUpdated: Date;
102
+ url: string;
103
+ };
104
+ [inspect.custom](_depth: any, options: InspectOptions): string;
105
+ }
106
+ export interface DomainConfigMessagingServiceSolution {
107
+ }
108
+ export interface DomainConfigMessagingServiceListInstance {
109
+ _version: V1;
110
+ _solution: DomainConfigMessagingServiceSolution;
111
+ _uri: string;
112
+ (messagingServiceSid: string): DomainConfigMessagingServiceContext;
113
+ get(messagingServiceSid: string): DomainConfigMessagingServiceContext;
114
+ /**
115
+ * Provide a user-friendly representation
116
+ */
117
+ toJSON(): any;
118
+ [inspect.custom](_depth: any, options: InspectOptions): any;
119
+ }
120
+ export declare function DomainConfigMessagingServiceListInstance(version: V1): DomainConfigMessagingServiceListInstance;
121
+ export {};
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Messaging
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.DomainConfigMessagingServiceListInstance = exports.DomainConfigMessagingServiceInstance = exports.DomainConfigMessagingServiceContextImpl = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ const utility_1 = require("../../../base/utility");
21
+ class DomainConfigMessagingServiceContextImpl {
22
+ constructor(_version, messagingServiceSid) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(messagingServiceSid)) {
25
+ throw new Error("Parameter 'messagingServiceSid' is not valid.");
26
+ }
27
+ this._solution = { messagingServiceSid };
28
+ this._uri = `/LinkShortening/MessagingService/${messagingServiceSid}/DomainConfig`;
29
+ }
30
+ fetch(callback) {
31
+ const instance = this;
32
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
33
+ uri: instance._uri,
34
+ method: "get",
35
+ });
36
+ operationPromise = operationPromise.then((payload) => new DomainConfigMessagingServiceInstance(operationVersion, payload, instance._solution.messagingServiceSid));
37
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
38
+ return operationPromise;
39
+ }
40
+ /**
41
+ * Provide a user-friendly representation
42
+ *
43
+ * @returns Object
44
+ */
45
+ toJSON() {
46
+ return this._solution;
47
+ }
48
+ [util_1.inspect.custom](_depth, options) {
49
+ return (0, util_1.inspect)(this.toJSON(), options);
50
+ }
51
+ }
52
+ exports.DomainConfigMessagingServiceContextImpl = DomainConfigMessagingServiceContextImpl;
53
+ class DomainConfigMessagingServiceInstance {
54
+ constructor(_version, payload, messagingServiceSid) {
55
+ this._version = _version;
56
+ this.domainSid = payload.domain_sid;
57
+ this.configSid = payload.config_sid;
58
+ this.messagingServiceSid = payload.messaging_service_sid;
59
+ this.fallbackUrl = payload.fallback_url;
60
+ this.callbackUrl = payload.callback_url;
61
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
62
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
63
+ this.url = payload.url;
64
+ this._solution = {
65
+ messagingServiceSid: messagingServiceSid || this.messagingServiceSid,
66
+ };
67
+ }
68
+ get _proxy() {
69
+ this._context =
70
+ this._context ||
71
+ new DomainConfigMessagingServiceContextImpl(this._version, this._solution.messagingServiceSid);
72
+ return this._context;
73
+ }
74
+ /**
75
+ * Fetch a DomainConfigMessagingServiceInstance
76
+ *
77
+ * @param callback - Callback to handle processed record
78
+ *
79
+ * @returns Resolves to processed DomainConfigMessagingServiceInstance
80
+ */
81
+ fetch(callback) {
82
+ return this._proxy.fetch(callback);
83
+ }
84
+ /**
85
+ * Provide a user-friendly representation
86
+ *
87
+ * @returns Object
88
+ */
89
+ toJSON() {
90
+ return {
91
+ domainSid: this.domainSid,
92
+ configSid: this.configSid,
93
+ messagingServiceSid: this.messagingServiceSid,
94
+ fallbackUrl: this.fallbackUrl,
95
+ callbackUrl: this.callbackUrl,
96
+ dateCreated: this.dateCreated,
97
+ dateUpdated: this.dateUpdated,
98
+ url: this.url,
99
+ };
100
+ }
101
+ [util_1.inspect.custom](_depth, options) {
102
+ return (0, util_1.inspect)(this.toJSON(), options);
103
+ }
104
+ }
105
+ exports.DomainConfigMessagingServiceInstance = DomainConfigMessagingServiceInstance;
106
+ function DomainConfigMessagingServiceListInstance(version) {
107
+ const instance = ((messagingServiceSid) => instance.get(messagingServiceSid));
108
+ instance.get = function get(messagingServiceSid) {
109
+ return new DomainConfigMessagingServiceContextImpl(version, messagingServiceSid);
110
+ };
111
+ instance._version = version;
112
+ instance._solution = {};
113
+ instance._uri = ``;
114
+ instance.toJSON = function toJSON() {
115
+ return instance._solution;
116
+ };
117
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
118
+ return (0, util_1.inspect)(instance.toJSON(), options);
119
+ };
120
+ return instance;
121
+ }
122
+ exports.DomainConfigMessagingServiceListInstance = DomainConfigMessagingServiceListInstance;
@@ -0,0 +1,109 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ export interface LinkshorteningMessagingServiceContext {
5
+ /**
6
+ * Create a LinkshorteningMessagingServiceInstance
7
+ *
8
+ * @param callback - Callback to handle processed record
9
+ *
10
+ * @returns Resolves to processed LinkshorteningMessagingServiceInstance
11
+ */
12
+ create(callback?: (error: Error | null, item?: LinkshorteningMessagingServiceInstance) => any): Promise<LinkshorteningMessagingServiceInstance>;
13
+ /**
14
+ * Remove a LinkshorteningMessagingServiceInstance
15
+ *
16
+ * @param callback - Callback to handle processed record
17
+ *
18
+ * @returns Resolves to processed boolean
19
+ */
20
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
21
+ /**
22
+ * Provide a user-friendly representation
23
+ */
24
+ toJSON(): any;
25
+ [inspect.custom](_depth: any, options: InspectOptions): any;
26
+ }
27
+ export interface LinkshorteningMessagingServiceContextSolution {
28
+ domainSid: string;
29
+ messagingServiceSid: string;
30
+ }
31
+ export declare class LinkshorteningMessagingServiceContextImpl implements LinkshorteningMessagingServiceContext {
32
+ protected _version: V1;
33
+ protected _solution: LinkshorteningMessagingServiceContextSolution;
34
+ protected _uri: string;
35
+ constructor(_version: V1, domainSid: string, messagingServiceSid: string);
36
+ create(callback?: (error: Error | null, item?: LinkshorteningMessagingServiceInstance) => any): Promise<LinkshorteningMessagingServiceInstance>;
37
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
38
+ /**
39
+ * Provide a user-friendly representation
40
+ *
41
+ * @returns Object
42
+ */
43
+ toJSON(): LinkshorteningMessagingServiceContextSolution;
44
+ [inspect.custom](_depth: any, options: InspectOptions): string;
45
+ }
46
+ interface LinkshorteningMessagingServiceResource {
47
+ domain_sid: string;
48
+ messaging_service_sid: string;
49
+ url: string;
50
+ }
51
+ export declare class LinkshorteningMessagingServiceInstance {
52
+ protected _version: V1;
53
+ protected _solution: LinkshorteningMessagingServiceContextSolution;
54
+ protected _context?: LinkshorteningMessagingServiceContext;
55
+ constructor(_version: V1, payload: LinkshorteningMessagingServiceResource, domainSid?: string, messagingServiceSid?: string);
56
+ /**
57
+ * The unique string identifies the domain resource
58
+ */
59
+ domainSid: string;
60
+ /**
61
+ * The unique string that identifies the messaging service
62
+ */
63
+ messagingServiceSid: string;
64
+ url: string;
65
+ private get _proxy();
66
+ /**
67
+ * Create a LinkshorteningMessagingServiceInstance
68
+ *
69
+ * @param callback - Callback to handle processed record
70
+ *
71
+ * @returns Resolves to processed LinkshorteningMessagingServiceInstance
72
+ */
73
+ create(callback?: (error: Error | null, item?: LinkshorteningMessagingServiceInstance) => any): Promise<LinkshorteningMessagingServiceInstance>;
74
+ /**
75
+ * Remove a LinkshorteningMessagingServiceInstance
76
+ *
77
+ * @param callback - Callback to handle processed record
78
+ *
79
+ * @returns Resolves to processed boolean
80
+ */
81
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
82
+ /**
83
+ * Provide a user-friendly representation
84
+ *
85
+ * @returns Object
86
+ */
87
+ toJSON(): {
88
+ domainSid: string;
89
+ messagingServiceSid: string;
90
+ url: string;
91
+ };
92
+ [inspect.custom](_depth: any, options: InspectOptions): string;
93
+ }
94
+ export interface LinkshorteningMessagingServiceSolution {
95
+ }
96
+ export interface LinkshorteningMessagingServiceListInstance {
97
+ _version: V1;
98
+ _solution: LinkshorteningMessagingServiceSolution;
99
+ _uri: string;
100
+ (domainSid: string, messagingServiceSid: string): LinkshorteningMessagingServiceContext;
101
+ get(domainSid: string, messagingServiceSid: string): LinkshorteningMessagingServiceContext;
102
+ /**
103
+ * Provide a user-friendly representation
104
+ */
105
+ toJSON(): any;
106
+ [inspect.custom](_depth: any, options: InspectOptions): any;
107
+ }
108
+ export declare function LinkshorteningMessagingServiceListInstance(version: V1): LinkshorteningMessagingServiceListInstance;
109
+ export {};
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Messaging
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LinkshorteningMessagingServiceListInstance = exports.LinkshorteningMessagingServiceInstance = exports.LinkshorteningMessagingServiceContextImpl = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ const utility_1 = require("../../../base/utility");
21
+ class LinkshorteningMessagingServiceContextImpl {
22
+ constructor(_version, domainSid, messagingServiceSid) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(domainSid)) {
25
+ throw new Error("Parameter 'domainSid' is not valid.");
26
+ }
27
+ if (!(0, utility_1.isValidPathParam)(messagingServiceSid)) {
28
+ throw new Error("Parameter 'messagingServiceSid' is not valid.");
29
+ }
30
+ this._solution = { domainSid, messagingServiceSid };
31
+ this._uri = `/LinkShortening/Domains/${domainSid}/MessagingServices/${messagingServiceSid}`;
32
+ }
33
+ create(callback) {
34
+ const instance = this;
35
+ let operationVersion = instance._version, operationPromise = operationVersion.create({
36
+ uri: instance._uri,
37
+ method: "post",
38
+ });
39
+ operationPromise = operationPromise.then((payload) => new LinkshorteningMessagingServiceInstance(operationVersion, payload, instance._solution.domainSid, instance._solution.messagingServiceSid));
40
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
41
+ return operationPromise;
42
+ }
43
+ remove(callback) {
44
+ const instance = this;
45
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
46
+ uri: instance._uri,
47
+ method: "delete",
48
+ });
49
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
50
+ return operationPromise;
51
+ }
52
+ /**
53
+ * Provide a user-friendly representation
54
+ *
55
+ * @returns Object
56
+ */
57
+ toJSON() {
58
+ return this._solution;
59
+ }
60
+ [util_1.inspect.custom](_depth, options) {
61
+ return (0, util_1.inspect)(this.toJSON(), options);
62
+ }
63
+ }
64
+ exports.LinkshorteningMessagingServiceContextImpl = LinkshorteningMessagingServiceContextImpl;
65
+ class LinkshorteningMessagingServiceInstance {
66
+ constructor(_version, payload, domainSid, messagingServiceSid) {
67
+ this._version = _version;
68
+ this.domainSid = payload.domain_sid;
69
+ this.messagingServiceSid = payload.messaging_service_sid;
70
+ this.url = payload.url;
71
+ this._solution = {
72
+ domainSid: domainSid || this.domainSid,
73
+ messagingServiceSid: messagingServiceSid || this.messagingServiceSid,
74
+ };
75
+ }
76
+ get _proxy() {
77
+ this._context =
78
+ this._context ||
79
+ new LinkshorteningMessagingServiceContextImpl(this._version, this._solution.domainSid, this._solution.messagingServiceSid);
80
+ return this._context;
81
+ }
82
+ /**
83
+ * Create a LinkshorteningMessagingServiceInstance
84
+ *
85
+ * @param callback - Callback to handle processed record
86
+ *
87
+ * @returns Resolves to processed LinkshorteningMessagingServiceInstance
88
+ */
89
+ create(callback) {
90
+ return this._proxy.create(callback);
91
+ }
92
+ /**
93
+ * Remove a LinkshorteningMessagingServiceInstance
94
+ *
95
+ * @param callback - Callback to handle processed record
96
+ *
97
+ * @returns Resolves to processed boolean
98
+ */
99
+ remove(callback) {
100
+ return this._proxy.remove(callback);
101
+ }
102
+ /**
103
+ * Provide a user-friendly representation
104
+ *
105
+ * @returns Object
106
+ */
107
+ toJSON() {
108
+ return {
109
+ domainSid: this.domainSid,
110
+ messagingServiceSid: this.messagingServiceSid,
111
+ url: this.url,
112
+ };
113
+ }
114
+ [util_1.inspect.custom](_depth, options) {
115
+ return (0, util_1.inspect)(this.toJSON(), options);
116
+ }
117
+ }
118
+ exports.LinkshorteningMessagingServiceInstance = LinkshorteningMessagingServiceInstance;
119
+ function LinkshorteningMessagingServiceListInstance(version) {
120
+ const instance = ((domainSid, messagingServiceSid) => instance.get(domainSid, messagingServiceSid));
121
+ instance.get = function get(domainSid, messagingServiceSid) {
122
+ return new LinkshorteningMessagingServiceContextImpl(version, domainSid, messagingServiceSid);
123
+ };
124
+ instance._version = version;
125
+ instance._solution = {};
126
+ instance._uri = ``;
127
+ instance.toJSON = function toJSON() {
128
+ return instance._solution;
129
+ };
130
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
131
+ return (0, util_1.inspect)(instance.toJSON(), options);
132
+ };
133
+ return instance;
134
+ }
135
+ exports.LinkshorteningMessagingServiceListInstance = LinkshorteningMessagingServiceListInstance;
@@ -190,8 +190,6 @@ export declare class ServiceContextImpl implements ServiceContext {
190
190
  toJSON(): ServiceContextSolution;
191
191
  [inspect.custom](_depth: any, options: InspectOptions): string;
192
192
  }
193
- export type ServiceInboundMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
194
- export type ServiceFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
195
193
  interface ServicePayload extends TwilioResponsePayload {
196
194
  services: ServiceResource[];
197
195
  }
@@ -202,9 +200,9 @@ interface ServiceResource {
202
200
  date_created: Date;
203
201
  date_updated: Date;
204
202
  inbound_request_url: string;
205
- inbound_method: ServiceInboundMethod;
203
+ inbound_method: string;
206
204
  fallback_url: string;
207
- fallback_method: ServiceFallbackMethod;
205
+ fallback_method: string;
208
206
  status_callback: string;
209
207
  sticky_sender: boolean;
210
208
  mms_converter: boolean;
@@ -252,7 +250,7 @@ export declare class ServiceInstance {
252
250
  /**
253
251
  * The HTTP method we use to call `inbound_request_url`. Can be `GET` or `POST`.
254
252
  */
255
- inboundMethod: ServiceInboundMethod;
253
+ inboundMethod: string;
256
254
  /**
257
255
  * The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service.
258
256
  */
@@ -260,7 +258,7 @@ export declare class ServiceInstance {
260
258
  /**
261
259
  * The HTTP method we use to call `fallback_url`. Can be: `GET` or `POST`.
262
260
  */
263
- fallbackMethod: ServiceFallbackMethod;
261
+ fallbackMethod: string;
264
262
  /**
265
263
  * The URL we call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery.
266
264
  */
@@ -380,9 +378,9 @@ export declare class ServiceInstance {
380
378
  dateCreated: Date;
381
379
  dateUpdated: Date;
382
380
  inboundRequestUrl: string;
383
- inboundMethod: ServiceInboundMethod;
381
+ inboundMethod: string;
384
382
  fallbackUrl: string;
385
- fallbackMethod: ServiceFallbackMethod;
383
+ fallbackMethod: string;
386
384
  statusCallback: string;
387
385
  stickySender: boolean;
388
386
  mmsConverter: boolean;
@@ -0,0 +1,101 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../../V1";
4
+ export interface AppManifestContext {
5
+ /**
6
+ * Fetch a AppManifestInstance
7
+ *
8
+ * @param callback - Callback to handle processed record
9
+ *
10
+ * @returns Resolves to processed AppManifestInstance
11
+ */
12
+ fetch(callback?: (error: Error | null, item?: AppManifestInstance) => any): Promise<AppManifestInstance>;
13
+ /**
14
+ * Provide a user-friendly representation
15
+ */
16
+ toJSON(): any;
17
+ [inspect.custom](_depth: any, options: InspectOptions): any;
18
+ }
19
+ export interface AppManifestContextSolution {
20
+ appSid: string;
21
+ }
22
+ export declare class AppManifestContextImpl implements AppManifestContext {
23
+ protected _version: V1;
24
+ protected _solution: AppManifestContextSolution;
25
+ protected _uri: string;
26
+ constructor(_version: V1, appSid: string);
27
+ fetch(callback?: (error: Error | null, item?: AppManifestInstance) => any): Promise<AppManifestInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ *
31
+ * @returns Object
32
+ */
33
+ toJSON(): AppManifestContextSolution;
34
+ [inspect.custom](_depth: any, options: InspectOptions): string;
35
+ }
36
+ interface AppManifestResource {
37
+ app_sid: string;
38
+ hash: string;
39
+ encoded_bytes: string;
40
+ url: string;
41
+ }
42
+ export declare class AppManifestInstance {
43
+ protected _version: V1;
44
+ protected _solution: AppManifestContextSolution;
45
+ protected _context?: AppManifestContext;
46
+ constructor(_version: V1, payload: AppManifestResource, appSid: string);
47
+ /**
48
+ * A 34-character string that uniquely identifies this App.
49
+ */
50
+ appSid: string;
51
+ /**
52
+ * App manifest hash represented as `hash_algorithm:hash_value`.
53
+ */
54
+ hash: string;
55
+ /**
56
+ * The base-64 encoded manifest
57
+ */
58
+ encodedBytes: string;
59
+ /**
60
+ * The absolute URL of this Manifest.
61
+ */
62
+ url: string;
63
+ private get _proxy();
64
+ /**
65
+ * Fetch a AppManifestInstance
66
+ *
67
+ * @param callback - Callback to handle processed record
68
+ *
69
+ * @returns Resolves to processed AppManifestInstance
70
+ */
71
+ fetch(callback?: (error: Error | null, item?: AppManifestInstance) => any): Promise<AppManifestInstance>;
72
+ /**
73
+ * Provide a user-friendly representation
74
+ *
75
+ * @returns Object
76
+ */
77
+ toJSON(): {
78
+ appSid: string;
79
+ hash: string;
80
+ encodedBytes: string;
81
+ url: string;
82
+ };
83
+ [inspect.custom](_depth: any, options: InspectOptions): string;
84
+ }
85
+ export interface AppManifestSolution {
86
+ appSid: string;
87
+ }
88
+ export interface AppManifestListInstance {
89
+ _version: V1;
90
+ _solution: AppManifestSolution;
91
+ _uri: string;
92
+ (): AppManifestContext;
93
+ get(): AppManifestContext;
94
+ /**
95
+ * Provide a user-friendly representation
96
+ */
97
+ toJSON(): any;
98
+ [inspect.custom](_depth: any, options: InspectOptions): any;
99
+ }
100
+ export declare function AppManifestListInstance(version: V1, appSid: string): AppManifestListInstance;
101
+ export {};