@libgot/whatsapp-bridge-sdk 1.0.35 → 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 +7 -1
- package/dist/models/index.js +7 -1
- package/dist/models/send-template-data-dto.d.ts +2 -1
- package/dist/models/send-template-data-dto.js +1 -0
- package/dist/models/send-text-dto.d.ts +2 -1
- package/dist/models/send-text-dto.js +1 -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 +6 -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 +7 -1
- package/models/send-template-data-dto.ts +2 -1
- package/models/send-text-dto.ts +2 -1
- 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 +7 -0
- package/package.json +1 -1
package/dist/apis/auth-api.js
CHANGED
|
@@ -35,15 +35,10 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
35
35
|
return {
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @param {AuthDto} body
|
|
39
38
|
* @param {*} [options] Override http request option.
|
|
40
39
|
* @throws {RequiredError}
|
|
41
40
|
*/
|
|
42
|
-
login: (
|
|
43
|
-
// verify required parameter 'body' is not null or undefined
|
|
44
|
-
if (body === null || body === undefined) {
|
|
45
|
-
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling login.');
|
|
46
|
-
}
|
|
41
|
+
login: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
47
42
|
const localVarPath = `/api/auth/login`;
|
|
48
43
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
44
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -54,7 +49,6 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
54
49
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
55
50
|
const localVarHeaderParameter = {};
|
|
56
51
|
const localVarQueryParameter = {};
|
|
57
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
58
52
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
59
53
|
for (const key in localVarQueryParameter) {
|
|
60
54
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -65,8 +59,6 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
65
59
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
66
60
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
67
61
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
68
|
-
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
69
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
70
62
|
return {
|
|
71
63
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
72
64
|
options: localVarRequestOptions,
|
|
@@ -113,10 +105,15 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
113
105
|
}),
|
|
114
106
|
/**
|
|
115
107
|
*
|
|
108
|
+
* @param {string} authorization Custom header
|
|
116
109
|
* @param {*} [options] Override http request option.
|
|
117
110
|
* @throws {RequiredError}
|
|
118
111
|
*/
|
|
119
|
-
refreshToken: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
112
|
+
refreshToken: (authorization_1, ...args_1) => __awaiter(this, [authorization_1, ...args_1], void 0, function* (authorization, options = {}) {
|
|
113
|
+
// verify required parameter 'authorization' is not null or undefined
|
|
114
|
+
if (authorization === null || authorization === undefined) {
|
|
115
|
+
throw new base_1.RequiredError('authorization', 'Required parameter authorization was null or undefined when calling refreshToken.');
|
|
116
|
+
}
|
|
120
117
|
const localVarPath = `/api/auth/refresh`;
|
|
121
118
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
122
119
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -135,6 +132,9 @@ const AuthApiAxiosParamCreator = function (configuration) {
|
|
|
135
132
|
: yield configuration.accessToken;
|
|
136
133
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
137
134
|
}
|
|
135
|
+
if (authorization !== undefined && authorization !== null) {
|
|
136
|
+
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
137
|
+
}
|
|
138
138
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
139
139
|
for (const key in localVarQueryParameter) {
|
|
140
140
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -161,13 +161,12 @@ const AuthApiFp = function (configuration) {
|
|
|
161
161
|
return {
|
|
162
162
|
/**
|
|
163
163
|
*
|
|
164
|
-
* @param {AuthDto} body
|
|
165
164
|
* @param {*} [options] Override http request option.
|
|
166
165
|
* @throws {RequiredError}
|
|
167
166
|
*/
|
|
168
|
-
login(
|
|
167
|
+
login(options) {
|
|
169
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).login(
|
|
169
|
+
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).login(options);
|
|
171
170
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
172
171
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
173
172
|
return axios.request(axiosRequestArgs);
|
|
@@ -190,12 +189,13 @@ const AuthApiFp = function (configuration) {
|
|
|
190
189
|
},
|
|
191
190
|
/**
|
|
192
191
|
*
|
|
192
|
+
* @param {string} authorization Custom header
|
|
193
193
|
* @param {*} [options] Override http request option.
|
|
194
194
|
* @throws {RequiredError}
|
|
195
195
|
*/
|
|
196
|
-
refreshToken(options) {
|
|
196
|
+
refreshToken(authorization, options) {
|
|
197
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
-
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).refreshToken(options);
|
|
198
|
+
const localVarAxiosArgs = yield (0, exports.AuthApiAxiosParamCreator)(configuration).refreshToken(authorization, options);
|
|
199
199
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
200
200
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
201
201
|
return axios.request(axiosRequestArgs);
|
|
@@ -213,13 +213,12 @@ const AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
213
213
|
return {
|
|
214
214
|
/**
|
|
215
215
|
*
|
|
216
|
-
* @param {AuthDto} body
|
|
217
216
|
* @param {*} [options] Override http request option.
|
|
218
217
|
* @throws {RequiredError}
|
|
219
218
|
*/
|
|
220
|
-
login(
|
|
219
|
+
login(options) {
|
|
221
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
-
return (0, exports.AuthApiFp)(configuration).login(
|
|
221
|
+
return (0, exports.AuthApiFp)(configuration).login(options).then((request) => request(axios, basePath));
|
|
223
222
|
});
|
|
224
223
|
},
|
|
225
224
|
/**
|
|
@@ -234,12 +233,13 @@ const AuthApiFactory = function (configuration, basePath, axios) {
|
|
|
234
233
|
},
|
|
235
234
|
/**
|
|
236
235
|
*
|
|
236
|
+
* @param {string} authorization Custom header
|
|
237
237
|
* @param {*} [options] Override http request option.
|
|
238
238
|
* @throws {RequiredError}
|
|
239
239
|
*/
|
|
240
|
-
refreshToken(options) {
|
|
240
|
+
refreshToken(authorization, options) {
|
|
241
241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
-
return (0, exports.AuthApiFp)(configuration).refreshToken(options).then((request) => request(axios, basePath));
|
|
242
|
+
return (0, exports.AuthApiFp)(configuration).refreshToken(authorization, options).then((request) => request(axios, basePath));
|
|
243
243
|
});
|
|
244
244
|
},
|
|
245
245
|
};
|
|
@@ -254,14 +254,13 @@ exports.AuthApiFactory = AuthApiFactory;
|
|
|
254
254
|
class AuthApi extends base_1.BaseAPI {
|
|
255
255
|
/**
|
|
256
256
|
*
|
|
257
|
-
* @param {AuthDto} body
|
|
258
257
|
* @param {*} [options] Override http request option.
|
|
259
258
|
* @throws {RequiredError}
|
|
260
259
|
* @memberof AuthApi
|
|
261
260
|
*/
|
|
262
|
-
login(
|
|
261
|
+
login(options) {
|
|
263
262
|
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
-
return (0, exports.AuthApiFp)(this.configuration).login(
|
|
263
|
+
return (0, exports.AuthApiFp)(this.configuration).login(options).then((request) => request(this.axios, this.basePath));
|
|
265
264
|
});
|
|
266
265
|
}
|
|
267
266
|
/**
|
|
@@ -277,13 +276,14 @@ class AuthApi extends base_1.BaseAPI {
|
|
|
277
276
|
}
|
|
278
277
|
/**
|
|
279
278
|
*
|
|
279
|
+
* @param {string} authorization Custom header
|
|
280
280
|
* @param {*} [options] Override http request option.
|
|
281
281
|
* @throws {RequiredError}
|
|
282
282
|
* @memberof AuthApi
|
|
283
283
|
*/
|
|
284
|
-
refreshToken(options) {
|
|
284
|
+
refreshToken(authorization, options) {
|
|
285
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
return (0, exports.AuthApiFp)(this.configuration).refreshToken(options).then((request) => request(this.axios, this.basePath));
|
|
286
|
+
return (0, exports.AuthApiFp)(this.configuration).refreshToken(authorization, options).then((request) => request(this.axios, this.basePath));
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whatsapp-bridge Node Api
|
|
3
|
+
* The whatsapp-bridge API description
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { CellphoneValidationDto } from '../models';
|
|
16
|
+
/**
|
|
17
|
+
* CellphoneApi - axios parameter creator
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const CellphoneApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {CellphoneValidationDto} body
|
|
24
|
+
* @param {string} authorization Custom header
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
*/
|
|
28
|
+
validate: (body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* CellphoneApi - functional programming interface
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const CellphoneApiFp: (configuration?: Configuration) => {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {CellphoneValidationDto} body
|
|
38
|
+
* @param {string} authorization Custom header
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* CellphoneApi - factory interface
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export declare const CellphoneApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param {CellphoneValidationDto} body
|
|
52
|
+
* @param {string} authorization Custom header
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* CellphoneApi - object-oriented interface
|
|
60
|
+
* @export
|
|
61
|
+
* @class CellphoneApi
|
|
62
|
+
* @extends {BaseAPI}
|
|
63
|
+
*/
|
|
64
|
+
export declare class CellphoneApi extends BaseAPI {
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param {CellphoneValidationDto} body
|
|
68
|
+
* @param {string} authorization Custom header
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof CellphoneApi
|
|
72
|
+
*/
|
|
73
|
+
validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.CellphoneApi = exports.CellphoneApiFactory = exports.CellphoneApiFp = exports.CellphoneApiAxiosParamCreator = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const base_1 = require("../base");
|
|
30
|
+
/**
|
|
31
|
+
* CellphoneApi - axios parameter creator
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
const CellphoneApiAxiosParamCreator = function (configuration) {
|
|
35
|
+
return {
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {CellphoneValidationDto} body
|
|
39
|
+
* @param {string} authorization Custom header
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
validate: (body_1, authorization_1, ...args_1) => __awaiter(this, [body_1, authorization_1, ...args_1], void 0, function* (body, authorization, options = {}) {
|
|
44
|
+
// verify required parameter 'body' is not null or undefined
|
|
45
|
+
if (body === null || body === undefined) {
|
|
46
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling validate.');
|
|
47
|
+
}
|
|
48
|
+
// verify required parameter 'authorization' is not null or undefined
|
|
49
|
+
if (authorization === null || authorization === undefined) {
|
|
50
|
+
throw new base_1.RequiredError('authorization', 'Required parameter authorization was null or undefined when calling validate.');
|
|
51
|
+
}
|
|
52
|
+
const localVarPath = `/api/cellphone/validate`;
|
|
53
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
55
|
+
let baseOptions;
|
|
56
|
+
if (configuration) {
|
|
57
|
+
baseOptions = configuration.baseOptions;
|
|
58
|
+
}
|
|
59
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
60
|
+
const localVarHeaderParameter = {};
|
|
61
|
+
const localVarQueryParameter = {};
|
|
62
|
+
// authentication access-token required
|
|
63
|
+
// http bearer authentication required
|
|
64
|
+
if (configuration && configuration.accessToken) {
|
|
65
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
66
|
+
? yield configuration.accessToken()
|
|
67
|
+
: yield configuration.accessToken;
|
|
68
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
69
|
+
}
|
|
70
|
+
if (authorization !== undefined && authorization !== null) {
|
|
71
|
+
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
72
|
+
}
|
|
73
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
74
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
75
|
+
for (const key in localVarQueryParameter) {
|
|
76
|
+
query.set(key, localVarQueryParameter[key]);
|
|
77
|
+
}
|
|
78
|
+
for (const key in options.params) {
|
|
79
|
+
query.set(key, options.params[key]);
|
|
80
|
+
}
|
|
81
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
82
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
83
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
84
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
85
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
86
|
+
return {
|
|
87
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
88
|
+
options: localVarRequestOptions,
|
|
89
|
+
};
|
|
90
|
+
}),
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
exports.CellphoneApiAxiosParamCreator = CellphoneApiAxiosParamCreator;
|
|
94
|
+
/**
|
|
95
|
+
* CellphoneApi - functional programming interface
|
|
96
|
+
* @export
|
|
97
|
+
*/
|
|
98
|
+
const CellphoneApiFp = function (configuration) {
|
|
99
|
+
return {
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @param {CellphoneValidationDto} body
|
|
103
|
+
* @param {string} authorization Custom header
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
validate(body, authorization, options) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const localVarAxiosArgs = yield (0, exports.CellphoneApiAxiosParamCreator)(configuration).validate(body, authorization, options);
|
|
110
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
111
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
112
|
+
return axios.request(axiosRequestArgs);
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
exports.CellphoneApiFp = CellphoneApiFp;
|
|
119
|
+
/**
|
|
120
|
+
* CellphoneApi - factory interface
|
|
121
|
+
* @export
|
|
122
|
+
*/
|
|
123
|
+
const CellphoneApiFactory = function (configuration, basePath, axios) {
|
|
124
|
+
return {
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @param {CellphoneValidationDto} body
|
|
128
|
+
* @param {string} authorization Custom header
|
|
129
|
+
* @param {*} [options] Override http request option.
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
*/
|
|
132
|
+
validate(body, authorization, options) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
return (0, exports.CellphoneApiFp)(configuration).validate(body, authorization, options).then((request) => request(axios, basePath));
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
exports.CellphoneApiFactory = CellphoneApiFactory;
|
|
140
|
+
/**
|
|
141
|
+
* CellphoneApi - object-oriented interface
|
|
142
|
+
* @export
|
|
143
|
+
* @class CellphoneApi
|
|
144
|
+
* @extends {BaseAPI}
|
|
145
|
+
*/
|
|
146
|
+
class CellphoneApi extends base_1.BaseAPI {
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @param {CellphoneValidationDto} body
|
|
150
|
+
* @param {string} authorization Custom header
|
|
151
|
+
* @param {*} [options] Override http request option.
|
|
152
|
+
* @throws {RequiredError}
|
|
153
|
+
* @memberof CellphoneApi
|
|
154
|
+
*/
|
|
155
|
+
validate(body, authorization, options) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return (0, exports.CellphoneApiFp)(this.configuration).validate(body, authorization, options).then((request) => request(this.axios, this.basePath));
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.CellphoneApi = CellphoneApi;
|
package/dist/apis/chats-api.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { AssignToMeDto } from '../models';
|
|
16
|
+
import { AssignmentTypeDto } from '../models';
|
|
16
17
|
import { MarkChatUnreadDto } from '../models';
|
|
17
18
|
import { PaginationChatResponseDto } from '../models';
|
|
18
19
|
import { WhatsappChatResponseDTO } from '../models';
|
|
@@ -29,6 +30,15 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
29
30
|
* @throws {RequiredError}
|
|
30
31
|
*/
|
|
31
32
|
assignToMe: (body: AssignToMeDto, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param {AssignmentTypeDto} body
|
|
36
|
+
* @param {string} cellphone
|
|
37
|
+
* @param {number} id
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
assignmentType: (body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
42
|
/**
|
|
33
43
|
*
|
|
34
44
|
* @param {number} id
|
|
@@ -46,10 +56,12 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
46
56
|
* @param {number} [currentPage]
|
|
47
57
|
* @param {number} [userId]
|
|
48
58
|
* @param {boolean} [externallyInitiated]
|
|
59
|
+
* @param {number} [id]
|
|
60
|
+
* @param {string} [code]
|
|
49
61
|
* @param {*} [options] Override http request option.
|
|
50
62
|
* @throws {RequiredError}
|
|
51
63
|
*/
|
|
52
|
-
getChats: (branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
64
|
+
getChats: (branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, code?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
53
65
|
/**
|
|
54
66
|
*
|
|
55
67
|
* @param {MarkChatUnreadDto} body
|
|
@@ -72,6 +84,15 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
72
84
|
* @throws {RequiredError}
|
|
73
85
|
*/
|
|
74
86
|
assignToMe(body: AssignToMeDto, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @param {AssignmentTypeDto} body
|
|
90
|
+
* @param {string} cellphone
|
|
91
|
+
* @param {number} id
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
*/
|
|
95
|
+
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
|
|
75
96
|
/**
|
|
76
97
|
*
|
|
77
98
|
* @param {number} id
|
|
@@ -89,10 +110,12 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
89
110
|
* @param {number} [currentPage]
|
|
90
111
|
* @param {number} [userId]
|
|
91
112
|
* @param {boolean} [externallyInitiated]
|
|
113
|
+
* @param {number} [id]
|
|
114
|
+
* @param {string} [code]
|
|
92
115
|
* @param {*} [options] Override http request option.
|
|
93
116
|
* @throws {RequiredError}
|
|
94
117
|
*/
|
|
95
|
-
getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
|
|
118
|
+
getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, code?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
|
|
96
119
|
/**
|
|
97
120
|
*
|
|
98
121
|
* @param {MarkChatUnreadDto} body
|
|
@@ -115,6 +138,15 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
115
138
|
* @throws {RequiredError}
|
|
116
139
|
*/
|
|
117
140
|
assignToMe(body: AssignToMeDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @param {AssignmentTypeDto} body
|
|
144
|
+
* @param {string} cellphone
|
|
145
|
+
* @param {number} id
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
118
150
|
/**
|
|
119
151
|
*
|
|
120
152
|
* @param {number} id
|
|
@@ -132,10 +164,12 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
132
164
|
* @param {number} [currentPage]
|
|
133
165
|
* @param {number} [userId]
|
|
134
166
|
* @param {boolean} [externallyInitiated]
|
|
167
|
+
* @param {number} [id]
|
|
168
|
+
* @param {string} [code]
|
|
135
169
|
* @param {*} [options] Override http request option.
|
|
136
170
|
* @throws {RequiredError}
|
|
137
171
|
*/
|
|
138
|
-
getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
|
|
172
|
+
getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, code?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
|
|
139
173
|
/**
|
|
140
174
|
*
|
|
141
175
|
* @param {MarkChatUnreadDto} body
|
|
@@ -161,6 +195,16 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
161
195
|
* @memberof ChatsApi
|
|
162
196
|
*/
|
|
163
197
|
assignToMe(body: AssignToMeDto, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @param {AssignmentTypeDto} body
|
|
201
|
+
* @param {string} cellphone
|
|
202
|
+
* @param {number} id
|
|
203
|
+
* @param {*} [options] Override http request option.
|
|
204
|
+
* @throws {RequiredError}
|
|
205
|
+
* @memberof ChatsApi
|
|
206
|
+
*/
|
|
207
|
+
assignmentType(body: AssignmentTypeDto, cellphone: string, id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
|
|
164
208
|
/**
|
|
165
209
|
*
|
|
166
210
|
* @param {number} id
|
|
@@ -179,11 +223,13 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
179
223
|
* @param {number} [currentPage]
|
|
180
224
|
* @param {number} [userId]
|
|
181
225
|
* @param {boolean} [externallyInitiated]
|
|
226
|
+
* @param {number} [id]
|
|
227
|
+
* @param {string} [code]
|
|
182
228
|
* @param {*} [options] Override http request option.
|
|
183
229
|
* @throws {RequiredError}
|
|
184
230
|
* @memberof ChatsApi
|
|
185
231
|
*/
|
|
186
|
-
getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
|
|
232
|
+
getChats(branchId: number, q?: string, unassigned?: boolean, unread?: boolean, rowsPerPage?: number, currentPage?: number, userId?: number, externallyInitiated?: boolean, id?: number, code?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
|
|
187
233
|
/**
|
|
188
234
|
*
|
|
189
235
|
* @param {MarkChatUnreadDto} body
|