@libgot/whatsapp-bridge-sdk 1.0.40-rc.1 → 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 +57 -21
- 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 +24 -12
- package/dist/apis/chats-api.js +54 -21
- 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
|
@@ -36,14 +36,19 @@ const SessionsApiAxiosParamCreator = function (configuration) {
|
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @param {string} sessionUuid
|
|
39
|
+
* @param {string} apikey
|
|
39
40
|
* @param {*} [options] Override http request option.
|
|
40
41
|
* @throws {RequiredError}
|
|
41
42
|
*/
|
|
42
|
-
getSession: (sessionUuid_1, ...args_1) => __awaiter(this, [sessionUuid_1, ...args_1], void 0, function* (sessionUuid, options = {}) {
|
|
43
|
+
getSession: (sessionUuid_1, apikey_1, ...args_1) => __awaiter(this, [sessionUuid_1, apikey_1, ...args_1], void 0, function* (sessionUuid, apikey, options = {}) {
|
|
43
44
|
// verify required parameter 'sessionUuid' is not null or undefined
|
|
44
45
|
if (sessionUuid === null || sessionUuid === undefined) {
|
|
45
46
|
throw new base_1.RequiredError('sessionUuid', 'Required parameter sessionUuid was null or undefined when calling getSession.');
|
|
46
47
|
}
|
|
48
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
49
|
+
if (apikey === null || apikey === undefined) {
|
|
50
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getSession.');
|
|
51
|
+
}
|
|
47
52
|
const localVarPath = `/api/sessions/{sessionUuid}`
|
|
48
53
|
.replace(`{${"sessionUuid"}}`, encodeURIComponent(String(sessionUuid)));
|
|
49
54
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -55,6 +60,9 @@ const SessionsApiAxiosParamCreator = function (configuration) {
|
|
|
55
60
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
56
61
|
const localVarHeaderParameter = {};
|
|
57
62
|
const localVarQueryParameter = {};
|
|
63
|
+
if (apikey !== undefined && apikey !== null) {
|
|
64
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
65
|
+
}
|
|
58
66
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
59
67
|
for (const key in localVarQueryParameter) {
|
|
60
68
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -73,14 +81,19 @@ const SessionsApiAxiosParamCreator = function (configuration) {
|
|
|
73
81
|
/**
|
|
74
82
|
*
|
|
75
83
|
* @param {number} branchId
|
|
84
|
+
* @param {string} apikey
|
|
76
85
|
* @param {*} [options] Override http request option.
|
|
77
86
|
* @throws {RequiredError}
|
|
78
87
|
*/
|
|
79
|
-
getSessions: (branchId_1, ...args_1) => __awaiter(this, [branchId_1, ...args_1], void 0, function* (branchId, options = {}) {
|
|
88
|
+
getSessions: (branchId_1, apikey_1, ...args_1) => __awaiter(this, [branchId_1, apikey_1, ...args_1], void 0, function* (branchId, apikey, options = {}) {
|
|
80
89
|
// verify required parameter 'branchId' is not null or undefined
|
|
81
90
|
if (branchId === null || branchId === undefined) {
|
|
82
91
|
throw new base_1.RequiredError('branchId', 'Required parameter branchId was null or undefined when calling getSessions.');
|
|
83
92
|
}
|
|
93
|
+
// verify required parameter 'apikey' is not null or undefined
|
|
94
|
+
if (apikey === null || apikey === undefined) {
|
|
95
|
+
throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling getSessions.');
|
|
96
|
+
}
|
|
84
97
|
const localVarPath = `/api/sessions`;
|
|
85
98
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
86
99
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -94,6 +107,9 @@ const SessionsApiAxiosParamCreator = function (configuration) {
|
|
|
94
107
|
if (branchId !== undefined) {
|
|
95
108
|
localVarQueryParameter['branchId'] = branchId;
|
|
96
109
|
}
|
|
110
|
+
if (apikey !== undefined && apikey !== null) {
|
|
111
|
+
localVarHeaderParameter['apikey'] = String(apikey);
|
|
112
|
+
}
|
|
97
113
|
const query = new URLSearchParams(localVarUrlObj.search);
|
|
98
114
|
for (const key in localVarQueryParameter) {
|
|
99
115
|
query.set(key, localVarQueryParameter[key]);
|
|
@@ -121,12 +137,13 @@ const SessionsApiFp = function (configuration) {
|
|
|
121
137
|
/**
|
|
122
138
|
*
|
|
123
139
|
* @param {string} sessionUuid
|
|
140
|
+
* @param {string} apikey
|
|
124
141
|
* @param {*} [options] Override http request option.
|
|
125
142
|
* @throws {RequiredError}
|
|
126
143
|
*/
|
|
127
|
-
getSession(sessionUuid, options) {
|
|
144
|
+
getSession(sessionUuid, apikey, options) {
|
|
128
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
const localVarAxiosArgs = yield (0, exports.SessionsApiAxiosParamCreator)(configuration).getSession(sessionUuid, options);
|
|
146
|
+
const localVarAxiosArgs = yield (0, exports.SessionsApiAxiosParamCreator)(configuration).getSession(sessionUuid, apikey, options);
|
|
130
147
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
131
148
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
132
149
|
return axios.request(axiosRequestArgs);
|
|
@@ -136,12 +153,13 @@ const SessionsApiFp = function (configuration) {
|
|
|
136
153
|
/**
|
|
137
154
|
*
|
|
138
155
|
* @param {number} branchId
|
|
156
|
+
* @param {string} apikey
|
|
139
157
|
* @param {*} [options] Override http request option.
|
|
140
158
|
* @throws {RequiredError}
|
|
141
159
|
*/
|
|
142
|
-
getSessions(branchId, options) {
|
|
160
|
+
getSessions(branchId, apikey, options) {
|
|
143
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
const localVarAxiosArgs = yield (0, exports.SessionsApiAxiosParamCreator)(configuration).getSessions(branchId, options);
|
|
162
|
+
const localVarAxiosArgs = yield (0, exports.SessionsApiAxiosParamCreator)(configuration).getSessions(branchId, apikey, options);
|
|
145
163
|
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
|
|
146
164
|
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
147
165
|
return axios.request(axiosRequestArgs);
|
|
@@ -160,23 +178,25 @@ const SessionsApiFactory = function (configuration, basePath, axios) {
|
|
|
160
178
|
/**
|
|
161
179
|
*
|
|
162
180
|
* @param {string} sessionUuid
|
|
181
|
+
* @param {string} apikey
|
|
163
182
|
* @param {*} [options] Override http request option.
|
|
164
183
|
* @throws {RequiredError}
|
|
165
184
|
*/
|
|
166
|
-
getSession(sessionUuid, options) {
|
|
185
|
+
getSession(sessionUuid, apikey, options) {
|
|
167
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
return (0, exports.SessionsApiFp)(configuration).getSession(sessionUuid, options).then((request) => request(axios, basePath));
|
|
187
|
+
return (0, exports.SessionsApiFp)(configuration).getSession(sessionUuid, apikey, options).then((request) => request(axios, basePath));
|
|
169
188
|
});
|
|
170
189
|
},
|
|
171
190
|
/**
|
|
172
191
|
*
|
|
173
192
|
* @param {number} branchId
|
|
193
|
+
* @param {string} apikey
|
|
174
194
|
* @param {*} [options] Override http request option.
|
|
175
195
|
* @throws {RequiredError}
|
|
176
196
|
*/
|
|
177
|
-
getSessions(branchId, options) {
|
|
197
|
+
getSessions(branchId, apikey, options) {
|
|
178
198
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
return (0, exports.SessionsApiFp)(configuration).getSessions(branchId, options).then((request) => request(axios, basePath));
|
|
199
|
+
return (0, exports.SessionsApiFp)(configuration).getSessions(branchId, apikey, options).then((request) => request(axios, basePath));
|
|
180
200
|
});
|
|
181
201
|
},
|
|
182
202
|
};
|
|
@@ -192,25 +212,27 @@ class SessionsApi extends base_1.BaseAPI {
|
|
|
192
212
|
/**
|
|
193
213
|
*
|
|
194
214
|
* @param {string} sessionUuid
|
|
215
|
+
* @param {string} apikey
|
|
195
216
|
* @param {*} [options] Override http request option.
|
|
196
217
|
* @throws {RequiredError}
|
|
197
218
|
* @memberof SessionsApi
|
|
198
219
|
*/
|
|
199
|
-
getSession(sessionUuid, options) {
|
|
220
|
+
getSession(sessionUuid, apikey, options) {
|
|
200
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
return (0, exports.SessionsApiFp)(this.configuration).getSession(sessionUuid, options).then((request) => request(this.axios, this.basePath));
|
|
222
|
+
return (0, exports.SessionsApiFp)(this.configuration).getSession(sessionUuid, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
202
223
|
});
|
|
203
224
|
}
|
|
204
225
|
/**
|
|
205
226
|
*
|
|
206
227
|
* @param {number} branchId
|
|
228
|
+
* @param {string} apikey
|
|
207
229
|
* @param {*} [options] Override http request option.
|
|
208
230
|
* @throws {RequiredError}
|
|
209
231
|
* @memberof SessionsApi
|
|
210
232
|
*/
|
|
211
|
-
getSessions(branchId, options) {
|
|
233
|
+
getSessions(branchId, apikey, options) {
|
|
212
234
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
-
return (0, exports.SessionsApiFp)(this.configuration).getSessions(branchId, options).then((request) => request(this.axios, this.basePath));
|
|
235
|
+
return (0, exports.SessionsApiFp)(this.configuration).getSessions(branchId, apikey, options).then((request) => request(this.axios, this.basePath));
|
|
214
236
|
});
|
|
215
237
|
}
|
|
216
238
|
}
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
npm publish --access public
|
|
1
|
+
npm publish --access public "$@"
|