@bzbs/react-api-client 0.0.4 → 0.0.6

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