Skip to content

Commit c797813

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-7666 Update SDK Based on Recent Spec Changes (#69)
* Generate SDK with OpenAPI Generator Version * model unit tests * smoke test * unit test update * pv smoke test updates --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent 5b8eaea commit c797813

File tree

54 files changed

+2382
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2382
-66
lines changed

.openapi-generator/FILES

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ api/conferences-api.ts
66
api/media-api.ts
77
api/messages-api.ts
88
api/mfaapi.ts
9+
api/multi-channel-api.ts
910
api/phone-number-lookup-api.ts
1011
api/recordings-api.ts
1112
api/statistics-api.ts
@@ -33,6 +34,7 @@ models/call-transcription-track-enum.ts
3334
models/call-transcription.ts
3435
models/callback-method-enum.ts
3536
models/callback-type-enum.ts
37+
models/card-width-enum.ts
3638
models/code-request.ts
3739
models/conference-completed-callback.ts
3840
models/conference-created-callback.ts
@@ -49,16 +51,19 @@ models/create-call-response.ts
4951
models/create-call.ts
5052
models/create-lookup-response.ts
5153
models/create-message-request-error.ts
54+
models/create-multi-channel-message-response.ts
5255
models/deferred-result.ts
5356
models/disconnect-callback.ts
5457
models/diversion.ts
5558
models/dtmf-callback.ts
59+
models/error-object.ts
5660
models/failure-webhook.ts
5761
models/field-error.ts
5862
models/file-format-enum.ts
5963
models/gather-callback.ts
6064
models/index.ts
6165
models/initiate-callback.ts
66+
models/link.ts
6267
models/links-object.ts
6368
models/list-message-direction-enum.ts
6469
models/list-message-item.ts
@@ -84,19 +89,46 @@ models/messaging-request-error.ts
8489
models/mfa-forbidden-request-error.ts
8590
models/mfa-request-error.ts
8691
models/mfa-unauthorized-request-error.ts
92+
models/mms-message-content.ts
8793
models/model-error.ts
94+
models/multi-channel-action-calendar-event.ts
95+
models/multi-channel-action.ts
96+
models/multi-channel-callback-data.ts
97+
models/multi-channel-channel-list-object-content.ts
98+
models/multi-channel-channel-list-object.ts
99+
models/multi-channel-message-callback-data.ts
100+
models/multi-channel-message-channel-enum.ts
101+
models/multi-channel-message-data.ts
102+
models/multi-channel-message-direction-enum.ts
103+
models/multi-channel-message-request.ts
104+
models/multi-channel-status-enum.ts
88105
models/opt-in-workflow.ts
89106
models/page-info.ts
90107
models/priority-enum.ts
108+
models/rbm-action-base.ts
109+
models/rbm-action-dial.ts
110+
models/rbm-action-open-url.ts
111+
models/rbm-action-type-enum.ts
112+
models/rbm-action-view-location.ts
113+
models/rbm-card-content-media.ts
114+
models/rbm-card-content.ts
115+
models/rbm-media-height-enum.ts
116+
models/rbm-message-carousel-card.ts
117+
models/rbm-message-content-file.ts
118+
models/rbm-message-content-rich-card.ts
119+
models/rbm-message-content-text.ts
120+
models/rbm-message-media.ts
121+
models/rbm-standalone-card.ts
91122
models/recording-available-callback.ts
92123
models/recording-complete-callback.ts
93124
models/recording-state-enum.ts
94125
models/recording-transcription-metadata.ts
95126
models/recording-transcriptions.ts
96127
models/redirect-callback.ts
97128
models/redirect-method-enum.ts
129+
models/sms-message-content.ts
130+
models/standalone-card-orientation-enum.ts
98131
models/stir-shaken.ts
99-
models/tag.ts
100132
models/telephone-number.ts
101133
models/tfv-basic-authentication.ts
102134
models/tfv-callback-status-enum.ts
@@ -105,6 +137,7 @@ models/tfv-status-enum.ts
105137
models/tfv-status.ts
106138
models/tfv-submission-info.ts
107139
models/tfv-submission-wrapper.ts
140+
models/thumbnail-alignment-enum.ts
108141
models/tn-lookup-request-error.ts
109142
models/transcribe-recording.ts
110143
models/transcription-available-callback.ts

api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export * from './api/conferences-api';
1919
export * from './api/mfaapi';
2020
export * from './api/media-api';
2121
export * from './api/messages-api';
22+
export * from './api/multi-channel-api';
2223
export * from './api/phone-number-lookup-api';
2324
export * from './api/recordings-api';
2425
export * from './api/statistics-api';

api/multi-channel-api.ts

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
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: [email protected]
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 { CreateMessageRequestError } from '../models';
26+
// @ts-ignore
27+
import type { CreateMultiChannelMessageResponse } from '../models';
28+
// @ts-ignore
29+
import type { MessagingRequestError } from '../models';
30+
// @ts-ignore
31+
import type { MultiChannelMessageRequest } from '../models';
32+
/**
33+
* MultiChannelApi - axios parameter creator
34+
* @export
35+
*/
36+
export const MultiChannelApiAxiosParamCreator = function (configuration?: Configuration) {
37+
return {
38+
/**
39+
* Endpoint for sending Multi-Channel messages.
40+
* @summary Create Multi-Channel Message
41+
* @param {string} accountId Your Bandwidth Account ID.
42+
* @param {MultiChannelMessageRequest} multiChannelMessageRequest
43+
* @param {*} [options] Override http request option.
44+
* @throws {RequiredError}
45+
*/
46+
createMultiChannelMessage: async (accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
47+
// verify required parameter 'accountId' is not null or undefined
48+
assertParamExists('createMultiChannelMessage', 'accountId', accountId)
49+
// verify required parameter 'multiChannelMessageRequest' is not null or undefined
50+
assertParamExists('createMultiChannelMessage', 'multiChannelMessageRequest', multiChannelMessageRequest)
51+
const localVarPath = `/users/{accountId}/messages/multiChannel`
52+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
53+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
54+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
55+
let baseOptions;
56+
if (configuration) {
57+
baseOptions = configuration.baseOptions;
58+
}
59+
60+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
61+
const localVarHeaderParameter = {} as any;
62+
const localVarQueryParameter = {} as any;
63+
64+
// authentication Basic required
65+
// http basic authentication required
66+
setBasicAuthToObject(localVarRequestOptions, configuration)
67+
68+
69+
70+
localVarHeaderParameter['Content-Type'] = 'application/json';
71+
72+
setSearchParams(localVarUrlObj, localVarQueryParameter);
73+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
74+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
75+
localVarRequestOptions.data = serializeDataIfNeeded(multiChannelMessageRequest, localVarRequestOptions, configuration)
76+
77+
return {
78+
url: toPathString(localVarUrlObj),
79+
options: localVarRequestOptions,
80+
};
81+
},
82+
}
83+
};
84+
85+
/**
86+
* MultiChannelApi - functional programming interface
87+
* @export
88+
*/
89+
export const MultiChannelApiFp = function(configuration?: Configuration) {
90+
const localVarAxiosParamCreator = MultiChannelApiAxiosParamCreator(configuration)
91+
return {
92+
/**
93+
* Endpoint for sending Multi-Channel messages.
94+
* @summary Create Multi-Channel Message
95+
* @param {string} accountId Your Bandwidth Account ID.
96+
* @param {MultiChannelMessageRequest} multiChannelMessageRequest
97+
* @param {*} [options] Override http request option.
98+
* @throws {RequiredError}
99+
*/
100+
async createMultiChannelMessage(accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateMultiChannelMessageResponse>> {
101+
const localVarAxiosArgs = await localVarAxiosParamCreator.createMultiChannelMessage(accountId, multiChannelMessageRequest, options);
102+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
103+
const localVarOperationServerBasePath = operationServerMap['MultiChannelApi.createMultiChannelMessage']?.[localVarOperationServerIndex]?.url;
104+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
105+
},
106+
}
107+
};
108+
109+
/**
110+
* MultiChannelApi - factory interface
111+
* @export
112+
*/
113+
export const MultiChannelApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
114+
const localVarFp = MultiChannelApiFp(configuration)
115+
return {
116+
/**
117+
* Endpoint for sending Multi-Channel messages.
118+
* @summary Create Multi-Channel Message
119+
* @param {string} accountId Your Bandwidth Account ID.
120+
* @param {MultiChannelMessageRequest} multiChannelMessageRequest
121+
* @param {*} [options] Override http request option.
122+
* @throws {RequiredError}
123+
*/
124+
createMultiChannelMessage(accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateMultiChannelMessageResponse> {
125+
return localVarFp.createMultiChannelMessage(accountId, multiChannelMessageRequest, options).then((request) => request(axios, basePath));
126+
},
127+
};
128+
};
129+
130+
/**
131+
* MultiChannelApi - object-oriented interface
132+
* @export
133+
* @class MultiChannelApi
134+
* @extends {BaseAPI}
135+
*/
136+
export class MultiChannelApi extends BaseAPI {
137+
/**
138+
* Endpoint for sending Multi-Channel messages.
139+
* @summary Create Multi-Channel Message
140+
* @param {string} accountId Your Bandwidth Account ID.
141+
* @param {MultiChannelMessageRequest} multiChannelMessageRequest
142+
* @param {*} [options] Override http request option.
143+
* @throws {RequiredError}
144+
* @memberof MultiChannelApi
145+
*/
146+
public createMultiChannelMessage(accountId: string, multiChannelMessageRequest: MultiChannelMessageRequest, options?: RawAxiosRequestConfig) {
147+
return MultiChannelApiFp(this.configuration).createMultiChannelMessage(accountId, multiChannelMessageRequest, options).then((request) => request(this.axios, this.basePath));
148+
}
149+
}
150+

0 commit comments

Comments
 (0)