gs2-cdk 1.0.80 → 1.0.82

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 (124) hide show
  1. package/account/index.d.ts +3 -0
  2. package/account/index.js +5 -0
  3. package/account/index.js.map +1 -1
  4. package/account/index.ts +11 -0
  5. package/account/ref/BanStatusRef.d.ts +4 -0
  6. package/account/ref/BanStatusRef.js +24 -0
  7. package/account/ref/BanStatusRef.js.map +1 -0
  8. package/account/ref/BanStatusRef.ts +27 -0
  9. package/account/ref/index.d.ts +2 -1
  10. package/account/ref/index.js +3 -1
  11. package/account/ref/index.js.map +1 -1
  12. package/account/ref/index.ts +2 -0
  13. package/exchange/model/LogCost.d.ts +10 -0
  14. package/exchange/model/LogCost.js +26 -0
  15. package/exchange/model/LogCost.js.map +1 -0
  16. package/exchange/model/LogCost.ts +49 -0
  17. package/exchange/model/index.d.ts +3 -1
  18. package/exchange/model/index.js +3 -1
  19. package/exchange/model/index.js.map +1 -1
  20. package/exchange/model/index.ts +4 -0
  21. package/exchange/model/options/LogCostOptions.d.ts +3 -0
  22. package/exchange/model/options/LogCostOptions.js +18 -0
  23. package/exchange/model/options/LogCostOptions.js.map +1 -0
  24. package/exchange/model/options/LogCostOptions.ts +20 -0
  25. package/log/model/InGameLog.d.ts +12 -0
  26. package/log/model/InGameLog.js +35 -0
  27. package/log/model/InGameLog.js.map +1 -0
  28. package/log/model/InGameLog.ts +62 -0
  29. package/log/model/options/InGameLogOptions.d.ts +5 -0
  30. package/log/model/options/InGameLogOptions.js +3 -0
  31. package/log/model/options/InGameLogOptions.js.map +1 -0
  32. package/log/model/options/InGameLogOptions.ts +22 -0
  33. package/log/ref/InGameLogRef.d.ts +5 -0
  34. package/log/ref/InGameLogRef.js +25 -0
  35. package/log/ref/InGameLogRef.js.map +1 -0
  36. package/log/ref/InGameLogRef.ts +30 -0
  37. package/mission/model/CounterModel.js.map +1 -1
  38. package/mission/model/CounterModel.ts +1 -0
  39. package/mission/model/CounterScopeModel.d.ts +14 -5
  40. package/mission/model/CounterScopeModel.js +42 -15
  41. package/mission/model/CounterScopeModel.js.map +1 -1
  42. package/mission/model/CounterScopeModel.ts +57 -7
  43. package/mission/model/ScopedValue.d.ts +9 -2
  44. package/mission/model/ScopedValue.js +26 -4
  45. package/mission/model/ScopedValue.js.map +1 -1
  46. package/mission/model/ScopedValue.ts +47 -3
  47. package/mission/model/TargetCounterModel.d.ts +8 -1
  48. package/mission/model/TargetCounterModel.js +23 -2
  49. package/mission/model/TargetCounterModel.js.map +1 -1
  50. package/mission/model/TargetCounterModel.ts +46 -0
  51. package/mission/model/enum/CounterScopeModelScopeType.d.ts +5 -0
  52. package/mission/model/enum/CounterScopeModelScopeType.js +23 -0
  53. package/mission/model/enum/CounterScopeModelScopeType.js.map +1 -0
  54. package/mission/model/enum/CounterScopeModelScopeType.ts +23 -0
  55. package/mission/model/enum/ScopedValueScopeType.d.ts +5 -0
  56. package/mission/model/enum/ScopedValueScopeType.js +23 -0
  57. package/mission/model/enum/ScopedValueScopeType.js.map +1 -0
  58. package/mission/model/enum/ScopedValueScopeType.ts +23 -0
  59. package/mission/model/enum/TargetCounterModelScopeType.d.ts +5 -0
  60. package/mission/model/enum/TargetCounterModelScopeType.js +23 -0
  61. package/mission/model/enum/TargetCounterModelScopeType.js.map +1 -0
  62. package/mission/model/enum/TargetCounterModelScopeType.ts +23 -0
  63. package/mission/model/index.d.ts +10 -1
  64. package/mission/model/index.js +7 -1
  65. package/mission/model/index.js.map +1 -1
  66. package/mission/model/index.ts +18 -0
  67. package/mission/model/options/CounterModelOptions.ts +1 -0
  68. package/mission/model/options/CounterScopeModelOptions.d.ts +5 -0
  69. package/mission/model/options/CounterScopeModelOptions.ts +5 -0
  70. package/mission/model/options/CounterScopeModelResetTypeIsDailyOptions.ts +2 -0
  71. package/mission/model/options/CounterScopeModelResetTypeIsMonthlyOptions.ts +2 -0
  72. package/mission/model/options/CounterScopeModelResetTypeIsNotResetOptions.ts +2 -0
  73. package/mission/model/options/CounterScopeModelResetTypeIsWeeklyOptions.ts +2 -0
  74. package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.d.ts +2 -0
  75. package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.js +3 -0
  76. package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.js.map +1 -0
  77. package/mission/model/options/CounterScopeModelScopeTypeIsResetTimingOptions.ts +22 -0
  78. package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.d.ts +2 -0
  79. package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.js +3 -0
  80. package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.js.map +1 -0
  81. package/mission/model/options/CounterScopeModelScopeTypeIsVerifyActionOptions.ts +22 -0
  82. package/mission/model/options/ScopedValueOptions.d.ts +3 -0
  83. package/mission/model/options/ScopedValueOptions.ts +3 -0
  84. package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.d.ts +3 -0
  85. package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.js +3 -0
  86. package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.js.map +1 -0
  87. package/mission/model/options/ScopedValueScopeTypeIsResetTimingOptions.ts +21 -0
  88. package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.d.ts +3 -0
  89. package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.js +3 -0
  90. package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.js.map +1 -0
  91. package/mission/model/options/ScopedValueScopeTypeIsVerifyActionOptions.ts +21 -0
  92. package/mission/model/options/TargetCounterModelOptions.d.ts +1 -0
  93. package/mission/model/options/TargetCounterModelOptions.ts +2 -0
  94. package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.d.ts +4 -0
  95. package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.js +3 -0
  96. package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.js.map +1 -0
  97. package/mission/model/options/TargetCounterModelScopeTypeIsResetTimingOptions.ts +21 -0
  98. package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.d.ts +4 -0
  99. package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.js +3 -0
  100. package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.js.map +1 -0
  101. package/mission/model/options/TargetCounterModelScopeTypeIsVerifyActionOptions.ts +21 -0
  102. package/mission/ref/CounterModelRef.d.ts +2 -1
  103. package/mission/ref/CounterModelRef.js +2 -2
  104. package/mission/ref/CounterModelRef.js.map +1 -1
  105. package/mission/ref/CounterModelRef.ts +6 -1
  106. package/mission/ref/NamespaceRef.d.ts +2 -1
  107. package/mission/ref/NamespaceRef.js +2 -2
  108. package/mission/ref/NamespaceRef.js.map +1 -1
  109. package/mission/ref/NamespaceRef.ts +6 -1
  110. package/mission/stampSheet/VerifyCounterValueByUserId.d.ts +4 -1
  111. package/mission/stampSheet/VerifyCounterValueByUserId.js +13 -2
  112. package/mission/stampSheet/VerifyCounterValueByUserId.js.map +1 -1
  113. package/mission/stampSheet/VerifyCounterValueByUserId.ts +16 -3
  114. package/mission/stampSheet/enum/CounterScopeType.d.ts +5 -0
  115. package/mission/stampSheet/enum/CounterScopeType.js +23 -0
  116. package/mission/stampSheet/enum/CounterScopeType.js.map +1 -0
  117. package/mission/stampSheet/enum/CounterScopeType.ts +23 -0
  118. package/money2/model/Namespace.d.ts +2 -1
  119. package/money2/model/Namespace.js +13 -8
  120. package/money2/model/Namespace.js.map +1 -1
  121. package/money2/model/Namespace.ts +10 -4
  122. package/money2/model/options/NamespaceOptions.d.ts +2 -1
  123. package/money2/model/options/NamespaceOptions.ts +2 -1
  124. package/package.json +1 -1
@@ -1,20 +1,29 @@
1
+ import { VerifyAction } from "../../core/model";
1
2
  import { CounterScopeModelOptions } from "./options/CounterScopeModelOptions";
3
+ import { CounterScopeModelScopeTypeIsResetTimingOptions } from "./options/CounterScopeModelScopeTypeIsResetTimingOptions";
4
+ import { CounterScopeModelScopeTypeIsVerifyActionOptions } from "./options/CounterScopeModelScopeTypeIsVerifyActionOptions";
2
5
  import { CounterScopeModelResetTypeIsNotResetOptions } from "./options/CounterScopeModelResetTypeIsNotResetOptions";
3
6
  import { CounterScopeModelResetTypeIsDailyOptions } from "./options/CounterScopeModelResetTypeIsDailyOptions";
4
7
  import { CounterScopeModelResetTypeIsWeeklyOptions } from "./options/CounterScopeModelResetTypeIsWeeklyOptions";
5
8
  import { CounterScopeModelResetTypeIsMonthlyOptions } from "./options/CounterScopeModelResetTypeIsMonthlyOptions";
9
+ import { CounterScopeModelScopeType } from "./enum/CounterScopeModelScopeType";
6
10
  import { CounterScopeModelResetType } from "./enum/CounterScopeModelResetType";
7
11
  import { CounterScopeModelResetDayOfWeek } from "./enum/CounterScopeModelResetDayOfWeek";
8
12
  export default class CounterScopeModel {
13
+ private readonly scopeType;
9
14
  private readonly resetType;
10
15
  private readonly resetDayOfMonth;
11
16
  private readonly resetDayOfWeek;
12
17
  private readonly resetHour;
13
- constructor(resetType: CounterScopeModelResetType, options?: CounterScopeModelOptions | null);
14
- static resetTypeIsNotReset(options?: CounterScopeModelResetTypeIsNotResetOptions | null): CounterScopeModel;
15
- static resetTypeIsDaily(resetHour: number, options?: CounterScopeModelResetTypeIsDailyOptions | null): CounterScopeModel;
16
- static resetTypeIsWeekly(resetDayOfWeek: CounterScopeModelResetDayOfWeek, resetHour: number, options?: CounterScopeModelResetTypeIsWeeklyOptions | null): CounterScopeModel;
17
- static resetTypeIsMonthly(resetDayOfMonth: number, resetHour: number, options?: CounterScopeModelResetTypeIsMonthlyOptions | null): CounterScopeModel;
18
+ private readonly conditionName;
19
+ private readonly condition;
20
+ constructor(scopeType: CounterScopeModelScopeType, options?: CounterScopeModelOptions | null);
21
+ static scopeTypeIsResetTiming(resetType: CounterScopeModelResetType, options?: CounterScopeModelScopeTypeIsResetTimingOptions | null): CounterScopeModel;
22
+ static scopeTypeIsVerifyAction(conditionName: string, condition: VerifyAction, options?: CounterScopeModelScopeTypeIsVerifyActionOptions | null): CounterScopeModel;
23
+ static resetTypeIsNotReset(scopeType: CounterScopeModelScopeType, options?: CounterScopeModelResetTypeIsNotResetOptions | null): CounterScopeModel;
24
+ static resetTypeIsDaily(scopeType: CounterScopeModelScopeType, resetHour: number, options?: CounterScopeModelResetTypeIsDailyOptions | null): CounterScopeModel;
25
+ static resetTypeIsWeekly(scopeType: CounterScopeModelScopeType, resetDayOfWeek: CounterScopeModelResetDayOfWeek, resetHour: number, options?: CounterScopeModelResetTypeIsWeeklyOptions | null): CounterScopeModel;
26
+ static resetTypeIsMonthly(scopeType: CounterScopeModelScopeType, resetDayOfMonth: number, resetHour: number, options?: CounterScopeModelResetTypeIsMonthlyOptions | null): CounterScopeModel;
18
27
  properties(): {
19
28
  [name: string]: any;
20
29
  };
@@ -1,39 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const CounterScopeModelResetType_1 = require("./enum/CounterScopeModelResetType");
3
+ const CounterScopeModelScopeType_1 = require("./enum/CounterScopeModelScopeType");
4
4
  class CounterScopeModel {
5
- constructor(resetType, options = null) {
6
- var _a, _b, _c;
5
+ constructor(scopeType, options = null) {
6
+ var _a, _b, _c, _d, _e, _f;
7
+ this.resetType = null;
7
8
  this.resetDayOfMonth = null;
8
9
  this.resetDayOfWeek = null;
9
10
  this.resetHour = null;
10
- this.resetType = resetType;
11
- this.resetDayOfMonth = (_a = options === null || options === void 0 ? void 0 : options.resetDayOfMonth) !== null && _a !== void 0 ? _a : null;
12
- this.resetDayOfWeek = (_b = options === null || options === void 0 ? void 0 : options.resetDayOfWeek) !== null && _b !== void 0 ? _b : null;
13
- this.resetHour = (_c = options === null || options === void 0 ? void 0 : options.resetHour) !== null && _c !== void 0 ? _c : null;
11
+ this.conditionName = null;
12
+ this.condition = null;
13
+ this.scopeType = scopeType;
14
+ this.resetType = (_a = options === null || options === void 0 ? void 0 : options.resetType) !== null && _a !== void 0 ? _a : null;
15
+ this.resetDayOfMonth = (_b = options === null || options === void 0 ? void 0 : options.resetDayOfMonth) !== null && _b !== void 0 ? _b : null;
16
+ this.resetDayOfWeek = (_c = options === null || options === void 0 ? void 0 : options.resetDayOfWeek) !== null && _c !== void 0 ? _c : null;
17
+ this.resetHour = (_d = options === null || options === void 0 ? void 0 : options.resetHour) !== null && _d !== void 0 ? _d : null;
18
+ this.conditionName = (_e = options === null || options === void 0 ? void 0 : options.conditionName) !== null && _e !== void 0 ? _e : null;
19
+ this.condition = (_f = options === null || options === void 0 ? void 0 : options.condition) !== null && _f !== void 0 ? _f : null;
14
20
  }
15
- static resetTypeIsNotReset(options = null) {
16
- return new CounterScopeModel(CounterScopeModelResetType_1.CounterScopeModelResetType.NOT_RESET, {});
21
+ static scopeTypeIsResetTiming(resetType, options = null) {
22
+ return new CounterScopeModel(CounterScopeModelScopeType_1.CounterScopeModelScopeType.RESET_TIMING, {
23
+ resetType: resetType,
24
+ });
25
+ }
26
+ static scopeTypeIsVerifyAction(conditionName, condition, options = null) {
27
+ return new CounterScopeModel(CounterScopeModelScopeType_1.CounterScopeModelScopeType.VERIFY_ACTION, {
28
+ conditionName: conditionName,
29
+ condition: condition,
30
+ });
31
+ }
32
+ static resetTypeIsNotReset(scopeType, options = null) {
33
+ return new CounterScopeModel(scopeType, {});
17
34
  }
18
- static resetTypeIsDaily(resetHour, options = null) {
19
- return new CounterScopeModel(CounterScopeModelResetType_1.CounterScopeModelResetType.DAILY, {
35
+ static resetTypeIsDaily(scopeType, resetHour, options = null) {
36
+ return new CounterScopeModel(scopeType, {
20
37
  resetHour: resetHour,
21
38
  });
22
39
  }
23
- static resetTypeIsWeekly(resetDayOfWeek, resetHour, options = null) {
24
- return new CounterScopeModel(CounterScopeModelResetType_1.CounterScopeModelResetType.WEEKLY, {
40
+ static resetTypeIsWeekly(scopeType, resetDayOfWeek, resetHour, options = null) {
41
+ return new CounterScopeModel(scopeType, {
25
42
  resetDayOfWeek: resetDayOfWeek,
26
43
  resetHour: resetHour,
27
44
  });
28
45
  }
29
- static resetTypeIsMonthly(resetDayOfMonth, resetHour, options = null) {
30
- return new CounterScopeModel(CounterScopeModelResetType_1.CounterScopeModelResetType.MONTHLY, {
46
+ static resetTypeIsMonthly(scopeType, resetDayOfMonth, resetHour, options = null) {
47
+ return new CounterScopeModel(scopeType, {
31
48
  resetDayOfMonth: resetDayOfMonth,
32
49
  resetHour: resetHour,
33
50
  });
34
51
  }
35
52
  properties() {
53
+ var _a;
36
54
  let properties = {};
55
+ if (this.scopeType != null) {
56
+ properties["scopeType"] = this.scopeType;
57
+ }
37
58
  if (this.resetType != null) {
38
59
  properties["resetType"] = this.resetType;
39
60
  }
@@ -46,6 +67,12 @@ class CounterScopeModel {
46
67
  if (this.resetHour != null) {
47
68
  properties["resetHour"] = this.resetHour;
48
69
  }
70
+ if (this.conditionName != null) {
71
+ properties["conditionName"] = this.conditionName;
72
+ }
73
+ if (this.condition != null) {
74
+ properties["condition"] = (_a = this.condition) === null || _a === void 0 ? void 0 : _a.properties();
75
+ }
49
76
  return properties;
50
77
  }
51
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CounterScopeModel.js","sourceRoot":"","sources":["CounterScopeModel.ts"],"names":[],"mappings":";;AAoBA,kFAA+E;AAG/E,MAAqB,iBAAiB;IAMlC,YACI,SAAqC,EACrC,UAAyC,IAAI;;QANhC,oBAAe,GAAgB,IAAI,CAAC;QACpC,mBAAc,GAAyC,IAAI,CAAC;QAC5D,cAAS,GAAgB,IAAI,CAAC;QAM3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,IAAI,CAAC;QACxD,IAAI,CAAC,cAAc,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,IAAI,CAAC;QACt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S,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;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;SACpD;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,MAAA,IAAI,CAAC,SAAS,0CAAE,UAAU,EACnD,CAAC;SACL;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAnID,oCAmIC"}
@@ -13,46 +13,84 @@
13
13
  * express or implied. See the License for the specific language governing
14
14
  * permissions and limitations under the License.
15
15
  */
16
+ import { VerifyAction } from "../../core/model";
16
17
  import { CounterScopeModelOptions } from "./options/CounterScopeModelOptions";
18
+ import { CounterScopeModelScopeTypeIsResetTimingOptions } from "./options/CounterScopeModelScopeTypeIsResetTimingOptions";
19
+ import { CounterScopeModelScopeTypeIsVerifyActionOptions } from "./options/CounterScopeModelScopeTypeIsVerifyActionOptions";
17
20
  import { CounterScopeModelResetTypeIsNotResetOptions } from "./options/CounterScopeModelResetTypeIsNotResetOptions";
18
21
  import { CounterScopeModelResetTypeIsDailyOptions } from "./options/CounterScopeModelResetTypeIsDailyOptions";
19
22
  import { CounterScopeModelResetTypeIsWeeklyOptions } from "./options/CounterScopeModelResetTypeIsWeeklyOptions";
20
23
  import { CounterScopeModelResetTypeIsMonthlyOptions } from "./options/CounterScopeModelResetTypeIsMonthlyOptions";
24
+ import { CounterScopeModelScopeType } from "./enum/CounterScopeModelScopeType";
21
25
  import { CounterScopeModelResetType } from "./enum/CounterScopeModelResetType";
22
26
  import { CounterScopeModelResetDayOfWeek } from "./enum/CounterScopeModelResetDayOfWeek";
23
27
 
24
28
  export default class CounterScopeModel {
25
- private readonly resetType: CounterScopeModelResetType;
29
+ private readonly scopeType: CounterScopeModelScopeType;
30
+ private readonly resetType: CounterScopeModelResetType|null = null;
26
31
  private readonly resetDayOfMonth: number|null = null;
27
32
  private readonly resetDayOfWeek: CounterScopeModelResetDayOfWeek|null = null;
28
33
  private readonly resetHour: number|null = null;
34
+ private readonly conditionName: string|null = null;
35
+ private readonly condition: VerifyAction|null = null;
29
36
 
30
37
  public constructor(
31
- resetType: CounterScopeModelResetType,
38
+ scopeType: CounterScopeModelScopeType,
32
39
  options: CounterScopeModelOptions|null = null,
33
40
  ) {
34
- this.resetType = resetType;
41
+ this.scopeType = scopeType;
42
+ this.resetType = options?.resetType ?? null;
35
43
  this.resetDayOfMonth = options?.resetDayOfMonth ?? null;
36
44
  this.resetDayOfWeek = options?.resetDayOfWeek ?? null;
37
45
  this.resetHour = options?.resetHour ?? null;
46
+ this.conditionName = options?.conditionName ?? null;
47
+ this.condition = options?.condition ?? null;
48
+ }
49
+
50
+ public static scopeTypeIsResetTiming(
51
+ resetType: CounterScopeModelResetType,
52
+ options: CounterScopeModelScopeTypeIsResetTimingOptions|null = null,
53
+ ): CounterScopeModel {
54
+ return new CounterScopeModel(
55
+ CounterScopeModelScopeType.RESET_TIMING,
56
+ {
57
+ resetType: resetType,
58
+ },
59
+ );
60
+ }
61
+
62
+ public static scopeTypeIsVerifyAction(
63
+ conditionName: string,
64
+ condition: VerifyAction,
65
+ options: CounterScopeModelScopeTypeIsVerifyActionOptions|null = null,
66
+ ): CounterScopeModel {
67
+ return new CounterScopeModel(
68
+ CounterScopeModelScopeType.VERIFY_ACTION,
69
+ {
70
+ conditionName: conditionName,
71
+ condition: condition,
72
+ },
73
+ );
38
74
  }
39
75
 
40
76
  public static resetTypeIsNotReset(
77
+ scopeType: CounterScopeModelScopeType,
41
78
  options: CounterScopeModelResetTypeIsNotResetOptions|null = null,
42
79
  ): CounterScopeModel {
43
80
  return new CounterScopeModel(
44
- CounterScopeModelResetType.NOT_RESET,
81
+ scopeType,
45
82
  {
46
83
  },
47
84
  );
48
85
  }
49
86
 
50
87
  public static resetTypeIsDaily(
88
+ scopeType: CounterScopeModelScopeType,
51
89
  resetHour: number,
52
90
  options: CounterScopeModelResetTypeIsDailyOptions|null = null,
53
91
  ): CounterScopeModel {
54
92
  return new CounterScopeModel(
55
- CounterScopeModelResetType.DAILY,
93
+ scopeType,
56
94
  {
57
95
  resetHour: resetHour,
58
96
  },
@@ -60,12 +98,13 @@ export default class CounterScopeModel {
60
98
  }
61
99
 
62
100
  public static resetTypeIsWeekly(
101
+ scopeType: CounterScopeModelScopeType,
63
102
  resetDayOfWeek: CounterScopeModelResetDayOfWeek,
64
103
  resetHour: number,
65
104
  options: CounterScopeModelResetTypeIsWeeklyOptions|null = null,
66
105
  ): CounterScopeModel {
67
106
  return new CounterScopeModel(
68
- CounterScopeModelResetType.WEEKLY,
107
+ scopeType,
69
108
  {
70
109
  resetDayOfWeek: resetDayOfWeek,
71
110
  resetHour: resetHour,
@@ -74,12 +113,13 @@ export default class CounterScopeModel {
74
113
  }
75
114
 
76
115
  public static resetTypeIsMonthly(
116
+ scopeType: CounterScopeModelScopeType,
77
117
  resetDayOfMonth: number,
78
118
  resetHour: number,
79
119
  options: CounterScopeModelResetTypeIsMonthlyOptions|null = null,
80
120
  ): CounterScopeModel {
81
121
  return new CounterScopeModel(
82
- CounterScopeModelResetType.MONTHLY,
122
+ scopeType,
83
123
  {
84
124
  resetDayOfMonth: resetDayOfMonth,
85
125
  resetHour: resetHour,
@@ -91,6 +131,9 @@ export default class CounterScopeModel {
91
131
  ): {[name: string]: any} {
92
132
  let properties: {[name: string]: any} = {};
93
133
 
134
+ if (this.scopeType != null) {
135
+ properties["scopeType"] = this.scopeType;
136
+ }
94
137
  if (this.resetType != null) {
95
138
  properties["resetType"] = this.resetType;
96
139
  }
@@ -103,6 +146,13 @@ export default class CounterScopeModel {
103
146
  if (this.resetHour != null) {
104
147
  properties["resetHour"] = this.resetHour;
105
148
  }
149
+ if (this.conditionName != null) {
150
+ properties["conditionName"] = this.conditionName;
151
+ }
152
+ if (this.condition != null) {
153
+ properties["condition"] = this.condition?.properties(
154
+ );
155
+ }
106
156
 
107
157
  return properties;
108
158
  }
@@ -1,10 +1,17 @@
1
1
  import { ScopedValueOptions } from "./options/ScopedValueOptions";
2
+ import { ScopedValueScopeTypeIsResetTimingOptions } from "./options/ScopedValueScopeTypeIsResetTimingOptions";
3
+ import { ScopedValueScopeTypeIsVerifyActionOptions } from "./options/ScopedValueScopeTypeIsVerifyActionOptions";
4
+ import { ScopedValueScopeType } from "./enum/ScopedValueScopeType";
2
5
  import { ScopedValueResetType } from "./enum/ScopedValueResetType";
3
6
  export default class ScopedValue {
4
- private readonly resetType;
7
+ private readonly scopeType;
5
8
  private readonly value;
9
+ private readonly resetType;
10
+ private readonly conditionName;
6
11
  private readonly nextResetAt;
7
- constructor(resetType: ScopedValueResetType, value: number, options?: ScopedValueOptions | null);
12
+ constructor(scopeType: ScopedValueScopeType, value: number, options?: ScopedValueOptions | null);
13
+ static scopeTypeIsResetTiming(value: number, resetType: ScopedValueResetType, options?: ScopedValueScopeTypeIsResetTimingOptions | null): ScopedValue;
14
+ static scopeTypeIsVerifyAction(value: number, conditionName: string, options?: ScopedValueScopeTypeIsVerifyActionOptions | null): ScopedValue;
8
15
  properties(): {
9
16
  [name: string]: any;
10
17
  };
@@ -1,18 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ScopedValueScopeType_1 = require("./enum/ScopedValueScopeType");
3
4
  class ScopedValue {
4
- constructor(resetType, value, options = null) {
5
- var _a;
5
+ constructor(scopeType, value, options = null) {
6
+ var _a, _b, _c;
7
+ this.resetType = null;
8
+ this.conditionName = null;
6
9
  this.nextResetAt = null;
7
- this.resetType = resetType;
10
+ this.scopeType = scopeType;
8
11
  this.value = value;
9
- this.nextResetAt = (_a = options === null || options === void 0 ? void 0 : options.nextResetAt) !== null && _a !== void 0 ? _a : null;
12
+ this.resetType = (_a = options === null || options === void 0 ? void 0 : options.resetType) !== null && _a !== void 0 ? _a : null;
13
+ this.conditionName = (_b = options === null || options === void 0 ? void 0 : options.conditionName) !== null && _b !== void 0 ? _b : null;
14
+ this.nextResetAt = (_c = options === null || options === void 0 ? void 0 : options.nextResetAt) !== null && _c !== void 0 ? _c : null;
15
+ }
16
+ static scopeTypeIsResetTiming(value, resetType, options = null) {
17
+ return new ScopedValue(ScopedValueScopeType_1.ScopedValueScopeType.RESET_TIMING, value, {
18
+ resetType: resetType,
19
+ nextResetAt: options === null || options === void 0 ? void 0 : options.nextResetAt,
20
+ });
21
+ }
22
+ static scopeTypeIsVerifyAction(value, conditionName, options = null) {
23
+ return new ScopedValue(ScopedValueScopeType_1.ScopedValueScopeType.VERIFY_ACTION, value, {
24
+ conditionName: conditionName,
25
+ });
10
26
  }
11
27
  properties() {
12
28
  let properties = {};
29
+ if (this.scopeType != null) {
30
+ properties["scopeType"] = this.scopeType;
31
+ }
13
32
  if (this.resetType != null) {
14
33
  properties["resetType"] = this.resetType;
15
34
  }
35
+ if (this.conditionName != null) {
36
+ properties["conditionName"] = this.conditionName;
37
+ }
16
38
  if (this.value != null) {
17
39
  properties["value"] = this.value;
18
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedValue.js","sourceRoot":"","sources":["ScopedValue.ts"],"names":[],"mappings":";;AAkBA,MAAqB,WAAW;IAK5B,YACI,SAA+B,EAC/B,KAAa,EACb,UAAmC,IAAI;;QAL1B,gBAAW,GAAgB,IAA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"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
13
  * express or implied. See the License for the specific language governing
14
14
  * permissions and limitations under the License.
15
+ *
16
+ * deny overwrite
15
17
  */
16
18
  import { ScopedValueOptions } from "./options/ScopedValueOptions";
19
+ import { ScopedValueScopeTypeIsResetTimingOptions } from "./options/ScopedValueScopeTypeIsResetTimingOptions";
20
+ import { ScopedValueScopeTypeIsVerifyActionOptions } from "./options/ScopedValueScopeTypeIsVerifyActionOptions";
21
+ import { ScopedValueScopeType } from "./enum/ScopedValueScopeType";
17
22
  import { ScopedValueResetType } from "./enum/ScopedValueResetType";
18
23
 
19
24
  export default class ScopedValue {
20
- private readonly resetType: ScopedValueResetType;
25
+ private readonly scopeType: ScopedValueScopeType;
21
26
  private readonly value: number;
27
+ private readonly resetType: ScopedValueResetType|null = null;
28
+ private readonly conditionName: string|null = null;
22
29
  private readonly nextResetAt: number|null = null;
23
30
 
24
31
  public constructor(
25
- resetType: ScopedValueResetType,
32
+ scopeType: ScopedValueScopeType,
26
33
  value: number,
27
34
  options: ScopedValueOptions|null = null,
28
35
  ) {
29
- this.resetType = resetType;
36
+ this.scopeType = scopeType;
30
37
  this.value = value;
38
+ this.resetType = options?.resetType ?? null;
39
+ this.conditionName = options?.conditionName ?? null;
31
40
  this.nextResetAt = options?.nextResetAt ?? null;
32
41
  }
33
42
 
43
+ public static scopeTypeIsResetTiming(
44
+ value: number,
45
+ resetType: ScopedValueResetType,
46
+ options: ScopedValueScopeTypeIsResetTimingOptions|null = null,
47
+ ): ScopedValue {
48
+ return new ScopedValue(
49
+ ScopedValueScopeType.RESET_TIMING,
50
+ value,
51
+ {
52
+ resetType: resetType,
53
+ nextResetAt: options?.nextResetAt,
54
+ },
55
+ );
56
+ }
57
+
58
+ public static scopeTypeIsVerifyAction(
59
+ value: number,
60
+ conditionName: string,
61
+ options: ScopedValueScopeTypeIsVerifyActionOptions|null = null,
62
+ ): ScopedValue {
63
+ return new ScopedValue(
64
+ ScopedValueScopeType.VERIFY_ACTION,
65
+ value,
66
+ {
67
+ conditionName: conditionName,
68
+ },
69
+ );
70
+ }
71
+
34
72
  public properties(
35
73
  ): {[name: string]: any} {
36
74
  let properties: {[name: string]: any} = {};
37
75
 
76
+ if (this.scopeType != null) {
77
+ properties["scopeType"] = this.scopeType;
78
+ }
38
79
  if (this.resetType != null) {
39
80
  properties["resetType"] = this.resetType;
40
81
  }
82
+ if (this.conditionName != null) {
83
+ properties["conditionName"] = this.conditionName;
84
+ }
41
85
  if (this.value != null) {
42
86
  properties["value"] = this.value;
43
87
  }
@@ -1,9 +1,16 @@
1
1
  import { TargetCounterModelOptions } from "./options/TargetCounterModelOptions";
2
+ import { TargetCounterModelScopeTypeIsResetTimingOptions } from "./options/TargetCounterModelScopeTypeIsResetTimingOptions";
3
+ import { TargetCounterModelScopeTypeIsVerifyActionOptions } from "./options/TargetCounterModelScopeTypeIsVerifyActionOptions";
4
+ import { TargetCounterModelScopeType } from "./enum/TargetCounterModelScopeType";
2
5
  export default class TargetCounterModel {
3
6
  private readonly counterName;
7
+ private readonly scopeType;
4
8
  private readonly value;
5
9
  private readonly resetType;
6
- constructor(counterName: string, value: number, options?: TargetCounterModelOptions | null);
10
+ private readonly conditionName;
11
+ constructor(counterName: string, scopeType: TargetCounterModelScopeType, value: number, options?: TargetCounterModelOptions | null);
12
+ static scopeTypeIsResetTiming(counterName: string, value: number, options?: TargetCounterModelScopeTypeIsResetTimingOptions | null): TargetCounterModel;
13
+ static scopeTypeIsVerifyAction(counterName: string, value: number, conditionName: string, options?: TargetCounterModelScopeTypeIsVerifyActionOptions | null): TargetCounterModel;
7
14
  properties(): {
8
15
  [name: string]: any;
9
16
  };
@@ -1,21 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const TargetCounterModelScopeType_1 = require("./enum/TargetCounterModelScopeType");
3
4
  class TargetCounterModel {
4
- constructor(counterName, value, options = null) {
5
- var _a;
5
+ constructor(counterName, scopeType, value, options = null) {
6
+ var _a, _b;
6
7
  this.resetType = null;
8
+ this.conditionName = null;
7
9
  this.counterName = counterName;
10
+ this.scopeType = scopeType;
8
11
  this.value = value;
9
12
  this.resetType = (_a = options === null || options === void 0 ? void 0 : options.resetType) !== null && _a !== void 0 ? _a : null;
13
+ this.conditionName = (_b = options === null || options === void 0 ? void 0 : options.conditionName) !== null && _b !== void 0 ? _b : null;
14
+ }
15
+ static scopeTypeIsResetTiming(counterName, value, options = null) {
16
+ return new TargetCounterModel(counterName, TargetCounterModelScopeType_1.TargetCounterModelScopeType.RESET_TIMING, value, {
17
+ resetType: options === null || options === void 0 ? void 0 : options.resetType,
18
+ });
19
+ }
20
+ static scopeTypeIsVerifyAction(counterName, value, conditionName, options = null) {
21
+ return new TargetCounterModel(counterName, TargetCounterModelScopeType_1.TargetCounterModelScopeType.VERIFY_ACTION, value, {
22
+ conditionName: conditionName,
23
+ resetType: options === null || options === void 0 ? void 0 : options.resetType,
24
+ });
10
25
  }
11
26
  properties() {
12
27
  let properties = {};
13
28
  if (this.counterName != null) {
14
29
  properties["counterName"] = this.counterName;
15
30
  }
31
+ if (this.scopeType != null) {
32
+ properties["scopeType"] = this.scopeType;
33
+ }
16
34
  if (this.resetType != null) {
17
35
  properties["resetType"] = this.resetType;
18
36
  }
37
+ if (this.conditionName != null) {
38
+ properties["conditionName"] = this.conditionName;
39
+ }
19
40
  if (this.value != null) {
20
41
  properties["value"] = this.value;
21
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TargetCounterModel.js","sourceRoot":"","sources":["TargetCounterModel.ts"],"names":[],"mappings":";;AAkBA,MAAqB,kBAAkB;IAKnC,YACI,WAAmB,EACnB,KAAa,EACb,UAA0C,IAAI;;QALjC,cAAS,GAAqC,IAAI,CAAC;QAOhE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,MAAA,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B,CAAC,YAAY,EACxC,KAAK,EACL;YACI,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;SAChC,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,uBAAuB,CACjC,WAAmB,EACnB,KAAa,EACb,aAAqB,EACrB,UAAiE,IAAI;QAErE,OAAO,IAAI,kBAAkB,CACzB,WAAW,EACX,yDAA2B,CAAC,aAAa,EACzC,KAAK,EACL;YACI,aAAa,EAAE,aAAa;YAC5B,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;SAChC,CACJ,CAAC;IACN,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,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;SACpD;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA1ED,qCA0EC"}
@@ -14,21 +14,61 @@
14
14
  * permissions and limitations under the License.
15
15
  */
16
16
  import { TargetCounterModelOptions } from "./options/TargetCounterModelOptions";
17
+ import { TargetCounterModelScopeTypeIsResetTimingOptions } from "./options/TargetCounterModelScopeTypeIsResetTimingOptions";
18
+ import { TargetCounterModelScopeTypeIsVerifyActionOptions } from "./options/TargetCounterModelScopeTypeIsVerifyActionOptions";
19
+ import { TargetCounterModelScopeType } from "./enum/TargetCounterModelScopeType";
17
20
  import { TargetCounterModelResetType } from "./enum/TargetCounterModelResetType";
18
21
 
19
22
  export default class TargetCounterModel {
20
23
  private readonly counterName: string;
24
+ private readonly scopeType: TargetCounterModelScopeType;
21
25
  private readonly value: number;
22
26
  private readonly resetType: TargetCounterModelResetType|null = null;
27
+ private readonly conditionName: string|null = null;
23
28
 
24
29
  public constructor(
25
30
  counterName: string,
31
+ scopeType: TargetCounterModelScopeType,
26
32
  value: number,
27
33
  options: TargetCounterModelOptions|null = null,
28
34
  ) {
29
35
  this.counterName = counterName;
36
+ this.scopeType = scopeType;
30
37
  this.value = value;
31
38
  this.resetType = options?.resetType ?? null;
39
+ this.conditionName = options?.conditionName ?? null;
40
+ }
41
+
42
+ public static scopeTypeIsResetTiming(
43
+ counterName: string,
44
+ value: number,
45
+ options: TargetCounterModelScopeTypeIsResetTimingOptions|null = null,
46
+ ): TargetCounterModel {
47
+ return new TargetCounterModel(
48
+ counterName,
49
+ TargetCounterModelScopeType.RESET_TIMING,
50
+ value,
51
+ {
52
+ resetType: options?.resetType,
53
+ },
54
+ );
55
+ }
56
+
57
+ public static scopeTypeIsVerifyAction(
58
+ counterName: string,
59
+ value: number,
60
+ conditionName: string,
61
+ options: TargetCounterModelScopeTypeIsVerifyActionOptions|null = null,
62
+ ): TargetCounterModel {
63
+ return new TargetCounterModel(
64
+ counterName,
65
+ TargetCounterModelScopeType.VERIFY_ACTION,
66
+ value,
67
+ {
68
+ conditionName: conditionName,
69
+ resetType: options?.resetType,
70
+ },
71
+ );
32
72
  }
33
73
 
34
74
  public properties(
@@ -38,9 +78,15 @@ export default class TargetCounterModel {
38
78
  if (this.counterName != null) {
39
79
  properties["counterName"] = this.counterName;
40
80
  }
81
+ if (this.scopeType != null) {
82
+ properties["scopeType"] = this.scopeType;
83
+ }
41
84
  if (this.resetType != null) {
42
85
  properties["resetType"] = this.resetType;
43
86
  }
87
+ if (this.conditionName != null) {
88
+ properties["conditionName"] = this.conditionName;
89
+ }
44
90
  if (this.value != null) {
45
91
  properties["value"] = this.value;
46
92
  }
@@ -0,0 +1,5 @@
1
+ export declare const CounterScopeModelScopeType: {
2
+ readonly RESET_TIMING: "resetTiming";
3
+ readonly VERIFY_ACTION: "verifyAction";
4
+ };
5
+ export type CounterScopeModelScopeType = typeof CounterScopeModelScopeType[keyof typeof CounterScopeModelScopeType];
@@ -0,0 +1,23 @@
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.CounterScopeModelScopeType = void 0;
19
+ exports.CounterScopeModelScopeType = {
20
+ RESET_TIMING: "resetTiming",
21
+ VERIFY_ACTION: "verifyAction",
22
+ };
23
+ //# sourceMappingURL=CounterScopeModelScopeType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CounterScopeModelScopeType.js","sourceRoot":"","sources":["CounterScopeModelScopeType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIU,QAAA,0BAA0B,GAAG;IACtC,YAAY,EAAE,aAAa;IAC3B,aAAa,EAAE,cAAc;CACvB,CAAC"}
@@ -0,0 +1,23 @@
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 CounterScopeModelScopeType = {
20
+ RESET_TIMING: "resetTiming",
21
+ VERIFY_ACTION: "verifyAction",
22
+ } as const;
23
+ export type CounterScopeModelScopeType = typeof CounterScopeModelScopeType[keyof typeof CounterScopeModelScopeType];