@bzbs/react-api-client 0.0.5 → 0.0.7
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/dist/index.d.mts +671 -87
- package/dist/index.d.ts +671 -87
- package/dist/index.js +681 -310
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +681 -310
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -75,14 +75,11 @@ var BaseService = class {
|
|
|
75
75
|
return __async(this, null, function* () {
|
|
76
76
|
var _a, _b;
|
|
77
77
|
try {
|
|
78
|
-
const response = yield this.client.get(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
data: requestOptions == null ? void 0 : requestOptions.data
|
|
84
|
-
}
|
|
85
|
-
);
|
|
78
|
+
const response = yield this.client.get(this.joinUrl((_a = requestOptions == null ? void 0 : requestOptions.baseUrl) != null ? _a : this.baseUrl, path), {
|
|
79
|
+
params: __spreadValues(__spreadValues({}, params ? params : {}), (requestOptions == null ? void 0 : requestOptions.params) ? requestOptions.params : {}),
|
|
80
|
+
headers: requestOptions == null ? void 0 : requestOptions.headers,
|
|
81
|
+
data: requestOptions == null ? void 0 : requestOptions.data
|
|
82
|
+
});
|
|
86
83
|
return {
|
|
87
84
|
model: response == null ? void 0 : response.data,
|
|
88
85
|
response,
|
|
@@ -189,6 +186,7 @@ var BaseService = class {
|
|
|
189
186
|
});
|
|
190
187
|
}
|
|
191
188
|
joinUrl(baseUrl, path) {
|
|
189
|
+
baseUrl = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
|
|
192
190
|
const url = new URL(path, baseUrl);
|
|
193
191
|
return url.toString();
|
|
194
192
|
}
|
|
@@ -201,259 +199,304 @@ var AuthenticateApi = class extends BaseService {
|
|
|
201
199
|
}
|
|
202
200
|
/**
|
|
203
201
|
* Performs a device login using the provided device uuid.
|
|
204
|
-
*
|
|
205
|
-
* @param
|
|
202
|
+
*
|
|
203
|
+
* @param params - The parameters.
|
|
204
|
+
* @param params.appId - Your application id.
|
|
205
|
+
* @param params.uuid - The unique device identifier.
|
|
206
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
206
207
|
* @param requestOptions - Optional request options.
|
|
207
208
|
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
208
209
|
*/
|
|
209
|
-
deviceLogin(
|
|
210
|
+
deviceLogin(params, requestOptions) {
|
|
210
211
|
return __async(this, null, function* () {
|
|
211
212
|
return yield this.post(
|
|
212
213
|
"auth/device_login",
|
|
213
|
-
{
|
|
214
|
-
app_id: appId,
|
|
215
|
-
uuid,
|
|
214
|
+
__spreadValues({
|
|
215
|
+
app_id: params.appId,
|
|
216
|
+
uuid: params.uuid,
|
|
216
217
|
device_noti_enable: "true"
|
|
217
|
-
},
|
|
218
|
-
|
|
218
|
+
}, params.options),
|
|
219
|
+
{
|
|
220
|
+
headers: __spreadValues({
|
|
221
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
222
|
+
}, requestOptions == null ? void 0 : requestOptions.headers)
|
|
223
|
+
}
|
|
219
224
|
);
|
|
220
225
|
});
|
|
221
226
|
}
|
|
222
227
|
/**
|
|
223
228
|
* Performs a Facebook login using the provided Facebook access token.
|
|
229
|
+
*
|
|
230
|
+
* @param params - The parameters.
|
|
224
231
|
* @param accessToken - The access token obtained from Facebook.
|
|
225
232
|
* @param appId - Your application id.
|
|
226
233
|
* @param uuid - The unique device identifier.
|
|
234
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
227
235
|
* @param requestOptions - Optional request options.
|
|
228
236
|
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
229
237
|
*/
|
|
230
|
-
facebookLogin(
|
|
238
|
+
facebookLogin(params, requestOptions) {
|
|
231
239
|
return __async(this, null, function* () {
|
|
232
240
|
return yield this.post(
|
|
233
241
|
"auth/login",
|
|
234
|
-
{
|
|
235
|
-
access_token: accessToken,
|
|
236
|
-
app_id: appId,
|
|
237
|
-
uuid,
|
|
242
|
+
__spreadValues({
|
|
243
|
+
access_token: params.accessToken,
|
|
244
|
+
app_id: params.appId,
|
|
245
|
+
uuid: params.uuid,
|
|
238
246
|
device_noti_enable: "true"
|
|
239
|
-
},
|
|
247
|
+
}, params.options),
|
|
240
248
|
requestOptions
|
|
241
249
|
);
|
|
242
250
|
});
|
|
243
251
|
}
|
|
244
252
|
/**
|
|
245
253
|
* Performs a Google login using the provided id token, app id, and uuid.
|
|
246
|
-
*
|
|
247
|
-
* @param
|
|
248
|
-
* @param
|
|
254
|
+
*
|
|
255
|
+
* @param params - The parameters.
|
|
256
|
+
* @param params.idToken - The Google id token.
|
|
257
|
+
* @param params.appId - Your application id.
|
|
258
|
+
* @param params.uuid - The unique device identifier.
|
|
259
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
249
260
|
* @param requestOptions - Optional request options.
|
|
250
261
|
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
251
262
|
*/
|
|
252
|
-
googleLogin(
|
|
263
|
+
googleLogin(params, requestOptions) {
|
|
253
264
|
return __async(this, null, function* () {
|
|
254
265
|
return yield this.post(
|
|
255
266
|
"auth/google_login",
|
|
256
|
-
{
|
|
257
|
-
id_token: idToken,
|
|
258
|
-
app_id: appId,
|
|
259
|
-
uuid,
|
|
267
|
+
__spreadValues({
|
|
268
|
+
id_token: params.idToken,
|
|
269
|
+
app_id: params.appId,
|
|
270
|
+
uuid: params.uuid,
|
|
260
271
|
device_noti_enable: "true"
|
|
261
|
-
},
|
|
272
|
+
}, params.options),
|
|
262
273
|
requestOptions
|
|
263
274
|
);
|
|
264
275
|
});
|
|
265
276
|
}
|
|
266
277
|
/**
|
|
267
278
|
* Performs a Line login using the provided id token, Line access token and authorization code.
|
|
268
|
-
*
|
|
269
|
-
* @param
|
|
270
|
-
* @param
|
|
271
|
-
* @param
|
|
272
|
-
* @param
|
|
273
|
-
* @param
|
|
279
|
+
*
|
|
280
|
+
* @param params - The parameters.
|
|
281
|
+
* @param params.idToken - The Line id token.
|
|
282
|
+
* @param params.lineAccessToken - The Line access token.
|
|
283
|
+
* @param params.authorizationCode - The Line authorization code.
|
|
284
|
+
* @param params.appId - Your application id.
|
|
285
|
+
* @param params.uuid - The unique device identifier.
|
|
286
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
274
287
|
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
275
288
|
*/
|
|
276
|
-
lineLogin(
|
|
289
|
+
lineLogin(params, requestOptions) {
|
|
277
290
|
return __async(this, null, function* () {
|
|
278
291
|
return yield this.post(
|
|
279
292
|
"auth/line_login",
|
|
280
|
-
{
|
|
281
|
-
id_token: idToken,
|
|
282
|
-
line_access_token: lineAccessToken,
|
|
283
|
-
authorization_code: authorizationCode,
|
|
284
|
-
app_id: appId,
|
|
285
|
-
uuid,
|
|
293
|
+
__spreadValues({
|
|
294
|
+
id_token: params.idToken,
|
|
295
|
+
line_access_token: params.lineAccessToken,
|
|
296
|
+
authorization_code: params.authorizationCode,
|
|
297
|
+
app_id: params.appId,
|
|
298
|
+
uuid: params.uuid,
|
|
286
299
|
device_noti_enable: "true"
|
|
287
|
-
},
|
|
300
|
+
}, params.options),
|
|
288
301
|
requestOptions
|
|
289
302
|
);
|
|
290
303
|
});
|
|
291
304
|
}
|
|
292
305
|
/**
|
|
293
306
|
* Performs an Apple login using the provided id token and Apple refresh token.
|
|
294
|
-
*
|
|
295
|
-
* @param
|
|
296
|
-
* @param
|
|
297
|
-
* @param
|
|
307
|
+
*
|
|
308
|
+
* @param params - The parameters.
|
|
309
|
+
* @param params.idToken - The Apple id token.
|
|
310
|
+
* @param params.refreshToken - The Apple refresh token.
|
|
311
|
+
* @param params.appId - Your application id.
|
|
312
|
+
* @param params.uuid - The unique device identifier.
|
|
313
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
298
314
|
* @param requestOptions - Optional request options.
|
|
299
315
|
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
300
316
|
*/
|
|
301
|
-
appleLogin(
|
|
317
|
+
appleLogin(params, requestOptions) {
|
|
302
318
|
return __async(this, null, function* () {
|
|
303
319
|
return yield this.post(
|
|
304
320
|
"auth/apple_login",
|
|
305
|
-
{
|
|
306
|
-
id_token: idToken,
|
|
307
|
-
refresh_token: refreshToken,
|
|
308
|
-
app_id: appId,
|
|
309
|
-
uuid,
|
|
321
|
+
__spreadValues({
|
|
322
|
+
id_token: params.idToken,
|
|
323
|
+
refresh_token: params.refreshToken,
|
|
324
|
+
app_id: params.appId,
|
|
325
|
+
uuid: params.uuid,
|
|
310
326
|
device_noti_enable: "true"
|
|
311
|
-
},
|
|
327
|
+
}, params.options),
|
|
312
328
|
requestOptions
|
|
313
329
|
);
|
|
314
330
|
});
|
|
315
331
|
}
|
|
316
332
|
/**
|
|
317
|
-
*
|
|
333
|
+
* Performs a username and password login using the provided username and password.
|
|
318
334
|
*
|
|
319
|
-
* @param
|
|
320
|
-
* @param
|
|
321
|
-
* @param
|
|
322
|
-
* @param
|
|
323
|
-
* @param
|
|
335
|
+
* @param params - The parameters.
|
|
336
|
+
* @param params.username - The username of the user.
|
|
337
|
+
* @param params.password - The password of the user.
|
|
338
|
+
* @param params.uuid - The unique device identifier.
|
|
339
|
+
* @param params.appId - Your application id.
|
|
340
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
324
341
|
* @returns A promise that resolves to a ServiceResponse containing the login response.
|
|
325
342
|
*/
|
|
326
|
-
usernamePasswordLogin(
|
|
343
|
+
usernamePasswordLogin(params, requestOptions) {
|
|
327
344
|
return __async(this, null, function* () {
|
|
328
345
|
return yield this.post(
|
|
329
346
|
"auth/bzbs_login",
|
|
330
|
-
{
|
|
331
|
-
username,
|
|
332
|
-
password,
|
|
333
|
-
|
|
334
|
-
|
|
347
|
+
__spreadValues({
|
|
348
|
+
username: params.username,
|
|
349
|
+
password: params.password,
|
|
350
|
+
uuid: params.uuid,
|
|
351
|
+
app_id: params.appId,
|
|
335
352
|
device_noti_enable: "true"
|
|
336
|
-
},
|
|
353
|
+
}, params.options),
|
|
337
354
|
requestOptions
|
|
338
355
|
);
|
|
339
356
|
});
|
|
340
357
|
}
|
|
341
358
|
/**
|
|
342
|
-
*
|
|
343
|
-
*
|
|
359
|
+
* Performs a logout for the user.
|
|
360
|
+
*
|
|
361
|
+
* @param params - The parameters.
|
|
362
|
+
* @param params.uuid - The unique device identifier.
|
|
363
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
344
364
|
* @param requestOptions - Optional request options.
|
|
345
|
-
* @returns A promise that resolves to a ServiceResponse containing the logout
|
|
365
|
+
* @returns A promise that resolves to a ServiceResponse containing the logout response.
|
|
346
366
|
*/
|
|
347
|
-
logout(
|
|
367
|
+
logout(params, requestOptions) {
|
|
348
368
|
return __async(this, null, function* () {
|
|
349
|
-
return yield this.post(
|
|
369
|
+
return yield this.post(
|
|
370
|
+
"auth/logout",
|
|
371
|
+
__spreadValues({
|
|
372
|
+
uuid: params.uuid
|
|
373
|
+
}, params.options),
|
|
374
|
+
requestOptions
|
|
375
|
+
);
|
|
350
376
|
});
|
|
351
377
|
}
|
|
352
378
|
/**
|
|
353
|
-
* Sends a forget password request to the
|
|
379
|
+
* Sends a forget password request to the user.
|
|
354
380
|
*
|
|
355
|
-
* @param
|
|
356
|
-
* @param
|
|
381
|
+
* @param params - The parameters.
|
|
382
|
+
* @param params.contact - The contact information for the user (email or contact number).
|
|
383
|
+
* @param params.type - The type of contact information.
|
|
384
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
357
385
|
* @param requestOptions - Optional request options.
|
|
358
386
|
* @returns A promise that resolves to a ServiceResponse containing the forget password response.
|
|
359
387
|
*/
|
|
360
|
-
forgetPassword(
|
|
388
|
+
forgetPassword(params, requestOptions) {
|
|
361
389
|
return __async(this, null, function* () {
|
|
362
|
-
return yield this.get(
|
|
390
|
+
return yield this.get(
|
|
391
|
+
`profile/${params.contact}/forget_password`,
|
|
392
|
+
__spreadValues({
|
|
393
|
+
type: params.type
|
|
394
|
+
}, params.options),
|
|
395
|
+
requestOptions
|
|
396
|
+
);
|
|
363
397
|
});
|
|
364
398
|
}
|
|
365
399
|
/**
|
|
366
400
|
* Resets the password for a user.
|
|
367
401
|
*
|
|
368
|
-
* @param
|
|
369
|
-
* @param
|
|
370
|
-
* @param
|
|
371
|
-
* @param
|
|
402
|
+
* @param params - The parameters.
|
|
403
|
+
* @param params.contact - The contact information for the user (email or contact number).
|
|
404
|
+
* @param params.refCode - The reference code for password reset.
|
|
405
|
+
* @param params.newPassword - The new password to set.
|
|
406
|
+
* @param params.otp - (Optional) The one-time password.
|
|
407
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
372
408
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
373
409
|
* @returns A promise that resolves to a ServiceResponse containing the status response.
|
|
374
410
|
*/
|
|
375
|
-
resetPassword(
|
|
411
|
+
resetPassword(params, requestOptions) {
|
|
376
412
|
return __async(this, null, function* () {
|
|
377
413
|
return yield this.post(
|
|
378
|
-
`profile/${contact}/forget_password`,
|
|
379
|
-
{
|
|
380
|
-
refcode: refCode,
|
|
381
|
-
change: newPassword,
|
|
382
|
-
otp
|
|
383
|
-
},
|
|
414
|
+
`profile/${params.contact}/forget_password`,
|
|
415
|
+
__spreadValues({
|
|
416
|
+
refcode: params.refCode,
|
|
417
|
+
change: params.newPassword,
|
|
418
|
+
otp: params.otp
|
|
419
|
+
}, params.options),
|
|
384
420
|
requestOptions
|
|
385
421
|
);
|
|
386
422
|
});
|
|
387
423
|
}
|
|
388
424
|
/**
|
|
389
|
-
*
|
|
425
|
+
* Sends an OTP (One-Time Password) to the user for authentication.
|
|
390
426
|
*
|
|
391
|
-
* @param
|
|
392
|
-
* @param
|
|
393
|
-
* @param
|
|
394
|
-
* @param
|
|
427
|
+
* @param params - The parameters.
|
|
428
|
+
* @param params.uuid - The unique device identifier.
|
|
429
|
+
* @param params.appId - Your application id.
|
|
430
|
+
* @param params.contactNumber - The contact number for the user.
|
|
431
|
+
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
432
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
395
433
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
396
434
|
* @returns A promise that resolves to a ServiceResponse containing the OTP response.
|
|
397
435
|
*/
|
|
398
|
-
getOtp(
|
|
436
|
+
getOtp(params, requestOptions) {
|
|
399
437
|
return __async(this, null, function* () {
|
|
400
438
|
return yield this.get(
|
|
401
439
|
"auth/otp",
|
|
402
|
-
{
|
|
403
|
-
uuid,
|
|
404
|
-
app_id: appId,
|
|
405
|
-
contact_number: contactNumber,
|
|
406
|
-
channel
|
|
407
|
-
},
|
|
440
|
+
__spreadValues({
|
|
441
|
+
uuid: params.uuid,
|
|
442
|
+
app_id: params.appId,
|
|
443
|
+
contact_number: params.contactNumber,
|
|
444
|
+
channel: params.channel
|
|
445
|
+
}, params.options),
|
|
408
446
|
requestOptions
|
|
409
447
|
);
|
|
410
448
|
});
|
|
411
449
|
}
|
|
412
450
|
/**
|
|
413
|
-
*
|
|
451
|
+
* Confirm the OTP (One-Time Password) for authentication.
|
|
414
452
|
*
|
|
415
|
-
* @param
|
|
416
|
-
* @param
|
|
417
|
-
* @param
|
|
418
|
-
* @param
|
|
419
|
-
* @
|
|
453
|
+
* @param params - The parameters.
|
|
454
|
+
* @param params.otp - The OTP to confirm.
|
|
455
|
+
* @param params.refCode - The reference code for the OTP.
|
|
456
|
+
* @param params.contactNumber - The contact number for the user.
|
|
457
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
458
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
459
|
+
* @returns A promise that resolves to a ServiceResponse containing the confirm OTP response.
|
|
420
460
|
*/
|
|
421
|
-
confirmOtp(
|
|
461
|
+
confirmOtp(params, requestOptions) {
|
|
422
462
|
return __async(this, null, function* () {
|
|
423
463
|
return yield this.post(
|
|
424
464
|
"auth/bzbs_authen",
|
|
425
|
-
{
|
|
426
|
-
otp,
|
|
427
|
-
refcode: refCode,
|
|
428
|
-
contact_number: contactNumber
|
|
429
|
-
},
|
|
465
|
+
__spreadValues({
|
|
466
|
+
otp: params.otp,
|
|
467
|
+
refcode: params.refCode,
|
|
468
|
+
contact_number: params.contactNumber
|
|
469
|
+
}, params.options),
|
|
430
470
|
requestOptions
|
|
431
471
|
);
|
|
432
472
|
});
|
|
433
473
|
}
|
|
434
474
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* @param
|
|
438
|
-
* @param
|
|
439
|
-
* @param
|
|
440
|
-
* @param
|
|
441
|
-
* @param
|
|
475
|
+
* Validate the OTP (One-Time Password) for authentication.
|
|
476
|
+
*
|
|
477
|
+
* @param params - The parameters.
|
|
478
|
+
* @param params.appId - Your application id.
|
|
479
|
+
* @param params.otp - The OTP to validate.
|
|
480
|
+
* @param params.refCode - The reference code for the OTP.
|
|
481
|
+
* @param params.contactNumber - The contact number for the user.
|
|
482
|
+
* @param params.use - Whether to use the OTP after validation.
|
|
483
|
+
* @param params.channel - (Optional) The channel to use for OTP delivery.
|
|
484
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
442
485
|
* @param requestOptions - (Optional) Additional options for the request.
|
|
443
|
-
* @returns A promise that resolves to a ServiceResponse containing the
|
|
486
|
+
* @returns A promise that resolves to a ServiceResponse containing the validate OTP response.
|
|
444
487
|
*/
|
|
445
|
-
validateOtp(
|
|
488
|
+
validateOtp(params, requestOptions) {
|
|
446
489
|
return __async(this, null, function* () {
|
|
447
490
|
return yield this.post(
|
|
448
491
|
"auth/otp",
|
|
449
|
-
{
|
|
450
|
-
app_id: appId,
|
|
451
|
-
otp,
|
|
452
|
-
refcode: refCode,
|
|
453
|
-
contact_number: contactNumber,
|
|
454
|
-
use,
|
|
455
|
-
channel
|
|
456
|
-
},
|
|
492
|
+
__spreadValues({
|
|
493
|
+
app_id: params.appId,
|
|
494
|
+
otp: params.otp,
|
|
495
|
+
refcode: params.refCode,
|
|
496
|
+
contact_number: params.contactNumber,
|
|
497
|
+
use: params.use,
|
|
498
|
+
channel: params.channel
|
|
499
|
+
}, params.options),
|
|
457
500
|
requestOptions
|
|
458
501
|
);
|
|
459
502
|
});
|
|
@@ -461,23 +504,25 @@ var AuthenticateApi = class extends BaseService {
|
|
|
461
504
|
/**
|
|
462
505
|
* Retrieve a new token and update the current device token.
|
|
463
506
|
*
|
|
464
|
-
* @param
|
|
465
|
-
* @param
|
|
466
|
-
* @param
|
|
467
|
-
* @param
|
|
468
|
-
* @param
|
|
507
|
+
* @param params - The parameters.
|
|
508
|
+
* @param params.uuid - The unique device identifier.
|
|
509
|
+
* @param params.appId - Your application id.
|
|
510
|
+
* @param params.clientVersion - The version of the client.
|
|
511
|
+
* @param params.deviceToken - The token of the device.
|
|
512
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
513
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
469
514
|
* @returns A promise that resolves to a ServiceResponse containing the resume response.
|
|
470
515
|
*/
|
|
471
|
-
resume(
|
|
516
|
+
resume(params, requestOptions) {
|
|
472
517
|
return __async(this, null, function* () {
|
|
473
518
|
return yield this.post(
|
|
474
519
|
"auth/device_resume",
|
|
475
|
-
{
|
|
476
|
-
uuid,
|
|
477
|
-
app_id: appId,
|
|
478
|
-
client_version: clientVersion,
|
|
479
|
-
device_token: deviceToken
|
|
480
|
-
},
|
|
520
|
+
__spreadValues({
|
|
521
|
+
uuid: params.uuid,
|
|
522
|
+
app_id: params.appId,
|
|
523
|
+
client_version: params.clientVersion,
|
|
524
|
+
device_token: params.deviceToken
|
|
525
|
+
}, params.options),
|
|
481
526
|
requestOptions
|
|
482
527
|
);
|
|
483
528
|
});
|
|
@@ -485,23 +530,25 @@ var AuthenticateApi = class extends BaseService {
|
|
|
485
530
|
/**
|
|
486
531
|
* Update the device token for push notification.
|
|
487
532
|
*
|
|
488
|
-
* @param
|
|
489
|
-
* @param
|
|
490
|
-
* @param
|
|
491
|
-
* @param
|
|
492
|
-
* @param
|
|
533
|
+
* @param params - The parameters.
|
|
534
|
+
* @param params.uuid - The unique device identifier.
|
|
535
|
+
* @param params.appId - Your application id.
|
|
536
|
+
* @param params.clientVersion - The version of the client.
|
|
537
|
+
* @param params.deviceToken - The token of the device.
|
|
538
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
539
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
493
540
|
* @returns A promise that resolves to a ServiceResponse containing the resume response.
|
|
494
541
|
*/
|
|
495
|
-
updateDevice(
|
|
542
|
+
updateDevice(params, requestOptions) {
|
|
496
543
|
return __async(this, null, function* () {
|
|
497
544
|
return yield this.post(
|
|
498
|
-
"auth/
|
|
499
|
-
{
|
|
500
|
-
uuid,
|
|
501
|
-
app_id: appId,
|
|
502
|
-
client_version: clientVersion,
|
|
503
|
-
device_token: deviceToken
|
|
504
|
-
},
|
|
545
|
+
"auth/device_resume",
|
|
546
|
+
__spreadValues({
|
|
547
|
+
uuid: params.uuid,
|
|
548
|
+
app_id: params.appId,
|
|
549
|
+
client_version: params.clientVersion,
|
|
550
|
+
device_token: params.deviceToken
|
|
551
|
+
}, params.options),
|
|
505
552
|
requestOptions
|
|
506
553
|
);
|
|
507
554
|
});
|
|
@@ -535,17 +582,22 @@ var BadgeApi = class extends BaseService {
|
|
|
535
582
|
constructor(client, baseUrl) {
|
|
536
583
|
super(client, baseUrl);
|
|
537
584
|
}
|
|
538
|
-
|
|
539
|
-
|
|
585
|
+
/**
|
|
586
|
+
* Retrieves user badges.
|
|
587
|
+
*
|
|
588
|
+
* @param params - The parameters.
|
|
589
|
+
* @param params.badgeId - The ID of the badge to retrieve.
|
|
590
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
591
|
+
* @param requestOptions - (Optional) Additional options for the request.
|
|
592
|
+
* @returns A promise that resolves to a ServiceResponse containing an array of Badge objects.
|
|
593
|
+
*/
|
|
594
|
+
getBadges(params, requestOptions) {
|
|
540
595
|
return __async(this, null, function* () {
|
|
541
|
-
var _a;
|
|
542
596
|
return yield this.get(
|
|
543
597
|
"profile/me/badges",
|
|
544
|
-
{
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}, params.option ? params.option : {})
|
|
548
|
-
},
|
|
598
|
+
__spreadValues({
|
|
599
|
+
badge_id: params.badgeId
|
|
600
|
+
}, params.options),
|
|
549
601
|
requestOptions
|
|
550
602
|
);
|
|
551
603
|
});
|
|
@@ -557,6 +609,30 @@ var CampaignApi = class extends BaseService {
|
|
|
557
609
|
constructor(client, baseUrl) {
|
|
558
610
|
super(client, baseUrl);
|
|
559
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Retrieves a list of campaigns based on the provided parameters.
|
|
614
|
+
*
|
|
615
|
+
* @param params - The parameters for the campaign list.
|
|
616
|
+
* @param params.config - The configuration for the campaign (list name).
|
|
617
|
+
* @param params.cat - The category for the campaign.
|
|
618
|
+
* @param params.byConfig - A boolean indicating whether to filter by configuration.
|
|
619
|
+
* @param params.skip - The number of campaigns to skip.
|
|
620
|
+
* @param params.top - The number of campaigns to retrieve.
|
|
621
|
+
* @param params.deviceLocale - The device locale for the campaigns.
|
|
622
|
+
* @param params.locale - The locale for the campaigns.
|
|
623
|
+
* @param params.keyword - The keyword for the campaigns.
|
|
624
|
+
* @param params.startDate - The start date for the campaigns.
|
|
625
|
+
* @param params.sponsorId - The sponsor ID for the campaigns.
|
|
626
|
+
* @param params.maxPoints - The maximum points for the campaigns.
|
|
627
|
+
* @param params.minPoints - The minimum points for the campaigns.
|
|
628
|
+
* @param params.sortBy - The sort order for the campaigns.
|
|
629
|
+
* @param params.center - The coordinates for the center of the campaigns.
|
|
630
|
+
* @param params.hashTags - The hash tags for the campaigns.
|
|
631
|
+
* @param params.locationAgencyId - The location agency ID for the campaigns.
|
|
632
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
633
|
+
* @param requestOptions - The options for the HTTP request.
|
|
634
|
+
* @returns A promise that resolves to a ServiceResponse containing an array of Campaign objects.
|
|
635
|
+
*/
|
|
560
636
|
campaign(params, requestOptions) {
|
|
561
637
|
return __async(this, null, function* () {
|
|
562
638
|
return yield this.get(
|
|
@@ -578,11 +654,22 @@ var CampaignApi = class extends BaseService {
|
|
|
578
654
|
center: params.center,
|
|
579
655
|
tags: params.hashTags,
|
|
580
656
|
locationAgencyId: params.locationAgencyId
|
|
581
|
-
}, params.
|
|
657
|
+
}, params.options),
|
|
582
658
|
requestOptions
|
|
583
659
|
);
|
|
584
660
|
});
|
|
585
661
|
}
|
|
662
|
+
/**
|
|
663
|
+
* Retrieves a list of user's favorite campaigns.
|
|
664
|
+
*
|
|
665
|
+
* @param params - The parameters.
|
|
666
|
+
* @param params.skip - The number of campaigns to skip.
|
|
667
|
+
* @param params.top - The number of campaigns to retrieve.
|
|
668
|
+
* @param params.locale - The locale for the campaigns.
|
|
669
|
+
* @param params.options - (Optional) Additional params for the request.
|
|
670
|
+
* @param requestOptions - The options for the API request.
|
|
671
|
+
* @returns A promise that resolves to a ServiceResponse containing an array of Campaign objects.
|
|
672
|
+
*/
|
|
586
673
|
favoriteCampaigns(params, requestOptions) {
|
|
587
674
|
return __async(this, null, function* () {
|
|
588
675
|
return yield this.get(
|
|
@@ -592,54 +679,97 @@ var CampaignApi = class extends BaseService {
|
|
|
592
679
|
skip: params.skip,
|
|
593
680
|
top: params.top,
|
|
594
681
|
locale: params.locale
|
|
595
|
-
}, params.
|
|
682
|
+
}, params.options)
|
|
596
683
|
},
|
|
597
684
|
requestOptions
|
|
598
685
|
);
|
|
599
686
|
});
|
|
600
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* Retrieves the details of a campaign.
|
|
690
|
+
*
|
|
691
|
+
* @param param - The parameters.
|
|
692
|
+
* @param param.id - The ID of the campaign.
|
|
693
|
+
* @param param.deviceLocale - The device locale (optional).
|
|
694
|
+
* @param param.options - Additional options for the request (optional).
|
|
695
|
+
* @param requestOptions - The options for the request (optional).
|
|
696
|
+
* @returns A promise that resolves to a service response containing the campaign details.
|
|
697
|
+
*/
|
|
601
698
|
campaignDetails(param, requestOptions) {
|
|
602
699
|
return __async(this, null, function* () {
|
|
603
700
|
return yield this == null ? void 0 : this.get(
|
|
604
701
|
`campaign/${param.id}`,
|
|
605
702
|
{
|
|
606
|
-
params: {
|
|
703
|
+
params: __spreadValues({
|
|
607
704
|
device_locale: param.deviceLocale
|
|
608
|
-
}
|
|
705
|
+
}, param.options)
|
|
609
706
|
},
|
|
610
707
|
requestOptions
|
|
611
708
|
);
|
|
612
709
|
});
|
|
613
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* Adds a campaign to the user's favorites.
|
|
713
|
+
* @param id - The ID of the campaign to add to favorites.
|
|
714
|
+
* @param requestOptions - Optional request options.
|
|
715
|
+
* @returns A promise that resolves to a ServiceResponse containing the FavoriteResponse.
|
|
716
|
+
*/
|
|
614
717
|
addToFavorite(id, requestOptions) {
|
|
615
718
|
return __async(this, null, function* () {
|
|
616
719
|
return yield this.post(`campaign/${id}/favourite`, {}, requestOptions);
|
|
617
720
|
});
|
|
618
721
|
}
|
|
722
|
+
/**
|
|
723
|
+
* Removes a campaign from user's favorites.
|
|
724
|
+
* @param id - The ID of the campaign to remove from favorites.
|
|
725
|
+
* @param requestOptions - Optional request options.
|
|
726
|
+
* @returns A promise that resolves to a ServiceResponse containing the FavoriteResponse.
|
|
727
|
+
*/
|
|
619
728
|
removeFromFavorite(id, requestOptions) {
|
|
620
729
|
return __async(this, null, function* () {
|
|
621
730
|
return yield this.delete(`campaign/${id}/favourite`, requestOptions);
|
|
622
731
|
});
|
|
623
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* Redeems a campaign.
|
|
735
|
+
*
|
|
736
|
+
* @param params - The parameters for redeeming the campaign.
|
|
737
|
+
* @param params.id - The ID of the campaign to redeem.
|
|
738
|
+
* @param params.addressKey - The address key of a user's address.
|
|
739
|
+
* @param params.contactNumber - The contact number of the user.
|
|
740
|
+
* @param params.options - Additional options for the redemption.
|
|
741
|
+
* @param requestOptions - The options for the HTTP request.
|
|
742
|
+
* @returns A promise that resolves to a service response containing the redeem response.
|
|
743
|
+
*/
|
|
624
744
|
redeem(params, requestOptions) {
|
|
625
745
|
return __async(this, null, function* () {
|
|
626
746
|
return yield this.post(
|
|
627
747
|
`campaign/${params.id}/redeem`,
|
|
628
|
-
{
|
|
748
|
+
__spreadValues({
|
|
629
749
|
address_key: params.addressKey,
|
|
630
750
|
contact_number: params.contactNumber
|
|
631
|
-
},
|
|
751
|
+
}, params.options),
|
|
632
752
|
requestOptions
|
|
633
753
|
);
|
|
634
754
|
});
|
|
635
755
|
}
|
|
636
|
-
|
|
756
|
+
/**
|
|
757
|
+
* Redeems a campaign in bulk.
|
|
758
|
+
*
|
|
759
|
+
* @param params - The parameters.
|
|
760
|
+
* @param params.id - The ID of the campaign to redeem.
|
|
761
|
+
* @param params.quantity - The quantity to redeem.
|
|
762
|
+
* @param params.options - Additional options for the redemption.
|
|
763
|
+
* @param requestOptions - The options for the HTTP request.
|
|
764
|
+
* @returns A promise that resolves to a service response containing the redeem response.
|
|
765
|
+
*/
|
|
766
|
+
bulkRedeem(params, requestOptions) {
|
|
637
767
|
return __async(this, null, function* () {
|
|
638
768
|
return yield this.post(
|
|
639
|
-
`campaign/${id}/bulkredeem`,
|
|
640
|
-
{
|
|
641
|
-
quantity
|
|
642
|
-
},
|
|
769
|
+
`campaign/${params.id}/bulkredeem`,
|
|
770
|
+
__spreadValues({
|
|
771
|
+
quantity: params.quantity
|
|
772
|
+
}, params.options),
|
|
643
773
|
requestOptions
|
|
644
774
|
);
|
|
645
775
|
});
|
|
@@ -651,23 +781,37 @@ var CartApi = class extends BaseService {
|
|
|
651
781
|
constructor(client, baseUrl) {
|
|
652
782
|
super(client, baseUrl);
|
|
653
783
|
}
|
|
654
|
-
|
|
784
|
+
/**
|
|
785
|
+
* Adds an item to the cart.
|
|
786
|
+
*
|
|
787
|
+
* @param params - The parameters.
|
|
788
|
+
* @param params.id - The ID of the item to add to the cart.
|
|
789
|
+
* @param params.mode - The mode off adding.
|
|
790
|
+
* @param params.qty - The quantity of the item.
|
|
791
|
+
* @param params.sideCampaignJson - The side campaign JSON.
|
|
792
|
+
* @param params.options - Additional options for adding the item to the cart.
|
|
793
|
+
* @param requestOptions - The options for the request.
|
|
794
|
+
* @returns A promise that resolves to a ServiceResponse containing the cart count response.
|
|
795
|
+
*/
|
|
655
796
|
addCart(params, requestOptions) {
|
|
656
797
|
return __async(this, null, function* () {
|
|
657
798
|
return yield this.post(
|
|
658
799
|
`cart/${params.id}/add`,
|
|
659
|
-
{
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
}
|
|
665
|
-
},
|
|
800
|
+
__spreadValues({
|
|
801
|
+
mode: params.mode,
|
|
802
|
+
qty: params.qty,
|
|
803
|
+
sideCampaignJson: params.sideCampaignJson
|
|
804
|
+
}, params.options),
|
|
666
805
|
requestOptions
|
|
667
806
|
);
|
|
668
807
|
});
|
|
669
808
|
}
|
|
670
|
-
|
|
809
|
+
/**
|
|
810
|
+
* Retrieves the count of items in the cart.
|
|
811
|
+
*
|
|
812
|
+
* @param requestOptions - Optional request options.
|
|
813
|
+
* @returns A promise that resolves to a ServiceResponse containing the CartCountResponse.
|
|
814
|
+
*/
|
|
671
815
|
cartCount(requestOptions) {
|
|
672
816
|
return __async(this, null, function* () {
|
|
673
817
|
return yield this.get(this.baseUrl + "cart/count", {}, requestOptions);
|
|
@@ -680,17 +824,24 @@ var CategoryApi = class extends BaseService {
|
|
|
680
824
|
constructor(client, baseUrl) {
|
|
681
825
|
super(client, baseUrl);
|
|
682
826
|
}
|
|
683
|
-
|
|
827
|
+
/**
|
|
828
|
+
* Retrieves the campaign categories.
|
|
829
|
+
*
|
|
830
|
+
* @param params - The parameters.
|
|
831
|
+
* @param params.config - The configuration string.
|
|
832
|
+
* @param params.byConfig - Optional. Specifies whether to retrieve categories by configuration.
|
|
833
|
+
* @param params.options - Optional. Additional options for retrieving the categories.
|
|
834
|
+
* @param requestOptions - Optional. The request options.
|
|
835
|
+
* @returns A promise that resolves to a service response containing an array of categories.
|
|
836
|
+
*/
|
|
684
837
|
categories(params, requestOptions) {
|
|
685
838
|
return __async(this, null, function* () {
|
|
686
839
|
return yield this.get(
|
|
687
840
|
"campaigncat/menu",
|
|
688
|
-
{
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
}
|
|
693
|
-
},
|
|
841
|
+
__spreadValues({
|
|
842
|
+
byConfig: params.byConfig,
|
|
843
|
+
config: params.config
|
|
844
|
+
}, params.options),
|
|
694
845
|
requestOptions
|
|
695
846
|
);
|
|
696
847
|
});
|
|
@@ -702,35 +853,60 @@ var ConsentApi = class extends BaseService {
|
|
|
702
853
|
constructor(client, baseUrl) {
|
|
703
854
|
super(client, baseUrl);
|
|
704
855
|
}
|
|
705
|
-
|
|
856
|
+
/**
|
|
857
|
+
* Retrieves the user's consent information.
|
|
858
|
+
*
|
|
859
|
+
* @param params - The parameters for the consent request.
|
|
860
|
+
* @param params.termsAndConditions - The terms and conditions consent version.
|
|
861
|
+
* @param params.dataPrivacy - The data privacy consent version.
|
|
862
|
+
* @param params.marketingOption - The marketing option consent version.
|
|
863
|
+
* @param params.email - The email consent (0 for false, 1 for true).
|
|
864
|
+
* @param params.sms - The SMS consent (0 for false, 1 for true).
|
|
865
|
+
* @param params.notification - The notification consent (0 for false, 1 for true).
|
|
866
|
+
* @param params.line - The LINE consent (0 for false, 1 for true).
|
|
867
|
+
* @param params.analyticsBuzzebeesCookies - The analytics Buzzebees cookies consent (0 for false, 1 for true).
|
|
868
|
+
* @param params.analyticsFirebaseCookies - The analytics Firebase cookies consent (0 for false, 1 for true).
|
|
869
|
+
* @param params.analyticsGoogleCookies - The analytics Google cookies consent (0 for false, 1 for true).
|
|
870
|
+
* @param params.analyticsMetaCookies - The analytics Meta cookies consent (0 for false, 1 for true).
|
|
871
|
+
* @param params.analyticsOtherCookies - The analytics other cookies consent (0 for false, 1 for true).
|
|
872
|
+
* @param params.functionalCookies - The functional cookies consent (0 for false, 1 for true).
|
|
873
|
+
* @param params.marketingCookies - The marketing cookies consent (0 for false, 1 for true).
|
|
874
|
+
* @param params.necessaryCookies - The necessary cookies consent (0 for false, 1 for true).
|
|
875
|
+
* @param params.options - Additional params.
|
|
876
|
+
* @param requestOptions - The options for the request.
|
|
877
|
+
* @returns A promise that resolves to a ServiceResponse containing the consent information.
|
|
878
|
+
*/
|
|
706
879
|
getConsent(params, requestOptions) {
|
|
707
880
|
return __async(this, null, function* () {
|
|
708
881
|
return yield this.get(
|
|
709
882
|
"consent",
|
|
710
|
-
{
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}
|
|
728
|
-
},
|
|
883
|
+
__spreadValues({
|
|
884
|
+
termandcondition: params.termsAndConditions,
|
|
885
|
+
dataprivacy: params.dataPrivacy,
|
|
886
|
+
marketingoption: params.marketingOption,
|
|
887
|
+
email: params.email,
|
|
888
|
+
sms: params.sms,
|
|
889
|
+
notification: params.notification,
|
|
890
|
+
line: params.line,
|
|
891
|
+
analyticsBuzzebeesCookies: params.analyticsBuzzebeesCookies,
|
|
892
|
+
analyticsFirebaseCookies: params.analyticsFirebaseCookies,
|
|
893
|
+
analyticsGoogleCookies: params.analyticsGoogleCookies,
|
|
894
|
+
analyticsMetaCookies: params.analyticsMetaCookies,
|
|
895
|
+
analyticsOtherCookies: params.analyticsOtherCookies,
|
|
896
|
+
functionalCookies: params.functionalCookies,
|
|
897
|
+
marketingCookies: params.marketingCookies,
|
|
898
|
+
necessaryCookies: params.necessaryCookies
|
|
899
|
+
}, params.options),
|
|
729
900
|
requestOptions
|
|
730
901
|
);
|
|
731
902
|
});
|
|
732
903
|
}
|
|
733
|
-
|
|
904
|
+
/**
|
|
905
|
+
* Unconsents the user.
|
|
906
|
+
*
|
|
907
|
+
* @param requestOptions - The options for the request.
|
|
908
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the unconsent operation.
|
|
909
|
+
*/
|
|
734
910
|
unconsent(requestOptions) {
|
|
735
911
|
return __async(this, null, function* () {
|
|
736
912
|
return yield this.post("consent/unconsent", {}, requestOptions);
|
|
@@ -743,16 +919,22 @@ var CouponApi = class extends BaseService {
|
|
|
743
919
|
constructor(client, baseUrl) {
|
|
744
920
|
super(client, baseUrl);
|
|
745
921
|
}
|
|
746
|
-
|
|
922
|
+
/**
|
|
923
|
+
* Processes coupon codes.
|
|
924
|
+
*
|
|
925
|
+
* @param params - The parameters.
|
|
926
|
+
* @param params.codes - The coupon codes to process.
|
|
927
|
+
* @param params.options - Additional options for processing coupon codes.
|
|
928
|
+
* @param requestOptions - The options for making the API request.
|
|
929
|
+
* @returns A promise that resolves to a service response containing the coupon response.
|
|
930
|
+
*/
|
|
747
931
|
processCodes(params, requestOptions) {
|
|
748
932
|
return __async(this, null, function* () {
|
|
749
933
|
return yield this.post(
|
|
750
934
|
"coupon/process",
|
|
751
|
-
{
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
}
|
|
755
|
-
},
|
|
935
|
+
__spreadValues({
|
|
936
|
+
"codes[]": params.codes
|
|
937
|
+
}, params.options),
|
|
756
938
|
requestOptions
|
|
757
939
|
);
|
|
758
940
|
});
|
|
@@ -764,29 +946,45 @@ var DashboardApi = class extends BaseService {
|
|
|
764
946
|
constructor(client, baseUrl) {
|
|
765
947
|
super(client, baseUrl);
|
|
766
948
|
}
|
|
767
|
-
|
|
949
|
+
/**
|
|
950
|
+
* Retrieves the main dashboard data.
|
|
951
|
+
*
|
|
952
|
+
* @param params - The parameters.
|
|
953
|
+
* @param params.appName - The name of the application.
|
|
954
|
+
* @param params.locale - The locale number.
|
|
955
|
+
* @param params.options - Additional options for the request.
|
|
956
|
+
* @param requestOptions - The options for the request.
|
|
957
|
+
* @returns A promise that resolves to a service response containing an array of Dashboard objects.
|
|
958
|
+
*/
|
|
959
|
+
mainDashboard(params, requestOptions) {
|
|
768
960
|
return __async(this, null, function* () {
|
|
769
961
|
return yield this.get(
|
|
770
962
|
"dashboard/main",
|
|
771
|
-
{
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
},
|
|
963
|
+
__spreadValues({
|
|
964
|
+
app_name: params.appName,
|
|
965
|
+
locale: params.locale
|
|
966
|
+
}, params.options),
|
|
777
967
|
requestOptions
|
|
778
968
|
);
|
|
779
969
|
});
|
|
780
970
|
}
|
|
971
|
+
/**
|
|
972
|
+
* Retrieves a sub-dashboard data.
|
|
973
|
+
*
|
|
974
|
+
* @param params - The parameters.
|
|
975
|
+
* @param params.dashboardName - The name of the sub-dashboard to retrieve.
|
|
976
|
+
* @param params.locale - The locale of the sub-dashboard.
|
|
977
|
+
* @param params.options - Additional options for retrieving the sub-dashboard.
|
|
978
|
+
* @param requestOptions - Optional request options.
|
|
979
|
+
* @returns A promise that resolves to a service response containing an array of dashboards.
|
|
980
|
+
*/
|
|
781
981
|
subDashboard(params, requestOptions) {
|
|
782
982
|
return __async(this, null, function* () {
|
|
783
983
|
return yield this.get(
|
|
784
984
|
`dashboard/${params.dashboardName}`,
|
|
785
|
-
{
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
}
|
|
789
|
-
},
|
|
985
|
+
__spreadValues({
|
|
986
|
+
locale: params.locale
|
|
987
|
+
}, params.options),
|
|
790
988
|
requestOptions
|
|
791
989
|
);
|
|
792
990
|
});
|
|
@@ -798,28 +996,54 @@ var HistoryApi = class extends BaseService {
|
|
|
798
996
|
constructor(client, baseUrl) {
|
|
799
997
|
super(client, baseUrl);
|
|
800
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* Retrieves the redeem histories based on the specified parameters.
|
|
1001
|
+
*
|
|
1002
|
+
* @param params - The parameters for retrieving redeem histories.
|
|
1003
|
+
* @param params.byConfig - Indicates whether to retrieve redeem histories by config.
|
|
1004
|
+
* @param params.config - The config for retrieving redeem histories.
|
|
1005
|
+
* @param params.skip - The number of records to skip.
|
|
1006
|
+
* @param params.top - The number of records to retrieve.
|
|
1007
|
+
* @param params.locale - The locale for retrieving redeem histories (optional).
|
|
1008
|
+
* @param params.startDate - The start date for retrieving redeem histories (optional).
|
|
1009
|
+
* @param params.endDate - The end date for retrieving redeem histories (optional).
|
|
1010
|
+
* @param params.options - Additional options for retrieving redeem histories (optional).
|
|
1011
|
+
* @param requestOptions - The options for the request (optional).
|
|
1012
|
+
* @returns A promise that resolves to a service response containing an array of purchase objects.
|
|
1013
|
+
*/
|
|
801
1014
|
redeemHistories(params, requestOptions) {
|
|
802
1015
|
return __async(this, null, function* () {
|
|
803
1016
|
return yield this.get(
|
|
804
1017
|
"redeem",
|
|
805
|
-
{
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}
|
|
815
|
-
},
|
|
1018
|
+
__spreadValues({
|
|
1019
|
+
byConfig: params.byConfig,
|
|
1020
|
+
config: params.config,
|
|
1021
|
+
skip: params.skip,
|
|
1022
|
+
top: params.top,
|
|
1023
|
+
locale: params.locale,
|
|
1024
|
+
startdate: params.startDate,
|
|
1025
|
+
enddate: params.endDate
|
|
1026
|
+
}, params.options),
|
|
816
1027
|
requestOptions
|
|
817
1028
|
);
|
|
818
1029
|
});
|
|
819
1030
|
}
|
|
1031
|
+
/**
|
|
1032
|
+
* Marks the specified redeem key as used.
|
|
1033
|
+
*
|
|
1034
|
+
* @param params - The parameters.
|
|
1035
|
+
* @param params.redeemKey - The redeem key for the campaign.
|
|
1036
|
+
* @param params.options - Additional options for using the campaign.
|
|
1037
|
+
* @param requestOptions - Optional request options.
|
|
1038
|
+
* @returns A promise that resolves to a service response containing the result of the redemption.
|
|
1039
|
+
*/
|
|
820
1040
|
use(params, requestOptions) {
|
|
821
1041
|
return __async(this, null, function* () {
|
|
822
|
-
return yield this.post(
|
|
1042
|
+
return yield this.post(
|
|
1043
|
+
`redeem/${params.redeemKey}/use`,
|
|
1044
|
+
__spreadValues({}, params.options),
|
|
1045
|
+
requestOptions
|
|
1046
|
+
);
|
|
823
1047
|
});
|
|
824
1048
|
}
|
|
825
1049
|
};
|
|
@@ -829,18 +1053,30 @@ var LineApi = class extends BaseService {
|
|
|
829
1053
|
constructor(client, baseUrl) {
|
|
830
1054
|
super(client, baseUrl);
|
|
831
1055
|
}
|
|
832
|
-
|
|
1056
|
+
/**
|
|
1057
|
+
* Authenticates with the LINE API.
|
|
1058
|
+
*
|
|
1059
|
+
* @param params - The authentication parameters.
|
|
1060
|
+
* @param params.grantType - The grant type.
|
|
1061
|
+
* @param params.code - The code.
|
|
1062
|
+
* @param params.clientId - The client ID.
|
|
1063
|
+
* @param params.clientSecret - The client secret.
|
|
1064
|
+
* @param params.redirectUrl - The redirect URL.
|
|
1065
|
+
* @param params.options - Additional options for the request.
|
|
1066
|
+
* @param requestOptions - The optional request options.
|
|
1067
|
+
* @returns A promise that resolves to a ServiceResponse containing the LineAuthResponse.
|
|
1068
|
+
*/
|
|
833
1069
|
lineAuth(params, requestOptions) {
|
|
834
1070
|
return __async(this, null, function* () {
|
|
835
1071
|
return yield this.post(
|
|
836
1072
|
"oauth2/v2.1/token",
|
|
837
|
-
{
|
|
1073
|
+
__spreadValues({
|
|
838
1074
|
grant_type: params.grantType,
|
|
839
1075
|
code: params.code,
|
|
840
1076
|
client_id: params.clientId,
|
|
841
1077
|
client_secret: params.clientSecret,
|
|
842
1078
|
redirect_uri: params.redirectUrl
|
|
843
|
-
},
|
|
1079
|
+
}, params.options),
|
|
844
1080
|
requestOptions
|
|
845
1081
|
);
|
|
846
1082
|
});
|
|
@@ -852,20 +1088,36 @@ var NotificationApi = class extends BaseService {
|
|
|
852
1088
|
constructor(client, baseUrl) {
|
|
853
1089
|
super(client, baseUrl);
|
|
854
1090
|
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Retrieves notifications.
|
|
1093
|
+
*
|
|
1094
|
+
* @param params - The parameters for retrieving notifications.
|
|
1095
|
+
* @param params.mode - The mode for retrieving notifications (new or all)
|
|
1096
|
+
* @param params.sortBy - The sort order for the notifications (createdate_desc or createdate_asc)
|
|
1097
|
+
* @param requestOptions - The options for the HTTP request.
|
|
1098
|
+
* @returns A promise that resolves to a service response containing an array of notifications.
|
|
1099
|
+
*/
|
|
855
1100
|
notifications(params, requestOptions) {
|
|
856
1101
|
return __async(this, null, function* () {
|
|
857
1102
|
return yield this.get(
|
|
858
1103
|
"noti",
|
|
859
|
-
{
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
},
|
|
1104
|
+
__spreadValues({
|
|
1105
|
+
mode: params.mode,
|
|
1106
|
+
sortBy: params.sortBy
|
|
1107
|
+
}, params.options),
|
|
865
1108
|
requestOptions
|
|
866
1109
|
);
|
|
867
1110
|
});
|
|
868
1111
|
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Marks notifications as read.
|
|
1114
|
+
*
|
|
1115
|
+
* @param params - The parameters for marking notifications as read.
|
|
1116
|
+
* @param params.ids - The IDs(RowKeys) of the notifications to mark as read. (RowKey1, RowKey2)
|
|
1117
|
+
* @param params.options - Additional options for marking notifications as read.
|
|
1118
|
+
* @param requestOptions - Optional request options.
|
|
1119
|
+
* @returns A promise that resolves to a service response containing the result of marking notifications as read.
|
|
1120
|
+
*/
|
|
869
1121
|
read(params, requestOptions) {
|
|
870
1122
|
return __async(this, null, function* () {
|
|
871
1123
|
return yield this.post(
|
|
@@ -884,49 +1136,90 @@ var PlaceApi = class extends BaseService {
|
|
|
884
1136
|
constructor(client, baseUrl) {
|
|
885
1137
|
super(client, baseUrl);
|
|
886
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Retrieves a list of places based on the provided parameters.
|
|
1141
|
+
*
|
|
1142
|
+
* @param params - The parameters for the place list request.
|
|
1143
|
+
* @param params.agencyId - The ID of the agency.
|
|
1144
|
+
* @param params.center - The center of the search area.
|
|
1145
|
+
* @param params.distance - The distance from the center.
|
|
1146
|
+
* @param params.top - The number of places to retrieve.
|
|
1147
|
+
* @param params.provinceCode - The province code (optional).
|
|
1148
|
+
* @param params.category - The category of the place (optional).
|
|
1149
|
+
* @param params.mode - The mode of the place (optional).
|
|
1150
|
+
* @param params.requiredCampaign - Indicates whether the place requires a campaign (optional).
|
|
1151
|
+
* @param params.keyword - The keyword to search for (optional).
|
|
1152
|
+
* @param params.isFavourite - Indicates whether the place is a favourite (optional).
|
|
1153
|
+
* @param params.options - Additional options for the request (optional).
|
|
1154
|
+
* @param requestOptions - The options for the request (optional).
|
|
1155
|
+
* @returns A promise that resolves to a ServiceResponse containing an array of Place objects.
|
|
1156
|
+
*/
|
|
887
1157
|
placeList(params, requestOptions) {
|
|
888
1158
|
return __async(this, null, function* () {
|
|
889
1159
|
return yield this.get(
|
|
890
1160
|
"place",
|
|
891
|
-
{
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
}
|
|
904
|
-
},
|
|
1161
|
+
__spreadValues({
|
|
1162
|
+
agencyId: params.agencyId,
|
|
1163
|
+
center: params.center,
|
|
1164
|
+
distance: params.distance,
|
|
1165
|
+
top: params.top,
|
|
1166
|
+
province_code: params.provinceCode,
|
|
1167
|
+
category: params.category,
|
|
1168
|
+
mode: params.mode,
|
|
1169
|
+
require_campaign: params.requiredCampaign,
|
|
1170
|
+
q: params.keyword,
|
|
1171
|
+
isFavourite: params.isFavourite
|
|
1172
|
+
}, params.options),
|
|
905
1173
|
requestOptions
|
|
906
1174
|
);
|
|
907
1175
|
});
|
|
908
1176
|
}
|
|
909
|
-
|
|
1177
|
+
/**
|
|
1178
|
+
* Retrieves information about a specific place.
|
|
1179
|
+
*
|
|
1180
|
+
* @param params - The parameters for the place request.
|
|
1181
|
+
* @param params.id - The ID of the place.
|
|
1182
|
+
* @param params.agencyId - The ID of the agency.
|
|
1183
|
+
* @param params.requiredCampaign - (Optional) Indicates if a campaign is required.
|
|
1184
|
+
* @param params.isFavourite - (Optional) Indicates if the place is a favorite.
|
|
1185
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
1186
|
+
* @param requestOptions - (Optional) Additional options for the HTTP request.
|
|
1187
|
+
* @returns A promise that resolves to a ServiceResponse containing the place information.
|
|
1188
|
+
*/
|
|
910
1189
|
place(params, requestOptions) {
|
|
911
1190
|
return __async(this, null, function* () {
|
|
912
1191
|
return yield this.get(
|
|
913
1192
|
`place/${params.id}`,
|
|
914
|
-
{
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
}
|
|
920
|
-
},
|
|
1193
|
+
__spreadValues({
|
|
1194
|
+
agencyId: params.agencyId,
|
|
1195
|
+
require_campaign: params.requiredCampaign,
|
|
1196
|
+
isFavourite: params.isFavourite
|
|
1197
|
+
}, params.options),
|
|
921
1198
|
requestOptions
|
|
922
1199
|
);
|
|
923
1200
|
});
|
|
924
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Adds a place to the user's favorites.
|
|
1204
|
+
*
|
|
1205
|
+
* @param params - The parameters.
|
|
1206
|
+
* @param params.id - The ID of the place to be added to favorites.
|
|
1207
|
+
* @param requestOptions - The optional request options.
|
|
1208
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the operation.
|
|
1209
|
+
*/
|
|
925
1210
|
addToFavourite(params, requestOptions) {
|
|
926
1211
|
return __async(this, null, function* () {
|
|
927
1212
|
return yield this.post(`place/${params.id}/favourite`, {}, requestOptions);
|
|
928
1213
|
});
|
|
929
1214
|
}
|
|
1215
|
+
/**
|
|
1216
|
+
* Removes a place from the user's favorites.
|
|
1217
|
+
*
|
|
1218
|
+
* @param params - The parameters.
|
|
1219
|
+
* @param params.id - The ID of the place to be removed from favorites.
|
|
1220
|
+
* @param requestOptions - Optional request options.
|
|
1221
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the operation.
|
|
1222
|
+
*/
|
|
930
1223
|
removeFromFavourite(params, requestOptions) {
|
|
931
1224
|
return __async(this, null, function* () {
|
|
932
1225
|
return yield this.post(`place/${params.id}/unfavourite`, {}, requestOptions);
|
|
@@ -939,18 +1232,28 @@ var PointLogApi = class extends BaseService {
|
|
|
939
1232
|
constructor(client, baseUrl) {
|
|
940
1233
|
super(client, baseUrl);
|
|
941
1234
|
}
|
|
942
|
-
|
|
1235
|
+
/**
|
|
1236
|
+
* Retrieves the point log.
|
|
1237
|
+
*
|
|
1238
|
+
* @param params - The parameters for retrieving the point log.
|
|
1239
|
+
* @param params.month - The month for which to retrieve the point log.
|
|
1240
|
+
* @param params.type - (Optional) The type of point log to retrieve. (earn/burn/etc)
|
|
1241
|
+
* @param params.lastRowKey - (Optional) The last row key for pagination.
|
|
1242
|
+
* @param params.top - (Optional) The maximum number of records to retrieve.
|
|
1243
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
1244
|
+
* @param requestOption - (Optional) The request options.
|
|
1245
|
+
* @returns A promise that resolves to a service response containing an array of point logs.
|
|
1246
|
+
*/
|
|
1247
|
+
getPointLog(params, requestOption) {
|
|
943
1248
|
return __async(this, null, function* () {
|
|
944
1249
|
return yield this.get(
|
|
945
1250
|
"log/points",
|
|
946
|
-
{
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
}
|
|
953
|
-
},
|
|
1251
|
+
__spreadValues({
|
|
1252
|
+
month: params.month,
|
|
1253
|
+
type: params == null ? void 0 : params.type,
|
|
1254
|
+
lastRowKey: params == null ? void 0 : params.lastRowKey,
|
|
1255
|
+
top: params == null ? void 0 : params.top
|
|
1256
|
+
}, params.options),
|
|
954
1257
|
requestOption
|
|
955
1258
|
);
|
|
956
1259
|
});
|
|
@@ -962,11 +1265,18 @@ var ProfileApi = class extends BaseService {
|
|
|
962
1265
|
constructor(client, baseUrl) {
|
|
963
1266
|
super(client, baseUrl);
|
|
964
1267
|
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Updates the user profile with the provided parameters.
|
|
1270
|
+
*
|
|
1271
|
+
* @param params - The parameters for updating the profile.
|
|
1272
|
+
* @param requestOptions - The options for the request.
|
|
1273
|
+
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
1274
|
+
*/
|
|
965
1275
|
updateProfile(params, requestOptions) {
|
|
966
1276
|
return __async(this, null, function* () {
|
|
967
1277
|
return yield this.post(
|
|
968
1278
|
"profile/me",
|
|
969
|
-
{
|
|
1279
|
+
__spreadValues({
|
|
970
1280
|
data: params.profileImage,
|
|
971
1281
|
firstname: params.firstName,
|
|
972
1282
|
lastname: params.lastName,
|
|
@@ -1015,7 +1325,7 @@ var ProfileApi = class extends BaseService {
|
|
|
1015
1325
|
occupation: params.occupation,
|
|
1016
1326
|
remark: params.remark,
|
|
1017
1327
|
displayname: params.displayName
|
|
1018
|
-
},
|
|
1328
|
+
}, params.options),
|
|
1019
1329
|
{
|
|
1020
1330
|
headers: __spreadValues({
|
|
1021
1331
|
"Content-Type": "multipart/form-data"
|
|
@@ -1026,24 +1336,40 @@ var ProfileApi = class extends BaseService {
|
|
|
1026
1336
|
);
|
|
1027
1337
|
});
|
|
1028
1338
|
}
|
|
1029
|
-
|
|
1339
|
+
/**
|
|
1340
|
+
* Changes the user's password.
|
|
1341
|
+
*
|
|
1342
|
+
* @param params - The parameters.
|
|
1343
|
+
* @param params.current - The current password.
|
|
1344
|
+
* @param params.change - The new password.
|
|
1345
|
+
* @param params.options - Optional additional options.
|
|
1346
|
+
* @param requestOptions - Optional request options.
|
|
1347
|
+
* @returns A promise that resolves to a ServiceResponse containing the status response.
|
|
1348
|
+
*/
|
|
1349
|
+
changePassword(params, requestOptions) {
|
|
1030
1350
|
return __async(this, null, function* () {
|
|
1031
1351
|
return yield this.post(
|
|
1032
1352
|
"profile/me/change_password",
|
|
1033
|
-
{
|
|
1034
|
-
current,
|
|
1035
|
-
change
|
|
1036
|
-
},
|
|
1353
|
+
__spreadValues({
|
|
1354
|
+
current: params.current,
|
|
1355
|
+
change: params.change
|
|
1356
|
+
}, params.options),
|
|
1037
1357
|
requestOptions
|
|
1038
1358
|
);
|
|
1039
1359
|
});
|
|
1040
1360
|
}
|
|
1041
|
-
|
|
1361
|
+
/**
|
|
1362
|
+
* Updates the shipping information for the user.
|
|
1363
|
+
*
|
|
1364
|
+
* @param params - The parameters for updating the shipping information.
|
|
1365
|
+
* @param requestOptions - The options for the HTTP request.
|
|
1366
|
+
* @returns A promise that resolves to a ServiceResponse containing the updated shipping information.
|
|
1367
|
+
*/
|
|
1042
1368
|
updateShipping(params, requestOptions) {
|
|
1043
1369
|
return __async(this, null, function* () {
|
|
1044
1370
|
return yield this.post(
|
|
1045
1371
|
"profile/me/shipping",
|
|
1046
|
-
{
|
|
1372
|
+
__spreadValues({
|
|
1047
1373
|
shippingfirstname: params.shippingFirstName,
|
|
1048
1374
|
shippinglastname: params.shippingLastName,
|
|
1049
1375
|
shipping_province_code: params.shippingProvinceCode,
|
|
@@ -1055,50 +1381,89 @@ var ProfileApi = class extends BaseService {
|
|
|
1055
1381
|
shipping_district_name: params.shippingDistrictName,
|
|
1056
1382
|
shipping_subdistrict_name: params.shippingSubFDistrictName,
|
|
1057
1383
|
shipping_contact_number: params.shippingContactNumber
|
|
1058
|
-
},
|
|
1384
|
+
}, params.options),
|
|
1059
1385
|
requestOptions
|
|
1060
1386
|
);
|
|
1061
1387
|
});
|
|
1062
1388
|
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1389
|
+
/**
|
|
1390
|
+
* Changes the contact number of the user.
|
|
1391
|
+
*
|
|
1392
|
+
* @param params - The parameters for changing the contact number.
|
|
1393
|
+
* @param params.contactNumber - The new contact number.
|
|
1394
|
+
* @param params.otp - The one-time password.
|
|
1395
|
+
* @param params.refCode - The reference code.
|
|
1396
|
+
* @param params.idCard - (Optional) The ID card for additional verification.
|
|
1397
|
+
* @param params.options - (Optional) Additional options for the request.
|
|
1398
|
+
* @param requestOptions - (Optional) The options for the request.
|
|
1399
|
+
* @returns A promise that resolves to the response of the request.
|
|
1400
|
+
*/
|
|
1401
|
+
changeContactNumber(params, requestOptions) {
|
|
1065
1402
|
return __async(this, null, function* () {
|
|
1066
1403
|
return yield this.post(
|
|
1067
1404
|
"auth/change_authen",
|
|
1068
|
-
{
|
|
1069
|
-
contact_number: contactNumber,
|
|
1070
|
-
otp,
|
|
1071
|
-
refcode: refCode,
|
|
1072
|
-
idcard: idCard
|
|
1073
|
-
},
|
|
1405
|
+
__spreadValues({
|
|
1406
|
+
contact_number: params.contactNumber,
|
|
1407
|
+
otp: params.otp,
|
|
1408
|
+
refcode: params.refCode,
|
|
1409
|
+
idcard: params.idCard
|
|
1410
|
+
}, params.options),
|
|
1074
1411
|
requestOptions
|
|
1075
1412
|
);
|
|
1076
1413
|
});
|
|
1077
1414
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1415
|
+
/**
|
|
1416
|
+
* Changes the contact number for the current user.
|
|
1417
|
+
*
|
|
1418
|
+
* @param params - The parameters for changing the contact number.
|
|
1419
|
+
* @param params.contactNumber - The new contact number.
|
|
1420
|
+
* @param params.otp - The one-time password for verification.
|
|
1421
|
+
* @param params.refCode - The reference code for verification.
|
|
1422
|
+
* @param params.options - Additional options for the request.
|
|
1423
|
+
* @param requestOptions - The options for the request.
|
|
1424
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the request.
|
|
1425
|
+
*/
|
|
1426
|
+
changeContactNumberV2(params, requestOptions) {
|
|
1080
1427
|
return __async(this, null, function* () {
|
|
1081
1428
|
return yield this.post(
|
|
1082
1429
|
"profile/me/contact_number",
|
|
1083
|
-
{
|
|
1084
|
-
contact_number: contactNumber,
|
|
1085
|
-
otp,
|
|
1086
|
-
refcode: refCode
|
|
1087
|
-
},
|
|
1430
|
+
__spreadValues({
|
|
1431
|
+
contact_number: params.contactNumber,
|
|
1432
|
+
otp: params.otp,
|
|
1433
|
+
refcode: params.refCode
|
|
1434
|
+
}, params.options),
|
|
1088
1435
|
requestOptions
|
|
1089
1436
|
);
|
|
1090
1437
|
});
|
|
1091
1438
|
}
|
|
1439
|
+
/**
|
|
1440
|
+
* Retrieves the updated points for the current user's profile.
|
|
1441
|
+
*
|
|
1442
|
+
* @param requestOptions - Optional request options.
|
|
1443
|
+
* @returns A promise that resolves to a ServiceResponse containing the updated points.
|
|
1444
|
+
*/
|
|
1092
1445
|
points(requestOptions) {
|
|
1093
1446
|
return __async(this, null, function* () {
|
|
1094
1447
|
return yield this.get("profile/me/updated_points", {}, requestOptions);
|
|
1095
1448
|
});
|
|
1096
1449
|
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Retrieves the expiring points for the current user's profile.
|
|
1452
|
+
*
|
|
1453
|
+
* @param requestOptions - Optional request options.
|
|
1454
|
+
* @returns A promise that resolves to a ServiceResponse containing the expiring points.
|
|
1455
|
+
*/
|
|
1097
1456
|
expiringPoints(requestOptions) {
|
|
1098
1457
|
return __async(this, null, function* () {
|
|
1099
1458
|
return yield this.get("profile/me/allexpiring_points", {}, requestOptions);
|
|
1100
1459
|
});
|
|
1101
1460
|
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Deactivates the user's profile.
|
|
1463
|
+
*
|
|
1464
|
+
* @param requestOptions - Optional request options.
|
|
1465
|
+
* @returns A promise that resolves to a ServiceResponse containing the result of the deactivation.
|
|
1466
|
+
*/
|
|
1102
1467
|
deactivate(requestOptions) {
|
|
1103
1468
|
return __async(this, null, function* () {
|
|
1104
1469
|
return yield this.post("profile/me/deactivate", {}, requestOptions);
|
|
@@ -1111,12 +1476,18 @@ var RegistrationApi = class extends BaseService {
|
|
|
1111
1476
|
constructor(client, baseUrl) {
|
|
1112
1477
|
super(client, baseUrl);
|
|
1113
1478
|
}
|
|
1114
|
-
|
|
1479
|
+
/**
|
|
1480
|
+
* Registers a user with the provided registration parameters.
|
|
1481
|
+
*
|
|
1482
|
+
* @param params - The registration parameters.
|
|
1483
|
+
* @param requestOptions - The optional request options.
|
|
1484
|
+
* @returns A promise that resolves to a service response containing the registration response.
|
|
1485
|
+
*/
|
|
1115
1486
|
register(params, requestOptions) {
|
|
1116
1487
|
return __async(this, null, function* () {
|
|
1117
1488
|
return yield this.post(
|
|
1118
1489
|
"auth/register",
|
|
1119
|
-
{
|
|
1490
|
+
__spreadValues({
|
|
1120
1491
|
app_id: params.appId,
|
|
1121
1492
|
uuid: params.uuid,
|
|
1122
1493
|
mac_address: params.macAddress,
|
|
@@ -1146,7 +1517,7 @@ var RegistrationApi = class extends BaseService {
|
|
|
1146
1517
|
mktoption_notification: params.notificationMarketing,
|
|
1147
1518
|
mktoption_line: params.lineMarketing,
|
|
1148
1519
|
mktoption_phone: params.phoneMarketing
|
|
1149
|
-
},
|
|
1520
|
+
}, params.options),
|
|
1150
1521
|
requestOptions
|
|
1151
1522
|
);
|
|
1152
1523
|
});
|