gs2 1.3.142 → 1.3.144
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/inventory/model/AcquireCount.d.ts +17 -0
- package/inventory/model/AcquireCount.js +62 -0
- package/inventory/model/AcquireCount.js.map +1 -0
- package/inventory/model/AcquireCount.ts +60 -0
- package/inventory/model/ConsumeCount.d.ts +17 -0
- package/inventory/model/ConsumeCount.js +62 -0
- package/inventory/model/ConsumeCount.js.map +1 -0
- package/inventory/model/ConsumeCount.ts +60 -0
- package/inventory/model/SimpleInventory.d.ts +36 -0
- package/inventory/model/SimpleInventory.js +191 -0
- package/inventory/model/SimpleInventory.js.map +1 -0
- package/inventory/model/SimpleInventory.ts +207 -0
- package/inventory/model/SimpleInventoryModel.d.ts +32 -0
- package/inventory/model/SimpleInventoryModel.js +165 -0
- package/inventory/model/SimpleInventoryModel.js.map +1 -0
- package/inventory/model/SimpleInventoryModel.ts +179 -0
- package/inventory/model/SimpleInventoryModelMaster.d.ts +39 -0
- package/inventory/model/SimpleInventoryModelMaster.js +185 -0
- package/inventory/model/SimpleInventoryModelMaster.js.map +1 -0
- package/inventory/model/SimpleInventoryModelMaster.ts +198 -0
- package/inventory/model/SimpleItem.d.ts +33 -0
- package/inventory/model/SimpleItem.js +199 -0
- package/inventory/model/SimpleItem.js.map +1 -0
- package/inventory/model/SimpleItem.ts +218 -0
- package/inventory/model/SimpleItemModel.d.ts +28 -0
- package/inventory/model/SimpleItemModel.js +163 -0
- package/inventory/model/SimpleItemModel.js.map +1 -0
- package/inventory/model/SimpleItemModel.ts +179 -0
- package/inventory/model/SimpleItemModelMaster.d.ts +40 -0
- package/inventory/model/SimpleItemModelMaster.js +205 -0
- package/inventory/model/SimpleItemModelMaster.js.map +1 -0
- package/inventory/model/SimpleItemModelMaster.ts +221 -0
- package/inventory/model/index.d.ts +9 -1
- package/inventory/model/index.js +17 -1
- package/inventory/model/index.js.map +1 -1
- package/inventory/model/index.ts +16 -0
- package/{watch/request/GetInboxMetricsRequest.d.ts → inventory/request/AcquireSimpleItemsByStampSheetRequest.d.ts} +10 -2
- package/inventory/request/AcquireSimpleItemsByStampSheetRequest.js +83 -0
- package/inventory/request/AcquireSimpleItemsByStampSheetRequest.js.map +1 -0
- package/{watch/request/GetInboxMetricsRequest.ts → inventory/request/AcquireSimpleItemsByStampSheetRequest.ts} +32 -4
- package/inventory/request/AcquireSimpleItemsByUserIdRequest.d.ts +38 -0
- package/inventory/request/AcquireSimpleItemsByUserIdRequest.js +131 -0
- package/inventory/request/AcquireSimpleItemsByUserIdRequest.js.map +1 -0
- package/{version/request/GetBneAgreementUrlByUserIdRequest.ts → inventory/request/AcquireSimpleItemsByUserIdRequest.ts} +37 -60
- package/{watch/request/GetExchangeMetricsRequest.d.ts → inventory/request/ConsumeSimpleItemsByStampTaskRequest.d.ts} +10 -2
- package/inventory/request/ConsumeSimpleItemsByStampTaskRequest.js +83 -0
- package/inventory/request/ConsumeSimpleItemsByStampTaskRequest.js.map +1 -0
- package/{watch/request/GetAccountMetricsRequest.ts → inventory/request/ConsumeSimpleItemsByStampTaskRequest.ts} +32 -4
- package/inventory/request/ConsumeSimpleItemsByUserIdRequest.d.ts +38 -0
- package/inventory/request/ConsumeSimpleItemsByUserIdRequest.js +131 -0
- package/inventory/request/ConsumeSimpleItemsByUserIdRequest.js.map +1 -0
- package/inventory/request/ConsumeSimpleItemsByUserIdRequest.ts +141 -0
- package/inventory/request/ConsumeSimpleItemsRequest.d.ts +38 -0
- package/inventory/request/ConsumeSimpleItemsRequest.js +131 -0
- package/inventory/request/ConsumeSimpleItemsRequest.js.map +1 -0
- package/{version/request/AcceptBneAgreementRequest.ts → inventory/request/ConsumeSimpleItemsRequest.ts} +37 -34
- package/inventory/request/CreateSimpleInventoryModelMasterRequest.d.ts +33 -0
- package/inventory/request/CreateSimpleInventoryModelMasterRequest.js +111 -0
- package/inventory/request/CreateSimpleInventoryModelMasterRequest.js.map +1 -0
- package/inventory/request/CreateSimpleInventoryModelMasterRequest.ts +118 -0
- package/inventory/request/CreateSimpleItemModelMasterRequest.d.ts +37 -0
- package/inventory/request/CreateSimpleItemModelMasterRequest.js +125 -0
- package/inventory/request/CreateSimpleItemModelMasterRequest.js.map +1 -0
- package/inventory/request/CreateSimpleItemModelMasterRequest.ts +132 -0
- package/inventory/request/DeleteSimpleInventoryModelMasterRequest.d.ts +25 -0
- package/inventory/request/DeleteSimpleInventoryModelMasterRequest.js +83 -0
- package/inventory/request/DeleteSimpleInventoryModelMasterRequest.js.map +1 -0
- package/inventory/request/DeleteSimpleInventoryModelMasterRequest.ts +90 -0
- package/inventory/request/DeleteSimpleItemModelMasterRequest.d.ts +29 -0
- package/inventory/request/DeleteSimpleItemModelMasterRequest.js +97 -0
- package/inventory/request/DeleteSimpleItemModelMasterRequest.js.map +1 -0
- package/inventory/request/DeleteSimpleItemModelMasterRequest.ts +104 -0
- package/inventory/request/DeleteSimpleItemsByUserIdRequest.d.ts +33 -0
- package/inventory/request/DeleteSimpleItemsByUserIdRequest.js +109 -0
- package/inventory/request/DeleteSimpleItemsByUserIdRequest.js.map +1 -0
- package/{version/request/GetBneAgreementByUserIdRequest.ts → inventory/request/DeleteSimpleItemsByUserIdRequest.ts} +28 -22
- package/inventory/request/DescribeSimpleInventoryModelMastersRequest.d.ts +29 -0
- package/inventory/request/DescribeSimpleInventoryModelMastersRequest.js +97 -0
- package/inventory/request/DescribeSimpleInventoryModelMastersRequest.js.map +1 -0
- package/{account/request/SetBnlinkRequest.ts → inventory/request/DescribeSimpleInventoryModelMastersRequest.ts} +22 -31
- package/{watch/request/GetAccountMetricsRequest.d.ts → inventory/request/DescribeSimpleInventoryModelsRequest.d.ts} +6 -2
- package/inventory/request/DescribeSimpleInventoryModelsRequest.js +69 -0
- package/inventory/request/DescribeSimpleInventoryModelsRequest.js.map +1 -0
- package/{watch/request/GetExchangeMetricsRequest.ts → inventory/request/DescribeSimpleInventoryModelsRequest.ts} +18 -4
- package/inventory/request/DescribeSimpleItemModelMastersRequest.d.ts +33 -0
- package/inventory/request/DescribeSimpleItemModelMastersRequest.js +111 -0
- package/inventory/request/DescribeSimpleItemModelMastersRequest.js.map +1 -0
- package/inventory/request/DescribeSimpleItemModelMastersRequest.ts +118 -0
- package/inventory/request/DescribeSimpleItemModelsRequest.d.ts +25 -0
- package/inventory/request/DescribeSimpleItemModelsRequest.js +83 -0
- package/inventory/request/DescribeSimpleItemModelsRequest.js.map +1 -0
- package/inventory/request/DescribeSimpleItemModelsRequest.ts +90 -0
- package/inventory/request/DescribeSimpleItemsByUserIdRequest.d.ts +37 -0
- package/inventory/request/DescribeSimpleItemsByUserIdRequest.js +125 -0
- package/inventory/request/DescribeSimpleItemsByUserIdRequest.js.map +1 -0
- package/{account/request/DescribeBnlinksRequest.ts → inventory/request/DescribeSimpleItemsByUserIdRequest.ts} +22 -71
- package/{serialKey/request/DescribeSerialCodesRequest.d.ts → inventory/request/DescribeSimpleItemsRequest.d.ts} +10 -10
- package/inventory/request/DescribeSimpleItemsRequest.js +125 -0
- package/inventory/request/DescribeSimpleItemsRequest.js.map +1 -0
- package/{serialKey/request/DescribeSerialCodesRequest.ts → inventory/request/DescribeSimpleItemsRequest.ts} +22 -22
- package/inventory/request/GetSimpleInventoryModelMasterRequest.d.ts +25 -0
- package/inventory/request/GetSimpleInventoryModelMasterRequest.js +83 -0
- package/inventory/request/GetSimpleInventoryModelMasterRequest.js.map +1 -0
- package/inventory/request/GetSimpleInventoryModelMasterRequest.ts +90 -0
- package/inventory/request/GetSimpleInventoryModelRequest.d.ts +25 -0
- package/inventory/request/GetSimpleInventoryModelRequest.js +83 -0
- package/inventory/request/GetSimpleInventoryModelRequest.js.map +1 -0
- package/inventory/request/GetSimpleInventoryModelRequest.ts +90 -0
- package/{lottery/request/GetRawBoxByUserIdRequest.d.ts → inventory/request/GetSimpleItemByUserIdRequest.d.ts} +10 -6
- package/inventory/request/GetSimpleItemByUserIdRequest.js +111 -0
- package/inventory/request/GetSimpleItemByUserIdRequest.js.map +1 -0
- package/{version/request/DescribeBneAgreementTextUrlsByUserIdRequest.ts → inventory/request/GetSimpleItemByUserIdRequest.ts} +22 -34
- package/inventory/request/GetSimpleItemModelMasterRequest.d.ts +29 -0
- package/inventory/request/GetSimpleItemModelMasterRequest.js +97 -0
- package/inventory/request/GetSimpleItemModelMasterRequest.js.map +1 -0
- package/{account/request/DeleteBnlinkRequest.ts → inventory/request/GetSimpleItemModelMasterRequest.ts} +22 -31
- package/inventory/request/GetSimpleItemModelRequest.d.ts +29 -0
- package/inventory/request/GetSimpleItemModelRequest.js +97 -0
- package/inventory/request/GetSimpleItemModelRequest.js.map +1 -0
- package/{account/request/GetBnlinkRequest.ts → inventory/request/GetSimpleItemModelRequest.ts} +22 -31
- package/inventory/request/GetSimpleItemRequest.d.ts +33 -0
- package/inventory/request/GetSimpleItemRequest.js +111 -0
- package/inventory/request/GetSimpleItemRequest.js.map +1 -0
- package/{version/request/DescribeBneAgreementTextUrlsRequest.ts → inventory/request/GetSimpleItemRequest.ts} +22 -34
- package/inventory/request/GetSimpleItemWithSignatureByUserIdRequest.d.ts +37 -0
- package/inventory/request/GetSimpleItemWithSignatureByUserIdRequest.js +125 -0
- package/inventory/request/GetSimpleItemWithSignatureByUserIdRequest.js.map +1 -0
- package/{version/request/AcceptBneAgreementByUserIdRequest.ts → inventory/request/GetSimpleItemWithSignatureByUserIdRequest.ts} +36 -42
- package/inventory/request/GetSimpleItemWithSignatureRequest.d.ts +37 -0
- package/inventory/request/GetSimpleItemWithSignatureRequest.js +125 -0
- package/inventory/request/GetSimpleItemWithSignatureRequest.js.map +1 -0
- package/inventory/request/GetSimpleItemWithSignatureRequest.ts +132 -0
- package/inventory/request/UpdateSimpleInventoryModelMasterRequest.d.ts +33 -0
- package/inventory/request/UpdateSimpleInventoryModelMasterRequest.js +111 -0
- package/inventory/request/UpdateSimpleInventoryModelMasterRequest.js.map +1 -0
- package/inventory/request/UpdateSimpleInventoryModelMasterRequest.ts +118 -0
- package/inventory/request/UpdateSimpleItemModelMasterRequest.d.ts +37 -0
- package/inventory/request/UpdateSimpleItemModelMasterRequest.js +125 -0
- package/inventory/request/UpdateSimpleItemModelMasterRequest.js.map +1 -0
- package/inventory/request/UpdateSimpleItemModelMasterRequest.ts +132 -0
- package/inventory/request/index.d.ts +27 -1
- package/inventory/request/index.js +54 -2
- package/inventory/request/index.js.map +1 -1
- package/inventory/request/index.ts +52 -0
- package/inventory/rest.d.ts +26 -0
- package/inventory/rest.js +1098 -406
- package/inventory/rest.js.map +1 -1
- package/inventory/rest.ts +1085 -289
- package/inventory/result/AcquireSimpleItemsByStampSheetResult.d.ts +14 -0
- package/inventory/result/AcquireSimpleItemsByStampSheetResult.js +53 -0
- package/inventory/result/AcquireSimpleItemsByStampSheetResult.js.map +1 -0
- package/{version/result/GetBneAgreementResult.ts → inventory/result/AcquireSimpleItemsByStampSheetResult.ts} +10 -10
- package/inventory/result/AcquireSimpleItemsByUserIdResult.d.ts +14 -0
- package/inventory/result/AcquireSimpleItemsByUserIdResult.js +53 -0
- package/inventory/result/AcquireSimpleItemsByUserIdResult.js.map +1 -0
- package/{version/result/AcceptBneAgreementByUserIdResult.ts → inventory/result/AcquireSimpleItemsByUserIdResult.ts} +10 -10
- package/inventory/result/ConsumeSimpleItemsByStampTaskResult.d.ts +18 -0
- package/inventory/result/ConsumeSimpleItemsByStampTaskResult.js +67 -0
- package/inventory/result/ConsumeSimpleItemsByStampTaskResult.js.map +1 -0
- package/inventory/result/ConsumeSimpleItemsByStampTaskResult.ts +73 -0
- package/inventory/result/ConsumeSimpleItemsByUserIdResult.d.ts +14 -0
- package/inventory/result/ConsumeSimpleItemsByUserIdResult.js +53 -0
- package/inventory/result/ConsumeSimpleItemsByUserIdResult.js.map +1 -0
- package/{version/result/GetBneAgreementByUserIdResult.ts → inventory/result/ConsumeSimpleItemsByUserIdResult.ts} +10 -10
- package/inventory/result/ConsumeSimpleItemsResult.d.ts +14 -0
- package/inventory/result/ConsumeSimpleItemsResult.js +53 -0
- package/inventory/result/ConsumeSimpleItemsResult.js.map +1 -0
- package/{version/result/AcceptBneAgreementResult.ts → inventory/result/ConsumeSimpleItemsResult.ts} +10 -10
- package/inventory/result/CreateSimpleInventoryModelMasterResult.d.ts +14 -0
- package/inventory/result/CreateSimpleInventoryModelMasterResult.js +48 -0
- package/inventory/result/CreateSimpleInventoryModelMasterResult.js.map +1 -0
- package/inventory/result/CreateSimpleInventoryModelMasterResult.ts +48 -0
- package/inventory/result/CreateSimpleItemModelMasterResult.d.ts +14 -0
- package/{lottery/result/GetRawBoxByUserIdResult.js → inventory/result/CreateSimpleItemModelMasterResult.js} +13 -13
- package/inventory/result/CreateSimpleItemModelMasterResult.js.map +1 -0
- package/{account/result/GetBnlinkResult.ts → inventory/result/CreateSimpleItemModelMasterResult.ts} +9 -9
- package/inventory/result/DeleteSimpleInventoryModelMasterResult.d.ts +14 -0
- package/inventory/result/DeleteSimpleInventoryModelMasterResult.js +48 -0
- package/inventory/result/DeleteSimpleInventoryModelMasterResult.js.map +1 -0
- package/inventory/result/DeleteSimpleInventoryModelMasterResult.ts +48 -0
- package/inventory/result/DeleteSimpleItemModelMasterResult.d.ts +14 -0
- package/{watch/result/GetAccountMetricsResult.js → inventory/result/DeleteSimpleItemModelMasterResult.js} +13 -13
- package/inventory/result/DeleteSimpleItemModelMasterResult.js.map +1 -0
- package/{account/result/SetBnlinkResult.ts → inventory/result/DeleteSimpleItemModelMasterResult.ts} +9 -9
- package/inventory/result/DeleteSimpleItemsByUserIdResult.d.ts +9 -0
- package/inventory/result/DeleteSimpleItemsByUserIdResult.js +30 -0
- package/inventory/result/DeleteSimpleItemsByUserIdResult.js.map +1 -0
- package/{version/result/GetBneAgreementUrlResult.ts → inventory/result/DeleteSimpleItemsByUserIdResult.ts} +4 -21
- package/inventory/result/DescribeSimpleInventoryModelMastersResult.d.ts +18 -0
- package/inventory/result/DescribeSimpleInventoryModelMastersResult.js +67 -0
- package/inventory/result/DescribeSimpleInventoryModelMastersResult.js.map +1 -0
- package/inventory/result/DescribeSimpleInventoryModelMastersResult.ts +73 -0
- package/inventory/result/DescribeSimpleInventoryModelsResult.d.ts +14 -0
- package/inventory/result/DescribeSimpleInventoryModelsResult.js +53 -0
- package/inventory/result/DescribeSimpleInventoryModelsResult.js.map +1 -0
- package/{version/result/DescribeBneAgreementTextUrlsResult.ts → inventory/result/DescribeSimpleInventoryModelsResult.ts} +10 -10
- package/inventory/result/DescribeSimpleItemModelMastersResult.d.ts +18 -0
- package/inventory/result/DescribeSimpleItemModelMastersResult.js +67 -0
- package/inventory/result/DescribeSimpleItemModelMastersResult.js.map +1 -0
- package/inventory/result/DescribeSimpleItemModelMastersResult.ts +73 -0
- package/inventory/result/DescribeSimpleItemModelsResult.d.ts +14 -0
- package/inventory/result/DescribeSimpleItemModelsResult.js +53 -0
- package/inventory/result/DescribeSimpleItemModelsResult.js.map +1 -0
- package/{version/result/DescribeBneAgreementTextUrlsByUserIdResult.ts → inventory/result/DescribeSimpleItemModelsResult.ts} +10 -10
- package/inventory/result/DescribeSimpleItemsByUserIdResult.d.ts +18 -0
- package/inventory/result/DescribeSimpleItemsByUserIdResult.js +67 -0
- package/inventory/result/DescribeSimpleItemsByUserIdResult.js.map +1 -0
- package/{serialKey/result/DescribeSerialCodesResult.ts → inventory/result/DescribeSimpleItemsByUserIdResult.ts} +11 -11
- package/{serialKey/result/DescribeSerialCodesResult.d.ts → inventory/result/DescribeSimpleItemsResult.d.ts} +6 -5
- package/{serialKey/result/DescribeSerialCodesResult.js → inventory/result/DescribeSimpleItemsResult.js} +18 -16
- package/inventory/result/DescribeSimpleItemsResult.js.map +1 -0
- package/{account/result/DescribeBnlinksResult.ts → inventory/result/DescribeSimpleItemsResult.ts} +10 -10
- package/inventory/result/GetSimpleInventoryModelMasterResult.d.ts +14 -0
- package/{watch/result/GetExperienceMetricsResult.js → inventory/result/GetSimpleInventoryModelMasterResult.js} +13 -13
- package/inventory/result/GetSimpleInventoryModelMasterResult.js.map +1 -0
- package/inventory/result/GetSimpleInventoryModelMasterResult.ts +48 -0
- package/inventory/result/GetSimpleInventoryModelResult.d.ts +14 -0
- package/{watch/result/GetExchangeMetricsResult.js → inventory/result/GetSimpleInventoryModelResult.js} +13 -13
- package/inventory/result/GetSimpleInventoryModelResult.js.map +1 -0
- package/{watch/result/GetShowcaseMetricsResult.ts → inventory/result/GetSimpleInventoryModelResult.ts} +9 -9
- package/inventory/result/GetSimpleItemByUserIdResult.d.ts +18 -0
- package/inventory/result/GetSimpleItemByUserIdResult.js +62 -0
- package/inventory/result/GetSimpleItemByUserIdResult.js.map +1 -0
- package/inventory/result/GetSimpleItemByUserIdResult.ts +65 -0
- package/inventory/result/GetSimpleItemModelMasterResult.d.ts +14 -0
- package/{watch/result/GetInventoryMetricsResult.js → inventory/result/GetSimpleItemModelMasterResult.js} +13 -13
- package/inventory/result/GetSimpleItemModelMasterResult.js.map +1 -0
- package/{lottery/result/GetRawBoxByUserIdResult.ts → inventory/result/GetSimpleItemModelMasterResult.ts} +9 -9
- package/inventory/result/GetSimpleItemModelResult.d.ts +14 -0
- package/{watch/result/GetShowcaseMetricsResult.js → inventory/result/GetSimpleItemModelResult.js} +13 -13
- package/inventory/result/GetSimpleItemModelResult.js.map +1 -0
- package/{account/result/DeleteBnlinkResult.ts → inventory/result/GetSimpleItemModelResult.ts} +9 -9
- package/inventory/result/GetSimpleItemResult.d.ts +18 -0
- package/inventory/result/GetSimpleItemResult.js +62 -0
- package/inventory/result/GetSimpleItemResult.js.map +1 -0
- package/inventory/result/GetSimpleItemResult.ts +65 -0
- package/inventory/result/GetSimpleItemWithSignatureByUserIdResult.d.ts +26 -0
- package/inventory/result/GetSimpleItemWithSignatureByUserIdResult.js +90 -0
- package/inventory/result/GetSimpleItemWithSignatureByUserIdResult.js.map +1 -0
- package/inventory/result/GetSimpleItemWithSignatureByUserIdResult.ts +99 -0
- package/inventory/result/GetSimpleItemWithSignatureResult.d.ts +26 -0
- package/inventory/result/GetSimpleItemWithSignatureResult.js +90 -0
- package/inventory/result/GetSimpleItemWithSignatureResult.js.map +1 -0
- package/inventory/result/GetSimpleItemWithSignatureResult.ts +99 -0
- package/inventory/result/UpdateSimpleInventoryModelMasterResult.d.ts +14 -0
- package/inventory/result/UpdateSimpleInventoryModelMasterResult.js +48 -0
- package/inventory/result/UpdateSimpleInventoryModelMasterResult.js.map +1 -0
- package/inventory/result/UpdateSimpleInventoryModelMasterResult.ts +48 -0
- package/inventory/result/UpdateSimpleItemModelMasterResult.d.ts +14 -0
- package/{watch/result/GetRankingMetricsResult.js → inventory/result/UpdateSimpleItemModelMasterResult.js} +13 -13
- package/inventory/result/UpdateSimpleItemModelMasterResult.js.map +1 -0
- package/inventory/result/UpdateSimpleItemModelMasterResult.ts +48 -0
- package/inventory/result/index.d.ts +27 -1
- package/inventory/result/index.js +54 -2
- package/inventory/result/index.js.map +1 -1
- package/inventory/result/index.ts +52 -0
- package/package.json +1 -1
- package/jest.config.cjs +0 -9
- package/lottery/request/GetRawBoxByUserIdRequest.js +0 -97
- package/lottery/request/GetRawBoxByUserIdRequest.js.map +0 -1
- package/lottery/result/GetRawBoxByUserIdResult.d.ts +0 -14
- package/lottery/result/GetRawBoxByUserIdResult.js.map +0 -1
- package/serialKey/request/DescribeSerialCodesRequest.js +0 -125
- package/serialKey/request/DescribeSerialCodesRequest.js.map +0 -1
- package/serialKey/result/DescribeSerialCodesResult.js.map +0 -1
- package/tsconfig.json +0 -37
- package/tslint.json +0 -31
- package/version/request/GetBneAgreementRequest.ts +0 -113
- package/version/request/GetBneAgreementUrlRequest.ts +0 -164
- package/version/result/GetBneAgreementUrlByUserIdResult.ts +0 -48
- package/watch/request/GetAccountMetricsRequest.js +0 -54
- package/watch/request/GetAccountMetricsRequest.js.map +0 -1
- package/watch/request/GetExchangeMetricsRequest.js +0 -54
- package/watch/request/GetExchangeMetricsRequest.js.map +0 -1
- package/watch/request/GetInboxMetricsRequest.js +0 -54
- package/watch/request/GetInboxMetricsRequest.js.map +0 -1
- package/watch/request/GetInventoryMetricsRequest.d.ts +0 -17
- package/watch/request/GetInventoryMetricsRequest.js +0 -54
- package/watch/request/GetInventoryMetricsRequest.js.map +0 -1
- package/watch/request/GetInventoryMetricsRequest.ts +0 -62
- package/watch/request/GetLimitMetricsRequest.d.ts +0 -17
- package/watch/request/GetLimitMetricsRequest.js +0 -54
- package/watch/request/GetLimitMetricsRequest.js.map +0 -1
- package/watch/request/GetLimitMetricsRequest.ts +0 -62
- package/watch/request/GetMatchmakingMetricsRequest.d.ts +0 -17
- package/watch/request/GetMatchmakingMetricsRequest.js +0 -54
- package/watch/request/GetMatchmakingMetricsRequest.js.map +0 -1
- package/watch/request/GetMatchmakingMetricsRequest.ts +0 -62
- package/watch/request/GetMoneyMetricsRequest.d.ts +0 -17
- package/watch/request/GetMoneyMetricsRequest.js +0 -54
- package/watch/request/GetMoneyMetricsRequest.js.map +0 -1
- package/watch/request/GetMoneyMetricsRequest.ts +0 -62
- package/watch/request/GetQuestMetricsRequest.d.ts +0 -17
- package/watch/request/GetQuestMetricsRequest.js +0 -54
- package/watch/request/GetQuestMetricsRequest.js.map +0 -1
- package/watch/request/GetQuestMetricsRequest.ts +0 -62
- package/watch/request/GetRankingMetricsRequest.d.ts +0 -17
- package/watch/request/GetRankingMetricsRequest.js +0 -54
- package/watch/request/GetRankingMetricsRequest.js.map +0 -1
- package/watch/request/GetRankingMetricsRequest.ts +0 -62
- package/watch/request/GetShowcaseMetricsRequest.d.ts +0 -17
- package/watch/request/GetShowcaseMetricsRequest.js +0 -54
- package/watch/request/GetShowcaseMetricsRequest.js.map +0 -1
- package/watch/request/GetShowcaseMetricsRequest.ts +0 -62
- package/watch/result/GetAccountMetricsResult.d.ts +0 -14
- package/watch/result/GetAccountMetricsResult.js.map +0 -1
- package/watch/result/GetAccountMetricsResult.ts +0 -48
- package/watch/result/GetExchangeMetricsResult.d.ts +0 -14
- package/watch/result/GetExchangeMetricsResult.js.map +0 -1
- package/watch/result/GetExchangeMetricsResult.ts +0 -48
- package/watch/result/GetExperienceMetricsResult.d.ts +0 -14
- package/watch/result/GetExperienceMetricsResult.js.map +0 -1
- package/watch/result/GetExperienceMetricsResult.ts +0 -48
- package/watch/result/GetInboxMetricsResult.d.ts +0 -14
- package/watch/result/GetInboxMetricsResult.js +0 -48
- package/watch/result/GetInboxMetricsResult.js.map +0 -1
- package/watch/result/GetInboxMetricsResult.ts +0 -48
- package/watch/result/GetInventoryMetricsResult.d.ts +0 -14
- package/watch/result/GetInventoryMetricsResult.js.map +0 -1
- package/watch/result/GetInventoryMetricsResult.ts +0 -48
- package/watch/result/GetLimitMetricsResult.d.ts +0 -14
- package/watch/result/GetLimitMetricsResult.js +0 -48
- package/watch/result/GetLimitMetricsResult.js.map +0 -1
- package/watch/result/GetLimitMetricsResult.ts +0 -48
- package/watch/result/GetMatchmakingMetricsResult.d.ts +0 -14
- package/watch/result/GetMatchmakingMetricsResult.js +0 -48
- package/watch/result/GetMatchmakingMetricsResult.js.map +0 -1
- package/watch/result/GetMatchmakingMetricsResult.ts +0 -48
- package/watch/result/GetMoneyMetricsResult.d.ts +0 -14
- package/watch/result/GetMoneyMetricsResult.js +0 -48
- package/watch/result/GetMoneyMetricsResult.js.map +0 -1
- package/watch/result/GetMoneyMetricsResult.ts +0 -48
- package/watch/result/GetQuestMetricsResult.d.ts +0 -14
- package/watch/result/GetQuestMetricsResult.js +0 -48
- package/watch/result/GetQuestMetricsResult.js.map +0 -1
- package/watch/result/GetQuestMetricsResult.ts +0 -48
- package/watch/result/GetRankingMetricsResult.d.ts +0 -14
- package/watch/result/GetRankingMetricsResult.js.map +0 -1
- package/watch/result/GetRankingMetricsResult.ts +0 -48
- package/watch/result/GetShowcaseMetricsResult.d.ts +0 -14
- package/watch/result/GetShowcaseMetricsResult.js.map +0 -1
package/inventory/rest.ts
CHANGED
|
@@ -623,16 +623,603 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
+
public describeSimpleInventoryModelMasters(request: Request.DescribeSimpleInventoryModelMastersRequest): Promise<Result.DescribeSimpleInventoryModelMastersResult> {
|
|
627
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory')
|
|
628
|
+
.replace('{service}', 'inventory')
|
|
629
|
+
.replace('{region}', this.session.region)
|
|
630
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
631
|
+
|
|
632
|
+
const headers = this.createAuthorizedHeaders();
|
|
633
|
+
if (request.getRequestId()) {
|
|
634
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
635
|
+
}
|
|
636
|
+
const params: {[key: string]: any} = {
|
|
637
|
+
'contextStack': request.getContextStack() ?? null,
|
|
638
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
639
|
+
'limit': String(request.getLimit() ?? null),
|
|
640
|
+
};
|
|
641
|
+
return axios.get(
|
|
642
|
+
url,
|
|
643
|
+
{
|
|
644
|
+
params,
|
|
645
|
+
headers,
|
|
646
|
+
},
|
|
647
|
+
).then((response: any) => {
|
|
648
|
+
return Result.DescribeSimpleInventoryModelMastersResult.fromDict(response.data);
|
|
649
|
+
}).catch((error: any) => {
|
|
650
|
+
throw JSON.parse(error.response.data.message);
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
public createSimpleInventoryModelMaster(request: Request.CreateSimpleInventoryModelMasterRequest): Promise<Result.CreateSimpleInventoryModelMasterResult> {
|
|
655
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory')
|
|
656
|
+
.replace('{service}', 'inventory')
|
|
657
|
+
.replace('{region}', this.session.region)
|
|
658
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
659
|
+
|
|
660
|
+
const headers = this.createAuthorizedHeaders();
|
|
661
|
+
if (request.getRequestId()) {
|
|
662
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
663
|
+
}
|
|
664
|
+
const body: {[key: string]: any} = {
|
|
665
|
+
'contextStack': request.getContextStack() ?? null,
|
|
666
|
+
'name': request.getName() ?? null,
|
|
667
|
+
'description': request.getDescription() ?? null,
|
|
668
|
+
'metadata': request.getMetadata() ?? null,
|
|
669
|
+
};
|
|
670
|
+
return axios.post(
|
|
671
|
+
url,
|
|
672
|
+
body,
|
|
673
|
+
{
|
|
674
|
+
headers,
|
|
675
|
+
},
|
|
676
|
+
).then((response: any) => {
|
|
677
|
+
return Result.CreateSimpleInventoryModelMasterResult.fromDict(response.data);
|
|
678
|
+
}).catch((error: any) => {
|
|
679
|
+
if (error.response) {
|
|
680
|
+
throw JSON.parse(error.response.data.message);
|
|
681
|
+
} else {
|
|
682
|
+
throw [];
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
public getSimpleInventoryModelMaster(request: Request.GetSimpleInventoryModelMasterRequest): Promise<Result.GetSimpleInventoryModelMasterResult> {
|
|
688
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}')
|
|
689
|
+
.replace('{service}', 'inventory')
|
|
690
|
+
.replace('{region}', this.session.region)
|
|
691
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
692
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
693
|
+
|
|
694
|
+
const headers = this.createAuthorizedHeaders();
|
|
695
|
+
if (request.getRequestId()) {
|
|
696
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
697
|
+
}
|
|
698
|
+
const params: {[key: string]: any} = {
|
|
699
|
+
'contextStack': request.getContextStack() ?? null,
|
|
700
|
+
};
|
|
701
|
+
return axios.get(
|
|
702
|
+
url,
|
|
703
|
+
{
|
|
704
|
+
params,
|
|
705
|
+
headers,
|
|
706
|
+
},
|
|
707
|
+
).then((response: any) => {
|
|
708
|
+
return Result.GetSimpleInventoryModelMasterResult.fromDict(response.data);
|
|
709
|
+
}).catch((error: any) => {
|
|
710
|
+
throw JSON.parse(error.response.data.message);
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
public updateSimpleInventoryModelMaster(request: Request.UpdateSimpleInventoryModelMasterRequest): Promise<Result.UpdateSimpleInventoryModelMasterResult> {
|
|
715
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}')
|
|
716
|
+
.replace('{service}', 'inventory')
|
|
717
|
+
.replace('{region}', this.session.region)
|
|
718
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
719
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
720
|
+
|
|
721
|
+
const headers = this.createAuthorizedHeaders();
|
|
722
|
+
if (request.getRequestId()) {
|
|
723
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
724
|
+
}
|
|
725
|
+
const body: {[key: string]: any} = {
|
|
726
|
+
'contextStack': request.getContextStack() ?? null,
|
|
727
|
+
'description': request.getDescription() ?? null,
|
|
728
|
+
'metadata': request.getMetadata() ?? null,
|
|
729
|
+
};
|
|
730
|
+
return axios.put(
|
|
731
|
+
url,
|
|
732
|
+
body,
|
|
733
|
+
{
|
|
734
|
+
headers,
|
|
735
|
+
},
|
|
736
|
+
).then((response: any) => {
|
|
737
|
+
return Result.UpdateSimpleInventoryModelMasterResult.fromDict(response.data);
|
|
738
|
+
}).catch((error: any) => {
|
|
739
|
+
if (error.response) {
|
|
740
|
+
throw JSON.parse(error.response.data.message);
|
|
741
|
+
} else {
|
|
742
|
+
throw [];
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
public deleteSimpleInventoryModelMaster(request: Request.DeleteSimpleInventoryModelMasterRequest): Promise<Result.DeleteSimpleInventoryModelMasterResult> {
|
|
748
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}')
|
|
749
|
+
.replace('{service}', 'inventory')
|
|
750
|
+
.replace('{region}', this.session.region)
|
|
751
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
752
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
753
|
+
|
|
754
|
+
const headers = this.createAuthorizedHeaders();
|
|
755
|
+
if (request.getRequestId()) {
|
|
756
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
757
|
+
}
|
|
758
|
+
const params: {[key: string]: any} = {
|
|
759
|
+
'contextStack': request.getContextStack() ?? null,
|
|
760
|
+
};
|
|
761
|
+
return axios.delete(
|
|
762
|
+
url,
|
|
763
|
+
{
|
|
764
|
+
params,
|
|
765
|
+
headers,
|
|
766
|
+
},
|
|
767
|
+
).then((response: any) => {
|
|
768
|
+
return Result.DeleteSimpleInventoryModelMasterResult.fromDict(response.data);
|
|
769
|
+
}).catch((error: any) => {
|
|
770
|
+
throw JSON.parse(error.response.data.message);
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
public describeSimpleInventoryModels(request: Request.DescribeSimpleInventoryModelsRequest): Promise<Result.DescribeSimpleInventoryModelsResult> {
|
|
775
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/simple/inventory')
|
|
776
|
+
.replace('{service}', 'inventory')
|
|
777
|
+
.replace('{region}', this.session.region)
|
|
778
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
779
|
+
|
|
780
|
+
const headers = this.createAuthorizedHeaders();
|
|
781
|
+
if (request.getRequestId()) {
|
|
782
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
783
|
+
}
|
|
784
|
+
const params: {[key: string]: any} = {
|
|
785
|
+
'contextStack': request.getContextStack() ?? null,
|
|
786
|
+
};
|
|
787
|
+
return axios.get(
|
|
788
|
+
url,
|
|
789
|
+
{
|
|
790
|
+
params,
|
|
791
|
+
headers,
|
|
792
|
+
},
|
|
793
|
+
).then((response: any) => {
|
|
794
|
+
return Result.DescribeSimpleInventoryModelsResult.fromDict(response.data);
|
|
795
|
+
}).catch((error: any) => {
|
|
796
|
+
throw JSON.parse(error.response.data.message);
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
public getSimpleInventoryModel(request: Request.GetSimpleInventoryModelRequest): Promise<Result.GetSimpleInventoryModelResult> {
|
|
801
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/simple/inventory/{inventoryName}')
|
|
802
|
+
.replace('{service}', 'inventory')
|
|
803
|
+
.replace('{region}', this.session.region)
|
|
804
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
805
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
806
|
+
|
|
807
|
+
const headers = this.createAuthorizedHeaders();
|
|
808
|
+
if (request.getRequestId()) {
|
|
809
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
810
|
+
}
|
|
811
|
+
const params: {[key: string]: any} = {
|
|
812
|
+
'contextStack': request.getContextStack() ?? null,
|
|
813
|
+
};
|
|
814
|
+
return axios.get(
|
|
815
|
+
url,
|
|
816
|
+
{
|
|
817
|
+
params,
|
|
818
|
+
headers,
|
|
819
|
+
},
|
|
820
|
+
).then((response: any) => {
|
|
821
|
+
return Result.GetSimpleInventoryModelResult.fromDict(response.data);
|
|
822
|
+
}).catch((error: any) => {
|
|
823
|
+
throw JSON.parse(error.response.data.message);
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
public describeSimpleItemModelMasters(request: Request.DescribeSimpleItemModelMastersRequest): Promise<Result.DescribeSimpleItemModelMastersResult> {
|
|
828
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}/item')
|
|
829
|
+
.replace('{service}', 'inventory')
|
|
830
|
+
.replace('{region}', this.session.region)
|
|
831
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
832
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
833
|
+
|
|
834
|
+
const headers = this.createAuthorizedHeaders();
|
|
835
|
+
if (request.getRequestId()) {
|
|
836
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
837
|
+
}
|
|
838
|
+
const params: {[key: string]: any} = {
|
|
839
|
+
'contextStack': request.getContextStack() ?? null,
|
|
840
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
841
|
+
'limit': String(request.getLimit() ?? null),
|
|
842
|
+
};
|
|
843
|
+
return axios.get(
|
|
844
|
+
url,
|
|
845
|
+
{
|
|
846
|
+
params,
|
|
847
|
+
headers,
|
|
848
|
+
},
|
|
849
|
+
).then((response: any) => {
|
|
850
|
+
return Result.DescribeSimpleItemModelMastersResult.fromDict(response.data);
|
|
851
|
+
}).catch((error: any) => {
|
|
852
|
+
throw JSON.parse(error.response.data.message);
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
public createSimpleItemModelMaster(request: Request.CreateSimpleItemModelMasterRequest): Promise<Result.CreateSimpleItemModelMasterResult> {
|
|
857
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}/item')
|
|
858
|
+
.replace('{service}', 'inventory')
|
|
859
|
+
.replace('{region}', this.session.region)
|
|
860
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
861
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
862
|
+
|
|
863
|
+
const headers = this.createAuthorizedHeaders();
|
|
864
|
+
if (request.getRequestId()) {
|
|
865
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
866
|
+
}
|
|
867
|
+
const body: {[key: string]: any} = {
|
|
868
|
+
'contextStack': request.getContextStack() ?? null,
|
|
869
|
+
'name': request.getName() ?? null,
|
|
870
|
+
'description': request.getDescription() ?? null,
|
|
871
|
+
'metadata': request.getMetadata() ?? null,
|
|
872
|
+
};
|
|
873
|
+
return axios.post(
|
|
874
|
+
url,
|
|
875
|
+
body,
|
|
876
|
+
{
|
|
877
|
+
headers,
|
|
878
|
+
},
|
|
879
|
+
).then((response: any) => {
|
|
880
|
+
return Result.CreateSimpleItemModelMasterResult.fromDict(response.data);
|
|
881
|
+
}).catch((error: any) => {
|
|
882
|
+
if (error.response) {
|
|
883
|
+
throw JSON.parse(error.response.data.message);
|
|
884
|
+
} else {
|
|
885
|
+
throw [];
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
public getSimpleItemModelMaster(request: Request.GetSimpleItemModelMasterRequest): Promise<Result.GetSimpleItemModelMasterResult> {
|
|
891
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}/item/{itemName}')
|
|
892
|
+
.replace('{service}', 'inventory')
|
|
893
|
+
.replace('{region}', this.session.region)
|
|
894
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
895
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
896
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
897
|
+
|
|
898
|
+
const headers = this.createAuthorizedHeaders();
|
|
899
|
+
if (request.getRequestId()) {
|
|
900
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
901
|
+
}
|
|
902
|
+
const params: {[key: string]: any} = {
|
|
903
|
+
'contextStack': request.getContextStack() ?? null,
|
|
904
|
+
};
|
|
905
|
+
return axios.get(
|
|
906
|
+
url,
|
|
907
|
+
{
|
|
908
|
+
params,
|
|
909
|
+
headers,
|
|
910
|
+
},
|
|
911
|
+
).then((response: any) => {
|
|
912
|
+
return Result.GetSimpleItemModelMasterResult.fromDict(response.data);
|
|
913
|
+
}).catch((error: any) => {
|
|
914
|
+
throw JSON.parse(error.response.data.message);
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
public updateSimpleItemModelMaster(request: Request.UpdateSimpleItemModelMasterRequest): Promise<Result.UpdateSimpleItemModelMasterResult> {
|
|
919
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}/item/{itemName}')
|
|
920
|
+
.replace('{service}', 'inventory')
|
|
921
|
+
.replace('{region}', this.session.region)
|
|
922
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
923
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
924
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
925
|
+
|
|
926
|
+
const headers = this.createAuthorizedHeaders();
|
|
927
|
+
if (request.getRequestId()) {
|
|
928
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
929
|
+
}
|
|
930
|
+
const body: {[key: string]: any} = {
|
|
931
|
+
'contextStack': request.getContextStack() ?? null,
|
|
932
|
+
'description': request.getDescription() ?? null,
|
|
933
|
+
'metadata': request.getMetadata() ?? null,
|
|
934
|
+
};
|
|
935
|
+
return axios.put(
|
|
936
|
+
url,
|
|
937
|
+
body,
|
|
938
|
+
{
|
|
939
|
+
headers,
|
|
940
|
+
},
|
|
941
|
+
).then((response: any) => {
|
|
942
|
+
return Result.UpdateSimpleItemModelMasterResult.fromDict(response.data);
|
|
943
|
+
}).catch((error: any) => {
|
|
944
|
+
if (error.response) {
|
|
945
|
+
throw JSON.parse(error.response.data.message);
|
|
946
|
+
} else {
|
|
947
|
+
throw [];
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
public deleteSimpleItemModelMaster(request: Request.DeleteSimpleItemModelMasterRequest): Promise<Result.DeleteSimpleItemModelMasterResult> {
|
|
953
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/simple/inventory/{inventoryName}/item/{itemName}')
|
|
954
|
+
.replace('{service}', 'inventory')
|
|
955
|
+
.replace('{region}', this.session.region)
|
|
956
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
957
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
958
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
959
|
+
|
|
960
|
+
const headers = this.createAuthorizedHeaders();
|
|
961
|
+
if (request.getRequestId()) {
|
|
962
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
963
|
+
}
|
|
964
|
+
const params: {[key: string]: any} = {
|
|
965
|
+
'contextStack': request.getContextStack() ?? null,
|
|
966
|
+
};
|
|
967
|
+
return axios.delete(
|
|
968
|
+
url,
|
|
969
|
+
{
|
|
970
|
+
params,
|
|
971
|
+
headers,
|
|
972
|
+
},
|
|
973
|
+
).then((response: any) => {
|
|
974
|
+
return Result.DeleteSimpleItemModelMasterResult.fromDict(response.data);
|
|
975
|
+
}).catch((error: any) => {
|
|
976
|
+
throw JSON.parse(error.response.data.message);
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
public describeSimpleItemModels(request: Request.DescribeSimpleItemModelsRequest): Promise<Result.DescribeSimpleItemModelsResult> {
|
|
981
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/simple/inventory/{inventoryName}/item')
|
|
982
|
+
.replace('{service}', 'inventory')
|
|
983
|
+
.replace('{region}', this.session.region)
|
|
984
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
985
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
986
|
+
|
|
987
|
+
const headers = this.createAuthorizedHeaders();
|
|
988
|
+
if (request.getRequestId()) {
|
|
989
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
990
|
+
}
|
|
991
|
+
const params: {[key: string]: any} = {
|
|
992
|
+
'contextStack': request.getContextStack() ?? null,
|
|
993
|
+
};
|
|
994
|
+
return axios.get(
|
|
995
|
+
url,
|
|
996
|
+
{
|
|
997
|
+
params,
|
|
998
|
+
headers,
|
|
999
|
+
},
|
|
1000
|
+
).then((response: any) => {
|
|
1001
|
+
return Result.DescribeSimpleItemModelsResult.fromDict(response.data);
|
|
1002
|
+
}).catch((error: any) => {
|
|
1003
|
+
throw JSON.parse(error.response.data.message);
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
public getSimpleItemModel(request: Request.GetSimpleItemModelRequest): Promise<Result.GetSimpleItemModelResult> {
|
|
1008
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/simple/inventory/{inventoryName}/item/{itemName}')
|
|
1009
|
+
.replace('{service}', 'inventory')
|
|
1010
|
+
.replace('{region}', this.session.region)
|
|
1011
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1012
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1013
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1014
|
+
|
|
1015
|
+
const headers = this.createAuthorizedHeaders();
|
|
1016
|
+
if (request.getRequestId()) {
|
|
1017
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1018
|
+
}
|
|
1019
|
+
const params: {[key: string]: any} = {
|
|
1020
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1021
|
+
};
|
|
1022
|
+
return axios.get(
|
|
1023
|
+
url,
|
|
1024
|
+
{
|
|
1025
|
+
params,
|
|
1026
|
+
headers,
|
|
1027
|
+
},
|
|
1028
|
+
).then((response: any) => {
|
|
1029
|
+
return Result.GetSimpleItemModelResult.fromDict(response.data);
|
|
1030
|
+
}).catch((error: any) => {
|
|
1031
|
+
throw JSON.parse(error.response.data.message);
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
|
|
626
1035
|
public exportMaster(request: Request.ExportMasterRequest): Promise<Result.ExportMasterResult> {
|
|
627
1036
|
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/export')
|
|
628
1037
|
.replace('{service}', 'inventory')
|
|
629
1038
|
.replace('{region}', this.session.region)
|
|
630
|
-
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
1039
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
1040
|
+
|
|
1041
|
+
const headers = this.createAuthorizedHeaders();
|
|
1042
|
+
if (request.getRequestId()) {
|
|
1043
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1044
|
+
}
|
|
1045
|
+
const params: {[key: string]: any} = {
|
|
1046
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1047
|
+
};
|
|
1048
|
+
return axios.get(
|
|
1049
|
+
url,
|
|
1050
|
+
{
|
|
1051
|
+
params,
|
|
1052
|
+
headers,
|
|
1053
|
+
},
|
|
1054
|
+
).then((response: any) => {
|
|
1055
|
+
return Result.ExportMasterResult.fromDict(response.data);
|
|
1056
|
+
}).catch((error: any) => {
|
|
1057
|
+
throw JSON.parse(error.response.data.message);
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
public getCurrentItemModelMaster(request: Request.GetCurrentItemModelMasterRequest): Promise<Result.GetCurrentItemModelMasterResult> {
|
|
1062
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master')
|
|
1063
|
+
.replace('{service}', 'inventory')
|
|
1064
|
+
.replace('{region}', this.session.region)
|
|
1065
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
1066
|
+
|
|
1067
|
+
const headers = this.createAuthorizedHeaders();
|
|
1068
|
+
if (request.getRequestId()) {
|
|
1069
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1070
|
+
}
|
|
1071
|
+
const params: {[key: string]: any} = {
|
|
1072
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1073
|
+
};
|
|
1074
|
+
return axios.get(
|
|
1075
|
+
url,
|
|
1076
|
+
{
|
|
1077
|
+
params,
|
|
1078
|
+
headers,
|
|
1079
|
+
},
|
|
1080
|
+
).then((response: any) => {
|
|
1081
|
+
return Result.GetCurrentItemModelMasterResult.fromDict(response.data);
|
|
1082
|
+
}).catch((error: any) => {
|
|
1083
|
+
throw JSON.parse(error.response.data.message);
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
public updateCurrentItemModelMaster(request: Request.UpdateCurrentItemModelMasterRequest): Promise<Result.UpdateCurrentItemModelMasterResult> {
|
|
1088
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master')
|
|
1089
|
+
.replace('{service}', 'inventory')
|
|
1090
|
+
.replace('{region}', this.session.region)
|
|
1091
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
1092
|
+
|
|
1093
|
+
const headers = this.createAuthorizedHeaders();
|
|
1094
|
+
if (request.getRequestId()) {
|
|
1095
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1096
|
+
}
|
|
1097
|
+
const body: {[key: string]: any} = {
|
|
1098
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1099
|
+
'settings': request.getSettings() ?? null,
|
|
1100
|
+
};
|
|
1101
|
+
return axios.put(
|
|
1102
|
+
url,
|
|
1103
|
+
body,
|
|
1104
|
+
{
|
|
1105
|
+
headers,
|
|
1106
|
+
},
|
|
1107
|
+
).then((response: any) => {
|
|
1108
|
+
return Result.UpdateCurrentItemModelMasterResult.fromDict(response.data);
|
|
1109
|
+
}).catch((error: any) => {
|
|
1110
|
+
if (error.response) {
|
|
1111
|
+
throw JSON.parse(error.response.data.message);
|
|
1112
|
+
} else {
|
|
1113
|
+
throw [];
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
public updateCurrentItemModelMasterFromGitHub(request: Request.UpdateCurrentItemModelMasterFromGitHubRequest): Promise<Result.UpdateCurrentItemModelMasterFromGitHubResult> {
|
|
1119
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/master/from_git_hub')
|
|
1120
|
+
.replace('{service}', 'inventory')
|
|
1121
|
+
.replace('{region}', this.session.region)
|
|
1122
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
1123
|
+
|
|
1124
|
+
const headers = this.createAuthorizedHeaders();
|
|
1125
|
+
if (request.getRequestId()) {
|
|
1126
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1127
|
+
}
|
|
1128
|
+
const body: {[key: string]: any} = {
|
|
1129
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1130
|
+
'checkoutSetting': request.getCheckoutSetting()?.toDict() ?? null,
|
|
1131
|
+
};
|
|
1132
|
+
return axios.put(
|
|
1133
|
+
url,
|
|
1134
|
+
body,
|
|
1135
|
+
{
|
|
1136
|
+
headers,
|
|
1137
|
+
},
|
|
1138
|
+
).then((response: any) => {
|
|
1139
|
+
return Result.UpdateCurrentItemModelMasterFromGitHubResult.fromDict(response.data);
|
|
1140
|
+
}).catch((error: any) => {
|
|
1141
|
+
if (error.response) {
|
|
1142
|
+
throw JSON.parse(error.response.data.message);
|
|
1143
|
+
} else {
|
|
1144
|
+
throw [];
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
public describeInventories(request: Request.DescribeInventoriesRequest): Promise<Result.DescribeInventoriesResult> {
|
|
1150
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory')
|
|
1151
|
+
.replace('{service}', 'inventory')
|
|
1152
|
+
.replace('{region}', this.session.region)
|
|
1153
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'));
|
|
1154
|
+
|
|
1155
|
+
const headers = this.createAuthorizedHeaders();
|
|
1156
|
+
if (request.getRequestId()) {
|
|
1157
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1158
|
+
}
|
|
1159
|
+
if (request.getAccessToken()) {
|
|
1160
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1161
|
+
}
|
|
1162
|
+
const params: {[key: string]: any} = {
|
|
1163
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1164
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
1165
|
+
'limit': String(request.getLimit() ?? null),
|
|
1166
|
+
};
|
|
1167
|
+
return axios.get(
|
|
1168
|
+
url,
|
|
1169
|
+
{
|
|
1170
|
+
params,
|
|
1171
|
+
headers,
|
|
1172
|
+
},
|
|
1173
|
+
).then((response: any) => {
|
|
1174
|
+
return Result.DescribeInventoriesResult.fromDict(response.data);
|
|
1175
|
+
}).catch((error: any) => {
|
|
1176
|
+
throw JSON.parse(error.response.data.message);
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
public describeInventoriesByUserId(request: Request.DescribeInventoriesByUserIdRequest): Promise<Result.DescribeInventoriesByUserIdResult> {
|
|
1181
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory')
|
|
1182
|
+
.replace('{service}', 'inventory')
|
|
1183
|
+
.replace('{region}', this.session.region)
|
|
1184
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1185
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1186
|
+
|
|
1187
|
+
const headers = this.createAuthorizedHeaders();
|
|
1188
|
+
if (request.getRequestId()) {
|
|
1189
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1190
|
+
}
|
|
1191
|
+
const params: {[key: string]: any} = {
|
|
1192
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1193
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
1194
|
+
'limit': String(request.getLimit() ?? null),
|
|
1195
|
+
};
|
|
1196
|
+
return axios.get(
|
|
1197
|
+
url,
|
|
1198
|
+
{
|
|
1199
|
+
params,
|
|
1200
|
+
headers,
|
|
1201
|
+
},
|
|
1202
|
+
).then((response: any) => {
|
|
1203
|
+
return Result.DescribeInventoriesByUserIdResult.fromDict(response.data);
|
|
1204
|
+
}).catch((error: any) => {
|
|
1205
|
+
throw JSON.parse(error.response.data.message);
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
public getInventory(request: Request.GetInventoryRequest): Promise<Result.GetInventoryResult> {
|
|
1210
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}')
|
|
1211
|
+
.replace('{service}', 'inventory')
|
|
1212
|
+
.replace('{region}', this.session.region)
|
|
1213
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1214
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
631
1215
|
|
|
632
1216
|
const headers = this.createAuthorizedHeaders();
|
|
633
1217
|
if (request.getRequestId()) {
|
|
634
1218
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
635
1219
|
}
|
|
1220
|
+
if (request.getAccessToken()) {
|
|
1221
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1222
|
+
}
|
|
636
1223
|
const params: {[key: string]: any} = {
|
|
637
1224
|
'contextStack': request.getContextStack() ?? null,
|
|
638
1225
|
};
|
|
@@ -643,17 +1230,19 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
643
1230
|
headers,
|
|
644
1231
|
},
|
|
645
1232
|
).then((response: any) => {
|
|
646
|
-
return Result.
|
|
1233
|
+
return Result.GetInventoryResult.fromDict(response.data);
|
|
647
1234
|
}).catch((error: any) => {
|
|
648
1235
|
throw JSON.parse(error.response.data.message);
|
|
649
1236
|
});
|
|
650
1237
|
}
|
|
651
1238
|
|
|
652
|
-
public
|
|
653
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/
|
|
1239
|
+
public getInventoryByUserId(request: Request.GetInventoryByUserIdRequest): Promise<Result.GetInventoryByUserIdResult> {
|
|
1240
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}')
|
|
654
1241
|
.replace('{service}', 'inventory')
|
|
655
1242
|
.replace('{region}', this.session.region)
|
|
656
|
-
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1243
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1244
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1245
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
657
1246
|
|
|
658
1247
|
const headers = this.createAuthorizedHeaders();
|
|
659
1248
|
if (request.getRequestId()) {
|
|
@@ -669,34 +1258,39 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
669
1258
|
headers,
|
|
670
1259
|
},
|
|
671
1260
|
).then((response: any) => {
|
|
672
|
-
return Result.
|
|
1261
|
+
return Result.GetInventoryByUserIdResult.fromDict(response.data);
|
|
673
1262
|
}).catch((error: any) => {
|
|
674
1263
|
throw JSON.parse(error.response.data.message);
|
|
675
1264
|
});
|
|
676
1265
|
}
|
|
677
1266
|
|
|
678
|
-
public
|
|
679
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/
|
|
1267
|
+
public addCapacityByUserId(request: Request.AddCapacityByUserIdRequest): Promise<Result.AddCapacityByUserIdResult> {
|
|
1268
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/capacity')
|
|
680
1269
|
.replace('{service}', 'inventory')
|
|
681
1270
|
.replace('{region}', this.session.region)
|
|
682
|
-
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1271
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1272
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1273
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
683
1274
|
|
|
684
1275
|
const headers = this.createAuthorizedHeaders();
|
|
685
1276
|
if (request.getRequestId()) {
|
|
686
1277
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
687
1278
|
}
|
|
1279
|
+
if (request.getDuplicationAvoider()) {
|
|
1280
|
+
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1281
|
+
}
|
|
688
1282
|
const body: {[key: string]: any} = {
|
|
689
1283
|
'contextStack': request.getContextStack() ?? null,
|
|
690
|
-
'
|
|
1284
|
+
'addCapacityValue': request.getAddCapacityValue() ?? null,
|
|
691
1285
|
};
|
|
692
|
-
return axios.
|
|
1286
|
+
return axios.post(
|
|
693
1287
|
url,
|
|
694
1288
|
body,
|
|
695
1289
|
{
|
|
696
1290
|
headers,
|
|
697
1291
|
},
|
|
698
1292
|
).then((response: any) => {
|
|
699
|
-
return Result.
|
|
1293
|
+
return Result.AddCapacityByUserIdResult.fromDict(response.data);
|
|
700
1294
|
}).catch((error: any) => {
|
|
701
1295
|
if (error.response) {
|
|
702
1296
|
throw JSON.parse(error.response.data.message);
|
|
@@ -706,19 +1300,24 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
706
1300
|
});
|
|
707
1301
|
}
|
|
708
1302
|
|
|
709
|
-
public
|
|
710
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/
|
|
1303
|
+
public setCapacityByUserId(request: Request.SetCapacityByUserIdRequest): Promise<Result.SetCapacityByUserIdResult> {
|
|
1304
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/capacity')
|
|
711
1305
|
.replace('{service}', 'inventory')
|
|
712
1306
|
.replace('{region}', this.session.region)
|
|
713
|
-
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1307
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1308
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1309
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
714
1310
|
|
|
715
1311
|
const headers = this.createAuthorizedHeaders();
|
|
716
1312
|
if (request.getRequestId()) {
|
|
717
1313
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
718
1314
|
}
|
|
1315
|
+
if (request.getDuplicationAvoider()) {
|
|
1316
|
+
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1317
|
+
}
|
|
719
1318
|
const body: {[key: string]: any} = {
|
|
720
1319
|
'contextStack': request.getContextStack() ?? null,
|
|
721
|
-
'
|
|
1320
|
+
'newCapacityValue': request.getNewCapacityValue() ?? null,
|
|
722
1321
|
};
|
|
723
1322
|
return axios.put(
|
|
724
1323
|
url,
|
|
@@ -727,7 +1326,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
727
1326
|
headers,
|
|
728
1327
|
},
|
|
729
1328
|
).then((response: any) => {
|
|
730
|
-
return Result.
|
|
1329
|
+
return Result.SetCapacityByUserIdResult.fromDict(response.data);
|
|
731
1330
|
}).catch((error: any) => {
|
|
732
1331
|
if (error.response) {
|
|
733
1332
|
throw JSON.parse(error.response.data.message);
|
|
@@ -737,11 +1336,105 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
737
1336
|
});
|
|
738
1337
|
}
|
|
739
1338
|
|
|
740
|
-
public
|
|
741
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
1339
|
+
public deleteInventoryByUserId(request: Request.DeleteInventoryByUserIdRequest): Promise<Result.DeleteInventoryByUserIdResult> {
|
|
1340
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}')
|
|
742
1341
|
.replace('{service}', 'inventory')
|
|
743
1342
|
.replace('{region}', this.session.region)
|
|
744
|
-
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1343
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1344
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1345
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1346
|
+
|
|
1347
|
+
const headers = this.createAuthorizedHeaders();
|
|
1348
|
+
if (request.getRequestId()) {
|
|
1349
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1350
|
+
}
|
|
1351
|
+
if (request.getDuplicationAvoider()) {
|
|
1352
|
+
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1353
|
+
}
|
|
1354
|
+
const params: {[key: string]: any} = {
|
|
1355
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1356
|
+
};
|
|
1357
|
+
return axios.delete(
|
|
1358
|
+
url,
|
|
1359
|
+
{
|
|
1360
|
+
params,
|
|
1361
|
+
headers,
|
|
1362
|
+
},
|
|
1363
|
+
).then((response: any) => {
|
|
1364
|
+
return Result.DeleteInventoryByUserIdResult.fromDict(response.data);
|
|
1365
|
+
}).catch((error: any) => {
|
|
1366
|
+
throw JSON.parse(error.response.data.message);
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
public addCapacityByStampSheet(request: Request.AddCapacityByStampSheetRequest): Promise<Result.AddCapacityByStampSheetResult> {
|
|
1371
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/inventory/capacity/add')
|
|
1372
|
+
.replace('{service}', 'inventory')
|
|
1373
|
+
.replace('{region}', this.session.region);
|
|
1374
|
+
|
|
1375
|
+
const headers = this.createAuthorizedHeaders();
|
|
1376
|
+
if (request.getRequestId()) {
|
|
1377
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1378
|
+
}
|
|
1379
|
+
const body: {[key: string]: any} = {
|
|
1380
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1381
|
+
'stampSheet': request.getStampSheet() ?? null,
|
|
1382
|
+
'keyId': request.getKeyId() ?? null,
|
|
1383
|
+
};
|
|
1384
|
+
return axios.post(
|
|
1385
|
+
url,
|
|
1386
|
+
body,
|
|
1387
|
+
{
|
|
1388
|
+
headers,
|
|
1389
|
+
},
|
|
1390
|
+
).then((response: any) => {
|
|
1391
|
+
return Result.AddCapacityByStampSheetResult.fromDict(response.data);
|
|
1392
|
+
}).catch((error: any) => {
|
|
1393
|
+
if (error.response) {
|
|
1394
|
+
throw JSON.parse(error.response.data.message);
|
|
1395
|
+
} else {
|
|
1396
|
+
throw [];
|
|
1397
|
+
}
|
|
1398
|
+
});
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
public setCapacityByStampSheet(request: Request.SetCapacityByStampSheetRequest): Promise<Result.SetCapacityByStampSheetResult> {
|
|
1402
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/inventory/capacity/set')
|
|
1403
|
+
.replace('{service}', 'inventory')
|
|
1404
|
+
.replace('{region}', this.session.region);
|
|
1405
|
+
|
|
1406
|
+
const headers = this.createAuthorizedHeaders();
|
|
1407
|
+
if (request.getRequestId()) {
|
|
1408
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1409
|
+
}
|
|
1410
|
+
const body: {[key: string]: any} = {
|
|
1411
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1412
|
+
'stampSheet': request.getStampSheet() ?? null,
|
|
1413
|
+
'keyId': request.getKeyId() ?? null,
|
|
1414
|
+
};
|
|
1415
|
+
return axios.post(
|
|
1416
|
+
url,
|
|
1417
|
+
body,
|
|
1418
|
+
{
|
|
1419
|
+
headers,
|
|
1420
|
+
},
|
|
1421
|
+
).then((response: any) => {
|
|
1422
|
+
return Result.SetCapacityByStampSheetResult.fromDict(response.data);
|
|
1423
|
+
}).catch((error: any) => {
|
|
1424
|
+
if (error.response) {
|
|
1425
|
+
throw JSON.parse(error.response.data.message);
|
|
1426
|
+
} else {
|
|
1427
|
+
throw [];
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
public describeItemSets(request: Request.DescribeItemSetsRequest): Promise<Result.DescribeItemSetsResult> {
|
|
1433
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item')
|
|
1434
|
+
.replace('{service}', 'inventory')
|
|
1435
|
+
.replace('{region}', this.session.region)
|
|
1436
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1437
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
745
1438
|
|
|
746
1439
|
const headers = this.createAuthorizedHeaders();
|
|
747
1440
|
if (request.getRequestId()) {
|
|
@@ -762,27 +1455,123 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
762
1455
|
headers,
|
|
763
1456
|
},
|
|
764
1457
|
).then((response: any) => {
|
|
765
|
-
return Result.
|
|
1458
|
+
return Result.DescribeItemSetsResult.fromDict(response.data);
|
|
1459
|
+
}).catch((error: any) => {
|
|
1460
|
+
throw JSON.parse(error.response.data.message);
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
public describeItemSetsByUserId(request: Request.DescribeItemSetsByUserIdRequest): Promise<Result.DescribeItemSetsByUserIdResult> {
|
|
1465
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item')
|
|
1466
|
+
.replace('{service}', 'inventory')
|
|
1467
|
+
.replace('{region}', this.session.region)
|
|
1468
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1469
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1470
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1471
|
+
|
|
1472
|
+
const headers = this.createAuthorizedHeaders();
|
|
1473
|
+
if (request.getRequestId()) {
|
|
1474
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1475
|
+
}
|
|
1476
|
+
const params: {[key: string]: any} = {
|
|
1477
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1478
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
1479
|
+
'limit': String(request.getLimit() ?? null),
|
|
1480
|
+
};
|
|
1481
|
+
return axios.get(
|
|
1482
|
+
url,
|
|
1483
|
+
{
|
|
1484
|
+
params,
|
|
1485
|
+
headers,
|
|
1486
|
+
},
|
|
1487
|
+
).then((response: any) => {
|
|
1488
|
+
return Result.DescribeItemSetsByUserIdResult.fromDict(response.data);
|
|
1489
|
+
}).catch((error: any) => {
|
|
1490
|
+
throw JSON.parse(error.response.data.message);
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
public getItemSet(request: Request.GetItemSetRequest): Promise<Result.GetItemSetResult> {
|
|
1495
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}')
|
|
1496
|
+
.replace('{service}', 'inventory')
|
|
1497
|
+
.replace('{region}', this.session.region)
|
|
1498
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1499
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1500
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1501
|
+
|
|
1502
|
+
const headers = this.createAuthorizedHeaders();
|
|
1503
|
+
if (request.getRequestId()) {
|
|
1504
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1505
|
+
}
|
|
1506
|
+
if (request.getAccessToken()) {
|
|
1507
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1508
|
+
}
|
|
1509
|
+
const params: {[key: string]: any} = {
|
|
1510
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1511
|
+
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1512
|
+
};
|
|
1513
|
+
return axios.get(
|
|
1514
|
+
url,
|
|
1515
|
+
{
|
|
1516
|
+
params,
|
|
1517
|
+
headers,
|
|
1518
|
+
},
|
|
1519
|
+
).then((response: any) => {
|
|
1520
|
+
return Result.GetItemSetResult.fromDict(response.data);
|
|
1521
|
+
}).catch((error: any) => {
|
|
1522
|
+
throw JSON.parse(error.response.data.message);
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
public getItemSetByUserId(request: Request.GetItemSetByUserIdRequest): Promise<Result.GetItemSetByUserIdResult> {
|
|
1527
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}')
|
|
1528
|
+
.replace('{service}', 'inventory')
|
|
1529
|
+
.replace('{region}', this.session.region)
|
|
1530
|
+
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1531
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1532
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1533
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1534
|
+
|
|
1535
|
+
const headers = this.createAuthorizedHeaders();
|
|
1536
|
+
if (request.getRequestId()) {
|
|
1537
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1538
|
+
}
|
|
1539
|
+
const params: {[key: string]: any} = {
|
|
1540
|
+
'contextStack': request.getContextStack() ?? null,
|
|
1541
|
+
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1542
|
+
};
|
|
1543
|
+
return axios.get(
|
|
1544
|
+
url,
|
|
1545
|
+
{
|
|
1546
|
+
params,
|
|
1547
|
+
headers,
|
|
1548
|
+
},
|
|
1549
|
+
).then((response: any) => {
|
|
1550
|
+
return Result.GetItemSetByUserIdResult.fromDict(response.data);
|
|
766
1551
|
}).catch((error: any) => {
|
|
767
1552
|
throw JSON.parse(error.response.data.message);
|
|
768
1553
|
});
|
|
769
1554
|
}
|
|
770
1555
|
|
|
771
|
-
public
|
|
772
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{
|
|
1556
|
+
public getItemWithSignature(request: Request.GetItemWithSignatureRequest): Promise<Result.GetItemWithSignatureResult> {
|
|
1557
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/signature')
|
|
773
1558
|
.replace('{service}', 'inventory')
|
|
774
1559
|
.replace('{region}', this.session.region)
|
|
775
1560
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
776
|
-
.replace('{
|
|
1561
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1562
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
777
1563
|
|
|
778
1564
|
const headers = this.createAuthorizedHeaders();
|
|
779
1565
|
if (request.getRequestId()) {
|
|
780
1566
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
781
1567
|
}
|
|
1568
|
+
if (request.getAccessToken()) {
|
|
1569
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1570
|
+
}
|
|
782
1571
|
const params: {[key: string]: any} = {
|
|
783
1572
|
'contextStack': request.getContextStack() ?? null,
|
|
784
|
-
'
|
|
785
|
-
'
|
|
1573
|
+
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1574
|
+
'keyId': String(request.getKeyId() ?? null),
|
|
786
1575
|
};
|
|
787
1576
|
return axios.get(
|
|
788
1577
|
url,
|
|
@@ -791,28 +1580,29 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
791
1580
|
headers,
|
|
792
1581
|
},
|
|
793
1582
|
).then((response: any) => {
|
|
794
|
-
return Result.
|
|
1583
|
+
return Result.GetItemWithSignatureResult.fromDict(response.data);
|
|
795
1584
|
}).catch((error: any) => {
|
|
796
1585
|
throw JSON.parse(error.response.data.message);
|
|
797
1586
|
});
|
|
798
1587
|
}
|
|
799
1588
|
|
|
800
|
-
public
|
|
801
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
1589
|
+
public getItemWithSignatureByUserId(request: Request.GetItemWithSignatureByUserIdRequest): Promise<Result.GetItemWithSignatureByUserIdResult> {
|
|
1590
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/signature')
|
|
802
1591
|
.replace('{service}', 'inventory')
|
|
803
1592
|
.replace('{region}', this.session.region)
|
|
804
1593
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
805
|
-
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1594
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1595
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1596
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
806
1597
|
|
|
807
1598
|
const headers = this.createAuthorizedHeaders();
|
|
808
1599
|
if (request.getRequestId()) {
|
|
809
1600
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
810
1601
|
}
|
|
811
|
-
if (request.getAccessToken()) {
|
|
812
|
-
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
813
|
-
}
|
|
814
1602
|
const params: {[key: string]: any} = {
|
|
815
1603
|
'contextStack': request.getContextStack() ?? null,
|
|
1604
|
+
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1605
|
+
'keyId': String(request.getKeyId() ?? null),
|
|
816
1606
|
};
|
|
817
1607
|
return axios.get(
|
|
818
1608
|
url,
|
|
@@ -821,58 +1611,74 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
821
1611
|
headers,
|
|
822
1612
|
},
|
|
823
1613
|
).then((response: any) => {
|
|
824
|
-
return Result.
|
|
1614
|
+
return Result.GetItemWithSignatureByUserIdResult.fromDict(response.data);
|
|
825
1615
|
}).catch((error: any) => {
|
|
826
1616
|
throw JSON.parse(error.response.data.message);
|
|
827
1617
|
});
|
|
828
1618
|
}
|
|
829
1619
|
|
|
830
|
-
public
|
|
831
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}')
|
|
1620
|
+
public acquireItemSetByUserId(request: Request.AcquireItemSetByUserIdRequest): Promise<Result.AcquireItemSetByUserIdResult> {
|
|
1621
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/acquire')
|
|
832
1622
|
.replace('{service}', 'inventory')
|
|
833
1623
|
.replace('{region}', this.session.region)
|
|
834
1624
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
835
1625
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1626
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
836
1627
|
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
837
1628
|
|
|
838
1629
|
const headers = this.createAuthorizedHeaders();
|
|
839
1630
|
if (request.getRequestId()) {
|
|
840
1631
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
841
1632
|
}
|
|
842
|
-
|
|
1633
|
+
if (request.getDuplicationAvoider()) {
|
|
1634
|
+
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1635
|
+
}
|
|
1636
|
+
const body: {[key: string]: any} = {
|
|
843
1637
|
'contextStack': request.getContextStack() ?? null,
|
|
1638
|
+
'acquireCount': request.getAcquireCount() ?? null,
|
|
1639
|
+
'expiresAt': request.getExpiresAt() ?? null,
|
|
1640
|
+
'createNewItemSet': request.getCreateNewItemSet() ?? null,
|
|
1641
|
+
'itemSetName': request.getItemSetName() ?? null,
|
|
844
1642
|
};
|
|
845
|
-
return axios.
|
|
1643
|
+
return axios.post(
|
|
846
1644
|
url,
|
|
847
|
-
|
|
848
|
-
|
|
1645
|
+
body,
|
|
1646
|
+
{
|
|
849
1647
|
headers,
|
|
850
1648
|
},
|
|
851
1649
|
).then((response: any) => {
|
|
852
|
-
return Result.
|
|
1650
|
+
return Result.AcquireItemSetByUserIdResult.fromDict(response.data);
|
|
853
1651
|
}).catch((error: any) => {
|
|
854
|
-
|
|
1652
|
+
if (error.response) {
|
|
1653
|
+
throw JSON.parse(error.response.data.message);
|
|
1654
|
+
} else {
|
|
1655
|
+
throw [];
|
|
1656
|
+
}
|
|
855
1657
|
});
|
|
856
1658
|
}
|
|
857
1659
|
|
|
858
|
-
public
|
|
859
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
1660
|
+
public consumeItemSet(request: Request.ConsumeItemSetRequest): Promise<Result.ConsumeItemSetResult> {
|
|
1661
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/consume')
|
|
860
1662
|
.replace('{service}', 'inventory')
|
|
861
1663
|
.replace('{region}', this.session.region)
|
|
862
1664
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
863
1665
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
864
|
-
.replace('{
|
|
1666
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
865
1667
|
|
|
866
1668
|
const headers = this.createAuthorizedHeaders();
|
|
867
1669
|
if (request.getRequestId()) {
|
|
868
1670
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
869
1671
|
}
|
|
1672
|
+
if (request.getAccessToken()) {
|
|
1673
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1674
|
+
}
|
|
870
1675
|
if (request.getDuplicationAvoider()) {
|
|
871
1676
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
872
1677
|
}
|
|
873
1678
|
const body: {[key: string]: any} = {
|
|
874
1679
|
'contextStack': request.getContextStack() ?? null,
|
|
875
|
-
'
|
|
1680
|
+
'consumeCount': request.getConsumeCount() ?? null,
|
|
1681
|
+
'itemSetName': request.getItemSetName() ?? null,
|
|
876
1682
|
};
|
|
877
1683
|
return axios.post(
|
|
878
1684
|
url,
|
|
@@ -881,7 +1687,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
881
1687
|
headers,
|
|
882
1688
|
},
|
|
883
1689
|
).then((response: any) => {
|
|
884
|
-
return Result.
|
|
1690
|
+
return Result.ConsumeItemSetResult.fromDict(response.data);
|
|
885
1691
|
}).catch((error: any) => {
|
|
886
1692
|
if (error.response) {
|
|
887
1693
|
throw JSON.parse(error.response.data.message);
|
|
@@ -891,13 +1697,14 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
891
1697
|
});
|
|
892
1698
|
}
|
|
893
1699
|
|
|
894
|
-
public
|
|
895
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/
|
|
1700
|
+
public consumeItemSetByUserId(request: Request.ConsumeItemSetByUserIdRequest): Promise<Result.ConsumeItemSetByUserIdResult> {
|
|
1701
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/consume')
|
|
896
1702
|
.replace('{service}', 'inventory')
|
|
897
1703
|
.replace('{region}', this.session.region)
|
|
898
1704
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
899
1705
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
900
|
-
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1706
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1707
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
901
1708
|
|
|
902
1709
|
const headers = this.createAuthorizedHeaders();
|
|
903
1710
|
if (request.getRequestId()) {
|
|
@@ -908,16 +1715,17 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
908
1715
|
}
|
|
909
1716
|
const body: {[key: string]: any} = {
|
|
910
1717
|
'contextStack': request.getContextStack() ?? null,
|
|
911
|
-
'
|
|
1718
|
+
'consumeCount': request.getConsumeCount() ?? null,
|
|
1719
|
+
'itemSetName': request.getItemSetName() ?? null,
|
|
912
1720
|
};
|
|
913
|
-
return axios.
|
|
1721
|
+
return axios.post(
|
|
914
1722
|
url,
|
|
915
1723
|
body,
|
|
916
1724
|
{
|
|
917
1725
|
headers,
|
|
918
1726
|
},
|
|
919
1727
|
).then((response: any) => {
|
|
920
|
-
return Result.
|
|
1728
|
+
return Result.ConsumeItemSetByUserIdResult.fromDict(response.data);
|
|
921
1729
|
}).catch((error: any) => {
|
|
922
1730
|
if (error.response) {
|
|
923
1731
|
throw JSON.parse(error.response.data.message);
|
|
@@ -927,13 +1735,14 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
927
1735
|
});
|
|
928
1736
|
}
|
|
929
1737
|
|
|
930
|
-
public
|
|
931
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}')
|
|
1738
|
+
public deleteItemSetByUserId(request: Request.DeleteItemSetByUserIdRequest): Promise<Result.DeleteItemSetByUserIdResult> {
|
|
1739
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}')
|
|
932
1740
|
.replace('{service}', 'inventory')
|
|
933
1741
|
.replace('{region}', this.session.region)
|
|
934
1742
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
935
1743
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
936
|
-
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1744
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1745
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
937
1746
|
|
|
938
1747
|
const headers = this.createAuthorizedHeaders();
|
|
939
1748
|
if (request.getRequestId()) {
|
|
@@ -944,6 +1753,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
944
1753
|
}
|
|
945
1754
|
const params: {[key: string]: any} = {
|
|
946
1755
|
'contextStack': request.getContextStack() ?? null,
|
|
1756
|
+
'itemSetName': String(request.getItemSetName() ?? null),
|
|
947
1757
|
};
|
|
948
1758
|
return axios.delete(
|
|
949
1759
|
url,
|
|
@@ -952,14 +1762,14 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
952
1762
|
headers,
|
|
953
1763
|
},
|
|
954
1764
|
).then((response: any) => {
|
|
955
|
-
return Result.
|
|
1765
|
+
return Result.DeleteItemSetByUserIdResult.fromDict(response.data);
|
|
956
1766
|
}).catch((error: any) => {
|
|
957
1767
|
throw JSON.parse(error.response.data.message);
|
|
958
1768
|
});
|
|
959
1769
|
}
|
|
960
1770
|
|
|
961
|
-
public
|
|
962
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/
|
|
1771
|
+
public acquireItemSetByStampSheet(request: Request.AcquireItemSetByStampSheetRequest): Promise<Result.AcquireItemSetByStampSheetResult> {
|
|
1772
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/acquire')
|
|
963
1773
|
.replace('{service}', 'inventory')
|
|
964
1774
|
.replace('{region}', this.session.region);
|
|
965
1775
|
|
|
@@ -979,7 +1789,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
979
1789
|
headers,
|
|
980
1790
|
},
|
|
981
1791
|
).then((response: any) => {
|
|
982
|
-
return Result.
|
|
1792
|
+
return Result.AcquireItemSetByStampSheetResult.fromDict(response.data);
|
|
983
1793
|
}).catch((error: any) => {
|
|
984
1794
|
if (error.response) {
|
|
985
1795
|
throw JSON.parse(error.response.data.message);
|
|
@@ -989,8 +1799,8 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
989
1799
|
});
|
|
990
1800
|
}
|
|
991
1801
|
|
|
992
|
-
public
|
|
993
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/
|
|
1802
|
+
public consumeItemSetByStampTask(request: Request.ConsumeItemSetByStampTaskRequest): Promise<Result.ConsumeItemSetByStampTaskResult> {
|
|
1803
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/consume')
|
|
994
1804
|
.replace('{service}', 'inventory')
|
|
995
1805
|
.replace('{region}', this.session.region);
|
|
996
1806
|
|
|
@@ -1000,7 +1810,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1000
1810
|
}
|
|
1001
1811
|
const body: {[key: string]: any} = {
|
|
1002
1812
|
'contextStack': request.getContextStack() ?? null,
|
|
1003
|
-
'
|
|
1813
|
+
'stampTask': request.getStampTask() ?? null,
|
|
1004
1814
|
'keyId': request.getKeyId() ?? null,
|
|
1005
1815
|
};
|
|
1006
1816
|
return axios.post(
|
|
@@ -1010,7 +1820,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1010
1820
|
headers,
|
|
1011
1821
|
},
|
|
1012
1822
|
).then((response: any) => {
|
|
1013
|
-
return Result.
|
|
1823
|
+
return Result.ConsumeItemSetByStampTaskResult.fromDict(response.data);
|
|
1014
1824
|
}).catch((error: any) => {
|
|
1015
1825
|
if (error.response) {
|
|
1016
1826
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1020,12 +1830,14 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1020
1830
|
});
|
|
1021
1831
|
}
|
|
1022
1832
|
|
|
1023
|
-
public
|
|
1024
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item')
|
|
1833
|
+
public describeReferenceOf(request: Request.DescribeReferenceOfRequest): Promise<Result.DescribeReferenceOfResult> {
|
|
1834
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference')
|
|
1025
1835
|
.replace('{service}', 'inventory')
|
|
1026
1836
|
.replace('{region}', this.session.region)
|
|
1027
1837
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1028
|
-
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1838
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1839
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1840
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
1029
1841
|
|
|
1030
1842
|
const headers = this.createAuthorizedHeaders();
|
|
1031
1843
|
if (request.getRequestId()) {
|
|
@@ -1036,8 +1848,6 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1036
1848
|
}
|
|
1037
1849
|
const params: {[key: string]: any} = {
|
|
1038
1850
|
'contextStack': request.getContextStack() ?? null,
|
|
1039
|
-
'pageToken': String(request.getPageToken() ?? null),
|
|
1040
|
-
'limit': String(request.getLimit() ?? null),
|
|
1041
1851
|
};
|
|
1042
1852
|
return axios.get(
|
|
1043
1853
|
url,
|
|
@@ -1046,19 +1856,21 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1046
1856
|
headers,
|
|
1047
1857
|
},
|
|
1048
1858
|
).then((response: any) => {
|
|
1049
|
-
return Result.
|
|
1859
|
+
return Result.DescribeReferenceOfResult.fromDict(response.data);
|
|
1050
1860
|
}).catch((error: any) => {
|
|
1051
1861
|
throw JSON.parse(error.response.data.message);
|
|
1052
1862
|
});
|
|
1053
1863
|
}
|
|
1054
1864
|
|
|
1055
|
-
public
|
|
1056
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item')
|
|
1865
|
+
public describeReferenceOfByUserId(request: Request.DescribeReferenceOfByUserIdRequest): Promise<Result.DescribeReferenceOfByUserIdResult> {
|
|
1866
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference')
|
|
1057
1867
|
.replace('{service}', 'inventory')
|
|
1058
1868
|
.replace('{region}', this.session.region)
|
|
1059
1869
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1060
1870
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1061
|
-
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1871
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1872
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1873
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
1062
1874
|
|
|
1063
1875
|
const headers = this.createAuthorizedHeaders();
|
|
1064
1876
|
if (request.getRequestId()) {
|
|
@@ -1066,8 +1878,6 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1066
1878
|
}
|
|
1067
1879
|
const params: {[key: string]: any} = {
|
|
1068
1880
|
'contextStack': request.getContextStack() ?? null,
|
|
1069
|
-
'pageToken': String(request.getPageToken() ?? null),
|
|
1070
|
-
'limit': String(request.getLimit() ?? null),
|
|
1071
1881
|
};
|
|
1072
1882
|
return axios.get(
|
|
1073
1883
|
url,
|
|
@@ -1076,19 +1886,21 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1076
1886
|
headers,
|
|
1077
1887
|
},
|
|
1078
1888
|
).then((response: any) => {
|
|
1079
|
-
return Result.
|
|
1889
|
+
return Result.DescribeReferenceOfByUserIdResult.fromDict(response.data);
|
|
1080
1890
|
}).catch((error: any) => {
|
|
1081
1891
|
throw JSON.parse(error.response.data.message);
|
|
1082
1892
|
});
|
|
1083
1893
|
}
|
|
1084
1894
|
|
|
1085
|
-
public
|
|
1086
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}')
|
|
1895
|
+
public getReferenceOf(request: Request.GetReferenceOfRequest): Promise<Result.GetReferenceOfResult> {
|
|
1896
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference/{referenceOf}')
|
|
1087
1897
|
.replace('{service}', 'inventory')
|
|
1088
1898
|
.replace('{region}', this.session.region)
|
|
1089
1899
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1090
1900
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1091
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1901
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1902
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1903
|
+
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
1092
1904
|
|
|
1093
1905
|
const headers = this.createAuthorizedHeaders();
|
|
1094
1906
|
if (request.getRequestId()) {
|
|
@@ -1099,7 +1911,6 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1099
1911
|
}
|
|
1100
1912
|
const params: {[key: string]: any} = {
|
|
1101
1913
|
'contextStack': request.getContextStack() ?? null,
|
|
1102
|
-
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1103
1914
|
};
|
|
1104
1915
|
return axios.get(
|
|
1105
1916
|
url,
|
|
@@ -1108,20 +1919,22 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1108
1919
|
headers,
|
|
1109
1920
|
},
|
|
1110
1921
|
).then((response: any) => {
|
|
1111
|
-
return Result.
|
|
1922
|
+
return Result.GetReferenceOfResult.fromDict(response.data);
|
|
1112
1923
|
}).catch((error: any) => {
|
|
1113
1924
|
throw JSON.parse(error.response.data.message);
|
|
1114
1925
|
});
|
|
1115
1926
|
}
|
|
1116
1927
|
|
|
1117
|
-
public
|
|
1118
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}')
|
|
1928
|
+
public getReferenceOfByUserId(request: Request.GetReferenceOfByUserIdRequest): Promise<Result.GetReferenceOfByUserIdResult> {
|
|
1929
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference/{referenceOf}')
|
|
1119
1930
|
.replace('{service}', 'inventory')
|
|
1120
1931
|
.replace('{region}', this.session.region)
|
|
1121
1932
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1122
1933
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1123
1934
|
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1124
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1935
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1936
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1937
|
+
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
1125
1938
|
|
|
1126
1939
|
const headers = this.createAuthorizedHeaders();
|
|
1127
1940
|
if (request.getRequestId()) {
|
|
@@ -1129,7 +1942,6 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1129
1942
|
}
|
|
1130
1943
|
const params: {[key: string]: any} = {
|
|
1131
1944
|
'contextStack': request.getContextStack() ?? null,
|
|
1132
|
-
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1133
1945
|
};
|
|
1134
1946
|
return axios.get(
|
|
1135
1947
|
url,
|
|
@@ -1138,19 +1950,22 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1138
1950
|
headers,
|
|
1139
1951
|
},
|
|
1140
1952
|
).then((response: any) => {
|
|
1141
|
-
return Result.
|
|
1953
|
+
return Result.GetReferenceOfByUserIdResult.fromDict(response.data);
|
|
1142
1954
|
}).catch((error: any) => {
|
|
1143
1955
|
throw JSON.parse(error.response.data.message);
|
|
1144
1956
|
});
|
|
1145
1957
|
}
|
|
1146
1958
|
|
|
1147
|
-
public
|
|
1148
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/
|
|
1959
|
+
public verifyReferenceOf(request: Request.VerifyReferenceOfRequest): Promise<Result.VerifyReferenceOfResult> {
|
|
1960
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference/{referenceOf}/verify/{verifyType}')
|
|
1149
1961
|
.replace('{service}', 'inventory')
|
|
1150
1962
|
.replace('{region}', this.session.region)
|
|
1151
1963
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1152
1964
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1153
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1965
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1966
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1967
|
+
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'))
|
|
1968
|
+
.replace('{verifyType}', String(request.getVerifyType() ?? 'null') === "" ? "null" : String(request.getVerifyType() ?? 'null'));
|
|
1154
1969
|
|
|
1155
1970
|
const headers = this.createAuthorizedHeaders();
|
|
1156
1971
|
if (request.getRequestId()) {
|
|
@@ -1159,77 +1974,90 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1159
1974
|
if (request.getAccessToken()) {
|
|
1160
1975
|
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1161
1976
|
}
|
|
1162
|
-
|
|
1977
|
+
if (request.getDuplicationAvoider()) {
|
|
1978
|
+
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1979
|
+
}
|
|
1980
|
+
const body: {[key: string]: any} = {
|
|
1163
1981
|
'contextStack': request.getContextStack() ?? null,
|
|
1164
|
-
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1165
|
-
'keyId': String(request.getKeyId() ?? null),
|
|
1166
1982
|
};
|
|
1167
|
-
return axios.
|
|
1983
|
+
return axios.post(
|
|
1168
1984
|
url,
|
|
1169
|
-
|
|
1170
|
-
|
|
1985
|
+
body,
|
|
1986
|
+
{
|
|
1171
1987
|
headers,
|
|
1172
1988
|
},
|
|
1173
1989
|
).then((response: any) => {
|
|
1174
|
-
return Result.
|
|
1990
|
+
return Result.VerifyReferenceOfResult.fromDict(response.data);
|
|
1175
1991
|
}).catch((error: any) => {
|
|
1176
|
-
|
|
1992
|
+
if (error.response) {
|
|
1993
|
+
throw JSON.parse(error.response.data.message);
|
|
1994
|
+
} else {
|
|
1995
|
+
throw [];
|
|
1996
|
+
}
|
|
1177
1997
|
});
|
|
1178
1998
|
}
|
|
1179
1999
|
|
|
1180
|
-
public
|
|
1181
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/
|
|
2000
|
+
public verifyReferenceOfByUserId(request: Request.VerifyReferenceOfByUserIdRequest): Promise<Result.VerifyReferenceOfByUserIdResult> {
|
|
2001
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference/{referenceOf}/verify/{verifyType}')
|
|
1182
2002
|
.replace('{service}', 'inventory')
|
|
1183
2003
|
.replace('{region}', this.session.region)
|
|
1184
2004
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1185
2005
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1186
2006
|
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1187
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
2007
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
2008
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
2009
|
+
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'))
|
|
2010
|
+
.replace('{verifyType}', String(request.getVerifyType() ?? 'null') === "" ? "null" : String(request.getVerifyType() ?? 'null'));
|
|
1188
2011
|
|
|
1189
2012
|
const headers = this.createAuthorizedHeaders();
|
|
1190
2013
|
if (request.getRequestId()) {
|
|
1191
2014
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1192
2015
|
}
|
|
1193
|
-
|
|
2016
|
+
if (request.getDuplicationAvoider()) {
|
|
2017
|
+
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
2018
|
+
}
|
|
2019
|
+
const body: {[key: string]: any} = {
|
|
1194
2020
|
'contextStack': request.getContextStack() ?? null,
|
|
1195
|
-
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1196
|
-
'keyId': String(request.getKeyId() ?? null),
|
|
1197
2021
|
};
|
|
1198
|
-
return axios.
|
|
2022
|
+
return axios.post(
|
|
1199
2023
|
url,
|
|
1200
|
-
|
|
1201
|
-
|
|
2024
|
+
body,
|
|
2025
|
+
{
|
|
1202
2026
|
headers,
|
|
1203
2027
|
},
|
|
1204
2028
|
).then((response: any) => {
|
|
1205
|
-
return Result.
|
|
2029
|
+
return Result.VerifyReferenceOfByUserIdResult.fromDict(response.data);
|
|
1206
2030
|
}).catch((error: any) => {
|
|
1207
|
-
|
|
2031
|
+
if (error.response) {
|
|
2032
|
+
throw JSON.parse(error.response.data.message);
|
|
2033
|
+
} else {
|
|
2034
|
+
throw [];
|
|
2035
|
+
}
|
|
1208
2036
|
});
|
|
1209
2037
|
}
|
|
1210
2038
|
|
|
1211
|
-
public
|
|
1212
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
2039
|
+
public addReferenceOf(request: Request.AddReferenceOfRequest): Promise<Result.AddReferenceOfResult> {
|
|
2040
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference')
|
|
1213
2041
|
.replace('{service}', 'inventory')
|
|
1214
2042
|
.replace('{region}', this.session.region)
|
|
1215
2043
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1216
2044
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1217
2045
|
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1218
|
-
.replace('{
|
|
2046
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
1219
2047
|
|
|
1220
2048
|
const headers = this.createAuthorizedHeaders();
|
|
1221
2049
|
if (request.getRequestId()) {
|
|
1222
2050
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1223
2051
|
}
|
|
2052
|
+
if (request.getAccessToken()) {
|
|
2053
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
2054
|
+
}
|
|
1224
2055
|
if (request.getDuplicationAvoider()) {
|
|
1225
2056
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1226
2057
|
}
|
|
1227
2058
|
const body: {[key: string]: any} = {
|
|
1228
2059
|
'contextStack': request.getContextStack() ?? null,
|
|
1229
|
-
'
|
|
1230
|
-
'expiresAt': request.getExpiresAt() ?? null,
|
|
1231
|
-
'createNewItemSet': request.getCreateNewItemSet() ?? null,
|
|
1232
|
-
'itemSetName': request.getItemSetName() ?? null,
|
|
2060
|
+
'referenceOf': request.getReferenceOf() ?? null,
|
|
1233
2061
|
};
|
|
1234
2062
|
return axios.post(
|
|
1235
2063
|
url,
|
|
@@ -1238,7 +2066,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1238
2066
|
headers,
|
|
1239
2067
|
},
|
|
1240
2068
|
).then((response: any) => {
|
|
1241
|
-
return Result.
|
|
2069
|
+
return Result.AddReferenceOfResult.fromDict(response.data);
|
|
1242
2070
|
}).catch((error: any) => {
|
|
1243
2071
|
if (error.response) {
|
|
1244
2072
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1248,28 +2076,26 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1248
2076
|
});
|
|
1249
2077
|
}
|
|
1250
2078
|
|
|
1251
|
-
public
|
|
1252
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
2079
|
+
public addReferenceOfByUserId(request: Request.AddReferenceOfByUserIdRequest): Promise<Result.AddReferenceOfByUserIdResult> {
|
|
2080
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference')
|
|
1253
2081
|
.replace('{service}', 'inventory')
|
|
1254
2082
|
.replace('{region}', this.session.region)
|
|
1255
2083
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1256
2084
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1257
|
-
.replace('{
|
|
2085
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
2086
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
2087
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
1258
2088
|
|
|
1259
2089
|
const headers = this.createAuthorizedHeaders();
|
|
1260
2090
|
if (request.getRequestId()) {
|
|
1261
2091
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1262
2092
|
}
|
|
1263
|
-
if (request.getAccessToken()) {
|
|
1264
|
-
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1265
|
-
}
|
|
1266
2093
|
if (request.getDuplicationAvoider()) {
|
|
1267
2094
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1268
2095
|
}
|
|
1269
2096
|
const body: {[key: string]: any} = {
|
|
1270
2097
|
'contextStack': request.getContextStack() ?? null,
|
|
1271
|
-
'
|
|
1272
|
-
'itemSetName': request.getItemSetName() ?? null,
|
|
2098
|
+
'referenceOf': request.getReferenceOf() ?? null,
|
|
1273
2099
|
};
|
|
1274
2100
|
return axios.post(
|
|
1275
2101
|
url,
|
|
@@ -1278,7 +2104,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1278
2104
|
headers,
|
|
1279
2105
|
},
|
|
1280
2106
|
).then((response: any) => {
|
|
1281
|
-
return Result.
|
|
2107
|
+
return Result.AddReferenceOfByUserIdResult.fromDict(response.data);
|
|
1282
2108
|
}).catch((error: any) => {
|
|
1283
2109
|
if (error.response) {
|
|
1284
2110
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1288,52 +2114,52 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1288
2114
|
});
|
|
1289
2115
|
}
|
|
1290
2116
|
|
|
1291
|
-
public
|
|
1292
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
2117
|
+
public deleteReferenceOf(request: Request.DeleteReferenceOfRequest): Promise<Result.DeleteReferenceOfResult> {
|
|
2118
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference/{referenceOf}')
|
|
1293
2119
|
.replace('{service}', 'inventory')
|
|
1294
2120
|
.replace('{region}', this.session.region)
|
|
1295
2121
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1296
2122
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1297
|
-
.replace('{
|
|
1298
|
-
.replace('{
|
|
2123
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
2124
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
2125
|
+
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
1299
2126
|
|
|
1300
2127
|
const headers = this.createAuthorizedHeaders();
|
|
1301
2128
|
if (request.getRequestId()) {
|
|
1302
2129
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1303
2130
|
}
|
|
2131
|
+
if (request.getAccessToken()) {
|
|
2132
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
2133
|
+
}
|
|
1304
2134
|
if (request.getDuplicationAvoider()) {
|
|
1305
2135
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1306
2136
|
}
|
|
1307
|
-
const
|
|
2137
|
+
const params: {[key: string]: any} = {
|
|
1308
2138
|
'contextStack': request.getContextStack() ?? null,
|
|
1309
|
-
'consumeCount': request.getConsumeCount() ?? null,
|
|
1310
|
-
'itemSetName': request.getItemSetName() ?? null,
|
|
1311
2139
|
};
|
|
1312
|
-
return axios.
|
|
2140
|
+
return axios.delete(
|
|
1313
2141
|
url,
|
|
1314
|
-
|
|
1315
|
-
|
|
2142
|
+
{
|
|
2143
|
+
params,
|
|
1316
2144
|
headers,
|
|
1317
2145
|
},
|
|
1318
2146
|
).then((response: any) => {
|
|
1319
|
-
return Result.
|
|
2147
|
+
return Result.DeleteReferenceOfResult.fromDict(response.data);
|
|
1320
2148
|
}).catch((error: any) => {
|
|
1321
|
-
|
|
1322
|
-
throw JSON.parse(error.response.data.message);
|
|
1323
|
-
} else {
|
|
1324
|
-
throw [];
|
|
1325
|
-
}
|
|
2149
|
+
throw JSON.parse(error.response.data.message);
|
|
1326
2150
|
});
|
|
1327
2151
|
}
|
|
1328
2152
|
|
|
1329
|
-
public
|
|
1330
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}')
|
|
2153
|
+
public deleteReferenceOfByUserId(request: Request.DeleteReferenceOfByUserIdRequest): Promise<Result.DeleteReferenceOfByUserIdResult> {
|
|
2154
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/{itemSetName}/reference/{referenceOf}')
|
|
1331
2155
|
.replace('{service}', 'inventory')
|
|
1332
2156
|
.replace('{region}', this.session.region)
|
|
1333
2157
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1334
2158
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1335
2159
|
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1336
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
2160
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
2161
|
+
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
2162
|
+
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
1337
2163
|
|
|
1338
2164
|
const headers = this.createAuthorizedHeaders();
|
|
1339
2165
|
if (request.getRequestId()) {
|
|
@@ -1344,7 +2170,6 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1344
2170
|
}
|
|
1345
2171
|
const params: {[key: string]: any} = {
|
|
1346
2172
|
'contextStack': request.getContextStack() ?? null,
|
|
1347
|
-
'itemSetName': String(request.getItemSetName() ?? null),
|
|
1348
2173
|
};
|
|
1349
2174
|
return axios.delete(
|
|
1350
2175
|
url,
|
|
@@ -1353,14 +2178,14 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1353
2178
|
headers,
|
|
1354
2179
|
},
|
|
1355
2180
|
).then((response: any) => {
|
|
1356
|
-
return Result.
|
|
2181
|
+
return Result.DeleteReferenceOfByUserIdResult.fromDict(response.data);
|
|
1357
2182
|
}).catch((error: any) => {
|
|
1358
2183
|
throw JSON.parse(error.response.data.message);
|
|
1359
2184
|
});
|
|
1360
2185
|
}
|
|
1361
2186
|
|
|
1362
|
-
public
|
|
1363
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/
|
|
2187
|
+
public addReferenceOfItemSetByStampSheet(request: Request.AddReferenceOfItemSetByStampSheetRequest): Promise<Result.AddReferenceOfItemSetByStampSheetResult> {
|
|
2188
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/reference/add')
|
|
1364
2189
|
.replace('{service}', 'inventory')
|
|
1365
2190
|
.replace('{region}', this.session.region);
|
|
1366
2191
|
|
|
@@ -1380,7 +2205,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1380
2205
|
headers,
|
|
1381
2206
|
},
|
|
1382
2207
|
).then((response: any) => {
|
|
1383
|
-
return Result.
|
|
2208
|
+
return Result.AddReferenceOfItemSetByStampSheetResult.fromDict(response.data);
|
|
1384
2209
|
}).catch((error: any) => {
|
|
1385
2210
|
if (error.response) {
|
|
1386
2211
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1390,8 +2215,39 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1390
2215
|
});
|
|
1391
2216
|
}
|
|
1392
2217
|
|
|
1393
|
-
public
|
|
1394
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/
|
|
2218
|
+
public deleteReferenceOfItemSetByStampSheet(request: Request.DeleteReferenceOfItemSetByStampSheetRequest): Promise<Result.DeleteReferenceOfItemSetByStampSheetResult> {
|
|
2219
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/reference/delete')
|
|
2220
|
+
.replace('{service}', 'inventory')
|
|
2221
|
+
.replace('{region}', this.session.region);
|
|
2222
|
+
|
|
2223
|
+
const headers = this.createAuthorizedHeaders();
|
|
2224
|
+
if (request.getRequestId()) {
|
|
2225
|
+
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
2226
|
+
}
|
|
2227
|
+
const body: {[key: string]: any} = {
|
|
2228
|
+
'contextStack': request.getContextStack() ?? null,
|
|
2229
|
+
'stampSheet': request.getStampSheet() ?? null,
|
|
2230
|
+
'keyId': request.getKeyId() ?? null,
|
|
2231
|
+
};
|
|
2232
|
+
return axios.post(
|
|
2233
|
+
url,
|
|
2234
|
+
body,
|
|
2235
|
+
{
|
|
2236
|
+
headers,
|
|
2237
|
+
},
|
|
2238
|
+
).then((response: any) => {
|
|
2239
|
+
return Result.DeleteReferenceOfItemSetByStampSheetResult.fromDict(response.data);
|
|
2240
|
+
}).catch((error: any) => {
|
|
2241
|
+
if (error.response) {
|
|
2242
|
+
throw JSON.parse(error.response.data.message);
|
|
2243
|
+
} else {
|
|
2244
|
+
throw [];
|
|
2245
|
+
}
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
public verifyReferenceOfByStampTask(request: Request.VerifyReferenceOfByStampTaskRequest): Promise<Result.VerifyReferenceOfByStampTaskResult> {
|
|
2250
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/verify')
|
|
1395
2251
|
.replace('{service}', 'inventory')
|
|
1396
2252
|
.replace('{region}', this.session.region);
|
|
1397
2253
|
|
|
@@ -1411,7 +2267,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1411
2267
|
headers,
|
|
1412
2268
|
},
|
|
1413
2269
|
).then((response: any) => {
|
|
1414
|
-
return Result.
|
|
2270
|
+
return Result.VerifyReferenceOfByStampTaskResult.fromDict(response.data);
|
|
1415
2271
|
}).catch((error: any) => {
|
|
1416
2272
|
if (error.response) {
|
|
1417
2273
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1421,14 +2277,12 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1421
2277
|
});
|
|
1422
2278
|
}
|
|
1423
2279
|
|
|
1424
|
-
public
|
|
1425
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item
|
|
2280
|
+
public describeSimpleItems(request: Request.DescribeSimpleItemsRequest): Promise<Result.DescribeSimpleItemsResult> {
|
|
2281
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/simple/inventory/{inventoryName}/item')
|
|
1426
2282
|
.replace('{service}', 'inventory')
|
|
1427
2283
|
.replace('{region}', this.session.region)
|
|
1428
2284
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1429
|
-
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1430
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1431
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
2285
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
1432
2286
|
|
|
1433
2287
|
const headers = this.createAuthorizedHeaders();
|
|
1434
2288
|
if (request.getRequestId()) {
|
|
@@ -1439,6 +2293,8 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1439
2293
|
}
|
|
1440
2294
|
const params: {[key: string]: any} = {
|
|
1441
2295
|
'contextStack': request.getContextStack() ?? null,
|
|
2296
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
2297
|
+
'limit': String(request.getLimit() ?? null),
|
|
1442
2298
|
};
|
|
1443
2299
|
return axios.get(
|
|
1444
2300
|
url,
|
|
@@ -1447,21 +2303,19 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1447
2303
|
headers,
|
|
1448
2304
|
},
|
|
1449
2305
|
).then((response: any) => {
|
|
1450
|
-
return Result.
|
|
2306
|
+
return Result.DescribeSimpleItemsResult.fromDict(response.data);
|
|
1451
2307
|
}).catch((error: any) => {
|
|
1452
2308
|
throw JSON.parse(error.response.data.message);
|
|
1453
2309
|
});
|
|
1454
2310
|
}
|
|
1455
2311
|
|
|
1456
|
-
public
|
|
1457
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item
|
|
2312
|
+
public describeSimpleItemsByUserId(request: Request.DescribeSimpleItemsByUserIdRequest): Promise<Result.DescribeSimpleItemsByUserIdResult> {
|
|
2313
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/simple/inventory/{inventoryName}/item')
|
|
1458
2314
|
.replace('{service}', 'inventory')
|
|
1459
2315
|
.replace('{region}', this.session.region)
|
|
1460
2316
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1461
2317
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1462
|
-
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1463
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1464
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
2318
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1465
2319
|
|
|
1466
2320
|
const headers = this.createAuthorizedHeaders();
|
|
1467
2321
|
if (request.getRequestId()) {
|
|
@@ -1469,6 +2323,8 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1469
2323
|
}
|
|
1470
2324
|
const params: {[key: string]: any} = {
|
|
1471
2325
|
'contextStack': request.getContextStack() ?? null,
|
|
2326
|
+
'pageToken': String(request.getPageToken() ?? null),
|
|
2327
|
+
'limit': String(request.getLimit() ?? null),
|
|
1472
2328
|
};
|
|
1473
2329
|
return axios.get(
|
|
1474
2330
|
url,
|
|
@@ -1477,21 +2333,19 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1477
2333
|
headers,
|
|
1478
2334
|
},
|
|
1479
2335
|
).then((response: any) => {
|
|
1480
|
-
return Result.
|
|
2336
|
+
return Result.DescribeSimpleItemsByUserIdResult.fromDict(response.data);
|
|
1481
2337
|
}).catch((error: any) => {
|
|
1482
2338
|
throw JSON.parse(error.response.data.message);
|
|
1483
2339
|
});
|
|
1484
2340
|
}
|
|
1485
2341
|
|
|
1486
|
-
public
|
|
1487
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}
|
|
2342
|
+
public getSimpleItem(request: Request.GetSimpleItemRequest): Promise<Result.GetSimpleItemResult> {
|
|
2343
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/simple/inventory/{inventoryName}/item/{itemName}')
|
|
1488
2344
|
.replace('{service}', 'inventory')
|
|
1489
2345
|
.replace('{region}', this.session.region)
|
|
1490
2346
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1491
2347
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1492
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1493
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1494
|
-
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
2348
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1495
2349
|
|
|
1496
2350
|
const headers = this.createAuthorizedHeaders();
|
|
1497
2351
|
if (request.getRequestId()) {
|
|
@@ -1510,22 +2364,20 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1510
2364
|
headers,
|
|
1511
2365
|
},
|
|
1512
2366
|
).then((response: any) => {
|
|
1513
|
-
return Result.
|
|
2367
|
+
return Result.GetSimpleItemResult.fromDict(response.data);
|
|
1514
2368
|
}).catch((error: any) => {
|
|
1515
2369
|
throw JSON.parse(error.response.data.message);
|
|
1516
2370
|
});
|
|
1517
2371
|
}
|
|
1518
2372
|
|
|
1519
|
-
public
|
|
1520
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}
|
|
2373
|
+
public getSimpleItemByUserId(request: Request.GetSimpleItemByUserIdRequest): Promise<Result.GetSimpleItemByUserIdResult> {
|
|
2374
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/simple/inventory/{inventoryName}/item/{itemName}')
|
|
1521
2375
|
.replace('{service}', 'inventory')
|
|
1522
2376
|
.replace('{region}', this.session.region)
|
|
1523
2377
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1524
2378
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1525
2379
|
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1526
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1527
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1528
|
-
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
2380
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1529
2381
|
|
|
1530
2382
|
const headers = this.createAuthorizedHeaders();
|
|
1531
2383
|
if (request.getRequestId()) {
|
|
@@ -1541,22 +2393,19 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1541
2393
|
headers,
|
|
1542
2394
|
},
|
|
1543
2395
|
).then((response: any) => {
|
|
1544
|
-
return Result.
|
|
2396
|
+
return Result.GetSimpleItemByUserIdResult.fromDict(response.data);
|
|
1545
2397
|
}).catch((error: any) => {
|
|
1546
2398
|
throw JSON.parse(error.response.data.message);
|
|
1547
2399
|
});
|
|
1548
2400
|
}
|
|
1549
2401
|
|
|
1550
|
-
public
|
|
1551
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/inventory/{inventoryName}/item/{itemName}/
|
|
2402
|
+
public getSimpleItemWithSignature(request: Request.GetSimpleItemWithSignatureRequest): Promise<Result.GetSimpleItemWithSignatureResult> {
|
|
2403
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/simple/inventory/{inventoryName}/item/{itemName}/signature')
|
|
1552
2404
|
.replace('{service}', 'inventory')
|
|
1553
2405
|
.replace('{region}', this.session.region)
|
|
1554
2406
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1555
2407
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1556
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1557
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1558
|
-
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'))
|
|
1559
|
-
.replace('{verifyType}', String(request.getVerifyType() ?? 'null') === "" ? "null" : String(request.getVerifyType() ?? 'null'));
|
|
2408
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1560
2409
|
|
|
1561
2410
|
const headers = this.createAuthorizedHeaders();
|
|
1562
2411
|
if (request.getRequestId()) {
|
|
@@ -1565,90 +2414,71 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1565
2414
|
if (request.getAccessToken()) {
|
|
1566
2415
|
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1567
2416
|
}
|
|
1568
|
-
|
|
1569
|
-
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1570
|
-
}
|
|
1571
|
-
const body: {[key: string]: any} = {
|
|
2417
|
+
const params: {[key: string]: any} = {
|
|
1572
2418
|
'contextStack': request.getContextStack() ?? null,
|
|
2419
|
+
'keyId': String(request.getKeyId() ?? null),
|
|
1573
2420
|
};
|
|
1574
|
-
return axios.
|
|
2421
|
+
return axios.get(
|
|
1575
2422
|
url,
|
|
1576
|
-
|
|
1577
|
-
|
|
2423
|
+
{
|
|
2424
|
+
params,
|
|
1578
2425
|
headers,
|
|
1579
2426
|
},
|
|
1580
2427
|
).then((response: any) => {
|
|
1581
|
-
return Result.
|
|
2428
|
+
return Result.GetSimpleItemWithSignatureResult.fromDict(response.data);
|
|
1582
2429
|
}).catch((error: any) => {
|
|
1583
|
-
|
|
1584
|
-
throw JSON.parse(error.response.data.message);
|
|
1585
|
-
} else {
|
|
1586
|
-
throw [];
|
|
1587
|
-
}
|
|
2430
|
+
throw JSON.parse(error.response.data.message);
|
|
1588
2431
|
});
|
|
1589
2432
|
}
|
|
1590
2433
|
|
|
1591
|
-
public
|
|
1592
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}/item/{itemName}/
|
|
2434
|
+
public getSimpleItemWithSignatureByUserId(request: Request.GetSimpleItemWithSignatureByUserIdRequest): Promise<Result.GetSimpleItemWithSignatureByUserIdResult> {
|
|
2435
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/simple/inventory/{inventoryName}/item/{itemName}/signature')
|
|
1593
2436
|
.replace('{service}', 'inventory')
|
|
1594
2437
|
.replace('{region}', this.session.region)
|
|
1595
2438
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1596
2439
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1597
2440
|
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1598
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1599
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1600
|
-
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'))
|
|
1601
|
-
.replace('{verifyType}', String(request.getVerifyType() ?? 'null') === "" ? "null" : String(request.getVerifyType() ?? 'null'));
|
|
2441
|
+
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'));
|
|
1602
2442
|
|
|
1603
2443
|
const headers = this.createAuthorizedHeaders();
|
|
1604
2444
|
if (request.getRequestId()) {
|
|
1605
2445
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1606
2446
|
}
|
|
1607
|
-
|
|
1608
|
-
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1609
|
-
}
|
|
1610
|
-
const body: {[key: string]: any} = {
|
|
2447
|
+
const params: {[key: string]: any} = {
|
|
1611
2448
|
'contextStack': request.getContextStack() ?? null,
|
|
2449
|
+
'keyId': String(request.getKeyId() ?? null),
|
|
1612
2450
|
};
|
|
1613
|
-
return axios.
|
|
2451
|
+
return axios.get(
|
|
1614
2452
|
url,
|
|
1615
|
-
|
|
1616
|
-
|
|
2453
|
+
{
|
|
2454
|
+
params,
|
|
1617
2455
|
headers,
|
|
1618
2456
|
},
|
|
1619
2457
|
).then((response: any) => {
|
|
1620
|
-
return Result.
|
|
2458
|
+
return Result.GetSimpleItemWithSignatureByUserIdResult.fromDict(response.data);
|
|
1621
2459
|
}).catch((error: any) => {
|
|
1622
|
-
|
|
1623
|
-
throw JSON.parse(error.response.data.message);
|
|
1624
|
-
} else {
|
|
1625
|
-
throw [];
|
|
1626
|
-
}
|
|
2460
|
+
throw JSON.parse(error.response.data.message);
|
|
1627
2461
|
});
|
|
1628
2462
|
}
|
|
1629
2463
|
|
|
1630
|
-
public
|
|
1631
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
2464
|
+
public acquireSimpleItemsByUserId(request: Request.AcquireSimpleItemsByUserIdRequest): Promise<Result.AcquireSimpleItemsByUserIdResult> {
|
|
2465
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/simple/inventory/{inventoryName}/acquire')
|
|
1632
2466
|
.replace('{service}', 'inventory')
|
|
1633
2467
|
.replace('{region}', this.session.region)
|
|
1634
2468
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1635
2469
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1636
|
-
.replace('{
|
|
1637
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
2470
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1638
2471
|
|
|
1639
2472
|
const headers = this.createAuthorizedHeaders();
|
|
1640
2473
|
if (request.getRequestId()) {
|
|
1641
2474
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1642
2475
|
}
|
|
1643
|
-
if (request.getAccessToken()) {
|
|
1644
|
-
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1645
|
-
}
|
|
1646
2476
|
if (request.getDuplicationAvoider()) {
|
|
1647
2477
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1648
2478
|
}
|
|
1649
2479
|
const body: {[key: string]: any} = {
|
|
1650
2480
|
'contextStack': request.getContextStack() ?? null,
|
|
1651
|
-
'
|
|
2481
|
+
'acquireCounts': request.getAcquireCounts()?.map((item) => item.toDict()) ?? null,
|
|
1652
2482
|
};
|
|
1653
2483
|
return axios.post(
|
|
1654
2484
|
url,
|
|
@@ -1657,7 +2487,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1657
2487
|
headers,
|
|
1658
2488
|
},
|
|
1659
2489
|
).then((response: any) => {
|
|
1660
|
-
return Result.
|
|
2490
|
+
return Result.AcquireSimpleItemsByUserIdResult.fromDict(response.data);
|
|
1661
2491
|
}).catch((error: any) => {
|
|
1662
2492
|
if (error.response) {
|
|
1663
2493
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1667,26 +2497,26 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1667
2497
|
});
|
|
1668
2498
|
}
|
|
1669
2499
|
|
|
1670
|
-
public
|
|
1671
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
2500
|
+
public consumeSimpleItems(request: Request.ConsumeSimpleItemsRequest): Promise<Result.ConsumeSimpleItemsResult> {
|
|
2501
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/me/simple/inventory/{inventoryName}/consume')
|
|
1672
2502
|
.replace('{service}', 'inventory')
|
|
1673
2503
|
.replace('{region}', this.session.region)
|
|
1674
2504
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1675
|
-
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1676
|
-
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1677
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1678
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'));
|
|
2505
|
+
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'));
|
|
1679
2506
|
|
|
1680
2507
|
const headers = this.createAuthorizedHeaders();
|
|
1681
2508
|
if (request.getRequestId()) {
|
|
1682
2509
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1683
2510
|
}
|
|
2511
|
+
if (request.getAccessToken()) {
|
|
2512
|
+
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
2513
|
+
}
|
|
1684
2514
|
if (request.getDuplicationAvoider()) {
|
|
1685
2515
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1686
2516
|
}
|
|
1687
2517
|
const body: {[key: string]: any} = {
|
|
1688
2518
|
'contextStack': request.getContextStack() ?? null,
|
|
1689
|
-
'
|
|
2519
|
+
'consumeCounts': request.getConsumeCounts()?.map((item) => item.toDict()) ?? null,
|
|
1690
2520
|
};
|
|
1691
2521
|
return axios.post(
|
|
1692
2522
|
url,
|
|
@@ -1695,7 +2525,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1695
2525
|
headers,
|
|
1696
2526
|
},
|
|
1697
2527
|
).then((response: any) => {
|
|
1698
|
-
return Result.
|
|
2528
|
+
return Result.ConsumeSimpleItemsResult.fromDict(response.data);
|
|
1699
2529
|
}).catch((error: any) => {
|
|
1700
2530
|
if (error.response) {
|
|
1701
2531
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1705,52 +2535,49 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1705
2535
|
});
|
|
1706
2536
|
}
|
|
1707
2537
|
|
|
1708
|
-
public
|
|
1709
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/
|
|
2538
|
+
public consumeSimpleItemsByUserId(request: Request.ConsumeSimpleItemsByUserIdRequest): Promise<Result.ConsumeSimpleItemsByUserIdResult> {
|
|
2539
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/simple/inventory/{inventoryName}/consume')
|
|
1710
2540
|
.replace('{service}', 'inventory')
|
|
1711
2541
|
.replace('{region}', this.session.region)
|
|
1712
2542
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1713
2543
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1714
|
-
.replace('{
|
|
1715
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1716
|
-
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
2544
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1717
2545
|
|
|
1718
2546
|
const headers = this.createAuthorizedHeaders();
|
|
1719
2547
|
if (request.getRequestId()) {
|
|
1720
2548
|
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1721
2549
|
}
|
|
1722
|
-
if (request.getAccessToken()) {
|
|
1723
|
-
headers['X-GS2-ACCESS-TOKEN'] = request.getAccessToken() ?? null;
|
|
1724
|
-
}
|
|
1725
2550
|
if (request.getDuplicationAvoider()) {
|
|
1726
2551
|
headers['X-GS2-DUPLICATION-AVOIDER'] = request.getDuplicationAvoider() ?? null;
|
|
1727
2552
|
}
|
|
1728
|
-
const
|
|
2553
|
+
const body: {[key: string]: any} = {
|
|
1729
2554
|
'contextStack': request.getContextStack() ?? null,
|
|
2555
|
+
'consumeCounts': request.getConsumeCounts()?.map((item) => item.toDict()) ?? null,
|
|
1730
2556
|
};
|
|
1731
|
-
return axios.
|
|
2557
|
+
return axios.post(
|
|
1732
2558
|
url,
|
|
1733
|
-
|
|
1734
|
-
|
|
2559
|
+
body,
|
|
2560
|
+
{
|
|
1735
2561
|
headers,
|
|
1736
2562
|
},
|
|
1737
2563
|
).then((response: any) => {
|
|
1738
|
-
return Result.
|
|
2564
|
+
return Result.ConsumeSimpleItemsByUserIdResult.fromDict(response.data);
|
|
1739
2565
|
}).catch((error: any) => {
|
|
1740
|
-
|
|
2566
|
+
if (error.response) {
|
|
2567
|
+
throw JSON.parse(error.response.data.message);
|
|
2568
|
+
} else {
|
|
2569
|
+
throw [];
|
|
2570
|
+
}
|
|
1741
2571
|
});
|
|
1742
2572
|
}
|
|
1743
2573
|
|
|
1744
|
-
public
|
|
1745
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/inventory/{inventoryName}
|
|
2574
|
+
public deleteSimpleItemsByUserId(request: Request.DeleteSimpleItemsByUserIdRequest): Promise<Result.DeleteSimpleItemsByUserIdResult> {
|
|
2575
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/{namespaceName}/user/{userId}/simple/inventory/{inventoryName}')
|
|
1746
2576
|
.replace('{service}', 'inventory')
|
|
1747
2577
|
.replace('{region}', this.session.region)
|
|
1748
2578
|
.replace('{namespaceName}', String(request.getNamespaceName() ?? 'null') === "" ? "null" : String(request.getNamespaceName() ?? 'null'))
|
|
1749
2579
|
.replace('{inventoryName}', String(request.getInventoryName() ?? 'null') === "" ? "null" : String(request.getInventoryName() ?? 'null'))
|
|
1750
|
-
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'))
|
|
1751
|
-
.replace('{itemName}', String(request.getItemName() ?? 'null') === "" ? "null" : String(request.getItemName() ?? 'null'))
|
|
1752
|
-
.replace('{itemSetName}', String(request.getItemSetName() ?? 'null') === "" ? "null" : String(request.getItemSetName() ?? 'null'))
|
|
1753
|
-
.replace('{referenceOf}', String(request.getReferenceOf() ?? 'null') === "" ? "null" : String(request.getReferenceOf() ?? 'null'));
|
|
2580
|
+
.replace('{userId}', String(request.getUserId() ?? 'null') === "" ? "null" : String(request.getUserId() ?? 'null'));
|
|
1754
2581
|
|
|
1755
2582
|
const headers = this.createAuthorizedHeaders();
|
|
1756
2583
|
if (request.getRequestId()) {
|
|
@@ -1769,45 +2596,14 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1769
2596
|
headers,
|
|
1770
2597
|
},
|
|
1771
2598
|
).then((response: any) => {
|
|
1772
|
-
return Result.
|
|
2599
|
+
return Result.DeleteSimpleItemsByUserIdResult.fromDict(response.data);
|
|
1773
2600
|
}).catch((error: any) => {
|
|
1774
2601
|
throw JSON.parse(error.response.data.message);
|
|
1775
2602
|
});
|
|
1776
2603
|
}
|
|
1777
2604
|
|
|
1778
|
-
public
|
|
1779
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/
|
|
1780
|
-
.replace('{service}', 'inventory')
|
|
1781
|
-
.replace('{region}', this.session.region);
|
|
1782
|
-
|
|
1783
|
-
const headers = this.createAuthorizedHeaders();
|
|
1784
|
-
if (request.getRequestId()) {
|
|
1785
|
-
headers['X-GS2-REQUEST-ID'] = request.getRequestId();
|
|
1786
|
-
}
|
|
1787
|
-
const body: {[key: string]: any} = {
|
|
1788
|
-
'contextStack': request.getContextStack() ?? null,
|
|
1789
|
-
'stampSheet': request.getStampSheet() ?? null,
|
|
1790
|
-
'keyId': request.getKeyId() ?? null,
|
|
1791
|
-
};
|
|
1792
|
-
return axios.post(
|
|
1793
|
-
url,
|
|
1794
|
-
body,
|
|
1795
|
-
{
|
|
1796
|
-
headers,
|
|
1797
|
-
},
|
|
1798
|
-
).then((response: any) => {
|
|
1799
|
-
return Result.AddReferenceOfItemSetByStampSheetResult.fromDict(response.data);
|
|
1800
|
-
}).catch((error: any) => {
|
|
1801
|
-
if (error.response) {
|
|
1802
|
-
throw JSON.parse(error.response.data.message);
|
|
1803
|
-
} else {
|
|
1804
|
-
throw [];
|
|
1805
|
-
}
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
public deleteReferenceOfItemSetByStampSheet(request: Request.DeleteReferenceOfItemSetByStampSheetRequest): Promise<Result.DeleteReferenceOfItemSetByStampSheetResult> {
|
|
1810
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/reference/delete')
|
|
2605
|
+
public acquireSimpleItemsByStampSheet(request: Request.AcquireSimpleItemsByStampSheetRequest): Promise<Result.AcquireSimpleItemsByStampSheetResult> {
|
|
2606
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/simple/item/acquire')
|
|
1811
2607
|
.replace('{service}', 'inventory')
|
|
1812
2608
|
.replace('{region}', this.session.region);
|
|
1813
2609
|
|
|
@@ -1827,7 +2623,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1827
2623
|
headers,
|
|
1828
2624
|
},
|
|
1829
2625
|
).then((response: any) => {
|
|
1830
|
-
return Result.
|
|
2626
|
+
return Result.AcquireSimpleItemsByStampSheetResult.fromDict(response.data);
|
|
1831
2627
|
}).catch((error: any) => {
|
|
1832
2628
|
if (error.response) {
|
|
1833
2629
|
throw JSON.parse(error.response.data.message);
|
|
@@ -1837,8 +2633,8 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1837
2633
|
});
|
|
1838
2634
|
}
|
|
1839
2635
|
|
|
1840
|
-
public
|
|
1841
|
-
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/item/
|
|
2636
|
+
public consumeSimpleItemsByStampTask(request: Request.ConsumeSimpleItemsByStampTaskRequest): Promise<Result.ConsumeSimpleItemsByStampTaskResult> {
|
|
2637
|
+
const url = (Gs2Constant.ENDPOINT_HOST + '/stamp/simple/item/consume')
|
|
1842
2638
|
.replace('{service}', 'inventory')
|
|
1843
2639
|
.replace('{region}', this.session.region);
|
|
1844
2640
|
|
|
@@ -1858,7 +2654,7 @@ export default class Gs2InventoryRestClient extends AbstractGs2RestClient {
|
|
|
1858
2654
|
headers,
|
|
1859
2655
|
},
|
|
1860
2656
|
).then((response: any) => {
|
|
1861
|
-
return Result.
|
|
2657
|
+
return Result.ConsumeSimpleItemsByStampTaskResult.fromDict(response.data);
|
|
1862
2658
|
}).catch((error: any) => {
|
|
1863
2659
|
if (error.response) {
|
|
1864
2660
|
throw JSON.parse(error.response.data.message);
|