bandwidth-sdk 4.0.0 → 4.1.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.
- package/.github/CODEOWNERS +1 -1
- package/.github/workflows/deploy.yml +8 -2
- package/.github/workflows/test-pr.yml +2 -2
- package/.github/workflows/test-smoke.yml +39 -10
- package/.openapi-generator/FILES +25 -0
- package/README.md +3 -4
- package/api/toll-free-verification-api.ts +715 -0
- package/api.ts +1 -0
- package/bandwidth.yml +1113 -0
- package/base.ts +48 -0
- package/configuration.ts +1 -1
- package/coverage/clover.xml +674 -438
- package/coverage/coverage-final.json +70 -66
- package/coverage/lcov-report/index.html +26 -26
- package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +14 -14
- package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +18 -18
- package/coverage/lcov-report/node-sdk/api/index.html +24 -9
- package/coverage/lcov-report/node-sdk/api/media-api.ts.html +13 -13
- package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +11 -11
- package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +12 -12
- package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +11 -11
- package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +19 -19
- package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +10 -10
- package/coverage/lcov-report/node-sdk/api/toll-free-verification-api.ts.html +2230 -0
- package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +12 -12
- package/coverage/lcov-report/node-sdk/api.ts.html +16 -13
- package/coverage/lcov-report/node-sdk/base.ts.html +158 -14
- package/coverage/lcov-report/node-sdk/common.ts.html +32 -32
- package/coverage/lcov-report/node-sdk/configuration.ts.html +16 -16
- package/coverage/lcov-report/node-sdk/index.html +7 -7
- package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +8 -8
- package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/bxml/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +3 -3
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +7 -7
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +6 -6
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +5 -5
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +5 -5
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +4 -4
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +5 -5
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
- package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +31 -31
- package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/callback-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/index.html +50 -5
- package/coverage/lcov-report/node-sdk/models/index.ts.html +164 -92
- package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +2 -2
- package/coverage/lcov-report/node-sdk/models/tfv-callback-status-enum.ts.html +178 -0
- package/coverage/lcov-report/node-sdk/models/tfv-status-enum.ts.html +187 -0
- package/coverage/lcov-report/node-sdk/models/webhook-subscription-type-enum.ts.html +178 -0
- package/coverage/lcov.info +1106 -526
- package/custom_templates/README.mustache +3 -4
- package/dist/api/toll-free-verification-api.d.ts +338 -0
- package/dist/api/toll-free-verification-api.js +870 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.js +48 -0
- package/dist/common.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/additional-denial-reason.d.ts +36 -0
- package/dist/models/additional-denial-reason.js +15 -0
- package/dist/models/address.d.ts +60 -0
- package/dist/models/address.js +15 -0
- package/dist/models/contact.d.ts +42 -0
- package/dist/models/contact.js +15 -0
- package/dist/models/failure-webhook.d.ts +54 -0
- package/dist/models/failure-webhook.js +15 -0
- package/dist/models/index.d.ts +24 -0
- package/dist/models/index.js +24 -0
- package/dist/models/initiate-callback.d.ts +6 -0
- package/dist/models/links-object.d.ts +42 -0
- package/dist/models/links-object.js +15 -0
- package/dist/models/model-error.d.ts +37 -0
- package/dist/models/model-error.js +15 -0
- package/dist/models/opt-in-workflow.d.ts +30 -0
- package/dist/models/opt-in-workflow.js +15 -0
- package/dist/models/telephone-number.d.ts +24 -0
- package/dist/models/telephone-number.js +15 -0
- package/dist/models/tfv-basic-authentication.d.ts +30 -0
- package/dist/models/tfv-basic-authentication.js +15 -0
- package/dist/models/tfv-callback-status-enum.d.ts +21 -0
- package/dist/models/tfv-callback-status-enum.js +25 -0
- package/dist/models/tfv-error.d.ts +36 -0
- package/dist/models/tfv-error.js +15 -0
- package/dist/models/tfv-status-enum.d.ts +24 -0
- package/dist/models/tfv-status-enum.js +28 -0
- package/dist/models/tfv-status.d.ts +68 -0
- package/dist/models/tfv-status.js +15 -0
- package/dist/models/tfv-submission-info.d.ts +75 -0
- package/dist/models/tfv-submission-info.js +15 -0
- package/dist/models/tfv-submission-wrapper.d.ts +25 -0
- package/dist/models/tfv-submission-wrapper.js +15 -0
- package/dist/models/verification-denial-webhook.d.ts +67 -0
- package/dist/models/verification-denial-webhook.js +15 -0
- package/dist/models/verification-request.d.ts +81 -0
- package/dist/models/verification-request.js +15 -0
- package/dist/models/verification-update-request.d.ts +75 -0
- package/dist/models/verification-update-request.js +15 -0
- package/dist/models/verification-webhook.d.ts +43 -0
- package/dist/models/verification-webhook.js +15 -0
- package/dist/models/webhook-subscription-basic-authentication.d.ts +30 -0
- package/dist/models/webhook-subscription-basic-authentication.js +15 -0
- package/dist/models/webhook-subscription-request-schema.d.ts +37 -0
- package/dist/models/webhook-subscription-request-schema.js +15 -0
- package/dist/models/webhook-subscription-type-enum.d.ts +21 -0
- package/dist/models/webhook-subscription-type-enum.js +25 -0
- package/dist/models/webhook-subscription.d.ts +62 -0
- package/dist/models/webhook-subscription.js +15 -0
- package/dist/models/webhook-subscriptions-list-body.d.ts +39 -0
- package/dist/models/webhook-subscriptions-list-body.js +15 -0
- package/models/additional-denial-reason.ts +42 -0
- package/models/address.ts +66 -0
- package/models/contact.ts +48 -0
- package/models/failure-webhook.ts +60 -0
- package/models/index.ts +24 -0
- package/models/initiate-callback.ts +6 -0
- package/models/links-object.ts +48 -0
- package/models/model-error.ts +45 -0
- package/models/opt-in-workflow.ts +36 -0
- package/models/telephone-number.ts +30 -0
- package/models/tfv-basic-authentication.ts +36 -0
- package/models/tfv-callback-status-enum.ts +31 -0
- package/models/tfv-error.ts +42 -0
- package/models/tfv-status-enum.ts +34 -0
- package/models/tfv-status.ts +80 -0
- package/models/tfv-submission-info.ts +87 -0
- package/models/tfv-submission-wrapper.ts +33 -0
- package/models/verification-denial-webhook.ts +75 -0
- package/models/verification-request.ts +93 -0
- package/models/verification-update-request.ts +87 -0
- package/models/verification-webhook.ts +53 -0
- package/models/webhook-subscription-basic-authentication.ts +36 -0
- package/models/webhook-subscription-request-schema.ts +45 -0
- package/models/webhook-subscription-type-enum.ts +31 -0
- package/models/webhook-subscription.ts +74 -0
- package/models/webhook-subscriptions-list-body.ts +51 -0
- package/openapi-config.yml +0 -1
- package/package.json +1 -1
- package/tests/callUtils.ts +0 -8
- package/tests/smoke/phone-number-lookup-api.test.ts +2 -12
- package/tests/smoke/toll-free-verification-api.test.ts +18 -0
- package/tests/unit/api/calls-api.test.ts +5 -5
- package/tests/unit/api/conferences-api.test.ts +4 -4
- package/tests/unit/api/messages-api.test.ts +5 -14
- package/tests/unit/api/phone-number-lookup-api.test.ts +2 -12
- package/tests/unit/api/recordings-api.test.ts +6 -6
- package/tests/unit/api/toll-free-verification-api.test.ts +159 -0
- package/tests/unit/models/tfv-callback-status-enum.test.ts +8 -0
- package/tests/unit/models/tfv-status-enum.test.ts +11 -0
- package/tests/unit/models/webhook-subscription-type-enum.test.ts +8 -0
|
@@ -0,0 +1,715 @@
|
|
|
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
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { TfvError } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { TfvStatus } from '../models';
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import type { TfvSubmissionWrapper } from '../models';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import type { VerificationRequest } from '../models';
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
import type { WebhookSubscription } from '../models';
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
import type { WebhookSubscriptionRequestSchema } from '../models';
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
import type { WebhookSubscriptionsListBody } from '../models';
|
|
38
|
+
/**
|
|
39
|
+
* TollFreeVerificationApi - axios parameter creator
|
|
40
|
+
* @export
|
|
41
|
+
*/
|
|
42
|
+
export const TollFreeVerificationApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
43
|
+
return {
|
|
44
|
+
/**
|
|
45
|
+
* Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a `callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time.
|
|
46
|
+
* @summary Create Webhook Subscription
|
|
47
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
48
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
*/
|
|
52
|
+
createWebhookSubscription: async (accountId: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
53
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
54
|
+
assertParamExists('createWebhookSubscription', 'accountId', accountId)
|
|
55
|
+
// verify required parameter 'webhookSubscriptionRequestSchema' is not null or undefined
|
|
56
|
+
assertParamExists('createWebhookSubscription', 'webhookSubscriptionRequestSchema', webhookSubscriptionRequestSchema)
|
|
57
|
+
const localVarPath = `/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions`
|
|
58
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
59
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
60
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
61
|
+
let baseOptions;
|
|
62
|
+
if (configuration) {
|
|
63
|
+
baseOptions = configuration.baseOptions;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
67
|
+
const localVarHeaderParameter = {} as any;
|
|
68
|
+
const localVarQueryParameter = {} as any;
|
|
69
|
+
|
|
70
|
+
// authentication Basic required
|
|
71
|
+
// http basic authentication required
|
|
72
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
77
|
+
|
|
78
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
79
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
80
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
81
|
+
localVarRequestOptions.data = serializeDataIfNeeded(webhookSubscriptionRequestSchema, localVarRequestOptions, configuration)
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
url: toPathString(localVarUrlObj),
|
|
85
|
+
options: localVarRequestOptions,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Delete a webhook subscription by ID.
|
|
90
|
+
* @summary Delete Webhook Subscription
|
|
91
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
92
|
+
* @param {string} id Webhook subscription ID
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
*/
|
|
96
|
+
deleteWebhookSubscription: async (accountId: string, id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
97
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
98
|
+
assertParamExists('deleteWebhookSubscription', 'accountId', accountId)
|
|
99
|
+
// verify required parameter 'id' is not null or undefined
|
|
100
|
+
assertParamExists('deleteWebhookSubscription', 'id', id)
|
|
101
|
+
const localVarPath = `/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}`
|
|
102
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
|
|
103
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
104
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
105
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
106
|
+
let baseOptions;
|
|
107
|
+
if (configuration) {
|
|
108
|
+
baseOptions = configuration.baseOptions;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
112
|
+
const localVarHeaderParameter = {} as any;
|
|
113
|
+
const localVarQueryParameter = {} as any;
|
|
114
|
+
|
|
115
|
+
// authentication Basic required
|
|
116
|
+
// http basic authentication required
|
|
117
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
122
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
123
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
url: toPathString(localVarUrlObj),
|
|
127
|
+
options: localVarRequestOptions,
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available.
|
|
132
|
+
* @summary Get Toll-Free Verification Status
|
|
133
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
134
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
*/
|
|
138
|
+
getTollFreeVerificationStatus: async (accountId: string, phoneNumber: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
139
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
140
|
+
assertParamExists('getTollFreeVerificationStatus', 'accountId', accountId)
|
|
141
|
+
// verify required parameter 'phoneNumber' is not null or undefined
|
|
142
|
+
assertParamExists('getTollFreeVerificationStatus', 'phoneNumber', phoneNumber)
|
|
143
|
+
const localVarPath = `/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification`
|
|
144
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
|
|
145
|
+
.replace(`{${"phoneNumber"}}`, encodeURIComponent(String(phoneNumber)));
|
|
146
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
147
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
148
|
+
let baseOptions;
|
|
149
|
+
if (configuration) {
|
|
150
|
+
baseOptions = configuration.baseOptions;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
154
|
+
const localVarHeaderParameter = {} as any;
|
|
155
|
+
const localVarQueryParameter = {} as any;
|
|
156
|
+
|
|
157
|
+
// authentication Basic required
|
|
158
|
+
// http basic authentication required
|
|
159
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
164
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
165
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
url: toPathString(localVarUrlObj),
|
|
169
|
+
options: localVarRequestOptions,
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* Lists valid toll-free use cases.
|
|
174
|
+
* @summary List Toll-Free Use Cases
|
|
175
|
+
* @param {*} [options] Override http request option.
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
*/
|
|
178
|
+
listTollFreeUseCases: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
179
|
+
const localVarPath = `/tollFreeVerification/useCases`;
|
|
180
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
181
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
182
|
+
let baseOptions;
|
|
183
|
+
if (configuration) {
|
|
184
|
+
baseOptions = configuration.baseOptions;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
188
|
+
const localVarHeaderParameter = {} as any;
|
|
189
|
+
const localVarQueryParameter = {} as any;
|
|
190
|
+
|
|
191
|
+
// authentication Basic required
|
|
192
|
+
// http basic authentication required
|
|
193
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
198
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
199
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
url: toPathString(localVarUrlObj),
|
|
203
|
+
options: localVarRequestOptions,
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null).
|
|
208
|
+
* @summary List Webhook Subscriptions
|
|
209
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
210
|
+
* @param {*} [options] Override http request option.
|
|
211
|
+
* @throws {RequiredError}
|
|
212
|
+
*/
|
|
213
|
+
listWebhookSubscriptions: async (accountId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
214
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
215
|
+
assertParamExists('listWebhookSubscriptions', 'accountId', accountId)
|
|
216
|
+
const localVarPath = `/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions`
|
|
217
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
218
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
219
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
220
|
+
let baseOptions;
|
|
221
|
+
if (configuration) {
|
|
222
|
+
baseOptions = configuration.baseOptions;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
226
|
+
const localVarHeaderParameter = {} as any;
|
|
227
|
+
const localVarQueryParameter = {} as any;
|
|
228
|
+
|
|
229
|
+
// authentication Basic required
|
|
230
|
+
// http basic authentication required
|
|
231
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
236
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
237
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
238
|
+
|
|
239
|
+
return {
|
|
240
|
+
url: toPathString(localVarUrlObj),
|
|
241
|
+
options: localVarRequestOptions,
|
|
242
|
+
};
|
|
243
|
+
},
|
|
244
|
+
/**
|
|
245
|
+
* Submit a request for verification of a toll-free phone number.
|
|
246
|
+
* @summary Request Toll-Free Verification
|
|
247
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
248
|
+
* @param {VerificationRequest} verificationRequest Request for verification of a toll-free phone number.
|
|
249
|
+
* @param {*} [options] Override http request option.
|
|
250
|
+
* @throws {RequiredError}
|
|
251
|
+
*/
|
|
252
|
+
requestTollFreeVerification: async (accountId: string, verificationRequest: VerificationRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
253
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
254
|
+
assertParamExists('requestTollFreeVerification', 'accountId', accountId)
|
|
255
|
+
// verify required parameter 'verificationRequest' is not null or undefined
|
|
256
|
+
assertParamExists('requestTollFreeVerification', 'verificationRequest', verificationRequest)
|
|
257
|
+
const localVarPath = `/accounts/{accountId}/tollFreeVerification`
|
|
258
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
259
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
260
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
261
|
+
let baseOptions;
|
|
262
|
+
if (configuration) {
|
|
263
|
+
baseOptions = configuration.baseOptions;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
267
|
+
const localVarHeaderParameter = {} as any;
|
|
268
|
+
const localVarQueryParameter = {} as any;
|
|
269
|
+
|
|
270
|
+
// authentication Basic required
|
|
271
|
+
// http basic authentication required
|
|
272
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
277
|
+
|
|
278
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
279
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
280
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
281
|
+
localVarRequestOptions.data = serializeDataIfNeeded(verificationRequest, localVarRequestOptions, configuration)
|
|
282
|
+
|
|
283
|
+
return {
|
|
284
|
+
url: toPathString(localVarUrlObj),
|
|
285
|
+
options: localVarRequestOptions,
|
|
286
|
+
};
|
|
287
|
+
},
|
|
288
|
+
/**
|
|
289
|
+
* Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
|
|
290
|
+
* @summary Update Toll-Free Verification Request
|
|
291
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
292
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
293
|
+
* @param {TfvSubmissionWrapper} tfvSubmissionWrapper Update a request for verification of a toll-free phone number.
|
|
294
|
+
* @param {*} [options] Override http request option.
|
|
295
|
+
* @throws {RequiredError}
|
|
296
|
+
*/
|
|
297
|
+
updateTollFreeVerificationRequest: async (accountId: string, phoneNumber: string, tfvSubmissionWrapper: TfvSubmissionWrapper, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
298
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
299
|
+
assertParamExists('updateTollFreeVerificationRequest', 'accountId', accountId)
|
|
300
|
+
// verify required parameter 'phoneNumber' is not null or undefined
|
|
301
|
+
assertParamExists('updateTollFreeVerificationRequest', 'phoneNumber', phoneNumber)
|
|
302
|
+
// verify required parameter 'tfvSubmissionWrapper' is not null or undefined
|
|
303
|
+
assertParamExists('updateTollFreeVerificationRequest', 'tfvSubmissionWrapper', tfvSubmissionWrapper)
|
|
304
|
+
const localVarPath = `/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification`
|
|
305
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
|
|
306
|
+
.replace(`{${"phoneNumber"}}`, encodeURIComponent(String(phoneNumber)));
|
|
307
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
308
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
309
|
+
let baseOptions;
|
|
310
|
+
if (configuration) {
|
|
311
|
+
baseOptions = configuration.baseOptions;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
315
|
+
const localVarHeaderParameter = {} as any;
|
|
316
|
+
const localVarQueryParameter = {} as any;
|
|
317
|
+
|
|
318
|
+
// authentication Basic required
|
|
319
|
+
// http basic authentication required
|
|
320
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
325
|
+
|
|
326
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
327
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
328
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
329
|
+
localVarRequestOptions.data = serializeDataIfNeeded(tfvSubmissionWrapper, localVarRequestOptions, configuration)
|
|
330
|
+
|
|
331
|
+
return {
|
|
332
|
+
url: toPathString(localVarUrlObj),
|
|
333
|
+
options: localVarRequestOptions,
|
|
334
|
+
};
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated).
|
|
338
|
+
* @summary Update Webhook Subscription
|
|
339
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
340
|
+
* @param {string} id Webhook subscription ID
|
|
341
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
342
|
+
* @param {*} [options] Override http request option.
|
|
343
|
+
* @throws {RequiredError}
|
|
344
|
+
*/
|
|
345
|
+
updateWebhookSubscription: async (accountId: string, id: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
346
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
347
|
+
assertParamExists('updateWebhookSubscription', 'accountId', accountId)
|
|
348
|
+
// verify required parameter 'id' is not null or undefined
|
|
349
|
+
assertParamExists('updateWebhookSubscription', 'id', id)
|
|
350
|
+
// verify required parameter 'webhookSubscriptionRequestSchema' is not null or undefined
|
|
351
|
+
assertParamExists('updateWebhookSubscription', 'webhookSubscriptionRequestSchema', webhookSubscriptionRequestSchema)
|
|
352
|
+
const localVarPath = `/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}`
|
|
353
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
|
|
354
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
355
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
356
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
357
|
+
let baseOptions;
|
|
358
|
+
if (configuration) {
|
|
359
|
+
baseOptions = configuration.baseOptions;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
363
|
+
const localVarHeaderParameter = {} as any;
|
|
364
|
+
const localVarQueryParameter = {} as any;
|
|
365
|
+
|
|
366
|
+
// authentication Basic required
|
|
367
|
+
// http basic authentication required
|
|
368
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
373
|
+
|
|
374
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
375
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
376
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
377
|
+
localVarRequestOptions.data = serializeDataIfNeeded(webhookSubscriptionRequestSchema, localVarRequestOptions, configuration)
|
|
378
|
+
|
|
379
|
+
return {
|
|
380
|
+
url: toPathString(localVarUrlObj),
|
|
381
|
+
options: localVarRequestOptions,
|
|
382
|
+
};
|
|
383
|
+
},
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* TollFreeVerificationApi - functional programming interface
|
|
389
|
+
* @export
|
|
390
|
+
*/
|
|
391
|
+
export const TollFreeVerificationApiFp = function(configuration?: Configuration) {
|
|
392
|
+
const localVarAxiosParamCreator = TollFreeVerificationApiAxiosParamCreator(configuration)
|
|
393
|
+
return {
|
|
394
|
+
/**
|
|
395
|
+
* Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a `callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time.
|
|
396
|
+
* @summary Create Webhook Subscription
|
|
397
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
398
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
399
|
+
* @param {*} [options] Override http request option.
|
|
400
|
+
* @throws {RequiredError}
|
|
401
|
+
*/
|
|
402
|
+
async createWebhookSubscription(accountId: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookSubscription>> {
|
|
403
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createWebhookSubscription(accountId, webhookSubscriptionRequestSchema, options);
|
|
404
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
405
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.createWebhookSubscription']?.[localVarOperationServerIndex]?.url;
|
|
406
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
407
|
+
},
|
|
408
|
+
/**
|
|
409
|
+
* Delete a webhook subscription by ID.
|
|
410
|
+
* @summary Delete Webhook Subscription
|
|
411
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
412
|
+
* @param {string} id Webhook subscription ID
|
|
413
|
+
* @param {*} [options] Override http request option.
|
|
414
|
+
* @throws {RequiredError}
|
|
415
|
+
*/
|
|
416
|
+
async deleteWebhookSubscription(accountId: string, id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
417
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebhookSubscription(accountId, id, options);
|
|
418
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
419
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.deleteWebhookSubscription']?.[localVarOperationServerIndex]?.url;
|
|
420
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
421
|
+
},
|
|
422
|
+
/**
|
|
423
|
+
* Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available.
|
|
424
|
+
* @summary Get Toll-Free Verification Status
|
|
425
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
426
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
427
|
+
* @param {*} [options] Override http request option.
|
|
428
|
+
* @throws {RequiredError}
|
|
429
|
+
*/
|
|
430
|
+
async getTollFreeVerificationStatus(accountId: string, phoneNumber: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TfvStatus>> {
|
|
431
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getTollFreeVerificationStatus(accountId, phoneNumber, options);
|
|
432
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
433
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.getTollFreeVerificationStatus']?.[localVarOperationServerIndex]?.url;
|
|
434
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
435
|
+
},
|
|
436
|
+
/**
|
|
437
|
+
* Lists valid toll-free use cases.
|
|
438
|
+
* @summary List Toll-Free Use Cases
|
|
439
|
+
* @param {*} [options] Override http request option.
|
|
440
|
+
* @throws {RequiredError}
|
|
441
|
+
*/
|
|
442
|
+
async listTollFreeUseCases(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
|
|
443
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listTollFreeUseCases(options);
|
|
444
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
445
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.listTollFreeUseCases']?.[localVarOperationServerIndex]?.url;
|
|
446
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
447
|
+
},
|
|
448
|
+
/**
|
|
449
|
+
* Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null).
|
|
450
|
+
* @summary List Webhook Subscriptions
|
|
451
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
452
|
+
* @param {*} [options] Override http request option.
|
|
453
|
+
* @throws {RequiredError}
|
|
454
|
+
*/
|
|
455
|
+
async listWebhookSubscriptions(accountId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookSubscriptionsListBody>> {
|
|
456
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebhookSubscriptions(accountId, options);
|
|
457
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
458
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.listWebhookSubscriptions']?.[localVarOperationServerIndex]?.url;
|
|
459
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Submit a request for verification of a toll-free phone number.
|
|
463
|
+
* @summary Request Toll-Free Verification
|
|
464
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
465
|
+
* @param {VerificationRequest} verificationRequest Request for verification of a toll-free phone number.
|
|
466
|
+
* @param {*} [options] Override http request option.
|
|
467
|
+
* @throws {RequiredError}
|
|
468
|
+
*/
|
|
469
|
+
async requestTollFreeVerification(accountId: string, verificationRequest: VerificationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
470
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.requestTollFreeVerification(accountId, verificationRequest, options);
|
|
471
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
472
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.requestTollFreeVerification']?.[localVarOperationServerIndex]?.url;
|
|
473
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
474
|
+
},
|
|
475
|
+
/**
|
|
476
|
+
* Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
|
|
477
|
+
* @summary Update Toll-Free Verification Request
|
|
478
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
479
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
480
|
+
* @param {TfvSubmissionWrapper} tfvSubmissionWrapper Update a request for verification of a toll-free phone number.
|
|
481
|
+
* @param {*} [options] Override http request option.
|
|
482
|
+
* @throws {RequiredError}
|
|
483
|
+
*/
|
|
484
|
+
async updateTollFreeVerificationRequest(accountId: string, phoneNumber: string, tfvSubmissionWrapper: TfvSubmissionWrapper, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
485
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateTollFreeVerificationRequest(accountId, phoneNumber, tfvSubmissionWrapper, options);
|
|
486
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
487
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.updateTollFreeVerificationRequest']?.[localVarOperationServerIndex]?.url;
|
|
488
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
489
|
+
},
|
|
490
|
+
/**
|
|
491
|
+
* Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated).
|
|
492
|
+
* @summary Update Webhook Subscription
|
|
493
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
494
|
+
* @param {string} id Webhook subscription ID
|
|
495
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
496
|
+
* @param {*} [options] Override http request option.
|
|
497
|
+
* @throws {RequiredError}
|
|
498
|
+
*/
|
|
499
|
+
async updateWebhookSubscription(accountId: string, id: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookSubscription>> {
|
|
500
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateWebhookSubscription(accountId, id, webhookSubscriptionRequestSchema, options);
|
|
501
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
502
|
+
const localVarOperationServerBasePath = operationServerMap['TollFreeVerificationApi.updateWebhookSubscription']?.[localVarOperationServerIndex]?.url;
|
|
503
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
504
|
+
},
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* TollFreeVerificationApi - factory interface
|
|
510
|
+
* @export
|
|
511
|
+
*/
|
|
512
|
+
export const TollFreeVerificationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
513
|
+
const localVarFp = TollFreeVerificationApiFp(configuration)
|
|
514
|
+
return {
|
|
515
|
+
/**
|
|
516
|
+
* Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a `callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time.
|
|
517
|
+
* @summary Create Webhook Subscription
|
|
518
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
519
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
520
|
+
* @param {*} [options] Override http request option.
|
|
521
|
+
* @throws {RequiredError}
|
|
522
|
+
*/
|
|
523
|
+
createWebhookSubscription(accountId: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options?: RawAxiosRequestConfig): AxiosPromise<WebhookSubscription> {
|
|
524
|
+
return localVarFp.createWebhookSubscription(accountId, webhookSubscriptionRequestSchema, options).then((request) => request(axios, basePath));
|
|
525
|
+
},
|
|
526
|
+
/**
|
|
527
|
+
* Delete a webhook subscription by ID.
|
|
528
|
+
* @summary Delete Webhook Subscription
|
|
529
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
530
|
+
* @param {string} id Webhook subscription ID
|
|
531
|
+
* @param {*} [options] Override http request option.
|
|
532
|
+
* @throws {RequiredError}
|
|
533
|
+
*/
|
|
534
|
+
deleteWebhookSubscription(accountId: string, id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
535
|
+
return localVarFp.deleteWebhookSubscription(accountId, id, options).then((request) => request(axios, basePath));
|
|
536
|
+
},
|
|
537
|
+
/**
|
|
538
|
+
* Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available.
|
|
539
|
+
* @summary Get Toll-Free Verification Status
|
|
540
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
541
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
542
|
+
* @param {*} [options] Override http request option.
|
|
543
|
+
* @throws {RequiredError}
|
|
544
|
+
*/
|
|
545
|
+
getTollFreeVerificationStatus(accountId: string, phoneNumber: string, options?: RawAxiosRequestConfig): AxiosPromise<TfvStatus> {
|
|
546
|
+
return localVarFp.getTollFreeVerificationStatus(accountId, phoneNumber, options).then((request) => request(axios, basePath));
|
|
547
|
+
},
|
|
548
|
+
/**
|
|
549
|
+
* Lists valid toll-free use cases.
|
|
550
|
+
* @summary List Toll-Free Use Cases
|
|
551
|
+
* @param {*} [options] Override http request option.
|
|
552
|
+
* @throws {RequiredError}
|
|
553
|
+
*/
|
|
554
|
+
listTollFreeUseCases(options?: RawAxiosRequestConfig): AxiosPromise<Array<string>> {
|
|
555
|
+
return localVarFp.listTollFreeUseCases(options).then((request) => request(axios, basePath));
|
|
556
|
+
},
|
|
557
|
+
/**
|
|
558
|
+
* Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null).
|
|
559
|
+
* @summary List Webhook Subscriptions
|
|
560
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
561
|
+
* @param {*} [options] Override http request option.
|
|
562
|
+
* @throws {RequiredError}
|
|
563
|
+
*/
|
|
564
|
+
listWebhookSubscriptions(accountId: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhookSubscriptionsListBody> {
|
|
565
|
+
return localVarFp.listWebhookSubscriptions(accountId, options).then((request) => request(axios, basePath));
|
|
566
|
+
},
|
|
567
|
+
/**
|
|
568
|
+
* Submit a request for verification of a toll-free phone number.
|
|
569
|
+
* @summary Request Toll-Free Verification
|
|
570
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
571
|
+
* @param {VerificationRequest} verificationRequest Request for verification of a toll-free phone number.
|
|
572
|
+
* @param {*} [options] Override http request option.
|
|
573
|
+
* @throws {RequiredError}
|
|
574
|
+
*/
|
|
575
|
+
requestTollFreeVerification(accountId: string, verificationRequest: VerificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
576
|
+
return localVarFp.requestTollFreeVerification(accountId, verificationRequest, options).then((request) => request(axios, basePath));
|
|
577
|
+
},
|
|
578
|
+
/**
|
|
579
|
+
* Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
|
|
580
|
+
* @summary Update Toll-Free Verification Request
|
|
581
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
582
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
583
|
+
* @param {TfvSubmissionWrapper} tfvSubmissionWrapper Update a request for verification of a toll-free phone number.
|
|
584
|
+
* @param {*} [options] Override http request option.
|
|
585
|
+
* @throws {RequiredError}
|
|
586
|
+
*/
|
|
587
|
+
updateTollFreeVerificationRequest(accountId: string, phoneNumber: string, tfvSubmissionWrapper: TfvSubmissionWrapper, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
588
|
+
return localVarFp.updateTollFreeVerificationRequest(accountId, phoneNumber, tfvSubmissionWrapper, options).then((request) => request(axios, basePath));
|
|
589
|
+
},
|
|
590
|
+
/**
|
|
591
|
+
* Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated).
|
|
592
|
+
* @summary Update Webhook Subscription
|
|
593
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
594
|
+
* @param {string} id Webhook subscription ID
|
|
595
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
596
|
+
* @param {*} [options] Override http request option.
|
|
597
|
+
* @throws {RequiredError}
|
|
598
|
+
*/
|
|
599
|
+
updateWebhookSubscription(accountId: string, id: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options?: RawAxiosRequestConfig): AxiosPromise<WebhookSubscription> {
|
|
600
|
+
return localVarFp.updateWebhookSubscription(accountId, id, webhookSubscriptionRequestSchema, options).then((request) => request(axios, basePath));
|
|
601
|
+
},
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* TollFreeVerificationApi - object-oriented interface
|
|
607
|
+
* @export
|
|
608
|
+
* @class TollFreeVerificationApi
|
|
609
|
+
* @extends {BaseAPI}
|
|
610
|
+
*/
|
|
611
|
+
export class TollFreeVerificationApi extends BaseAPI {
|
|
612
|
+
/**
|
|
613
|
+
* Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a `callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time.
|
|
614
|
+
* @summary Create Webhook Subscription
|
|
615
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
616
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
617
|
+
* @param {*} [options] Override http request option.
|
|
618
|
+
* @throws {RequiredError}
|
|
619
|
+
* @memberof TollFreeVerificationApi
|
|
620
|
+
*/
|
|
621
|
+
public createWebhookSubscription(accountId: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options?: RawAxiosRequestConfig) {
|
|
622
|
+
return TollFreeVerificationApiFp(this.configuration).createWebhookSubscription(accountId, webhookSubscriptionRequestSchema, options).then((request) => request(this.axios, this.basePath));
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Delete a webhook subscription by ID.
|
|
627
|
+
* @summary Delete Webhook Subscription
|
|
628
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
629
|
+
* @param {string} id Webhook subscription ID
|
|
630
|
+
* @param {*} [options] Override http request option.
|
|
631
|
+
* @throws {RequiredError}
|
|
632
|
+
* @memberof TollFreeVerificationApi
|
|
633
|
+
*/
|
|
634
|
+
public deleteWebhookSubscription(accountId: string, id: string, options?: RawAxiosRequestConfig) {
|
|
635
|
+
return TollFreeVerificationApiFp(this.configuration).deleteWebhookSubscription(accountId, id, options).then((request) => request(this.axios, this.basePath));
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available.
|
|
640
|
+
* @summary Get Toll-Free Verification Status
|
|
641
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
642
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
643
|
+
* @param {*} [options] Override http request option.
|
|
644
|
+
* @throws {RequiredError}
|
|
645
|
+
* @memberof TollFreeVerificationApi
|
|
646
|
+
*/
|
|
647
|
+
public getTollFreeVerificationStatus(accountId: string, phoneNumber: string, options?: RawAxiosRequestConfig) {
|
|
648
|
+
return TollFreeVerificationApiFp(this.configuration).getTollFreeVerificationStatus(accountId, phoneNumber, options).then((request) => request(this.axios, this.basePath));
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Lists valid toll-free use cases.
|
|
653
|
+
* @summary List Toll-Free Use Cases
|
|
654
|
+
* @param {*} [options] Override http request option.
|
|
655
|
+
* @throws {RequiredError}
|
|
656
|
+
* @memberof TollFreeVerificationApi
|
|
657
|
+
*/
|
|
658
|
+
public listTollFreeUseCases(options?: RawAxiosRequestConfig) {
|
|
659
|
+
return TollFreeVerificationApiFp(this.configuration).listTollFreeUseCases(options).then((request) => request(this.axios, this.basePath));
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null).
|
|
664
|
+
* @summary List Webhook Subscriptions
|
|
665
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
666
|
+
* @param {*} [options] Override http request option.
|
|
667
|
+
* @throws {RequiredError}
|
|
668
|
+
* @memberof TollFreeVerificationApi
|
|
669
|
+
*/
|
|
670
|
+
public listWebhookSubscriptions(accountId: string, options?: RawAxiosRequestConfig) {
|
|
671
|
+
return TollFreeVerificationApiFp(this.configuration).listWebhookSubscriptions(accountId, options).then((request) => request(this.axios, this.basePath));
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Submit a request for verification of a toll-free phone number.
|
|
676
|
+
* @summary Request Toll-Free Verification
|
|
677
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
678
|
+
* @param {VerificationRequest} verificationRequest Request for verification of a toll-free phone number.
|
|
679
|
+
* @param {*} [options] Override http request option.
|
|
680
|
+
* @throws {RequiredError}
|
|
681
|
+
* @memberof TollFreeVerificationApi
|
|
682
|
+
*/
|
|
683
|
+
public requestTollFreeVerification(accountId: string, verificationRequest: VerificationRequest, options?: RawAxiosRequestConfig) {
|
|
684
|
+
return TollFreeVerificationApiFp(this.configuration).requestTollFreeVerification(accountId, verificationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
|
|
689
|
+
* @summary Update Toll-Free Verification Request
|
|
690
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
691
|
+
* @param {string} phoneNumber Valid Toll-Free telephone number in E.164 format.
|
|
692
|
+
* @param {TfvSubmissionWrapper} tfvSubmissionWrapper Update a request for verification of a toll-free phone number.
|
|
693
|
+
* @param {*} [options] Override http request option.
|
|
694
|
+
* @throws {RequiredError}
|
|
695
|
+
* @memberof TollFreeVerificationApi
|
|
696
|
+
*/
|
|
697
|
+
public updateTollFreeVerificationRequest(accountId: string, phoneNumber: string, tfvSubmissionWrapper: TfvSubmissionWrapper, options?: RawAxiosRequestConfig) {
|
|
698
|
+
return TollFreeVerificationApiFp(this.configuration).updateTollFreeVerificationRequest(accountId, phoneNumber, tfvSubmissionWrapper, options).then((request) => request(this.axios, this.basePath));
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated).
|
|
703
|
+
* @summary Update Webhook Subscription
|
|
704
|
+
* @param {string} accountId Your Bandwidth Account ID.
|
|
705
|
+
* @param {string} id Webhook subscription ID
|
|
706
|
+
* @param {WebhookSubscriptionRequestSchema} webhookSubscriptionRequestSchema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to.
|
|
707
|
+
* @param {*} [options] Override http request option.
|
|
708
|
+
* @throws {RequiredError}
|
|
709
|
+
* @memberof TollFreeVerificationApi
|
|
710
|
+
*/
|
|
711
|
+
public updateWebhookSubscription(accountId: string, id: string, webhookSubscriptionRequestSchema: WebhookSubscriptionRequestSchema, options?: RawAxiosRequestConfig) {
|
|
712
|
+
return TollFreeVerificationApiFp(this.configuration).updateWebhookSubscription(accountId, id, webhookSubscriptionRequestSchema, options).then((request) => request(this.axios, this.basePath));
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|