gs2 1.3.116 → 1.3.118

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.
Files changed (60) hide show
  1. package/exchange/request/AcquireByUserIdRequest.d.ts +0 -4
  2. package/exchange/request/AcquireByUserIdRequest.js +0 -14
  3. package/exchange/request/AcquireByUserIdRequest.js.map +1 -1
  4. package/exchange/request/AcquireByUserIdRequest.ts +0 -14
  5. package/exchange/request/AcquireForceByUserIdRequest.d.ts +0 -4
  6. package/exchange/request/AcquireForceByUserIdRequest.js +0 -14
  7. package/exchange/request/AcquireForceByUserIdRequest.js.map +1 -1
  8. package/exchange/request/AcquireForceByUserIdRequest.ts +0 -14
  9. package/exchange/request/AcquireRequest.d.ts +0 -4
  10. package/exchange/request/AcquireRequest.js +0 -14
  11. package/exchange/request/AcquireRequest.js.map +1 -1
  12. package/exchange/request/AcquireRequest.ts +0 -14
  13. package/exchange/request/DeleteAwaitByUserIdRequest.d.ts +0 -4
  14. package/exchange/request/DeleteAwaitByUserIdRequest.js +0 -14
  15. package/exchange/request/DeleteAwaitByUserIdRequest.js.map +1 -1
  16. package/exchange/request/DeleteAwaitByUserIdRequest.ts +0 -14
  17. package/exchange/request/DeleteAwaitRequest.d.ts +0 -4
  18. package/exchange/request/DeleteAwaitRequest.js +0 -14
  19. package/exchange/request/DeleteAwaitRequest.js.map +1 -1
  20. package/exchange/request/DeleteAwaitRequest.ts +0 -14
  21. package/exchange/request/GetAwaitByUserIdRequest.d.ts +0 -4
  22. package/exchange/request/GetAwaitByUserIdRequest.js +0 -14
  23. package/exchange/request/GetAwaitByUserIdRequest.js.map +1 -1
  24. package/exchange/request/GetAwaitByUserIdRequest.ts +0 -14
  25. package/exchange/request/GetAwaitRequest.d.ts +0 -4
  26. package/exchange/request/GetAwaitRequest.js +0 -14
  27. package/exchange/request/GetAwaitRequest.js.map +1 -1
  28. package/exchange/request/GetAwaitRequest.ts +0 -14
  29. package/exchange/request/SkipByUserIdRequest.d.ts +0 -4
  30. package/exchange/request/SkipByUserIdRequest.js +0 -14
  31. package/exchange/request/SkipByUserIdRequest.js.map +1 -1
  32. package/exchange/request/SkipByUserIdRequest.ts +0 -14
  33. package/exchange/request/SkipRequest.d.ts +0 -4
  34. package/exchange/request/SkipRequest.js +0 -14
  35. package/exchange/request/SkipRequest.js.map +1 -1
  36. package/exchange/request/SkipRequest.ts +0 -14
  37. package/exchange/rest.js +52 -61
  38. package/exchange/rest.js.map +1 -1
  39. package/exchange/rest.ts +9 -18
  40. package/lottery/model/BoxItems.d.ts +7 -0
  41. package/lottery/model/BoxItems.js +87 -0
  42. package/lottery/model/BoxItems.js.map +1 -1
  43. package/lottery/model/BoxItems.ts +105 -0
  44. package/lottery/request/index.d.ts +7 -7
  45. package/lottery/request/index.js +13 -13
  46. package/lottery/request/index.js.map +1 -1
  47. package/lottery/request/index.ts +12 -12
  48. package/lottery/rest.d.ts +6 -6
  49. package/lottery/rest.js +158 -158
  50. package/lottery/rest.js.map +1 -1
  51. package/lottery/rest.ts +153 -153
  52. package/lottery/result/index.d.ts +7 -7
  53. package/lottery/result/index.js +13 -13
  54. package/lottery/result/index.js.map +1 -1
  55. package/lottery/result/index.ts +12 -12
  56. package/package.json +1 -1
  57. package/ranking/model/SubscribeUser.d.ts +12 -0
  58. package/ranking/model/SubscribeUser.js +123 -0
  59. package/ranking/model/SubscribeUser.js.map +1 -1
  60. package/ranking/model/SubscribeUser.ts +144 -0
package/lottery/rest.ts CHANGED
@@ -512,8 +512,8 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
512
512
  });
513
513
  }
514
514
 
515
- public describeBoxes(request: Request.DescribeBoxesRequest): Promise<Result.DescribeBoxesResult> {
516
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/box')
515
+ public describeLotteryModels(request: Request.DescribeLotteryModelsRequest): Promise<Result.DescribeLotteryModelsResult> {
516
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/lottery')
517
517
  .replace('{service}', 'lottery')
518
518
  .replace('{region}', this.session.region)
519
519
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
@@ -522,13 +522,8 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
522
522
  if (request.getRequestId()) {
523
523
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
524
524
  }
525
- if (request.getAccessToken()) {
526
- headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
527
- }
528
525
  const params: {[key: string]: any} = {
529
526
  'contextStack': request.getContextStack() ?? null,
530
- 'pageToken': String(request.getPageToken() ?? null),
531
- 'limit': String(request.getLimit() ?? null),
532
527
  };
533
528
  return axios.get(
534
529
  url,
@@ -537,18 +532,18 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
537
532
  headers,
538
533
  },
539
534
  ).then((response: any) => {
540
- return Result.DescribeBoxesResult.fromDict(response.data);
535
+ return Result.DescribeLotteryModelsResult.fromDict(response.data);
541
536
  }).catch((error: any) => {
542
537
  throw JSON.parse(error.response.data.message);
543
538
  });
544
539
  }
545
540
 
546
- public describeBoxesByUserId(request: Request.DescribeBoxesByUserIdRequest): Promise<Result.DescribeBoxesByUserIdResult> {
547
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/box')
541
+ public getLotteryModel(request: Request.GetLotteryModelRequest): Promise<Result.GetLotteryModelResult> {
542
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/lottery/{lotteryName}')
548
543
  .replace('{service}', 'lottery')
549
544
  .replace('{region}', this.session.region)
550
545
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
551
- .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
546
+ .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'));
552
547
 
553
548
  const headers = this.createAuthorizedHeaders();
554
549
  if (request.getRequestId()) {
@@ -556,8 +551,6 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
556
551
  }
557
552
  const params: {[key: string]: any} = {
558
553
  'contextStack': request.getContextStack() ?? null,
559
- 'pageToken': String(request.getPageToken() ?? null),
560
- 'limit': String(request.getLimit() ?? null),
561
554
  };
562
555
  return axios.get(
563
556
  url,
@@ -566,26 +559,22 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
566
559
  headers,
567
560
  },
568
561
  ).then((response: any) => {
569
- return Result.DescribeBoxesByUserIdResult.fromDict(response.data);
562
+ return Result.GetLotteryModelResult.fromDict(response.data);
570
563
  }).catch((error: any) => {
571
564
  throw JSON.parse(error.response.data.message);
572
565
  });
573
566
  }
574
567
 
575
- public getBox(request: Request.GetBoxRequest): Promise<Result.GetBoxResult> {
576
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/box/{prizeTableName}')
568
+ public describePrizeTables(request: Request.DescribePrizeTablesRequest): Promise<Result.DescribePrizeTablesResult> {
569
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/table')
577
570
  .replace('{service}', 'lottery')
578
571
  .replace('{region}', this.session.region)
579
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
580
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
572
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
581
573
 
582
574
  const headers = this.createAuthorizedHeaders();
583
575
  if (request.getRequestId()) {
584
576
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
585
577
  }
586
- if (request.getAccessToken()) {
587
- headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
588
- }
589
578
  const params: {[key: string]: any} = {
590
579
  'contextStack': request.getContextStack() ?? null,
591
580
  };
@@ -596,19 +585,18 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
596
585
  headers,
597
586
  },
598
587
  ).then((response: any) => {
599
- return Result.GetBoxResult.fromDict(response.data);
588
+ return Result.DescribePrizeTablesResult.fromDict(response.data);
600
589
  }).catch((error: any) => {
601
590
  throw JSON.parse(error.response.data.message);
602
591
  });
603
592
  }
604
593
 
605
- public getBoxByUserId(request: Request.GetBoxByUserIdRequest): Promise<Result.GetBoxByUserIdResult> {
606
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/box/{prizeTableName}')
594
+ public getPrizeTable(request: Request.GetPrizeTableRequest): Promise<Result.GetPrizeTableResult> {
595
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/table/{prizeTableName}')
607
596
  .replace('{service}', 'lottery')
608
597
  .replace('{region}', this.session.region)
609
598
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
610
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
611
- .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
599
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
612
600
 
613
601
  const headers = this.createAuthorizedHeaders();
614
602
  if (request.getRequestId()) {
@@ -624,86 +612,94 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
624
612
  headers,
625
613
  },
626
614
  ).then((response: any) => {
627
- return Result.GetBoxByUserIdResult.fromDict(response.data);
615
+ return Result.GetPrizeTableResult.fromDict(response.data);
628
616
  }).catch((error: any) => {
629
617
  throw JSON.parse(error.response.data.message);
630
618
  });
631
619
  }
632
620
 
633
- public resetBox(request: Request.ResetBoxRequest): Promise<Result.ResetBoxResult> {
634
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/box/{prizeTableName}')
621
+ public drawByUserId(request: Request.DrawByUserIdRequest): Promise<Result.DrawByUserIdResult> {
622
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/lottery/{lotteryName}/draw')
635
623
  .replace('{service}', 'lottery')
636
624
  .replace('{region}', this.session.region)
637
625
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
638
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
626
+ .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'))
627
+ .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
639
628
 
640
629
  const headers = this.createAuthorizedHeaders();
641
630
  if (request.getRequestId()) {
642
631
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
643
632
  }
644
- if (request.getAccessToken()) {
645
- headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
646
- }
647
633
  if (request.getDuplicationAvoider()) {
648
634
  headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
649
635
  }
650
- const params: {[key: string]: any} = {
636
+ const body: {[key: string]: any} = {
651
637
  'contextStack': request.getContextStack() ?? null,
638
+ 'count': request.getCount() ?? null,
639
+ 'config': request.getConfig()?.map((item) => item.toDict()) ?? null,
652
640
  };
653
- return axios.delete(
641
+ return axios.post(
654
642
  url,
655
- {
656
- params,
643
+ body,
644
+ {
657
645
  headers,
658
646
  },
659
647
  ).then((response: any) => {
660
- return Result.ResetBoxResult.fromDict(response.data);
648
+ return Result.DrawByUserIdResult.fromDict(response.data);
661
649
  }).catch((error: any) => {
662
- throw JSON.parse(error.response.data.message);
650
+ if (error.response) {
651
+ throw JSON.parse(error.response.data.message);
652
+ } else {
653
+ throw [];
654
+ }
663
655
  });
664
656
  }
665
657
 
666
- public resetBoxByUserId(request: Request.ResetBoxByUserIdRequest): Promise<Result.ResetBoxByUserIdResult> {
667
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/box/{prizeTableName}')
658
+ public drawByStampSheet(request: Request.DrawByStampSheetRequest): Promise<Result.DrawByStampSheetResult> {
659
+ const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/draw')
668
660
  .replace('{service}', 'lottery')
669
- .replace('{region}', this.session.region)
670
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
671
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
672
- .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
661
+ .replace('{region}', this.session.region);
673
662
 
674
663
  const headers = this.createAuthorizedHeaders();
675
664
  if (request.getRequestId()) {
676
665
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
677
666
  }
678
- if (request.getDuplicationAvoider()) {
679
- headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
680
- }
681
- const params: {[key: string]: any} = {
667
+ const body: {[key: string]: any} = {
682
668
  'contextStack': request.getContextStack() ?? null,
669
+ 'stampSheet': request.getStampSheet() ?? null,
670
+ 'keyId': request.getKeyId() ?? null,
683
671
  };
684
- return axios.delete(
672
+ return axios.post(
685
673
  url,
686
- {
687
- params,
674
+ body,
675
+ {
688
676
  headers,
689
677
  },
690
678
  ).then((response: any) => {
691
- return Result.ResetBoxByUserIdResult.fromDict(response.data);
679
+ return Result.DrawByStampSheetResult.fromDict(response.data);
692
680
  }).catch((error: any) => {
693
- throw JSON.parse(error.response.data.message);
681
+ if (error.response) {
682
+ throw JSON.parse(error.response.data.message);
683
+ } else {
684
+ throw [];
685
+ }
694
686
  });
695
687
  }
696
688
 
697
- public describeLotteryModels(request: Request.DescribeLotteryModelsRequest): Promise<Result.DescribeLotteryModelsResult> {
698
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/lottery')
689
+ public describeProbabilities(request: Request.DescribeProbabilitiesRequest): Promise<Result.DescribeProbabilitiesResult> {
690
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/lottery/{lotteryName}/probability')
699
691
  .replace('{service}', 'lottery')
700
692
  .replace('{region}', this.session.region)
701
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
693
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
694
+ .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'));
702
695
 
703
696
  const headers = this.createAuthorizedHeaders();
704
697
  if (request.getRequestId()) {
705
698
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
706
699
  }
700
+ if (request.getAccessToken()) {
701
+ headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
702
+ }
707
703
  const params: {[key: string]: any} = {
708
704
  'contextStack': request.getContextStack() ?? null,
709
705
  };
@@ -714,18 +710,19 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
714
710
  headers,
715
711
  },
716
712
  ).then((response: any) => {
717
- return Result.DescribeLotteryModelsResult.fromDict(response.data);
713
+ return Result.DescribeProbabilitiesResult.fromDict(response.data);
718
714
  }).catch((error: any) => {
719
715
  throw JSON.parse(error.response.data.message);
720
716
  });
721
717
  }
722
718
 
723
- public getLotteryModel(request: Request.GetLotteryModelRequest): Promise<Result.GetLotteryModelResult> {
724
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/lottery/{lotteryName}')
719
+ public describeProbabilitiesByUserId(request: Request.DescribeProbabilitiesByUserIdRequest): Promise<Result.DescribeProbabilitiesByUserIdResult> {
720
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/lottery/{lotteryName}/probability')
725
721
  .replace('{service}', 'lottery')
726
722
  .replace('{region}', this.session.region)
727
723
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
728
- .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'));
724
+ .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'))
725
+ .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
729
726
 
730
727
  const headers = this.createAuthorizedHeaders();
731
728
  if (request.getRequestId()) {
@@ -741,14 +738,14 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
741
738
  headers,
742
739
  },
743
740
  ).then((response: any) => {
744
- return Result.GetLotteryModelResult.fromDict(response.data);
741
+ return Result.DescribeProbabilitiesByUserIdResult.fromDict(response.data);
745
742
  }).catch((error: any) => {
746
743
  throw JSON.parse(error.response.data.message);
747
744
  });
748
745
  }
749
746
 
750
- public describePrizeTables(request: Request.DescribePrizeTablesRequest): Promise<Result.DescribePrizeTablesResult> {
751
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/table')
747
+ public exportMaster(request: Request.ExportMasterRequest): Promise<Result.ExportMasterResult> {
748
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/export')
752
749
  .replace('{service}', 'lottery')
753
750
  .replace('{region}', this.session.region)
754
751
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
@@ -767,18 +764,17 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
767
764
  headers,
768
765
  },
769
766
  ).then((response: any) => {
770
- return Result.DescribePrizeTablesResult.fromDict(response.data);
767
+ return Result.ExportMasterResult.fromDict(response.data);
771
768
  }).catch((error: any) => {
772
769
  throw JSON.parse(error.response.data.message);
773
770
  });
774
771
  }
775
772
 
776
- public getPrizeTable(request: Request.GetPrizeTableRequest): Promise<Result.GetPrizeTableResult> {
777
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/table/{prizeTableName}')
773
+ public getCurrentLotteryMaster(request: Request.GetCurrentLotteryMasterRequest): Promise<Result.GetCurrentLotteryMasterResult> {
774
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master')
778
775
  .replace('{service}', 'lottery')
779
776
  .replace('{region}', this.session.region)
780
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
781
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
777
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
782
778
 
783
779
  const headers = this.createAuthorizedHeaders();
784
780
  if (request.getRequestId()) {
@@ -794,40 +790,34 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
794
790
  headers,
795
791
  },
796
792
  ).then((response: any) => {
797
- return Result.GetPrizeTableResult.fromDict(response.data);
793
+ return Result.GetCurrentLotteryMasterResult.fromDict(response.data);
798
794
  }).catch((error: any) => {
799
795
  throw JSON.parse(error.response.data.message);
800
796
  });
801
797
  }
802
798
 
803
- public drawByUserId(request: Request.DrawByUserIdRequest): Promise<Result.DrawByUserIdResult> {
804
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/lottery/{lotteryName}/draw')
799
+ public updateCurrentLotteryMaster(request: Request.UpdateCurrentLotteryMasterRequest): Promise<Result.UpdateCurrentLotteryMasterResult> {
800
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master')
805
801
  .replace('{service}', 'lottery')
806
802
  .replace('{region}', this.session.region)
807
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
808
- .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'))
809
- .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
803
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
810
804
 
811
805
  const headers = this.createAuthorizedHeaders();
812
806
  if (request.getRequestId()) {
813
807
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
814
808
  }
815
- if (request.getDuplicationAvoider()) {
816
- headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
817
- }
818
809
  const body: {[key: string]: any} = {
819
810
  'contextStack': request.getContextStack() ?? null,
820
- 'count': request.getCount() ?? null,
821
- 'config': request.getConfig()?.map((item) => item.toDict()) ?? null,
811
+ 'settings': request.getSettings() ?? null,
822
812
  };
823
- return axios.post(
813
+ return axios.put(
824
814
  url,
825
815
  body,
826
816
  {
827
817
  headers,
828
818
  },
829
819
  ).then((response: any) => {
830
- return Result.DrawByUserIdResult.fromDict(response.data);
820
+ return Result.UpdateCurrentLotteryMasterResult.fromDict(response.data);
831
821
  }).catch((error: any) => {
832
822
  if (error.response) {
833
823
  throw JSON.parse(error.response.data.message);
@@ -837,10 +827,11 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
837
827
  });
838
828
  }
839
829
 
840
- public drawByStampSheet(request: Request.DrawByStampSheetRequest): Promise<Result.DrawByStampSheetResult> {
841
- const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/draw')
830
+ public updateCurrentLotteryMasterFromGitHub(request: Request.UpdateCurrentLotteryMasterFromGitHubRequest): Promise<Result.UpdateCurrentLotteryMasterFromGitHubResult> {
831
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/from_git_hub')
842
832
  .replace('{service}', 'lottery')
843
- .replace('{region}', this.session.region);
833
+ .replace('{region}', this.session.region)
834
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
844
835
 
845
836
  const headers = this.createAuthorizedHeaders();
846
837
  if (request.getRequestId()) {
@@ -848,17 +839,16 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
848
839
  }
849
840
  const body: {[key: string]: any} = {
850
841
  'contextStack': request.getContextStack() ?? null,
851
- 'stampSheet': request.getStampSheet() ?? null,
852
- 'keyId': request.getKeyId() ?? null,
842
+ 'checkoutSetting': request.getCheckoutSetting()?.toDict() ?? null,
853
843
  };
854
- return axios.post(
844
+ return axios.put(
855
845
  url,
856
846
  body,
857
847
  {
858
848
  headers,
859
849
  },
860
850
  ).then((response: any) => {
861
- return Result.DrawByStampSheetResult.fromDict(response.data);
851
+ return Result.UpdateCurrentLotteryMasterFromGitHubResult.fromDict(response.data);
862
852
  }).catch((error: any) => {
863
853
  if (error.response) {
864
854
  throw JSON.parse(error.response.data.message);
@@ -868,22 +858,21 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
868
858
  });
869
859
  }
870
860
 
871
- public describeProbabilities(request: Request.DescribeProbabilitiesRequest): Promise<Result.DescribeProbabilitiesResult> {
872
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/lottery/{lotteryName}/probability')
861
+ public describePrizeLimits(request: Request.DescribePrizeLimitsRequest): Promise<Result.DescribePrizeLimitsResult> {
862
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/prizeLimit/{prizeTableName}')
873
863
  .replace('{service}', 'lottery')
874
864
  .replace('{region}', this.session.region)
875
865
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
876
- .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'));
866
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
877
867
 
878
868
  const headers = this.createAuthorizedHeaders();
879
869
  if (request.getRequestId()) {
880
870
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
881
871
  }
882
- if (request.getAccessToken()) {
883
- headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
884
- }
885
872
  const params: {[key: string]: any} = {
886
873
  'contextStack': request.getContextStack() ?? null,
874
+ 'pageToken': String(request.getPageToken() ?? null),
875
+ 'limit': String(request.getLimit() ?? null),
887
876
  };
888
877
  return axios.get(
889
878
  url,
@@ -892,19 +881,19 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
892
881
  headers,
893
882
  },
894
883
  ).then((response: any) => {
895
- return Result.DescribeProbabilitiesResult.fromDict(response.data);
884
+ return Result.DescribePrizeLimitsResult.fromDict(response.data);
896
885
  }).catch((error: any) => {
897
886
  throw JSON.parse(error.response.data.message);
898
887
  });
899
888
  }
900
889
 
901
- public describeProbabilitiesByUserId(request: Request.DescribeProbabilitiesByUserIdRequest): Promise<Result.DescribeProbabilitiesByUserIdResult> {
902
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/lottery/{lotteryName}/probability')
890
+ public getPrizeLimit(request: Request.GetPrizeLimitRequest): Promise<Result.GetPrizeLimitResult> {
891
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/prizeLimit/{prizeTableName}/{prizeId}')
903
892
  .replace('{service}', 'lottery')
904
893
  .replace('{region}', this.session.region)
905
894
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
906
- .replace('{lotteryName}', String(request.getLotteryName() ?? 'null') === "" ? "null" : String(request.getLotteryName() ?? 'null'))
907
- .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
895
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
896
+ .replace('{prizeId}', String(request.getPrizeId() ?? 'null') === "" ? "null" : String(request.getPrizeId() ?? 'null'));
908
897
 
909
898
  const headers = this.createAuthorizedHeaders();
910
899
  if (request.getRequestId()) {
@@ -920,17 +909,19 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
920
909
  headers,
921
910
  },
922
911
  ).then((response: any) => {
923
- return Result.DescribeProbabilitiesByUserIdResult.fromDict(response.data);
912
+ return Result.GetPrizeLimitResult.fromDict(response.data);
924
913
  }).catch((error: any) => {
925
914
  throw JSON.parse(error.response.data.message);
926
915
  });
927
916
  }
928
917
 
929
- public exportMaster(request: Request.ExportMasterRequest): Promise<Result.ExportMasterResult> {
930
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/export')
918
+ public resetPrizeLimit(request: Request.ResetPrizeLimitRequest): Promise<Result.ResetPrizeLimitResult> {
919
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/prizeLimit/{prizeTableName}/{prizeId}')
931
920
  .replace('{service}', 'lottery')
932
921
  .replace('{region}', this.session.region)
933
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
922
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
923
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
924
+ .replace('{prizeId}', String(request.getPrizeId() ?? 'null') === "" ? "null" : String(request.getPrizeId() ?? 'null'));
934
925
 
935
926
  const headers = this.createAuthorizedHeaders();
936
927
  if (request.getRequestId()) {
@@ -939,21 +930,21 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
939
930
  const params: {[key: string]: any} = {
940
931
  'contextStack': request.getContextStack() ?? null,
941
932
  };
942
- return axios.get(
933
+ return axios.delete(
943
934
  url,
944
935
  {
945
936
  params,
946
937
  headers,
947
938
  },
948
939
  ).then((response: any) => {
949
- return Result.ExportMasterResult.fromDict(response.data);
940
+ return Result.ResetPrizeLimitResult.fromDict(response.data);
950
941
  }).catch((error: any) => {
951
942
  throw JSON.parse(error.response.data.message);
952
943
  });
953
944
  }
954
945
 
955
- public getCurrentLotteryMaster(request: Request.GetCurrentLotteryMasterRequest): Promise<Result.GetCurrentLotteryMasterResult> {
956
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master')
946
+ public describeBoxes(request: Request.DescribeBoxesRequest): Promise<Result.DescribeBoxesResult> {
947
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/box')
957
948
  .replace('{service}', 'lottery')
958
949
  .replace('{region}', this.session.region)
959
950
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
@@ -962,8 +953,13 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
962
953
  if (request.getRequestId()) {
963
954
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
964
955
  }
956
+ if (request.getAccessToken()) {
957
+ headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
958
+ }
965
959
  const params: {[key: string]: any} = {
966
960
  'contextStack': request.getContextStack() ?? null,
961
+ 'pageToken': String(request.getPageToken() ?? null),
962
+ 'limit': String(request.getLimit() ?? null),
967
963
  };
968
964
  return axios.get(
969
965
  url,
@@ -972,80 +968,78 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
972
968
  headers,
973
969
  },
974
970
  ).then((response: any) => {
975
- return Result.GetCurrentLotteryMasterResult.fromDict(response.data);
971
+ return Result.DescribeBoxesResult.fromDict(response.data);
976
972
  }).catch((error: any) => {
977
973
  throw JSON.parse(error.response.data.message);
978
974
  });
979
975
  }
980
976
 
981
- public updateCurrentLotteryMaster(request: Request.UpdateCurrentLotteryMasterRequest): Promise<Result.UpdateCurrentLotteryMasterResult> {
982
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master')
977
+ public describeBoxesByUserId(request: Request.DescribeBoxesByUserIdRequest): Promise<Result.DescribeBoxesByUserIdResult> {
978
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/box')
983
979
  .replace('{service}', 'lottery')
984
980
  .replace('{region}', this.session.region)
985
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
981
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
982
+ .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
986
983
 
987
984
  const headers = this.createAuthorizedHeaders();
988
985
  if (request.getRequestId()) {
989
986
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
990
987
  }
991
- const body: {[key: string]: any} = {
988
+ const params: {[key: string]: any} = {
992
989
  'contextStack': request.getContextStack() ?? null,
993
- 'settings': request.getSettings() ?? null,
990
+ 'pageToken': String(request.getPageToken() ?? null),
991
+ 'limit': String(request.getLimit() ?? null),
994
992
  };
995
- return axios.put(
993
+ return axios.get(
996
994
  url,
997
- body,
998
- {
995
+ {
996
+ params,
999
997
  headers,
1000
998
  },
1001
999
  ).then((response: any) => {
1002
- return Result.UpdateCurrentLotteryMasterResult.fromDict(response.data);
1000
+ return Result.DescribeBoxesByUserIdResult.fromDict(response.data);
1003
1001
  }).catch((error: any) => {
1004
- if (error.response) {
1005
- throw JSON.parse(error.response.data.message);
1006
- } else {
1007
- throw [];
1008
- }
1002
+ throw JSON.parse(error.response.data.message);
1009
1003
  });
1010
1004
  }
1011
1005
 
1012
- public updateCurrentLotteryMasterFromGitHub(request: Request.UpdateCurrentLotteryMasterFromGitHubRequest): Promise<Result.UpdateCurrentLotteryMasterFromGitHubResult> {
1013
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/from_git_hub')
1006
+ public getBox(request: Request.GetBoxRequest): Promise<Result.GetBoxResult> {
1007
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/box/{prizeTableName}')
1014
1008
  .replace('{service}', 'lottery')
1015
1009
  .replace('{region}', this.session.region)
1016
- .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
1010
+ .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
1011
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
1017
1012
 
1018
1013
  const headers = this.createAuthorizedHeaders();
1019
1014
  if (request.getRequestId()) {
1020
1015
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
1021
1016
  }
1022
- const body: {[key: string]: any} = {
1017
+ if (request.getAccessToken()) {
1018
+ headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
1019
+ }
1020
+ const params: {[key: string]: any} = {
1023
1021
  'contextStack': request.getContextStack() ?? null,
1024
- 'checkoutSetting': request.getCheckoutSetting()?.toDict() ?? null,
1025
1022
  };
1026
- return axios.put(
1023
+ return axios.get(
1027
1024
  url,
1028
- body,
1029
- {
1025
+ {
1026
+ params,
1030
1027
  headers,
1031
1028
  },
1032
1029
  ).then((response: any) => {
1033
- return Result.UpdateCurrentLotteryMasterFromGitHubResult.fromDict(response.data);
1030
+ return Result.GetBoxResult.fromDict(response.data);
1034
1031
  }).catch((error: any) => {
1035
- if (error.response) {
1036
- throw JSON.parse(error.response.data.message);
1037
- } else {
1038
- throw [];
1039
- }
1032
+ throw JSON.parse(error.response.data.message);
1040
1033
  });
1041
1034
  }
1042
1035
 
1043
- public describePrizeLimits(request: Request.DescribePrizeLimitsRequest): Promise<Result.DescribePrizeLimitsResult> {
1044
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/prizeLimit/{prizeTableName}')
1036
+ public getBoxByUserId(request: Request.GetBoxByUserIdRequest): Promise<Result.GetBoxByUserIdResult> {
1037
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/box/{prizeTableName}')
1045
1038
  .replace('{service}', 'lottery')
1046
1039
  .replace('{region}', this.session.region)
1047
1040
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
1048
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
1041
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
1042
+ .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
1049
1043
 
1050
1044
  const headers = this.createAuthorizedHeaders();
1051
1045
  if (request.getRequestId()) {
@@ -1053,8 +1047,6 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
1053
1047
  }
1054
1048
  const params: {[key: string]: any} = {
1055
1049
  'contextStack': request.getContextStack() ?? null,
1056
- 'pageToken': String(request.getPageToken() ?? null),
1057
- 'limit': String(request.getLimit() ?? null),
1058
1050
  };
1059
1051
  return axios.get(
1060
1052
  url,
@@ -1063,52 +1055,60 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
1063
1055
  headers,
1064
1056
  },
1065
1057
  ).then((response: any) => {
1066
- return Result.DescribePrizeLimitsResult.fromDict(response.data);
1058
+ return Result.GetBoxByUserIdResult.fromDict(response.data);
1067
1059
  }).catch((error: any) => {
1068
1060
  throw JSON.parse(error.response.data.message);
1069
1061
  });
1070
1062
  }
1071
1063
 
1072
- public getPrizeLimit(request: Request.GetPrizeLimitRequest): Promise<Result.GetPrizeLimitResult> {
1073
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/prizeLimit/{prizeTableName}/{prizeId}')
1064
+ public resetBox(request: Request.ResetBoxRequest): Promise<Result.ResetBoxResult> {
1065
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/box/{prizeTableName}')
1074
1066
  .replace('{service}', 'lottery')
1075
1067
  .replace('{region}', this.session.region)
1076
1068
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
1077
- .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
1078
- .replace('{prizeId}', String(request.getPrizeId() ?? 'null') === "" ? "null" : String(request.getPrizeId() ?? 'null'));
1069
+ .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'));
1079
1070
 
1080
1071
  const headers = this.createAuthorizedHeaders();
1081
1072
  if (request.getRequestId()) {
1082
1073
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
1083
1074
  }
1075
+ if (request.getAccessToken()) {
1076
+ headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
1077
+ }
1078
+ if (request.getDuplicationAvoider()) {
1079
+ headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
1080
+ }
1084
1081
  const params: {[key: string]: any} = {
1085
1082
  'contextStack': request.getContextStack() ?? null,
1086
1083
  };
1087
- return axios.get(
1084
+ return axios.delete(
1088
1085
  url,
1089
1086
  {
1090
1087
  params,
1091
1088
  headers,
1092
1089
  },
1093
1090
  ).then((response: any) => {
1094
- return Result.GetPrizeLimitResult.fromDict(response.data);
1091
+ return Result.ResetBoxResult.fromDict(response.data);
1095
1092
  }).catch((error: any) => {
1096
1093
  throw JSON.parse(error.response.data.message);
1097
1094
  });
1098
1095
  }
1099
1096
 
1100
- public resetPrizeLimit(request: Request.ResetPrizeLimitRequest): Promise<Result.ResetPrizeLimitResult> {
1101
- const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/prizeLimit/{prizeTableName}/{prizeId}')
1097
+ public resetBoxByUserId(request: Request.ResetBoxByUserIdRequest): Promise<Result.ResetBoxByUserIdResult> {
1098
+ const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/box/{prizeTableName}')
1102
1099
  .replace('{service}', 'lottery')
1103
1100
  .replace('{region}', this.session.region)
1104
1101
  .replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
1105
1102
  .replace('{prizeTableName}', String(request.getPrizeTableName() ?? 'null') === "" ? "null" : String(request.getPrizeTableName() ?? 'null'))
1106
- .replace('{prizeId}', String(request.getPrizeId() ?? 'null') === "" ? "null" : String(request.getPrizeId() ?? 'null'));
1103
+ .replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
1107
1104
 
1108
1105
  const headers = this.createAuthorizedHeaders();
1109
1106
  if (request.getRequestId()) {
1110
1107
  headers['X-GS2-REQUEST-ID'] = request.getRequestId();
1111
1108
  }
1109
+ if (request.getDuplicationAvoider()) {
1110
+ headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
1111
+ }
1112
1112
  const params: {[key: string]: any} = {
1113
1113
  'contextStack': request.getContextStack() ?? null,
1114
1114
  };
@@ -1119,7 +1119,7 @@ export default class Gs2LotteryRestClient extends AbstractGs2RestClient {
1119
1119
  headers,
1120
1120
  },
1121
1121
  ).then((response: any) => {
1122
- return Result.ResetPrizeLimitResult.fromDict(response.data);
1122
+ return Result.ResetBoxByUserIdResult.fromDict(response.data);
1123
1123
  }).catch((error: any) => {
1124
1124
  throw JSON.parse(error.response.data.message);
1125
1125
  });