@libgot/whatsapp-bridge-sdk 1.0.14 → 1.0.15
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/messages-api.ts +84 -8
- package/dist/apis/messages-api.d.ts +35 -4
- package/dist/apis/messages-api.js +107 -8
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/message-detail-dto.d.ts +19 -0
- package/dist/models/message-detail-dto.js +15 -0
- package/dist/models/read-message-dto.d.ts +19 -0
- package/dist/models/read-message-dto.js +15 -0
- package/dist/models/read-message-response-data-dto.d.ts +19 -0
- package/dist/models/read-message-response-data-dto.js +15 -0
- package/dist/models/send-text-response-dto.d.ts +6 -0
- package/models/index.ts +3 -0
- package/models/message-detail-dto.ts +22 -0
- package/models/read-message-dto.ts +22 -0
- package/models/read-message-response-data-dto.ts +22 -0
- package/models/send-text-response-dto.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @1.0.
|
|
1
|
+
## @1.0.15
|
|
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.15 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/apis/messages-api.ts
CHANGED
|
@@ -18,6 +18,8 @@ import { Configuration } from '../configuration';
|
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
20
20
|
import { MessageResponseDto } from '../models';
|
|
21
|
+
import { ReadMessageDto } from '../models';
|
|
22
|
+
import { ReadMessageResponseDataDto } from '../models';
|
|
21
23
|
import { SendTextDataResponseDto } from '../models';
|
|
22
24
|
import { SendTextDto } from '../models';
|
|
23
25
|
/**
|
|
@@ -68,16 +70,58 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
68
70
|
options: localVarRequestOptions,
|
|
69
71
|
};
|
|
70
72
|
},
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @param {ReadMessageDto} body
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
*/
|
|
79
|
+
readMessage: async (body: ReadMessageDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
80
|
+
// verify required parameter 'body' is not null or undefined
|
|
81
|
+
if (body === null || body === undefined) {
|
|
82
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling readMessage.');
|
|
83
|
+
}
|
|
84
|
+
const localVarPath = `/api/messages/read`;
|
|
85
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
86
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
87
|
+
let baseOptions;
|
|
88
|
+
if (configuration) {
|
|
89
|
+
baseOptions = configuration.baseOptions;
|
|
90
|
+
}
|
|
91
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
92
|
+
const localVarHeaderParameter = {} as any;
|
|
93
|
+
const localVarQueryParameter = {} as any;
|
|
94
|
+
|
|
95
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
96
|
+
|
|
97
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
98
|
+
for (const key in localVarQueryParameter) {
|
|
99
|
+
query.set(key, localVarQueryParameter[key]);
|
|
100
|
+
}
|
|
101
|
+
for (const key in options.params) {
|
|
102
|
+
query.set(key, options.params[key]);
|
|
103
|
+
}
|
|
104
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
105
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
106
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
107
|
+
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
108
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
112
|
+
options: localVarRequestOptions,
|
|
113
|
+
};
|
|
114
|
+
},
|
|
71
115
|
/**
|
|
72
116
|
*
|
|
73
117
|
* @param {SendTextDto} body
|
|
74
118
|
* @param {*} [options] Override http request option.
|
|
75
119
|
* @throws {RequiredError}
|
|
76
120
|
*/
|
|
77
|
-
|
|
121
|
+
sendTextMessage: async (body: SendTextDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
78
122
|
// verify required parameter 'body' is not null or undefined
|
|
79
123
|
if (body === null || body === undefined) {
|
|
80
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling
|
|
124
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling sendTextMessage.');
|
|
81
125
|
}
|
|
82
126
|
const localVarPath = `/api/messages/send-text`;
|
|
83
127
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -132,14 +176,27 @@ export const MessagesApiFp = function(configuration?: Configuration) {
|
|
|
132
176
|
return axios.request(axiosRequestArgs);
|
|
133
177
|
};
|
|
134
178
|
},
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @param {ReadMessageDto} body
|
|
182
|
+
* @param {*} [options] Override http request option.
|
|
183
|
+
* @throws {RequiredError}
|
|
184
|
+
*/
|
|
185
|
+
async readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>> {
|
|
186
|
+
const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).readMessage(body, options);
|
|
187
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
188
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
189
|
+
return axios.request(axiosRequestArgs);
|
|
190
|
+
};
|
|
191
|
+
},
|
|
135
192
|
/**
|
|
136
193
|
*
|
|
137
194
|
* @param {SendTextDto} body
|
|
138
195
|
* @param {*} [options] Override http request option.
|
|
139
196
|
* @throws {RequiredError}
|
|
140
197
|
*/
|
|
141
|
-
async
|
|
142
|
-
const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).
|
|
198
|
+
async sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>> {
|
|
199
|
+
const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).sendTextMessage(body, options);
|
|
143
200
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
144
201
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
145
202
|
return axios.request(axiosRequestArgs);
|
|
@@ -163,14 +220,23 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
|
|
|
163
220
|
async getMessages(chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>> {
|
|
164
221
|
return MessagesApiFp(configuration).getMessages(chatId, options).then((request) => request(axios, basePath));
|
|
165
222
|
},
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* @param {ReadMessageDto} body
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
async readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>> {
|
|
230
|
+
return MessagesApiFp(configuration).readMessage(body, options).then((request) => request(axios, basePath));
|
|
231
|
+
},
|
|
166
232
|
/**
|
|
167
233
|
*
|
|
168
234
|
* @param {SendTextDto} body
|
|
169
235
|
* @param {*} [options] Override http request option.
|
|
170
236
|
* @throws {RequiredError}
|
|
171
237
|
*/
|
|
172
|
-
async
|
|
173
|
-
return MessagesApiFp(configuration).
|
|
238
|
+
async sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>> {
|
|
239
|
+
return MessagesApiFp(configuration).sendTextMessage(body, options).then((request) => request(axios, basePath));
|
|
174
240
|
},
|
|
175
241
|
};
|
|
176
242
|
};
|
|
@@ -192,6 +258,16 @@ export class MessagesApi extends BaseAPI {
|
|
|
192
258
|
public async getMessages(chatId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<MessageResponseDto>> {
|
|
193
259
|
return MessagesApiFp(this.configuration).getMessages(chatId, options).then((request) => request(this.axios, this.basePath));
|
|
194
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
*
|
|
263
|
+
* @param {ReadMessageDto} body
|
|
264
|
+
* @param {*} [options] Override http request option.
|
|
265
|
+
* @throws {RequiredError}
|
|
266
|
+
* @memberof MessagesApi
|
|
267
|
+
*/
|
|
268
|
+
public async readMessage(body: ReadMessageDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReadMessageResponseDataDto>> {
|
|
269
|
+
return MessagesApiFp(this.configuration).readMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
270
|
+
}
|
|
195
271
|
/**
|
|
196
272
|
*
|
|
197
273
|
* @param {SendTextDto} body
|
|
@@ -199,7 +275,7 @@ export class MessagesApi extends BaseAPI {
|
|
|
199
275
|
* @throws {RequiredError}
|
|
200
276
|
* @memberof MessagesApi
|
|
201
277
|
*/
|
|
202
|
-
public async
|
|
203
|
-
return MessagesApiFp(this.configuration).
|
|
278
|
+
public async sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<SendTextDataResponseDto>> {
|
|
279
|
+
return MessagesApiFp(this.configuration).sendTextMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
204
280
|
}
|
|
205
281
|
}
|
|
@@ -13,6 +13,8 @@ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { MessageResponseDto } from '../models';
|
|
16
|
+
import { ReadMessageDto } from '../models';
|
|
17
|
+
import { ReadMessageResponseDataDto } from '../models';
|
|
16
18
|
import { SendTextDataResponseDto } from '../models';
|
|
17
19
|
import { SendTextDto } from '../models';
|
|
18
20
|
/**
|
|
@@ -27,13 +29,20 @@ export declare const MessagesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
27
29
|
* @throws {RequiredError}
|
|
28
30
|
*/
|
|
29
31
|
getMessages: (chatId: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param {ReadMessageDto} body
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
readMessage: (body: ReadMessageDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
39
|
/**
|
|
31
40
|
*
|
|
32
41
|
* @param {SendTextDto} body
|
|
33
42
|
* @param {*} [options] Override http request option.
|
|
34
43
|
* @throws {RequiredError}
|
|
35
44
|
*/
|
|
36
|
-
|
|
45
|
+
sendTextMessage: (body: SendTextDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
37
46
|
};
|
|
38
47
|
/**
|
|
39
48
|
* MessagesApi - functional programming interface
|
|
@@ -47,13 +56,20 @@ export declare const MessagesApiFp: (configuration?: Configuration) => {
|
|
|
47
56
|
* @throws {RequiredError}
|
|
48
57
|
*/
|
|
49
58
|
getMessages(chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>>;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @param {ReadMessageDto} body
|
|
62
|
+
* @param {*} [options] Override http request option.
|
|
63
|
+
* @throws {RequiredError}
|
|
64
|
+
*/
|
|
65
|
+
readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>>;
|
|
50
66
|
/**
|
|
51
67
|
*
|
|
52
68
|
* @param {SendTextDto} body
|
|
53
69
|
* @param {*} [options] Override http request option.
|
|
54
70
|
* @throws {RequiredError}
|
|
55
71
|
*/
|
|
56
|
-
|
|
72
|
+
sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>>;
|
|
57
73
|
};
|
|
58
74
|
/**
|
|
59
75
|
* MessagesApi - factory interface
|
|
@@ -67,13 +83,20 @@ export declare const MessagesApiFactory: (configuration?: Configuration, basePat
|
|
|
67
83
|
* @throws {RequiredError}
|
|
68
84
|
*/
|
|
69
85
|
getMessages(chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @param {ReadMessageDto} body
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
|
|
70
93
|
/**
|
|
71
94
|
*
|
|
72
95
|
* @param {SendTextDto} body
|
|
73
96
|
* @param {*} [options] Override http request option.
|
|
74
97
|
* @throws {RequiredError}
|
|
75
98
|
*/
|
|
76
|
-
|
|
99
|
+
sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
77
100
|
};
|
|
78
101
|
/**
|
|
79
102
|
* MessagesApi - object-oriented interface
|
|
@@ -90,6 +113,14 @@ export declare class MessagesApi extends BaseAPI {
|
|
|
90
113
|
* @memberof MessagesApi
|
|
91
114
|
*/
|
|
92
115
|
getMessages(chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>>;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @param {ReadMessageDto} body
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof MessagesApi
|
|
122
|
+
*/
|
|
123
|
+
readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>>;
|
|
93
124
|
/**
|
|
94
125
|
*
|
|
95
126
|
* @param {SendTextDto} body
|
|
@@ -97,5 +128,5 @@ export declare class MessagesApi extends BaseAPI {
|
|
|
97
128
|
* @throws {RequiredError}
|
|
98
129
|
* @memberof MessagesApi
|
|
99
130
|
*/
|
|
100
|
-
|
|
131
|
+
sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>>;
|
|
101
132
|
}
|
|
@@ -143,13 +143,60 @@ var MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
145
|
},
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @param {ReadMessageDto} body
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
readMessage: function (body_1) {
|
|
153
|
+
var args_1 = [];
|
|
154
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
155
|
+
args_1[_i - 1] = arguments[_i];
|
|
156
|
+
}
|
|
157
|
+
return __awaiter(_this, __spreadArray([body_1], args_1, true), void 0, function (body, options) {
|
|
158
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions, needsSerialization;
|
|
159
|
+
if (options === void 0) { options = {}; }
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
// verify required parameter 'body' is not null or undefined
|
|
162
|
+
if (body === null || body === undefined) {
|
|
163
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling readMessage.');
|
|
164
|
+
}
|
|
165
|
+
localVarPath = "/api/messages/read";
|
|
166
|
+
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
167
|
+
if (configuration) {
|
|
168
|
+
baseOptions = configuration.baseOptions;
|
|
169
|
+
}
|
|
170
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
171
|
+
localVarHeaderParameter = {};
|
|
172
|
+
localVarQueryParameter = {};
|
|
173
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
174
|
+
query = new URLSearchParams(localVarUrlObj.search);
|
|
175
|
+
for (key in localVarQueryParameter) {
|
|
176
|
+
query.set(key, localVarQueryParameter[key]);
|
|
177
|
+
}
|
|
178
|
+
for (key in options.params) {
|
|
179
|
+
query.set(key, options.params[key]);
|
|
180
|
+
}
|
|
181
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
182
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
184
|
+
needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
185
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
186
|
+
return [2 /*return*/, {
|
|
187
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
188
|
+
options: localVarRequestOptions,
|
|
189
|
+
}];
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
},
|
|
146
193
|
/**
|
|
147
194
|
*
|
|
148
195
|
* @param {SendTextDto} body
|
|
149
196
|
* @param {*} [options] Override http request option.
|
|
150
197
|
* @throws {RequiredError}
|
|
151
198
|
*/
|
|
152
|
-
|
|
199
|
+
sendTextMessage: function (body_1) {
|
|
153
200
|
var args_1 = [];
|
|
154
201
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
155
202
|
args_1[_i - 1] = arguments[_i];
|
|
@@ -160,7 +207,7 @@ var MessagesApiAxiosParamCreator = function (configuration) {
|
|
|
160
207
|
return __generator(this, function (_a) {
|
|
161
208
|
// verify required parameter 'body' is not null or undefined
|
|
162
209
|
if (body === null || body === undefined) {
|
|
163
|
-
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling
|
|
210
|
+
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling sendTextMessage.');
|
|
164
211
|
}
|
|
165
212
|
localVarPath = "/api/messages/send-text";
|
|
166
213
|
localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -223,18 +270,42 @@ var MessagesApiFp = function (configuration) {
|
|
|
223
270
|
});
|
|
224
271
|
});
|
|
225
272
|
},
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
* @param {ReadMessageDto} body
|
|
276
|
+
* @param {*} [options] Override http request option.
|
|
277
|
+
* @throws {RequiredError}
|
|
278
|
+
*/
|
|
279
|
+
readMessage: function (body, options) {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
+
var localVarAxiosArgs;
|
|
282
|
+
return __generator(this, function (_a) {
|
|
283
|
+
switch (_a.label) {
|
|
284
|
+
case 0: return [4 /*yield*/, (0, exports.MessagesApiAxiosParamCreator)(configuration).readMessage(body, options)];
|
|
285
|
+
case 1:
|
|
286
|
+
localVarAxiosArgs = _a.sent();
|
|
287
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
288
|
+
if (axios === void 0) { axios = axios_1.default; }
|
|
289
|
+
if (basePath === void 0) { basePath = base_1.BASE_PATH; }
|
|
290
|
+
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
291
|
+
return axios.request(axiosRequestArgs);
|
|
292
|
+
}];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
},
|
|
226
297
|
/**
|
|
227
298
|
*
|
|
228
299
|
* @param {SendTextDto} body
|
|
229
300
|
* @param {*} [options] Override http request option.
|
|
230
301
|
* @throws {RequiredError}
|
|
231
302
|
*/
|
|
232
|
-
|
|
303
|
+
sendTextMessage: function (body, options) {
|
|
233
304
|
return __awaiter(this, void 0, void 0, function () {
|
|
234
305
|
var localVarAxiosArgs;
|
|
235
306
|
return __generator(this, function (_a) {
|
|
236
307
|
switch (_a.label) {
|
|
237
|
-
case 0: return [4 /*yield*/, (0, exports.MessagesApiAxiosParamCreator)(configuration).
|
|
308
|
+
case 0: return [4 /*yield*/, (0, exports.MessagesApiAxiosParamCreator)(configuration).sendTextMessage(body, options)];
|
|
238
309
|
case 1:
|
|
239
310
|
localVarAxiosArgs = _a.sent();
|
|
240
311
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -269,16 +340,29 @@ var MessagesApiFactory = function (configuration, basePath, axios) {
|
|
|
269
340
|
});
|
|
270
341
|
});
|
|
271
342
|
},
|
|
343
|
+
/**
|
|
344
|
+
*
|
|
345
|
+
* @param {ReadMessageDto} body
|
|
346
|
+
* @param {*} [options] Override http request option.
|
|
347
|
+
* @throws {RequiredError}
|
|
348
|
+
*/
|
|
349
|
+
readMessage: function (body, options) {
|
|
350
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
351
|
+
return __generator(this, function (_a) {
|
|
352
|
+
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).readMessage(body, options).then(function (request) { return request(axios, basePath); })];
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
},
|
|
272
356
|
/**
|
|
273
357
|
*
|
|
274
358
|
* @param {SendTextDto} body
|
|
275
359
|
* @param {*} [options] Override http request option.
|
|
276
360
|
* @throws {RequiredError}
|
|
277
361
|
*/
|
|
278
|
-
|
|
362
|
+
sendTextMessage: function (body, options) {
|
|
279
363
|
return __awaiter(this, void 0, void 0, function () {
|
|
280
364
|
return __generator(this, function (_a) {
|
|
281
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).
|
|
365
|
+
return [2 /*return*/, (0, exports.MessagesApiFp)(configuration).sendTextMessage(body, options).then(function (request) { return request(axios, basePath); })];
|
|
282
366
|
});
|
|
283
367
|
});
|
|
284
368
|
},
|
|
@@ -311,6 +395,21 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
311
395
|
});
|
|
312
396
|
});
|
|
313
397
|
};
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* @param {ReadMessageDto} body
|
|
401
|
+
* @param {*} [options] Override http request option.
|
|
402
|
+
* @throws {RequiredError}
|
|
403
|
+
* @memberof MessagesApi
|
|
404
|
+
*/
|
|
405
|
+
MessagesApi.prototype.readMessage = function (body, options) {
|
|
406
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
407
|
+
var _this = this;
|
|
408
|
+
return __generator(this, function (_a) {
|
|
409
|
+
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).readMessage(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
};
|
|
314
413
|
/**
|
|
315
414
|
*
|
|
316
415
|
* @param {SendTextDto} body
|
|
@@ -318,11 +417,11 @@ var MessagesApi = /** @class */ (function (_super) {
|
|
|
318
417
|
* @throws {RequiredError}
|
|
319
418
|
* @memberof MessagesApi
|
|
320
419
|
*/
|
|
321
|
-
MessagesApi.prototype.
|
|
420
|
+
MessagesApi.prototype.sendTextMessage = function (body, options) {
|
|
322
421
|
return __awaiter(this, void 0, void 0, function () {
|
|
323
422
|
var _this = this;
|
|
324
423
|
return __generator(this, function (_a) {
|
|
325
|
-
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).
|
|
424
|
+
return [2 /*return*/, (0, exports.MessagesApiFp)(this.configuration).sendTextMessage(body, options).then(function (request) { return request(_this.axios, _this.basePath); })];
|
|
326
425
|
});
|
|
327
426
|
});
|
|
328
427
|
};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -13,7 +13,10 @@ export * from './inline-response2011-message';
|
|
|
13
13
|
export * from './inline-response503';
|
|
14
14
|
export * from './inline-response503-info';
|
|
15
15
|
export * from './key-dto';
|
|
16
|
+
export * from './message-detail-dto';
|
|
16
17
|
export * from './message-response-dto';
|
|
18
|
+
export * from './read-message-dto';
|
|
19
|
+
export * from './read-message-response-data-dto';
|
|
17
20
|
export * from './role-dto';
|
|
18
21
|
export * from './send-text-data-response-dto';
|
|
19
22
|
export * from './send-text-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -29,7 +29,10 @@ __exportStar(require("./inline-response2011-message"), exports);
|
|
|
29
29
|
__exportStar(require("./inline-response503"), exports);
|
|
30
30
|
__exportStar(require("./inline-response503-info"), exports);
|
|
31
31
|
__exportStar(require("./key-dto"), exports);
|
|
32
|
+
__exportStar(require("./message-detail-dto"), exports);
|
|
32
33
|
__exportStar(require("./message-response-dto"), exports);
|
|
34
|
+
__exportStar(require("./read-message-dto"), exports);
|
|
35
|
+
__exportStar(require("./read-message-response-data-dto"), exports);
|
|
33
36
|
__exportStar(require("./role-dto"), exports);
|
|
34
37
|
__exportStar(require("./send-text-data-response-dto"), exports);
|
|
35
38
|
__exportStar(require("./send-text-dto"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whatsapp-bridge Node Api
|
|
3
|
+
* The whatsapp-bridge API description
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface MessageDetailDto
|
|
17
|
+
*/
|
|
18
|
+
export interface MessageDetailDto {
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whatsapp-bridge Node Api
|
|
3
|
+
* The whatsapp-bridge API description
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ReadMessageDto
|
|
17
|
+
*/
|
|
18
|
+
export interface ReadMessageDto {
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* whatsapp-bridge Node Api
|
|
3
|
+
* The whatsapp-bridge API description
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ReadMessageResponseDataDto
|
|
17
|
+
*/
|
|
18
|
+
export interface ReadMessageResponseDataDto {
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* whatsapp-bridge Node Api
|
|
6
|
+
* The whatsapp-bridge API description
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { InlineResponse2011Class } from './inline-response2011-class';
|
|
13
|
+
import { WhatsappChatDto } from './whatsapp-chat-dto';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
*
|
|
@@ -22,4 +23,9 @@ export interface SendTextResponseDto {
|
|
|
22
23
|
* @memberof SendTextResponseDto
|
|
23
24
|
*/
|
|
24
25
|
message: InlineResponse2011Class;
|
|
26
|
+
/**
|
|
27
|
+
* @type {WhatsappChatDto}
|
|
28
|
+
* @memberof SendTextResponseDto
|
|
29
|
+
*/
|
|
30
|
+
chat: WhatsappChatDto;
|
|
25
31
|
}
|
package/models/index.ts
CHANGED
|
@@ -13,7 +13,10 @@ export * from './inline-response2011-message';
|
|
|
13
13
|
export * from './inline-response503';
|
|
14
14
|
export * from './inline-response503-info';
|
|
15
15
|
export * from './key-dto';
|
|
16
|
+
export * from './message-detail-dto';
|
|
16
17
|
export * from './message-response-dto';
|
|
18
|
+
export * from './read-message-dto';
|
|
19
|
+
export * from './read-message-response-data-dto';
|
|
17
20
|
export * from './role-dto';
|
|
18
21
|
export * from './send-text-data-response-dto';
|
|
19
22
|
export * from './send-text-dto';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MessageDetailDto
|
|
20
|
+
*/
|
|
21
|
+
export interface MessageDetailDto {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ReadMessageDto
|
|
20
|
+
*/
|
|
21
|
+
export interface ReadMessageDto {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* whatsapp-bridge Node Api
|
|
5
|
+
* The whatsapp-bridge API description
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ReadMessageResponseDataDto
|
|
20
|
+
*/
|
|
21
|
+
export interface ReadMessageResponseDataDto {
|
|
22
|
+
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { InlineResponse2011Class } from './inline-response2011-class';
|
|
16
|
+
import { WhatsappChatDto } from './whatsapp-chat-dto';
|
|
16
17
|
/**
|
|
17
18
|
*
|
|
18
19
|
*
|
|
@@ -26,4 +27,10 @@ export interface SendTextResponseDto {
|
|
|
26
27
|
* @memberof SendTextResponseDto
|
|
27
28
|
*/
|
|
28
29
|
message: InlineResponse2011Class;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @type {WhatsappChatDto}
|
|
33
|
+
* @memberof SendTextResponseDto
|
|
34
|
+
*/
|
|
35
|
+
chat: WhatsappChatDto;
|
|
29
36
|
}
|