@libgot/whatsapp-bridge-sdk 1.0.34 → 1.0.36-rc.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/README.md +2 -2
- package/api.ts +3 -0
- package/apis/auth-api.ts +26 -27
- package/apis/cellphone-api.ts +151 -0
- package/apis/chats-api.ts +116 -7
- package/apis/flows-api.ts +263 -0
- package/apis/sessions-api.ts +201 -0
- package/dist/api.d.ts +3 -0
- package/dist/api.js +3 -0
- package/dist/apis/auth-api.d.ts +12 -13
- package/dist/apis/auth-api.js +25 -25
- package/dist/apis/cellphone-api.d.ts +74 -0
- package/dist/apis/cellphone-api.js +161 -0
- package/dist/apis/chats-api.d.ts +50 -4
- package/dist/apis/chats-api.js +116 -7
- package/dist/apis/flows-api.d.ts +125 -0
- package/dist/apis/flows-api.js +283 -0
- package/dist/apis/sessions-api.d.ts +100 -0
- package/dist/apis/sessions-api.js +217 -0
- package/dist/models/apply-for-loan-response-dto.d.ts +19 -0
- package/dist/models/apply-for-loan-response-dto.js +15 -0
- package/dist/models/assignment-type-dto.d.ts +31 -0
- package/dist/models/assignment-type-dto.js +15 -0
- package/dist/models/cellphone-validation-dto.d.ts +24 -0
- package/dist/models/cellphone-validation-dto.js +15 -0
- package/dist/models/index.d.ts +8 -1
- package/dist/models/index.js +8 -1
- package/dist/models/send-template-data-dto.d.ts +18 -0
- package/dist/models/send-template-data-dto.js +14 -0
- package/dist/models/send-text-dto.d.ts +18 -0
- package/dist/models/send-text-dto.js +14 -0
- package/dist/models/session-response-data-dto.d.ts +25 -0
- package/dist/models/session-response-data-dto.js +15 -0
- package/dist/models/session-response-dto.d.ts +43 -0
- package/dist/models/session-response-dto.js +15 -0
- package/dist/models/sessions-response-data-dto.d.ts +25 -0
- package/dist/models/sessions-response-data-dto.js +15 -0
- package/dist/models/signature-data-dto.d.ts +19 -0
- package/dist/models/signature-data-dto.js +15 -0
- package/dist/models/whatsapp-chat-dto.d.ts +12 -0
- package/dist/models/whatsapp-message-dto.d.ts +6 -0
- package/dist/models/whatsapp-message-feedback.d.ts +43 -0
- package/dist/models/whatsapp-message-feedback.js +15 -0
- package/models/apply-for-loan-response-dto.ts +22 -0
- package/models/assignment-type-dto.ts +36 -0
- package/models/cellphone-validation-dto.ts +28 -0
- package/models/index.ts +8 -1
- package/models/send-template-data-dto.ts +21 -0
- package/models/send-text-dto.ts +21 -0
- package/models/session-response-data-dto.ts +29 -0
- package/models/session-response-dto.ts +50 -0
- package/models/sessions-response-data-dto.ts +29 -0
- package/models/signature-data-dto.ts +22 -0
- package/models/whatsapp-chat-dto.ts +14 -0
- package/models/whatsapp-message-dto.ts +7 -0
- package/models/whatsapp-message-feedback.ts +50 -0
- package/package.json +1 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
16
|
+
import { Configuration } from '../configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
20
|
+
import { ApplyForLoanResponseDto } from '../models';
|
|
21
|
+
import { SignatureDataDto } from '../models';
|
|
22
|
+
/**
|
|
23
|
+
* FlowsApi - axios parameter creator
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export const FlowsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
27
|
+
return {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param {SignatureDataDto} body
|
|
31
|
+
* @param {*} [options] Override http request option.
|
|
32
|
+
* @throws {RequiredError}
|
|
33
|
+
*/
|
|
34
|
+
applyForLoan: async (body: SignatureDataDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35
|
+
// verify required parameter 'body' is not null or undefined
|
|
36
|
+
if (body === null || body === undefined) {
|
|
37
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling applyForLoan.');
|
|
38
|
+
}
|
|
39
|
+
const localVarPath = `/api/flows/apply-for-loan`;
|
|
40
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
42
|
+
let baseOptions;
|
|
43
|
+
if (configuration) {
|
|
44
|
+
baseOptions = configuration.baseOptions;
|
|
45
|
+
}
|
|
46
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
47
|
+
const localVarHeaderParameter = {} as any;
|
|
48
|
+
const localVarQueryParameter = {} as any;
|
|
49
|
+
|
|
50
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
51
|
+
|
|
52
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
53
|
+
for (const key in localVarQueryParameter) {
|
|
54
|
+
query.set(key, localVarQueryParameter[key]);
|
|
55
|
+
}
|
|
56
|
+
for (const key in options.params) {
|
|
57
|
+
query.set(key, options.params[key]);
|
|
58
|
+
}
|
|
59
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
60
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
62
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
63
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
67
|
+
options: localVarRequestOptions,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
*/
|
|
75
|
+
flowsControllerHandleGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
76
|
+
const localVarPath = `/api/flows`;
|
|
77
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
78
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
79
|
+
let baseOptions;
|
|
80
|
+
if (configuration) {
|
|
81
|
+
baseOptions = configuration.baseOptions;
|
|
82
|
+
}
|
|
83
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
84
|
+
const localVarHeaderParameter = {} as any;
|
|
85
|
+
const localVarQueryParameter = {} as any;
|
|
86
|
+
|
|
87
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
88
|
+
for (const key in localVarQueryParameter) {
|
|
89
|
+
query.set(key, localVarQueryParameter[key]);
|
|
90
|
+
}
|
|
91
|
+
for (const key in options.params) {
|
|
92
|
+
query.set(key, options.params[key]);
|
|
93
|
+
}
|
|
94
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
95
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
96
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
100
|
+
options: localVarRequestOptions,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @param {number} leadId
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
*/
|
|
109
|
+
flowsControllerHandleGet2: async (leadId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
110
|
+
// verify required parameter 'leadId' is not null or undefined
|
|
111
|
+
if (leadId === null || leadId === undefined) {
|
|
112
|
+
throw new RequiredError('leadId','Required parameter leadId was null or undefined when calling flowsControllerHandleGet2.');
|
|
113
|
+
}
|
|
114
|
+
const localVarPath = `/api/flows/getOffer/{leadId}`
|
|
115
|
+
.replace(`{${"leadId"}}`, encodeURIComponent(String(leadId)));
|
|
116
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
117
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
118
|
+
let baseOptions;
|
|
119
|
+
if (configuration) {
|
|
120
|
+
baseOptions = configuration.baseOptions;
|
|
121
|
+
}
|
|
122
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
123
|
+
const localVarHeaderParameter = {} as any;
|
|
124
|
+
const localVarQueryParameter = {} as any;
|
|
125
|
+
|
|
126
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
127
|
+
for (const key in localVarQueryParameter) {
|
|
128
|
+
query.set(key, localVarQueryParameter[key]);
|
|
129
|
+
}
|
|
130
|
+
for (const key in options.params) {
|
|
131
|
+
query.set(key, options.params[key]);
|
|
132
|
+
}
|
|
133
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
134
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
135
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
139
|
+
options: localVarRequestOptions,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* FlowsApi - functional programming interface
|
|
147
|
+
* @export
|
|
148
|
+
*/
|
|
149
|
+
export const FlowsApiFp = function(configuration?: Configuration) {
|
|
150
|
+
return {
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @param {SignatureDataDto} body
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
async applyForLoan(body: SignatureDataDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApplyForLoanResponseDto>>> {
|
|
158
|
+
const localVarAxiosArgs = await FlowsApiAxiosParamCreator(configuration).applyForLoan(body, options);
|
|
159
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
160
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
161
|
+
return axios.request(axiosRequestArgs);
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* @param {*} [options] Override http request option.
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
*/
|
|
169
|
+
async flowsControllerHandleGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
170
|
+
const localVarAxiosArgs = await FlowsApiAxiosParamCreator(configuration).flowsControllerHandleGet(options);
|
|
171
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
172
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
173
|
+
return axios.request(axiosRequestArgs);
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
* @param {number} leadId
|
|
179
|
+
* @param {*} [options] Override http request option.
|
|
180
|
+
* @throws {RequiredError}
|
|
181
|
+
*/
|
|
182
|
+
async flowsControllerHandleGet2(leadId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
183
|
+
const localVarAxiosArgs = await FlowsApiAxiosParamCreator(configuration).flowsControllerHandleGet2(leadId, options);
|
|
184
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
185
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
186
|
+
return axios.request(axiosRequestArgs);
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* FlowsApi - factory interface
|
|
194
|
+
* @export
|
|
195
|
+
*/
|
|
196
|
+
export const FlowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
197
|
+
return {
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @param {SignatureDataDto} body
|
|
201
|
+
* @param {*} [options] Override http request option.
|
|
202
|
+
* @throws {RequiredError}
|
|
203
|
+
*/
|
|
204
|
+
async applyForLoan(body: SignatureDataDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ApplyForLoanResponseDto>> {
|
|
205
|
+
return FlowsApiFp(configuration).applyForLoan(body, options).then((request) => request(axios, basePath));
|
|
206
|
+
},
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
* @param {*} [options] Override http request option.
|
|
210
|
+
* @throws {RequiredError}
|
|
211
|
+
*/
|
|
212
|
+
async flowsControllerHandleGet(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
213
|
+
return FlowsApiFp(configuration).flowsControllerHandleGet(options).then((request) => request(axios, basePath));
|
|
214
|
+
},
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* @param {number} leadId
|
|
218
|
+
* @param {*} [options] Override http request option.
|
|
219
|
+
* @throws {RequiredError}
|
|
220
|
+
*/
|
|
221
|
+
async flowsControllerHandleGet2(leadId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
222
|
+
return FlowsApiFp(configuration).flowsControllerHandleGet2(leadId, options).then((request) => request(axios, basePath));
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* FlowsApi - object-oriented interface
|
|
229
|
+
* @export
|
|
230
|
+
* @class FlowsApi
|
|
231
|
+
* @extends {BaseAPI}
|
|
232
|
+
*/
|
|
233
|
+
export class FlowsApi extends BaseAPI {
|
|
234
|
+
/**
|
|
235
|
+
*
|
|
236
|
+
* @param {SignatureDataDto} body
|
|
237
|
+
* @param {*} [options] Override http request option.
|
|
238
|
+
* @throws {RequiredError}
|
|
239
|
+
* @memberof FlowsApi
|
|
240
|
+
*/
|
|
241
|
+
public async applyForLoan(body: SignatureDataDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ApplyForLoanResponseDto>> {
|
|
242
|
+
return FlowsApiFp(this.configuration).applyForLoan(body, options).then((request) => request(this.axios, this.basePath));
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
*
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
* @memberof FlowsApi
|
|
249
|
+
*/
|
|
250
|
+
public async flowsControllerHandleGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
251
|
+
return FlowsApiFp(this.configuration).flowsControllerHandleGet(options).then((request) => request(this.axios, this.basePath));
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @param {number} leadId
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
* @memberof FlowsApi
|
|
259
|
+
*/
|
|
260
|
+
public async flowsControllerHandleGet2(leadId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
261
|
+
return FlowsApiFp(this.configuration).flowsControllerHandleGet2(leadId, options).then((request) => request(this.axios, this.basePath));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
16
|
+
import { Configuration } from '../configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
20
|
+
import { SessionResponseDataDto } from '../models';
|
|
21
|
+
import { SessionsResponseDataDto } from '../models';
|
|
22
|
+
/**
|
|
23
|
+
* SessionsApi - axios parameter creator
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export const SessionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
27
|
+
return {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param {string} sessionUuid
|
|
31
|
+
* @param {*} [options] Override http request option.
|
|
32
|
+
* @throws {RequiredError}
|
|
33
|
+
*/
|
|
34
|
+
getSession: async (sessionUuid: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35
|
+
// verify required parameter 'sessionUuid' is not null or undefined
|
|
36
|
+
if (sessionUuid === null || sessionUuid === undefined) {
|
|
37
|
+
throw new RequiredError('sessionUuid','Required parameter sessionUuid was null or undefined when calling getSession.');
|
|
38
|
+
}
|
|
39
|
+
const localVarPath = `/api/sessions/{sessionUuid}`
|
|
40
|
+
.replace(`{${"sessionUuid"}}`, encodeURIComponent(String(sessionUuid)));
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
48
|
+
const localVarHeaderParameter = {} as any;
|
|
49
|
+
const localVarQueryParameter = {} as any;
|
|
50
|
+
|
|
51
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
52
|
+
for (const key in localVarQueryParameter) {
|
|
53
|
+
query.set(key, localVarQueryParameter[key]);
|
|
54
|
+
}
|
|
55
|
+
for (const key in options.params) {
|
|
56
|
+
query.set(key, options.params[key]);
|
|
57
|
+
}
|
|
58
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
59
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
60
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
64
|
+
options: localVarRequestOptions,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param {number} branchId
|
|
70
|
+
* @param {*} [options] Override http request option.
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
*/
|
|
73
|
+
getSessions: async (branchId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
74
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
75
|
+
if (branchId === null || branchId === undefined) {
|
|
76
|
+
throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getSessions.');
|
|
77
|
+
}
|
|
78
|
+
const localVarPath = `/api/sessions`;
|
|
79
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
80
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
81
|
+
let baseOptions;
|
|
82
|
+
if (configuration) {
|
|
83
|
+
baseOptions = configuration.baseOptions;
|
|
84
|
+
}
|
|
85
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
86
|
+
const localVarHeaderParameter = {} as any;
|
|
87
|
+
const localVarQueryParameter = {} as any;
|
|
88
|
+
|
|
89
|
+
if (branchId !== undefined) {
|
|
90
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
94
|
+
for (const key in localVarQueryParameter) {
|
|
95
|
+
query.set(key, localVarQueryParameter[key]);
|
|
96
|
+
}
|
|
97
|
+
for (const key in options.params) {
|
|
98
|
+
query.set(key, options.params[key]);
|
|
99
|
+
}
|
|
100
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
101
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
102
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
106
|
+
options: localVarRequestOptions,
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* SessionsApi - functional programming interface
|
|
114
|
+
* @export
|
|
115
|
+
*/
|
|
116
|
+
export const SessionsApiFp = function(configuration?: Configuration) {
|
|
117
|
+
return {
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @param {string} sessionUuid
|
|
121
|
+
* @param {*} [options] Override http request option.
|
|
122
|
+
* @throws {RequiredError}
|
|
123
|
+
*/
|
|
124
|
+
async getSession(sessionUuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionResponseDataDto>>> {
|
|
125
|
+
const localVarAxiosArgs = await SessionsApiAxiosParamCreator(configuration).getSession(sessionUuid, options);
|
|
126
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
127
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
128
|
+
return axios.request(axiosRequestArgs);
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @param {number} branchId
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
*/
|
|
137
|
+
async getSessions(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionsResponseDataDto>>> {
|
|
138
|
+
const localVarAxiosArgs = await SessionsApiAxiosParamCreator(configuration).getSessions(branchId, options);
|
|
139
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
140
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
141
|
+
return axios.request(axiosRequestArgs);
|
|
142
|
+
};
|
|
143
|
+
},
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* SessionsApi - factory interface
|
|
149
|
+
* @export
|
|
150
|
+
*/
|
|
151
|
+
export const SessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
152
|
+
return {
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @param {string} sessionUuid
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
async getSession(sessionUuid: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionResponseDataDto>> {
|
|
160
|
+
return SessionsApiFp(configuration).getSession(sessionUuid, options).then((request) => request(axios, basePath));
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @param {number} branchId
|
|
165
|
+
* @param {*} [options] Override http request option.
|
|
166
|
+
* @throws {RequiredError}
|
|
167
|
+
*/
|
|
168
|
+
async getSessions(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionsResponseDataDto>> {
|
|
169
|
+
return SessionsApiFp(configuration).getSessions(branchId, options).then((request) => request(axios, basePath));
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* SessionsApi - object-oriented interface
|
|
176
|
+
* @export
|
|
177
|
+
* @class SessionsApi
|
|
178
|
+
* @extends {BaseAPI}
|
|
179
|
+
*/
|
|
180
|
+
export class SessionsApi extends BaseAPI {
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @param {string} sessionUuid
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
* @memberof SessionsApi
|
|
187
|
+
*/
|
|
188
|
+
public async getSession(sessionUuid: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SessionResponseDataDto>> {
|
|
189
|
+
return SessionsApiFp(this.configuration).getSession(sessionUuid, options).then((request) => request(this.axios, this.basePath));
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
*
|
|
193
|
+
* @param {number} branchId
|
|
194
|
+
* @param {*} [options] Override http request option.
|
|
195
|
+
* @throws {RequiredError}
|
|
196
|
+
* @memberof SessionsApi
|
|
197
|
+
*/
|
|
198
|
+
public async getSessions(branchId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<SessionsResponseDataDto>> {
|
|
199
|
+
return SessionsApiFp(this.configuration).getSessions(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
200
|
+
}
|
|
201
|
+
}
|
package/dist/api.d.ts
CHANGED
|
@@ -10,9 +10,12 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
export * from './apis/auth-api';
|
|
13
|
+
export * from './apis/cellphone-api';
|
|
13
14
|
export * from './apis/chats-api';
|
|
14
15
|
export * from './apis/contacts-api';
|
|
15
16
|
export * from './apis/default-api';
|
|
17
|
+
export * from './apis/flows-api';
|
|
16
18
|
export * from './apis/healthchecks-api';
|
|
17
19
|
export * from './apis/messages-api';
|
|
20
|
+
export * from './apis/sessions-api';
|
|
18
21
|
export * from './apis/users-api';
|
package/dist/api.js
CHANGED
|
@@ -28,9 +28,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
28
28
|
* Do not edit the class manually.
|
|
29
29
|
*/
|
|
30
30
|
__exportStar(require("./apis/auth-api"), exports);
|
|
31
|
+
__exportStar(require("./apis/cellphone-api"), exports);
|
|
31
32
|
__exportStar(require("./apis/chats-api"), exports);
|
|
32
33
|
__exportStar(require("./apis/contacts-api"), exports);
|
|
33
34
|
__exportStar(require("./apis/default-api"), exports);
|
|
35
|
+
__exportStar(require("./apis/flows-api"), exports);
|
|
34
36
|
__exportStar(require("./apis/healthchecks-api"), exports);
|
|
35
37
|
__exportStar(require("./apis/messages-api"), exports);
|
|
38
|
+
__exportStar(require("./apis/sessions-api"), exports);
|
|
36
39
|
__exportStar(require("./apis/users-api"), exports);
|
package/dist/apis/auth-api.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { ApiResponseAuthDto } from '../models';
|
|
16
|
-
import { AuthDto } from '../models';
|
|
17
16
|
/**
|
|
18
17
|
* AuthApi - axios parameter creator
|
|
19
18
|
* @export
|
|
@@ -21,11 +20,10 @@ import { AuthDto } from '../models';
|
|
|
21
20
|
export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
21
|
/**
|
|
23
22
|
*
|
|
24
|
-
* @param {AuthDto} body
|
|
25
23
|
* @param {*} [options] Override http request option.
|
|
26
24
|
* @throws {RequiredError}
|
|
27
25
|
*/
|
|
28
|
-
login: (
|
|
26
|
+
login: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
27
|
/**
|
|
30
28
|
*
|
|
31
29
|
* @param {*} [options] Override http request option.
|
|
@@ -34,10 +32,11 @@ export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
34
32
|
logout: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
33
|
/**
|
|
36
34
|
*
|
|
35
|
+
* @param {string} authorization Custom header
|
|
37
36
|
* @param {*} [options] Override http request option.
|
|
38
37
|
* @throws {RequiredError}
|
|
39
38
|
*/
|
|
40
|
-
refreshToken: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
39
|
+
refreshToken: (authorization: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
41
40
|
};
|
|
42
41
|
/**
|
|
43
42
|
* AuthApi - functional programming interface
|
|
@@ -46,11 +45,10 @@ export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
46
45
|
export declare const AuthApiFp: (configuration?: Configuration) => {
|
|
47
46
|
/**
|
|
48
47
|
*
|
|
49
|
-
* @param {AuthDto} body
|
|
50
48
|
* @param {*} [options] Override http request option.
|
|
51
49
|
* @throws {RequiredError}
|
|
52
50
|
*/
|
|
53
|
-
login(
|
|
51
|
+
login(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApiResponseAuthDto>>>;
|
|
54
52
|
/**
|
|
55
53
|
*
|
|
56
54
|
* @param {*} [options] Override http request option.
|
|
@@ -59,10 +57,11 @@ export declare const AuthApiFp: (configuration?: Configuration) => {
|
|
|
59
57
|
logout(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
60
58
|
/**
|
|
61
59
|
*
|
|
60
|
+
* @param {string} authorization Custom header
|
|
62
61
|
* @param {*} [options] Override http request option.
|
|
63
62
|
* @throws {RequiredError}
|
|
64
63
|
*/
|
|
65
|
-
refreshToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApiResponseAuthDto>>>;
|
|
64
|
+
refreshToken(authorization: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApiResponseAuthDto>>>;
|
|
66
65
|
};
|
|
67
66
|
/**
|
|
68
67
|
* AuthApi - factory interface
|
|
@@ -71,11 +70,10 @@ export declare const AuthApiFp: (configuration?: Configuration) => {
|
|
|
71
70
|
export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
72
71
|
/**
|
|
73
72
|
*
|
|
74
|
-
* @param {AuthDto} body
|
|
75
73
|
* @param {*} [options] Override http request option.
|
|
76
74
|
* @throws {RequiredError}
|
|
77
75
|
*/
|
|
78
|
-
login(
|
|
76
|
+
login(options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
|
|
79
77
|
/**
|
|
80
78
|
*
|
|
81
79
|
* @param {*} [options] Override http request option.
|
|
@@ -84,10 +82,11 @@ export declare const AuthApiFactory: (configuration?: Configuration, basePath?:
|
|
|
84
82
|
logout(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
85
83
|
/**
|
|
86
84
|
*
|
|
85
|
+
* @param {string} authorization Custom header
|
|
87
86
|
* @param {*} [options] Override http request option.
|
|
88
87
|
* @throws {RequiredError}
|
|
89
88
|
*/
|
|
90
|
-
refreshToken(options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
|
|
89
|
+
refreshToken(authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
|
|
91
90
|
};
|
|
92
91
|
/**
|
|
93
92
|
* AuthApi - object-oriented interface
|
|
@@ -98,12 +97,11 @@ export declare const AuthApiFactory: (configuration?: Configuration, basePath?:
|
|
|
98
97
|
export declare class AuthApi extends BaseAPI {
|
|
99
98
|
/**
|
|
100
99
|
*
|
|
101
|
-
* @param {AuthDto} body
|
|
102
100
|
* @param {*} [options] Override http request option.
|
|
103
101
|
* @throws {RequiredError}
|
|
104
102
|
* @memberof AuthApi
|
|
105
103
|
*/
|
|
106
|
-
login(
|
|
104
|
+
login(options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
|
|
107
105
|
/**
|
|
108
106
|
*
|
|
109
107
|
* @param {*} [options] Override http request option.
|
|
@@ -113,9 +111,10 @@ export declare class AuthApi extends BaseAPI {
|
|
|
113
111
|
logout(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
114
112
|
/**
|
|
115
113
|
*
|
|
114
|
+
* @param {string} authorization Custom header
|
|
116
115
|
* @param {*} [options] Override http request option.
|
|
117
116
|
* @throws {RequiredError}
|
|
118
117
|
* @memberof AuthApi
|
|
119
118
|
*/
|
|
120
|
-
refreshToken(options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
|
|
119
|
+
refreshToken(authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
|
|
121
120
|
}
|