bandwidth-sdk 4.0.0 → 4.1.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 (186) hide show
  1. package/.github/CODEOWNERS +1 -1
  2. package/.github/workflows/deploy.yml +8 -2
  3. package/.github/workflows/test-pr.yml +2 -2
  4. package/.github/workflows/test-smoke.yml +39 -10
  5. package/.openapi-generator/FILES +25 -0
  6. package/README.md +3 -4
  7. package/api/toll-free-verification-api.ts +715 -0
  8. package/api.ts +1 -0
  9. package/bandwidth.yml +1102 -0
  10. package/base.ts +48 -0
  11. package/configuration.ts +1 -1
  12. package/coverage/clover.xml +674 -438
  13. package/coverage/coverage-final.json +70 -66
  14. package/coverage/lcov-report/index.html +26 -26
  15. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +14 -14
  16. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +18 -18
  17. package/coverage/lcov-report/node-sdk/api/index.html +24 -9
  18. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +13 -13
  19. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +11 -11
  20. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +12 -12
  21. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +11 -11
  22. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +19 -19
  23. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +10 -10
  24. package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +2230 -0
  25. package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +12 -12
  26. package/coverage/lcov-report/node-sdk/api.ts.html +16 -13
  27. package/coverage/lcov-report/node-sdk/base.ts.html +158 -14
  28. package/coverage/lcov-report/node-sdk/common.ts.html +32 -32
  29. package/coverage/lcov-report/node-sdk/configuration.ts.html +16 -16
  30. package/coverage/lcov-report/node-sdk/index.html +7 -7
  31. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +4 -4
  32. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +6 -6
  33. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +4 -4
  34. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +8 -8
  35. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +6 -6
  36. package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
  37. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +3 -3
  38. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +4 -4
  39. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +4 -4
  40. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +4 -4
  41. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +4 -4
  42. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +7 -7
  43. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +4 -4
  44. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +4 -4
  45. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +4 -4
  46. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +4 -4
  47. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +4 -4
  48. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +4 -4
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +4 -4
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +4 -4
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +4 -4
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +4 -4
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +4 -4
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +6 -6
  55. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +4 -4
  56. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +4 -4
  57. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +5 -5
  58. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +5 -5
  59. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +4 -4
  60. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +4 -4
  61. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +4 -4
  62. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +4 -4
  63. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +4 -4
  64. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +4 -4
  65. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +5 -5
  66. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
  67. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +31 -31
  68. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +2 -2
  69. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +2 -2
  70. package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +2 -2
  71. package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +2 -2
  72. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +2 -2
  73. package/coverage/lcov-report/node-sdk/models/callback-type-enum.ts.html +2 -2
  74. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
  75. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
  76. package/coverage/lcov-report/node-sdk/models/index.html +50 -5
  77. package/coverage/lcov-report/node-sdk/models/index.ts.html +164 -92
  78. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
  79. package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +2 -2
  80. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +2 -2
  81. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +2 -2
  82. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +2 -2
  83. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +2 -2
  84. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +2 -2
  85. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +2 -2
  86. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +2 -2
  87. package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +178 -0
  88. package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +187 -0
  89. package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +178 -0
  90. package/coverage/lcov.info +1106 -526
  91. package/custom_templates/README.mustache +3 -4
  92. package/dist/api/toll-free-verification-api.d.ts +338 -0
  93. package/dist/api/toll-free-verification-api.js +870 -0
  94. package/dist/api.d.ts +1 -0
  95. package/dist/api.js +1 -0
  96. package/dist/base.js +48 -0
  97. package/dist/configuration.js +1 -1
  98. package/dist/models/additional-denial-reason.d.ts +36 -0
  99. package/dist/models/additional-denial-reason.js +15 -0
  100. package/dist/models/address.d.ts +60 -0
  101. package/dist/models/address.js +15 -0
  102. package/dist/models/contact.d.ts +42 -0
  103. package/dist/models/contact.js +15 -0
  104. package/dist/models/failure-webhook.d.ts +54 -0
  105. package/dist/models/failure-webhook.js +15 -0
  106. package/dist/models/index.d.ts +24 -0
  107. package/dist/models/index.js +24 -0
  108. package/dist/models/links-object.d.ts +42 -0
  109. package/dist/models/links-object.js +15 -0
  110. package/dist/models/model-error.d.ts +37 -0
  111. package/dist/models/model-error.js +15 -0
  112. package/dist/models/opt-in-workflow.d.ts +30 -0
  113. package/dist/models/opt-in-workflow.js +15 -0
  114. package/dist/models/telephone-number.d.ts +24 -0
  115. package/dist/models/telephone-number.js +15 -0
  116. package/dist/models/tfv-basic-authentication.d.ts +30 -0
  117. package/dist/models/tfv-basic-authentication.js +15 -0
  118. package/dist/models/tfv-callback-status-enum.d.ts +21 -0
  119. package/dist/models/tfv-callback-status-enum.js +25 -0
  120. package/dist/models/tfv-error.d.ts +36 -0
  121. package/dist/models/tfv-error.js +15 -0
  122. package/dist/models/tfv-status-enum.d.ts +24 -0
  123. package/dist/models/tfv-status-enum.js +28 -0
  124. package/dist/models/tfv-status.d.ts +68 -0
  125. package/dist/models/tfv-status.js +15 -0
  126. package/dist/models/tfv-submission-info.d.ts +75 -0
  127. package/dist/models/tfv-submission-info.js +15 -0
  128. package/dist/models/tfv-submission-wrapper.d.ts +25 -0
  129. package/dist/models/tfv-submission-wrapper.js +15 -0
  130. package/dist/models/verification-denial-webhook.d.ts +67 -0
  131. package/dist/models/verification-denial-webhook.js +15 -0
  132. package/dist/models/verification-request.d.ts +81 -0
  133. package/dist/models/verification-request.js +15 -0
  134. package/dist/models/verification-update-request.d.ts +75 -0
  135. package/dist/models/verification-update-request.js +15 -0
  136. package/dist/models/verification-webhook.d.ts +43 -0
  137. package/dist/models/verification-webhook.js +15 -0
  138. package/dist/models/webhook-subscription-basic-authentication.d.ts +30 -0
  139. package/dist/models/webhook-subscription-basic-authentication.js +15 -0
  140. package/dist/models/webhook-subscription-request-schema.d.ts +37 -0
  141. package/dist/models/webhook-subscription-request-schema.js +15 -0
  142. package/dist/models/webhook-subscription-type-enum.d.ts +21 -0
  143. package/dist/models/webhook-subscription-type-enum.js +25 -0
  144. package/dist/models/webhook-subscription.d.ts +62 -0
  145. package/dist/models/webhook-subscription.js +15 -0
  146. package/dist/models/webhook-subscriptions-list-body.d.ts +39 -0
  147. package/dist/models/webhook-subscriptions-list-body.js +15 -0
  148. package/models/additional-denial-reason.ts +42 -0
  149. package/models/address.ts +66 -0
  150. package/models/contact.ts +48 -0
  151. package/models/failure-webhook.ts +60 -0
  152. package/models/index.ts +24 -0
  153. package/models/links-object.ts +48 -0
  154. package/models/model-error.ts +45 -0
  155. package/models/opt-in-workflow.ts +36 -0
  156. package/models/telephone-number.ts +30 -0
  157. package/models/tfv-basic-authentication.ts +36 -0
  158. package/models/tfv-callback-status-enum.ts +31 -0
  159. package/models/tfv-error.ts +42 -0
  160. package/models/tfv-status-enum.ts +34 -0
  161. package/models/tfv-status.ts +80 -0
  162. package/models/tfv-submission-info.ts +87 -0
  163. package/models/tfv-submission-wrapper.ts +33 -0
  164. package/models/verification-denial-webhook.ts +75 -0
  165. package/models/verification-request.ts +93 -0
  166. package/models/verification-update-request.ts +87 -0
  167. package/models/verification-webhook.ts +53 -0
  168. package/models/webhook-subscription-basic-authentication.ts +36 -0
  169. package/models/webhook-subscription-request-schema.ts +45 -0
  170. package/models/webhook-subscription-type-enum.ts +31 -0
  171. package/models/webhook-subscription.ts +74 -0
  172. package/models/webhook-subscriptions-list-body.ts +51 -0
  173. package/openapi-config.yml +0 -1
  174. package/package.json +1 -1
  175. package/tests/callUtils.ts +0 -8
  176. package/tests/smoke/phone-number-lookup-api.test.ts +2 -12
  177. package/tests/smoke/toll-free-verification-api.test.ts +18 -0
  178. package/tests/unit/api/calls-api.test.ts +5 -5
  179. package/tests/unit/api/conferences-api.test.ts +4 -4
  180. package/tests/unit/api/messages-api.test.ts +5 -14
  181. package/tests/unit/api/phone-number-lookup-api.test.ts +2 -12
  182. package/tests/unit/api/recordings-api.test.ts +6 -6
  183. package/tests/unit/api/toll-free-verification-api.test.ts +159 -0
  184. package/tests/unit/models/tfv-callback-status-enum.test.ts +8 -0
  185. package/tests/unit/models/tfv-status-enum.test.ts +11 -0
  186. package/tests/unit/models/webhook-subscription-type-enum.test.ts +8 -0
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { Address } from './address';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { Contact } from './contact';
22
+ // May contain unused imports in some cases
23
+ // @ts-ignore
24
+ import type { OptInWorkflow } from './opt-in-workflow';
25
+
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface VerificationRequest
30
+ */
31
+ export interface VerificationRequest {
32
+ /**
33
+ *
34
+ * @type {Address}
35
+ * @memberof VerificationRequest
36
+ */
37
+ 'businessAddress': Address;
38
+ /**
39
+ *
40
+ * @type {Contact}
41
+ * @memberof VerificationRequest
42
+ */
43
+ 'businessContact': Contact;
44
+ /**
45
+ * Estimated monthly volume of messages from the toll-free number.
46
+ * @type {number}
47
+ * @memberof VerificationRequest
48
+ */
49
+ 'messageVolume': number;
50
+ /**
51
+ *
52
+ * @type {Array<string>}
53
+ * @memberof VerificationRequest
54
+ */
55
+ 'phoneNumbers': Array<string>;
56
+ /**
57
+ * The category of the use case.
58
+ * @type {string}
59
+ * @memberof VerificationRequest
60
+ */
61
+ 'useCase': string;
62
+ /**
63
+ * A general idea of the use case and customer.
64
+ * @type {string}
65
+ * @memberof VerificationRequest
66
+ */
67
+ 'useCaseSummary': string;
68
+ /**
69
+ * Example of message content.
70
+ * @type {string}
71
+ * @memberof VerificationRequest
72
+ */
73
+ 'productionMessageContent': string;
74
+ /**
75
+ *
76
+ * @type {OptInWorkflow}
77
+ * @memberof VerificationRequest
78
+ */
79
+ 'optInWorkflow': OptInWorkflow;
80
+ /**
81
+ * Any additional information.
82
+ * @type {string}
83
+ * @memberof VerificationRequest
84
+ */
85
+ 'additionalInformation'?: string | null;
86
+ /**
87
+ * ISV name.
88
+ * @type {string}
89
+ * @memberof VerificationRequest
90
+ */
91
+ 'isvReseller'?: string | null;
92
+ }
93
+
@@ -0,0 +1,87 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { Address } from './address';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { Contact } from './contact';
22
+ // May contain unused imports in some cases
23
+ // @ts-ignore
24
+ import type { OptInWorkflow } from './opt-in-workflow';
25
+
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface VerificationUpdateRequest
30
+ */
31
+ export interface VerificationUpdateRequest {
32
+ /**
33
+ *
34
+ * @type {Address}
35
+ * @memberof VerificationUpdateRequest
36
+ */
37
+ 'businessAddress': Address;
38
+ /**
39
+ *
40
+ * @type {Contact}
41
+ * @memberof VerificationUpdateRequest
42
+ */
43
+ 'businessContact': Contact;
44
+ /**
45
+ * Estimated monthly volume of messages from the toll-free number.
46
+ * @type {number}
47
+ * @memberof VerificationUpdateRequest
48
+ */
49
+ 'messageVolume': number;
50
+ /**
51
+ * The category of the use case.
52
+ * @type {string}
53
+ * @memberof VerificationUpdateRequest
54
+ */
55
+ 'useCase': string;
56
+ /**
57
+ * A general idea of the use case and customer.
58
+ * @type {string}
59
+ * @memberof VerificationUpdateRequest
60
+ */
61
+ 'useCaseSummary': string;
62
+ /**
63
+ * Example of message content.
64
+ * @type {string}
65
+ * @memberof VerificationUpdateRequest
66
+ */
67
+ 'productionMessageContent': string;
68
+ /**
69
+ *
70
+ * @type {OptInWorkflow}
71
+ * @memberof VerificationUpdateRequest
72
+ */
73
+ 'optInWorkflow': OptInWorkflow;
74
+ /**
75
+ * Any additional information.
76
+ * @type {string}
77
+ * @memberof VerificationUpdateRequest
78
+ */
79
+ 'additionalInformation'?: string | null;
80
+ /**
81
+ * ISV name.
82
+ * @type {string}
83
+ * @memberof VerificationUpdateRequest
84
+ */
85
+ 'isvReseller'?: string | null;
86
+ }
87
+
@@ -0,0 +1,53 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { TfvCallbackStatusEnum } from './tfv-callback-status-enum';
19
+
20
+ /**
21
+ *
22
+ * @export
23
+ * @interface VerificationWebhook
24
+ */
25
+ export interface VerificationWebhook {
26
+ /**
27
+ * User\'s account ID.
28
+ * @type {string}
29
+ * @memberof VerificationWebhook
30
+ */
31
+ 'accountId'?: string;
32
+ /**
33
+ * Toll-free telephone number in E.164 format.
34
+ * @type {string}
35
+ * @memberof VerificationWebhook
36
+ */
37
+ 'phoneNumber'?: string;
38
+ /**
39
+ *
40
+ * @type {TfvCallbackStatusEnum}
41
+ * @memberof VerificationWebhook
42
+ */
43
+ 'status'?: TfvCallbackStatusEnum;
44
+ /**
45
+ * Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.
46
+ * @type {string}
47
+ * @memberof VerificationWebhook
48
+ */
49
+ 'internalTicketNumber'?: string;
50
+ }
51
+
52
+
53
+
@@ -0,0 +1,36 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ * Basic authentication credentials are not required, but if present, both username and password must be provided.
19
+ * @export
20
+ * @interface WebhookSubscriptionBasicAuthentication
21
+ */
22
+ export interface WebhookSubscriptionBasicAuthentication {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof WebhookSubscriptionBasicAuthentication
27
+ */
28
+ 'username': string;
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof WebhookSubscriptionBasicAuthentication
33
+ */
34
+ 'password': string;
35
+ }
36
+
@@ -0,0 +1,45 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { TfvBasicAuthentication } from './tfv-basic-authentication';
19
+
20
+ /**
21
+ *
22
+ * @export
23
+ * @interface WebhookSubscriptionRequestSchema
24
+ */
25
+ export interface WebhookSubscriptionRequestSchema {
26
+ /**
27
+ *
28
+ * @type {TfvBasicAuthentication}
29
+ * @memberof WebhookSubscriptionRequestSchema
30
+ */
31
+ 'basicAuthentication'?: TfvBasicAuthentication;
32
+ /**
33
+ * Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID.
34
+ * @type {string}
35
+ * @memberof WebhookSubscriptionRequestSchema
36
+ */
37
+ 'callbackUrl': string | null;
38
+ /**
39
+ * An ASCII string submitted by the user as a shared secret key for generating an HMAC header for callbacks.
40
+ * @type {string}
41
+ * @memberof WebhookSubscriptionRequestSchema
42
+ */
43
+ 'sharedSecretKey'?: string | null;
44
+ }
45
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @enum {string}
21
+ */
22
+
23
+ export const WebhookSubscriptionTypeEnum = {
24
+ TollfreeVerificationStatus: 'TOLLFREE_VERIFICATION_STATUS',
25
+ MessagingPortoutApprovalStatus: 'MESSAGING_PORTOUT_APPROVAL_STATUS'
26
+ } as const;
27
+
28
+ export type WebhookSubscriptionTypeEnum = typeof WebhookSubscriptionTypeEnum[keyof typeof WebhookSubscriptionTypeEnum];
29
+
30
+
31
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { WebhookSubscriptionBasicAuthentication } from './webhook-subscription-basic-authentication';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { WebhookSubscriptionTypeEnum } from './webhook-subscription-type-enum';
22
+
23
+ /**
24
+ * Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to.
25
+ * @export
26
+ * @interface WebhookSubscription
27
+ */
28
+ export interface WebhookSubscription {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof WebhookSubscription
33
+ */
34
+ 'id'?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof WebhookSubscription
39
+ */
40
+ 'accountId'?: string;
41
+ /**
42
+ * Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID.
43
+ * @type {string}
44
+ * @memberof WebhookSubscription
45
+ */
46
+ 'callbackUrl': string | null;
47
+ /**
48
+ *
49
+ * @type {WebhookSubscriptionTypeEnum}
50
+ * @memberof WebhookSubscription
51
+ */
52
+ 'type'?: WebhookSubscriptionTypeEnum;
53
+ /**
54
+ *
55
+ * @type {WebhookSubscriptionBasicAuthentication}
56
+ * @memberof WebhookSubscription
57
+ */
58
+ 'basicAuthentication'?: WebhookSubscriptionBasicAuthentication;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof WebhookSubscription
63
+ */
64
+ 'createdDate'?: string;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof WebhookSubscription
69
+ */
70
+ 'modifiedDate'?: string;
71
+ }
72
+
73
+
74
+
@@ -0,0 +1,51 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Bandwidth
5
+ * Bandwidth\'s Communication APIs
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: letstalk@bandwidth.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ // May contain unused imports in some cases
17
+ // @ts-ignore
18
+ import type { LinksObject } from './links-object';
19
+ // May contain unused imports in some cases
20
+ // @ts-ignore
21
+ import type { ModelError } from './model-error';
22
+ // May contain unused imports in some cases
23
+ // @ts-ignore
24
+ import type { WebhookSubscription } from './webhook-subscription';
25
+
26
+ /**
27
+ * A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated).
28
+ * @export
29
+ * @interface WebhookSubscriptionsListBody
30
+ */
31
+ export interface WebhookSubscriptionsListBody {
32
+ /**
33
+ *
34
+ * @type {LinksObject}
35
+ * @memberof WebhookSubscriptionsListBody
36
+ */
37
+ 'links'?: LinksObject;
38
+ /**
39
+ *
40
+ * @type {Array<ModelError>}
41
+ * @memberof WebhookSubscriptionsListBody
42
+ */
43
+ 'errors'?: Array<ModelError>;
44
+ /**
45
+ *
46
+ * @type {Array<WebhookSubscription>}
47
+ * @memberof WebhookSubscriptionsListBody
48
+ */
49
+ 'data': Array<WebhookSubscription>;
50
+ }
51
+
@@ -1,5 +1,4 @@
1
1
  npmName: bandwidth-sdk
2
- npmVersion: 1.0.0-dev
3
2
  withSeparateModelsAndApi: true
4
3
  modelPackage: models
5
4
  apiPackage: api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bandwidth-sdk",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "OpenAPI client for bandwidth-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -74,11 +74,3 @@ const callEnded = async (callId: string, callsApi: CallsApi) => {
74
74
  } else { return true; }
75
75
  } catch { return false; }
76
76
  }
77
-
78
- // module.exports = {
79
- // sleep,
80
- // setupManteca,
81
- // createMantecaCall,
82
- // getMantecaTestStatus,
83
- // cleanupCalls
84
- // };
@@ -21,12 +21,7 @@ describe('PhoneNumberLookupApi', () => {
21
21
 
22
22
  expect(status).toEqual(202);
23
23
  expect(data.requestId).toHaveLength(36);
24
- expect(data.status).toBeOneOf([
25
- LookupStatusEnum.Complete,
26
- LookupStatusEnum.InProgress,
27
- LookupStatusEnum.Failed,
28
- LookupStatusEnum.PartialComplete
29
- ]);
24
+ expect(data.status).toBeOneOf(Object.values(LookupStatusEnum));
30
25
 
31
26
  lookupRequestId = data.requestId!;
32
27
  await sleep(1);
@@ -39,12 +34,7 @@ describe('PhoneNumberLookupApi', () => {
39
34
 
40
35
  expect(status).toEqual(200);
41
36
  expect(data.requestId).toEqual(lookupRequestId);
42
- expect(data.status).toBeOneOf([
43
- LookupStatusEnum.Complete,
44
- LookupStatusEnum.InProgress,
45
- LookupStatusEnum.Failed,
46
- LookupStatusEnum.PartialComplete
47
- ]);
37
+ expect(data.status).toBeOneOf(Object.values(LookupStatusEnum));
48
38
  expect(data.result).toBeInstanceOf(Array);
49
39
  expect(data.result![0]['Response Code']).toBeInteger();
50
40
  expect(data.result![0]['E.164 Format']).toEqual(BW_NUMBER);
@@ -0,0 +1,18 @@
1
+ //@ts-nocheck
2
+ import { TollFreeVerificationApi } from '../../api';
3
+ import { Configuration } from '../../configuration';
4
+
5
+ describe('TollFreeVerificationApi', () => {
6
+ const config = new Configuration({username: BW_USERNAME, password: BW_PASSWORD});
7
+ const tfvApi = new TollFreeVerificationApi(config);
8
+
9
+ describe('listTollFreeUseCases', () => {
10
+ test('list toll free use cases', async () => {
11
+ const { status, data } = await tfvApi.listTollFreeUseCases(BW_ACCOUNT_ID);
12
+
13
+ expect(status).toEqual(200);
14
+ expect(data).toBeInstanceOf(Array);
15
+ });
16
+ });
17
+
18
+ });
@@ -68,11 +68,11 @@ describe('CallsApi', () => {
68
68
  expect(data.callTimeout).toBePositive();
69
69
  expect(data.callbackTimeout).toBePositive();
70
70
  expect(data.tag).toBeString();
71
- expect(data.answerMethod).toBeOneOf([CallbackMethodEnum.Post, CallbackMethodEnum.Get]);
71
+ expect(data.answerMethod).toBeOneOf(Object.values(CallbackMethodEnum));
72
72
  expect(data.answerUrl).toStartWith('http');
73
- expect(data.answerFallbackMethod).toBeOneOf([CallbackMethodEnum.Post, CallbackMethodEnum.Get]);
73
+ expect(data.answerFallbackMethod).toBeOneOf(Object.values(CallbackMethodEnum));
74
74
  expect(data.answerFallbackUrl).toStartWith('http');
75
- expect(data.disconnectMethod).toBeOneOf([CallbackMethodEnum.Post, CallbackMethodEnum.Get]);
75
+ expect(data.disconnectMethod).toBeOneOf(Object.values(CallbackMethodEnum));
76
76
  expect(data.disconnectUrl).toStartWith('http');
77
77
  expect(data.username).toBeString();
78
78
  expect(data.password).toBeString();
@@ -93,7 +93,7 @@ describe('CallsApi', () => {
93
93
  expect(data.parentCallId).toHaveLength(47);
94
94
  expect(data.to).toHaveLength(12);
95
95
  expect(data.from).toHaveLength(12);
96
- expect(data.direction).toBeOneOf([CallDirectionEnum.Inbound, CallDirectionEnum.Outbound]);
96
+ expect(data.direction).toBeOneOf(Object.values(CallDirectionEnum));
97
97
  expect(data.state).toBeString();
98
98
  expect(data.stirShaken).toBeObject();
99
99
  expect(data.identity).toBeString();
@@ -120,7 +120,7 @@ describe('CallsApi', () => {
120
120
  expect(data[0].parentCallId).toHaveLength(47);
121
121
  expect(data[0].to).toHaveLength(12);
122
122
  expect(data[0].from).toHaveLength(12);
123
- expect(data[0].direction).toBeOneOf([CallDirectionEnum.Inbound, CallDirectionEnum.Outbound]);
123
+ expect(data[0].direction).toBeOneOf(Object.values(CallDirectionEnum));
124
124
  expect(data[0].state).toBeString();
125
125
  expect(data[0].stirShaken).toBeObject();
126
126
  expect(data[0].identity).toBeString();
@@ -32,7 +32,7 @@ describe('ConferencesApi', () => {
32
32
  expect(data[0].createdTime).toBeDateString();
33
33
  expect(data[0].completedTime).toBeDateString();
34
34
  expect(data[0].conferenceEventUrl).toStartWith('http');
35
- expect(data[0].conferenceEventMethod).toBeOneOf([CallbackMethodEnum.Post, CallbackMethodEnum.Get]);
35
+ expect(data[0].conferenceEventMethod).toBeOneOf(Object.values(CallbackMethodEnum));
36
36
  expect(data[0].tag).toBeString();
37
37
  });
38
38
  });
@@ -47,7 +47,7 @@ describe('ConferencesApi', () => {
47
47
  expect(data.createdTime).toBeDateString();
48
48
  expect(data.completedTime).toBeDateString();
49
49
  expect(data.conferenceEventUrl).toStartWith('http');
50
- expect(data.conferenceEventMethod).toBeOneOf([CallbackMethodEnum.Post, CallbackMethodEnum.Get]);
50
+ expect(data.conferenceEventMethod).toBeOneOf(Object.values(CallbackMethodEnum));
51
51
  expect(data.tag).toBeString();
52
52
  });
53
53
  });
@@ -123,7 +123,7 @@ describe('ConferencesApi', () => {
123
123
  expect(data[0].channels).toBeNumber();
124
124
  expect(data[0].startTime).toBeDateString();
125
125
  expect(data[0].endTime).toBeDateString();
126
- expect(data[0].fileFormat).toBeOneOf([FileFormatEnum.Wav, FileFormatEnum.Mp3]);
126
+ expect(data[0].fileFormat).toBeOneOf(Object.values(FileFormatEnum));
127
127
  expect(data[0].status).toBeString();
128
128
  expect(data[0].mediaUrl).toStartWith('http');
129
129
  });
@@ -142,7 +142,7 @@ describe('ConferencesApi', () => {
142
142
  expect(data.channels).toBeNumber();
143
143
  expect(data.startTime).toBeDateString();
144
144
  expect(data.endTime).toBeDateString();
145
- expect(data.fileFormat).toBeOneOf([FileFormatEnum.Wav, FileFormatEnum.Mp3]);
145
+ expect(data.fileFormat).toBeOneOf(Object.values(FileFormatEnum));
146
146
  expect(data.status).toBeString();
147
147
  expect(data.mediaUrl).toStartWith('http');
148
148
  });
@@ -44,7 +44,7 @@ describe('MessagesApi', () => {
44
44
  expect(data.applicationId).toHaveLength(36);
45
45
  expect(data.time).toBeDateString();
46
46
  expect(data.segmentCount).toBeInteger();
47
- expect(data.direction).toBeOneOf([MessageDirectionEnum.In, MessageDirectionEnum.Out])
47
+ expect(data.direction).toBeOneOf(Object.values(MessageDirectionEnum));
48
48
  expect(data.to).toBeInstanceOf(Array);
49
49
  expect(data.to![0]).toHaveLength(12);
50
50
  expect(data.from).toHaveLength(12);
@@ -52,7 +52,7 @@ describe('MessagesApi', () => {
52
52
  expect(data.media![0]).toStartWith('http');
53
53
  expect(data.text).toBeString();
54
54
  expect(data.tag).toBeString();
55
- expect(data.priority).toBeOneOf([PriorityEnum.Default, PriorityEnum.High]);
55
+ expect(data.priority).toBeOneOf(Object.values(PriorityEnum));
56
56
  expect(data.expiration).toBeDateString();
57
57
  });
58
58
  });
@@ -74,18 +74,9 @@ describe('MessagesApi', () => {
74
74
  expect(data.messages![0].accountId).toHaveLength(7);
75
75
  expect(data.messages![0].sourceTn).toHaveLength(12);
76
76
  expect(data.messages![0].destinationTn).toHaveLength(12);
77
- expect(data.messages![0].messageStatus).toBeOneOf([
78
- MessageStatusEnum.Received,
79
- MessageStatusEnum.Queued,
80
- MessageStatusEnum.Sending,
81
- MessageStatusEnum.Sent,
82
- MessageStatusEnum.Failed,
83
- MessageStatusEnum.Delivered,
84
- MessageStatusEnum.Accepted,
85
- MessageStatusEnum.Undelivered,
86
- ]);
87
- expect(data.messages![0].messageDirection).toBeOneOf([ListMessageDirectionEnum.Inbound, ListMessageDirectionEnum.Outbound]);
88
- expect(data.messages![0].messageType).toBeOneOf([MessageTypeEnum.Sms, MessageTypeEnum.Mms]);
77
+ expect(data.messages![0].messageStatus).toBeOneOf(Object.values(MessageStatusEnum));
78
+ expect(data.messages![0].messageDirection).toBeOneOf(Object.values(ListMessageDirectionEnum));
79
+ expect(data.messages![0].messageType).toBeOneOf(Object.values(MessageTypeEnum));
89
80
  expect(data.messages![0].segmentCount).toBeInteger();
90
81
  expect(data.messages![0].errorCode).toBePositive();
91
82
  expect(data.messages![0].receiveTime).toBeDateString();