@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
package/dist/apis/chats-api.js
CHANGED
|
@@ -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.ChatsApi = exports.ChatsApiFactory = exports.ChatsApiFp = exports.ChatsApiAxiosParamCreator = 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
|
* ChatsApi - axios parameter creator
|
|
94
32
|
* @export
|
|
95
33
|
*/
|
|
96
|
-
|
|
97
|
-
var _this = this;
|
|
34
|
+
const ChatsApiAxiosParamCreator = function (configuration) {
|
|
98
35
|
return {
|
|
99
36
|
/**
|
|
100
37
|
*
|
|
@@ -103,164 +40,124 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
103
40
|
* @param {*} [options] Override http request option.
|
|
104
41
|
* @throws {RequiredError}
|
|
105
42
|
*/
|
|
106
|
-
assignToMe:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
43
|
+
assignToMe: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, 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 assignToMe.');
|
|
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
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
145
|
-
return [2 /*return*/, {
|
|
146
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
147
|
-
options: localVarRequestOptions,
|
|
148
|
-
}];
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
},
|
|
48
|
+
// verify required parameter 'id' is not null or undefined
|
|
49
|
+
if (id === null || id === undefined) {
|
|
50
|
+
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling assignToMe.');
|
|
51
|
+
}
|
|
52
|
+
const localVarPath = `/api/chats/{id}/assign-to-me`
|
|
53
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
54
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
55
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
56
|
+
let baseOptions;
|
|
57
|
+
if (configuration) {
|
|
58
|
+
baseOptions = configuration.baseOptions;
|
|
59
|
+
}
|
|
60
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
61
|
+
const localVarHeaderParameter = {};
|
|
62
|
+
const localVarQueryParameter = {};
|
|
63
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
64
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
65
|
+
for (const key in localVarQueryParameter) {
|
|
66
|
+
query.set(key, localVarQueryParameter[key]);
|
|
67
|
+
}
|
|
68
|
+
for (const key in options.params) {
|
|
69
|
+
query.set(key, options.params[key]);
|
|
70
|
+
}
|
|
71
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
72
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
73
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
74
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
75
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
76
|
+
return {
|
|
77
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
78
|
+
options: localVarRequestOptions,
|
|
79
|
+
};
|
|
80
|
+
}),
|
|
152
81
|
/**
|
|
153
82
|
*
|
|
154
83
|
* @param {number} id
|
|
155
84
|
* @param {*} [options] Override http request option.
|
|
156
85
|
* @throws {RequiredError}
|
|
157
86
|
*/
|
|
158
|
-
getChat: function (
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
87
|
+
getChat: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
88
|
+
// verify required parameter 'id' is not null or undefined
|
|
89
|
+
if (id === null || id === undefined) {
|
|
90
|
+
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling getChat.');
|
|
162
91
|
}
|
|
163
|
-
|
|
164
|
-
|
|
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
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
190
|
-
return [2 /*return*/, {
|
|
191
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
192
|
-
options: localVarRequestOptions,
|
|
193
|
-
}];
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
},
|
|
92
|
+
const localVarPath = `/api/chats/{id}`
|
|
93
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
94
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
95
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
96
|
+
let baseOptions;
|
|
97
|
+
if (configuration) {
|
|
98
|
+
baseOptions = configuration.baseOptions;
|
|
99
|
+
}
|
|
100
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
101
|
+
const localVarHeaderParameter = {};
|
|
102
|
+
const localVarQueryParameter = {};
|
|
103
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
104
|
+
for (const key in localVarQueryParameter) {
|
|
105
|
+
query.set(key, localVarQueryParameter[key]);
|
|
106
|
+
}
|
|
107
|
+
for (const key in options.params) {
|
|
108
|
+
query.set(key, options.params[key]);
|
|
109
|
+
}
|
|
110
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
111
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
112
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
113
|
+
return {
|
|
114
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
115
|
+
options: localVarRequestOptions,
|
|
116
|
+
};
|
|
117
|
+
}),
|
|
197
118
|
/**
|
|
198
119
|
*
|
|
199
120
|
* @param {number} branchId
|
|
200
121
|
* @param {number} [userId]
|
|
201
|
-
* @param {number} [currentPage]
|
|
202
|
-
* @param {number} [rowsPerPage]
|
|
203
|
-
* @param {number} [unread]
|
|
204
|
-
* @param {string} [q]
|
|
205
122
|
* @param {*} [options] Override http request option.
|
|
206
123
|
* @throws {RequiredError}
|
|
207
124
|
*/
|
|
208
|
-
getChats:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
125
|
+
getChats: (branchId_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, userId_1, ...args_1], void 0, function* (branchId, userId, options = {}) {
|
|
126
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
127
|
+
if (branchId === null || branchId === undefined) {
|
|
128
|
+
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
|
|
212
129
|
}
|
|
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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
if (q !== undefined) {
|
|
245
|
-
localVarQueryParameter['q'] = q;
|
|
246
|
-
}
|
|
247
|
-
query = new URLSearchParams(localVarUrlObj.search);
|
|
248
|
-
for (key in localVarQueryParameter) {
|
|
249
|
-
query.set(key, localVarQueryParameter[key]);
|
|
250
|
-
}
|
|
251
|
-
for (key in options.params) {
|
|
252
|
-
query.set(key, options.params[key]);
|
|
253
|
-
}
|
|
254
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
255
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
256
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
257
|
-
return [2 /*return*/, {
|
|
258
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
259
|
-
options: localVarRequestOptions,
|
|
260
|
-
}];
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
},
|
|
130
|
+
const localVarPath = `/api/chats`;
|
|
131
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
132
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
133
|
+
let baseOptions;
|
|
134
|
+
if (configuration) {
|
|
135
|
+
baseOptions = configuration.baseOptions;
|
|
136
|
+
}
|
|
137
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
138
|
+
const localVarHeaderParameter = {};
|
|
139
|
+
const localVarQueryParameter = {};
|
|
140
|
+
if (branchId !== undefined) {
|
|
141
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
142
|
+
}
|
|
143
|
+
if (userId !== undefined) {
|
|
144
|
+
localVarQueryParameter['userId'] = userId;
|
|
145
|
+
}
|
|
146
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
147
|
+
for (const key in localVarQueryParameter) {
|
|
148
|
+
query.set(key, localVarQueryParameter[key]);
|
|
149
|
+
}
|
|
150
|
+
for (const key in options.params) {
|
|
151
|
+
query.set(key, options.params[key]);
|
|
152
|
+
}
|
|
153
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
154
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
155
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
156
|
+
return {
|
|
157
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
158
|
+
options: localVarRequestOptions,
|
|
159
|
+
};
|
|
160
|
+
}),
|
|
264
161
|
/**
|
|
265
162
|
*
|
|
266
163
|
* @param {MarkChatUnreadDto} body
|
|
@@ -268,52 +165,44 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
268
165
|
* @param {*} [options] Override http request option.
|
|
269
166
|
* @throws {RequiredError}
|
|
270
167
|
*/
|
|
271
|
-
markChatUnread:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
168
|
+
markChatUnread: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, options = {}) {
|
|
169
|
+
// verify required parameter 'body' is not null or undefined
|
|
170
|
+
if (body === null || body === undefined) {
|
|
171
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
|
|
275
172
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
310
|
-
return [2 /*return*/, {
|
|
311
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
312
|
-
options: localVarRequestOptions,
|
|
313
|
-
}];
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
},
|
|
173
|
+
// verify required parameter 'id' is not null or undefined
|
|
174
|
+
if (id === null || id === undefined) {
|
|
175
|
+
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
|
|
176
|
+
}
|
|
177
|
+
const localVarPath = `/api/chats/{id}/mark-chat-unread`
|
|
178
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
179
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
180
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
181
|
+
let baseOptions;
|
|
182
|
+
if (configuration) {
|
|
183
|
+
baseOptions = configuration.baseOptions;
|
|
184
|
+
}
|
|
185
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
186
|
+
const localVarHeaderParameter = {};
|
|
187
|
+
const localVarQueryParameter = {};
|
|
188
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
189
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
190
|
+
for (const key in localVarQueryParameter) {
|
|
191
|
+
query.set(key, localVarQueryParameter[key]);
|
|
192
|
+
}
|
|
193
|
+
for (const key in options.params) {
|
|
194
|
+
query.set(key, options.params[key]);
|
|
195
|
+
}
|
|
196
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
197
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
198
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
199
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
200
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
201
|
+
return {
|
|
202
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
203
|
+
options: localVarRequestOptions,
|
|
204
|
+
};
|
|
205
|
+
}),
|
|
317
206
|
};
|
|
318
207
|
};
|
|
319
208
|
exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
@@ -321,7 +210,7 @@ exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
|
321
210
|
* ChatsApi - functional programming interface
|
|
322
211
|
* @export
|
|
323
212
|
*/
|
|
324
|
-
|
|
213
|
+
const ChatsApiFp = function (configuration) {
|
|
325
214
|
return {
|
|
326
215
|
/**
|
|
327
216
|
*
|
|
@@ -330,22 +219,13 @@ var ChatsApiFp = function (configuration) {
|
|
|
330
219
|
* @param {*} [options] Override http request option.
|
|
331
220
|
* @throws {RequiredError}
|
|
332
221
|
*/
|
|
333
|
-
assignToMe
|
|
334
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
335
|
-
|
|
336
|
-
return
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
localVarAxiosArgs = _a.sent();
|
|
341
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
342
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
343
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
344
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
345
|
-
return axios.request(axiosRequestArgs);
|
|
346
|
-
}];
|
|
347
|
-
}
|
|
348
|
-
});
|
|
222
|
+
assignToMe(body, id, options) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToMe(body, id, options);
|
|
225
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
226
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
227
|
+
return axios.request(axiosRequestArgs);
|
|
228
|
+
};
|
|
349
229
|
});
|
|
350
230
|
},
|
|
351
231
|
/**
|
|
@@ -354,51 +234,29 @@ var ChatsApiFp = function (configuration) {
|
|
|
354
234
|
* @param {*} [options] Override http request option.
|
|
355
235
|
* @throws {RequiredError}
|
|
356
236
|
*/
|
|
357
|
-
getChat
|
|
358
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
359
|
-
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
localVarAxiosArgs = _a.sent();
|
|
365
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
366
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
367
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
368
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
369
|
-
return axios.request(axiosRequestArgs);
|
|
370
|
-
}];
|
|
371
|
-
}
|
|
372
|
-
});
|
|
237
|
+
getChat(id, options) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, options);
|
|
240
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
241
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
242
|
+
return axios.request(axiosRequestArgs);
|
|
243
|
+
};
|
|
373
244
|
});
|
|
374
245
|
},
|
|
375
246
|
/**
|
|
376
247
|
*
|
|
377
248
|
* @param {number} branchId
|
|
378
249
|
* @param {number} [userId]
|
|
379
|
-
* @param {number} [currentPage]
|
|
380
|
-
* @param {number} [rowsPerPage]
|
|
381
|
-
* @param {number} [unread]
|
|
382
|
-
* @param {string} [q]
|
|
383
250
|
* @param {*} [options] Override http request option.
|
|
384
251
|
* @throws {RequiredError}
|
|
385
252
|
*/
|
|
386
|
-
getChats
|
|
387
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
388
|
-
|
|
389
|
-
return
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
localVarAxiosArgs = _a.sent();
|
|
394
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
395
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
396
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
397
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
398
|
-
return axios.request(axiosRequestArgs);
|
|
399
|
-
}];
|
|
400
|
-
}
|
|
401
|
-
});
|
|
253
|
+
getChats(branchId, userId, options) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, options);
|
|
256
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
257
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
258
|
+
return axios.request(axiosRequestArgs);
|
|
259
|
+
};
|
|
402
260
|
});
|
|
403
261
|
},
|
|
404
262
|
/**
|
|
@@ -408,22 +266,13 @@ var ChatsApiFp = function (configuration) {
|
|
|
408
266
|
* @param {*} [options] Override http request option.
|
|
409
267
|
* @throws {RequiredError}
|
|
410
268
|
*/
|
|
411
|
-
markChatUnread
|
|
412
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
413
|
-
|
|
414
|
-
return
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
localVarAxiosArgs = _a.sent();
|
|
419
|
-
return [2 /*return*/, function (axios, basePath) {
|
|
420
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
421
|
-
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
422
|
-
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
423
|
-
return axios.request(axiosRequestArgs);
|
|
424
|
-
}];
|
|
425
|
-
}
|
|
426
|
-
});
|
|
269
|
+
markChatUnread(body, id, options) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options);
|
|
272
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
273
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
274
|
+
return axios.request(axiosRequestArgs);
|
|
275
|
+
};
|
|
427
276
|
});
|
|
428
277
|
},
|
|
429
278
|
};
|
|
@@ -433,7 +282,7 @@ exports.ChatsApiFp = ChatsApiFp;
|
|
|
433
282
|
* ChatsApi - factory interface
|
|
434
283
|
* @export
|
|
435
284
|
*/
|
|
436
|
-
|
|
285
|
+
const ChatsApiFactory = function (configuration, basePath, axios) {
|
|
437
286
|
return {
|
|
438
287
|
/**
|
|
439
288
|
*
|
|
@@ -442,11 +291,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
442
291
|
* @param {*} [options] Override http request option.
|
|
443
292
|
* @throws {RequiredError}
|
|
444
293
|
*/
|
|
445
|
-
assignToMe
|
|
446
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
447
|
-
return
|
|
448
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then(function (request) { return request(axios, basePath); })];
|
|
449
|
-
});
|
|
294
|
+
assignToMe(body, id, options) {
|
|
295
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
296
|
+
return (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then((request) => request(axios, basePath));
|
|
450
297
|
});
|
|
451
298
|
},
|
|
452
299
|
/**
|
|
@@ -455,29 +302,21 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
455
302
|
* @param {*} [options] Override http request option.
|
|
456
303
|
* @throws {RequiredError}
|
|
457
304
|
*/
|
|
458
|
-
getChat
|
|
459
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
460
|
-
return
|
|
461
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChat(id, options).then(function (request) { return request(axios, basePath); })];
|
|
462
|
-
});
|
|
305
|
+
getChat(id, options) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
return (0, exports.ChatsApiFp)(configuration).getChat(id, options).then((request) => request(axios, basePath));
|
|
463
308
|
});
|
|
464
309
|
},
|
|
465
310
|
/**
|
|
466
311
|
*
|
|
467
312
|
* @param {number} branchId
|
|
468
313
|
* @param {number} [userId]
|
|
469
|
-
* @param {number} [currentPage]
|
|
470
|
-
* @param {number} [rowsPerPage]
|
|
471
|
-
* @param {number} [unread]
|
|
472
|
-
* @param {string} [q]
|
|
473
314
|
* @param {*} [options] Override http request option.
|
|
474
315
|
* @throws {RequiredError}
|
|
475
316
|
*/
|
|
476
|
-
getChats
|
|
477
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
478
|
-
return
|
|
479
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then(function (request) { return request(axios, basePath); })];
|
|
480
|
-
});
|
|
317
|
+
getChats(branchId, userId, options) {
|
|
318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
+
return (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, options).then((request) => request(axios, basePath));
|
|
481
320
|
});
|
|
482
321
|
},
|
|
483
322
|
/**
|
|
@@ -487,11 +326,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
487
326
|
* @param {*} [options] Override http request option.
|
|
488
327
|
* @throws {RequiredError}
|
|
489
328
|
*/
|
|
490
|
-
markChatUnread
|
|
491
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
492
|
-
return
|
|
493
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then(function (request) { return request(axios, basePath); })];
|
|
494
|
-
});
|
|
329
|
+
markChatUnread(body, id, options) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
|
|
495
332
|
});
|
|
496
333
|
},
|
|
497
334
|
};
|
|
@@ -503,11 +340,7 @@ exports.ChatsApiFactory = ChatsApiFactory;
|
|
|
503
340
|
* @class ChatsApi
|
|
504
341
|
* @extends {BaseAPI}
|
|
505
342
|
*/
|
|
506
|
-
|
|
507
|
-
__extends(ChatsApi, _super);
|
|
508
|
-
function ChatsApi() {
|
|
509
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
510
|
-
}
|
|
343
|
+
class ChatsApi extends base_1.BaseAPI {
|
|
511
344
|
/**
|
|
512
345
|
*
|
|
513
346
|
* @param {AssignToMeDto} body
|
|
@@ -516,14 +349,11 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
516
349
|
* @throws {RequiredError}
|
|
517
350
|
* @memberof ChatsApi
|
|
518
351
|
*/
|
|
519
|
-
|
|
520
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
521
|
-
|
|
522
|
-
return __generator(this, function (_a) {
|
|
523
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
524
|
-
});
|
|
352
|
+
assignToMe(body, id, options) {
|
|
353
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
354
|
+
return (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
525
355
|
});
|
|
526
|
-
}
|
|
356
|
+
}
|
|
527
357
|
/**
|
|
528
358
|
*
|
|
529
359
|
* @param {number} id
|
|
@@ -531,34 +361,24 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
531
361
|
* @throws {RequiredError}
|
|
532
362
|
* @memberof ChatsApi
|
|
533
363
|
*/
|
|
534
|
-
|
|
535
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
536
|
-
|
|
537
|
-
return __generator(this, function (_a) {
|
|
538
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
539
|
-
});
|
|
364
|
+
getChat(id, options) {
|
|
365
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
366
|
+
return (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
|
|
540
367
|
});
|
|
541
|
-
}
|
|
368
|
+
}
|
|
542
369
|
/**
|
|
543
370
|
*
|
|
544
371
|
* @param {number} branchId
|
|
545
372
|
* @param {number} [userId]
|
|
546
|
-
* @param {number} [currentPage]
|
|
547
|
-
* @param {number} [rowsPerPage]
|
|
548
|
-
* @param {number} [unread]
|
|
549
|
-
* @param {string} [q]
|
|
550
373
|
* @param {*} [options] Override http request option.
|
|
551
374
|
* @throws {RequiredError}
|
|
552
375
|
* @memberof ChatsApi
|
|
553
376
|
*/
|
|
554
|
-
|
|
555
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
556
|
-
|
|
557
|
-
return __generator(this, function (_a) {
|
|
558
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, q, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
559
|
-
});
|
|
377
|
+
getChats(branchId, userId, options) {
|
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, userId, options).then((request) => request(this.axios, this.basePath));
|
|
560
380
|
});
|
|
561
|
-
}
|
|
381
|
+
}
|
|
562
382
|
/**
|
|
563
383
|
*
|
|
564
384
|
* @param {MarkChatUnreadDto} body
|
|
@@ -567,14 +387,10 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
567
387
|
* @throws {RequiredError}
|
|
568
388
|
* @memberof ChatsApi
|
|
569
389
|
*/
|
|
570
|
-
|
|
571
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
572
|
-
|
|
573
|
-
return __generator(this, function (_a) {
|
|
574
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
575
|
-
});
|
|
390
|
+
markChatUnread(body, id, options) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
+
return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
576
393
|
});
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
}(base_1.BaseAPI));
|
|
394
|
+
}
|
|
395
|
+
}
|
|
580
396
|
exports.ChatsApi = ChatsApi;
|