bandwidth-sdk 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/.github/workflows/deploy.yml +7 -1
  2. package/.openapi-generator/VERSION +1 -1
  3. package/api/calls-api.ts +5 -5
  4. package/api/conferences-api.ts +9 -9
  5. package/api/media-api.ts +10 -13
  6. package/api/messages-api.ts +2 -2
  7. package/api/mfaapi.ts +3 -3
  8. package/api/phone-number-lookup-api.ts +2 -2
  9. package/api/recordings-api.ts +10 -10
  10. package/api/statistics-api.ts +1 -1
  11. package/api/transcriptions-api.ts +3 -3
  12. package/bandwidth.yml +0 -2
  13. package/configuration.ts +7 -1
  14. package/coverage/clover.xml +121 -120
  15. package/coverage/coverage-final.json +11 -11
  16. package/coverage/lcov-report/index.html +18 -18
  17. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +13 -13
  18. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +21 -21
  19. package/coverage/lcov-report/node-sdk/api/index.html +21 -21
  20. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +23 -32
  21. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +7 -7
  22. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +9 -9
  23. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +7 -7
  24. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +22 -22
  25. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +5 -5
  26. package/coverage/lcov-report/node-sdk/api/transcriptions-api.ts.html +9 -9
  27. package/coverage/lcov-report/node-sdk/api.ts.html +1 -1
  28. package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
  29. package/coverage/lcov-report/node-sdk/common.ts.html +1 -1
  30. package/coverage/lcov-report/node-sdk/configuration.ts.html +23 -5
  31. package/coverage/lcov-report/node-sdk/index.html +5 -5
  32. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +1 -1
  33. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +1 -1
  34. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +1 -1
  35. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +1 -1
  36. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +12 -9
  37. package/coverage/lcov-report/node-sdk/models/bxml/index.html +10 -10
  38. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
  39. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +1 -1
  40. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
  41. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
  42. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
  43. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +1 -1
  44. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
  45. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
  46. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +1 -1
  47. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
  48. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
  54. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
  55. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
  56. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
  57. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
  58. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +1 -1
  59. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +1 -1
  60. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
  61. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
  62. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
  63. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
  64. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
  65. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
  66. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +1 -1
  67. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
  68. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
  69. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +1 -1
  70. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +1 -1
  71. package/coverage/lcov-report/node-sdk/models/call-transcription-detected-language-enum.ts.html +1 -1
  72. package/coverage/lcov-report/node-sdk/models/call-transcription-track-enum.ts.html +1 -1
  73. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +1 -1
  74. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +1 -1
  75. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +1 -1
  76. package/coverage/lcov-report/node-sdk/models/index.html +1 -1
  77. package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
  78. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +1 -1
  79. package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +1 -1
  80. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +1 -1
  81. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +1 -1
  82. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +1 -1
  83. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +1 -1
  84. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +1 -1
  85. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +1 -1
  86. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +1 -1
  87. package/coverage/lcov.info +312 -306
  88. package/custom_templates/configuration.mustache +105 -0
  89. package/custom_templates/tsconfig.mustache +1 -2
  90. package/dist/api/calls-api.d.ts +5 -5
  91. package/dist/api/conferences-api.d.ts +9 -9
  92. package/dist/api/media-api.d.ts +4 -4
  93. package/dist/api/media-api.js +1 -1
  94. package/dist/api/messages-api.d.ts +2 -2
  95. package/dist/api/mfaapi.d.ts +3 -3
  96. package/dist/api/phone-number-lookup-api.d.ts +2 -2
  97. package/dist/api/recordings-api.d.ts +10 -10
  98. package/dist/api/statistics-api.d.ts +1 -1
  99. package/dist/api/transcriptions-api.d.ts +3 -3
  100. package/dist/configuration.js +13 -1
  101. package/dist/models/bxml/Verb.d.ts +2 -2
  102. package/dist/models/bxml/Verb.js +5 -2
  103. package/dist/models/message-failed-callback-message.d.ts +1 -1
  104. package/dist/models/message-sending-callback-message.d.ts +1 -1
  105. package/models/bxml/Verb.ts +5 -4
  106. package/models/message-failed-callback-message.ts +1 -1
  107. package/models/message-sending-callback-message.ts +1 -1
  108. package/openapi-config.yml +1 -0
  109. package/openapitools.json +1 -1
  110. package/package.json +1 -1
  111. package/tests/smoke/media-api.test.ts +15 -5
@@ -0,0 +1,105 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ {{>licenseInfo}}
4
+
5
+ export interface ConfigurationParameters {
6
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
7
+ username?: string;
8
+ password?: string;
9
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
10
+ basePath?: string;
11
+ serverIndex?: number;
12
+ baseOptions?: any;
13
+ formDataCtor?: new () => any;
14
+ }
15
+
16
+ export class Configuration {
17
+ /**
18
+ * parameter for apiKey security
19
+ * @param name security name
20
+ * @memberof Configuration
21
+ */
22
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
23
+ /**
24
+ * parameter for basic security
25
+ *
26
+ * @type {string}
27
+ * @memberof Configuration
28
+ */
29
+ username?: string;
30
+ /**
31
+ * parameter for basic security
32
+ *
33
+ * @type {string}
34
+ * @memberof Configuration
35
+ */
36
+ password?: string;
37
+ /**
38
+ * parameter for oauth2 security
39
+ * @param name security name
40
+ * @param scopes oauth2 scope
41
+ * @memberof Configuration
42
+ */
43
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
44
+ /**
45
+ * override base path
46
+ *
47
+ * @type {string}
48
+ * @memberof Configuration
49
+ */
50
+ basePath?: string;
51
+ /**
52
+ * override server index
53
+ *
54
+ * @type {number}
55
+ * @memberof Configuration
56
+ */
57
+ serverIndex?: number;
58
+ /**
59
+ * base options for axios calls
60
+ *
61
+ * @type {any}
62
+ * @memberof Configuration
63
+ */
64
+ baseOptions?: any;
65
+ /**
66
+ * The FormData constructor that will be used to create multipart form data
67
+ * requests. You can inject this here so that execution environments that
68
+ * do not support the FormData class can still run the generated client.
69
+ *
70
+ * @type {new () => FormData}
71
+ */
72
+ formDataCtor?: new () => any;
73
+
74
+ constructor(param: ConfigurationParameters = {}) {
75
+ this.apiKey = param.apiKey;
76
+ this.username = param.username;
77
+ this.password = param.password;
78
+ this.accessToken = param.accessToken;
79
+ this.basePath = param.basePath;
80
+ this.serverIndex = param.serverIndex;
81
+ this.baseOptions = {
82
+ ...param.baseOptions,
83
+ headers: {
84
+ ...param.baseOptions?.headers,
85
+ 'User-Agent': "OpenAPI-Generator{{#npmVersion}}/{{npmVersion}}{{/npmVersion}}/typescript-axios"
86
+ }
87
+ };
88
+ this.formDataCtor = param.formDataCtor;
89
+ }
90
+
91
+ /**
92
+ * Check if the given MIME is a JSON MIME.
93
+ * JSON MIME examples:
94
+ * application/json
95
+ * application/json; charset=UTF8
96
+ * APPLICATION/JSON
97
+ * application/vnd.company+json
98
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
99
+ * @return True if the given MIME is JSON, false otherwise.
100
+ */
101
+ public isJsonMime(mime: string): boolean {
102
+ const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
103
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
104
+ }
105
+ }
@@ -23,6 +23,5 @@
23
23
  "dist",
24
24
  "tests",
25
25
  "node_modules"
26
- ],
27
- "include": ["global.d.ts"]
26
+ ]
28
27
  }
@@ -147,7 +147,7 @@ export declare const CallsApiFactory: (configuration?: Configuration, basePath?:
147
147
  * @param {*} [options] Override http request option.
148
148
  * @throws {RequiredError}
149
149
  */
150
- createCall(accountId: string, createCall: CreateCall, options?: any): AxiosPromise<CreateCallResponse>;
150
+ createCall(accountId: string, createCall: CreateCall, options?: RawAxiosRequestConfig): AxiosPromise<CreateCallResponse>;
151
151
  /**
152
152
  * Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: Call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an HTTP 404 response.
153
153
  * @summary Get Call State Information
@@ -156,7 +156,7 @@ export declare const CallsApiFactory: (configuration?: Configuration, basePath?:
156
156
  * @param {*} [options] Override http request option.
157
157
  * @throws {RequiredError}
158
158
  */
159
- getCallState(accountId: string, callId: string, options?: any): AxiosPromise<CallState>;
159
+ getCallState(accountId: string, callId: string, options?: RawAxiosRequestConfig): AxiosPromise<CallState>;
160
160
  /**
161
161
  * Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of calls in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of call records. Also, call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an empty array [] in response.
162
162
  * @summary Get Calls
@@ -171,7 +171,7 @@ export declare const CallsApiFactory: (configuration?: Configuration, basePath?:
171
171
  * @param {*} [options] Override http request option.
172
172
  * @throws {RequiredError}
173
173
  */
174
- listCalls(accountId: string, to?: string, from?: string, minStartTime?: string, maxStartTime?: string, disconnectCause?: string, pageSize?: number, pageToken?: string, options?: any): AxiosPromise<Array<CallState>>;
174
+ listCalls(accountId: string, to?: string, from?: string, minStartTime?: string, maxStartTime?: string, disconnectCause?: string, pageSize?: number, pageToken?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<CallState>>;
175
175
  /**
176
176
  * Interrupts and redirects a call to a different URL that should return a BXML document.
177
177
  * @summary Update Call
@@ -181,7 +181,7 @@ export declare const CallsApiFactory: (configuration?: Configuration, basePath?:
181
181
  * @param {*} [options] Override http request option.
182
182
  * @throws {RequiredError}
183
183
  */
184
- updateCall(accountId: string, callId: string, updateCall: UpdateCall, options?: any): AxiosPromise<void>;
184
+ updateCall(accountId: string, callId: string, updateCall: UpdateCall, options?: RawAxiosRequestConfig): AxiosPromise<void>;
185
185
  /**
186
186
  * Interrupts and replaces an active call\'s BXML document.
187
187
  * @summary Update Call BXML
@@ -191,7 +191,7 @@ export declare const CallsApiFactory: (configuration?: Configuration, basePath?:
191
191
  * @param {*} [options] Override http request option.
192
192
  * @throws {RequiredError}
193
193
  */
194
- updateCallBxml(accountId: string, callId: string, body: string, options?: any): AxiosPromise<void>;
194
+ updateCallBxml(accountId: string, callId: string, body: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
195
195
  };
196
196
  /**
197
197
  * CallsApi - object-oriented interface
@@ -227,7 +227,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
227
227
  * @param {*} [options] Override http request option.
228
228
  * @throws {RequiredError}
229
229
  */
230
- downloadConferenceRecording(accountId: string, conferenceId: string, recordingId: string, options?: any): AxiosPromise<File>;
230
+ downloadConferenceRecording(accountId: string, conferenceId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<File>;
231
231
  /**
232
232
  * Returns information about the specified conference.
233
233
  * @summary Get Conference Information
@@ -236,7 +236,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
236
236
  * @param {*} [options] Override http request option.
237
237
  * @throws {RequiredError}
238
238
  */
239
- getConference(accountId: string, conferenceId: string, options?: any): AxiosPromise<Conference>;
239
+ getConference(accountId: string, conferenceId: string, options?: RawAxiosRequestConfig): AxiosPromise<Conference>;
240
240
  /**
241
241
  * Returns information about the specified conference member.
242
242
  * @summary Get Conference Member
@@ -246,7 +246,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
246
246
  * @param {*} [options] Override http request option.
247
247
  * @throws {RequiredError}
248
248
  */
249
- getConferenceMember(accountId: string, conferenceId: string, memberId: string, options?: any): AxiosPromise<ConferenceMember>;
249
+ getConferenceMember(accountId: string, conferenceId: string, memberId: string, options?: RawAxiosRequestConfig): AxiosPromise<ConferenceMember>;
250
250
  /**
251
251
  * Returns metadata for the specified recording.
252
252
  * @summary Get Conference Recording Information
@@ -256,7 +256,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
256
256
  * @param {*} [options] Override http request option.
257
257
  * @throws {RequiredError}
258
258
  */
259
- getConferenceRecording(accountId: string, conferenceId: string, recordingId: string, options?: any): AxiosPromise<ConferenceRecordingMetadata>;
259
+ getConferenceRecording(accountId: string, conferenceId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<ConferenceRecordingMetadata>;
260
260
  /**
261
261
  * Returns a (potentially empty) list of metadata for the recordings that took place during the specified conference.
262
262
  * @summary Get Conference Recordings
@@ -265,7 +265,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
265
265
  * @param {*} [options] Override http request option.
266
266
  * @throws {RequiredError}
267
267
  */
268
- listConferenceRecordings(accountId: string, conferenceId: string, options?: any): AxiosPromise<Array<ConferenceRecordingMetadata>>;
268
+ listConferenceRecordings(accountId: string, conferenceId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ConferenceRecordingMetadata>>;
269
269
  /**
270
270
  * Returns a max of 1000 conferences, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of conferences in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of conference records.
271
271
  * @summary Get Conferences
@@ -278,7 +278,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
278
278
  * @param {*} [options] Override http request option.
279
279
  * @throws {RequiredError}
280
280
  */
281
- listConferences(accountId: string, name?: string, minCreatedTime?: string, maxCreatedTime?: string, pageSize?: number, pageToken?: string, options?: any): AxiosPromise<Array<Conference>>;
281
+ listConferences(accountId: string, name?: string, minCreatedTime?: string, maxCreatedTime?: string, pageSize?: number, pageToken?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Conference>>;
282
282
  /**
283
283
  * Update the conference state.
284
284
  * @summary Update Conference
@@ -288,7 +288,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
288
288
  * @param {*} [options] Override http request option.
289
289
  * @throws {RequiredError}
290
290
  */
291
- updateConference(accountId: string, conferenceId: string, updateConference: UpdateConference, options?: any): AxiosPromise<void>;
291
+ updateConference(accountId: string, conferenceId: string, updateConference: UpdateConference, options?: RawAxiosRequestConfig): AxiosPromise<void>;
292
292
  /**
293
293
  * Update the conference BXML document.
294
294
  * @summary Update Conference BXML
@@ -298,7 +298,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
298
298
  * @param {*} [options] Override http request option.
299
299
  * @throws {RequiredError}
300
300
  */
301
- updateConferenceBxml(accountId: string, conferenceId: string, body: string, options?: any): AxiosPromise<void>;
301
+ updateConferenceBxml(accountId: string, conferenceId: string, body: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
302
302
  /**
303
303
  * Updates settings for a particular conference member.
304
304
  * @summary Update Conference Member
@@ -309,7 +309,7 @@ export declare const ConferencesApiFactory: (configuration?: Configuration, base
309
309
  * @param {*} [options] Override http request option.
310
310
  * @throws {RequiredError}
311
311
  */
312
- updateConferenceMember(accountId: string, conferenceId: string, memberId: string, updateConferenceMember: UpdateConferenceMember, options?: any): AxiosPromise<void>;
312
+ updateConferenceMember(accountId: string, conferenceId: string, memberId: string, updateConferenceMember: UpdateConferenceMember, options?: RawAxiosRequestConfig): AxiosPromise<void>;
313
313
  };
314
314
  /**
315
315
  * ConferencesApi - object-oriented interface
@@ -116,7 +116,7 @@ export declare const MediaApiFactory: (configuration?: Configuration, basePath?:
116
116
  * @param {*} [options] Override http request option.
117
117
  * @throws {RequiredError}
118
118
  */
119
- deleteMedia(accountId: string, mediaId: string, options?: any): AxiosPromise<void>;
119
+ deleteMedia(accountId: string, mediaId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
120
120
  /**
121
121
  * Downloads a media file you previously uploaded.
122
122
  * @summary Get Media
@@ -125,7 +125,7 @@ export declare const MediaApiFactory: (configuration?: Configuration, basePath?:
125
125
  * @param {*} [options] Override http request option.
126
126
  * @throws {RequiredError}
127
127
  */
128
- getMedia(accountId: string, mediaId: string, options?: any): AxiosPromise<File>;
128
+ getMedia(accountId: string, mediaId: string, options?: RawAxiosRequestConfig): AxiosPromise<File>;
129
129
  /**
130
130
  * Gets a list of your media files. No query parameters are supported.
131
131
  * @summary List Media
@@ -134,7 +134,7 @@ export declare const MediaApiFactory: (configuration?: Configuration, basePath?:
134
134
  * @param {*} [options] Override http request option.
135
135
  * @throws {RequiredError}
136
136
  */
137
- listMedia(accountId: string, continuationToken?: string, options?: any): AxiosPromise<Array<Media>>;
137
+ listMedia(accountId: string, continuationToken?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Media>>;
138
138
  /**
139
139
  * Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
140
140
  * @summary Upload Media
@@ -146,7 +146,7 @@ export declare const MediaApiFactory: (configuration?: Configuration, basePath?:
146
146
  * @param {*} [options] Override http request option.
147
147
  * @throws {RequiredError}
148
148
  */
149
- uploadMedia(accountId: string, mediaId: string, body: File, contentType?: string, cacheControl?: string, options?: any): AxiosPromise<void>;
149
+ uploadMedia(accountId: string, mediaId: string, body: File, contentType?: string, cacheControl?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
150
150
  };
151
151
  /**
152
152
  * MediaApi - object-oriented interface
@@ -269,13 +269,13 @@ var MediaApiAxiosParamCreator = function (configuration) {
269
269
  // authentication Basic required
270
270
  // http basic authentication required
271
271
  (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
272
+ localVarHeaderParameter['Content-Type'] = 'application/json';
272
273
  if (contentType != null) {
273
274
  localVarHeaderParameter['Content-Type'] = String(contentType);
274
275
  }
275
276
  if (cacheControl != null) {
276
277
  localVarHeaderParameter['Cache-Control'] = String(cacheControl);
277
278
  }
278
- localVarHeaderParameter['Content-Type'] = 'application/json';
279
279
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
280
280
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
281
281
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -107,7 +107,7 @@ export declare const MessagesApiFactory: (configuration?: Configuration, basePat
107
107
  * @param {*} [options] Override http request option.
108
108
  * @throws {RequiredError}
109
109
  */
110
- createMessage(accountId: string, messageRequest: MessageRequest, options?: any): AxiosPromise<Message>;
110
+ createMessage(accountId: string, messageRequest: MessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Message>;
111
111
  /**
112
112
  * Returns a list of messages based on query parameters.
113
113
  * @summary List Messages
@@ -130,7 +130,7 @@ export declare const MessagesApiFactory: (configuration?: Configuration, basePat
130
130
  * @param {*} [options] Override http request option.
131
131
  * @throws {RequiredError}
132
132
  */
133
- listMessages(accountId: string, messageId?: string, sourceTn?: string, destinationTn?: string, messageStatus?: MessageStatusEnum, messageDirection?: ListMessageDirectionEnum, carrierName?: string, messageType?: MessageTypeEnum, errorCode?: number, fromDateTime?: string, toDateTime?: string, campaignId?: string, sort?: string, pageToken?: string, limit?: number, limitTotalCount?: boolean, options?: any): AxiosPromise<MessagesList>;
133
+ listMessages(accountId: string, messageId?: string, sourceTn?: string, destinationTn?: string, messageStatus?: MessageStatusEnum, messageDirection?: ListMessageDirectionEnum, carrierName?: string, messageType?: MessageTypeEnum, errorCode?: number, fromDateTime?: string, toDateTime?: string, campaignId?: string, sort?: string, pageToken?: string, limit?: number, limitTotalCount?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<MessagesList>;
134
134
  };
135
135
  /**
136
136
  * MessagesApi - object-oriented interface
@@ -96,7 +96,7 @@ export declare const MFAApiFactory: (configuration?: Configuration, basePath?: s
96
96
  * @param {*} [options] Override http request option.
97
97
  * @throws {RequiredError}
98
98
  */
99
- generateMessagingCode(accountId: string, codeRequest: CodeRequest, options?: any): AxiosPromise<MessagingCodeResponse>;
99
+ generateMessagingCode(accountId: string, codeRequest: CodeRequest, options?: RawAxiosRequestConfig): AxiosPromise<MessagingCodeResponse>;
100
100
  /**
101
101
  * Send an MFA Code via a phone call.
102
102
  * @summary Voice Authentication Code
@@ -105,7 +105,7 @@ export declare const MFAApiFactory: (configuration?: Configuration, basePath?: s
105
105
  * @param {*} [options] Override http request option.
106
106
  * @throws {RequiredError}
107
107
  */
108
- generateVoiceCode(accountId: string, codeRequest: CodeRequest, options?: any): AxiosPromise<VoiceCodeResponse>;
108
+ generateVoiceCode(accountId: string, codeRequest: CodeRequest, options?: RawAxiosRequestConfig): AxiosPromise<VoiceCodeResponse>;
109
109
  /**
110
110
  * Verify a previously sent MFA code.
111
111
  * @summary Verify Authentication Code
@@ -114,7 +114,7 @@ export declare const MFAApiFactory: (configuration?: Configuration, basePath?: s
114
114
  * @param {*} [options] Override http request option.
115
115
  * @throws {RequiredError}
116
116
  */
117
- verifyCode(accountId: string, verifyCodeRequest: VerifyCodeRequest, options?: any): AxiosPromise<VerifyCodeResponse>;
117
+ verifyCode(accountId: string, verifyCodeRequest: VerifyCodeRequest, options?: RawAxiosRequestConfig): AxiosPromise<VerifyCodeResponse>;
118
118
  };
119
119
  /**
120
120
  * MFAApi - object-oriented interface
@@ -76,7 +76,7 @@ export declare const PhoneNumberLookupApiFactory: (configuration?: Configuration
76
76
  * @param {*} [options] Override http request option.
77
77
  * @throws {RequiredError}
78
78
  */
79
- createLookup(accountId: string, lookupRequest: LookupRequest, options?: any): AxiosPromise<CreateLookupResponse>;
79
+ createLookup(accountId: string, lookupRequest: LookupRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateLookupResponse>;
80
80
  /**
81
81
  * Get an existing Phone Number Lookup Request.
82
82
  * @summary Get Lookup Request Status
@@ -85,7 +85,7 @@ export declare const PhoneNumberLookupApiFactory: (configuration?: Configuration
85
85
  * @param {*} [options] Override http request option.
86
86
  * @throws {RequiredError}
87
87
  */
88
- getLookupStatus(accountId: string, requestId: string, options?: any): AxiosPromise<LookupStatus>;
88
+ getLookupStatus(accountId: string, requestId: string, options?: RawAxiosRequestConfig): AxiosPromise<LookupStatus>;
89
89
  };
90
90
  /**
91
91
  * PhoneNumberLookupApi - object-oriented interface
@@ -246,7 +246,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
246
246
  * @param {*} [options] Override http request option.
247
247
  * @throws {RequiredError}
248
248
  */
249
- deleteRecording(accountId: string, callId: string, recordingId: string, options?: any): AxiosPromise<void>;
249
+ deleteRecording(accountId: string, callId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
250
250
  /**
251
251
  * Deletes the specified recording\'s media.
252
252
  * @summary Delete Recording Media
@@ -256,7 +256,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
256
256
  * @param {*} [options] Override http request option.
257
257
  * @throws {RequiredError}
258
258
  */
259
- deleteRecordingMedia(accountId: string, callId: string, recordingId: string, options?: any): AxiosPromise<void>;
259
+ deleteRecordingMedia(accountId: string, callId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
260
260
  /**
261
261
  * Deletes the specified recording\'s transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.
262
262
  * @summary Delete Transcription
@@ -266,7 +266,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
266
266
  * @param {*} [options] Override http request option.
267
267
  * @throws {RequiredError}
268
268
  */
269
- deleteRecordingTranscription(accountId: string, callId: string, recordingId: string, options?: any): AxiosPromise<void>;
269
+ deleteRecordingTranscription(accountId: string, callId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
270
270
  /**
271
271
  * Downloads the specified recording.
272
272
  * @summary Download Recording
@@ -276,7 +276,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
276
276
  * @param {*} [options] Override http request option.
277
277
  * @throws {RequiredError}
278
278
  */
279
- downloadCallRecording(accountId: string, callId: string, recordingId: string, options?: any): AxiosPromise<File>;
279
+ downloadCallRecording(accountId: string, callId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<File>;
280
280
  /**
281
281
  * Returns metadata for the specified recording.
282
282
  * @summary Get Call Recording
@@ -286,7 +286,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
286
286
  * @param {*} [options] Override http request option.
287
287
  * @throws {RequiredError}
288
288
  */
289
- getCallRecording(accountId: string, callId: string, recordingId: string, options?: any): AxiosPromise<CallRecordingMetadata>;
289
+ getCallRecording(accountId: string, callId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<CallRecordingMetadata>;
290
290
  /**
291
291
  * Downloads the specified transcription. If the recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [`<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.
292
292
  * @summary Get Transcription
@@ -296,7 +296,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
296
296
  * @param {*} [options] Override http request option.
297
297
  * @throws {RequiredError}
298
298
  */
299
- getRecordingTranscription(accountId: string, callId: string, recordingId: string, options?: any): AxiosPromise<RecordingTranscriptions>;
299
+ getRecordingTranscription(accountId: string, callId: string, recordingId: string, options?: RawAxiosRequestConfig): AxiosPromise<RecordingTranscriptions>;
300
300
  /**
301
301
  * Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria.
302
302
  * @summary Get Call Recordings
@@ -308,7 +308,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
308
308
  * @param {*} [options] Override http request option.
309
309
  * @throws {RequiredError}
310
310
  */
311
- listAccountCallRecordings(accountId: string, to?: string, from?: string, minStartTime?: string, maxStartTime?: string, options?: any): AxiosPromise<Array<CallRecordingMetadata>>;
311
+ listAccountCallRecordings(accountId: string, to?: string, from?: string, minStartTime?: string, maxStartTime?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<CallRecordingMetadata>>;
312
312
  /**
313
313
  * Returns a (potentially empty) list of metadata for the recordings that took place during the specified call.
314
314
  * @summary List Call Recordings
@@ -317,7 +317,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
317
317
  * @param {*} [options] Override http request option.
318
318
  * @throws {RequiredError}
319
319
  */
320
- listCallRecordings(accountId: string, callId: string, options?: any): AxiosPromise<Array<CallRecordingMetadata>>;
320
+ listCallRecordings(accountId: string, callId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<CallRecordingMetadata>>;
321
321
  /**
322
322
  * Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours.
323
323
  * @summary Create Transcription Request
@@ -328,7 +328,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
328
328
  * @param {*} [options] Override http request option.
329
329
  * @throws {RequiredError}
330
330
  */
331
- transcribeCallRecording(accountId: string, callId: string, recordingId: string, transcribeRecording: TranscribeRecording, options?: any): AxiosPromise<void>;
331
+ transcribeCallRecording(accountId: string, callId: string, recordingId: string, transcribeRecording: TranscribeRecording, options?: RawAxiosRequestConfig): AxiosPromise<void>;
332
332
  /**
333
333
  * Pause or resume a recording on an active phone call.
334
334
  * @summary Update Recording
@@ -338,7 +338,7 @@ export declare const RecordingsApiFactory: (configuration?: Configuration, baseP
338
338
  * @param {*} [options] Override http request option.
339
339
  * @throws {RequiredError}
340
340
  */
341
- updateCallRecordingState(accountId: string, callId: string, updateCallRecording: UpdateCallRecording, options?: any): AxiosPromise<void>;
341
+ updateCallRecordingState(accountId: string, callId: string, updateCallRecording: UpdateCallRecording, options?: RawAxiosRequestConfig): AxiosPromise<void>;
342
342
  };
343
343
  /**
344
344
  * RecordingsApi - object-oriented interface
@@ -53,7 +53,7 @@ export declare const StatisticsApiFactory: (configuration?: Configuration, baseP
53
53
  * @param {*} [options] Override http request option.
54
54
  * @throws {RequiredError}
55
55
  */
56
- getStatistics(accountId: string, options?: any): AxiosPromise<AccountStatistics>;
56
+ getStatistics(accountId: string, options?: RawAxiosRequestConfig): AxiosPromise<AccountStatistics>;
57
57
  };
58
58
  /**
59
59
  * StatisticsApi - object-oriented interface
@@ -98,7 +98,7 @@ export declare const TranscriptionsApiFactory: (configuration?: Configuration, b
98
98
  * @param {*} [options] Override http request option.
99
99
  * @throws {RequiredError}
100
100
  */
101
- deleteRealTimeTranscription(accountId: string, callId: string, transcriptionId: string, options?: any): AxiosPromise<void>;
101
+ deleteRealTimeTranscription(accountId: string, callId: string, transcriptionId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
102
102
  /**
103
103
  * Retrieve the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription).
104
104
  * @summary Retrieve a specific transcription
@@ -108,7 +108,7 @@ export declare const TranscriptionsApiFactory: (configuration?: Configuration, b
108
108
  * @param {*} [options] Override http request option.
109
109
  * @throws {RequiredError}
110
110
  */
111
- getRealTimeTranscription(accountId: string, callId: string, transcriptionId: string, options?: any): AxiosPromise<CallTranscriptionResponse>;
111
+ getRealTimeTranscription(accountId: string, callId: string, transcriptionId: string, options?: RawAxiosRequestConfig): AxiosPromise<CallTranscriptionResponse>;
112
112
  /**
113
113
  * Enumerates the transcriptions created on this call via [startTranscription](/docs/voice/bxml/startTranscription).
114
114
  * @summary Enumerate transcriptions made with StartTranscription
@@ -117,7 +117,7 @@ export declare const TranscriptionsApiFactory: (configuration?: Configuration, b
117
117
  * @param {*} [options] Override http request option.
118
118
  * @throws {RequiredError}
119
119
  */
120
- listRealTimeTranscriptions(accountId: string, callId: string, options?: any): AxiosPromise<Array<CallTranscriptionMetadata>>;
120
+ listRealTimeTranscriptions(accountId: string, callId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<CallTranscriptionMetadata>>;
121
121
  };
122
122
  /**
123
123
  * TranscriptionsApi - object-oriented interface
@@ -12,18 +12,30 @@
12
12
  * https://openapi-generator.tech
13
13
  * Do not edit the class manually.
14
14
  */
15
+ var __assign = (this && this.__assign) || function () {
16
+ __assign = Object.assign || function(t) {
17
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
18
+ s = arguments[i];
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
+ t[p] = s[p];
21
+ }
22
+ return t;
23
+ };
24
+ return __assign.apply(this, arguments);
25
+ };
15
26
  Object.defineProperty(exports, "__esModule", { value: true });
16
27
  exports.Configuration = void 0;
17
28
  var Configuration = /** @class */ (function () {
18
29
  function Configuration(param) {
19
30
  if (param === void 0) { param = {}; }
31
+ var _a;
20
32
  this.apiKey = param.apiKey;
21
33
  this.username = param.username;
22
34
  this.password = param.password;
23
35
  this.accessToken = param.accessToken;
24
36
  this.basePath = param.basePath;
25
37
  this.serverIndex = param.serverIndex;
26
- this.baseOptions = param.baseOptions;
38
+ this.baseOptions = __assign(__assign({}, param.baseOptions), { headers: __assign(__assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': "OpenAPI-Generator/3.2.0/typescript-axios" }) });
27
39
  this.formDataCtor = param.formDataCtor;
28
40
  }
29
41
  /**
@@ -6,8 +6,8 @@ import { XMLBuilder, XMLWriterOptions } from 'xmlbuilder2/lib/interfaces';
6
6
  */
7
7
  export declare class Verb {
8
8
  name: string;
9
- content: string;
10
- attributes: object;
9
+ content: string | undefined;
10
+ attributes: object | undefined;
11
11
  /**
12
12
  * Creates an instance of Verb
13
13
  * @param name [string] Name of the XML element
@@ -16,14 +16,17 @@ var Verb = /** @class */ (function () {
16
16
  */
17
17
  function Verb(name, content, attributes) {
18
18
  this.name = name;
19
- this.attributes = attributes;
20
19
  this.content = content;
20
+ this.attributes = attributes;
21
21
  }
22
22
  /**
23
23
  * Generate an XML element for the verb
24
24
  */
25
25
  Verb.prototype.generateXml = function () {
26
- var xml = (0, xmlbuilder2_1.create)().ele(this.name, this.attributes).txt(this.content);
26
+ var xml = (0, xmlbuilder2_1.create)().ele(this.name, this.attributes);
27
+ if (this.content) {
28
+ xml.txt(this.content);
29
+ }
27
30
  return xml;
28
31
  };
29
32
  /**
@@ -88,5 +88,5 @@ export interface MessageFailedCallbackMessage {
88
88
  * @type {PriorityEnum}
89
89
  * @memberof MessageFailedCallbackMessage
90
90
  */
91
- 'priority': PriorityEnum;
91
+ 'priority'?: PriorityEnum;
92
92
  }
@@ -88,5 +88,5 @@ export interface MessageSendingCallbackMessage {
88
88
  * @type {PriorityEnum}
89
89
  * @memberof MessageSendingCallbackMessage
90
90
  */
91
- 'priority': PriorityEnum;
91
+ 'priority'?: PriorityEnum;
92
92
  }
@@ -8,8 +8,8 @@ import { XMLBuilder, XMLWriterOptions } from 'xmlbuilder2/lib/interfaces';
8
8
  */
9
9
  export class Verb {
10
10
  name: string;
11
- content: string;
12
- attributes: object;
11
+ content: string | undefined;
12
+ attributes: object | undefined;
13
13
 
14
14
  /**
15
15
  * Creates an instance of Verb
@@ -19,15 +19,16 @@ export class Verb {
19
19
  */
20
20
  constructor(name: string, content?: string, attributes?: object) {
21
21
  this.name = name;
22
- this.attributes = attributes;
23
22
  this.content = content;
23
+ this.attributes = attributes;
24
24
  }
25
25
 
26
26
  /**
27
27
  * Generate an XML element for the verb
28
28
  */
29
29
  generateXml(): XMLBuilder {
30
- const xml = create().ele(this.name, this.attributes).txt(this.content);
30
+ const xml = create().ele(this.name, this.attributes);
31
+ if (this.content) { xml.txt(this.content); }
31
32
  return xml;
32
33
  }
33
34
 
@@ -97,7 +97,7 @@ export interface MessageFailedCallbackMessage {
97
97
  * @type {PriorityEnum}
98
98
  * @memberof MessageFailedCallbackMessage
99
99
  */
100
- 'priority': PriorityEnum;
100
+ 'priority'?: PriorityEnum;
101
101
  }
102
102
 
103
103
 
@@ -97,7 +97,7 @@ export interface MessageSendingCallbackMessage {
97
97
  * @type {PriorityEnum}
98
98
  * @memberof MessageSendingCallbackMessage
99
99
  */
100
- 'priority': PriorityEnum;
100
+ 'priority'?: PriorityEnum;
101
101
  }
102
102
 
103
103
 
@@ -1,4 +1,5 @@
1
1
  npmName: bandwidth-sdk
2
+ npmVersion: 1.0.0-dev
2
3
  withSeparateModelsAndApi: true
3
4
  modelPackage: models
4
5
  apiPackage: api
package/openapitools.json CHANGED
@@ -2,6 +2,6 @@
2
2
  "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
3
  "spaces": 2,
4
4
  "generator-cli": {
5
- "version": "7.6.0"
5
+ "version": "7.10.0"
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bandwidth-sdk",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "OpenAPI client for bandwidth-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {