twilio 5.12.2 → 5.13.1

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 (108) hide show
  1. package/README.md +1 -0
  2. package/lib/rest/InsightsBase.d.ts +3 -0
  3. package/lib/rest/InsightsBase.js +5 -0
  4. package/lib/rest/api/v2010/account/call/payment.d.ts +6 -2
  5. package/lib/rest/api/v2010/account/call/payment.js +8 -0
  6. package/lib/rest/api/v2010/account/call/transcription.d.ts +4 -0
  7. package/lib/rest/api/v2010/account/call/transcription.js +8 -0
  8. package/lib/rest/api/v2010/account/token.d.ts +1 -0
  9. package/lib/rest/api/v2010/account/token.js +10 -1
  10. package/lib/rest/assistants/v1/assistant/feedback.d.ts +1 -0
  11. package/lib/rest/assistants/v1/assistant/feedback.js +6 -0
  12. package/lib/rest/assistants/v1/assistant/message.d.ts +1 -0
  13. package/lib/rest/assistants/v1/assistant/message.js +7 -0
  14. package/lib/rest/assistants/v1/assistant.d.ts +6 -0
  15. package/lib/rest/assistants/v1/assistant.js +58 -2
  16. package/lib/rest/assistants/v1/knowledge.d.ts +3 -0
  17. package/lib/rest/assistants/v1/knowledge.js +24 -0
  18. package/lib/rest/assistants/v1/tool.d.ts +4 -0
  19. package/lib/rest/assistants/v1/tool.js +40 -1
  20. package/lib/rest/content/v1/content/approvalCreate.d.ts +1 -0
  21. package/lib/rest/content/v1/content/approvalCreate.js +4 -0
  22. package/lib/rest/content/v1/content.d.ts +27 -0
  23. package/lib/rest/content/v1/content.js +171 -0
  24. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +2 -0
  25. package/lib/rest/flexApi/v1/createFlexInstance.js +6 -0
  26. package/lib/rest/iam/v1/oAuthApp.d.ts +4 -0
  27. package/lib/rest/iam/v1/oAuthApp.js +28 -1
  28. package/lib/rest/insights/V2.d.ts +21 -0
  29. package/lib/rest/insights/V2.js +46 -0
  30. package/lib/rest/insights/v2/inbound.d.ts +436 -0
  31. package/lib/rest/insights/v2/inbound.js +342 -0
  32. package/lib/rest/insights/v2/outbound.d.ts +529 -0
  33. package/lib/rest/insights/v2/outbound.js +392 -0
  34. package/lib/rest/insights/v2/report.d.ts +783 -0
  35. package/lib/rest/insights/v2/report.js +550 -0
  36. package/lib/rest/intelligence/v2/operatorType.d.ts +6 -0
  37. package/lib/rest/intelligence/v2/operatorType.js +4 -0
  38. package/lib/rest/knowledge/v1/knowledge.d.ts +3 -0
  39. package/lib/rest/knowledge/v1/knowledge.js +23 -0
  40. package/lib/rest/lookups/v2/bucket.d.ts +1 -0
  41. package/lib/rest/lookups/v2/bucket.js +4 -0
  42. package/lib/rest/lookups/v2/lookupOverride.d.ts +1 -0
  43. package/lib/rest/lookups/v2/lookupOverride.js +4 -0
  44. package/lib/rest/lookups/v2/phoneNumber.d.ts +9 -0
  45. package/lib/rest/lookups/v2/phoneNumber.js +94 -8
  46. package/lib/rest/lookups/v2/query.d.ts +15 -0
  47. package/lib/rest/lookups/v2/query.js +113 -1
  48. package/lib/rest/lookups/v2/rateLimit.d.ts +1 -0
  49. package/lib/rest/lookups/v2/rateLimit.js +11 -1
  50. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +2 -0
  51. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +13 -1
  52. package/lib/rest/marketplace/v1/referralConversion.d.ts +1 -0
  53. package/lib/rest/marketplace/v1/referralConversion.js +3 -0
  54. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +78 -5
  55. package/lib/rest/messaging/v1/service/usAppToPerson.js +60 -20
  56. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +26 -24
  57. package/lib/rest/messaging/v2/channelsSender.d.ts +18 -0
  58. package/lib/rest/messaging/v2/channelsSender.js +115 -6
  59. package/lib/rest/numbers/V1.d.ts +8 -0
  60. package/lib/rest/numbers/V1.js +12 -0
  61. package/lib/rest/numbers/v1/embeddedSession.d.ts +84 -0
  62. package/lib/rest/numbers/v1/embeddedSession.js +115 -0
  63. package/lib/rest/numbers/v1/portingPortIn.d.ts +5 -0
  64. package/lib/rest/numbers/v1/portingPortIn.js +67 -2
  65. package/lib/rest/numbers/v1/senderIdRegistration.d.ts +181 -0
  66. package/lib/rest/numbers/v1/senderIdRegistration.js +146 -0
  67. package/lib/rest/numbers/v2/application.d.ts +194 -4
  68. package/lib/rest/numbers/v2/application.js +188 -3
  69. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +1 -0
  70. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +5 -0
  71. package/lib/rest/previewIam/versionless/organization/user.d.ts +69 -0
  72. package/lib/rest/previewIam/versionless/organization/user.js +117 -4
  73. package/lib/rest/pricing/v1/messaging/country.d.ts +3 -0
  74. package/lib/rest/pricing/v1/messaging/country.js +26 -2
  75. package/lib/rest/pricing/v1/phoneNumber/country.d.ts +1 -0
  76. package/lib/rest/pricing/v1/phoneNumber/country.js +10 -1
  77. package/lib/rest/pricing/v1/voice/country.d.ts +2 -0
  78. package/lib/rest/pricing/v1/voice/country.js +21 -2
  79. package/lib/rest/pricing/v1/voice/number.d.ts +2 -0
  80. package/lib/rest/pricing/v1/voice/number.js +19 -2
  81. package/lib/rest/pricing/v2/country.d.ts +2 -0
  82. package/lib/rest/pricing/v2/country.js +22 -2
  83. package/lib/rest/pricing/v2/number.d.ts +2 -0
  84. package/lib/rest/pricing/v2/number.js +22 -2
  85. package/lib/rest/pricing/v2/voice/country.d.ts +2 -0
  86. package/lib/rest/pricing/v2/voice/country.js +22 -2
  87. package/lib/rest/pricing/v2/voice/number.d.ts +2 -0
  88. package/lib/rest/pricing/v2/voice/number.js +20 -2
  89. package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
  90. package/lib/rest/studio/v2/flow/execution.js +4 -0
  91. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -0
  92. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  93. package/lib/rest/studio/v2/flow.d.ts +6 -0
  94. package/lib/rest/studio/v2/flow.js +2 -0
  95. package/lib/rest/verify/v2/service/approveChallenge.d.ts +2 -0
  96. package/lib/rest/verify/v2/service/approveChallenge.js +13 -0
  97. package/lib/rest/verify/v2/service/newChallenge.d.ts +1 -0
  98. package/lib/rest/verify/v2/service/newChallenge.js +4 -0
  99. package/lib/rest/verify/v2/service/newFactor.d.ts +3 -0
  100. package/lib/rest/verify/v2/service/newFactor.js +16 -0
  101. package/lib/rest/verify/v2/service/newVerifyFactor.d.ts +2 -0
  102. package/lib/rest/verify/v2/service/newVerifyFactor.js +12 -0
  103. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  104. package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +1 -0
  105. package/lib/rest/video/v1/room/participant/subscribeRules.js +12 -1
  106. package/lib/rest/video/v1/room/recordingRules.d.ts +1 -0
  107. package/lib/rest/video/v1/room/recordingRules.js +11 -1
  108. package/package.json +4 -4
@@ -7,12 +7,14 @@ export declare class PricingV1VoiceVoiceCountryInstanceInboundCallPrices {
7
7
  "basePrice"?: number;
8
8
  "currentPrice"?: number;
9
9
  "numberType"?: string;
10
+ constructor(payload: any);
10
11
  }
11
12
  export declare class PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices {
12
13
  "prefixes"?: Array<string>;
13
14
  "basePrice"?: number;
14
15
  "currentPrice"?: number;
15
16
  "friendlyName"?: string;
17
+ constructor(payload: any);
16
18
  }
17
19
  /**
18
20
  * Options to pass to each
@@ -24,9 +24,20 @@ const deserialize = require("../../../../base/deserialize");
24
24
  const serialize = require("../../../../base/serialize");
25
25
  const utility_1 = require("../../../../base/utility");
26
26
  class PricingV1VoiceVoiceCountryInstanceInboundCallPrices {
27
+ constructor(payload) {
28
+ this.basePrice = payload["base_price"];
29
+ this.currentPrice = payload["current_price"];
30
+ this.numberType = payload["number_type"];
31
+ }
27
32
  }
28
33
  exports.PricingV1VoiceVoiceCountryInstanceInboundCallPrices = PricingV1VoiceVoiceCountryInstanceInboundCallPrices;
29
34
  class PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices {
35
+ constructor(payload) {
36
+ this.prefixes = payload["prefixes"];
37
+ this.basePrice = payload["base_price"];
38
+ this.currentPrice = payload["current_price"];
39
+ this.friendlyName = payload["friendly_name"];
40
+ }
30
41
  }
31
42
  exports.PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices = PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices;
32
43
  class CountryContextImpl {
@@ -88,8 +99,16 @@ class CountryInstance {
88
99
  this._version = _version;
89
100
  this.country = payload.country;
90
101
  this.isoCountry = payload.iso_country;
91
- this.outboundPrefixPrices = payload.outbound_prefix_prices;
92
- this.inboundCallPrices = payload.inbound_call_prices;
102
+ this.outboundPrefixPrices =
103
+ payload.outbound_prefix_prices !== null &&
104
+ payload.outbound_prefix_prices !== undefined
105
+ ? payload.outbound_prefix_prices.map((payload) => new PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices(payload))
106
+ : null;
107
+ this.inboundCallPrices =
108
+ payload.inbound_call_prices !== null &&
109
+ payload.inbound_call_prices !== undefined
110
+ ? payload.inbound_call_prices.map((payload) => new PricingV1VoiceVoiceCountryInstanceInboundCallPrices(payload))
111
+ : null;
93
112
  this.priceUnit = payload.price_unit;
94
113
  this.url = payload.url;
95
114
  this._solution = { isoCountry: isoCountry || this.isoCountry };
@@ -8,6 +8,7 @@ export declare class PricingV1VoiceVoiceNumberInboundCallPrice {
8
8
  "basePrice"?: number;
9
9
  "currentPrice"?: number;
10
10
  "numberType"?: string;
11
+ constructor(payload: any);
11
12
  }
12
13
  /**
13
14
  * The OutboundCallPrice record, which includes a list of `origination_prefixes` and the `base_price` and `current_price` for those prefixes.
@@ -15,6 +16,7 @@ export declare class PricingV1VoiceVoiceNumberInboundCallPrice {
15
16
  export declare class PricingV1VoiceVoiceNumberOutboundCallPrice {
16
17
  "basePrice"?: number;
17
18
  "currentPrice"?: number;
19
+ constructor(payload: any);
18
20
  }
19
21
  export interface NumberContext {
20
22
  /**
@@ -23,12 +23,21 @@ const utility_1 = require("../../../../base/utility");
23
23
  * The [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record. If `null`, the Phone Number is not a Twilio number owned by this account.
24
24
  */
25
25
  class PricingV1VoiceVoiceNumberInboundCallPrice {
26
+ constructor(payload) {
27
+ this.basePrice = payload["base_price"];
28
+ this.currentPrice = payload["current_price"];
29
+ this.numberType = payload["number_type"];
30
+ }
26
31
  }
27
32
  exports.PricingV1VoiceVoiceNumberInboundCallPrice = PricingV1VoiceVoiceNumberInboundCallPrice;
28
33
  /**
29
34
  * The OutboundCallPrice record, which includes a list of `origination_prefixes` and the `base_price` and `current_price` for those prefixes.
30
35
  */
31
36
  class PricingV1VoiceVoiceNumberOutboundCallPrice {
37
+ constructor(payload) {
38
+ this.basePrice = payload["base_price"];
39
+ this.currentPrice = payload["current_price"];
40
+ }
32
41
  }
33
42
  exports.PricingV1VoiceVoiceNumberOutboundCallPrice = PricingV1VoiceVoiceNumberOutboundCallPrice;
34
43
  class NumberContextImpl {
@@ -91,8 +100,16 @@ class NumberInstance {
91
100
  this.number = payload.number;
92
101
  this.country = payload.country;
93
102
  this.isoCountry = payload.iso_country;
94
- this.outboundCallPrice = payload.outbound_call_price;
95
- this.inboundCallPrice = payload.inbound_call_price;
103
+ this.outboundCallPrice =
104
+ payload.outbound_call_price !== null &&
105
+ payload.outbound_call_price !== undefined
106
+ ? new PricingV1VoiceVoiceNumberOutboundCallPrice(payload.outbound_call_price)
107
+ : null;
108
+ this.inboundCallPrice =
109
+ payload.inbound_call_price !== null &&
110
+ payload.inbound_call_price !== undefined
111
+ ? new PricingV1VoiceVoiceNumberInboundCallPrice(payload.inbound_call_price)
112
+ : null;
96
113
  this.priceUnit = payload.price_unit;
97
114
  this.url = payload.url;
98
115
  this._solution = { number: number || this.number };
@@ -7,6 +7,7 @@ export declare class PricingV2TrunkingCountryInstanceOriginatingCallPrices {
7
7
  "basePrice"?: number;
8
8
  "currentPrice"?: number;
9
9
  "numberType"?: string;
10
+ constructor(payload: any);
10
11
  }
11
12
  export declare class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
12
13
  "originationPrefixes"?: Array<string>;
@@ -14,6 +15,7 @@ export declare class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
14
15
  "basePrice"?: number;
15
16
  "currentPrice"?: number;
16
17
  "friendlyName"?: string;
18
+ constructor(payload: any);
17
19
  }
18
20
  /**
19
21
  * Options to pass to each
@@ -24,9 +24,21 @@ const deserialize = require("../../../base/deserialize");
24
24
  const serialize = require("../../../base/serialize");
25
25
  const utility_1 = require("../../../base/utility");
26
26
  class PricingV2TrunkingCountryInstanceOriginatingCallPrices {
27
+ constructor(payload) {
28
+ this.basePrice = payload["base_price"];
29
+ this.currentPrice = payload["current_price"];
30
+ this.numberType = payload["number_type"];
31
+ }
27
32
  }
28
33
  exports.PricingV2TrunkingCountryInstanceOriginatingCallPrices = PricingV2TrunkingCountryInstanceOriginatingCallPrices;
29
34
  class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
35
+ constructor(payload) {
36
+ this.originationPrefixes = payload["origination_prefixes"];
37
+ this.destinationPrefixes = payload["destination_prefixes"];
38
+ this.basePrice = payload["base_price"];
39
+ this.currentPrice = payload["current_price"];
40
+ this.friendlyName = payload["friendly_name"];
41
+ }
30
42
  }
31
43
  exports.PricingV2TrunkingCountryInstanceTerminatingPrefixPrices = PricingV2TrunkingCountryInstanceTerminatingPrefixPrices;
32
44
  class CountryContextImpl {
@@ -88,8 +100,16 @@ class CountryInstance {
88
100
  this._version = _version;
89
101
  this.country = payload.country;
90
102
  this.isoCountry = payload.iso_country;
91
- this.terminatingPrefixPrices = payload.terminating_prefix_prices;
92
- this.originatingCallPrices = payload.originating_call_prices;
103
+ this.terminatingPrefixPrices =
104
+ payload.terminating_prefix_prices !== null &&
105
+ payload.terminating_prefix_prices !== undefined
106
+ ? payload.terminating_prefix_prices.map((payload) => new PricingV2TrunkingCountryInstanceTerminatingPrefixPrices(payload))
107
+ : null;
108
+ this.originatingCallPrices =
109
+ payload.originating_call_prices !== null &&
110
+ payload.originating_call_prices !== undefined
111
+ ? payload.originating_call_prices.map((payload) => new PricingV2TrunkingCountryInstanceOriginatingCallPrices(payload))
112
+ : null;
93
113
  this.priceUnit = payload.price_unit;
94
114
  this.url = payload.url;
95
115
  this._solution = { isoCountry: isoCountry || this.isoCountry };
@@ -7,6 +7,7 @@ export declare class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
7
7
  "basePrice"?: number;
8
8
  "currentPrice"?: number;
9
9
  "friendlyName"?: string;
10
+ constructor(payload: any);
10
11
  }
11
12
  /**
12
13
  * The [OriginatingCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record.
@@ -15,6 +16,7 @@ export declare class PricingV2TrunkingNumberOriginatingCallPrice {
15
16
  "basePrice"?: number;
16
17
  "currentPrice"?: number;
17
18
  "numberType"?: string;
19
+ constructor(payload: any);
18
20
  }
19
21
  /**
20
22
  * Options to pass to fetch a NumberInstance
@@ -20,12 +20,24 @@ const deserialize = require("../../../base/deserialize");
20
20
  const serialize = require("../../../base/serialize");
21
21
  const utility_1 = require("../../../base/utility");
22
22
  class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
23
+ constructor(payload) {
24
+ this.originationPrefixes = payload["origination_prefixes"];
25
+ this.destinationPrefixes = payload["destination_prefixes"];
26
+ this.basePrice = payload["base_price"];
27
+ this.currentPrice = payload["current_price"];
28
+ this.friendlyName = payload["friendly_name"];
29
+ }
23
30
  }
24
31
  exports.PricingV2TrunkingCountryInstanceTerminatingPrefixPrices = PricingV2TrunkingCountryInstanceTerminatingPrefixPrices;
25
32
  /**
26
33
  * The [OriginatingCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record.
27
34
  */
28
35
  class PricingV2TrunkingNumberOriginatingCallPrice {
36
+ constructor(payload) {
37
+ this.basePrice = payload["base_price"];
38
+ this.currentPrice = payload["current_price"];
39
+ this.numberType = payload["number_type"];
40
+ }
29
41
  }
30
42
  exports.PricingV2TrunkingNumberOriginatingCallPrice = PricingV2TrunkingNumberOriginatingCallPrice;
31
43
  class NumberContextImpl {
@@ -111,8 +123,16 @@ class NumberInstance {
111
123
  this.originationNumber = payload.origination_number;
112
124
  this.country = payload.country;
113
125
  this.isoCountry = payload.iso_country;
114
- this.terminatingPrefixPrices = payload.terminating_prefix_prices;
115
- this.originatingCallPrice = payload.originating_call_price;
126
+ this.terminatingPrefixPrices =
127
+ payload.terminating_prefix_prices !== null &&
128
+ payload.terminating_prefix_prices !== undefined
129
+ ? payload.terminating_prefix_prices.map((payload) => new PricingV2TrunkingCountryInstanceTerminatingPrefixPrices(payload))
130
+ : null;
131
+ this.originatingCallPrice =
132
+ payload.originating_call_price !== null &&
133
+ payload.originating_call_price !== undefined
134
+ ? new PricingV2TrunkingNumberOriginatingCallPrice(payload.originating_call_price)
135
+ : null;
116
136
  this.priceUnit = payload.price_unit;
117
137
  this.url = payload.url;
118
138
  this._solution = {
@@ -7,6 +7,7 @@ export declare class PricingV2TrunkingCountryInstanceOriginatingCallPrices {
7
7
  "basePrice"?: number;
8
8
  "currentPrice"?: number;
9
9
  "numberType"?: string;
10
+ constructor(payload: any);
10
11
  }
11
12
  export declare class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
12
13
  "originationPrefixes"?: Array<string>;
@@ -14,6 +15,7 @@ export declare class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
14
15
  "basePrice"?: number;
15
16
  "currentPrice"?: number;
16
17
  "friendlyName"?: string;
18
+ constructor(payload: any);
17
19
  }
18
20
  /**
19
21
  * Options to pass to each
@@ -24,9 +24,21 @@ const deserialize = require("../../../../base/deserialize");
24
24
  const serialize = require("../../../../base/serialize");
25
25
  const utility_1 = require("../../../../base/utility");
26
26
  class PricingV2TrunkingCountryInstanceOriginatingCallPrices {
27
+ constructor(payload) {
28
+ this.basePrice = payload["base_price"];
29
+ this.currentPrice = payload["current_price"];
30
+ this.numberType = payload["number_type"];
31
+ }
27
32
  }
28
33
  exports.PricingV2TrunkingCountryInstanceOriginatingCallPrices = PricingV2TrunkingCountryInstanceOriginatingCallPrices;
29
34
  class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices {
35
+ constructor(payload) {
36
+ this.originationPrefixes = payload["origination_prefixes"];
37
+ this.destinationPrefixes = payload["destination_prefixes"];
38
+ this.basePrice = payload["base_price"];
39
+ this.currentPrice = payload["current_price"];
40
+ this.friendlyName = payload["friendly_name"];
41
+ }
30
42
  }
31
43
  exports.PricingV2TrunkingCountryInstanceTerminatingPrefixPrices = PricingV2TrunkingCountryInstanceTerminatingPrefixPrices;
32
44
  class CountryContextImpl {
@@ -88,8 +100,16 @@ class CountryInstance {
88
100
  this._version = _version;
89
101
  this.country = payload.country;
90
102
  this.isoCountry = payload.iso_country;
91
- this.outboundPrefixPrices = payload.outbound_prefix_prices;
92
- this.inboundCallPrices = payload.inbound_call_prices;
103
+ this.outboundPrefixPrices =
104
+ payload.outbound_prefix_prices !== null &&
105
+ payload.outbound_prefix_prices !== undefined
106
+ ? payload.outbound_prefix_prices.map((payload) => new PricingV2TrunkingCountryInstanceTerminatingPrefixPrices(payload))
107
+ : null;
108
+ this.inboundCallPrices =
109
+ payload.inbound_call_prices !== null &&
110
+ payload.inbound_call_prices !== undefined
111
+ ? payload.inbound_call_prices.map((payload) => new PricingV2TrunkingCountryInstanceOriginatingCallPrices(payload))
112
+ : null;
93
113
  this.priceUnit = payload.price_unit;
94
114
  this.url = payload.url;
95
115
  this._solution = { isoCountry: isoCountry || this.isoCountry };
@@ -8,11 +8,13 @@ export declare class PricingV2VoiceVoiceNumberInboundCallPrice {
8
8
  "basePrice"?: number;
9
9
  "currentPrice"?: number;
10
10
  "numberType"?: string;
11
+ constructor(payload: any);
11
12
  }
12
13
  export declare class PricingV2VoiceVoiceNumberOutboundCallPrices {
13
14
  "basePrice"?: number;
14
15
  "currentPrice"?: number;
15
16
  "originationPrefixes"?: Array<string>;
17
+ constructor(payload: any);
16
18
  }
17
19
  /**
18
20
  * Options to pass to fetch a NumberInstance
@@ -23,9 +23,19 @@ const utility_1 = require("../../../../base/utility");
23
23
  * The [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record.
24
24
  */
25
25
  class PricingV2VoiceVoiceNumberInboundCallPrice {
26
+ constructor(payload) {
27
+ this.basePrice = payload["base_price"];
28
+ this.currentPrice = payload["current_price"];
29
+ this.numberType = payload["number_type"];
30
+ }
26
31
  }
27
32
  exports.PricingV2VoiceVoiceNumberInboundCallPrice = PricingV2VoiceVoiceNumberInboundCallPrice;
28
33
  class PricingV2VoiceVoiceNumberOutboundCallPrices {
34
+ constructor(payload) {
35
+ this.basePrice = payload["base_price"];
36
+ this.currentPrice = payload["current_price"];
37
+ this.originationPrefixes = payload["origination_prefixes"];
38
+ }
29
39
  }
30
40
  exports.PricingV2VoiceVoiceNumberOutboundCallPrices = PricingV2VoiceVoiceNumberOutboundCallPrices;
31
41
  class NumberContextImpl {
@@ -111,8 +121,16 @@ class NumberInstance {
111
121
  this.originationNumber = payload.origination_number;
112
122
  this.country = payload.country;
113
123
  this.isoCountry = payload.iso_country;
114
- this.outboundCallPrices = payload.outbound_call_prices;
115
- this.inboundCallPrice = payload.inbound_call_price;
124
+ this.outboundCallPrices =
125
+ payload.outbound_call_prices !== null &&
126
+ payload.outbound_call_prices !== undefined
127
+ ? payload.outbound_call_prices.map((payload) => new PricingV2VoiceVoiceNumberOutboundCallPrices(payload))
128
+ : null;
129
+ this.inboundCallPrice =
130
+ payload.inbound_call_price !== null &&
131
+ payload.inbound_call_price !== undefined
132
+ ? new PricingV2VoiceVoiceNumberInboundCallPrice(payload.inbound_call_price)
133
+ : null;
116
134
  this.priceUnit = payload.price_unit;
117
135
  this.url = payload.url;
118
136
  this._solution = {
@@ -166,6 +166,8 @@ interface ExecutionResource {
166
166
  account_sid: string;
167
167
  flow_sid: string;
168
168
  contact_channel_address: string;
169
+ contact_sid: string;
170
+ flow_version: number;
169
171
  context: any;
170
172
  status: ExecutionStatus;
171
173
  date_created: Date;
@@ -194,6 +196,14 @@ export declare class ExecutionInstance {
194
196
  * The phone number, SIP address or Client identifier that triggered the Execution. Phone numbers are in E.164 format (e.g. +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
195
197
  */
196
198
  contactChannelAddress: string;
199
+ /**
200
+ * The SID of the Contact.
201
+ */
202
+ contactSid: string;
203
+ /**
204
+ * The Flow version number at the time of Execution creation.
205
+ */
206
+ flowVersion: number;
197
207
  /**
198
208
  * The current state of the Flow\'s Execution. As a flow executes, we save its state in this context. We save data that your widgets can access as variables in configuration fields or in text areas as variable substitution.
199
209
  */
@@ -284,6 +294,8 @@ export declare class ExecutionInstance {
284
294
  accountSid: string;
285
295
  flowSid: string;
286
296
  contactChannelAddress: string;
297
+ contactSid: string;
298
+ flowVersion: number;
287
299
  context: any;
288
300
  status: ExecutionStatus;
289
301
  dateCreated: Date;
@@ -178,6 +178,8 @@ class ExecutionInstance {
178
178
  this.accountSid = payload.account_sid;
179
179
  this.flowSid = payload.flow_sid;
180
180
  this.contactChannelAddress = payload.contact_channel_address;
181
+ this.contactSid = payload.contact_sid;
182
+ this.flowVersion = deserialize.integer(payload.flow_version);
181
183
  this.context = payload.context;
182
184
  this.status = payload.status;
183
185
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
@@ -261,6 +263,8 @@ class ExecutionInstance {
261
263
  accountSid: this.accountSid,
262
264
  flowSid: this.flowSid,
263
265
  contactChannelAddress: this.contactChannelAddress,
266
+ contactSid: this.contactSid,
267
+ flowVersion: this.flowVersion,
264
268
  context: this.context,
265
269
  status: this.status,
266
270
  dateCreated: this.dateCreated,
@@ -88,6 +88,7 @@ interface FlowRevisionPayload extends TwilioResponsePayload {
88
88
  interface FlowRevisionResource {
89
89
  sid: string;
90
90
  account_sid: string;
91
+ author_sid: string;
91
92
  friendly_name: string;
92
93
  definition: any;
93
94
  status: FlowRevisionStatus;
@@ -112,6 +113,10 @@ export declare class FlowRevisionInstance {
112
113
  * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flow resource.
113
114
  */
114
115
  accountSid: string;
116
+ /**
117
+ * The SID of the User that created or last updated the Flow.
118
+ */
119
+ authorSid: string;
115
120
  /**
116
121
  * The string that you assigned to describe the Flow.
117
122
  */
@@ -174,6 +179,7 @@ export declare class FlowRevisionInstance {
174
179
  toJSON(): {
175
180
  sid: string;
176
181
  accountSid: string;
182
+ authorSid: string;
177
183
  friendlyName: string;
178
184
  definition: any;
179
185
  status: FlowRevisionStatus;
@@ -85,6 +85,7 @@ class FlowRevisionInstance {
85
85
  this._version = _version;
86
86
  this.sid = payload.sid;
87
87
  this.accountSid = payload.account_sid;
88
+ this.authorSid = payload.author_sid;
88
89
  this.friendlyName = payload.friendly_name;
89
90
  this.definition = payload.definition;
90
91
  this.status = payload.status;
@@ -132,6 +133,7 @@ class FlowRevisionInstance {
132
133
  return {
133
134
  sid: this.sid,
134
135
  accountSid: this.accountSid,
136
+ authorSid: this.authorSid,
135
137
  friendlyName: this.friendlyName,
136
138
  definition: this.definition,
137
139
  status: this.status,
@@ -163,6 +163,7 @@ interface FlowPayload extends TwilioResponsePayload {
163
163
  interface FlowResource {
164
164
  sid: string;
165
165
  account_sid: string;
166
+ author_sid: string;
166
167
  friendly_name: string;
167
168
  definition: any;
168
169
  status: FlowStatus;
@@ -190,6 +191,10 @@ export declare class FlowInstance {
190
191
  * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flow resource.
191
192
  */
192
193
  accountSid: string;
194
+ /**
195
+ * The SID of the User that created or last updated the Flow.
196
+ */
197
+ authorSid: string;
193
198
  /**
194
199
  * The string that you assigned to describe the Flow.
195
200
  */
@@ -307,6 +312,7 @@ export declare class FlowInstance {
307
312
  toJSON(): {
308
313
  sid: string;
309
314
  accountSid: string;
315
+ authorSid: string;
310
316
  friendlyName: string;
311
317
  definition: any;
312
318
  status: FlowStatus;
@@ -192,6 +192,7 @@ class FlowInstance {
192
192
  this._version = _version;
193
193
  this.sid = payload.sid;
194
194
  this.accountSid = payload.account_sid;
195
+ this.authorSid = payload.author_sid;
195
196
  this.friendlyName = payload.friendly_name;
196
197
  this.definition = payload.definition;
197
198
  this.status = payload.status;
@@ -285,6 +286,7 @@ class FlowInstance {
285
286
  return {
286
287
  sid: this.sid,
287
288
  accountSid: this.accountSid,
289
+ authorSid: this.authorSid,
288
290
  friendlyName: this.friendlyName,
289
291
  definition: this.definition,
290
292
  status: this.status,
@@ -19,6 +19,7 @@ export declare class ApprovePasskeysChallengeRequest {
19
19
  */
20
20
  "type"?: string;
21
21
  "response": ApprovePasskeysChallengeRequestResponse;
22
+ constructor(payload: any);
22
23
  }
23
24
  /**
24
25
  * The result of a WebAuthn authentication via a `navigator.credentials.get()` request, as specified in [AuthenticatorAttestationResponse](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse).
@@ -40,6 +41,7 @@ export declare class ApprovePasskeysChallengeRequestResponse {
40
41
  * The user handle stored in the authenticator, specified as `user.id` in the options passed to the originating `navigator.credentials.create()` call. This property should contain a base64url-encoded entity SID.
41
42
  */
42
43
  "userHandle"?: string;
44
+ constructor(payload: any);
43
45
  }
44
46
  /**
45
47
  * Options to pass to update a ApproveChallengeInstance
@@ -20,12 +20,25 @@ const deserialize = require("../../../../base/deserialize");
20
20
  const serialize = require("../../../../base/serialize");
21
21
  const utility_1 = require("../../../../base/utility");
22
22
  class ApprovePasskeysChallengeRequest {
23
+ constructor(payload) {
24
+ this.id = payload["id"];
25
+ this.rawId = payload["rawId"];
26
+ this.authenticatorAttachment = payload["authenticatorAttachment"];
27
+ this.type = payload["type"];
28
+ this.response = payload["response"];
29
+ }
23
30
  }
24
31
  exports.ApprovePasskeysChallengeRequest = ApprovePasskeysChallengeRequest;
25
32
  /**
26
33
  * The result of a WebAuthn authentication via a `navigator.credentials.get()` request, as specified in [AuthenticatorAttestationResponse](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse).
27
34
  */
28
35
  class ApprovePasskeysChallengeRequestResponse {
36
+ constructor(payload) {
37
+ this.authenticatorData = payload["authenticatorData"];
38
+ this.clientDataJSON = payload["clientDataJSON"];
39
+ this.signature = payload["signature"];
40
+ this.userHandle = payload["userHandle"];
41
+ }
29
42
  }
30
43
  exports.ApprovePasskeysChallengeRequestResponse = ApprovePasskeysChallengeRequestResponse;
31
44
  function ApproveChallengeListInstance(version, serviceSid) {
@@ -4,6 +4,7 @@ import { ApiResponse } from "../../../../base/ApiResponse";
4
4
  export declare class CreatePasskeysChallengeRequest {
5
5
  "identity"?: string;
6
6
  "factorSid"?: string;
7
+ constructor(payload: any);
7
8
  }
8
9
  /**
9
10
  * Options to pass to create a NewChallengeInstance
@@ -20,6 +20,10 @@ const deserialize = require("../../../../base/deserialize");
20
20
  const serialize = require("../../../../base/serialize");
21
21
  const utility_1 = require("../../../../base/utility");
22
22
  class CreatePasskeysChallengeRequest {
23
+ constructor(payload) {
24
+ this.identity = payload["identity"];
25
+ this.factorSid = payload["factor_sid"];
26
+ }
23
27
  }
24
28
  exports.CreatePasskeysChallengeRequest = CreatePasskeysChallengeRequest;
25
29
  class NewChallengeContextImpl {
@@ -5,12 +5,14 @@ export declare class CreateNewPasskeysFactorRequest {
5
5
  "friendlyName": string;
6
6
  "identity": string;
7
7
  "config"?: CreateNewPasskeysFactorRequestConfig;
8
+ constructor(payload: any);
8
9
  }
9
10
  export declare class CreateNewPasskeysFactorRequestConfig {
10
11
  "relyingParty"?: CreateNewPasskeysFactorRequestConfigRelyingParty;
11
12
  "authenticatorAttachment"?: string;
12
13
  "discoverableCredentials"?: string;
13
14
  "userVerification"?: string;
15
+ constructor(payload: any);
14
16
  }
15
17
  /**
16
18
  * Contains the information of the party requesting the user for authentication
@@ -19,6 +21,7 @@ export declare class CreateNewPasskeysFactorRequestConfigRelyingParty {
19
21
  "id"?: string;
20
22
  "name"?: string;
21
23
  "origins"?: Array<string>;
24
+ constructor(payload: any);
22
25
  }
23
26
  /**
24
27
  * Options to pass to create a NewFactorInstance
@@ -20,15 +20,31 @@ const deserialize = require("../../../../base/deserialize");
20
20
  const serialize = require("../../../../base/serialize");
21
21
  const utility_1 = require("../../../../base/utility");
22
22
  class CreateNewPasskeysFactorRequest {
23
+ constructor(payload) {
24
+ this.friendlyName = payload["friendly_name"];
25
+ this.identity = payload["identity"];
26
+ this.config = payload["config"];
27
+ }
23
28
  }
24
29
  exports.CreateNewPasskeysFactorRequest = CreateNewPasskeysFactorRequest;
25
30
  class CreateNewPasskeysFactorRequestConfig {
31
+ constructor(payload) {
32
+ this.relyingParty = payload["relying_party"];
33
+ this.authenticatorAttachment = payload["authenticator_attachment"];
34
+ this.discoverableCredentials = payload["discoverable_credentials"];
35
+ this.userVerification = payload["user_verification"];
36
+ }
26
37
  }
27
38
  exports.CreateNewPasskeysFactorRequestConfig = CreateNewPasskeysFactorRequestConfig;
28
39
  /**
29
40
  * Contains the information of the party requesting the user for authentication
30
41
  */
31
42
  class CreateNewPasskeysFactorRequestConfigRelyingParty {
43
+ constructor(payload) {
44
+ this.id = payload["id"];
45
+ this.name = payload["name"];
46
+ this.origins = payload["origins"];
47
+ }
32
48
  }
33
49
  exports.CreateNewPasskeysFactorRequestConfigRelyingParty = CreateNewPasskeysFactorRequestConfigRelyingParty;
34
50
  function NewFactorListInstance(version, serviceSid) {
@@ -19,6 +19,7 @@ export declare class VerifyPasskeysFactorRequest {
19
19
  */
20
20
  "type"?: string;
21
21
  "response": VerifyPasskeysFactorRequestResponse;
22
+ constructor(payload: any);
22
23
  }
23
24
  /**
24
25
  * The result of a WebAuthn credential registration via `navigator.credentials.create()`, as specified in [AuthenticatorAttestationResponse](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse).
@@ -36,6 +37,7 @@ export declare class VerifyPasskeysFactorRequestResponse {
36
37
  * An array of strings providing hints as to the methods the client could use to communicate with the relevant authenticator of the public key credential to retrieve.
37
38
  */
38
39
  "transports"?: Array<string>;
40
+ constructor(payload: any);
39
41
  }
40
42
  /**
41
43
  * Options to pass to update a NewVerifyFactorInstance
@@ -20,12 +20,24 @@ const deserialize = require("../../../../base/deserialize");
20
20
  const serialize = require("../../../../base/serialize");
21
21
  const utility_1 = require("../../../../base/utility");
22
22
  class VerifyPasskeysFactorRequest {
23
+ constructor(payload) {
24
+ this.id = payload["id"];
25
+ this.rawId = payload["rawId"];
26
+ this.authenticatorAttachment = payload["authenticatorAttachment"];
27
+ this.type = payload["type"];
28
+ this.response = payload["response"];
29
+ }
23
30
  }
24
31
  exports.VerifyPasskeysFactorRequest = VerifyPasskeysFactorRequest;
25
32
  /**
26
33
  * The result of a WebAuthn credential registration via `navigator.credentials.create()`, as specified in [AuthenticatorAttestationResponse](https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse).
27
34
  */
28
35
  class VerifyPasskeysFactorRequestResponse {
36
+ constructor(payload) {
37
+ this.attestationObject = payload["attestationObject"];
38
+ this.clientDataJSON = payload["clientDataJSON"];
39
+ this.transports = payload["transports"];
40
+ }
29
41
  }
30
42
  exports.VerifyPasskeysFactorRequestResponse = VerifyPasskeysFactorRequestResponse;
31
43
  function NewVerifyFactorListInstance(version, serviceSid) {