@libgot/whatsapp-bridge-sdk 1.0.31 → 1.0.33
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/.idea/modules.xml +8 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/whatsapp-bridge-sdk.iml +11 -0
- package/.swagger-codegen/VERSION +1 -0
- package/.swagger-codegen-ignore +23 -0
- package/README.md +2 -2
- package/apis/chats-api.ts +8 -40
- package/dist/apis/auth-api.js +147 -301
- package/dist/apis/chats-api.d.ts +5 -21
- package/dist/apis/chats-api.js +202 -386
- package/dist/apis/contacts-api.js +104 -216
- package/dist/apis/default-api.js +46 -136
- package/dist/apis/healthchecks-api.js +85 -197
- package/dist/apis/messages-api.js +198 -354
- package/dist/apis/users-api.js +227 -415
- package/dist/base.js +10 -31
- package/dist/configuration.js +3 -5
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/read-message-dto.d.ts +7 -2
- package/models/index.ts +1 -1
- package/models/read-message-dto.ts +8 -2
- package/package.json +1 -1
- package/tsconfig.json +1 -5
|
@@ -12,32 +12,6 @@
|
|
|
12
12
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
15
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
16
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
17
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -47,54 +21,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
47
21
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
22
|
});
|
|
49
23
|
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
25
|
exports.MessagesApi = exports.MessagesApiFactory = exports.MessagesApiFp = exports.MessagesApiAxiosParamCreator = void 0;
|
|
88
|
-
|
|
26
|
+
const axios_1 = require("axios");
|
|
89
27
|
// Some imports not used depending on template conditions
|
|
90
28
|
// @ts-ignore
|
|
91
|
-
|
|
29
|
+
const base_1 = require("../base");
|
|
92
30
|
/**
|
|
93
31
|
* MessagesApi - axios parameter creator
|
|
94
32
|
* @export
|
|
95
33
|
*/
|
|
96
|
-
|
|
97
|
-
var _this = this;
|
|
34
|
+
const MessagesApiAxiosParamCreator = function (configuration) {
|
|
98
35
|
return {
|
|
99
36
|
/**
|
|
100
37
|
*
|
|
@@ -103,195 +40,163 @@ var MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
103
40
|
* @param {*} [options] Override http request option.
|
|
104
41
|
* @throws {RequiredError}
|
|
105
42
|
*/
|
|
106
|
-
getMessages:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
43
|
+
getMessages: (branchId_1, chatId_1, ...args_1) => __awaiter(this, [branchId_1, chatId_1, ...args_1], void 0, function* (branchId, chatId, options = {}) {
|
|
44
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
45
|
+
if (branchId === null || branchId === undefined) {
|
|
46
|
+
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getMessages.');
|
|
110
47
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
147
|
-
return [2 /*return*/, {
|
|
148
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
149
|
-
options: localVarRequestOptions,
|
|
150
|
-
}];
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
},
|
|
48
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
49
|
+
if (chatId === null || chatId === undefined) {
|
|
50
|
+
throw new base_1.RequiredError('chatId', 'Required parameter chatId was null or undefined when calling getMessages.');
|
|
51
|
+
}
|
|
52
|
+
const localVarPath = `/api/messages`;
|
|
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: 'GET' }, baseOptions), options);
|
|
60
|
+
const localVarHeaderParameter = {};
|
|
61
|
+
const localVarQueryParameter = {};
|
|
62
|
+
if (branchId !== undefined) {
|
|
63
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
64
|
+
}
|
|
65
|
+
if (chatId !== undefined) {
|
|
66
|
+
localVarQueryParameter['chatId'] = chatId;
|
|
67
|
+
}
|
|
68
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
69
|
+
for (const key in localVarQueryParameter) {
|
|
70
|
+
query.set(key, localVarQueryParameter[key]);
|
|
71
|
+
}
|
|
72
|
+
for (const key in options.params) {
|
|
73
|
+
query.set(key, options.params[key]);
|
|
74
|
+
}
|
|
75
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
76
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
78
|
+
return {
|
|
79
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
80
|
+
options: localVarRequestOptions,
|
|
81
|
+
};
|
|
82
|
+
}),
|
|
154
83
|
/**
|
|
155
84
|
*
|
|
156
85
|
* @param {ReadMessageDto} body
|
|
157
86
|
* @param {*} [options] Override http request option.
|
|
158
87
|
* @throws {RequiredError}
|
|
159
88
|
*/
|
|
160
|
-
readMessage: function (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
89
|
+
readMessage: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
90
|
+
// verify required parameter 'body' is not null or undefined
|
|
91
|
+
if (body === null || body === undefined) {
|
|
92
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling readMessage.');
|
|
164
93
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
194
|
-
return [2 /*return*/, {
|
|
195
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
196
|
-
options: localVarRequestOptions,
|
|
197
|
-
}];
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
},
|
|
94
|
+
const localVarPath = `/api/messages/read`;
|
|
95
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
96
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
97
|
+
let baseOptions;
|
|
98
|
+
if (configuration) {
|
|
99
|
+
baseOptions = configuration.baseOptions;
|
|
100
|
+
}
|
|
101
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
102
|
+
const localVarHeaderParameter = {};
|
|
103
|
+
const localVarQueryParameter = {};
|
|
104
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
105
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
106
|
+
for (const key in localVarQueryParameter) {
|
|
107
|
+
query.set(key, localVarQueryParameter[key]);
|
|
108
|
+
}
|
|
109
|
+
for (const key in options.params) {
|
|
110
|
+
query.set(key, options.params[key]);
|
|
111
|
+
}
|
|
112
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
113
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
114
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
115
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
116
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
117
|
+
return {
|
|
118
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
119
|
+
options: localVarRequestOptions,
|
|
120
|
+
};
|
|
121
|
+
}),
|
|
201
122
|
/**
|
|
202
123
|
*
|
|
203
124
|
* @param {SendTemplateDataDto} body
|
|
204
125
|
* @param {*} [options] Override http request option.
|
|
205
126
|
* @throws {RequiredError}
|
|
206
127
|
*/
|
|
207
|
-
sendTemplateMessage: function (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
128
|
+
sendTemplateMessage: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
129
|
+
// verify required parameter 'body' is not null or undefined
|
|
130
|
+
if (body === null || body === undefined) {
|
|
131
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling sendTemplateMessage.');
|
|
211
132
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
241
|
-
return [2 /*return*/, {
|
|
242
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
243
|
-
options: localVarRequestOptions,
|
|
244
|
-
}];
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
},
|
|
133
|
+
const localVarPath = `/api/messages/send-template`;
|
|
134
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
135
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
136
|
+
let baseOptions;
|
|
137
|
+
if (configuration) {
|
|
138
|
+
baseOptions = configuration.baseOptions;
|
|
139
|
+
}
|
|
140
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
141
|
+
const localVarHeaderParameter = {};
|
|
142
|
+
const localVarQueryParameter = {};
|
|
143
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
144
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
145
|
+
for (const key in localVarQueryParameter) {
|
|
146
|
+
query.set(key, localVarQueryParameter[key]);
|
|
147
|
+
}
|
|
148
|
+
for (const key in options.params) {
|
|
149
|
+
query.set(key, options.params[key]);
|
|
150
|
+
}
|
|
151
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
152
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
153
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
154
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
155
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
156
|
+
return {
|
|
157
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
158
|
+
options: localVarRequestOptions,
|
|
159
|
+
};
|
|
160
|
+
}),
|
|
248
161
|
/**
|
|
249
162
|
*
|
|
250
163
|
* @param {SendTextDto} body
|
|
251
164
|
* @param {*} [options] Override http request option.
|
|
252
165
|
* @throws {RequiredError}
|
|
253
166
|
*/
|
|
254
|
-
sendTextMessage: function (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
167
|
+
sendTextMessage: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
168
|
+
// verify required parameter 'body' is not null or undefined
|
|
169
|
+
if (body === null || body === undefined) {
|
|
170
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling sendTextMessage.');
|
|
258
171
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
288
|
-
return [2 /*return*/, {
|
|
289
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
290
|
-
options: localVarRequestOptions,
|
|
291
|
-
}];
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
},
|
|
172
|
+
const localVarPath = `/api/messages/send-text`;
|
|
173
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
174
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
175
|
+
let baseOptions;
|
|
176
|
+
if (configuration) {
|
|
177
|
+
baseOptions = configuration.baseOptions;
|
|
178
|
+
}
|
|
179
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
180
|
+
const localVarHeaderParameter = {};
|
|
181
|
+
const localVarQueryParameter = {};
|
|
182
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
183
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
184
|
+
for (const key in localVarQueryParameter) {
|
|
185
|
+
query.set(key, localVarQueryParameter[key]);
|
|
186
|
+
}
|
|
187
|
+
for (const key in options.params) {
|
|
188
|
+
query.set(key, options.params[key]);
|
|
189
|
+
}
|
|
190
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
191
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
192
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
193
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
194
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
195
|
+
return {
|
|
196
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
197
|
+
options: localVarRequestOptions,
|
|
198
|
+
};
|
|
199
|
+
}),
|
|
295
200
|
};
|
|
296
201
|
};
|
|
297
202
|
exports.MessagesApiAxiosParamCreator = MessagesApiAxiosParamCreator;
|
|
@@ -299,7 +204,7 @@ exports.MessagesApiAxiosParamCreator = MessagesApiAxiosParamCreator;
|
|
|
299
204
|
* MessagesApi - functional programming interface
|
|
300
205
|
* @export
|
|
301
206
|
*/
|
|
302
|
-
|
|
207
|
+
const MessagesApiFp = function (configuration) {
|
|
303
208
|
return {
|
|
304
209
|
/**
|
|
305
210
|
*
|
|
@@ -308,22 +213,13 @@ var MessagesApiFp = function (configuration) {
|
|
|
308
213
|
* @param {*} [options] Override http request option.
|
|
309
214
|
* @throws {RequiredError}
|
|
310
215
|
*/
|
|
311
|
-
getMessages
|
|
312
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
|
|
314
|
-
return
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
localVarAxiosArgs = _a.sent();
|
|
319
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
320
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
321
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
322
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
323
|
-
return axios.request(axiosRequestArgs);
|
|
324
|
-
}];
|
|
325
|
-
}
|
|
326
|
-
});
|
|
216
|
+
getMessages(branchId, chatId, options) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).getMessages(branchId, chatId, options);
|
|
219
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
220
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
221
|
+
return axios.request(axiosRequestArgs);
|
|
222
|
+
};
|
|
327
223
|
});
|
|
328
224
|
},
|
|
329
225
|
/**
|
|
@@ -332,22 +228,13 @@ var MessagesApiFp = function (configuration) {
|
|
|
332
228
|
* @param {*} [options] Override http request option.
|
|
333
229
|
* @throws {RequiredError}
|
|
334
230
|
*/
|
|
335
|
-
readMessage
|
|
336
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
337
|
-
|
|
338
|
-
return
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
localVarAxiosArgs = _a.sent();
|
|
343
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
344
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
345
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
346
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
347
|
-
return axios.request(axiosRequestArgs);
|
|
348
|
-
}];
|
|
349
|
-
}
|
|
350
|
-
});
|
|
231
|
+
readMessage(body, options) {
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).readMessage(body, options);
|
|
234
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
235
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
236
|
+
return axios.request(axiosRequestArgs);
|
|
237
|
+
};
|
|
351
238
|
});
|
|
352
239
|
},
|
|
353
240
|
/**
|
|
@@ -356,22 +243,13 @@ var MessagesApiFp = function (configuration) {
|
|
|
356
243
|
* @param {*} [options] Override http request option.
|
|
357
244
|
* @throws {RequiredError}
|
|
358
245
|
*/
|
|
359
|
-
sendTemplateMessage
|
|
360
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
361
|
-
|
|
362
|
-
return
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
localVarAxiosArgs = _a.sent();
|
|
367
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
368
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
369
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
370
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
371
|
-
return axios.request(axiosRequestArgs);
|
|
372
|
-
}];
|
|
373
|
-
}
|
|
374
|
-
});
|
|
246
|
+
sendTemplateMessage(body, options) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTemplateMessage(body, options);
|
|
249
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
250
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
251
|
+
return axios.request(axiosRequestArgs);
|
|
252
|
+
};
|
|
375
253
|
});
|
|
376
254
|
},
|
|
377
255
|
/**
|
|
@@ -380,22 +258,13 @@ var MessagesApiFp = function (configuration) {
|
|
|
380
258
|
* @param {*} [options] Override http request option.
|
|
381
259
|
* @throws {RequiredError}
|
|
382
260
|
*/
|
|
383
|
-
sendTextMessage
|
|
384
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
385
|
-
|
|
386
|
-
return
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
localVarAxiosArgs = _a.sent();
|
|
391
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
392
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
393
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
394
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
395
|
-
return axios.request(axiosRequestArgs);
|
|
396
|
-
}];
|
|
397
|
-
}
|
|
398
|
-
});
|
|
261
|
+
sendTextMessage(body, options) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTextMessage(body, options);
|
|
264
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
265
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
266
|
+
return axios.request(axiosRequestArgs);
|
|
267
|
+
};
|
|
399
268
|
});
|
|
400
269
|
},
|
|
401
270
|
};
|
|
@@ -405,7 +274,7 @@ exports.MessagesApiFp = MessagesApiFp;
|
|
|
405
274
|
* MessagesApi - factory interface
|
|
406
275
|
* @export
|
|
407
276
|
*/
|
|
408
|
-
|
|
277
|
+
const MessagesApiFactory = function (configuration, basePath, axios) {
|
|
409
278
|
return {
|
|
410
279
|
/**
|
|
411
280
|
*
|
|
@@ -414,11 +283,9 @@ var MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
414
283
|
* @param {*} [options] Override http request option.
|
|
415
284
|
* @throws {RequiredError}
|
|
416
285
|
*/
|
|
417
|
-
getMessages
|
|
418
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
419
|
-
return
|
|
420
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).getMessages(branchId, chatId, options).then(function (request) { return request(axios, basePath); })];
|
|
421
|
-
});
|
|
286
|
+
getMessages(branchId, chatId, options) {
|
|
287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
+
return (0, exports.MessagesApiFp)(configuration).getMessages(branchId, chatId, options).then((request) => request(axios, basePath));
|
|
422
289
|
});
|
|
423
290
|
},
|
|
424
291
|
/**
|
|
@@ -427,11 +294,9 @@ var MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
427
294
|
* @param {*} [options] Override http request option.
|
|
428
295
|
* @throws {RequiredError}
|
|
429
296
|
*/
|
|
430
|
-
readMessage
|
|
431
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
432
|
-
return
|
|
433
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).readMessage(body, options).then(function (request) { return request(axios, basePath); })];
|
|
434
|
-
});
|
|
297
|
+
readMessage(body, options) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
return (0, exports.MessagesApiFp)(configuration).readMessage(body, options).then((request) => request(axios, basePath));
|
|
435
300
|
});
|
|
436
301
|
},
|
|
437
302
|
/**
|
|
@@ -440,11 +305,9 @@ var MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
440
305
|
* @param {*} [options] Override http request option.
|
|
441
306
|
* @throws {RequiredError}
|
|
442
307
|
*/
|
|
443
|
-
sendTemplateMessage
|
|
444
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
445
|
-
return
|
|
446
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).sendTemplateMessage(body, options).then(function (request) { return request(axios, basePath); })];
|
|
447
|
-
});
|
|
308
|
+
sendTemplateMessage(body, options) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
return (0, exports.MessagesApiFp)(configuration).sendTemplateMessage(body, options).then((request) => request(axios, basePath));
|
|
448
311
|
});
|
|
449
312
|
},
|
|
450
313
|
/**
|
|
@@ -453,11 +316,9 @@ var MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
453
316
|
* @param {*} [options] Override http request option.
|
|
454
317
|
* @throws {RequiredError}
|
|
455
318
|
*/
|
|
456
|
-
sendTextMessage
|
|
457
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
458
|
-
return
|
|
459
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).sendTextMessage(body, options).then(function (request) { return request(axios, basePath); })];
|
|
460
|
-
});
|
|
319
|
+
sendTextMessage(body, options) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
return (0, exports.MessagesApiFp)(configuration).sendTextMessage(body, options).then((request) => request(axios, basePath));
|
|
461
322
|
});
|
|
462
323
|
},
|
|
463
324
|
};
|
|
@@ -469,11 +330,7 @@ exports.MessagesApiFactory = MessagesApiFactory;
|
|
|
469
330
|
* @class MessagesApi
|
|
470
331
|
* @extends {BaseAPI}
|
|
471
332
|
*/
|
|
472
|
-
|
|
473
|
-
__extends(MessagesApi, _super);
|
|
474
|
-
function MessagesApi() {
|
|
475
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
476
|
-
}
|
|
333
|
+
class MessagesApi extends base_1.BaseAPI {
|
|
477
334
|
/**
|
|
478
335
|
*
|
|
479
336
|
* @param {number} branchId
|
|
@@ -482,14 +339,11 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
482
339
|
* @throws {RequiredError}
|
|
483
340
|
* @memberof MessagesApi
|
|
484
341
|
*/
|
|
485
|
-
|
|
486
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
487
|
-
|
|
488
|
-
return __generator(this, function (_a) {
|
|
489
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).getMessages(branchId, chatId, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
490
|
-
});
|
|
342
|
+
getMessages(branchId, chatId, options) {
|
|
343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
+
return (0, exports.MessagesApiFp)(this.configuration).getMessages(branchId, chatId, options).then((request) => request(this.axios, this.basePath));
|
|
491
345
|
});
|
|
492
|
-
}
|
|
346
|
+
}
|
|
493
347
|
/**
|
|
494
348
|
*
|
|
495
349
|
* @param {ReadMessageDto} body
|
|
@@ -497,14 +351,11 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
497
351
|
* @throws {RequiredError}
|
|
498
352
|
* @memberof MessagesApi
|
|
499
353
|
*/
|
|
500
|
-
|
|
501
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
502
|
-
|
|
503
|
-
return __generator(this, function (_a) {
|
|
504
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).readMessage(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
505
|
-
});
|
|
354
|
+
readMessage(body, options) {
|
|
355
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
+
return (0, exports.MessagesApiFp)(this.configuration).readMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
506
357
|
});
|
|
507
|
-
}
|
|
358
|
+
}
|
|
508
359
|
/**
|
|
509
360
|
*
|
|
510
361
|
* @param {SendTemplateDataDto} body
|
|
@@ -512,14 +363,11 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
512
363
|
* @throws {RequiredError}
|
|
513
364
|
* @memberof MessagesApi
|
|
514
365
|
*/
|
|
515
|
-
|
|
516
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
517
|
-
|
|
518
|
-
return __generator(this, function (_a) {
|
|
519
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).sendTemplateMessage(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
520
|
-
});
|
|
366
|
+
sendTemplateMessage(body, options) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
return (0, exports.MessagesApiFp)(this.configuration).sendTemplateMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
521
369
|
});
|
|
522
|
-
}
|
|
370
|
+
}
|
|
523
371
|
/**
|
|
524
372
|
*
|
|
525
373
|
* @param {SendTextDto} body
|
|
@@ -527,14 +375,10 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
527
375
|
* @throws {RequiredError}
|
|
528
376
|
* @memberof MessagesApi
|
|
529
377
|
*/
|
|
530
|
-
|
|
531
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
532
|
-
|
|
533
|
-
return __generator(this, function (_a) {
|
|
534
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).sendTextMessage(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
535
|
-
});
|
|
378
|
+
sendTextMessage(body, options) {
|
|
379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
380
|
+
return (0, exports.MessagesApiFp)(this.configuration).sendTextMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
536
381
|
});
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
}(base_1.BaseAPI));
|
|
382
|
+
}
|
|
383
|
+
}
|
|
540
384
|
exports.MessagesApi = MessagesApi;
|