gs2-cdk 1.0.101 → 1.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/account/model/Namespace.d.ts +1 -0
  2. package/account/model/Namespace.js +9 -4
  3. package/account/model/Namespace.js.map +1 -1
  4. package/account/model/Namespace.ts +6 -0
  5. package/account/model/options/NamespaceOptions.d.ts +1 -0
  6. package/account/model/options/NamespaceOptions.ts +1 -0
  7. package/money2/model/AppleAppStoreSetting.d.ts +3 -0
  8. package/money2/model/AppleAppStoreSetting.js +16 -1
  9. package/money2/model/AppleAppStoreSetting.js.map +1 -1
  10. package/money2/model/AppleAppStoreSetting.ts +15 -0
  11. package/money2/model/AppleAppStoreSubscriptionContent.d.ts +8 -0
  12. package/money2/model/AppleAppStoreSubscriptionContent.js +18 -0
  13. package/money2/model/AppleAppStoreSubscriptionContent.js.map +1 -0
  14. package/money2/model/AppleAppStoreSubscriptionContent.ts +37 -0
  15. package/money2/model/CurrentMasterData.d.ts +3 -1
  16. package/money2/model/CurrentMasterData.js +5 -1
  17. package/money2/model/CurrentMasterData.js.map +1 -1
  18. package/money2/model/CurrentMasterData.ts +8 -0
  19. package/money2/model/GooglePlayRealtimeNotificationMessage.d.ts +10 -0
  20. package/money2/model/GooglePlayRealtimeNotificationMessage.js +24 -0
  21. package/money2/model/GooglePlayRealtimeNotificationMessage.js.map +1 -0
  22. package/money2/model/GooglePlayRealtimeNotificationMessage.ts +50 -0
  23. package/money2/model/GooglePlaySetting.d.ts +1 -0
  24. package/money2/model/GooglePlaySetting.js +6 -1
  25. package/money2/model/GooglePlaySetting.js.map +1 -1
  26. package/money2/model/GooglePlaySetting.ts +5 -0
  27. package/money2/model/GooglePlaySubscriptionContent.d.ts +8 -0
  28. package/money2/model/GooglePlaySubscriptionContent.js +18 -0
  29. package/money2/model/GooglePlaySubscriptionContent.js.map +1 -0
  30. package/money2/model/GooglePlaySubscriptionContent.ts +37 -0
  31. package/money2/model/Namespace.d.ts +7 -1
  32. package/money2/model/Namespace.js +31 -6
  33. package/money2/model/Namespace.js.map +1 -1
  34. package/money2/model/Namespace.ts +31 -0
  35. package/money2/model/RefundEvent.d.ts +12 -0
  36. package/money2/model/RefundEvent.js +32 -0
  37. package/money2/model/RefundEvent.js.map +1 -0
  38. package/money2/model/RefundEvent.ts +59 -0
  39. package/money2/model/StoreSubscriptionContentModel.d.ts +14 -0
  40. package/money2/model/StoreSubscriptionContentModel.js +45 -0
  41. package/money2/model/StoreSubscriptionContentModel.js.map +1 -0
  42. package/money2/model/StoreSubscriptionContentModel.ts +75 -0
  43. package/money2/model/SubscribeTransaction.d.ts +18 -0
  44. package/money2/model/SubscribeTransaction.js +50 -0
  45. package/money2/model/SubscribeTransaction.js.map +1 -0
  46. package/money2/model/SubscribeTransaction.ts +81 -0
  47. package/money2/model/enums/RefundEventPlatform.d.ts +6 -0
  48. package/money2/model/enums/RefundEventPlatform.js +24 -0
  49. package/money2/model/enums/RefundEventPlatform.js.map +1 -0
  50. package/money2/model/enums/RefundEventPlatform.ts +24 -0
  51. package/money2/model/enums/SubscribeTransactionStatusDetail.d.ts +12 -0
  52. package/money2/model/enums/SubscribeTransactionStatusDetail.js +30 -0
  53. package/money2/model/enums/SubscribeTransactionStatusDetail.js.map +1 -0
  54. package/money2/model/enums/SubscribeTransactionStatusDetail.ts +30 -0
  55. package/money2/model/enums/SubscribeTransactionStore.d.ts +6 -0
  56. package/money2/model/enums/SubscribeTransactionStore.js +24 -0
  57. package/money2/model/enums/SubscribeTransactionStore.js.map +1 -0
  58. package/money2/model/enums/SubscribeTransactionStore.ts +24 -0
  59. package/money2/model/index.d.ts +16 -1
  60. package/money2/model/index.js +19 -1
  61. package/money2/model/index.js.map +1 -1
  62. package/money2/model/index.ts +30 -0
  63. package/money2/model/options/AppleAppStoreSettingOptions.d.ts +3 -0
  64. package/money2/model/options/AppleAppStoreSettingOptions.ts +3 -0
  65. package/money2/model/options/AppleAppStoreSubscriptionContentOptions.d.ts +3 -0
  66. package/money2/model/options/AppleAppStoreSubscriptionContentOptions.js +18 -0
  67. package/money2/model/options/AppleAppStoreSubscriptionContentOptions.js.map +1 -0
  68. package/money2/model/options/AppleAppStoreSubscriptionContentOptions.ts +20 -0
  69. package/money2/model/options/GooglePlayRealtimeNotificationMessageOptions.d.ts +2 -0
  70. package/money2/model/options/GooglePlayRealtimeNotificationMessageOptions.js +18 -0
  71. package/money2/model/options/GooglePlayRealtimeNotificationMessageOptions.js.map +1 -0
  72. package/money2/model/options/GooglePlayRealtimeNotificationMessageOptions.ts +19 -0
  73. package/money2/model/options/GooglePlaySettingOptions.d.ts +1 -0
  74. package/money2/model/options/GooglePlaySettingOptions.ts +1 -0
  75. package/money2/model/options/GooglePlaySubscriptionContentOptions.d.ts +3 -0
  76. package/money2/model/options/GooglePlaySubscriptionContentOptions.js +18 -0
  77. package/money2/model/options/GooglePlaySubscriptionContentOptions.js.map +1 -0
  78. package/money2/model/options/GooglePlaySubscriptionContentOptions.ts +20 -0
  79. package/money2/model/options/NamespaceOptions.d.ts +6 -0
  80. package/money2/model/options/NamespaceOptions.ts +6 -0
  81. package/money2/model/options/RefundEventOptions.d.ts +6 -0
  82. package/money2/model/options/RefundEventOptions.js +3 -0
  83. package/money2/model/options/RefundEventOptions.js.map +1 -0
  84. package/money2/model/options/RefundEventOptions.ts +24 -0
  85. package/money2/model/options/StoreSubscriptionContentModelOptions.d.ts +7 -0
  86. package/money2/model/options/StoreSubscriptionContentModelOptions.js +3 -0
  87. package/money2/model/options/StoreSubscriptionContentModelOptions.js.map +1 -0
  88. package/money2/model/options/StoreSubscriptionContentModelOptions.ts +24 -0
  89. package/money2/model/options/SubscribeTransactionOptions.d.ts +6 -0
  90. package/money2/model/options/SubscribeTransactionOptions.js +3 -0
  91. package/money2/model/options/SubscribeTransactionOptions.js.map +1 -0
  92. package/money2/model/options/SubscribeTransactionOptions.ts +25 -0
  93. package/money2/ref/StoreSubscriptionContentModelRef.d.ts +6 -0
  94. package/money2/ref/StoreSubscriptionContentModelRef.js +40 -0
  95. package/money2/ref/StoreSubscriptionContentModelRef.js.map +1 -0
  96. package/money2/ref/StoreSubscriptionContentModelRef.ts +54 -0
  97. package/money2/ref/SubscribeTransactionRef.d.ts +7 -0
  98. package/money2/ref/SubscribeTransactionRef.js +40 -0
  99. package/money2/ref/SubscribeTransactionRef.js.map +1 -0
  100. package/money2/ref/SubscribeTransactionRef.ts +56 -0
  101. package/money2/ref/index.d.ts +3 -1
  102. package/money2/ref/index.js +5 -1
  103. package/money2/ref/index.js.map +1 -1
  104. package/money2/ref/index.ts +4 -0
  105. package/package.json +1 -1
@@ -22,11 +22,16 @@ const NamespaceRef_1 = tslib_1.__importDefault(require("../ref/NamespaceRef"));
22
22
  const CurrentMasterData_1 = tslib_1.__importDefault(require("./CurrentMasterData"));
23
23
  class Namespace extends model_1.CdkResource {
24
24
  constructor(stack, name, currencyUsagePriority, sharedFreeCurrency, platformSetting, options = null) {
25
- var _a, _b, _c, _d;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
26
  super("Money2_Namespace_" + name);
27
27
  this.description = null;
28
28
  this.depositBalanceScript = null;
29
29
  this.withdrawBalanceScript = null;
30
+ this.subscribeScript = null;
31
+ this.renewScript = null;
32
+ this.unsubscribeScript = null;
33
+ this.takeOverScript = null;
34
+ this.changeSubscriptionStatusNotification = null;
30
35
  this.logSetting = null;
31
36
  this.stack = stack;
32
37
  this.name = name;
@@ -36,7 +41,12 @@ class Namespace extends model_1.CdkResource {
36
41
  this.description = (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : null;
37
42
  this.depositBalanceScript = (_b = options === null || options === void 0 ? void 0 : options.depositBalanceScript) !== null && _b !== void 0 ? _b : null;
38
43
  this.withdrawBalanceScript = (_c = options === null || options === void 0 ? void 0 : options.withdrawBalanceScript) !== null && _c !== void 0 ? _c : null;
39
- this.logSetting = (_d = options === null || options === void 0 ? void 0 : options.logSetting) !== null && _d !== void 0 ? _d : null;
44
+ this.subscribeScript = (_d = options === null || options === void 0 ? void 0 : options.subscribeScript) !== null && _d !== void 0 ? _d : null;
45
+ this.renewScript = (_e = options === null || options === void 0 ? void 0 : options.renewScript) !== null && _e !== void 0 ? _e : null;
46
+ this.unsubscribeScript = (_f = options === null || options === void 0 ? void 0 : options.unsubscribeScript) !== null && _f !== void 0 ? _f : null;
47
+ this.takeOverScript = (_g = options === null || options === void 0 ? void 0 : options.takeOverScript) !== null && _g !== void 0 ? _g : null;
48
+ this.changeSubscriptionStatusNotification = (_h = options === null || options === void 0 ? void 0 : options.changeSubscriptionStatusNotification) !== null && _h !== void 0 ? _h : null;
49
+ this.logSetting = (_j = options === null || options === void 0 ? void 0 : options.logSetting) !== null && _j !== void 0 ? _j : null;
40
50
  stack.addResource(this);
41
51
  }
42
52
  alternateKeys() {
@@ -46,7 +56,7 @@ class Namespace extends model_1.CdkResource {
46
56
  return "GS2::Money2::Namespace";
47
57
  }
48
58
  properties() {
49
- var _a, _b, _c, _d;
59
+ var _a, _b, _c, _d, _e, _f;
50
60
  let properties = {};
51
61
  if (this.name != null) {
52
62
  properties["Name"] = this.name;
@@ -69,8 +79,23 @@ class Namespace extends model_1.CdkResource {
69
79
  if (this.withdrawBalanceScript != null) {
70
80
  properties["WithdrawBalanceScript"] = (_c = this.withdrawBalanceScript) === null || _c === void 0 ? void 0 : _c.properties();
71
81
  }
82
+ if (this.subscribeScript != null) {
83
+ properties["SubscribeScript"] = this.subscribeScript;
84
+ }
85
+ if (this.renewScript != null) {
86
+ properties["RenewScript"] = this.renewScript;
87
+ }
88
+ if (this.unsubscribeScript != null) {
89
+ properties["UnsubscribeScript"] = this.unsubscribeScript;
90
+ }
91
+ if (this.takeOverScript != null) {
92
+ properties["TakeOverScript"] = (_d = this.takeOverScript) === null || _d === void 0 ? void 0 : _d.properties();
93
+ }
94
+ if (this.changeSubscriptionStatusNotification != null) {
95
+ properties["ChangeSubscriptionStatusNotification"] = (_e = this.changeSubscriptionStatusNotification) === null || _e === void 0 ? void 0 : _e.properties();
96
+ }
72
97
  if (this.logSetting != null) {
73
- properties["LogSetting"] = (_d = this.logSetting) === null || _d === void 0 ? void 0 : _d.properties();
98
+ properties["LogSetting"] = (_f = this.logSetting) === null || _f === void 0 ? void 0 : _f.properties();
74
99
  }
75
100
  return properties;
76
101
  }
@@ -80,8 +105,8 @@ class Namespace extends model_1.CdkResource {
80
105
  getAttrNamespaceId() {
81
106
  return new func_1.GetAttr(this, "Item.NamespaceId", null);
82
107
  }
83
- masterData(storeContentModels) {
84
- new CurrentMasterData_1.default(this.stack, this.name, storeContentModels).addDependsOn(this);
108
+ masterData(storeContentModels, storeSubscriptionContentModels) {
109
+ new CurrentMasterData_1.default(this.stack, this.name, storeContentModels, storeSubscriptionContentModels).addDependsOn(this);
85
110
  return this;
86
111
  }
87
112
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Namespace.js","sourceRoot":"","sources":["Namespace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAoD;AACpD,0CAAwC;AAKxC,+EAA+C;AAC/C,oFAAoD;AAMpD,MAAqB,SAAU,SAAQ,mBAAW;IAW9C,YACI,KAAY,EACZ,IAAY,EACZ,qBAAqD,EACrD,kBAA2B,EAC3B,eAAgC,EAChC,UAAiC,IAAI;;QAErC,KAAK,CACD,mBAAmB,GAAG,IAAI,CAC7B,CAAC;QAfW,gBAAW,GAAgB,IAAI,CAAC;QAChC,yBAAoB,GAAuB,IAAI,CAAC;QAChD,0BAAqB,GAAuB,IAAI,CAAC;QACjD,eAAU,GAAoB,IAAI,CAAC;QAchD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,eAAe,GAAG,e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;CACJ;AA7ID,4BA6IC"}
@@ -18,11 +18,13 @@ import {CdkResource, Stack} from "../../core/model";
18
18
  import {GetAttr} from "../../core/func";
19
19
  import PlatformSetting from "./PlatformSetting";
20
20
  import ScriptSetting from "../../core/model/ScriptSetting";
21
+ import NotificationSetting from "../../core/model/NotificationSetting";
21
22
  import LogSetting from "../../core/model/LogSetting";
22
23
 
23
24
  import NamespaceRef from "../ref/NamespaceRef";
24
25
  import CurrentMasterData from "./CurrentMasterData";
25
26
  import StoreContentModel from "./StoreContentModel";
27
+ import StoreSubscriptionContentModel from "./StoreSubscriptionContentModel";
26
28
  import { NamespaceCurrencyUsagePriority } from "./enums/NamespaceCurrencyUsagePriority";
27
29
 
28
30
  import { NamespaceOptions } from "./options/NamespaceOptions";
@@ -36,6 +38,11 @@ export default class Namespace extends CdkResource {
36
38
  private readonly description: string|null = null;
37
39
  private readonly depositBalanceScript: ScriptSetting|null = null;
38
40
  private readonly withdrawBalanceScript: ScriptSetting|null = null;
41
+ private readonly subscribeScript: string|null = null;
42
+ private readonly renewScript: string|null = null;
43
+ private readonly unsubscribeScript: string|null = null;
44
+ private readonly takeOverScript: ScriptSetting|null = null;
45
+ private readonly changeSubscriptionStatusNotification: NotificationSetting|null = null;
39
46
  private readonly logSetting: LogSetting|null = null;
40
47
 
41
48
  public constructor(
@@ -58,6 +65,11 @@ export default class Namespace extends CdkResource {
58
65
  this.description = options?.description ?? null;
59
66
  this.depositBalanceScript = options?.depositBalanceScript ?? null;
60
67
  this.withdrawBalanceScript = options?.withdrawBalanceScript ?? null;
68
+ this.subscribeScript = options?.subscribeScript ?? null;
69
+ this.renewScript = options?.renewScript ?? null;
70
+ this.unsubscribeScript = options?.unsubscribeScript ?? null;
71
+ this.takeOverScript = options?.takeOverScript ?? null;
72
+ this.changeSubscriptionStatusNotification = options?.changeSubscriptionStatusNotification ?? null;
61
73
  this.logSetting = options?.logSetting ?? null;
62
74
  stack.addResource(
63
75
  this,
@@ -103,6 +115,23 @@ export default class Namespace extends CdkResource {
103
115
  properties["WithdrawBalanceScript"] = this.withdrawBalanceScript?.properties(
104
116
  );
105
117
  }
118
+ if (this.subscribeScript != null) {
119
+ properties["SubscribeScript"] = this.subscribeScript;
120
+ }
121
+ if (this.renewScript != null) {
122
+ properties["RenewScript"] = this.renewScript;
123
+ }
124
+ if (this.unsubscribeScript != null) {
125
+ properties["UnsubscribeScript"] = this.unsubscribeScript;
126
+ }
127
+ if (this.takeOverScript != null) {
128
+ properties["TakeOverScript"] = this.takeOverScript?.properties(
129
+ );
130
+ }
131
+ if (this.changeSubscriptionStatusNotification != null) {
132
+ properties["ChangeSubscriptionStatusNotification"] = this.changeSubscriptionStatusNotification?.properties(
133
+ );
134
+ }
106
135
  if (this.logSetting != null) {
107
136
  properties["LogSetting"] = this.logSetting?.properties(
108
137
  );
@@ -129,11 +158,13 @@ export default class Namespace extends CdkResource {
129
158
 
130
159
  public masterData(
131
160
  storeContentModels: StoreContentModel[],
161
+ storeSubscriptionContentModels: StoreSubscriptionContentModel[],
132
162
  ): Namespace {
133
163
  new CurrentMasterData(
134
164
  this.stack,
135
165
  this.name,
136
166
  storeContentModels,
167
+ storeSubscriptionContentModels,
137
168
  ).addDependsOn(
138
169
  this,
139
170
  );
@@ -0,0 +1,12 @@
1
+ import { RefundEventOptions } from "./options/RefundEventOptions";
2
+ import { RefundEventPlatform } from "./enums/RefundEventPlatform";
3
+ export default class RefundEvent {
4
+ private readonly contentName;
5
+ private readonly platform;
6
+ private readonly appleAppStoreRefundEvent;
7
+ private readonly googlePlayRefundEvent;
8
+ constructor(contentName: string, platform: RefundEventPlatform, options?: RefundEventOptions | null);
9
+ properties(): {
10
+ [name: string]: any;
11
+ };
12
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class RefundEvent {
4
+ constructor(contentName, platform, options = null) {
5
+ var _a, _b;
6
+ this.appleAppStoreRefundEvent = null;
7
+ this.googlePlayRefundEvent = null;
8
+ this.contentName = contentName;
9
+ this.platform = platform;
10
+ this.appleAppStoreRefundEvent = (_a = options === null || options === void 0 ? void 0 : options.appleAppStoreRefundEvent) !== null && _a !== void 0 ? _a : null;
11
+ this.googlePlayRefundEvent = (_b = options === null || options === void 0 ? void 0 : options.googlePlayRefundEvent) !== null && _b !== void 0 ? _b : null;
12
+ }
13
+ properties() {
14
+ var _a, _b;
15
+ let properties = {};
16
+ if (this.contentName != null) {
17
+ properties["contentName"] = this.contentName;
18
+ }
19
+ if (this.platform != null) {
20
+ properties["platform"] = this.platform;
21
+ }
22
+ if (this.appleAppStoreRefundEvent != null) {
23
+ properties["appleAppStoreRefundEvent"] = (_a = this.appleAppStoreRefundEvent) === null || _a === void 0 ? void 0 : _a.properties();
24
+ }
25
+ if (this.googlePlayRefundEvent != null) {
26
+ properties["googlePlayRefundEvent"] = (_b = this.googlePlayRefundEvent) === null || _b === void 0 ? void 0 : _b.properties();
27
+ }
28
+ return properties;
29
+ }
30
+ }
31
+ exports.default = RefundEvent;
32
+ //# sourceMappingURL=RefundEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundEvent.js","sourceRoot":"","sources":["RefundEvent.ts"],"names":[],"mappings":";;AAoBA,MAAqB,WAAW;IAM5B,YACI,WAAmB,EACnB,QAA6B,EAC7B,UAAmC,IAAI;;QAN1B,6BAAwB,GAAyC,IAAI,CAAC;QACtE,0BAAqB,GAAsC,IAAI,CAAC;QAO7E,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,wBAAwB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,mCAAI,IAAI,CAAC;QAC1E,IAAI,CAAC,qBAAqB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,mCAAI,IAAI,CAAC;IACxE,CAAC;IAEM,UAAU;;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE;YACvB,UAAU,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;SAC1C;QACD,IAAI,IAAI,CAAC,wBAAwB,IAAI,IAAI,EAAE;YACvC,UAAU,CAAC,0BAA0B,CAAC,GAAG,MAAA,IAAI,CAAC,wBAAwB,0CAAE,UAAU,EACjF,CAAC;SACL;QACD,IAAI,IAAI,CAAC,qBAAqB,IAAI,IAAI,EAAE;YACpC,UAAU,CAAC,uBAAuB,CAAC,GAAG,MAAA,IAAI,CAAC,qBAAqB,0CAAE,UAAU,EAC3E,CAAC;SACL;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAtCD,8BAsCC"}
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
3
+ * Reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License").
6
+ * You may not use this file except in compliance with the License.
7
+ * A copy of the License is located at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * or in the "license" file accompanying this file. This file is distributed
12
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ * express or implied. See the License for the specific language governing
14
+ * permissions and limitations under the License.
15
+ */
16
+ import AppleAppStoreVerifyReceiptEvent from "./AppleAppStoreVerifyReceiptEvent";
17
+ import GooglePlayVerifyReceiptEvent from "./GooglePlayVerifyReceiptEvent";
18
+ import { RefundEventOptions } from "./options/RefundEventOptions";
19
+ import { RefundEventPlatform } from "./enums/RefundEventPlatform";
20
+
21
+ export default class RefundEvent {
22
+ private readonly contentName: string;
23
+ private readonly platform: RefundEventPlatform;
24
+ private readonly appleAppStoreRefundEvent: AppleAppStoreVerifyReceiptEvent|null = null;
25
+ private readonly googlePlayRefundEvent: GooglePlayVerifyReceiptEvent|null = null;
26
+
27
+ public constructor(
28
+ contentName: string,
29
+ platform: RefundEventPlatform,
30
+ options: RefundEventOptions|null = null,
31
+ ) {
32
+ this.contentName = contentName;
33
+ this.platform = platform;
34
+ this.appleAppStoreRefundEvent = options?.appleAppStoreRefundEvent ?? null;
35
+ this.googlePlayRefundEvent = options?.googlePlayRefundEvent ?? null;
36
+ }
37
+
38
+ public properties(
39
+ ): {[name: string]: any} {
40
+ let properties: {[name: string]: any} = {};
41
+
42
+ if (this.contentName != null) {
43
+ properties["contentName"] = this.contentName;
44
+ }
45
+ if (this.platform != null) {
46
+ properties["platform"] = this.platform;
47
+ }
48
+ if (this.appleAppStoreRefundEvent != null) {
49
+ properties["appleAppStoreRefundEvent"] = this.appleAppStoreRefundEvent?.properties(
50
+ );
51
+ }
52
+ if (this.googlePlayRefundEvent != null) {
53
+ properties["googlePlayRefundEvent"] = this.googlePlayRefundEvent?.properties(
54
+ );
55
+ }
56
+
57
+ return properties;
58
+ }
59
+ }
@@ -0,0 +1,14 @@
1
+ import { StoreSubscriptionContentModelOptions } from "./options/StoreSubscriptionContentModelOptions";
2
+ export default class StoreSubscriptionContentModel {
3
+ private readonly name;
4
+ private readonly scheduleNamespaceId;
5
+ private readonly triggerName;
6
+ private readonly reallocateSpanDays;
7
+ private readonly metadata;
8
+ private readonly appleAppStore;
9
+ private readonly googlePlay;
10
+ constructor(name: string, scheduleNamespaceId: string, triggerName: string, reallocateSpanDays: number, options?: StoreSubscriptionContentModelOptions | null);
11
+ properties(): {
12
+ [name: string]: any;
13
+ };
14
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class StoreSubscriptionContentModel {
4
+ constructor(name, scheduleNamespaceId, triggerName, reallocateSpanDays, options = null) {
5
+ var _a, _b, _c;
6
+ this.metadata = null;
7
+ this.appleAppStore = null;
8
+ this.googlePlay = null;
9
+ this.name = name;
10
+ this.scheduleNamespaceId = scheduleNamespaceId;
11
+ this.triggerName = triggerName;
12
+ this.reallocateSpanDays = reallocateSpanDays;
13
+ this.metadata = (_a = options === null || options === void 0 ? void 0 : options.metadata) !== null && _a !== void 0 ? _a : null;
14
+ this.appleAppStore = (_b = options === null || options === void 0 ? void 0 : options.appleAppStore) !== null && _b !== void 0 ? _b : null;
15
+ this.googlePlay = (_c = options === null || options === void 0 ? void 0 : options.googlePlay) !== null && _c !== void 0 ? _c : null;
16
+ }
17
+ properties() {
18
+ var _a, _b;
19
+ let properties = {};
20
+ if (this.name != null) {
21
+ properties["name"] = this.name;
22
+ }
23
+ if (this.metadata != null) {
24
+ properties["metadata"] = this.metadata;
25
+ }
26
+ if (this.scheduleNamespaceId != null) {
27
+ properties["scheduleNamespaceId"] = this.scheduleNamespaceId;
28
+ }
29
+ if (this.triggerName != null) {
30
+ properties["triggerName"] = this.triggerName;
31
+ }
32
+ if (this.reallocateSpanDays != null) {
33
+ properties["reallocateSpanDays"] = this.reallocateSpanDays;
34
+ }
35
+ if (this.appleAppStore != null) {
36
+ properties["appleAppStore"] = (_a = this.appleAppStore) === null || _a === void 0 ? void 0 : _a.properties();
37
+ }
38
+ if (this.googlePlay != null) {
39
+ properties["googlePlay"] = (_b = this.googlePlay) === null || _b === void 0 ? void 0 : _b.properties();
40
+ }
41
+ return properties;
42
+ }
43
+ }
44
+ exports.default = StoreSubscriptionContentModel;
45
+ //# sourceMappingURL=StoreSubscriptionContentModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreSubscriptionContentModel.js","sourceRoot":"","sources":["StoreSubscriptionContentModel.ts"],"names":[],"mappings":";;AAmBA,MAAqB,6BAA6B;IAS9C,YACI,IAAY,EACZ,mBAA2B,EAC3B,WAAmB,EACnB,kBAA0B,EAC1B,UAAqD,IAAI;;QAT5C,aAAQ,GAAgB,IAAI,CAAC;QAC7B,kB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AE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,MAAA,IAAI,CAAC,aAAa,0CAAE,UAAU,EAC3D,CAAC;SACL;QACD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,YAAY,CAAC,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,UAAU,EACrD,CAAC;SACL;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAvDD,gDAuDC"}
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
3
+ * Reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License").
6
+ * You may not use this file except in compliance with the License.
7
+ * A copy of the License is located at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * or in the "license" file accompanying this file. This file is distributed
12
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ * express or implied. See the License for the specific language governing
14
+ * permissions and limitations under the License.
15
+ */
16
+ import AppleAppStoreSubscriptionContent from "./AppleAppStoreSubscriptionContent";
17
+ import GooglePlaySubscriptionContent from "./GooglePlaySubscriptionContent";
18
+ import { StoreSubscriptionContentModelOptions } from "./options/StoreSubscriptionContentModelOptions";
19
+
20
+ export default class StoreSubscriptionContentModel {
21
+ private readonly name: string;
22
+ private readonly scheduleNamespaceId: string;
23
+ private readonly triggerName: string;
24
+ private readonly reallocateSpanDays: number;
25
+ private readonly metadata: string|null = null;
26
+ private readonly appleAppStore: AppleAppStoreSubscriptionContent|null = null;
27
+ private readonly googlePlay: GooglePlaySubscriptionContent|null = null;
28
+
29
+ public constructor(
30
+ name: string,
31
+ scheduleNamespaceId: string,
32
+ triggerName: string,
33
+ reallocateSpanDays: number,
34
+ options: StoreSubscriptionContentModelOptions|null = null,
35
+ ) {
36
+ this.name = name;
37
+ this.scheduleNamespaceId = scheduleNamespaceId;
38
+ this.triggerName = triggerName;
39
+ this.reallocateSpanDays = reallocateSpanDays;
40
+ this.metadata = options?.metadata ?? null;
41
+ this.appleAppStore = options?.appleAppStore ?? null;
42
+ this.googlePlay = options?.googlePlay ?? null;
43
+ }
44
+
45
+ public properties(
46
+ ): {[name: string]: any} {
47
+ let properties: {[name: string]: any} = {};
48
+
49
+ if (this.name != null) {
50
+ properties["name"] = this.name;
51
+ }
52
+ if (this.metadata != null) {
53
+ properties["metadata"] = this.metadata;
54
+ }
55
+ if (this.scheduleNamespaceId != null) {
56
+ properties["scheduleNamespaceId"] = this.scheduleNamespaceId;
57
+ }
58
+ if (this.triggerName != null) {
59
+ properties["triggerName"] = this.triggerName;
60
+ }
61
+ if (this.reallocateSpanDays != null) {
62
+ properties["reallocateSpanDays"] = this.reallocateSpanDays;
63
+ }
64
+ if (this.appleAppStore != null) {
65
+ properties["appleAppStore"] = this.appleAppStore?.properties(
66
+ );
67
+ }
68
+ if (this.googlePlay != null) {
69
+ properties["googlePlay"] = this.googlePlay?.properties(
70
+ );
71
+ }
72
+
73
+ return properties;
74
+ }
75
+ }
@@ -0,0 +1,18 @@
1
+ import { SubscribeTransactionOptions } from "./options/SubscribeTransactionOptions";
2
+ import { SubscribeTransactionStore } from "./enums/SubscribeTransactionStore";
3
+ import { SubscribeTransactionStatusDetail } from "./enums/SubscribeTransactionStatusDetail";
4
+ export default class SubscribeTransaction {
5
+ private readonly contentName;
6
+ private readonly transactionId;
7
+ private readonly store;
8
+ private readonly statusDetail;
9
+ private readonly expiresAt;
10
+ private readonly userId;
11
+ private readonly lastAllocatedAt;
12
+ private readonly lastTakeOverAt;
13
+ private readonly revision;
14
+ constructor(contentName: string, transactionId: string, store: SubscribeTransactionStore, statusDetail: SubscribeTransactionStatusDetail, expiresAt: number, options?: SubscribeTransactionOptions | null);
15
+ properties(): {
16
+ [name: string]: any;
17
+ };
18
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class SubscribeTransaction {
4
+ constructor(contentName, transactionId, store, statusDetail, expiresAt, options = null) {
5
+ var _a, _b, _c, _d;
6
+ this.userId = null;
7
+ this.lastAllocatedAt = null;
8
+ this.lastTakeOverAt = null;
9
+ this.revision = null;
10
+ this.contentName = contentName;
11
+ this.transactionId = transactionId;
12
+ this.store = store;
13
+ this.statusDetail = statusDetail;
14
+ this.expiresAt = expiresAt;
15
+ this.userId = (_a = options === null || options === void 0 ? void 0 : options.userId) !== null && _a !== void 0 ? _a : null;
16
+ this.lastAllocatedAt = (_b = options === null || options === void 0 ? void 0 : options.lastAllocatedAt) !== null && _b !== void 0 ? _b : null;
17
+ this.lastTakeOverAt = (_c = options === null || options === void 0 ? void 0 : options.lastTakeOverAt) !== null && _c !== void 0 ? _c : null;
18
+ this.revision = (_d = options === null || options === void 0 ? void 0 : options.revision) !== null && _d !== void 0 ? _d : null;
19
+ }
20
+ properties() {
21
+ let properties = {};
22
+ if (this.contentName != null) {
23
+ properties["contentName"] = this.contentName;
24
+ }
25
+ if (this.transactionId != null) {
26
+ properties["transactionId"] = this.transactionId;
27
+ }
28
+ if (this.store != null) {
29
+ properties["store"] = this.store;
30
+ }
31
+ if (this.userId != null) {
32
+ properties["userId"] = this.userId;
33
+ }
34
+ if (this.statusDetail != null) {
35
+ properties["statusDetail"] = this.statusDetail;
36
+ }
37
+ if (this.expiresAt != null) {
38
+ properties["expiresAt"] = this.expiresAt;
39
+ }
40
+ if (this.lastAllocatedAt != null) {
41
+ properties["lastAllocatedAt"] = this.lastAllocatedAt;
42
+ }
43
+ if (this.lastTakeOverAt != null) {
44
+ properties["lastTakeOverAt"] = this.lastTakeOverAt;
45
+ }
46
+ return properties;
47
+ }
48
+ }
49
+ exports.default = SubscribeTransaction;
50
+ //# sourceMappingURL=SubscribeTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubscribeTransaction.js","sourceRoot":"","sources":["SubscribeTransaction.ts"],"names":[],"mappings":";;AAmBA,MAAqB,oBAAoB;IAWrC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ACpC;QACD,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE;YACrB,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;SACtC;QACD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,EAAE;YAC3B,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;SAClD;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;SACxD;QACD,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,EAAE;YAC7B,UAAU,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;SACtD;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA7DD,uCA6DC"}
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
3
+ * Reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License").
6
+ * You may not use this file except in compliance with the License.
7
+ * A copy of the License is located at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * or in the "license" file accompanying this file. This file is distributed
12
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ * express or implied. See the License for the specific language governing
14
+ * permissions and limitations under the License.
15
+ */
16
+ import { SubscribeTransactionOptions } from "./options/SubscribeTransactionOptions";
17
+ import { SubscribeTransactionStore } from "./enums/SubscribeTransactionStore";
18
+ import { SubscribeTransactionStatusDetail } from "./enums/SubscribeTransactionStatusDetail";
19
+
20
+ export default class SubscribeTransaction {
21
+ private readonly contentName: string;
22
+ private readonly transactionId: string;
23
+ private readonly store: SubscribeTransactionStore;
24
+ private readonly statusDetail: SubscribeTransactionStatusDetail;
25
+ private readonly expiresAt: number;
26
+ private readonly userId: string|null = null;
27
+ private readonly lastAllocatedAt: number|null = null;
28
+ private readonly lastTakeOverAt: number|null = null;
29
+ private readonly revision: number|null = null;
30
+
31
+ public constructor(
32
+ contentName: string,
33
+ transactionId: string,
34
+ store: SubscribeTransactionStore,
35
+ statusDetail: SubscribeTransactionStatusDetail,
36
+ expiresAt: number,
37
+ options: SubscribeTransactionOptions|null = null,
38
+ ) {
39
+ this.contentName = contentName;
40
+ this.transactionId = transactionId;
41
+ this.store = store;
42
+ this.statusDetail = statusDetail;
43
+ this.expiresAt = expiresAt;
44
+ this.userId = options?.userId ?? null;
45
+ this.lastAllocatedAt = options?.lastAllocatedAt ?? null;
46
+ this.lastTakeOverAt = options?.lastTakeOverAt ?? null;
47
+ this.revision = options?.revision ?? null;
48
+ }
49
+
50
+ public properties(
51
+ ): {[name: string]: any} {
52
+ let properties: {[name: string]: any} = {};
53
+
54
+ if (this.contentName != null) {
55
+ properties["contentName"] = this.contentName;
56
+ }
57
+ if (this.transactionId != null) {
58
+ properties["transactionId"] = this.transactionId;
59
+ }
60
+ if (this.store != null) {
61
+ properties["store"] = this.store;
62
+ }
63
+ if (this.userId != null) {
64
+ properties["userId"] = this.userId;
65
+ }
66
+ if (this.statusDetail != null) {
67
+ properties["statusDetail"] = this.statusDetail;
68
+ }
69
+ if (this.expiresAt != null) {
70
+ properties["expiresAt"] = this.expiresAt;
71
+ }
72
+ if (this.lastAllocatedAt != null) {
73
+ properties["lastAllocatedAt"] = this.lastAllocatedAt;
74
+ }
75
+ if (this.lastTakeOverAt != null) {
76
+ properties["lastTakeOverAt"] = this.lastTakeOverAt;
77
+ }
78
+
79
+ return properties;
80
+ }
81
+ }
@@ -0,0 +1,6 @@
1
+ export declare const RefundEventPlatform: {
2
+ readonly APPLE_APP_STORE: "AppleAppStore";
3
+ readonly GOOGLE_PLAY: "GooglePlay";
4
+ readonly FAKE: "fake";
5
+ };
6
+ export type RefundEventPlatform = typeof RefundEventPlatform[keyof typeof RefundEventPlatform];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
4
+ * Reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License").
7
+ * You may not use this file except in compliance with the License.
8
+ * A copy of the License is located at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * or in the "license" file accompanying this file. This file is distributed
13
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
+ * express or implied. See the License for the specific language governing
15
+ * permissions and limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RefundEventPlatform = void 0;
19
+ exports.RefundEventPlatform = {
20
+ APPLE_APP_STORE: "AppleAppStore",
21
+ GOOGLE_PLAY: "GooglePlay",
22
+ FAKE: "fake",
23
+ };
24
+ //# sourceMappingURL=RefundEventPlatform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundEventPlatform.js","sourceRoot":"","sources":["RefundEventPlatform.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIU,QAAA,mBAAmB,GAAG;IAC/B,eAAe,EAAE,eAAe;IAChC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,MAAM;CACN,CAAC"}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
3
+ * Reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License").
6
+ * You may not use this file except in compliance with the License.
7
+ * A copy of the License is located at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * or in the "license" file accompanying this file. This file is distributed
12
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ * express or implied. See the License for the specific language governing
14
+ * permissions and limitations under the License.
15
+ */
16
+
17
+
18
+
19
+ export const RefundEventPlatform = {
20
+ APPLE_APP_STORE: "AppleAppStore",
21
+ GOOGLE_PLAY: "GooglePlay",
22
+ FAKE: "fake",
23
+ } as const;
24
+ export type RefundEventPlatform = typeof RefundEventPlatform[keyof typeof RefundEventPlatform];
@@ -0,0 +1,12 @@
1
+ export declare const SubscribeTransactionStatusDetail: {
2
+ readonly ACTIVE_ACTIVE: "active@active";
3
+ readonly ACTIVE_CONVERTED_FROM_TRIAL: "active@converted_from_trial";
4
+ readonly ACTIVE_IN_TRIAL: "active@in_trial";
5
+ readonly ACTIVE_IN_INTRO_OFFER: "active@in_intro_offer";
6
+ readonly GRACE_CANCELED: "grace@canceled";
7
+ readonly GRACE_GRACE_PERIOD: "grace@grace_period";
8
+ readonly GRACE_ON_HOLD: "grace@on_hold";
9
+ readonly INACTIVE_EXPIRED: "inactive@expired";
10
+ readonly INACTIVE_REVOKED: "inactive@revoked";
11
+ };
12
+ export type SubscribeTransactionStatusDetail = typeof SubscribeTransactionStatusDetail[keyof typeof SubscribeTransactionStatusDetail];