@libgot/whatsapp-bridge-sdk 1.0.32 → 1.0.34-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/.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 +35 -35
- package/dist/apis/auth-api.js +147 -301
- package/dist/apis/chats-api.d.ts +20 -20
- package/dist/apis/chats-api.js +230 -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/read-message-dto.d.ts +7 -2
- 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,140 @@ 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
|
-
* @param {number} [userId]
|
|
201
|
-
* @param {number} [currentPage]
|
|
202
|
-
* @param {number} [rowsPerPage]
|
|
203
|
-
* @param {boolean} [unread]
|
|
204
121
|
* @param {string} [q]
|
|
122
|
+
* @param {boolean} [unread]
|
|
123
|
+
* @param {number} [rowsPerPage]
|
|
124
|
+
* @param {number} [currentPage]
|
|
125
|
+
* @param {number} [userId]
|
|
205
126
|
* @param {*} [options] Override http request option.
|
|
206
127
|
* @throws {RequiredError}
|
|
207
128
|
*/
|
|
208
|
-
getChats:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
129
|
+
getChats: (branchId_1, q_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, ...args_1) => __awaiter(this, [branchId_1, q_1, unread_1, rowsPerPage_1, currentPage_1, userId_1, ...args_1], void 0, function* (branchId, q, unread, rowsPerPage, currentPage, userId, options = {}) {
|
|
130
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
131
|
+
if (branchId === null || branchId === undefined) {
|
|
132
|
+
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
|
|
212
133
|
}
|
|
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
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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
|
-
},
|
|
134
|
+
const localVarPath = `/api/chats`;
|
|
135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
136
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
137
|
+
let baseOptions;
|
|
138
|
+
if (configuration) {
|
|
139
|
+
baseOptions = configuration.baseOptions;
|
|
140
|
+
}
|
|
141
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
142
|
+
const localVarHeaderParameter = {};
|
|
143
|
+
const localVarQueryParameter = {};
|
|
144
|
+
if (q !== undefined) {
|
|
145
|
+
localVarQueryParameter['q'] = q;
|
|
146
|
+
}
|
|
147
|
+
if (unread !== undefined) {
|
|
148
|
+
localVarQueryParameter['unread'] = unread;
|
|
149
|
+
}
|
|
150
|
+
if (rowsPerPage !== undefined) {
|
|
151
|
+
localVarQueryParameter['rowsPerPage'] = rowsPerPage;
|
|
152
|
+
}
|
|
153
|
+
if (currentPage !== undefined) {
|
|
154
|
+
localVarQueryParameter['currentPage'] = currentPage;
|
|
155
|
+
}
|
|
156
|
+
if (userId !== undefined) {
|
|
157
|
+
localVarQueryParameter['userId'] = userId;
|
|
158
|
+
}
|
|
159
|
+
if (branchId !== undefined) {
|
|
160
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
161
|
+
}
|
|
162
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
163
|
+
for (const key in localVarQueryParameter) {
|
|
164
|
+
query.set(key, localVarQueryParameter[key]);
|
|
165
|
+
}
|
|
166
|
+
for (const key in options.params) {
|
|
167
|
+
query.set(key, options.params[key]);
|
|
168
|
+
}
|
|
169
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
170
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
171
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
172
|
+
return {
|
|
173
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
174
|
+
options: localVarRequestOptions,
|
|
175
|
+
};
|
|
176
|
+
}),
|
|
264
177
|
/**
|
|
265
178
|
*
|
|
266
179
|
* @param {MarkChatUnreadDto} body
|
|
@@ -268,52 +181,44 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
268
181
|
* @param {*} [options] Override http request option.
|
|
269
182
|
* @throws {RequiredError}
|
|
270
183
|
*/
|
|
271
|
-
markChatUnread:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
184
|
+
markChatUnread: (body_1, id_1, ...args_1) => __awaiter(this, [body_1, id_1, ...args_1], void 0, function* (body, id, options = {}) {
|
|
185
|
+
// verify required parameter 'body' is not null or undefined
|
|
186
|
+
if (body === null || body === undefined) {
|
|
187
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling markChatUnread.');
|
|
275
188
|
}
|
|
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
|
-
},
|
|
189
|
+
// verify required parameter 'id' is not null or undefined
|
|
190
|
+
if (id === null || id === undefined) {
|
|
191
|
+
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling markChatUnread.');
|
|
192
|
+
}
|
|
193
|
+
const localVarPath = `/api/chats/{id}/mark-chat-unread`
|
|
194
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
195
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
196
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
197
|
+
let baseOptions;
|
|
198
|
+
if (configuration) {
|
|
199
|
+
baseOptions = configuration.baseOptions;
|
|
200
|
+
}
|
|
201
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
202
|
+
const localVarHeaderParameter = {};
|
|
203
|
+
const localVarQueryParameter = {};
|
|
204
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
205
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
206
|
+
for (const key in localVarQueryParameter) {
|
|
207
|
+
query.set(key, localVarQueryParameter[key]);
|
|
208
|
+
}
|
|
209
|
+
for (const key in options.params) {
|
|
210
|
+
query.set(key, options.params[key]);
|
|
211
|
+
}
|
|
212
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
213
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
214
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
215
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
216
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
217
|
+
return {
|
|
218
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
219
|
+
options: localVarRequestOptions,
|
|
220
|
+
};
|
|
221
|
+
}),
|
|
317
222
|
};
|
|
318
223
|
};
|
|
319
224
|
exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
@@ -321,7 +226,7 @@ exports.ChatsApiAxiosParamCreator = ChatsApiAxiosParamCreator;
|
|
|
321
226
|
* ChatsApi - functional programming interface
|
|
322
227
|
* @export
|
|
323
228
|
*/
|
|
324
|
-
|
|
229
|
+
const ChatsApiFp = function (configuration) {
|
|
325
230
|
return {
|
|
326
231
|
/**
|
|
327
232
|
*
|
|
@@ -330,22 +235,13 @@ var ChatsApiFp = function (configuration) {
|
|
|
330
235
|
* @param {*} [options] Override http request option.
|
|
331
236
|
* @throws {RequiredError}
|
|
332
237
|
*/
|
|
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
|
-
});
|
|
238
|
+
assignToMe(body, id, options) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).assignToMe(body, id, options);
|
|
241
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
242
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
243
|
+
return axios.request(axiosRequestArgs);
|
|
244
|
+
};
|
|
349
245
|
});
|
|
350
246
|
},
|
|
351
247
|
/**
|
|
@@ -354,51 +250,33 @@ var ChatsApiFp = function (configuration) {
|
|
|
354
250
|
* @param {*} [options] Override http request option.
|
|
355
251
|
* @throws {RequiredError}
|
|
356
252
|
*/
|
|
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
|
-
});
|
|
253
|
+
getChat(id, options) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChat(id, 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
|
+
};
|
|
373
260
|
});
|
|
374
261
|
},
|
|
375
262
|
/**
|
|
376
263
|
*
|
|
377
264
|
* @param {number} branchId
|
|
378
|
-
* @param {number} [userId]
|
|
379
|
-
* @param {number} [currentPage]
|
|
380
|
-
* @param {number} [rowsPerPage]
|
|
381
|
-
* @param {boolean} [unread]
|
|
382
265
|
* @param {string} [q]
|
|
266
|
+
* @param {boolean} [unread]
|
|
267
|
+
* @param {number} [rowsPerPage]
|
|
268
|
+
* @param {number} [currentPage]
|
|
269
|
+
* @param {number} [userId]
|
|
383
270
|
* @param {*} [options] Override http request option.
|
|
384
271
|
* @throws {RequiredError}
|
|
385
272
|
*/
|
|
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
|
-
});
|
|
273
|
+
getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options);
|
|
276
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
277
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
278
|
+
return axios.request(axiosRequestArgs);
|
|
279
|
+
};
|
|
402
280
|
});
|
|
403
281
|
},
|
|
404
282
|
/**
|
|
@@ -408,22 +286,13 @@ var ChatsApiFp = function (configuration) {
|
|
|
408
286
|
* @param {*} [options] Override http request option.
|
|
409
287
|
* @throws {RequiredError}
|
|
410
288
|
*/
|
|
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
|
-
});
|
|
289
|
+
markChatUnread(body, id, options) {
|
|
290
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
+
const localVarAxiosArgs = yield (0, exports.ChatsApiAxiosParamCreator)(configuration).markChatUnread(body, id, options);
|
|
292
|
+
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
293
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
294
|
+
return axios.request(axiosRequestArgs);
|
|
295
|
+
};
|
|
427
296
|
});
|
|
428
297
|
},
|
|
429
298
|
};
|
|
@@ -433,7 +302,7 @@ exports.ChatsApiFp = ChatsApiFp;
|
|
|
433
302
|
* ChatsApi - factory interface
|
|
434
303
|
* @export
|
|
435
304
|
*/
|
|
436
|
-
|
|
305
|
+
const ChatsApiFactory = function (configuration, basePath, axios) {
|
|
437
306
|
return {
|
|
438
307
|
/**
|
|
439
308
|
*
|
|
@@ -442,11 +311,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
442
311
|
* @param {*} [options] Override http request option.
|
|
443
312
|
* @throws {RequiredError}
|
|
444
313
|
*/
|
|
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
|
-
});
|
|
314
|
+
assignToMe(body, id, options) {
|
|
315
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
316
|
+
return (0, exports.ChatsApiFp)(configuration).assignToMe(body, id, options).then((request) => request(axios, basePath));
|
|
450
317
|
});
|
|
451
318
|
},
|
|
452
319
|
/**
|
|
@@ -455,29 +322,25 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
455
322
|
* @param {*} [options] Override http request option.
|
|
456
323
|
* @throws {RequiredError}
|
|
457
324
|
*/
|
|
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
|
-
});
|
|
325
|
+
getChat(id, options) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
return (0, exports.ChatsApiFp)(configuration).getChat(id, options).then((request) => request(axios, basePath));
|
|
463
328
|
});
|
|
464
329
|
},
|
|
465
330
|
/**
|
|
466
331
|
*
|
|
467
332
|
* @param {number} branchId
|
|
468
|
-
* @param {number} [userId]
|
|
469
|
-
* @param {number} [currentPage]
|
|
470
|
-
* @param {number} [rowsPerPage]
|
|
471
|
-
* @param {boolean} [unread]
|
|
472
333
|
* @param {string} [q]
|
|
334
|
+
* @param {boolean} [unread]
|
|
335
|
+
* @param {number} [rowsPerPage]
|
|
336
|
+
* @param {number} [currentPage]
|
|
337
|
+
* @param {number} [userId]
|
|
473
338
|
* @param {*} [options] Override http request option.
|
|
474
339
|
* @throws {RequiredError}
|
|
475
340
|
*/
|
|
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
|
-
});
|
|
341
|
+
getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
|
|
342
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
return (0, exports.ChatsApiFp)(configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(axios, basePath));
|
|
481
344
|
});
|
|
482
345
|
},
|
|
483
346
|
/**
|
|
@@ -487,11 +350,9 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
487
350
|
* @param {*} [options] Override http request option.
|
|
488
351
|
* @throws {RequiredError}
|
|
489
352
|
*/
|
|
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
|
-
});
|
|
353
|
+
markChatUnread(body, id, options) {
|
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
return (0, exports.ChatsApiFp)(configuration).markChatUnread(body, id, options).then((request) => request(axios, basePath));
|
|
495
356
|
});
|
|
496
357
|
},
|
|
497
358
|
};
|
|
@@ -503,11 +364,7 @@ exports.ChatsApiFactory = ChatsApiFactory;
|
|
|
503
364
|
* @class ChatsApi
|
|
504
365
|
* @extends {BaseAPI}
|
|
505
366
|
*/
|
|
506
|
-
|
|
507
|
-
__extends(ChatsApi, _super);
|
|
508
|
-
function ChatsApi() {
|
|
509
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
510
|
-
}
|
|
367
|
+
class ChatsApi extends base_1.BaseAPI {
|
|
511
368
|
/**
|
|
512
369
|
*
|
|
513
370
|
* @param {AssignToMeDto} body
|
|
@@ -516,14 +373,11 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
516
373
|
* @throws {RequiredError}
|
|
517
374
|
* @memberof ChatsApi
|
|
518
375
|
*/
|
|
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
|
-
});
|
|
376
|
+
assignToMe(body, id, options) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
return (0, exports.ChatsApiFp)(this.configuration).assignToMe(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
525
379
|
});
|
|
526
|
-
}
|
|
380
|
+
}
|
|
527
381
|
/**
|
|
528
382
|
*
|
|
529
383
|
* @param {number} id
|
|
@@ -531,34 +385,28 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
531
385
|
* @throws {RequiredError}
|
|
532
386
|
* @memberof ChatsApi
|
|
533
387
|
*/
|
|
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
|
-
});
|
|
388
|
+
getChat(id, options) {
|
|
389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
390
|
+
return (0, exports.ChatsApiFp)(this.configuration).getChat(id, options).then((request) => request(this.axios, this.basePath));
|
|
540
391
|
});
|
|
541
|
-
}
|
|
392
|
+
}
|
|
542
393
|
/**
|
|
543
394
|
*
|
|
544
395
|
* @param {number} branchId
|
|
545
|
-
* @param {number} [userId]
|
|
546
|
-
* @param {number} [currentPage]
|
|
547
|
-
* @param {number} [rowsPerPage]
|
|
548
|
-
* @param {boolean} [unread]
|
|
549
396
|
* @param {string} [q]
|
|
397
|
+
* @param {boolean} [unread]
|
|
398
|
+
* @param {number} [rowsPerPage]
|
|
399
|
+
* @param {number} [currentPage]
|
|
400
|
+
* @param {number} [userId]
|
|
550
401
|
* @param {*} [options] Override http request option.
|
|
551
402
|
* @throws {RequiredError}
|
|
552
403
|
* @memberof ChatsApi
|
|
553
404
|
*/
|
|
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
|
-
});
|
|
405
|
+
getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options) {
|
|
406
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
407
|
+
return (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, q, unread, rowsPerPage, currentPage, userId, options).then((request) => request(this.axios, this.basePath));
|
|
560
408
|
});
|
|
561
|
-
}
|
|
409
|
+
}
|
|
562
410
|
/**
|
|
563
411
|
*
|
|
564
412
|
* @param {MarkChatUnreadDto} body
|
|
@@ -567,14 +415,10 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
567
415
|
* @throws {RequiredError}
|
|
568
416
|
* @memberof ChatsApi
|
|
569
417
|
*/
|
|
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
|
-
});
|
|
418
|
+
markChatUnread(body, id, options) {
|
|
419
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
420
|
+
return (0, exports.ChatsApiFp)(this.configuration).markChatUnread(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
576
421
|
});
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
}(base_1.BaseAPI));
|
|
422
|
+
}
|
|
423
|
+
}
|
|
580
424
|
exports.ChatsApi = ChatsApi;
|