@libgot/whatsapp-bridge-sdk 1.0.15 → 1.0.16
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 +19 -7
- package/apis/contacts-api.ts +19 -7
- package/dist/apis/chats-api.d.ts +8 -4
- package/dist/apis/chats-api.js +21 -10
- package/dist/apis/contacts-api.d.ts +8 -4
- package/dist/apis/contacts-api.js +21 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @1.0.
|
|
1
|
+
## @1.0.16
|
|
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.16 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/apis/chats-api.ts
CHANGED
|
@@ -66,10 +66,15 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
66
66
|
},
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
|
+
* @param {number} branchId
|
|
69
70
|
* @param {*} [options] Override http request option.
|
|
70
71
|
* @throws {RequiredError}
|
|
71
72
|
*/
|
|
72
|
-
getChats: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
73
|
+
getChats: async (branchId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
74
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
75
|
+
if (branchId === null || branchId === undefined) {
|
|
76
|
+
throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getChats.');
|
|
77
|
+
}
|
|
73
78
|
const localVarPath = `/api/chats`;
|
|
74
79
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
75
80
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -81,6 +86,10 @@ export const ChatsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
81
86
|
const localVarHeaderParameter = {} as any;
|
|
82
87
|
const localVarQueryParameter = {} as any;
|
|
83
88
|
|
|
89
|
+
if (branchId !== undefined) {
|
|
90
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
91
|
+
}
|
|
92
|
+
|
|
84
93
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
85
94
|
for (const key in localVarQueryParameter) {
|
|
86
95
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -121,11 +130,12 @@ export const ChatsApiFp = function(configuration?: Configuration) {
|
|
|
121
130
|
},
|
|
122
131
|
/**
|
|
123
132
|
*
|
|
133
|
+
* @param {number} branchId
|
|
124
134
|
* @param {*} [options] Override http request option.
|
|
125
135
|
* @throws {RequiredError}
|
|
126
136
|
*/
|
|
127
|
-
async getChats(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>> {
|
|
128
|
-
const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(options);
|
|
137
|
+
async getChats(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>> {
|
|
138
|
+
const localVarAxiosArgs = await ChatsApiAxiosParamCreator(configuration).getChats(branchId, options);
|
|
129
139
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
130
140
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
131
141
|
return axios.request(axiosRequestArgs);
|
|
@@ -151,11 +161,12 @@ export const ChatsApiFactory = function (configuration?: Configuration, basePath
|
|
|
151
161
|
},
|
|
152
162
|
/**
|
|
153
163
|
*
|
|
164
|
+
* @param {number} branchId
|
|
154
165
|
* @param {*} [options] Override http request option.
|
|
155
166
|
* @throws {RequiredError}
|
|
156
167
|
*/
|
|
157
|
-
async getChats(options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>> {
|
|
158
|
-
return ChatsApiFp(configuration).getChats(options).then((request) => request(axios, basePath));
|
|
168
|
+
async getChats(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>> {
|
|
169
|
+
return ChatsApiFp(configuration).getChats(branchId, options).then((request) => request(axios, basePath));
|
|
159
170
|
},
|
|
160
171
|
};
|
|
161
172
|
};
|
|
@@ -179,11 +190,12 @@ export class ChatsApi extends BaseAPI {
|
|
|
179
190
|
}
|
|
180
191
|
/**
|
|
181
192
|
*
|
|
193
|
+
* @param {number} branchId
|
|
182
194
|
* @param {*} [options] Override http request option.
|
|
183
195
|
* @throws {RequiredError}
|
|
184
196
|
* @memberof ChatsApi
|
|
185
197
|
*/
|
|
186
|
-
public async getChats(options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatsResponseDTO>> {
|
|
187
|
-
return ChatsApiFp(this.configuration).getChats(options).then((request) => request(this.axios, this.basePath));
|
|
198
|
+
public async getChats(branchId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ChatsResponseDTO>> {
|
|
199
|
+
return ChatsApiFp(this.configuration).getChats(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
188
200
|
}
|
|
189
201
|
}
|
package/apis/contacts-api.ts
CHANGED
|
@@ -26,10 +26,15 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
26
26
|
return {
|
|
27
27
|
/**
|
|
28
28
|
*
|
|
29
|
+
* @param {number} branchId
|
|
29
30
|
* @param {*} [options] Override http request option.
|
|
30
31
|
* @throws {RequiredError}
|
|
31
32
|
*/
|
|
32
|
-
getContacts: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
33
|
+
getContacts: async (branchId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
34
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
35
|
+
if (branchId === null || branchId === undefined) {
|
|
36
|
+
throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getContacts.');
|
|
37
|
+
}
|
|
33
38
|
const localVarPath = `/api/contacts`;
|
|
34
39
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
35
40
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -41,6 +46,10 @@ export const ContactsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
41
46
|
const localVarHeaderParameter = {} as any;
|
|
42
47
|
const localVarQueryParameter = {} as any;
|
|
43
48
|
|
|
49
|
+
if (branchId !== undefined) {
|
|
50
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
45
54
|
for (const key in localVarQueryParameter) {
|
|
46
55
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -68,11 +77,12 @@ export const ContactsApiFp = function(configuration?: Configuration) {
|
|
|
68
77
|
return {
|
|
69
78
|
/**
|
|
70
79
|
*
|
|
80
|
+
* @param {number} branchId
|
|
71
81
|
* @param {*} [options] Override http request option.
|
|
72
82
|
* @throws {RequiredError}
|
|
73
83
|
*/
|
|
74
|
-
async getContacts(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>> {
|
|
75
|
-
const localVarAxiosArgs = await ContactsApiAxiosParamCreator(configuration).getContacts(options);
|
|
84
|
+
async getContacts(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>> {
|
|
85
|
+
const localVarAxiosArgs = await ContactsApiAxiosParamCreator(configuration).getContacts(branchId, options);
|
|
76
86
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
77
87
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
78
88
|
return axios.request(axiosRequestArgs);
|
|
@@ -89,11 +99,12 @@ export const ContactsApiFactory = function (configuration?: Configuration, baseP
|
|
|
89
99
|
return {
|
|
90
100
|
/**
|
|
91
101
|
*
|
|
102
|
+
* @param {number} branchId
|
|
92
103
|
* @param {*} [options] Override http request option.
|
|
93
104
|
* @throws {RequiredError}
|
|
94
105
|
*/
|
|
95
|
-
async getContacts(options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>> {
|
|
96
|
-
return ContactsApiFp(configuration).getContacts(options).then((request) => request(axios, basePath));
|
|
106
|
+
async getContacts(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>> {
|
|
107
|
+
return ContactsApiFp(configuration).getContacts(branchId, options).then((request) => request(axios, basePath));
|
|
97
108
|
},
|
|
98
109
|
};
|
|
99
110
|
};
|
|
@@ -107,11 +118,12 @@ export const ContactsApiFactory = function (configuration?: Configuration, baseP
|
|
|
107
118
|
export class ContactsApi extends BaseAPI {
|
|
108
119
|
/**
|
|
109
120
|
*
|
|
121
|
+
* @param {number} branchId
|
|
110
122
|
* @param {*} [options] Override http request option.
|
|
111
123
|
* @throws {RequiredError}
|
|
112
124
|
* @memberof ContactsApi
|
|
113
125
|
*/
|
|
114
|
-
public async getContacts(options?: AxiosRequestConfig) : Promise<AxiosResponse<ContactsResponseDTO>> {
|
|
115
|
-
return ContactsApiFp(this.configuration).getContacts(options).then((request) => request(this.axios, this.basePath));
|
|
126
|
+
public async getContacts(branchId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<ContactsResponseDTO>> {
|
|
127
|
+
return ContactsApiFp(this.configuration).getContacts(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
116
128
|
}
|
|
117
129
|
}
|
package/dist/apis/chats-api.d.ts
CHANGED
|
@@ -28,10 +28,11 @@ export declare const ChatsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
28
28
|
getChat: (id: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
|
+
* @param {number} branchId
|
|
31
32
|
* @param {*} [options] Override http request option.
|
|
32
33
|
* @throws {RequiredError}
|
|
33
34
|
*/
|
|
34
|
-
getChats: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
|
+
getChats: (branchId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
38
|
* ChatsApi - functional programming interface
|
|
@@ -47,10 +48,11 @@ export declare const ChatsApiFp: (configuration?: Configuration) => {
|
|
|
47
48
|
getChat(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<WhatsappChatResponseDTO>>>;
|
|
48
49
|
/**
|
|
49
50
|
*
|
|
51
|
+
* @param {number} branchId
|
|
50
52
|
* @param {*} [options] Override http request option.
|
|
51
53
|
* @throws {RequiredError}
|
|
52
54
|
*/
|
|
53
|
-
getChats(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>>;
|
|
55
|
+
getChats(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ChatsResponseDTO>>>;
|
|
54
56
|
};
|
|
55
57
|
/**
|
|
56
58
|
* ChatsApi - factory interface
|
|
@@ -66,10 +68,11 @@ export declare const ChatsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
66
68
|
getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
67
69
|
/**
|
|
68
70
|
*
|
|
71
|
+
* @param {number} branchId
|
|
69
72
|
* @param {*} [options] Override http request option.
|
|
70
73
|
* @throws {RequiredError}
|
|
71
74
|
*/
|
|
72
|
-
getChats(options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
|
|
75
|
+
getChats(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
|
|
73
76
|
};
|
|
74
77
|
/**
|
|
75
78
|
* ChatsApi - object-oriented interface
|
|
@@ -88,9 +91,10 @@ export declare class ChatsApi extends BaseAPI {
|
|
|
88
91
|
getChat(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<WhatsappChatResponseDTO>>;
|
|
89
92
|
/**
|
|
90
93
|
*
|
|
94
|
+
* @param {number} branchId
|
|
91
95
|
* @param {*} [options] Override http request option.
|
|
92
96
|
* @throws {RequiredError}
|
|
93
97
|
* @memberof ChatsApi
|
|
94
98
|
*/
|
|
95
|
-
getChats(options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
|
|
99
|
+
getChats(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ChatsResponseDTO>>;
|
|
96
100
|
}
|
package/dist/apis/chats-api.js
CHANGED
|
@@ -143,18 +143,23 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
143
143
|
},
|
|
144
144
|
/**
|
|
145
145
|
*
|
|
146
|
+
* @param {number} branchId
|
|
146
147
|
* @param {*} [options] Override http request option.
|
|
147
148
|
* @throws {RequiredError}
|
|
148
149
|
*/
|
|
149
|
-
getChats: function () {
|
|
150
|
+
getChats: function (branchId_1) {
|
|
150
151
|
var args_1 = [];
|
|
151
|
-
for (var _i =
|
|
152
|
-
args_1[_i] = arguments[_i];
|
|
152
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
153
|
+
args_1[_i - 1] = arguments[_i];
|
|
153
154
|
}
|
|
154
|
-
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
155
|
+
return __awaiter(_this, __spreadArray([branchId_1], args_1, true), void 0, function (branchId, options) {
|
|
155
156
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
156
157
|
if (options === void 0) { options = {}; }
|
|
157
158
|
return __generator(this, function (_a) {
|
|
159
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
160
|
+
if (branchId === null || branchId === undefined) {
|
|
161
|
+
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChats.');
|
|
162
|
+
}
|
|
158
163
|
localVarPath = "/api/chats";
|
|
159
164
|
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
160
165
|
if (configuration) {
|
|
@@ -163,6 +168,9 @@ var ChatsApiAxiosParamCreator = function (configuration) {
|
|
|
163
168
|
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
164
169
|
localVarHeaderParameter = {};
|
|
165
170
|
localVarQueryParameter = {};
|
|
171
|
+
if (branchId !== undefined) {
|
|
172
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
173
|
+
}
|
|
166
174
|
query = new URLSearchParams(localVarUrlObj.search);
|
|
167
175
|
for (key in localVarQueryParameter) {
|
|
168
176
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -215,15 +223,16 @@ var ChatsApiFp = function (configuration) {
|
|
|
215
223
|
},
|
|
216
224
|
/**
|
|
217
225
|
*
|
|
226
|
+
* @param {number} branchId
|
|
218
227
|
* @param {*} [options] Override http request option.
|
|
219
228
|
* @throws {RequiredError}
|
|
220
229
|
*/
|
|
221
|
-
getChats: function (options) {
|
|
230
|
+
getChats: function (branchId, options) {
|
|
222
231
|
return __awaiter(this, void 0, void 0, function () {
|
|
223
232
|
var localVarAxiosArgs;
|
|
224
233
|
return __generator(this, function (_a) {
|
|
225
234
|
switch (_a.label) {
|
|
226
|
-
case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(options)];
|
|
235
|
+
case 0: return [4 /*yield*/, (0, exports.ChatsApiAxiosParamCreator)(configuration).getChats(branchId, options)];
|
|
227
236
|
case 1:
|
|
228
237
|
localVarAxiosArgs = _a.sent();
|
|
229
238
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -260,13 +269,14 @@ var ChatsApiFactory = function (configuration, basePath, axios) {
|
|
|
260
269
|
},
|
|
261
270
|
/**
|
|
262
271
|
*
|
|
272
|
+
* @param {number} branchId
|
|
263
273
|
* @param {*} [options] Override http request option.
|
|
264
274
|
* @throws {RequiredError}
|
|
265
275
|
*/
|
|
266
|
-
getChats: function (options) {
|
|
276
|
+
getChats: function (branchId, options) {
|
|
267
277
|
return __awaiter(this, void 0, void 0, function () {
|
|
268
278
|
return __generator(this, function (_a) {
|
|
269
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(options).then(function (request) { return request(axios, basePath); })];
|
|
279
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(configuration).getChats(branchId, options).then(function (request) { return request(axios, basePath); })];
|
|
270
280
|
});
|
|
271
281
|
});
|
|
272
282
|
},
|
|
@@ -301,15 +311,16 @@ var ChatsApi = /** @class */ (function (_super) {
|
|
|
301
311
|
};
|
|
302
312
|
/**
|
|
303
313
|
*
|
|
314
|
+
* @param {number} branchId
|
|
304
315
|
* @param {*} [options] Override http request option.
|
|
305
316
|
* @throws {RequiredError}
|
|
306
317
|
* @memberof ChatsApi
|
|
307
318
|
*/
|
|
308
|
-
ChatsApi.prototype.getChats = function (options) {
|
|
319
|
+
ChatsApi.prototype.getChats = function (branchId, options) {
|
|
309
320
|
return __awaiter(this, void 0, void 0, function () {
|
|
310
321
|
var _this = this;
|
|
311
322
|
return __generator(this, function (_a) {
|
|
312
|
-
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
323
|
+
return [2 /*return*/, (0, exports.ChatsApiFp)(this.configuration).getChats(branchId, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
313
324
|
});
|
|
314
325
|
});
|
|
315
326
|
};
|
|
@@ -20,10 +20,11 @@ import { ContactsResponseDTO } from '../models';
|
|
|
20
20
|
export declare const ContactsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
|
+
* @param {number} branchId
|
|
23
24
|
* @param {*} [options] Override http request option.
|
|
24
25
|
* @throws {RequiredError}
|
|
25
26
|
*/
|
|
26
|
-
getContacts: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
27
|
+
getContacts: (branchId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
29
30
|
* ContactsApi - functional programming interface
|
|
@@ -32,10 +33,11 @@ export declare const ContactsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
32
33
|
export declare const ContactsApiFp: (configuration?: Configuration) => {
|
|
33
34
|
/**
|
|
34
35
|
*
|
|
36
|
+
* @param {number} branchId
|
|
35
37
|
* @param {*} [options] Override http request option.
|
|
36
38
|
* @throws {RequiredError}
|
|
37
39
|
*/
|
|
38
|
-
getContacts(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>>;
|
|
40
|
+
getContacts(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactsResponseDTO>>>;
|
|
39
41
|
};
|
|
40
42
|
/**
|
|
41
43
|
* ContactsApi - factory interface
|
|
@@ -44,10 +46,11 @@ export declare const ContactsApiFp: (configuration?: Configuration) => {
|
|
|
44
46
|
export declare const ContactsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
45
47
|
/**
|
|
46
48
|
*
|
|
49
|
+
* @param {number} branchId
|
|
47
50
|
* @param {*} [options] Override http request option.
|
|
48
51
|
* @throws {RequiredError}
|
|
49
52
|
*/
|
|
50
|
-
getContacts(options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
53
|
+
getContacts(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
51
54
|
};
|
|
52
55
|
/**
|
|
53
56
|
* ContactsApi - object-oriented interface
|
|
@@ -58,9 +61,10 @@ export declare const ContactsApiFactory: (configuration?: Configuration, basePat
|
|
|
58
61
|
export declare class ContactsApi extends BaseAPI {
|
|
59
62
|
/**
|
|
60
63
|
*
|
|
64
|
+
* @param {number} branchId
|
|
61
65
|
* @param {*} [options] Override http request option.
|
|
62
66
|
* @throws {RequiredError}
|
|
63
67
|
* @memberof ContactsApi
|
|
64
68
|
*/
|
|
65
|
-
getContacts(options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
69
|
+
getContacts(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactsResponseDTO>>;
|
|
66
70
|
}
|
|
@@ -98,18 +98,23 @@ var ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
98
98
|
return {
|
|
99
99
|
/**
|
|
100
100
|
*
|
|
101
|
+
* @param {number} branchId
|
|
101
102
|
* @param {*} [options] Override http request option.
|
|
102
103
|
* @throws {RequiredError}
|
|
103
104
|
*/
|
|
104
|
-
getContacts: function () {
|
|
105
|
+
getContacts: function (branchId_1) {
|
|
105
106
|
var args_1 = [];
|
|
106
|
-
for (var _i =
|
|
107
|
-
args_1[_i] = arguments[_i];
|
|
107
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
108
|
+
args_1[_i - 1] = arguments[_i];
|
|
108
109
|
}
|
|
109
|
-
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
110
|
+
return __awaiter(_this, __spreadArray([branchId_1], args_1, true), void 0, function (branchId, options) {
|
|
110
111
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
111
112
|
if (options === void 0) { options = {}; }
|
|
112
113
|
return __generator(this, function (_a) {
|
|
114
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
115
|
+
if (branchId === null || branchId === undefined) {
|
|
116
|
+
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getContacts.');
|
|
117
|
+
}
|
|
113
118
|
localVarPath = "/api/contacts";
|
|
114
119
|
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
115
120
|
if (configuration) {
|
|
@@ -118,6 +123,9 @@ var ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
118
123
|
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
119
124
|
localVarHeaderParameter = {};
|
|
120
125
|
localVarQueryParameter = {};
|
|
126
|
+
if (branchId !== undefined) {
|
|
127
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
128
|
+
}
|
|
121
129
|
query = new URLSearchParams(localVarUrlObj.search);
|
|
122
130
|
for (key in localVarQueryParameter) {
|
|
123
131
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -146,15 +154,16 @@ var ContactsApiFp = function (configuration) {
|
|
|
146
154
|
return {
|
|
147
155
|
/**
|
|
148
156
|
*
|
|
157
|
+
* @param {number} branchId
|
|
149
158
|
* @param {*} [options] Override http request option.
|
|
150
159
|
* @throws {RequiredError}
|
|
151
160
|
*/
|
|
152
|
-
getContacts: function (options) {
|
|
161
|
+
getContacts: function (branchId, options) {
|
|
153
162
|
return __awaiter(this, void 0, void 0, function () {
|
|
154
163
|
var localVarAxiosArgs;
|
|
155
164
|
return __generator(this, function (_a) {
|
|
156
165
|
switch (_a.label) {
|
|
157
|
-
case 0: return [4 /*yield*/, (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(options)];
|
|
166
|
+
case 0: return [4 /*yield*/, (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(branchId, options)];
|
|
158
167
|
case 1:
|
|
159
168
|
localVarAxiosArgs = _a.sent();
|
|
160
169
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -178,13 +187,14 @@ var ContactsApiFactory = function (configuration, basePath, axios) {
|
|
|
178
187
|
return {
|
|
179
188
|
/**
|
|
180
189
|
*
|
|
190
|
+
* @param {number} branchId
|
|
181
191
|
* @param {*} [options] Override http request option.
|
|
182
192
|
* @throws {RequiredError}
|
|
183
193
|
*/
|
|
184
|
-
getContacts: function (options) {
|
|
194
|
+
getContacts: function (branchId, options) {
|
|
185
195
|
return __awaiter(this, void 0, void 0, function () {
|
|
186
196
|
return __generator(this, function (_a) {
|
|
187
|
-
return [2 /*return*/, (0, exports.ContactsApiFp)(configuration).getContacts(options).then(function (request) { return request(axios, basePath); })];
|
|
197
|
+
return [2 /*return*/, (0, exports.ContactsApiFp)(configuration).getContacts(branchId, options).then(function (request) { return request(axios, basePath); })];
|
|
188
198
|
});
|
|
189
199
|
});
|
|
190
200
|
},
|
|
@@ -204,15 +214,16 @@ var ContactsApi = /** @class */ (function (_super) {
|
|
|
204
214
|
}
|
|
205
215
|
/**
|
|
206
216
|
*
|
|
217
|
+
* @param {number} branchId
|
|
207
218
|
* @param {*} [options] Override http request option.
|
|
208
219
|
* @throws {RequiredError}
|
|
209
220
|
* @memberof ContactsApi
|
|
210
221
|
*/
|
|
211
|
-
ContactsApi.prototype.getContacts = function (options) {
|
|
222
|
+
ContactsApi.prototype.getContacts = function (branchId, options) {
|
|
212
223
|
return __awaiter(this, void 0, void 0, function () {
|
|
213
224
|
var _this = this;
|
|
214
225
|
return __generator(this, function (_a) {
|
|
215
|
-
return [2 /*return*/, (0, exports.ContactsApiFp)(this.configuration).getContacts(options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
226
|
+
return [2 /*return*/, (0, exports.ContactsApiFp)(this.configuration).getContacts(branchId, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
216
227
|
});
|
|
217
228
|
});
|
|
218
229
|
};
|