gs2-cdk 1.0.30 → 1.0.31

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 (53) hide show
  1. package/package.json +1 -1
  2. package/skillTree/index.d.ts +12 -0
  3. package/skillTree/index.js +32 -0
  4. package/skillTree/index.js.map +1 -0
  5. package/skillTree/index.ts +36 -0
  6. package/skillTree/model/CurrentMasterData.d.ts +13 -0
  7. package/skillTree/model/CurrentMasterData.js +50 -0
  8. package/skillTree/model/CurrentMasterData.js.map +1 -0
  9. package/skillTree/model/CurrentMasterData.ts +70 -0
  10. package/skillTree/model/Namespace.d.ts +24 -0
  11. package/skillTree/model/Namespace.js +81 -0
  12. package/skillTree/model/Namespace.js.map +1 -0
  13. package/skillTree/model/Namespace.ts +129 -0
  14. package/skillTree/model/NodeModel.d.ts +14 -0
  15. package/skillTree/model/NodeModel.js +37 -0
  16. package/skillTree/model/NodeModel.js.map +1 -0
  17. package/skillTree/model/NodeModel.ts +65 -0
  18. package/skillTree/model/index.d.ts +6 -0
  19. package/skillTree/model/index.js +26 -0
  20. package/skillTree/model/index.js.map +1 -0
  21. package/skillTree/model/index.ts +28 -0
  22. package/skillTree/model/options/NamespaceOptions.d.ts +8 -0
  23. package/skillTree/model/options/NamespaceOptions.js +3 -0
  24. package/skillTree/model/options/NamespaceOptions.js.map +1 -0
  25. package/skillTree/model/options/NamespaceOptions.ts +26 -0
  26. package/skillTree/model/options/NodeModelOptions.d.ts +6 -0
  27. package/skillTree/model/options/NodeModelOptions.js +3 -0
  28. package/skillTree/model/options/NodeModelOptions.js.map +1 -0
  29. package/skillTree/model/options/NodeModelOptions.ts +24 -0
  30. package/skillTree/ref/NamespaceRef.d.ts +11 -0
  31. package/skillTree/ref/NamespaceRef.js +48 -0
  32. package/skillTree/ref/NamespaceRef.js.map +1 -0
  33. package/skillTree/ref/NamespaceRef.ts +81 -0
  34. package/skillTree/ref/NodeModelRef.d.ts +6 -0
  35. package/skillTree/ref/NodeModelRef.js +38 -0
  36. package/skillTree/ref/NodeModelRef.js.map +1 -0
  37. package/skillTree/ref/NodeModelRef.ts +52 -0
  38. package/skillTree/ref/index.d.ts +3 -0
  39. package/skillTree/ref/index.js +24 -0
  40. package/skillTree/ref/index.js.map +1 -0
  41. package/skillTree/ref/index.ts +22 -0
  42. package/skillTree/stampSheet/MarkReleaseByUserId.d.ts +4 -0
  43. package/skillTree/stampSheet/MarkReleaseByUserId.js +29 -0
  44. package/skillTree/stampSheet/MarkReleaseByUserId.js.map +1 -0
  45. package/skillTree/stampSheet/MarkReleaseByUserId.ts +37 -0
  46. package/skillTree/stampSheet/MarkRestrainByUserId.d.ts +4 -0
  47. package/skillTree/stampSheet/MarkRestrainByUserId.js +29 -0
  48. package/skillTree/stampSheet/MarkRestrainByUserId.js.map +1 -0
  49. package/skillTree/stampSheet/MarkRestrainByUserId.ts +37 -0
  50. package/skillTree/stampSheet/index.d.ts +3 -0
  51. package/skillTree/stampSheet/index.js +24 -0
  52. package/skillTree/stampSheet/index.js.map +1 -0
  53. package/skillTree/stampSheet/index.ts +22 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gs2-cdk",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "prepublishOnly": "npm run build"
@@ -0,0 +1,12 @@
1
+ import * as model from "./model";
2
+ import * as ref from "./ref";
3
+ import * as stampSheet from "./stampSheet";
4
+ import { NamespaceRef } from "./ref";
5
+ declare function namespace(namespaceName: string): NamespaceRef;
6
+ declare const _default: {
7
+ model: typeof model;
8
+ ref: typeof ref;
9
+ stampSheet: typeof stampSheet;
10
+ namespace: typeof namespace;
11
+ };
12
+ export default _default;
@@ -0,0 +1,32 @@
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
+ const tslib_1 = require("tslib");
19
+ const model = tslib_1.__importStar(require("./model"));
20
+ const ref = tslib_1.__importStar(require("./ref"));
21
+ const stampSheet = tslib_1.__importStar(require("./stampSheet"));
22
+ const ref_1 = require("./ref");
23
+ function namespace(namespaceName) {
24
+ return new ref_1.NamespaceRef(namespaceName);
25
+ }
26
+ exports.default = {
27
+ model,
28
+ ref,
29
+ stampSheet,
30
+ namespace,
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uDAAiC;AACjC,mDAA6B;AAC7B,iEAA2C;AAC3C,+BAAqC;AAGrC,SAAS,SAAS,CACd,aAAqB;IAErB,OAAO,IAAI,kBAAY,CACnB,aAAa,CAChB,CAAC;AACN,CAAC;AAED,kBAAe;IACX,KAAK;IACL,GAAG;IACH,UAAU;IACV,SAAS;CACZ,CAAC"}
@@ -0,0 +1,36 @@
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
+ import * as model from "./model";
18
+ import * as ref from "./ref";
19
+ import * as stampSheet from "./stampSheet";
20
+ import { NamespaceRef } from "./ref";
21
+
22
+
23
+ function namespace(
24
+ namespaceName: string,
25
+ ): NamespaceRef {
26
+ return new NamespaceRef(
27
+ namespaceName,
28
+ );
29
+ }
30
+
31
+ export default {
32
+ model,
33
+ ref,
34
+ stampSheet,
35
+ namespace,
36
+ };
@@ -0,0 +1,13 @@
1
+ import { CdkResource, Stack } from "../../core/model";
2
+ import NodeModel from "./NodeModel";
3
+ export default class CurrentMasterData extends CdkResource {
4
+ private readonly version;
5
+ private readonly namespaceName;
6
+ private readonly nodeModels;
7
+ constructor(stack: Stack, namespaceName: string, nodeModels: NodeModel[]);
8
+ alternateKeys(): string;
9
+ resourceType(): string;
10
+ properties(): {
11
+ [name: string]: any;
12
+ };
13
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
5
+ * Reserved.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License").
8
+ * You may not use this file except in compliance with the License.
9
+ * A copy of the License is located at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * or in the "license" file accompanying this file. This file is distributed
14
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
15
+ * express or implied. See the License for the specific language governing
16
+ * permissions and limitations under the License.
17
+ */
18
+ const model_1 = require("../../core/model");
19
+ class CurrentMasterData extends model_1.CdkResource {
20
+ constructor(stack, namespaceName, nodeModels) {
21
+ super("SkillTree_CurrentTreeMaster_" + namespaceName);
22
+ this.version = "2023-09-06";
23
+ this.namespaceName = namespaceName;
24
+ this.nodeModels = nodeModels;
25
+ stack.addResource(this);
26
+ }
27
+ alternateKeys() {
28
+ return this.namespaceName;
29
+ }
30
+ resourceType() {
31
+ return "GS2::SkillTree::CurrentTreeMaster";
32
+ }
33
+ properties() {
34
+ let properties = {};
35
+ let settings = {};
36
+ settings["version"] = this.version;
37
+ if (this.nodeModels != null) {
38
+ settings["nodeModels"] = this.nodeModels.map(v => v.properties());
39
+ }
40
+ if (this.namespaceName != null) {
41
+ properties["NamespaceName"] = this.namespaceName;
42
+ }
43
+ if (settings != null) {
44
+ properties["Settings"] = settings;
45
+ }
46
+ return properties;
47
+ }
48
+ }
49
+ exports.default = CurrentMasterData;
50
+ //# sourceMappingURL=CurrentMasterData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurrentMasterData.js","sourceRoot":"","sources":["CurrentMasterData.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;GAcG;AACH,4CAAoD;AAGpD,MAAqB,iBAAkB,SAAQ,mBAAW;IAKtD,YACI,KAAY,EACZ,aAAqB,EACrB,UAAuB;QAEvB,KAAK,CACD,8BAA8B,GAAG,aAAa,CACjD,CAAC;QAXW,YAAO,GAAU,YAAY,CAAC;QAa3C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAK,CAAC,WAAW,CACb,IAAI,CACP,CAAC;IACN,CAAC;IAEM,aAAa;QAEhB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAEM,YAAY;QAEf,OAAO,mCAAmC,CAAC;IAC/C,CAAC;IAEM,UAAU;QAEb,IAAI,UAAU,GAA0B,EAAE,CAAC;QAC3C,IAAI,QAAQ,GAA0B,EAAE,CAAC;QAEzC,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,CAAA;QAClC,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;YACzB,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EACzD,CAAC,CAAC;SACV;QAED,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5B,UAAU,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;SACpD;QACD,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,UAAU,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC;SACrC;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AAnDD,oCAmDC"}
@@ -0,0 +1,70 @@
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 {CdkResource, Stack} from "../../core/model";
17
+ import NodeModel from "./NodeModel";
18
+
19
+ export default class CurrentMasterData extends CdkResource {
20
+ private readonly version: string= "2023-09-06";
21
+ private readonly namespaceName: string;
22
+ private readonly nodeModels: NodeModel[];
23
+
24
+ public constructor(
25
+ stack: Stack,
26
+ namespaceName: string,
27
+ nodeModels: NodeModel[],
28
+ ) {
29
+ super(
30
+ "SkillTree_CurrentTreeMaster_" + namespaceName
31
+ );
32
+
33
+ this.namespaceName = namespaceName;
34
+ this.nodeModels = nodeModels;
35
+ stack.addResource(
36
+ this,
37
+ );
38
+ }
39
+
40
+ public alternateKeys(
41
+ ) {
42
+ return this.namespaceName;
43
+ }
44
+
45
+ public resourceType(
46
+ ): string {
47
+ return "GS2::SkillTree::CurrentTreeMaster";
48
+ }
49
+
50
+ public properties(
51
+ ): {[name: string]: any} {
52
+ let properties: {[name: string]: any} = {};
53
+ let settings: {[name: string]: any} = {};
54
+
55
+ settings["version"] = this.version
56
+ if (this.nodeModels != null) {
57
+ settings["nodeModels"] = this.nodeModels.map(v => v.properties(
58
+ ));
59
+ }
60
+
61
+ if (this.namespaceName != null) {
62
+ properties["NamespaceName"] = this.namespaceName;
63
+ }
64
+ if (settings != null) {
65
+ properties["Settings"] = settings;
66
+ }
67
+
68
+ return properties;
69
+ }
70
+ }
@@ -0,0 +1,24 @@
1
+ import { CdkResource, Stack } from "../../core/model";
2
+ import { GetAttr } from "../../core/func";
3
+ import TransactionSetting from "../../core/model/TransactionSetting";
4
+ import NamespaceRef from "../ref/NamespaceRef";
5
+ import NodeModel from "./NodeModel";
6
+ import { NamespaceOptions } from "./options/NamespaceOptions";
7
+ export default class Namespace extends CdkResource {
8
+ private readonly stack;
9
+ private readonly name;
10
+ private readonly transactionSetting;
11
+ private readonly description;
12
+ private readonly releaseScript;
13
+ private readonly restrainScript;
14
+ private readonly logSetting;
15
+ constructor(stack: Stack, name: string, transactionSetting: TransactionSetting, options?: NamespaceOptions | null);
16
+ alternateKeys(): string;
17
+ resourceType(): string;
18
+ properties(): {
19
+ [name: string]: any;
20
+ };
21
+ ref(): NamespaceRef;
22
+ getAttrNamespaceId(): GetAttr;
23
+ masterData(nodeModels: NodeModel[]): Namespace;
24
+ }
@@ -0,0 +1,81 @@
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
+ const tslib_1 = require("tslib");
19
+ const model_1 = require("../../core/model");
20
+ const func_1 = require("../../core/func");
21
+ const NamespaceRef_1 = tslib_1.__importDefault(require("../ref/NamespaceRef"));
22
+ const CurrentMasterData_1 = tslib_1.__importDefault(require("./CurrentMasterData"));
23
+ class Namespace extends model_1.CdkResource {
24
+ constructor(stack, name, transactionSetting, options = null) {
25
+ var _a, _b, _c, _d;
26
+ super("SkillTree_Namespace_" + name);
27
+ this.description = null;
28
+ this.releaseScript = null;
29
+ this.restrainScript = null;
30
+ this.logSetting = null;
31
+ this.stack = stack;
32
+ this.name = name;
33
+ this.transactionSetting = transactionSetting;
34
+ this.description = (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : null;
35
+ this.releaseScript = (_b = options === null || options === void 0 ? void 0 : options.releaseScript) !== null && _b !== void 0 ? _b : null;
36
+ this.restrainScript = (_c = options === null || options === void 0 ? void 0 : options.restrainScript) !== null && _c !== void 0 ? _c : null;
37
+ this.logSetting = (_d = options === null || options === void 0 ? void 0 : options.logSetting) !== null && _d !== void 0 ? _d : null;
38
+ stack.addResource(this);
39
+ }
40
+ alternateKeys() {
41
+ return "name";
42
+ }
43
+ resourceType() {
44
+ return "GS2::SkillTree::Namespace";
45
+ }
46
+ properties() {
47
+ var _a, _b, _c, _d;
48
+ let properties = {};
49
+ if (this.name != null) {
50
+ properties["Name"] = this.name;
51
+ }
52
+ if (this.description != null) {
53
+ properties["Description"] = this.description;
54
+ }
55
+ if (this.transactionSetting != null) {
56
+ properties["TransactionSetting"] = (_a = this.transactionSetting) === null || _a === void 0 ? void 0 : _a.properties();
57
+ }
58
+ if (this.releaseScript != null) {
59
+ properties["ReleaseScript"] = (_b = this.releaseScript) === null || _b === void 0 ? void 0 : _b.properties();
60
+ }
61
+ if (this.restrainScript != null) {
62
+ properties["RestrainScript"] = (_c = this.restrainScript) === null || _c === void 0 ? void 0 : _c.properties();
63
+ }
64
+ if (this.logSetting != null) {
65
+ properties["LogSetting"] = (_d = this.logSetting) === null || _d === void 0 ? void 0 : _d.properties();
66
+ }
67
+ return properties;
68
+ }
69
+ ref() {
70
+ return new NamespaceRef_1.default(this.name);
71
+ }
72
+ getAttrNamespaceId() {
73
+ return new func_1.GetAttr(this, "Item.NamespaceId", null);
74
+ }
75
+ masterData(nodeModels) {
76
+ new CurrentMasterData_1.default(this.stack, this.name, nodeModels).addDependsOn(this);
77
+ return this;
78
+ }
79
+ }
80
+ exports.default = Namespace;
81
+ //# sourceMappingURL=Namespace.js.map
@@ -0,0 +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;AAKpD,MAAqB,SAAU,SAAQ,mBAAW;IAS9C,YACI,KAAY,EACZ,IAAY,EACZ,kBAAsC,EACtC,UAAiC,IAAI;;QAErC,KAAK,CACD,sBAAsB,GAAG,IAAI,CAChC,CAAC;QAbW,gBAAW,GAAgB,IAAI,CAAC;QAChC,kBAAa,GAAuB,IAAI,CAAC;QACzC,mBAAc,GAAuB,IAAI,CAAC;QAC1C,eAAU,GAAoB,IAAI,CAAC;QAYhD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,IAAI,CAAC;QAChD,IAAI,CAAC,aAAa,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,mCAAI,IAAI,CAAC;QACpD,IAAI,CAAC,cAAc,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,IAAI,CAAC;QACtD,IAAI,CAAC,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CA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C;IACN,CAAC;IAEM,UAAU,CACb,UAAuB;QAEvB,IAAI,2BAAiB,CACjB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,EACT,UAAU,CACb,CAAC,YAAY,CACV,IAAI,CACP,CAAC;QACF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AApGD,4BAoGC"}
@@ -0,0 +1,129 @@
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
+ import {CdkResource, Stack} from "../../core/model";
18
+ import {GetAttr} from "../../core/func";
19
+ import TransactionSetting from "../../core/model/TransactionSetting";
20
+ import ScriptSetting from "../../core/model/ScriptSetting";
21
+ import LogSetting from "../../core/model/LogSetting";
22
+
23
+ import NamespaceRef from "../ref/NamespaceRef";
24
+ import CurrentMasterData from "./CurrentMasterData";
25
+ import NodeModel from "./NodeModel";
26
+
27
+ import { NamespaceOptions } from "./options/NamespaceOptions";
28
+
29
+ export default class Namespace extends CdkResource {
30
+ private readonly stack: Stack;
31
+ private readonly name: string;
32
+ private readonly transactionSetting: TransactionSetting;
33
+ private readonly description: string|null = null;
34
+ private readonly releaseScript: ScriptSetting|null = null;
35
+ private readonly restrainScript: ScriptSetting|null = null;
36
+ private readonly logSetting: LogSetting|null = null;
37
+
38
+ public constructor(
39
+ stack: Stack,
40
+ name: string,
41
+ transactionSetting: TransactionSetting,
42
+ options: NamespaceOptions|null = null,
43
+ ) {
44
+ super(
45
+ "SkillTree_Namespace_" + name
46
+ );
47
+
48
+ this.stack = stack;
49
+ this.name = name;
50
+ this.transactionSetting = transactionSetting;
51
+ this.description = options?.description ?? null;
52
+ this.releaseScript = options?.releaseScript ?? null;
53
+ this.restrainScript = options?.restrainScript ?? null;
54
+ this.logSetting = options?.logSetting ?? null;
55
+ stack.addResource(
56
+ this,
57
+ );
58
+ }
59
+
60
+
61
+ public alternateKeys(
62
+ ) {
63
+ return "name";
64
+ }
65
+
66
+ public resourceType(
67
+ ): string {
68
+ return "GS2::SkillTree::Namespace";
69
+ }
70
+
71
+ public properties(
72
+ ): {[name: string]: any} {
73
+ let properties: {[name: string]: any} = {};
74
+
75
+ if (this.name != null) {
76
+ properties["Name"] = this.name;
77
+ }
78
+ if (this.description != null) {
79
+ properties["Description"] = this.description;
80
+ }
81
+ if (this.transactionSetting != null) {
82
+ properties["TransactionSetting"] = this.transactionSetting?.properties(
83
+ );
84
+ }
85
+ if (this.releaseScript != null) {
86
+ properties["ReleaseScript"] = this.releaseScript?.properties(
87
+ );
88
+ }
89
+ if (this.restrainScript != null) {
90
+ properties["RestrainScript"] = this.restrainScript?.properties(
91
+ );
92
+ }
93
+ if (this.logSetting != null) {
94
+ properties["LogSetting"] = this.logSetting?.properties(
95
+ );
96
+ }
97
+
98
+ return properties;
99
+ }
100
+
101
+ public ref(
102
+ ): NamespaceRef {
103
+ return new NamespaceRef(
104
+ this.name!,
105
+ );
106
+ }
107
+
108
+ public getAttrNamespaceId(
109
+ ): GetAttr {
110
+ return new GetAttr(
111
+ this,
112
+ "Item.NamespaceId",
113
+ null,
114
+ );
115
+ }
116
+
117
+ public masterData(
118
+ nodeModels: NodeModel[],
119
+ ): Namespace {
120
+ new CurrentMasterData(
121
+ this.stack,
122
+ this.name,
123
+ nodeModels,
124
+ ).addDependsOn(
125
+ this,
126
+ );
127
+ return this;
128
+ }
129
+ }
@@ -0,0 +1,14 @@
1
+ import { ConsumeAction } from "../../core/model";
2
+ import { NodeModelOptions } from "./options/NodeModelOptions";
3
+ export default class NodeModel {
4
+ private readonly name;
5
+ private readonly releaseConsumeActions;
6
+ private readonly restrainReturnRate;
7
+ private readonly metadata;
8
+ private readonly returnAcquireActions;
9
+ private readonly premiseNodeNames;
10
+ constructor(name: string, releaseConsumeActions: ConsumeAction[], restrainReturnRate: number, options?: NodeModelOptions | null);
11
+ properties(): {
12
+ [name: string]: any;
13
+ };
14
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class NodeModel {
4
+ constructor(name, releaseConsumeActions, restrainReturnRate, options = null) {
5
+ var _a, _b, _c;
6
+ this.metadata = null;
7
+ this.returnAcquireActions = null;
8
+ this.premiseNodeNames = null;
9
+ this.name = name;
10
+ this.releaseConsumeActions = releaseConsumeActions;
11
+ this.restrainReturnRate = restrainReturnRate;
12
+ this.metadata = (_a = options === null || options === void 0 ? void 0 : options.metadata) !== null && _a !== void 0 ? _a : null;
13
+ this.returnAcquireActions = (_b = options === null || options === void 0 ? void 0 : options.returnAcquireActions) !== null && _b !== void 0 ? _b : null;
14
+ this.premiseNodeNames = (_c = options === null || options === void 0 ? void 0 : options.premiseNodeNames) !== null && _c !== void 0 ? _c : null;
15
+ }
16
+ properties() {
17
+ let properties = {};
18
+ if (this.name != null) {
19
+ properties["name"] = this.name;
20
+ }
21
+ if (this.metadata != null) {
22
+ properties["metadata"] = this.metadata;
23
+ }
24
+ if (this.releaseConsumeActions != null) {
25
+ properties["releaseConsumeActions"] = this.releaseConsumeActions.map(v => v.properties());
26
+ }
27
+ if (this.restrainReturnRate != null) {
28
+ properties["restrainReturnRate"] = this.restrainReturnRate;
29
+ }
30
+ if (this.premiseNodeNames != null) {
31
+ properties["premiseNodeNames"] = this.premiseNodeNames;
32
+ }
33
+ return properties;
34
+ }
35
+ }
36
+ exports.default = NodeModel;
37
+ //# sourceMappingURL=NodeModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeModel.js","sourceRoot":"","sources":["NodeModel.ts"],"names":[],"mappings":";;AAmBA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;SAC9D;QACD,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,EAAE;YAC/B,UAAU,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;SAC1D;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AA7CD,4BA6CC"}
@@ -0,0 +1,65 @@
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 { ConsumeAction } from "../../core/model";
17
+ import { AcquireAction } from "../../core/model";
18
+ import { NodeModelOptions } from "./options/NodeModelOptions";
19
+
20
+ export default class NodeModel {
21
+ private readonly name: string;
22
+ private readonly releaseConsumeActions: ConsumeAction[];
23
+ private readonly restrainReturnRate: number;
24
+ private readonly metadata: string|null = null;
25
+ private readonly returnAcquireActions: AcquireAction[]|null = null;
26
+ private readonly premiseNodeNames: string[]|null = null;
27
+
28
+ public constructor(
29
+ name: string,
30
+ releaseConsumeActions: ConsumeAction[],
31
+ restrainReturnRate: number,
32
+ options: NodeModelOptions|null = null,
33
+ ) {
34
+ this.name = name;
35
+ this.releaseConsumeActions = releaseConsumeActions;
36
+ this.restrainReturnRate = restrainReturnRate;
37
+ this.metadata = options?.metadata ?? null;
38
+ this.returnAcquireActions = options?.returnAcquireActions ?? null;
39
+ this.premiseNodeNames = options?.premiseNodeNames ?? null;
40
+ }
41
+
42
+ public properties(
43
+ ): {[name: string]: any} {
44
+ let properties: {[name: string]: any} = {};
45
+
46
+ if (this.name != null) {
47
+ properties["name"] = this.name;
48
+ }
49
+ if (this.metadata != null) {
50
+ properties["metadata"] = this.metadata;
51
+ }
52
+ if (this.releaseConsumeActions != null) {
53
+ properties["releaseConsumeActions"] = this.releaseConsumeActions.map(v => v.properties(
54
+ ));
55
+ }
56
+ if (this.restrainReturnRate != null) {
57
+ properties["restrainReturnRate"] = this.restrainReturnRate;
58
+ }
59
+ if (this.premiseNodeNames != null) {
60
+ properties["premiseNodeNames"] = this.premiseNodeNames;
61
+ }
62
+
63
+ return properties;
64
+ }
65
+ }
@@ -0,0 +1,6 @@
1
+ import Namespace from "./Namespace";
2
+ import { NamespaceOptions } from "./options/NamespaceOptions";
3
+ import NodeModel from "./NodeModel";
4
+ import { NodeModelOptions } from "./options/NodeModelOptions";
5
+ import CurrentMasterData from "./CurrentMasterData";
6
+ export { Namespace, NamespaceOptions, NodeModel, NodeModelOptions, CurrentMasterData, };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CurrentMasterData = exports.NodeModel = exports.Namespace = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /*
6
+ * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
7
+ * Reserved.
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License").
10
+ * You may not use this file except in compliance with the License.
11
+ * A copy of the License is located at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * or in the "license" file accompanying this file. This file is distributed
16
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
17
+ * express or implied. See the License for the specific language governing
18
+ * permissions and limitations under the License.
19
+ */
20
+ const Namespace_1 = tslib_1.__importDefault(require("./Namespace"));
21
+ exports.Namespace = Namespace_1.default;
22
+ const NodeModel_1 = tslib_1.__importDefault(require("./NodeModel"));
23
+ exports.NodeModel = NodeModel_1.default;
24
+ const CurrentMasterData_1 = tslib_1.__importDefault(require("./CurrentMasterData"));
25
+ exports.CurrentMasterData = CurrentMasterData_1.default;
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,oEAAoC;AAOhC,oBAPG,mBAAS,CAOH;AALb,oEAAoC;AAOhC,oBAPG,mBAAS,CAOH;AALb,oFAAoD;AAOhD,4BAPG,2BAAiB,CAOH"}
@@ -0,0 +1,28 @@
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 Namespace from "./Namespace";
17
+ import { NamespaceOptions } from "./options/NamespaceOptions";
18
+ import NodeModel from "./NodeModel";
19
+ import { NodeModelOptions } from "./options/NodeModelOptions";
20
+ import CurrentMasterData from "./CurrentMasterData";
21
+
22
+ export {
23
+ Namespace,
24
+ NamespaceOptions,
25
+ NodeModel,
26
+ NodeModelOptions,
27
+ CurrentMasterData,
28
+ }