@libgot/whatsapp-bridge-sdk 1.0.39 → 1.0.40-rc.2
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/.nvmrc +1 -1
- package/README.md +2 -2
- package/apis/cellphone-api.ts +19 -16
- package/apis/chats-api.ts +76 -28
- package/apis/contacts-api.ts +38 -14
- package/apis/messages-api.ts +76 -28
- package/apis/sessions-api.ts +38 -14
- package/dist/apis/cellphone-api.d.ts +8 -4
- package/dist/apis/cellphone-api.js +18 -15
- package/dist/apis/chats-api.d.ts +32 -16
- package/dist/apis/chats-api.js +72 -28
- package/dist/apis/contacts-api.d.ts +16 -8
- package/dist/apis/contacts-api.js +36 -14
- package/dist/apis/messages-api.d.ts +32 -16
- package/dist/apis/messages-api.js +72 -28
- package/dist/apis/sessions-api.d.ts +16 -8
- package/dist/apis/sessions-api.js +36 -14
- package/package.json +1 -1
- package/publish.sh +1 -1
|
@@ -37,10 +37,11 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
37
37
|
*
|
|
38
38
|
* @param {number} cellphone
|
|
39
39
|
* @param {number} branchId
|
|
40
|
+
* @param {string} apikey
|
|
40
41
|
* @param {*} [options] Override http request option.
|
|
41
42
|
* @throws {RequiredError}
|
|
42
43
|
*/
|
|
43
|
-
getChatFromCellphone: (cellphone_1, branchId_1, ...args_1) => __awaiter(this, [cellphone_1, branchId_1, ...args_1], void 0, function* (cellphone, branchId, options = {}) {
|
|
44
|
+
getChatFromCellphone: (cellphone_1, branchId_1, apikey_1, ...args_1) => __awaiter(this, [cellphone_1, branchId_1, apikey_1, ...args_1], void 0, function* (cellphone, branchId, apikey, options = {}) {
|
|
44
45
|
// verify required parameter 'cellphone' is not null or undefined
|
|
45
46
|
if (cellphone === null || cellphone === undefined) {
|
|
46
47
|
throw new base_1.RequiredError('cellphone', 'Required parameter cellphone was null or undefined when calling getChatFromCellphone.');
|
|
@@ -49,6 +50,10 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
49
50
|
if (branchId === null || branchId === undefined) {
|
|
50
51
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getChatFromCellphone.');
|
|
51
52
|
}
|
|
53
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
54
|
+
if (apikey === null || apikey === undefined) {
|
|
55
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getChatFromCellphone.');
|
|
56
|
+
}
|
|
52
57
|
const localVarPath = `/api/contacts/{cellphone}/chat`
|
|
53
58
|
.replace(`{${"cellphone"}}`, encodeURIComponent(String(cellphone)));
|
|
54
59
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -63,6 +68,9 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
63
68
|
if (branchId !== undefined) {
|
|
64
69
|
localVarQueryParameter['branchId'] = branchId;
|
|
65
70
|
}
|
|
71
|
+
if (apikey !== undefined && apikey !== null) {
|
|
72
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
73
|
+
}
|
|
66
74
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
67
75
|
for (const key in localVarQueryParameter) {
|
|
68
76
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -81,14 +89,19 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
81
89
|
/**
|
|
82
90
|
*
|
|
83
91
|
* @param {number} branchId
|
|
92
|
+
* @param {string} apikey
|
|
84
93
|
* @param {*} [options] Override http request option.
|
|
85
94
|
* @throws {RequiredError}
|
|
86
95
|
*/
|
|
87
|
-
getContacts: (branchId_1, ...args_1) => __awaiter(this, [branchId_1, ...args_1], void 0, function* (branchId, options = {}) {
|
|
96
|
+
getContacts: (branchId_1, apikey_1, ...args_1) => __awaiter(this, [branchId_1, apikey_1, ...args_1], void 0, function* (branchId, apikey, options = {}) {
|
|
88
97
|
// verify required parameter 'branchId' is not null or undefined
|
|
89
98
|
if (branchId === null || branchId === undefined) {
|
|
90
99
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getContacts.');
|
|
91
100
|
}
|
|
101
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
102
|
+
if (apikey === null || apikey === undefined) {
|
|
103
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getContacts.');
|
|
104
|
+
}
|
|
92
105
|
const localVarPath = `/api/contacts`;
|
|
93
106
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
94
107
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -102,6 +115,9 @@ const ContactsApiAxiosParamCreator = function (configuration) {
|
|
|
102
115
|
if (branchId !== undefined) {
|
|
103
116
|
localVarQueryParameter['branchId'] = branchId;
|
|
104
117
|
}
|
|
118
|
+
if (apikey !== undefined && apikey !== null) {
|
|
119
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
120
|
+
}
|
|
105
121
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
106
122
|
for (const key in localVarQueryParameter) {
|
|
107
123
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -130,12 +146,13 @@ const ContactsApiFp = function (configuration) {
|
|
|
130
146
|
*
|
|
131
147
|
* @param {number} cellphone
|
|
132
148
|
* @param {number} branchId
|
|
149
|
+
* @param {string} apikey
|
|
133
150
|
* @param {*} [options] Override http request option.
|
|
134
151
|
* @throws {RequiredError}
|
|
135
152
|
*/
|
|
136
|
-
getChatFromCellphone(cellphone, branchId, options) {
|
|
153
|
+
getChatFromCellphone(cellphone, branchId, apikey, options) {
|
|
137
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getChatFromCellphone(cellphone, branchId, options);
|
|
155
|
+
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getChatFromCellphone(cellphone, branchId, apikey, options);
|
|
139
156
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
140
157
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
141
158
|
return axios.request(axiosRequestArgs);
|
|
@@ -145,12 +162,13 @@ const ContactsApiFp = function (configuration) {
|
|
|
145
162
|
/**
|
|
146
163
|
*
|
|
147
164
|
* @param {number} branchId
|
|
165
|
+
* @param {string} apikey
|
|
148
166
|
* @param {*} [options] Override http request option.
|
|
149
167
|
* @throws {RequiredError}
|
|
150
168
|
*/
|
|
151
|
-
getContacts(branchId, options) {
|
|
169
|
+
getContacts(branchId, apikey, options) {
|
|
152
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(branchId, options);
|
|
171
|
+
const localVarAxiosArgs = yield (0, exports.ContactsApiAxiosParamCreator)(configuration).getContacts(branchId, apikey, options);
|
|
154
172
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
155
173
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
156
174
|
return axios.request(axiosRequestArgs);
|
|
@@ -170,23 +188,25 @@ const ContactsApiFactory = function (configuration, basePath, axios) {
|
|
|
170
188
|
*
|
|
171
189
|
* @param {number} cellphone
|
|
172
190
|
* @param {number} branchId
|
|
191
|
+
* @param {string} apikey
|
|
173
192
|
* @param {*} [options] Override http request option.
|
|
174
193
|
* @throws {RequiredError}
|
|
175
194
|
*/
|
|
176
|
-
getChatFromCellphone(cellphone, branchId, options) {
|
|
195
|
+
getChatFromCellphone(cellphone, branchId, apikey, options) {
|
|
177
196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
return (0, exports.ContactsApiFp)(configuration).getChatFromCellphone(cellphone, branchId, options).then((request) => request(axios, basePath));
|
|
197
|
+
return (0, exports.ContactsApiFp)(configuration).getChatFromCellphone(cellphone, branchId, apikey, options).then((request) => request(axios, basePath));
|
|
179
198
|
});
|
|
180
199
|
},
|
|
181
200
|
/**
|
|
182
201
|
*
|
|
183
202
|
* @param {number} branchId
|
|
203
|
+
* @param {string} apikey
|
|
184
204
|
* @param {*} [options] Override http request option.
|
|
185
205
|
* @throws {RequiredError}
|
|
186
206
|
*/
|
|
187
|
-
getContacts(branchId, options) {
|
|
207
|
+
getContacts(branchId, apikey, options) {
|
|
188
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
-
return (0, exports.ContactsApiFp)(configuration).getContacts(branchId, options).then((request) => request(axios, basePath));
|
|
209
|
+
return (0, exports.ContactsApiFp)(configuration).getContacts(branchId, apikey, options).then((request) => request(axios, basePath));
|
|
190
210
|
});
|
|
191
211
|
},
|
|
192
212
|
};
|
|
@@ -203,25 +223,27 @@ class ContactsApi extends base_1.BaseAPI {
|
|
|
203
223
|
*
|
|
204
224
|
* @param {number} cellphone
|
|
205
225
|
* @param {number} branchId
|
|
226
|
+
* @param {string} apikey
|
|
206
227
|
* @param {*} [options] Override http request option.
|
|
207
228
|
* @throws {RequiredError}
|
|
208
229
|
* @memberof ContactsApi
|
|
209
230
|
*/
|
|
210
|
-
getChatFromCellphone(cellphone, branchId, options) {
|
|
231
|
+
getChatFromCellphone(cellphone, branchId, apikey, options) {
|
|
211
232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
return (0, exports.ContactsApiFp)(this.configuration).getChatFromCellphone(cellphone, branchId, options).then((request) => request(this.axios, this.basePath));
|
|
233
|
+
return (0, exports.ContactsApiFp)(this.configuration).getChatFromCellphone(cellphone, branchId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
213
234
|
});
|
|
214
235
|
}
|
|
215
236
|
/**
|
|
216
237
|
*
|
|
217
238
|
* @param {number} branchId
|
|
239
|
+
* @param {string} apikey
|
|
218
240
|
* @param {*} [options] Override http request option.
|
|
219
241
|
* @throws {RequiredError}
|
|
220
242
|
* @memberof ContactsApi
|
|
221
243
|
*/
|
|
222
|
-
getContacts(branchId, options) {
|
|
244
|
+
getContacts(branchId, apikey, options) {
|
|
223
245
|
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
return (0, exports.ContactsApiFp)(this.configuration).getContacts(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
246
|
+
return (0, exports.ContactsApiFp)(this.configuration).getContacts(branchId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
225
247
|
});
|
|
226
248
|
}
|
|
227
249
|
}
|
|
@@ -27,31 +27,35 @@ export declare const MessagesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
27
27
|
*
|
|
28
28
|
* @param {number} branchId
|
|
29
29
|
* @param {number} chatId
|
|
30
|
+
* @param {string} apikey
|
|
30
31
|
* @param {*} [options] Override http request option.
|
|
31
32
|
* @throws {RequiredError}
|
|
32
33
|
*/
|
|
33
|
-
getMessages: (branchId: number, chatId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
|
+
getMessages: (branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
34
35
|
/**
|
|
35
36
|
*
|
|
36
37
|
* @param {ReadMessageDto} body
|
|
38
|
+
* @param {string} apikey
|
|
37
39
|
* @param {*} [options] Override http request option.
|
|
38
40
|
* @throws {RequiredError}
|
|
39
41
|
*/
|
|
40
|
-
readMessage: (body: ReadMessageDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
42
|
+
readMessage: (body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
41
43
|
/**
|
|
42
44
|
*
|
|
43
45
|
* @param {SendTemplateDataDto} body
|
|
46
|
+
* @param {string} apikey
|
|
44
47
|
* @param {*} [options] Override http request option.
|
|
45
48
|
* @throws {RequiredError}
|
|
46
49
|
*/
|
|
47
|
-
sendTemplateMessage: (body: SendTemplateDataDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
50
|
+
sendTemplateMessage: (body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
48
51
|
/**
|
|
49
52
|
*
|
|
50
53
|
* @param {SendTextDto} body
|
|
54
|
+
* @param {string} apikey
|
|
51
55
|
* @param {*} [options] Override http request option.
|
|
52
56
|
* @throws {RequiredError}
|
|
53
57
|
*/
|
|
54
|
-
sendTextMessage: (body: SendTextDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
58
|
+
sendTextMessage: (body: SendTextDto, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
55
59
|
};
|
|
56
60
|
/**
|
|
57
61
|
* MessagesApi - functional programming interface
|
|
@@ -62,31 +66,35 @@ export declare const MessagesApiFp: (configuration?: Configuration) => {
|
|
|
62
66
|
*
|
|
63
67
|
* @param {number} branchId
|
|
64
68
|
* @param {number} chatId
|
|
69
|
+
* @param {string} apikey
|
|
65
70
|
* @param {*} [options] Override http request option.
|
|
66
71
|
* @throws {RequiredError}
|
|
67
72
|
*/
|
|
68
|
-
getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>>;
|
|
73
|
+
getMessages(branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>>;
|
|
69
74
|
/**
|
|
70
75
|
*
|
|
71
76
|
* @param {ReadMessageDto} body
|
|
77
|
+
* @param {string} apikey
|
|
72
78
|
* @param {*} [options] Override http request option.
|
|
73
79
|
* @throws {RequiredError}
|
|
74
80
|
*/
|
|
75
|
-
readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>>;
|
|
81
|
+
readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>>;
|
|
76
82
|
/**
|
|
77
83
|
*
|
|
78
84
|
* @param {SendTemplateDataDto} body
|
|
85
|
+
* @param {string} apikey
|
|
79
86
|
* @param {*} [options] Override http request option.
|
|
80
87
|
* @throws {RequiredError}
|
|
81
88
|
*/
|
|
82
|
-
sendTemplateMessage(body: SendTemplateDataDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>>;
|
|
89
|
+
sendTemplateMessage(body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>>;
|
|
83
90
|
/**
|
|
84
91
|
*
|
|
85
92
|
* @param {SendTextDto} body
|
|
93
|
+
* @param {string} apikey
|
|
86
94
|
* @param {*} [options] Override http request option.
|
|
87
95
|
* @throws {RequiredError}
|
|
88
96
|
*/
|
|
89
|
-
sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>>;
|
|
97
|
+
sendTextMessage(body: SendTextDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>>;
|
|
90
98
|
};
|
|
91
99
|
/**
|
|
92
100
|
* MessagesApi - factory interface
|
|
@@ -97,31 +105,35 @@ export declare const MessagesApiFactory: (configuration?: Configuration, basePat
|
|
|
97
105
|
*
|
|
98
106
|
* @param {number} branchId
|
|
99
107
|
* @param {number} chatId
|
|
108
|
+
* @param {string} apikey
|
|
100
109
|
* @param {*} [options] Override http request option.
|
|
101
110
|
* @throws {RequiredError}
|
|
102
111
|
*/
|
|
103
|
-
getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
112
|
+
getMessages(branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
104
113
|
/**
|
|
105
114
|
*
|
|
106
115
|
* @param {ReadMessageDto} body
|
|
116
|
+
* @param {string} apikey
|
|
107
117
|
* @param {*} [options] Override http request option.
|
|
108
118
|
* @throws {RequiredError}
|
|
109
119
|
*/
|
|
110
|
-
readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
|
|
120
|
+
readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
|
|
111
121
|
/**
|
|
112
122
|
*
|
|
113
123
|
* @param {SendTemplateDataDto} body
|
|
124
|
+
* @param {string} apikey
|
|
114
125
|
* @param {*} [options] Override http request option.
|
|
115
126
|
* @throws {RequiredError}
|
|
116
127
|
*/
|
|
117
|
-
sendTemplateMessage(body: SendTemplateDataDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
128
|
+
sendTemplateMessage(body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
118
129
|
/**
|
|
119
130
|
*
|
|
120
131
|
* @param {SendTextDto} body
|
|
132
|
+
* @param {string} apikey
|
|
121
133
|
* @param {*} [options] Override http request option.
|
|
122
134
|
* @throws {RequiredError}
|
|
123
135
|
*/
|
|
124
|
-
sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
136
|
+
sendTextMessage(body: SendTextDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
125
137
|
};
|
|
126
138
|
/**
|
|
127
139
|
* MessagesApi - object-oriented interface
|
|
@@ -134,33 +146,37 @@ export declare class MessagesApi extends BaseAPI {
|
|
|
134
146
|
*
|
|
135
147
|
* @param {number} branchId
|
|
136
148
|
* @param {number} chatId
|
|
149
|
+
* @param {string} apikey
|
|
137
150
|
* @param {*} [options] Override http request option.
|
|
138
151
|
* @throws {RequiredError}
|
|
139
152
|
* @memberof MessagesApi
|
|
140
153
|
*/
|
|
141
|
-
getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
154
|
+
getMessages(branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
142
155
|
/**
|
|
143
156
|
*
|
|
144
157
|
* @param {ReadMessageDto} body
|
|
158
|
+
* @param {string} apikey
|
|
145
159
|
* @param {*} [options] Override http request option.
|
|
146
160
|
* @throws {RequiredError}
|
|
147
161
|
* @memberof MessagesApi
|
|
148
162
|
*/
|
|
149
|
-
readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
|
|
163
|
+
readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
|
|
150
164
|
/**
|
|
151
165
|
*
|
|
152
166
|
* @param {SendTemplateDataDto} body
|
|
167
|
+
* @param {string} apikey
|
|
153
168
|
* @param {*} [options] Override http request option.
|
|
154
169
|
* @throws {RequiredError}
|
|
155
170
|
* @memberof MessagesApi
|
|
156
171
|
*/
|
|
157
|
-
sendTemplateMessage(body: SendTemplateDataDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
172
|
+
sendTemplateMessage(body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
158
173
|
/**
|
|
159
174
|
*
|
|
160
175
|
* @param {SendTextDto} body
|
|
176
|
+
* @param {string} apikey
|
|
161
177
|
* @param {*} [options] Override http request option.
|
|
162
178
|
* @throws {RequiredError}
|
|
163
179
|
* @memberof MessagesApi
|
|
164
180
|
*/
|
|
165
|
-
sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
181
|
+
sendTextMessage(body: SendTextDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
166
182
|
}
|
|
@@ -37,10 +37,11 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
37
37
|
*
|
|
38
38
|
* @param {number} branchId
|
|
39
39
|
* @param {number} chatId
|
|
40
|
+
* @param {string} apikey
|
|
40
41
|
* @param {*} [options] Override http request option.
|
|
41
42
|
* @throws {RequiredError}
|
|
42
43
|
*/
|
|
43
|
-
getMessages: (branchId_1, chatId_1, ...args_1) => __awaiter(this, [branchId_1, chatId_1, ...args_1], void 0, function* (branchId, chatId, options = {}) {
|
|
44
|
+
getMessages: (branchId_1, chatId_1, apikey_1, ...args_1) => __awaiter(this, [branchId_1, chatId_1, apikey_1, ...args_1], void 0, function* (branchId, chatId, apikey, options = {}) {
|
|
44
45
|
// verify required parameter 'branchId' is not null or undefined
|
|
45
46
|
if (branchId === null || branchId === undefined) {
|
|
46
47
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getMessages.');
|
|
@@ -49,6 +50,10 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
49
50
|
if (chatId === null || chatId === undefined) {
|
|
50
51
|
throw new base_1.RequiredError('chatId', 'Required parameter chatId was null or undefined when calling getMessages.');
|
|
51
52
|
}
|
|
53
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
54
|
+
if (apikey === null || apikey === undefined) {
|
|
55
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getMessages.');
|
|
56
|
+
}
|
|
52
57
|
const localVarPath = `/api/messages`;
|
|
53
58
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54
59
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -65,6 +70,9 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
65
70
|
if (chatId !== undefined) {
|
|
66
71
|
localVarQueryParameter['chatId'] = chatId;
|
|
67
72
|
}
|
|
73
|
+
if (apikey !== undefined && apikey !== null) {
|
|
74
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
75
|
+
}
|
|
68
76
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
69
77
|
for (const key in localVarQueryParameter) {
|
|
70
78
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -83,14 +91,19 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
83
91
|
/**
|
|
84
92
|
*
|
|
85
93
|
* @param {ReadMessageDto} body
|
|
94
|
+
* @param {string} apikey
|
|
86
95
|
* @param {*} [options] Override http request option.
|
|
87
96
|
* @throws {RequiredError}
|
|
88
97
|
*/
|
|
89
|
-
readMessage: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
98
|
+
readMessage: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
90
99
|
// verify required parameter 'body' is not null or undefined
|
|
91
100
|
if (body === null || body === undefined) {
|
|
92
101
|
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling readMessage.');
|
|
93
102
|
}
|
|
103
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
104
|
+
if (apikey === null || apikey === undefined) {
|
|
105
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling readMessage.');
|
|
106
|
+
}
|
|
94
107
|
const localVarPath = `/api/messages/read`;
|
|
95
108
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
96
109
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -101,6 +114,9 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
101
114
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
102
115
|
const localVarHeaderParameter = {};
|
|
103
116
|
const localVarQueryParameter = {};
|
|
117
|
+
if (apikey !== undefined && apikey !== null) {
|
|
118
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
119
|
+
}
|
|
104
120
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
105
121
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
106
122
|
for (const key in localVarQueryParameter) {
|
|
@@ -122,14 +138,19 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
122
138
|
/**
|
|
123
139
|
*
|
|
124
140
|
* @param {SendTemplateDataDto} body
|
|
141
|
+
* @param {string} apikey
|
|
125
142
|
* @param {*} [options] Override http request option.
|
|
126
143
|
* @throws {RequiredError}
|
|
127
144
|
*/
|
|
128
|
-
sendTemplateMessage: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
145
|
+
sendTemplateMessage: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
129
146
|
// verify required parameter 'body' is not null or undefined
|
|
130
147
|
if (body === null || body === undefined) {
|
|
131
148
|
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling sendTemplateMessage.');
|
|
132
149
|
}
|
|
150
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
151
|
+
if (apikey === null || apikey === undefined) {
|
|
152
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling sendTemplateMessage.');
|
|
153
|
+
}
|
|
133
154
|
const localVarPath = `/api/messages/send-template`;
|
|
134
155
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
135
156
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -140,6 +161,9 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
140
161
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
141
162
|
const localVarHeaderParameter = {};
|
|
142
163
|
const localVarQueryParameter = {};
|
|
164
|
+
if (apikey !== undefined && apikey !== null) {
|
|
165
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
166
|
+
}
|
|
143
167
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
144
168
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
145
169
|
for (const key in localVarQueryParameter) {
|
|
@@ -161,14 +185,19 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
161
185
|
/**
|
|
162
186
|
*
|
|
163
187
|
* @param {SendTextDto} body
|
|
188
|
+
* @param {string} apikey
|
|
164
189
|
* @param {*} [options] Override http request option.
|
|
165
190
|
* @throws {RequiredError}
|
|
166
191
|
*/
|
|
167
|
-
sendTextMessage: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
192
|
+
sendTextMessage: (body_1, apikey_1, ...args_1) => __awaiter(this, [body_1, apikey_1, ...args_1], void 0, function* (body, apikey, options = {}) {
|
|
168
193
|
// verify required parameter 'body' is not null or undefined
|
|
169
194
|
if (body === null || body === undefined) {
|
|
170
195
|
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling sendTextMessage.');
|
|
171
196
|
}
|
|
197
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
198
|
+
if (apikey === null || apikey === undefined) {
|
|
199
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling sendTextMessage.');
|
|
200
|
+
}
|
|
172
201
|
const localVarPath = `/api/messages/send-text`;
|
|
173
202
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
174
203
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -179,6 +208,9 @@ const MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
179
208
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
180
209
|
const localVarHeaderParameter = {};
|
|
181
210
|
const localVarQueryParameter = {};
|
|
211
|
+
if (apikey !== undefined && apikey !== null) {
|
|
212
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
213
|
+
}
|
|
182
214
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
183
215
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
184
216
|
for (const key in localVarQueryParameter) {
|
|
@@ -210,12 +242,13 @@ const MessagesApiFp = function (configuration) {
|
|
|
210
242
|
*
|
|
211
243
|
* @param {number} branchId
|
|
212
244
|
* @param {number} chatId
|
|
245
|
+
* @param {string} apikey
|
|
213
246
|
* @param {*} [options] Override http request option.
|
|
214
247
|
* @throws {RequiredError}
|
|
215
248
|
*/
|
|
216
|
-
getMessages(branchId, chatId, options) {
|
|
249
|
+
getMessages(branchId, chatId, apikey, options) {
|
|
217
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
-
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).getMessages(branchId, chatId, options);
|
|
251
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).getMessages(branchId, chatId, apikey, options);
|
|
219
252
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
220
253
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
221
254
|
return axios.request(axiosRequestArgs);
|
|
@@ -225,12 +258,13 @@ const MessagesApiFp = function (configuration) {
|
|
|
225
258
|
/**
|
|
226
259
|
*
|
|
227
260
|
* @param {ReadMessageDto} body
|
|
261
|
+
* @param {string} apikey
|
|
228
262
|
* @param {*} [options] Override http request option.
|
|
229
263
|
* @throws {RequiredError}
|
|
230
264
|
*/
|
|
231
|
-
readMessage(body, options) {
|
|
265
|
+
readMessage(body, apikey, options) {
|
|
232
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
-
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).readMessage(body, options);
|
|
267
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).readMessage(body, apikey, options);
|
|
234
268
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
235
269
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
236
270
|
return axios.request(axiosRequestArgs);
|
|
@@ -240,12 +274,13 @@ const MessagesApiFp = function (configuration) {
|
|
|
240
274
|
/**
|
|
241
275
|
*
|
|
242
276
|
* @param {SendTemplateDataDto} body
|
|
277
|
+
* @param {string} apikey
|
|
243
278
|
* @param {*} [options] Override http request option.
|
|
244
279
|
* @throws {RequiredError}
|
|
245
280
|
*/
|
|
246
|
-
sendTemplateMessage(body, options) {
|
|
281
|
+
sendTemplateMessage(body, apikey, options) {
|
|
247
282
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
-
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTemplateMessage(body, options);
|
|
283
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTemplateMessage(body, apikey, options);
|
|
249
284
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
250
285
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
251
286
|
return axios.request(axiosRequestArgs);
|
|
@@ -255,12 +290,13 @@ const MessagesApiFp = function (configuration) {
|
|
|
255
290
|
/**
|
|
256
291
|
*
|
|
257
292
|
* @param {SendTextDto} body
|
|
293
|
+
* @param {string} apikey
|
|
258
294
|
* @param {*} [options] Override http request option.
|
|
259
295
|
* @throws {RequiredError}
|
|
260
296
|
*/
|
|
261
|
-
sendTextMessage(body, options) {
|
|
297
|
+
sendTextMessage(body, apikey, options) {
|
|
262
298
|
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
-
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTextMessage(body, options);
|
|
299
|
+
const localVarAxiosArgs = yield (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTextMessage(body, apikey, options);
|
|
264
300
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
265
301
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
266
302
|
return axios.request(axiosRequestArgs);
|
|
@@ -280,45 +316,49 @@ const MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
280
316
|
*
|
|
281
317
|
* @param {number} branchId
|
|
282
318
|
* @param {number} chatId
|
|
319
|
+
* @param {string} apikey
|
|
283
320
|
* @param {*} [options] Override http request option.
|
|
284
321
|
* @throws {RequiredError}
|
|
285
322
|
*/
|
|
286
|
-
getMessages(branchId, chatId, options) {
|
|
323
|
+
getMessages(branchId, chatId, apikey, options) {
|
|
287
324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
-
return (0, exports.MessagesApiFp)(configuration).getMessages(branchId, chatId, options).then((request) => request(axios, basePath));
|
|
325
|
+
return (0, exports.MessagesApiFp)(configuration).getMessages(branchId, chatId, apikey, options).then((request) => request(axios, basePath));
|
|
289
326
|
});
|
|
290
327
|
},
|
|
291
328
|
/**
|
|
292
329
|
*
|
|
293
330
|
* @param {ReadMessageDto} body
|
|
331
|
+
* @param {string} apikey
|
|
294
332
|
* @param {*} [options] Override http request option.
|
|
295
333
|
* @throws {RequiredError}
|
|
296
334
|
*/
|
|
297
|
-
readMessage(body, options) {
|
|
335
|
+
readMessage(body, apikey, options) {
|
|
298
336
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
-
return (0, exports.MessagesApiFp)(configuration).readMessage(body, options).then((request) => request(axios, basePath));
|
|
337
|
+
return (0, exports.MessagesApiFp)(configuration).readMessage(body, apikey, options).then((request) => request(axios, basePath));
|
|
300
338
|
});
|
|
301
339
|
},
|
|
302
340
|
/**
|
|
303
341
|
*
|
|
304
342
|
* @param {SendTemplateDataDto} body
|
|
343
|
+
* @param {string} apikey
|
|
305
344
|
* @param {*} [options] Override http request option.
|
|
306
345
|
* @throws {RequiredError}
|
|
307
346
|
*/
|
|
308
|
-
sendTemplateMessage(body, options) {
|
|
347
|
+
sendTemplateMessage(body, apikey, options) {
|
|
309
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
-
return (0, exports.MessagesApiFp)(configuration).sendTemplateMessage(body, options).then((request) => request(axios, basePath));
|
|
349
|
+
return (0, exports.MessagesApiFp)(configuration).sendTemplateMessage(body, apikey, options).then((request) => request(axios, basePath));
|
|
311
350
|
});
|
|
312
351
|
},
|
|
313
352
|
/**
|
|
314
353
|
*
|
|
315
354
|
* @param {SendTextDto} body
|
|
355
|
+
* @param {string} apikey
|
|
316
356
|
* @param {*} [options] Override http request option.
|
|
317
357
|
* @throws {RequiredError}
|
|
318
358
|
*/
|
|
319
|
-
sendTextMessage(body, options) {
|
|
359
|
+
sendTextMessage(body, apikey, options) {
|
|
320
360
|
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
-
return (0, exports.MessagesApiFp)(configuration).sendTextMessage(body, options).then((request) => request(axios, basePath));
|
|
361
|
+
return (0, exports.MessagesApiFp)(configuration).sendTextMessage(body, apikey, options).then((request) => request(axios, basePath));
|
|
322
362
|
});
|
|
323
363
|
},
|
|
324
364
|
};
|
|
@@ -335,49 +375,53 @@ class MessagesApi extends base_1.BaseAPI {
|
|
|
335
375
|
*
|
|
336
376
|
* @param {number} branchId
|
|
337
377
|
* @param {number} chatId
|
|
378
|
+
* @param {string} apikey
|
|
338
379
|
* @param {*} [options] Override http request option.
|
|
339
380
|
* @throws {RequiredError}
|
|
340
381
|
* @memberof MessagesApi
|
|
341
382
|
*/
|
|
342
|
-
getMessages(branchId, chatId, options) {
|
|
383
|
+
getMessages(branchId, chatId, apikey, options) {
|
|
343
384
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
-
return (0, exports.MessagesApiFp)(this.configuration).getMessages(branchId, chatId, options).then((request) => request(this.axios, this.basePath));
|
|
385
|
+
return (0, exports.MessagesApiFp)(this.configuration).getMessages(branchId, chatId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
345
386
|
});
|
|
346
387
|
}
|
|
347
388
|
/**
|
|
348
389
|
*
|
|
349
390
|
* @param {ReadMessageDto} body
|
|
391
|
+
* @param {string} apikey
|
|
350
392
|
* @param {*} [options] Override http request option.
|
|
351
393
|
* @throws {RequiredError}
|
|
352
394
|
* @memberof MessagesApi
|
|
353
395
|
*/
|
|
354
|
-
readMessage(body, options) {
|
|
396
|
+
readMessage(body, apikey, options) {
|
|
355
397
|
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
-
return (0, exports.MessagesApiFp)(this.configuration).readMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
398
|
+
return (0, exports.MessagesApiFp)(this.configuration).readMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
357
399
|
});
|
|
358
400
|
}
|
|
359
401
|
/**
|
|
360
402
|
*
|
|
361
403
|
* @param {SendTemplateDataDto} body
|
|
404
|
+
* @param {string} apikey
|
|
362
405
|
* @param {*} [options] Override http request option.
|
|
363
406
|
* @throws {RequiredError}
|
|
364
407
|
* @memberof MessagesApi
|
|
365
408
|
*/
|
|
366
|
-
sendTemplateMessage(body, options) {
|
|
409
|
+
sendTemplateMessage(body, apikey, options) {
|
|
367
410
|
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
-
return (0, exports.MessagesApiFp)(this.configuration).sendTemplateMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
411
|
+
return (0, exports.MessagesApiFp)(this.configuration).sendTemplateMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
369
412
|
});
|
|
370
413
|
}
|
|
371
414
|
/**
|
|
372
415
|
*
|
|
373
416
|
* @param {SendTextDto} body
|
|
417
|
+
* @param {string} apikey
|
|
374
418
|
* @param {*} [options] Override http request option.
|
|
375
419
|
* @throws {RequiredError}
|
|
376
420
|
* @memberof MessagesApi
|
|
377
421
|
*/
|
|
378
|
-
sendTextMessage(body, options) {
|
|
422
|
+
sendTextMessage(body, apikey, options) {
|
|
379
423
|
return __awaiter(this, void 0, void 0, function* () {
|
|
380
|
-
return (0, exports.MessagesApiFp)(this.configuration).sendTextMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
424
|
+
return (0, exports.MessagesApiFp)(this.configuration).sendTextMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
381
425
|
});
|
|
382
426
|
}
|
|
383
427
|
}
|