@libgot/whatsapp-bridge-sdk 1.0.15 → 1.0.17
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/apis/messages-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/dist/apis/messages-api.d.ts +8 -4
- package/dist/apis/messages-api.js +21 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @1.0.
|
|
1
|
+
## @1.0.17
|
|
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.17 --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/apis/messages-api.ts
CHANGED
|
@@ -30,11 +30,16 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
30
30
|
return {
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
|
+
* @param {number} branchId
|
|
33
34
|
* @param {number} chatId
|
|
34
35
|
* @param {*} [options] Override http request option.
|
|
35
36
|
* @throws {RequiredError}
|
|
36
37
|
*/
|
|
37
|
-
getMessages: async (chatId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
|
+
getMessages: async (branchId: number, chatId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
40
|
+
if (branchId === null || branchId === undefined) {
|
|
41
|
+
throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getMessages.');
|
|
42
|
+
}
|
|
38
43
|
// verify required parameter 'chatId' is not null or undefined
|
|
39
44
|
if (chatId === null || chatId === undefined) {
|
|
40
45
|
throw new RequiredError('chatId','Required parameter chatId was null or undefined when calling getMessages.');
|
|
@@ -50,6 +55,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
50
55
|
const localVarHeaderParameter = {} as any;
|
|
51
56
|
const localVarQueryParameter = {} as any;
|
|
52
57
|
|
|
58
|
+
if (branchId !== undefined) {
|
|
59
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
60
|
+
}
|
|
61
|
+
|
|
53
62
|
if (chatId !== undefined) {
|
|
54
63
|
localVarQueryParameter['chatId'] = chatId;
|
|
55
64
|
}
|
|
@@ -165,12 +174,13 @@ export const MessagesApiFp = function(configuration?: Configuration) {
|
|
|
165
174
|
return {
|
|
166
175
|
/**
|
|
167
176
|
*
|
|
177
|
+
* @param {number} branchId
|
|
168
178
|
* @param {number} chatId
|
|
169
179
|
* @param {*} [options] Override http request option.
|
|
170
180
|
* @throws {RequiredError}
|
|
171
181
|
*/
|
|
172
|
-
async getMessages(chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>> {
|
|
173
|
-
const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).getMessages(chatId, options);
|
|
182
|
+
async getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>> {
|
|
183
|
+
const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).getMessages(branchId, chatId, options);
|
|
174
184
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
175
185
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
176
186
|
return axios.request(axiosRequestArgs);
|
|
@@ -213,12 +223,13 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
|
|
|
213
223
|
return {
|
|
214
224
|
/**
|
|
215
225
|
*
|
|
226
|
+
* @param {number} branchId
|
|
216
227
|
* @param {number} chatId
|
|
217
228
|
* @param {*} [options] Override http request option.
|
|
218
229
|
* @throws {RequiredError}
|
|
219
230
|
*/
|
|
220
|
-
async getMessages(chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>> {
|
|
221
|
-
return MessagesApiFp(configuration).getMessages(chatId, options).then((request) => request(axios, basePath));
|
|
231
|
+
async getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>> {
|
|
232
|
+
return MessagesApiFp(configuration).getMessages(branchId, chatId, options).then((request) => request(axios, basePath));
|
|
222
233
|
},
|
|
223
234
|
/**
|
|
224
235
|
*
|
|
@@ -250,13 +261,14 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
|
|
|
250
261
|
export class MessagesApi extends BaseAPI {
|
|
251
262
|
/**
|
|
252
263
|
*
|
|
264
|
+
* @param {number} branchId
|
|
253
265
|
* @param {number} chatId
|
|
254
266
|
* @param {*} [options] Override http request option.
|
|
255
267
|
* @throws {RequiredError}
|
|
256
268
|
* @memberof MessagesApi
|
|
257
269
|
*/
|
|
258
|
-
public async getMessages(chatId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<MessageResponseDto>> {
|
|
259
|
-
return MessagesApiFp(this.configuration).getMessages(chatId, options).then((request) => request(this.axios, this.basePath));
|
|
270
|
+
public async getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<MessageResponseDto>> {
|
|
271
|
+
return MessagesApiFp(this.configuration).getMessages(branchId, chatId, options).then((request) => request(this.axios, this.basePath));
|
|
260
272
|
}
|
|
261
273
|
/**
|
|
262
274
|
*
|
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
|
};
|
|
@@ -24,11 +24,12 @@ import { SendTextDto } from '../models';
|
|
|
24
24
|
export declare const MessagesApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
+
* @param {number} branchId
|
|
27
28
|
* @param {number} chatId
|
|
28
29
|
* @param {*} [options] Override http request option.
|
|
29
30
|
* @throws {RequiredError}
|
|
30
31
|
*/
|
|
31
|
-
getMessages: (chatId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
|
+
getMessages: (branchId: number, chatId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
33
|
/**
|
|
33
34
|
*
|
|
34
35
|
* @param {ReadMessageDto} body
|
|
@@ -51,11 +52,12 @@ export declare const MessagesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
51
52
|
export declare const MessagesApiFp: (configuration?: Configuration) => {
|
|
52
53
|
/**
|
|
53
54
|
*
|
|
55
|
+
* @param {number} branchId
|
|
54
56
|
* @param {number} chatId
|
|
55
57
|
* @param {*} [options] Override http request option.
|
|
56
58
|
* @throws {RequiredError}
|
|
57
59
|
*/
|
|
58
|
-
getMessages(chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>>;
|
|
60
|
+
getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>>;
|
|
59
61
|
/**
|
|
60
62
|
*
|
|
61
63
|
* @param {ReadMessageDto} body
|
|
@@ -78,11 +80,12 @@ export declare const MessagesApiFp: (configuration?: Configuration) => {
|
|
|
78
80
|
export declare const MessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
79
81
|
/**
|
|
80
82
|
*
|
|
83
|
+
* @param {number} branchId
|
|
81
84
|
* @param {number} chatId
|
|
82
85
|
* @param {*} [options] Override http request option.
|
|
83
86
|
* @throws {RequiredError}
|
|
84
87
|
*/
|
|
85
|
-
getMessages(chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
88
|
+
getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
86
89
|
/**
|
|
87
90
|
*
|
|
88
91
|
* @param {ReadMessageDto} body
|
|
@@ -107,12 +110,13 @@ export declare const MessagesApiFactory: (configuration?: Configuration, basePat
|
|
|
107
110
|
export declare class MessagesApi extends BaseAPI {
|
|
108
111
|
/**
|
|
109
112
|
*
|
|
113
|
+
* @param {number} branchId
|
|
110
114
|
* @param {number} chatId
|
|
111
115
|
* @param {*} [options] Override http request option.
|
|
112
116
|
* @throws {RequiredError}
|
|
113
117
|
* @memberof MessagesApi
|
|
114
118
|
*/
|
|
115
|
-
getMessages(chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
119
|
+
getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
116
120
|
/**
|
|
117
121
|
*
|
|
118
122
|
* @param {ReadMessageDto} body
|
|
@@ -98,19 +98,24 @@ var MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
98
98
|
return {
|
|
99
99
|
/**
|
|
100
100
|
*
|
|
101
|
+
* @param {number} branchId
|
|
101
102
|
* @param {number} chatId
|
|
102
103
|
* @param {*} [options] Override http request option.
|
|
103
104
|
* @throws {RequiredError}
|
|
104
105
|
*/
|
|
105
|
-
getMessages: function (chatId_1) {
|
|
106
|
+
getMessages: function (branchId_1, chatId_1) {
|
|
106
107
|
var args_1 = [];
|
|
107
|
-
for (var _i =
|
|
108
|
-
args_1[_i -
|
|
108
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
109
|
+
args_1[_i - 2] = arguments[_i];
|
|
109
110
|
}
|
|
110
|
-
return __awaiter(_this, __spreadArray([chatId_1], args_1, true), void 0, function (chatId, options) {
|
|
111
|
+
return __awaiter(_this, __spreadArray([branchId_1, chatId_1], args_1, true), void 0, function (branchId, chatId, options) {
|
|
111
112
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions;
|
|
112
113
|
if (options === void 0) { options = {}; }
|
|
113
114
|
return __generator(this, function (_a) {
|
|
115
|
+
// verify required parameter 'branchId' is not null or undefined
|
|
116
|
+
if (branchId === null || branchId === undefined) {
|
|
117
|
+
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getMessages.');
|
|
118
|
+
}
|
|
114
119
|
// verify required parameter 'chatId' is not null or undefined
|
|
115
120
|
if (chatId === null || chatId === undefined) {
|
|
116
121
|
throw new base_1.RequiredError('chatId', 'Required parameter chatId was null or undefined when calling getMessages.');
|
|
@@ -123,6 +128,9 @@ var MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
123
128
|
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
124
129
|
localVarHeaderParameter = {};
|
|
125
130
|
localVarQueryParameter = {};
|
|
131
|
+
if (branchId !== undefined) {
|
|
132
|
+
localVarQueryParameter['branchId'] = branchId;
|
|
133
|
+
}
|
|
126
134
|
if (chatId !== undefined) {
|
|
127
135
|
localVarQueryParameter['chatId'] = chatId;
|
|
128
136
|
}
|
|
@@ -248,16 +256,17 @@ var MessagesApiFp = function (configuration) {
|
|
|
248
256
|
return {
|
|
249
257
|
/**
|
|
250
258
|
*
|
|
259
|
+
* @param {number} branchId
|
|
251
260
|
* @param {number} chatId
|
|
252
261
|
* @param {*} [options] Override http request option.
|
|
253
262
|
* @throws {RequiredError}
|
|
254
263
|
*/
|
|
255
|
-
getMessages: function (chatId, options) {
|
|
264
|
+
getMessages: function (branchId, chatId, options) {
|
|
256
265
|
return __awaiter(this, void 0, void 0, function () {
|
|
257
266
|
var localVarAxiosArgs;
|
|
258
267
|
return __generator(this, function (_a) {
|
|
259
268
|
switch (_a.label) {
|
|
260
|
-
case 0: return [4 /*yield*/, (0, exports.MessagesApiAxiosParamCreator)(configuration).getMessages(chatId, options)];
|
|
269
|
+
case 0: return [4 /*yield*/, (0, exports.MessagesApiAxiosParamCreator)(configuration).getMessages(branchId, chatId, options)];
|
|
261
270
|
case 1:
|
|
262
271
|
localVarAxiosArgs = _a.sent();
|
|
263
272
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -329,14 +338,15 @@ var MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
329
338
|
return {
|
|
330
339
|
/**
|
|
331
340
|
*
|
|
341
|
+
* @param {number} branchId
|
|
332
342
|
* @param {number} chatId
|
|
333
343
|
* @param {*} [options] Override http request option.
|
|
334
344
|
* @throws {RequiredError}
|
|
335
345
|
*/
|
|
336
|
-
getMessages: function (chatId, options) {
|
|
346
|
+
getMessages: function (branchId, chatId, options) {
|
|
337
347
|
return __awaiter(this, void 0, void 0, function () {
|
|
338
348
|
return __generator(this, function (_a) {
|
|
339
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).getMessages(chatId, options).then(function (request) { return request(axios, basePath); })];
|
|
349
|
+
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).getMessages(branchId, chatId, options).then(function (request) { return request(axios, basePath); })];
|
|
340
350
|
});
|
|
341
351
|
});
|
|
342
352
|
},
|
|
@@ -382,16 +392,17 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
382
392
|
}
|
|
383
393
|
/**
|
|
384
394
|
*
|
|
395
|
+
* @param {number} branchId
|
|
385
396
|
* @param {number} chatId
|
|
386
397
|
* @param {*} [options] Override http request option.
|
|
387
398
|
* @throws {RequiredError}
|
|
388
399
|
* @memberof MessagesApi
|
|
389
400
|
*/
|
|
390
|
-
MessagesApi.prototype.getMessages = function (chatId, options) {
|
|
401
|
+
MessagesApi.prototype.getMessages = function (branchId, chatId, options) {
|
|
391
402
|
return __awaiter(this, void 0, void 0, function () {
|
|
392
403
|
var _this = this;
|
|
393
404
|
return __generator(this, function (_a) {
|
|
394
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).getMessages(chatId, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
405
|
+
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).getMessages(branchId, chatId, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
395
406
|
});
|
|
396
407
|
});
|
|
397
408
|
};
|