gs2-cdk 1.0.144 → 1.0.146

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 (119) hide show
  1. package/enhance/model/UnleashIndividualMaterialSetting.d.ts +19 -0
  2. package/enhance/model/UnleashIndividualMaterialSetting.js +42 -0
  3. package/enhance/model/UnleashIndividualMaterialSetting.js.map +1 -0
  4. package/enhance/model/UnleashIndividualMaterialSetting.ts +104 -0
  5. package/enhance/model/UnleashMaterial.d.ts +18 -0
  6. package/enhance/model/UnleashMaterial.js +43 -0
  7. package/enhance/model/UnleashMaterial.js.map +1 -0
  8. package/enhance/model/UnleashMaterial.ts +89 -0
  9. package/enhance/model/UnleashMaterialSelection.d.ts +9 -0
  10. package/enhance/model/UnleashMaterialSelection.js +20 -0
  11. package/enhance/model/UnleashMaterialSelection.js.map +1 -0
  12. package/enhance/model/UnleashMaterialSelection.ts +44 -0
  13. package/enhance/model/UnleashQuantityMaterialSetting.d.ts +16 -0
  14. package/enhance/model/UnleashQuantityMaterialSetting.js +42 -0
  15. package/enhance/model/UnleashQuantityMaterialSetting.js.map +1 -0
  16. package/enhance/model/UnleashQuantityMaterialSetting.ts +85 -0
  17. package/enhance/model/UnleashRateEntryModel.d.ts +9 -1
  18. package/enhance/model/UnleashRateEntryModel.js +24 -2
  19. package/enhance/model/UnleashRateEntryModel.js.map +1 -1
  20. package/enhance/model/UnleashRateEntryModel.ts +49 -3
  21. package/enhance/model/UnleashRateModel.d.ts +1 -0
  22. package/enhance/model/UnleashRateModel.js +6 -1
  23. package/enhance/model/UnleashRateModel.js.map +1 -1
  24. package/enhance/model/UnleashRateModel.ts +9 -0
  25. package/enhance/model/UnleashRecipe.d.ts +12 -0
  26. package/enhance/model/UnleashRecipe.js +31 -0
  27. package/enhance/model/UnleashRecipe.js.map +1 -0
  28. package/enhance/model/UnleashRecipe.ts +58 -0
  29. package/enhance/model/enums/UnleashIndividualMaterialSettingGradeCondition.d.ts +6 -0
  30. package/enhance/model/enums/UnleashIndividualMaterialSettingGradeCondition.js +24 -0
  31. package/enhance/model/enums/UnleashIndividualMaterialSettingGradeCondition.js.map +1 -0
  32. package/enhance/model/enums/UnleashIndividualMaterialSettingGradeCondition.ts +24 -0
  33. package/enhance/model/enums/UnleashIndividualMaterialSettingMatchType.d.ts +5 -0
  34. package/enhance/model/enums/UnleashIndividualMaterialSettingMatchType.js +23 -0
  35. package/enhance/model/enums/UnleashIndividualMaterialSettingMatchType.js.map +1 -0
  36. package/enhance/model/enums/UnleashIndividualMaterialSettingMatchType.ts +23 -0
  37. package/enhance/model/enums/UnleashMaterialMaterialType.d.ts +5 -0
  38. package/enhance/model/enums/UnleashMaterialMaterialType.js +23 -0
  39. package/enhance/model/enums/UnleashMaterialMaterialType.js.map +1 -0
  40. package/enhance/model/enums/UnleashMaterialMaterialType.ts +23 -0
  41. package/enhance/model/enums/UnleashQuantityMaterialSettingMatchType.d.ts +5 -0
  42. package/enhance/model/enums/UnleashQuantityMaterialSettingMatchType.js +23 -0
  43. package/enhance/model/enums/UnleashQuantityMaterialSettingMatchType.js.map +1 -0
  44. package/enhance/model/enums/UnleashQuantityMaterialSettingMatchType.ts +23 -0
  45. package/enhance/model/enums/UnleashRateEntryModelType.d.ts +5 -0
  46. package/enhance/model/enums/UnleashRateEntryModelType.js +23 -0
  47. package/enhance/model/enums/UnleashRateEntryModelType.js.map +1 -0
  48. package/enhance/model/enums/UnleashRateEntryModelType.ts +23 -0
  49. package/enhance/model/index.d.ts +25 -1
  50. package/enhance/model/index.js +21 -1
  51. package/enhance/model/index.js.map +1 -1
  52. package/enhance/model/index.ts +48 -0
  53. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsAnyOptions.d.ts +2 -0
  54. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsAnyOptions.js +3 -0
  55. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsAnyOptions.js.map +1 -0
  56. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsAnyOptions.ts +20 -0
  57. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsEqualOptions.d.ts +2 -0
  58. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsEqualOptions.js +3 -0
  59. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsEqualOptions.js.map +1 -0
  60. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsEqualOptions.ts +20 -0
  61. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions.d.ts +2 -0
  62. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions.js +3 -0
  63. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions.js.map +1 -0
  64. package/enhance/model/options/UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions.ts +20 -0
  65. package/enhance/model/options/UnleashIndividualMaterialSettingOptions.d.ts +3 -0
  66. package/enhance/model/options/UnleashIndividualMaterialSettingOptions.js +3 -0
  67. package/enhance/model/options/UnleashIndividualMaterialSettingOptions.js.map +1 -0
  68. package/enhance/model/options/UnleashIndividualMaterialSettingOptions.ts +22 -0
  69. package/enhance/model/options/UnleashMaterialMaterialTypeIsIndividualOptions.d.ts +2 -0
  70. package/enhance/model/options/UnleashMaterialMaterialTypeIsIndividualOptions.js +3 -0
  71. package/enhance/model/options/UnleashMaterialMaterialTypeIsIndividualOptions.js.map +1 -0
  72. package/enhance/model/options/UnleashMaterialMaterialTypeIsIndividualOptions.ts +21 -0
  73. package/enhance/model/options/UnleashMaterialMaterialTypeIsQuantityOptions.d.ts +2 -0
  74. package/enhance/model/options/UnleashMaterialMaterialTypeIsQuantityOptions.js +3 -0
  75. package/enhance/model/options/UnleashMaterialMaterialTypeIsQuantityOptions.js.map +1 -0
  76. package/enhance/model/options/UnleashMaterialMaterialTypeIsQuantityOptions.ts +21 -0
  77. package/enhance/model/options/UnleashMaterialOptions.d.ts +6 -0
  78. package/enhance/model/options/UnleashMaterialOptions.js +3 -0
  79. package/enhance/model/options/UnleashMaterialOptions.js.map +1 -0
  80. package/enhance/model/options/UnleashMaterialOptions.ts +24 -0
  81. package/enhance/model/options/UnleashMaterialSelectionOptions.d.ts +2 -0
  82. package/enhance/model/options/UnleashMaterialSelectionOptions.js +18 -0
  83. package/enhance/model/options/UnleashMaterialSelectionOptions.js.map +1 -0
  84. package/enhance/model/options/UnleashMaterialSelectionOptions.ts +19 -0
  85. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions.d.ts +2 -0
  86. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions.js +3 -0
  87. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions.js.map +1 -0
  88. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions.ts +19 -0
  89. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions.d.ts +2 -0
  90. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions.js +3 -0
  91. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions.js.map +1 -0
  92. package/enhance/model/options/UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions.ts +19 -0
  93. package/enhance/model/options/UnleashQuantityMaterialSettingOptions.d.ts +4 -0
  94. package/enhance/model/options/UnleashQuantityMaterialSettingOptions.js +3 -0
  95. package/enhance/model/options/UnleashQuantityMaterialSettingOptions.js.map +1 -0
  96. package/enhance/model/options/UnleashQuantityMaterialSettingOptions.ts +22 -0
  97. package/enhance/model/options/UnleashRateEntryModelOptions.d.ts +3 -0
  98. package/enhance/model/options/UnleashRateEntryModelOptions.js +0 -15
  99. package/enhance/model/options/UnleashRateEntryModelOptions.js.map +1 -1
  100. package/enhance/model/options/UnleashRateEntryModelOptions.ts +7 -0
  101. package/enhance/model/options/UnleashRateEntryModelTypeIsRecipeOptions.d.ts +2 -0
  102. package/enhance/model/options/UnleashRateEntryModelTypeIsRecipeOptions.js +3 -0
  103. package/enhance/model/options/UnleashRateEntryModelTypeIsRecipeOptions.js.map +1 -0
  104. package/enhance/model/options/UnleashRateEntryModelTypeIsRecipeOptions.ts +23 -0
  105. package/enhance/model/options/UnleashRateEntryModelTypeIsSimpleOptions.d.ts +2 -0
  106. package/enhance/model/options/UnleashRateEntryModelTypeIsSimpleOptions.js +3 -0
  107. package/enhance/model/options/UnleashRateEntryModelTypeIsSimpleOptions.js.map +1 -0
  108. package/enhance/model/options/UnleashRateEntryModelTypeIsSimpleOptions.ts +23 -0
  109. package/enhance/model/options/UnleashRateModelOptions.d.ts +1 -0
  110. package/enhance/model/options/UnleashRateModelOptions.ts +5 -0
  111. package/enhance/model/options/UnleashRecipeOptions.d.ts +4 -0
  112. package/enhance/model/options/UnleashRecipeOptions.js +3 -0
  113. package/enhance/model/options/UnleashRecipeOptions.js.map +1 -0
  114. package/enhance/model/options/UnleashRecipeOptions.ts +24 -0
  115. package/enhance/stampSheet/UnleashByUserId.d.ts +4 -1
  116. package/enhance/stampSheet/UnleashByUserId.js +13 -2
  117. package/enhance/stampSheet/UnleashByUserId.js.map +1 -1
  118. package/enhance/stampSheet/UnleashByUserId.ts +17 -3
  119. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import { UnleashIndividualMaterialSettingOptions } from "./options/UnleashIndividualMaterialSettingOptions";
2
+ import { UnleashIndividualMaterialSettingGradeConditionIsAnyOptions } from "./options/UnleashIndividualMaterialSettingGradeConditionIsAnyOptions";
3
+ import { UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions } from "./options/UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions";
4
+ import { UnleashIndividualMaterialSettingGradeConditionIsEqualOptions } from "./options/UnleashIndividualMaterialSettingGradeConditionIsEqualOptions";
5
+ import { UnleashIndividualMaterialSettingMatchType } from "./enums/UnleashIndividualMaterialSettingMatchType";
6
+ import { UnleashIndividualMaterialSettingGradeCondition } from "./enums/UnleashIndividualMaterialSettingGradeCondition";
7
+ export default class UnleashIndividualMaterialSetting {
8
+ private readonly matchType;
9
+ private readonly gradeCondition;
10
+ private readonly count;
11
+ private readonly gradeValue;
12
+ constructor(matchType: UnleashIndividualMaterialSettingMatchType, gradeCondition: UnleashIndividualMaterialSettingGradeCondition, count: number, options?: UnleashIndividualMaterialSettingOptions | null);
13
+ static gradeConditionIsAny(matchType: UnleashIndividualMaterialSettingMatchType, count: number, options?: UnleashIndividualMaterialSettingGradeConditionIsAnyOptions | null): UnleashIndividualMaterialSetting;
14
+ static gradeConditionIsSameAsTarget(matchType: UnleashIndividualMaterialSettingMatchType, count: number, options?: UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions | null): UnleashIndividualMaterialSetting;
15
+ static gradeConditionIsEqual(matchType: UnleashIndividualMaterialSettingMatchType, count: number, gradeValue: number, options?: UnleashIndividualMaterialSettingGradeConditionIsEqualOptions | null): UnleashIndividualMaterialSetting;
16
+ properties(): {
17
+ [name: string]: any;
18
+ };
19
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const UnleashIndividualMaterialSettingGradeCondition_1 = require("./enums/UnleashIndividualMaterialSettingGradeCondition");
4
+ class UnleashIndividualMaterialSetting {
5
+ constructor(matchType, gradeCondition, count, options = null) {
6
+ var _a;
7
+ this.gradeValue = null;
8
+ this.matchType = matchType;
9
+ this.gradeCondition = gradeCondition;
10
+ this.count = count;
11
+ this.gradeValue = (_a = options === null || options === void 0 ? void 0 : options.gradeValue) !== null && _a !== void 0 ? _a : null;
12
+ }
13
+ static gradeConditionIsAny(matchType, count, options = null) {
14
+ return new UnleashIndividualMaterialSetting(matchType, UnleashIndividualMaterialSettingGradeCondition_1.UnleashIndividualMaterialSettingGradeCondition.ANY, count, {});
15
+ }
16
+ static gradeConditionIsSameAsTarget(matchType, count, options = null) {
17
+ return new UnleashIndividualMaterialSetting(matchType, UnleashIndividualMaterialSettingGradeCondition_1.UnleashIndividualMaterialSettingGradeCondition.SAME_AS_TARGET, count, {});
18
+ }
19
+ static gradeConditionIsEqual(matchType, count, gradeValue, options = null) {
20
+ return new UnleashIndividualMaterialSetting(matchType, UnleashIndividualMaterialSettingGradeCondition_1.UnleashIndividualMaterialSettingGradeCondition.EQUAL, count, {
21
+ gradeValue: gradeValue,
22
+ });
23
+ }
24
+ properties() {
25
+ let properties = {};
26
+ if (this.matchType != null) {
27
+ properties["matchType"] = this.matchType;
28
+ }
29
+ if (this.gradeCondition != null) {
30
+ properties["gradeCondition"] = this.gradeCondition;
31
+ }
32
+ if (this.gradeValue != null) {
33
+ properties["gradeValue"] = this.gradeValue;
34
+ }
35
+ if (this.count != null) {
36
+ properties["count"] = this.count;
37
+ }
38
+ return properties;
39
+ }
40
+ }
41
+ exports.default = UnleashIndividualMaterialSetting;
42
+ //# sourceMappingURL=UnleashIndividualMaterialSetting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnleashIndividualMaterialSetting.js","sourceRoot":"","sources":["UnleashIndividualMaterialSetting.ts"],"names":[],"mappings":";;AAoBA,2HAAwH;AAExH,MAAqB,gCAAgC;IAMjD,YACI,SAAoD,EACpD,cAA8D,EAC9D,KAAa,EACb,UAAwD,IAAI;;QAN/C,eAAU,GAAgB,IAAI,CAAC;QAQ5C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,IAAI,CAAC;IAClD,CAAC;IAEM,MAAM,CAAC,mBAAmB,CAC7B,SAAoD,EACpD,KAAa,EACb,UAA2E,IAAI;QAE/E,OAAO,IAAI,gCAAgC,CACvC,SAAS,EACT,+FAA8C,CAAC,GAAG,EAClD,KAAK,EACL,EACC,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,4BAA4B,CACtC,SAAoD,EACpD,KAAa,EACb,UAAoF,IAAI;QAExF,OAAO,IAAI,gCAAgC,CACvC,SAAS,EACT,+FAA8C,CAAC,cAAc,EAC7D,KAAK,EACL,EACC,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,qBAAqB,CAC/B,SAAoD,EACpD,KAAa,EACb,UAAkB,EAClB,UAA6E,IAAI;QAEjF,OAAO,IAAI,gCAAgC,CACvC,SAAS,EACT,+FAA8C,CAAC,KAAK,EACpD,KAAK,EACL;YACI,UAAU,EAAE,UAAU;SACzB,CACJ,CAAC;IACN,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,EAAE;YAC7B,UAAU,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;SACtD;QACD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;SAC9C;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;AAjFD,mDAiFC"}
@@ -0,0 +1,104 @@
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 { UnleashIndividualMaterialSettingOptions } from "./options/UnleashIndividualMaterialSettingOptions";
17
+ import { UnleashIndividualMaterialSettingGradeConditionIsAnyOptions } from "./options/UnleashIndividualMaterialSettingGradeConditionIsAnyOptions";
18
+ import { UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions } from "./options/UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions";
19
+ import { UnleashIndividualMaterialSettingGradeConditionIsEqualOptions } from "./options/UnleashIndividualMaterialSettingGradeConditionIsEqualOptions";
20
+ import { UnleashIndividualMaterialSettingMatchType } from "./enums/UnleashIndividualMaterialSettingMatchType";
21
+ import { UnleashIndividualMaterialSettingGradeCondition } from "./enums/UnleashIndividualMaterialSettingGradeCondition";
22
+
23
+ export default class UnleashIndividualMaterialSetting {
24
+ private readonly matchType: UnleashIndividualMaterialSettingMatchType;
25
+ private readonly gradeCondition: UnleashIndividualMaterialSettingGradeCondition;
26
+ private readonly count: number;
27
+ private readonly gradeValue: number|null = null;
28
+
29
+ public constructor(
30
+ matchType: UnleashIndividualMaterialSettingMatchType,
31
+ gradeCondition: UnleashIndividualMaterialSettingGradeCondition,
32
+ count: number,
33
+ options: UnleashIndividualMaterialSettingOptions|null = null,
34
+ ) {
35
+ this.matchType = matchType;
36
+ this.gradeCondition = gradeCondition;
37
+ this.count = count;
38
+ this.gradeValue = options?.gradeValue ?? null;
39
+ }
40
+
41
+ public static gradeConditionIsAny(
42
+ matchType: UnleashIndividualMaterialSettingMatchType,
43
+ count: number,
44
+ options: UnleashIndividualMaterialSettingGradeConditionIsAnyOptions|null = null,
45
+ ): UnleashIndividualMaterialSetting {
46
+ return new UnleashIndividualMaterialSetting(
47
+ matchType,
48
+ UnleashIndividualMaterialSettingGradeCondition.ANY,
49
+ count,
50
+ {
51
+ },
52
+ );
53
+ }
54
+
55
+ public static gradeConditionIsSameAsTarget(
56
+ matchType: UnleashIndividualMaterialSettingMatchType,
57
+ count: number,
58
+ options: UnleashIndividualMaterialSettingGradeConditionIsSameAsTargetOptions|null = null,
59
+ ): UnleashIndividualMaterialSetting {
60
+ return new UnleashIndividualMaterialSetting(
61
+ matchType,
62
+ UnleashIndividualMaterialSettingGradeCondition.SAME_AS_TARGET,
63
+ count,
64
+ {
65
+ },
66
+ );
67
+ }
68
+
69
+ public static gradeConditionIsEqual(
70
+ matchType: UnleashIndividualMaterialSettingMatchType,
71
+ count: number,
72
+ gradeValue: number,
73
+ options: UnleashIndividualMaterialSettingGradeConditionIsEqualOptions|null = null,
74
+ ): UnleashIndividualMaterialSetting {
75
+ return new UnleashIndividualMaterialSetting(
76
+ matchType,
77
+ UnleashIndividualMaterialSettingGradeCondition.EQUAL,
78
+ count,
79
+ {
80
+ gradeValue: gradeValue,
81
+ },
82
+ );
83
+ }
84
+
85
+ public properties(
86
+ ): {[name: string]: any} {
87
+ let properties: {[name: string]: any} = {};
88
+
89
+ if (this.matchType != null) {
90
+ properties["matchType"] = this.matchType;
91
+ }
92
+ if (this.gradeCondition != null) {
93
+ properties["gradeCondition"] = this.gradeCondition;
94
+ }
95
+ if (this.gradeValue != null) {
96
+ properties["gradeValue"] = this.gradeValue;
97
+ }
98
+ if (this.count != null) {
99
+ properties["count"] = this.count;
100
+ }
101
+
102
+ return properties;
103
+ }
104
+ }
@@ -0,0 +1,18 @@
1
+ import UnleashIndividualMaterialSetting from "./UnleashIndividualMaterialSetting";
2
+ import UnleashQuantityMaterialSetting from "./UnleashQuantityMaterialSetting";
3
+ import { UnleashMaterialOptions } from "./options/UnleashMaterialOptions";
4
+ import { UnleashMaterialMaterialTypeIsIndividualOptions } from "./options/UnleashMaterialMaterialTypeIsIndividualOptions";
5
+ import { UnleashMaterialMaterialTypeIsQuantityOptions } from "./options/UnleashMaterialMaterialTypeIsQuantityOptions";
6
+ import { UnleashMaterialMaterialType } from "./enums/UnleashMaterialMaterialType";
7
+ export default class UnleashMaterial {
8
+ private readonly name;
9
+ private readonly materialType;
10
+ private readonly individualSetting;
11
+ private readonly quantitySetting;
12
+ constructor(name: string, materialType: UnleashMaterialMaterialType, options?: UnleashMaterialOptions | null);
13
+ static materialTypeIsIndividual(name: string, individualSetting: UnleashIndividualMaterialSetting, options?: UnleashMaterialMaterialTypeIsIndividualOptions | null): UnleashMaterial;
14
+ static materialTypeIsQuantity(name: string, quantitySetting: UnleashQuantityMaterialSetting, options?: UnleashMaterialMaterialTypeIsQuantityOptions | null): UnleashMaterial;
15
+ properties(): {
16
+ [name: string]: any;
17
+ };
18
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const UnleashMaterialMaterialType_1 = require("./enums/UnleashMaterialMaterialType");
4
+ class UnleashMaterial {
5
+ constructor(name, materialType, options = null) {
6
+ var _a, _b;
7
+ this.individualSetting = null;
8
+ this.quantitySetting = null;
9
+ this.name = name;
10
+ this.materialType = materialType;
11
+ this.individualSetting = (_a = options === null || options === void 0 ? void 0 : options.individualSetting) !== null && _a !== void 0 ? _a : null;
12
+ this.quantitySetting = (_b = options === null || options === void 0 ? void 0 : options.quantitySetting) !== null && _b !== void 0 ? _b : null;
13
+ }
14
+ static materialTypeIsIndividual(name, individualSetting, options = null) {
15
+ return new UnleashMaterial(name, UnleashMaterialMaterialType_1.UnleashMaterialMaterialType.INDIVIDUAL, {
16
+ individualSetting: individualSetting,
17
+ });
18
+ }
19
+ static materialTypeIsQuantity(name, quantitySetting, options = null) {
20
+ return new UnleashMaterial(name, UnleashMaterialMaterialType_1.UnleashMaterialMaterialType.QUANTITY, {
21
+ quantitySetting: quantitySetting,
22
+ });
23
+ }
24
+ properties() {
25
+ var _a, _b;
26
+ let properties = {};
27
+ if (this.name != null) {
28
+ properties["name"] = this.name;
29
+ }
30
+ if (this.materialType != null) {
31
+ properties["materialType"] = this.materialType;
32
+ }
33
+ if (this.individualSetting != null) {
34
+ properties["individualSetting"] = (_a = this.individualSetting) === null || _a === void 0 ? void 0 : _a.properties();
35
+ }
36
+ if (this.quantitySetting != null) {
37
+ properties["quantitySetting"] = (_b = this.quantitySetting) === null || _b === void 0 ? void 0 : _b.properties();
38
+ }
39
+ return properties;
40
+ }
41
+ }
42
+ exports.default = UnleashMaterial;
43
+ //# sourceMappingURL=UnleashMaterial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnleashMaterial.js","sourceRoot":"","sources":["UnleashMaterial.ts"],"names":[],"mappings":";;AAoBA,qFAAkF;AAElF,MAAqB,eAAe;IAMhC,YACI,IAAY,EACZ,YAAyC,EACzC,UAAuC,IAAI;;QAN9B,sBAAiB,GAA0C,IAAI,CAAC;QAChE,oBAAe,GAAwC,IAAI,CAAC;QAOzE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,mCAAI,IAAI,CAAC;QAC5D,IAAI,CAAC,eAAe,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,IAAI,CAAC;IAC5D,CAAC;IAEM,MAAM,CAAC,wBAAwB,CAClC,IAAY,EACZ,iBAAmD,EACnD,UAA+D,IAAI;QAEnE,OAAO,IAAI,eAAe,CACtB,IAAI,EACJ,yDAA2B,CAAC,UAAU,EACtC;YACI,iBAAiB,EAAE,iBAAiB;SACvC,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,sBAAsB,CAChC,IAAY,EACZ,eAA+C,EAC/C,UAA6D,IAAI;QAEjE,OAAO,IAAI,eAAe,CACtB,IAAI,EACJ,yDAA2B,CAAC,QAAQ,EACpC;YACI,eAAe,EAAE,eAAe;SACnC,CACJ,CAAC;IACN,CAAC;IAEM,UAAU;;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,EAAE;YAC3B,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;SAClD;QACD,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,EAAE;YAChC,UAAU,CAAC,mBAAmB,CAAC,GAAG,MAAA,IAAI,CAAC,iBAAiB,0CAAE,UAAU,EACnE,CAAC;SACL;QACD,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,iBAAiB,CAAC,GAAG,MAAA,IAAI,CAAC,eAAe,0CAAE,UAAU,EAC/D,CAAC;SACL;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAlED,kCAkEC"}
@@ -0,0 +1,89 @@
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 UnleashIndividualMaterialSetting from "./UnleashIndividualMaterialSetting";
17
+ import UnleashQuantityMaterialSetting from "./UnleashQuantityMaterialSetting";
18
+ import { UnleashMaterialOptions } from "./options/UnleashMaterialOptions";
19
+ import { UnleashMaterialMaterialTypeIsIndividualOptions } from "./options/UnleashMaterialMaterialTypeIsIndividualOptions";
20
+ import { UnleashMaterialMaterialTypeIsQuantityOptions } from "./options/UnleashMaterialMaterialTypeIsQuantityOptions";
21
+ import { UnleashMaterialMaterialType } from "./enums/UnleashMaterialMaterialType";
22
+
23
+ export default class UnleashMaterial {
24
+ private readonly name: string;
25
+ private readonly materialType: UnleashMaterialMaterialType;
26
+ private readonly individualSetting: UnleashIndividualMaterialSetting|null = null;
27
+ private readonly quantitySetting: UnleashQuantityMaterialSetting|null = null;
28
+
29
+ public constructor(
30
+ name: string,
31
+ materialType: UnleashMaterialMaterialType,
32
+ options: UnleashMaterialOptions|null = null,
33
+ ) {
34
+ this.name = name;
35
+ this.materialType = materialType;
36
+ this.individualSetting = options?.individualSetting ?? null;
37
+ this.quantitySetting = options?.quantitySetting ?? null;
38
+ }
39
+
40
+ public static materialTypeIsIndividual(
41
+ name: string,
42
+ individualSetting: UnleashIndividualMaterialSetting,
43
+ options: UnleashMaterialMaterialTypeIsIndividualOptions|null = null,
44
+ ): UnleashMaterial {
45
+ return new UnleashMaterial(
46
+ name,
47
+ UnleashMaterialMaterialType.INDIVIDUAL,
48
+ {
49
+ individualSetting: individualSetting,
50
+ },
51
+ );
52
+ }
53
+
54
+ public static materialTypeIsQuantity(
55
+ name: string,
56
+ quantitySetting: UnleashQuantityMaterialSetting,
57
+ options: UnleashMaterialMaterialTypeIsQuantityOptions|null = null,
58
+ ): UnleashMaterial {
59
+ return new UnleashMaterial(
60
+ name,
61
+ UnleashMaterialMaterialType.QUANTITY,
62
+ {
63
+ quantitySetting: quantitySetting,
64
+ },
65
+ );
66
+ }
67
+
68
+ public properties(
69
+ ): {[name: string]: any} {
70
+ let properties: {[name: string]: any} = {};
71
+
72
+ if (this.name != null) {
73
+ properties["name"] = this.name;
74
+ }
75
+ if (this.materialType != null) {
76
+ properties["materialType"] = this.materialType;
77
+ }
78
+ if (this.individualSetting != null) {
79
+ properties["individualSetting"] = this.individualSetting?.properties(
80
+ );
81
+ }
82
+ if (this.quantitySetting != null) {
83
+ properties["quantitySetting"] = this.quantitySetting?.properties(
84
+ );
85
+ }
86
+
87
+ return properties;
88
+ }
89
+ }
@@ -0,0 +1,9 @@
1
+ import { UnleashMaterialSelectionOptions } from "./options/UnleashMaterialSelectionOptions";
2
+ export default class UnleashMaterialSelection {
3
+ private readonly name;
4
+ private readonly itemSetIds;
5
+ constructor(name: string, itemSetIds: string[], options?: UnleashMaterialSelectionOptions | null);
6
+ properties(): {
7
+ [name: string]: any;
8
+ };
9
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class UnleashMaterialSelection {
4
+ constructor(name, itemSetIds, options = null) {
5
+ this.name = name;
6
+ this.itemSetIds = itemSetIds;
7
+ }
8
+ properties() {
9
+ let properties = {};
10
+ if (this.name != null) {
11
+ properties["name"] = this.name;
12
+ }
13
+ if (this.itemSetIds != null) {
14
+ properties["itemSetIds"] = this.itemSetIds;
15
+ }
16
+ return properties;
17
+ }
18
+ }
19
+ exports.default = UnleashMaterialSelection;
20
+ //# sourceMappingURL=UnleashMaterialSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnleashMaterialSelection.js","sourceRoot":"","sources":["UnleashMaterialSelection.ts"],"names":[],"mappings":";;AAiBA,MAAqB,wBAAwB;IAIzC,YACI,IAAY,EACZ,UAAoB,EACpB,UAAgD,IAAI;QAEpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;SAC9C;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA1BD,2CA0BC"}
@@ -0,0 +1,44 @@
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 { UnleashMaterialSelectionOptions } from "./options/UnleashMaterialSelectionOptions";
17
+
18
+ export default class UnleashMaterialSelection {
19
+ private readonly name: string;
20
+ private readonly itemSetIds: string[];
21
+
22
+ public constructor(
23
+ name: string,
24
+ itemSetIds: string[],
25
+ options: UnleashMaterialSelectionOptions|null = null,
26
+ ) {
27
+ this.name = name;
28
+ this.itemSetIds = itemSetIds;
29
+ }
30
+
31
+ public properties(
32
+ ): {[name: string]: any} {
33
+ let properties: {[name: string]: any} = {};
34
+
35
+ if (this.name != null) {
36
+ properties["name"] = this.name;
37
+ }
38
+ if (this.itemSetIds != null) {
39
+ properties["itemSetIds"] = this.itemSetIds;
40
+ }
41
+
42
+ return properties;
43
+ }
44
+ }
@@ -0,0 +1,16 @@
1
+ import { UnleashQuantityMaterialSettingOptions } from "./options/UnleashQuantityMaterialSettingOptions";
2
+ import { UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions } from "./options/UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions";
3
+ import { UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions } from "./options/UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions";
4
+ import { UnleashQuantityMaterialSettingMatchType } from "./enums/UnleashQuantityMaterialSettingMatchType";
5
+ export default class UnleashQuantityMaterialSetting {
6
+ private readonly matchType;
7
+ private readonly count;
8
+ private readonly materialInventoryModelId;
9
+ private readonly itemModelId;
10
+ constructor(matchType: UnleashQuantityMaterialSettingMatchType, count: number, options?: UnleashQuantityMaterialSettingOptions | null);
11
+ static matchTypeIsSameGroup(count: number, materialInventoryModelId: string, options?: UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions | null): UnleashQuantityMaterialSetting;
12
+ static matchTypeIsSpecified(count: number, itemModelId: string, options?: UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions | null): UnleashQuantityMaterialSetting;
13
+ properties(): {
14
+ [name: string]: any;
15
+ };
16
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const UnleashQuantityMaterialSettingMatchType_1 = require("./enums/UnleashQuantityMaterialSettingMatchType");
4
+ class UnleashQuantityMaterialSetting {
5
+ constructor(matchType, count, options = null) {
6
+ var _a, _b;
7
+ this.materialInventoryModelId = null;
8
+ this.itemModelId = null;
9
+ this.matchType = matchType;
10
+ this.count = count;
11
+ this.materialInventoryModelId = (_a = options === null || options === void 0 ? void 0 : options.materialInventoryModelId) !== null && _a !== void 0 ? _a : null;
12
+ this.itemModelId = (_b = options === null || options === void 0 ? void 0 : options.itemModelId) !== null && _b !== void 0 ? _b : null;
13
+ }
14
+ static matchTypeIsSameGroup(count, materialInventoryModelId, options = null) {
15
+ return new UnleashQuantityMaterialSetting(UnleashQuantityMaterialSettingMatchType_1.UnleashQuantityMaterialSettingMatchType.SAME_GROUP, count, {
16
+ materialInventoryModelId: materialInventoryModelId,
17
+ });
18
+ }
19
+ static matchTypeIsSpecified(count, itemModelId, options = null) {
20
+ return new UnleashQuantityMaterialSetting(UnleashQuantityMaterialSettingMatchType_1.UnleashQuantityMaterialSettingMatchType.SPECIFIED, count, {
21
+ itemModelId: itemModelId,
22
+ });
23
+ }
24
+ properties() {
25
+ let properties = {};
26
+ if (this.matchType != null) {
27
+ properties["matchType"] = this.matchType;
28
+ }
29
+ if (this.materialInventoryModelId != null) {
30
+ properties["materialInventoryModelId"] = this.materialInventoryModelId;
31
+ }
32
+ if (this.itemModelId != null) {
33
+ properties["itemModelId"] = this.itemModelId;
34
+ }
35
+ if (this.count != null) {
36
+ properties["count"] = this.count;
37
+ }
38
+ return properties;
39
+ }
40
+ }
41
+ exports.default = UnleashQuantityMaterialSetting;
42
+ //# sourceMappingURL=UnleashQuantityMaterialSetting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnleashQuantityMaterialSetting.js","sourceRoot":"","sources":["UnleashQuantityMaterialSetting.ts"],"names":[],"mappings":";;AAkBA,6GAA0G;AAE1G,MAAqB,8BAA8B;IAM/C,YACI,SAAkD,EAClD,KAAa,EACb,UAAsD,IAAI;;QAN7C,6BAAwB,GAAgB,IAAI,CAAC;QAC7C,gBAAW,GAAgB,IAAI,CAAC;QAO7C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,wBAAwB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,mCAAI,IAAI,CAAC;QAC1E,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,IAAI,CAAC;IACpD,CAAC;IAEM,MAAM,CAAC,oBAAoB,CAC9B,KAAa,EACb,wBAAgC,EAChC,UAA0E,IAAI;QAE9E,OAAO,IAAI,8BAA8B,CACrC,iFAAuC,CAAC,UAAU,EAClD,KAAK,EACL;YACI,wBAAwB,EAAE,wBAAwB;SACrD,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,oBAAoB,CAC9B,KAAa,EACb,WAAmB,EACnB,UAA0E,IAAI;QAE9E,OAAO,IAAI,8BAA8B,CACrC,iFAAuC,CAAC,SAAS,EACjD,KAAK,EACL;YACI,WAAW,EAAE,WAAW;SAC3B,CACJ,CAAC;IACN,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,wBAAwB,IAAI,IAAI,EAAE;YACvC,UAAU,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC,wBAAwB,CAAC;SAC1E;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YAC1B,UAAU,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SAChD;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;AAhED,iDAgEC"}
@@ -0,0 +1,85 @@
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 { UnleashQuantityMaterialSettingOptions } from "./options/UnleashQuantityMaterialSettingOptions";
17
+ import { UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions } from "./options/UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions";
18
+ import { UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions } from "./options/UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions";
19
+ import { UnleashQuantityMaterialSettingMatchType } from "./enums/UnleashQuantityMaterialSettingMatchType";
20
+
21
+ export default class UnleashQuantityMaterialSetting {
22
+ private readonly matchType: UnleashQuantityMaterialSettingMatchType;
23
+ private readonly count: number;
24
+ private readonly materialInventoryModelId: string|null = null;
25
+ private readonly itemModelId: string|null = null;
26
+
27
+ public constructor(
28
+ matchType: UnleashQuantityMaterialSettingMatchType,
29
+ count: number,
30
+ options: UnleashQuantityMaterialSettingOptions|null = null,
31
+ ) {
32
+ this.matchType = matchType;
33
+ this.count = count;
34
+ this.materialInventoryModelId = options?.materialInventoryModelId ?? null;
35
+ this.itemModelId = options?.itemModelId ?? null;
36
+ }
37
+
38
+ public static matchTypeIsSameGroup(
39
+ count: number,
40
+ materialInventoryModelId: string,
41
+ options: UnleashQuantityMaterialSettingMatchTypeIsSameGroupOptions|null = null,
42
+ ): UnleashQuantityMaterialSetting {
43
+ return new UnleashQuantityMaterialSetting(
44
+ UnleashQuantityMaterialSettingMatchType.SAME_GROUP,
45
+ count,
46
+ {
47
+ materialInventoryModelId: materialInventoryModelId,
48
+ },
49
+ );
50
+ }
51
+
52
+ public static matchTypeIsSpecified(
53
+ count: number,
54
+ itemModelId: string,
55
+ options: UnleashQuantityMaterialSettingMatchTypeIsSpecifiedOptions|null = null,
56
+ ): UnleashQuantityMaterialSetting {
57
+ return new UnleashQuantityMaterialSetting(
58
+ UnleashQuantityMaterialSettingMatchType.SPECIFIED,
59
+ count,
60
+ {
61
+ itemModelId: itemModelId,
62
+ },
63
+ );
64
+ }
65
+
66
+ public properties(
67
+ ): {[name: string]: any} {
68
+ let properties: {[name: string]: any} = {};
69
+
70
+ if (this.matchType != null) {
71
+ properties["matchType"] = this.matchType;
72
+ }
73
+ if (this.materialInventoryModelId != null) {
74
+ properties["materialInventoryModelId"] = this.materialInventoryModelId;
75
+ }
76
+ if (this.itemModelId != null) {
77
+ properties["itemModelId"] = this.itemModelId;
78
+ }
79
+ if (this.count != null) {
80
+ properties["count"] = this.count;
81
+ }
82
+
83
+ return properties;
84
+ }
85
+ }
@@ -1,8 +1,16 @@
1
+ import UnleashRecipe from "./UnleashRecipe";
1
2
  import { UnleashRateEntryModelOptions } from "./options/UnleashRateEntryModelOptions";
3
+ import { UnleashRateEntryModelTypeIsSimpleOptions } from "./options/UnleashRateEntryModelTypeIsSimpleOptions";
4
+ import { UnleashRateEntryModelTypeIsRecipeOptions } from "./options/UnleashRateEntryModelTypeIsRecipeOptions";
5
+ import { UnleashRateEntryModelType } from "./enums/UnleashRateEntryModelType";
2
6
  export default class UnleashRateEntryModel {
3
7
  private readonly gradeValue;
8
+ private readonly type;
4
9
  private readonly needCount;
5
- constructor(gradeValue: number, needCount: number, options?: UnleashRateEntryModelOptions | null);
10
+ private readonly recipes;
11
+ constructor(gradeValue: number, type: UnleashRateEntryModelType, options?: UnleashRateEntryModelOptions | null);
12
+ static typeIsSimple(gradeValue: number, needCount: number, options?: UnleashRateEntryModelTypeIsSimpleOptions | null): UnleashRateEntryModel;
13
+ static typeIsRecipe(gradeValue: number, recipes: UnleashRecipe[], options?: UnleashRateEntryModelTypeIsRecipeOptions | null): UnleashRateEntryModel;
6
14
  properties(): {
7
15
  [name: string]: any;
8
16
  };
@@ -1,18 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const UnleashRateEntryModelType_1 = require("./enums/UnleashRateEntryModelType");
3
4
  class UnleashRateEntryModel {
4
- constructor(gradeValue, needCount, options = null) {
5
+ constructor(gradeValue, type, options = null) {
6
+ var _a, _b;
7
+ this.needCount = null;
8
+ this.recipes = null;
5
9
  this.gradeValue = gradeValue;
6
- this.needCount = needCount;
10
+ this.type = type;
11
+ this.needCount = (_a = options === null || options === void 0 ? void 0 : options.needCount) !== null && _a !== void 0 ? _a : null;
12
+ this.recipes = (_b = options === null || options === void 0 ? void 0 : options.recipes) !== null && _b !== void 0 ? _b : null;
13
+ }
14
+ static typeIsSimple(gradeValue, needCount, options = null) {
15
+ return new UnleashRateEntryModel(gradeValue, UnleashRateEntryModelType_1.UnleashRateEntryModelType.SIMPLE, {
16
+ needCount: needCount,
17
+ });
18
+ }
19
+ static typeIsRecipe(gradeValue, recipes, options = null) {
20
+ return new UnleashRateEntryModel(gradeValue, UnleashRateEntryModelType_1.UnleashRateEntryModelType.RECIPE, {
21
+ recipes: recipes,
22
+ });
7
23
  }
8
24
  properties() {
9
25
  let properties = {};
10
26
  if (this.gradeValue != null) {
11
27
  properties["gradeValue"] = this.gradeValue;
12
28
  }
29
+ if (this.type != null) {
30
+ properties["type"] = this.type;
31
+ }
13
32
  if (this.needCount != null) {
14
33
  properties["needCount"] = this.needCount;
15
34
  }
35
+ if (this.recipes != null) {
36
+ properties["recipes"] = this.recipes.map(v => v.properties());
37
+ }
16
38
  return properties;
17
39
  }
18
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UnleashRateEntryModel.js","sourceRoot":"","sources":["UnleashRateEntryModel.ts"],"names":[],"mappings":";;AAiBA,MAAqB,qBAAqB;IAItC,YACI,UAAkB,EAClB,SAAiB,EACjB,UAA6C,IAAI;QAEjD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;SAC9C;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA1BD,wCA0BC"}
1
+ {"version":3,"file":"UnleashRateEntryModel.js","sourceRoot":"","sources":["UnleashRateEntryModel.ts"],"names":[],"mappings":";;AAsBA,iFAA8E;AAE9E,MAAqB,qBAAqB;IAMtC,YACI,UAAkB,EAClB,IAA+B,EAC/B,UAA6C,IAAI;;QANpC,cAAS,GAAgB,IAAI,CAAC;QAC9B,YAAO,GAAyB,IAAI,CAAC;QAOlD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,IAAI,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,IAAI,CAAC;IAC5C,CAAC;IAEM,MAAM,CAAC,YAAY,CACtB,UAAkB,EAClB,SAAiB,EACjB,UAAyD,IAAI;QAE7D,OAAO,IAAI,qBAAqB,CAC5B,UAAU,EACV,qDAAyB,CAAC,MAAM,EAChC;YACI,SAAS,EAAE,SAAS;SACvB,CACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,YAAY,CACtB,UAAkB,EAClB,OAAwB,EACxB,UAAyD,IAAI;QAE7D,OAAO,IAAI,qBAAqB,CAC5B,UAAU,EACV,qDAAyB,CAAC,MAAM,EAChC;YACI,OAAO,EAAE,OAAO;SACnB,CACJ,CAAC;IACN,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;SAC9C;QACD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YACnB,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;SAClC;QACD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;SAC5C;QACD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE;YACtB,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EACrD,CAAC,CAAC;SACV;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAjED,wCAiEC"}