gs2-cdk 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gs2-cdk",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "prepublishOnly": "npm run build"
@@ -1,5 +1,7 @@
1
+ import TriggerByUserId from "../stampSheet/TriggerByUserId";
1
2
  export default class NamespaceRef {
2
3
  private readonly namespaceName;
3
4
  constructor(namespaceName: string);
5
+ trigger(triggerName: string, triggerStrategy: string, ttl: number, userId?: string | null): TriggerByUserId;
4
6
  grn(): string;
5
7
  }
@@ -15,11 +15,16 @@
15
15
  * permissions and limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ const tslib_1 = require("tslib");
18
19
  const func_1 = require("../../core/func");
20
+ const TriggerByUserId_1 = tslib_1.__importDefault(require("../stampSheet/TriggerByUserId"));
19
21
  class NamespaceRef {
20
22
  constructor(namespaceName) {
21
23
  this.namespaceName = namespaceName;
22
24
  }
25
+ trigger(triggerName, triggerStrategy, ttl, userId = "#{userId}") {
26
+ return new TriggerByUserId_1.default(this.namespaceName, triggerName, triggerStrategy, ttl, userId);
27
+ }
23
28
  grn() {
24
29
  return new func_1.Join(":", [
25
30
  "grn",
@@ -1 +1 @@
1
- {"version":3,"file":"NamespaceRef.js","sourceRoot":"","sources":["NamespaceRef.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,0CAA8C;AAE9C,MAAqB,YAAY;IAG7B,YACI,aAAqB;QAErB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAEM,GAAG;QAEN,OAAO,IAAI,WAAI,CACX,GAAG,EACH;YACI,KAAK;YACL,KAAK;YACL,cAAO,CAAC,MAAM,EACb,CAAC,GAAG,EACJ;YACD,cAAO,CAAC,OAAO,EACd,CAAC,GAAG,EACJ;YACD,UAAU;YACV,IAAI,CAAC,aAAa;SACrB,CACJ,CAAC,GAAG,EACJ,CAAC;IACN,CAAC;CACJ;AA5BD,+BA4BC"}
1
+ {"version":3,"file":"NamespaceRef.js","sourceRoot":"","sources":["NamespaceRef.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0CAA8C;AAC9C,4FAA4D;AAE5D,MAAqB,YAAY;IAG7B,YACI,aAAqB;QAErB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAEM,OAAO,CACV,WAAmB,EACnB,eAAuB,EACvB,GAAW,EACX,SAAsB,WAAW;QAEjC,OAAO,IAAI,yBAAe,CACtB,IAAI,CAAC,aAAa,EAClB,WAAW,EACX,eAAe,EACf,GAAG,EACH,MAAM,CACT,CAAC;IACN,CAAC;IAEM,GAAG;QAEN,OAAO,IAAI,WAAI,CACX,GAAG,EACH;YACI,KAAK;YACL,KAAK;YACL,cAAO,CAAC,MAAM,EACb,CAAC,GAAG,EACJ;YACD,cAAO,CAAC,OAAO,EACd,CAAC,GAAG,EACJ;YACD,UAAU;YACV,IAAI,CAAC,aAAa;SACrB,CACJ,CAAC,GAAG,EACJ,CAAC;IACN,CAAC;CACJ;AA3CD,+BA2CC"}
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import {GetAttr, Join} from "../../core/func";
18
+ import TriggerByUserId from "../stampSheet/TriggerByUserId";
18
19
 
19
20
  export default class NamespaceRef {
20
21
  private readonly namespaceName: string;
@@ -25,6 +26,21 @@ export default class NamespaceRef {
25
26
  this.namespaceName = namespaceName;
26
27
  }
27
28
 
29
+ public trigger(
30
+ triggerName: string,
31
+ triggerStrategy: string,
32
+ ttl: number,
33
+ userId: string|null = "#{userId}",
34
+ ): TriggerByUserId {
35
+ return new TriggerByUserId(
36
+ this.namespaceName,
37
+ triggerName,
38
+ triggerStrategy,
39
+ ttl,
40
+ userId,
41
+ );
42
+ }
43
+
28
44
  public grn(
29
45
  ): string {
30
46
  return new Join(
@@ -0,0 +1,4 @@
1
+ import { AcquireAction } from "../../core/model";
2
+ export default class TriggerByUserId extends AcquireAction {
3
+ constructor(namespaceName: string, triggerName: string, triggerStrategy: string, ttl: number, userId?: string | null);
4
+ }
@@ -0,0 +1,31 @@
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 model_1 = require("../../core/model");
19
+ class TriggerByUserId extends model_1.AcquireAction {
20
+ constructor(namespaceName, triggerName, triggerStrategy, ttl, userId = "#{userId}") {
21
+ let properties = {};
22
+ properties["namespaceName"] = namespaceName;
23
+ properties["triggerName"] = triggerName;
24
+ properties["triggerStrategy"] = triggerStrategy;
25
+ properties["ttl"] = ttl;
26
+ properties["userId"] = userId;
27
+ super("Gs2Schedule:TriggerByUserId", properties);
28
+ }
29
+ }
30
+ exports.default = TriggerByUserId;
31
+ //# sourceMappingURL=TriggerByUserId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggerByUserId.js","sourceRoot":"","sources":["TriggerByUserId.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,4CAA8D;AAE9D,MAAqB,eAAgB,SAAQ,qBAAa;IAEtD,YACI,aAAqB,EACrB,WAAmB,EACnB,eAAuB,EACvB,GAAW,EACX,SAAsB,WAAW;QAEjC,IAAI,UAAU,GAA0B,EAAE,CAAC;QAE3C,UAAU,CAAC,eAAe,CAAC,GAAG,aAAa,CAAA;QAC3C,UAAU,CAAC,aAAa,CAAC,GAAG,WAAW,CAAA;QACvC,UAAU,CAAC,iBAAiB,CAAC,GAAG,eAAe,CAAA;QAC/C,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,CAAA;QACvB,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAA;QAE7B,KAAK,CACD,6BAA6B,EAC7B,UAAU,CACb,CAAC;IACN,CAAC;CACJ;AAtBD,kCAsBC"}
@@ -0,0 +1,41 @@
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 {AcquireAction, ConsumeAction} from "../../core/model";
18
+
19
+ export default class TriggerByUserId extends AcquireAction {
20
+
21
+ public constructor(
22
+ namespaceName: string,
23
+ triggerName: string,
24
+ triggerStrategy: string,
25
+ ttl: number,
26
+ userId: string|null = "#{userId}",
27
+ ) {
28
+ let properties: {[name: string]: any} = {};
29
+
30
+ properties["namespaceName"] = namespaceName
31
+ properties["triggerName"] = triggerName
32
+ properties["triggerStrategy"] = triggerStrategy
33
+ properties["ttl"] = ttl
34
+ properties["userId"] = userId
35
+
36
+ super(
37
+ "Gs2Schedule:TriggerByUserId",
38
+ properties,
39
+ );
40
+ }
41
+ }
@@ -1 +1,2 @@
1
- export {};
1
+ import TriggerByUserId from "./TriggerByUserId";
2
+ export { TriggerByUserId, };
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TriggerByUserId = void 0;
4
+ const tslib_1 = require("tslib");
2
5
  /*
3
6
  * Copyright 2016- Game Server Services, Inc. or its affiliates. All Rights
4
7
  * Reserved.
@@ -14,5 +17,6 @@
14
17
  * express or implied. See the License for the specific language governing
15
18
  * permissions and limitations under the License.
16
19
  */
17
- Object.defineProperty(exports, "__esModule", { value: true });
20
+ const TriggerByUserId_1 = tslib_1.__importDefault(require("./TriggerByUserId"));
21
+ exports.TriggerByUserId = TriggerByUserId_1.default;
18
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,gFAAgD;AAG5C,0BAHG,yBAAe,CAGH"}
@@ -13,6 +13,8 @@
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 TriggerByUserId from "./TriggerByUserId";
16
17
 
17
18
  export {
19
+ TriggerByUserId,
18
20
  }