@libgot/whatsapp-bridge-sdk 1.0.29 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/apis/chats-api.ts +23 -23
- package/dist/apis/chats-api.d.ts +16 -12
- package/dist/apis/chats-api.js +25 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @1.0.
|
|
1
|
+
## @1.0.30
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @libgot/whatsapp-bridge-sdk@1.0.
|
|
39
|
+
npm install @libgot/whatsapp-bridge-sdk@1.0.30 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/apis/chats-api.ts
CHANGED
|
@@ -117,25 +117,18 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
117
117
|
/**
|
|
118
118
|
*
|
|
119
119
|
* @param {number} branchId
|
|
120
|
-
* @param {number} currentPage
|
|
121
|
-
* @param {number} rowsPerPage
|
|
122
120
|
* @param {number} [userId]
|
|
121
|
+
* @param {number} [currentPage]
|
|
122
|
+
* @param {number} [rowsPerPage]
|
|
123
|
+
* @param {number} [unread]
|
|
123
124
|
* @param {*} [options] Override http request option.
|
|
124
125
|
* @throws {RequiredError}
|
|
125
126
|
*/
|
|
126
|
-
getChats: async (branchId: number, currentPage
|
|
127
|
+
getChats: async (branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
127
128
|
// verify required parameter 'branchId' is not null or undefined
|
|
128
129
|
if (branchId === null || branchId === undefined) {
|
|
129
130
|
throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChats.');
|
|
130
131
|
}
|
|
131
|
-
// verify required parameter 'currentPage' is not null or undefined
|
|
132
|
-
if (currentPage === null || currentPage === undefined) {
|
|
133
|
-
throw new RequiredError('currentPage','Required parameter currentPage was null or undefined when calling getChats.');
|
|
134
|
-
}
|
|
135
|
-
// verify required parameter 'rowsPerPage' is not null or undefined
|
|
136
|
-
if (rowsPerPage === null || rowsPerPage === undefined) {
|
|
137
|
-
throw new RequiredError('rowsPerPage','Required parameter rowsPerPage was null or undefined when calling getChats.');
|
|
138
|
-
}
|
|
139
132
|
const localVarPath = `/api/chats`;
|
|
140
133
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
141
134
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -163,6 +156,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
163
156
|
localVarQueryParameter['rowsPerPage'] = rowsPerPage;
|
|
164
157
|
}
|
|
165
158
|
|
|
159
|
+
if (unread !== undefined) {
|
|
160
|
+
localVarQueryParameter['unread'] = unread;
|
|
161
|
+
}
|
|
162
|
+
|
|
166
163
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
167
164
|
for (const key in localVarQueryParameter) {
|
|
168
165
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -266,14 +263,15 @@ export const ChatsApiFp = function(configuration?: Configuration) {
|
|
|
266
263
|
/**
|
|
267
264
|
*
|
|
268
265
|
* @param {number} branchId
|
|
269
|
-
* @param {number} currentPage
|
|
270
|
-
* @param {number} rowsPerPage
|
|
271
266
|
* @param {number} [userId]
|
|
267
|
+
* @param {number} [currentPage]
|
|
268
|
+
* @param {number} [rowsPerPage]
|
|
269
|
+
* @param {number} [unread]
|
|
272
270
|
* @param {*} [options] Override http request option.
|
|
273
271
|
* @throws {RequiredError}
|
|
274
272
|
*/
|
|
275
|
-
async getChats(branchId: number, currentPage
|
|
276
|
-
const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, currentPage, rowsPerPage,
|
|
273
|
+
async getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>> {
|
|
274
|
+
const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, options);
|
|
277
275
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
278
276
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
279
277
|
return axios.request(axiosRequestArgs);
|
|
@@ -324,14 +322,15 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
|
|
|
324
322
|
/**
|
|
325
323
|
*
|
|
326
324
|
* @param {number} branchId
|
|
327
|
-
* @param {number} currentPage
|
|
328
|
-
* @param {number} rowsPerPage
|
|
329
325
|
* @param {number} [userId]
|
|
326
|
+
* @param {number} [currentPage]
|
|
327
|
+
* @param {number} [rowsPerPage]
|
|
328
|
+
* @param {number} [unread]
|
|
330
329
|
* @param {*} [options] Override http request option.
|
|
331
330
|
* @throws {RequiredError}
|
|
332
331
|
*/
|
|
333
|
-
async getChats(branchId: number, currentPage
|
|
334
|
-
return ChatsApiFp(configuration).getChats(branchId, currentPage, rowsPerPage,
|
|
332
|
+
async getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>> {
|
|
333
|
+
return ChatsApiFp(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, options).then((request) => request(axios, basePath));
|
|
335
334
|
},
|
|
336
335
|
/**
|
|
337
336
|
*
|
|
@@ -377,15 +376,16 @@ export class ChatsApi extends BaseAPI {
|
|
|
377
376
|
/**
|
|
378
377
|
*
|
|
379
378
|
* @param {number} branchId
|
|
380
|
-
* @param {number} currentPage
|
|
381
|
-
* @param {number} rowsPerPage
|
|
382
379
|
* @param {number} [userId]
|
|
380
|
+
* @param {number} [currentPage]
|
|
381
|
+
* @param {number} [rowsPerPage]
|
|
382
|
+
* @param {number} [unread]
|
|
383
383
|
* @param {*} [options] Override http request option.
|
|
384
384
|
* @throws {RequiredError}
|
|
385
385
|
* @memberof ChatsApi
|
|
386
386
|
*/
|
|
387
|
-
public async getChats(branchId: number, currentPage
|
|
388
|
-
return ChatsApiFp(this.configuration).getChats(branchId, currentPage, rowsPerPage,
|
|
387
|
+
public async getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginationChatResponseDto>> {
|
|
388
|
+
return ChatsApiFp(this.configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, options).then((request) => request(this.axios, this.basePath));
|
|
389
389
|
}
|
|
390
390
|
/**
|
|
391
391
|
*
|
package/dist/apis/chats-api.d.ts
CHANGED
|
@@ -39,13 +39,14 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
39
39
|
/**
|
|
40
40
|
*
|
|
41
41
|
* @param {number} branchId
|
|
42
|
-
* @param {number} currentPage
|
|
43
|
-
* @param {number} rowsPerPage
|
|
44
42
|
* @param {number} [userId]
|
|
43
|
+
* @param {number} [currentPage]
|
|
44
|
+
* @param {number} [rowsPerPage]
|
|
45
|
+
* @param {number} [unread]
|
|
45
46
|
* @param {*} [options] Override http request option.
|
|
46
47
|
* @throws {RequiredError}
|
|
47
48
|
*/
|
|
48
|
-
getChats: (branchId: number, currentPage
|
|
49
|
+
getChats: (branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
49
50
|
/**
|
|
50
51
|
*
|
|
51
52
|
* @param {MarkChatUnreadDto} body
|
|
@@ -78,13 +79,14 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
78
79
|
/**
|
|
79
80
|
*
|
|
80
81
|
* @param {number} branchId
|
|
81
|
-
* @param {number} currentPage
|
|
82
|
-
* @param {number} rowsPerPage
|
|
83
82
|
* @param {number} [userId]
|
|
83
|
+
* @param {number} [currentPage]
|
|
84
|
+
* @param {number} [rowsPerPage]
|
|
85
|
+
* @param {number} [unread]
|
|
84
86
|
* @param {*} [options] Override http request option.
|
|
85
87
|
* @throws {RequiredError}
|
|
86
88
|
*/
|
|
87
|
-
getChats(branchId: number, currentPage
|
|
89
|
+
getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginationChatResponseDto>>>;
|
|
88
90
|
/**
|
|
89
91
|
*
|
|
90
92
|
* @param {MarkChatUnreadDto} body
|
|
@@ -117,13 +119,14 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
117
119
|
/**
|
|
118
120
|
*
|
|
119
121
|
* @param {number} branchId
|
|
120
|
-
* @param {number} currentPage
|
|
121
|
-
* @param {number} rowsPerPage
|
|
122
122
|
* @param {number} [userId]
|
|
123
|
+
* @param {number} [currentPage]
|
|
124
|
+
* @param {number} [rowsPerPage]
|
|
125
|
+
* @param {number} [unread]
|
|
123
126
|
* @param {*} [options] Override http request option.
|
|
124
127
|
* @throws {RequiredError}
|
|
125
128
|
*/
|
|
126
|
-
getChats(branchId: number, currentPage
|
|
129
|
+
getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
|
|
127
130
|
/**
|
|
128
131
|
*
|
|
129
132
|
* @param {MarkChatUnreadDto} body
|
|
@@ -160,14 +163,15 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
160
163
|
/**
|
|
161
164
|
*
|
|
162
165
|
* @param {number} branchId
|
|
163
|
-
* @param {number} currentPage
|
|
164
|
-
* @param {number} rowsPerPage
|
|
165
166
|
* @param {number} [userId]
|
|
167
|
+
* @param {number} [currentPage]
|
|
168
|
+
* @param {number} [rowsPerPage]
|
|
169
|
+
* @param {number} [unread]
|
|
166
170
|
* @param {*} [options] Override http request option.
|
|
167
171
|
* @throws {RequiredError}
|
|
168
172
|
* @memberof ChatsApi
|
|
169
173
|
*/
|
|
170
|
-
getChats(branchId: number, currentPage
|
|
174
|
+
getChats(branchId: number, userId?: number, currentPage?: number, rowsPerPage?: number, unread?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginationChatResponseDto>>;
|
|
171
175
|
/**
|
|
172
176
|
*
|
|
173
177
|
* @param {MarkChatUnreadDto} body
|
package/dist/apis/chats-api.js
CHANGED
|
@@ -197,18 +197,19 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
197
197
|
/**
|
|
198
198
|
*
|
|
199
199
|
* @param {number} branchId
|
|
200
|
-
* @param {number} currentPage
|
|
201
|
-
* @param {number} rowsPerPage
|
|
202
200
|
* @param {number} [userId]
|
|
201
|
+
* @param {number} [currentPage]
|
|
202
|
+
* @param {number} [rowsPerPage]
|
|
203
|
+
* @param {number} [unread]
|
|
203
204
|
* @param {*} [options] Override http request option.
|
|
204
205
|
* @throws {RequiredError}
|
|
205
206
|
*/
|
|
206
|
-
getChats: function (branchId_1, currentPage_1, rowsPerPage_1,
|
|
207
|
+
getChats: function (branchId_1, userId_1, currentPage_1, rowsPerPage_1, unread_1) {
|
|
207
208
|
var args_1 = [];
|
|
208
|
-
for (var _i =
|
|
209
|
-
args_1[_i -
|
|
209
|
+
for (var _i = 5; _i < arguments.length; _i++) {
|
|
210
|
+
args_1[_i - 5] = arguments[_i];
|
|
210
211
|
}
|
|
211
|
-
return __awaiter(_this, __spreadArray([branchId_1, currentPage_1, rowsPerPage_1,
|
|
212
|
+
return __awaiter(_this, __spreadArray([branchId_1, userId_1, currentPage_1, rowsPerPage_1, unread_1], args_1, true), void 0, function (branchId, userId, currentPage, rowsPerPage, unread, options) {
|
|
212
213
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
213
214
|
if (options === void 0) { options = {}; }
|
|
214
215
|
return __generator(this, function (_a) {
|
|
@@ -216,14 +217,6 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
216
217
|
if (branchId === null || branchId === undefined) {
|
|
217
218
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
|
|
218
219
|
}
|
|
219
|
-
// verify required parameter 'currentPage' is not null or undefined
|
|
220
|
-
if (currentPage === null || currentPage === undefined) {
|
|
221
|
-
throw new base_1.RequiredError('currentPage', 'Required parameter currentPage was null or undefined when calling getChats.');
|
|
222
|
-
}
|
|
223
|
-
// verify required parameter 'rowsPerPage' is not null or undefined
|
|
224
|
-
if (rowsPerPage === null || rowsPerPage === undefined) {
|
|
225
|
-
throw new base_1.RequiredError('rowsPerPage', 'Required parameter rowsPerPage was null or undefined when calling getChats.');
|
|
226
|
-
}
|
|
227
220
|
localVarPath = "/api/chats";
|
|
228
221
|
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
229
222
|
if (configuration) {
|
|
@@ -244,6 +237,9 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
244
237
|
if (rowsPerPage !== undefined) {
|
|
245
238
|
localVarQueryParameter['rowsPerPage'] = rowsPerPage;
|
|
246
239
|
}
|
|
240
|
+
if (unread !== undefined) {
|
|
241
|
+
localVarQueryParameter['unread'] = unread;
|
|
242
|
+
}
|
|
247
243
|
query = new URLSearchParams(localVarUrlObj.search);
|
|
248
244
|
for (key in localVarQueryParameter) {
|
|
249
245
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -375,18 +371,19 @@ var ChatsApiFp = function (configuration) {
|
|
|
375
371
|
/**
|
|
376
372
|
*
|
|
377
373
|
* @param {number} branchId
|
|
378
|
-
* @param {number} currentPage
|
|
379
|
-
* @param {number} rowsPerPage
|
|
380
374
|
* @param {number} [userId]
|
|
375
|
+
* @param {number} [currentPage]
|
|
376
|
+
* @param {number} [rowsPerPage]
|
|
377
|
+
* @param {number} [unread]
|
|
381
378
|
* @param {*} [options] Override http request option.
|
|
382
379
|
* @throws {RequiredError}
|
|
383
380
|
*/
|
|
384
|
-
getChats: function (branchId, currentPage, rowsPerPage,
|
|
381
|
+
getChats: function (branchId, userId, currentPage, rowsPerPage, unread, options) {
|
|
385
382
|
return __awaiter(this, void 0, void 0, function () {
|
|
386
383
|
var localVarAxiosArgs;
|
|
387
384
|
return __generator(this, function (_a) {
|
|
388
385
|
switch (_a.label) {
|
|
389
|
-
case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, currentPage, rowsPerPage,
|
|
386
|
+
case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, options)];
|
|
390
387
|
case 1:
|
|
391
388
|
localVarAxiosArgs = _a.sent();
|
|
392
389
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -463,16 +460,17 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
463
460
|
/**
|
|
464
461
|
*
|
|
465
462
|
* @param {number} branchId
|
|
466
|
-
* @param {number} currentPage
|
|
467
|
-
* @param {number} rowsPerPage
|
|
468
463
|
* @param {number} [userId]
|
|
464
|
+
* @param {number} [currentPage]
|
|
465
|
+
* @param {number} [rowsPerPage]
|
|
466
|
+
* @param {number} [unread]
|
|
469
467
|
* @param {*} [options] Override http request option.
|
|
470
468
|
* @throws {RequiredError}
|
|
471
469
|
*/
|
|
472
|
-
getChats: function (branchId, currentPage, rowsPerPage,
|
|
470
|
+
getChats: function (branchId, userId, currentPage, rowsPerPage, unread, options) {
|
|
473
471
|
return __awaiter(this, void 0, void 0, function () {
|
|
474
472
|
return __generator(this, function (_a) {
|
|
475
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, currentPage, rowsPerPage,
|
|
473
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, options).then(function (request) { return request(axios, basePath); })];
|
|
476
474
|
});
|
|
477
475
|
});
|
|
478
476
|
},
|
|
@@ -538,18 +536,19 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
538
536
|
/**
|
|
539
537
|
*
|
|
540
538
|
* @param {number} branchId
|
|
541
|
-
* @param {number} currentPage
|
|
542
|
-
* @param {number} rowsPerPage
|
|
543
539
|
* @param {number} [userId]
|
|
540
|
+
* @param {number} [currentPage]
|
|
541
|
+
* @param {number} [rowsPerPage]
|
|
542
|
+
* @param {number} [unread]
|
|
544
543
|
* @param {*} [options] Override http request option.
|
|
545
544
|
* @throws {RequiredError}
|
|
546
545
|
* @memberof ChatsApi
|
|
547
546
|
*/
|
|
548
|
-
ChatsApi.prototype.getChats = function (branchId, currentPage, rowsPerPage,
|
|
547
|
+
ChatsApi.prototype.getChats = function (branchId, userId, currentPage, rowsPerPage, unread, options) {
|
|
549
548
|
return __awaiter(this, void 0, void 0, function () {
|
|
550
549
|
var _this = this;
|
|
551
550
|
return __generator(this, function (_a) {
|
|
552
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, currentPage, rowsPerPage,
|
|
551
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, userId, currentPage, rowsPerPage, unread, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
553
552
|
});
|
|
554
553
|
});
|
|
555
554
|
};
|