gs2 1.3.116 → 1.3.118
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/exchange/request/AcquireByUserIdRequest.d.ts +0 -4
- package/exchange/request/AcquireByUserIdRequest.js +0 -14
- package/exchange/request/AcquireByUserIdRequest.js.map +1 -1
- package/exchange/request/AcquireByUserIdRequest.ts +0 -14
- package/exchange/request/AcquireForceByUserIdRequest.d.ts +0 -4
- package/exchange/request/AcquireForceByUserIdRequest.js +0 -14
- package/exchange/request/AcquireForceByUserIdRequest.js.map +1 -1
- package/exchange/request/AcquireForceByUserIdRequest.ts +0 -14
- package/exchange/request/AcquireRequest.d.ts +0 -4
- package/exchange/request/AcquireRequest.js +0 -14
- package/exchange/request/AcquireRequest.js.map +1 -1
- package/exchange/request/AcquireRequest.ts +0 -14
- package/exchange/request/DeleteAwaitByUserIdRequest.d.ts +0 -4
- package/exchange/request/DeleteAwaitByUserIdRequest.js +0 -14
- package/exchange/request/DeleteAwaitByUserIdRequest.js.map +1 -1
- package/exchange/request/DeleteAwaitByUserIdRequest.ts +0 -14
- package/exchange/request/DeleteAwaitRequest.d.ts +0 -4
- package/exchange/request/DeleteAwaitRequest.js +0 -14
- package/exchange/request/DeleteAwaitRequest.js.map +1 -1
- package/exchange/request/DeleteAwaitRequest.ts +0 -14
- package/exchange/request/GetAwaitByUserIdRequest.d.ts +0 -4
- package/exchange/request/GetAwaitByUserIdRequest.js +0 -14
- package/exchange/request/GetAwaitByUserIdRequest.js.map +1 -1
- package/exchange/request/GetAwaitByUserIdRequest.ts +0 -14
- package/exchange/request/GetAwaitRequest.d.ts +0 -4
- package/exchange/request/GetAwaitRequest.js +0 -14
- package/exchange/request/GetAwaitRequest.js.map +1 -1
- package/exchange/request/GetAwaitRequest.ts +0 -14
- package/exchange/request/SkipByUserIdRequest.d.ts +0 -4
- package/exchange/request/SkipByUserIdRequest.js +0 -14
- package/exchange/request/SkipByUserIdRequest.js.map +1 -1
- package/exchange/request/SkipByUserIdRequest.ts +0 -14
- package/exchange/request/SkipRequest.d.ts +0 -4
- package/exchange/request/SkipRequest.js +0 -14
- package/exchange/request/SkipRequest.js.map +1 -1
- package/exchange/request/SkipRequest.ts +0 -14
- package/exchange/rest.js +52 -61
- package/exchange/rest.js.map +1 -1
- package/exchange/rest.ts +9 -18
- package/lottery/model/BoxItems.d.ts +7 -0
- package/lottery/model/BoxItems.js +87 -0
- package/lottery/model/BoxItems.js.map +1 -1
- package/lottery/model/BoxItems.ts +105 -0
- package/lottery/request/index.d.ts +7 -7
- package/lottery/request/index.js +13 -13
- package/lottery/request/index.js.map +1 -1
- package/lottery/request/index.ts +12 -12
- package/lottery/rest.d.ts +6 -6
- package/lottery/rest.js +158 -158
- package/lottery/rest.js.map +1 -1
- package/lottery/rest.ts +153 -153
- package/lottery/result/index.d.ts +7 -7
- package/lottery/result/index.js +13 -13
- package/lottery/result/index.js.map +1 -1
- package/lottery/result/index.ts +12 -12
- package/package.json +1 -1
- package/ranking/model/SubscribeUser.d.ts +12 -0
- package/ranking/model/SubscribeUser.js +123 -0
- package/ranking/model/SubscribeUser.js.map +1 -1
- package/ranking/model/SubscribeUser.ts +144 -0
|
@@ -14,12 +14,6 @@ import CreatePrizeTableMasterResult from "./CreatePrizeTableMasterResult";
|
|
|
14
14
|
import GetPrizeTableMasterResult from "./GetPrizeTableMasterResult";
|
|
15
15
|
import UpdatePrizeTableMasterResult from "./UpdatePrizeTableMasterResult";
|
|
16
16
|
import DeletePrizeTableMasterResult from "./DeletePrizeTableMasterResult";
|
|
17
|
-
import DescribeBoxesResult from "./DescribeBoxesResult";
|
|
18
|
-
import DescribeBoxesByUserIdResult from "./DescribeBoxesByUserIdResult";
|
|
19
|
-
import GetBoxResult from "./GetBoxResult";
|
|
20
|
-
import GetBoxByUserIdResult from "./GetBoxByUserIdResult";
|
|
21
|
-
import ResetBoxResult from "./ResetBoxResult";
|
|
22
|
-
import ResetBoxByUserIdResult from "./ResetBoxByUserIdResult";
|
|
23
17
|
import DescribeLotteryModelsResult from "./DescribeLotteryModelsResult";
|
|
24
18
|
import GetLotteryModelResult from "./GetLotteryModelResult";
|
|
25
19
|
import DescribePrizeTablesResult from "./DescribePrizeTablesResult";
|
|
@@ -35,4 +29,10 @@ import UpdateCurrentLotteryMasterFromGitHubResult from "./UpdateCurrentLotteryMa
|
|
|
35
29
|
import DescribePrizeLimitsResult from "./DescribePrizeLimitsResult";
|
|
36
30
|
import GetPrizeLimitResult from "./GetPrizeLimitResult";
|
|
37
31
|
import ResetPrizeLimitResult from "./ResetPrizeLimitResult";
|
|
38
|
-
|
|
32
|
+
import DescribeBoxesResult from "./DescribeBoxesResult";
|
|
33
|
+
import DescribeBoxesByUserIdResult from "./DescribeBoxesByUserIdResult";
|
|
34
|
+
import GetBoxResult from "./GetBoxResult";
|
|
35
|
+
import GetBoxByUserIdResult from "./GetBoxByUserIdResult";
|
|
36
|
+
import ResetBoxResult from "./ResetBoxResult";
|
|
37
|
+
import ResetBoxByUserIdResult from "./ResetBoxByUserIdResult";
|
|
38
|
+
export { DescribeNamespacesResult, CreateNamespaceResult, GetNamespaceStatusResult, GetNamespaceResult, UpdateNamespaceResult, DeleteNamespaceResult, DescribeLotteryModelMastersResult, CreateLotteryModelMasterResult, GetLotteryModelMasterResult, UpdateLotteryModelMasterResult, DeleteLotteryModelMasterResult, DescribePrizeTableMastersResult, CreatePrizeTableMasterResult, GetPrizeTableMasterResult, UpdatePrizeTableMasterResult, DeletePrizeTableMasterResult, DescribeLotteryModelsResult, GetLotteryModelResult, DescribePrizeTablesResult, GetPrizeTableResult, DrawByUserIdResult, DrawByStampSheetResult, DescribeProbabilitiesResult, DescribeProbabilitiesByUserIdResult, ExportMasterResult, GetCurrentLotteryMasterResult, UpdateCurrentLotteryMasterResult, UpdateCurrentLotteryMasterFromGitHubResult, DescribePrizeLimitsResult, GetPrizeLimitResult, ResetPrizeLimitResult, DescribeBoxesResult, DescribeBoxesByUserIdResult, GetBoxResult, GetBoxByUserIdResult, ResetBoxResult, ResetBoxByUserIdResult, };
|
package/lottery/result/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ResetBoxByUserIdResult = exports.ResetBoxResult = exports.GetBoxByUserIdResult = exports.GetBoxResult = exports.DescribeBoxesByUserIdResult = exports.DescribeBoxesResult = exports.ResetPrizeLimitResult = exports.GetPrizeLimitResult = exports.DescribePrizeLimitsResult = exports.UpdateCurrentLotteryMasterFromGitHubResult = exports.UpdateCurrentLotteryMasterResult = exports.GetCurrentLotteryMasterResult = exports.ExportMasterResult = exports.DescribeProbabilitiesByUserIdResult = exports.DescribeProbabilitiesResult = exports.DrawByStampSheetResult = exports.DrawByUserIdResult = exports.GetPrizeTableResult = exports.DescribePrizeTablesResult = exports.GetLotteryModelResult = exports.DescribeLotteryModelsResult = exports.DeletePrizeTableMasterResult = exports.UpdatePrizeTableMasterResult = exports.GetPrizeTableMasterResult = exports.CreatePrizeTableMasterResult = exports.DescribePrizeTableMastersResult = exports.DeleteLotteryModelMasterResult = exports.UpdateLotteryModelMasterResult = exports.GetLotteryModelMasterResult = exports.CreateLotteryModelMasterResult = exports.DescribeLotteryModelMastersResult = exports.DeleteNamespaceResult = exports.UpdateNamespaceResult = exports.GetNamespaceResult = exports.GetNamespaceStatusResult = exports.CreateNamespaceResult = exports.DescribeNamespacesResult = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
/*
|
|
6
6
|
Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
|
|
@@ -49,18 +49,6 @@ var UpdatePrizeTableMasterResult_1 = tslib_1.__importDefault(require("./UpdatePr
|
|
|
49
49
|
exports.UpdatePrizeTableMasterResult = UpdatePrizeTableMasterResult_1.default;
|
|
50
50
|
var DeletePrizeTableMasterResult_1 = tslib_1.__importDefault(require("./DeletePrizeTableMasterResult"));
|
|
51
51
|
exports.DeletePrizeTableMasterResult = DeletePrizeTableMasterResult_1.default;
|
|
52
|
-
var DescribeBoxesResult_1 = tslib_1.__importDefault(require("./DescribeBoxesResult"));
|
|
53
|
-
exports.DescribeBoxesResult = DescribeBoxesResult_1.default;
|
|
54
|
-
var DescribeBoxesByUserIdResult_1 = tslib_1.__importDefault(require("./DescribeBoxesByUserIdResult"));
|
|
55
|
-
exports.DescribeBoxesByUserIdResult = DescribeBoxesByUserIdResult_1.default;
|
|
56
|
-
var GetBoxResult_1 = tslib_1.__importDefault(require("./GetBoxResult"));
|
|
57
|
-
exports.GetBoxResult = GetBoxResult_1.default;
|
|
58
|
-
var GetBoxByUserIdResult_1 = tslib_1.__importDefault(require("./GetBoxByUserIdResult"));
|
|
59
|
-
exports.GetBoxByUserIdResult = GetBoxByUserIdResult_1.default;
|
|
60
|
-
var ResetBoxResult_1 = tslib_1.__importDefault(require("./ResetBoxResult"));
|
|
61
|
-
exports.ResetBoxResult = ResetBoxResult_1.default;
|
|
62
|
-
var ResetBoxByUserIdResult_1 = tslib_1.__importDefault(require("./ResetBoxByUserIdResult"));
|
|
63
|
-
exports.ResetBoxByUserIdResult = ResetBoxByUserIdResult_1.default;
|
|
64
52
|
var DescribeLotteryModelsResult_1 = tslib_1.__importDefault(require("./DescribeLotteryModelsResult"));
|
|
65
53
|
exports.DescribeLotteryModelsResult = DescribeLotteryModelsResult_1.default;
|
|
66
54
|
var GetLotteryModelResult_1 = tslib_1.__importDefault(require("./GetLotteryModelResult"));
|
|
@@ -91,4 +79,16 @@ var GetPrizeLimitResult_1 = tslib_1.__importDefault(require("./GetPrizeLimitResu
|
|
|
91
79
|
exports.GetPrizeLimitResult = GetPrizeLimitResult_1.default;
|
|
92
80
|
var ResetPrizeLimitResult_1 = tslib_1.__importDefault(require("./ResetPrizeLimitResult"));
|
|
93
81
|
exports.ResetPrizeLimitResult = ResetPrizeLimitResult_1.default;
|
|
82
|
+
var DescribeBoxesResult_1 = tslib_1.__importDefault(require("./DescribeBoxesResult"));
|
|
83
|
+
exports.DescribeBoxesResult = DescribeBoxesResult_1.default;
|
|
84
|
+
var DescribeBoxesByUserIdResult_1 = tslib_1.__importDefault(require("./DescribeBoxesByUserIdResult"));
|
|
85
|
+
exports.DescribeBoxesByUserIdResult = DescribeBoxesByUserIdResult_1.default;
|
|
86
|
+
var GetBoxResult_1 = tslib_1.__importDefault(require("./GetBoxResult"));
|
|
87
|
+
exports.GetBoxResult = GetBoxResult_1.default;
|
|
88
|
+
var GetBoxByUserIdResult_1 = tslib_1.__importDefault(require("./GetBoxByUserIdResult"));
|
|
89
|
+
exports.GetBoxByUserIdResult = GetBoxByUserIdResult_1.default;
|
|
90
|
+
var ResetBoxResult_1 = tslib_1.__importDefault(require("./ResetBoxResult"));
|
|
91
|
+
exports.ResetBoxResult = ResetBoxResult_1.default;
|
|
92
|
+
var ResetBoxByUserIdResult_1 = tslib_1.__importDefault(require("./ResetBoxByUserIdResult"));
|
|
93
|
+
exports.ResetBoxByUserIdResult = ResetBoxByUserIdResult_1.default;
|
|
94
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,gGAAiE;AAuC7D,mCAvCG,kCAAwB,CAuCH;AAtC5B,0FAA2D;AAuCvD,gCAvCG,+BAAqB,CAuCH;AAtCzB,gGAAiE;AAuC7D,mCAvCG,kCAAwB,CAuCH;AAtC5B,oFAAqD;AAuCjD,6BAvCG,4BAAkB,CAuCH;AAtCtB,0FAA2D;AAuCvD,gCAvCG,+BAAqB,CAuCH;AAtCzB,0FAA2D;AAuCvD,gCAvCG,+BAAqB,CAuCH;AAtCzB,kHAAmF;AAuC/E,4CAvCG,2CAAiC,CAuCH;AAtCrC,4GAA6E;AAuCzE,yCAvCG,wCAA8B,CAuCH;AAtClC,sGAAuE;AAuCnE,sCA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AA4B,CAuCH;AAtChC,sGAAuE;AAuCnE,sCAvCG,qCAA2B,CAuCH;AAtC/B,0FAA2D;AAuCvD,gCAvCG,+BAAqB,CAuCH;AAtCzB,kGAAmE;AAuC/D,oCAvCG,mCAAyB,CAuCH;AAtC7B,sFAAuD;AAuCnD,8BAvCG,6BAAmB,CAuCH;AAtCvB,oFAAqD;AAuCjD,6BAvCG,4BAAkB,CAuCH;AAtCtB,4FAA6D;AAuCzD,iCAvCG,gCAAsB,CAuCH;AAtC1B,sGAAuE;AAuCnE,sCAvCG,qCAA2B,CAuCH;AAtC/B,sHAAuF;AAuCnF,8CAvCG,6CAAmC,CAuCH;AAtCvC,oFAAqD;AAuCjD,6BAvCG,4BAAkB,CAuCH;AAtCtB,0GAA2E;AAuCvE,wCAvCG,uCAA6B,CAuCH;AAtCjC,gHAAiF;AAuC7E,2CAvCG,0CAAgC,CAuCH;AAtCpC,oIAAqG;AAuCjG,qDAvCG,oDAA0C,CAuCH;AAtC9C,kGAAmE;AAuC/D,oCAvCG,mCAAyB,CAuCH;AAtC7B,sFAAuD;AAuCnD,8BAvCG,6BAAmB,CAuCH;AAtCvB,0FAA2D;AAuCvD,gCAvCG,+BAAqB,CAuCH;AAtCzB,sFAAuD;AAuCnD,8BAvCG,6BAAmB,CAuCH;AAtCvB,sGAAuE;AAuCnE,sCAvCG,qCAA2B,CAuCH;AAtC/B,wEAAyC;AAuCrC,uBAvCG,sBAAY,CAuCH;AAtChB,wFAAyD;AAuCrD,+BAvCG,8BAAoB,CAuCH;AAtCxB,4EAA6C;AAuCzC,yBAvCG,wBAAc,CAuCH;AAtClB,4FAA6D;AAuCzD,iCAvCG,gCAAsB,CAuCH"}
|
package/lottery/result/index.ts
CHANGED
|
@@ -29,12 +29,6 @@ import CreatePrizeTableMasterResult from "./CreatePrizeTableMasterResult"
|
|
|
29
29
|
import GetPrizeTableMasterResult from "./GetPrizeTableMasterResult"
|
|
30
30
|
import UpdatePrizeTableMasterResult from "./UpdatePrizeTableMasterResult"
|
|
31
31
|
import DeletePrizeTableMasterResult from "./DeletePrizeTableMasterResult"
|
|
32
|
-
import DescribeBoxesResult from "./DescribeBoxesResult"
|
|
33
|
-
import DescribeBoxesByUserIdResult from "./DescribeBoxesByUserIdResult"
|
|
34
|
-
import GetBoxResult from "./GetBoxResult"
|
|
35
|
-
import GetBoxByUserIdResult from "./GetBoxByUserIdResult"
|
|
36
|
-
import ResetBoxResult from "./ResetBoxResult"
|
|
37
|
-
import ResetBoxByUserIdResult from "./ResetBoxByUserIdResult"
|
|
38
32
|
import DescribeLotteryModelsResult from "./DescribeLotteryModelsResult"
|
|
39
33
|
import GetLotteryModelResult from "./GetLotteryModelResult"
|
|
40
34
|
import DescribePrizeTablesResult from "./DescribePrizeTablesResult"
|
|
@@ -50,6 +44,12 @@ import UpdateCurrentLotteryMasterFromGitHubResult from "./UpdateCurrentLotteryMa
|
|
|
50
44
|
import DescribePrizeLimitsResult from "./DescribePrizeLimitsResult"
|
|
51
45
|
import GetPrizeLimitResult from "./GetPrizeLimitResult"
|
|
52
46
|
import ResetPrizeLimitResult from "./ResetPrizeLimitResult"
|
|
47
|
+
import DescribeBoxesResult from "./DescribeBoxesResult"
|
|
48
|
+
import DescribeBoxesByUserIdResult from "./DescribeBoxesByUserIdResult"
|
|
49
|
+
import GetBoxResult from "./GetBoxResult"
|
|
50
|
+
import GetBoxByUserIdResult from "./GetBoxByUserIdResult"
|
|
51
|
+
import ResetBoxResult from "./ResetBoxResult"
|
|
52
|
+
import ResetBoxByUserIdResult from "./ResetBoxByUserIdResult"
|
|
53
53
|
|
|
54
54
|
export {
|
|
55
55
|
DescribeNamespacesResult,
|
|
@@ -68,12 +68,6 @@ export {
|
|
|
68
68
|
GetPrizeTableMasterResult,
|
|
69
69
|
UpdatePrizeTableMasterResult,
|
|
70
70
|
DeletePrizeTableMasterResult,
|
|
71
|
-
DescribeBoxesResult,
|
|
72
|
-
DescribeBoxesByUserIdResult,
|
|
73
|
-
GetBoxResult,
|
|
74
|
-
GetBoxByUserIdResult,
|
|
75
|
-
ResetBoxResult,
|
|
76
|
-
ResetBoxByUserIdResult,
|
|
77
71
|
DescribeLotteryModelsResult,
|
|
78
72
|
GetLotteryModelResult,
|
|
79
73
|
DescribePrizeTablesResult,
|
|
@@ -89,4 +83,10 @@ export {
|
|
|
89
83
|
DescribePrizeLimitsResult,
|
|
90
84
|
GetPrizeLimitResult,
|
|
91
85
|
ResetPrizeLimitResult,
|
|
86
|
+
DescribeBoxesResult,
|
|
87
|
+
DescribeBoxesByUserIdResult,
|
|
88
|
+
GetBoxResult,
|
|
89
|
+
GetBoxByUserIdResult,
|
|
90
|
+
ResetBoxResult,
|
|
91
|
+
ResetBoxByUserIdResult,
|
|
92
92
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import IModel from '../../core/interface/IModel';
|
|
2
2
|
export default class SubscribeUser implements IModel {
|
|
3
|
+
private subscribeUserId;
|
|
3
4
|
private categoryName;
|
|
4
5
|
private userId;
|
|
5
6
|
private targetUserId;
|
|
7
|
+
static getRegion(grn: string): string | null;
|
|
8
|
+
static getOwnerId(grn: string): string | null;
|
|
9
|
+
static getNamespaceName(grn: string): string | null;
|
|
10
|
+
static getUserId(grn: string): string | null;
|
|
11
|
+
static getCategoryName(grn: string): string | null;
|
|
12
|
+
static getTargetUserId(grn: string): string | null;
|
|
13
|
+
static isValid(grn: string): boolean;
|
|
14
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, userId: string | null, categoryName: string | null, targetUserId: string | null): string | null;
|
|
15
|
+
getSubscribeUserId(): string | null;
|
|
16
|
+
setSubscribeUserId(subscribeUserId: string | null): this;
|
|
17
|
+
withSubscribeUserId(subscribeUserId: string | null): this;
|
|
6
18
|
getCategoryName(): string | null;
|
|
7
19
|
setCategoryName(categoryName: string | null): this;
|
|
8
20
|
withCategoryName(categoryName: string | null): this;
|
|
@@ -15,12 +15,133 @@ express or implied. See the License for the specific language governing
|
|
|
15
15
|
permissions and limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var grnFormat = "grn:gs2:{region}:{ownerId}:ranking:{namespaceName}:user:{userId}:subscribe:category:{categoryName}:{targetUserId}";
|
|
18
19
|
var SubscribeUser = /** @class */ (function () {
|
|
19
20
|
function SubscribeUser() {
|
|
21
|
+
this.subscribeUserId = null;
|
|
20
22
|
this.categoryName = null;
|
|
21
23
|
this.userId = null;
|
|
22
24
|
this.targetUserId = null;
|
|
23
25
|
}
|
|
26
|
+
SubscribeUser.getRegion = function (grn) {
|
|
27
|
+
var match = grn.match(grnFormat
|
|
28
|
+
.replace('{region}', '(.*)')
|
|
29
|
+
.replace('{ownerId}', '.*')
|
|
30
|
+
.replace('{namespaceName}', '.*')
|
|
31
|
+
.replace('{userId}', '.*')
|
|
32
|
+
.replace('{categoryName}', '.*')
|
|
33
|
+
.replace('{targetUserId}', '.*'));
|
|
34
|
+
if (match) {
|
|
35
|
+
return match[1];
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
SubscribeUser.getOwnerId = function (grn) {
|
|
40
|
+
var match = grn.match(grnFormat
|
|
41
|
+
.replace('{region}', '.*')
|
|
42
|
+
.replace('{ownerId}', '(.*)')
|
|
43
|
+
.replace('{namespaceName}', '.*')
|
|
44
|
+
.replace('{userId}', '.*')
|
|
45
|
+
.replace('{categoryName}', '.*')
|
|
46
|
+
.replace('{targetUserId}', '.*'));
|
|
47
|
+
if (match) {
|
|
48
|
+
return match[1];
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
52
|
+
SubscribeUser.getNamespaceName = function (grn) {
|
|
53
|
+
var match = grn.match(grnFormat
|
|
54
|
+
.replace('{region}', '.*')
|
|
55
|
+
.replace('{ownerId}', '.*')
|
|
56
|
+
.replace('{namespaceName}', '(.*)')
|
|
57
|
+
.replace('{userId}', '.*')
|
|
58
|
+
.replace('{categoryName}', '.*')
|
|
59
|
+
.replace('{targetUserId}', '.*'));
|
|
60
|
+
if (match) {
|
|
61
|
+
return match[1];
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
};
|
|
65
|
+
SubscribeUser.getUserId = function (grn) {
|
|
66
|
+
var match = grn.match(grnFormat
|
|
67
|
+
.replace('{region}', '.*')
|
|
68
|
+
.replace('{ownerId}', '.*')
|
|
69
|
+
.replace('{namespaceName}', '.*')
|
|
70
|
+
.replace('{userId}', '(.*)')
|
|
71
|
+
.replace('{categoryName}', '.*')
|
|
72
|
+
.replace('{targetUserId}', '.*'));
|
|
73
|
+
if (match) {
|
|
74
|
+
return match[1];
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
78
|
+
SubscribeUser.getCategoryName = function (grn) {
|
|
79
|
+
var match = grn.match(grnFormat
|
|
80
|
+
.replace('{region}', '.*')
|
|
81
|
+
.replace('{ownerId}', '.*')
|
|
82
|
+
.replace('{namespaceName}', '.*')
|
|
83
|
+
.replace('{userId}', '.*')
|
|
84
|
+
.replace('{categoryName}', '(.*)')
|
|
85
|
+
.replace('{targetUserId}', '.*'));
|
|
86
|
+
if (match) {
|
|
87
|
+
return match[1];
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
};
|
|
91
|
+
SubscribeUser.getTargetUserId = function (grn) {
|
|
92
|
+
var match = grn.match(grnFormat
|
|
93
|
+
.replace('{region}', '.*')
|
|
94
|
+
.replace('{ownerId}', '.*')
|
|
95
|
+
.replace('{namespaceName}', '.*')
|
|
96
|
+
.replace('{userId}', '.*')
|
|
97
|
+
.replace('{categoryName}', '.*')
|
|
98
|
+
.replace('{targetUserId}', '(.*)'));
|
|
99
|
+
if (match) {
|
|
100
|
+
return match[1];
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
};
|
|
104
|
+
SubscribeUser.isValid = function (grn) {
|
|
105
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (this.getUserId(grn) == null || this.getUserId(grn) === '') {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
if (this.getCategoryName(grn) == null || this.getCategoryName(grn) === '') {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
if (this.getTargetUserId(grn) == null || this.getTargetUserId(grn) === '') {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
};
|
|
125
|
+
SubscribeUser.createGrn = function (region, ownerId, namespaceName, userId, categoryName, targetUserId) {
|
|
126
|
+
return grnFormat
|
|
127
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
128
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
129
|
+
.replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
|
|
130
|
+
.replace('{userId}', userId !== null && userId !== void 0 ? userId : '')
|
|
131
|
+
.replace('{categoryName}', categoryName !== null && categoryName !== void 0 ? categoryName : '')
|
|
132
|
+
.replace('{targetUserId}', targetUserId !== null && targetUserId !== void 0 ? targetUserId : '');
|
|
133
|
+
};
|
|
134
|
+
SubscribeUser.prototype.getSubscribeUserId = function () {
|
|
135
|
+
return this.subscribeUserId;
|
|
136
|
+
};
|
|
137
|
+
SubscribeUser.prototype.setSubscribeUserId = function (subscribeUserId) {
|
|
138
|
+
this.subscribeUserId = subscribeUserId;
|
|
139
|
+
return this;
|
|
140
|
+
};
|
|
141
|
+
SubscribeUser.prototype.withSubscribeUserId = function (subscribeUserId) {
|
|
142
|
+
this.subscribeUserId = subscribeUserId;
|
|
143
|
+
return this;
|
|
144
|
+
};
|
|
24
145
|
SubscribeUser.prototype.getCategoryName = function () {
|
|
25
146
|
return this.categoryName;
|
|
26
147
|
};
|
|
@@ -59,12 +180,14 @@ var SubscribeUser = /** @class */ (function () {
|
|
|
59
180
|
return null;
|
|
60
181
|
}
|
|
61
182
|
return new SubscribeUser()
|
|
183
|
+
.withSubscribeUserId(data["subscribeUserId"])
|
|
62
184
|
.withCategoryName(data["categoryName"])
|
|
63
185
|
.withUserId(data["userId"])
|
|
64
186
|
.withTargetUserId(data["targetUserId"]);
|
|
65
187
|
};
|
|
66
188
|
SubscribeUser.prototype.toDict = function () {
|
|
67
189
|
return {
|
|
190
|
+
"subscribeUserId": this.getSubscribeUserId(),
|
|
68
191
|
"categoryName": this.getCategoryName(),
|
|
69
192
|
"userId": this.getUserId(),
|
|
70
193
|
"targetUserId": this.getTargetUserId(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscribeUser.js","sourceRoot":"","sources":["SubscribeUser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"SubscribeUser.js","sourceRoot":"","sources":["SubscribeUser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,IAAM,SAAS,GAAW,mHAAmH,CAAC;AAE9I;IAAA;QACY,oBAAe,GAAgB,IAAI,CAAC;QACpC,iBAAY,GAAgB,IAAI,CAAC;QACjC,WAAM,GAAgB,IAAI,CAAC;QAC3B,iBAAY,GAAgB,IAAI,CAAC;IAkM7C,CAAC;IAhMiB,uBAAS,GAAvB,UAAwB,GAAW;QAC/B,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC;aAC3B,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC;aAC1B,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC;aAChC,OAAO,CAAC,UAAU,EAAE,IAAI,CA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jB,UAAkB,MAAmB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,uCAAe,GAAtB;QACI,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACM,uCAAe,GAAtB,UAAuB,YAAyB;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,wCAAgB,GAAvB,UAAwB,YAAyB;QAC7C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,sBAAQ,GAAtB,UAAuB,IAA0B;QAC7C,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,aAAa,EAAE;aACrB,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;aAC5C,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aACtC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC1B,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IAChD,CAAC;IAEM,8BAAM,GAAb;QACI,OAAO;YACH,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE;YAC5C,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE;YACtC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE;SACzC,CAAC;IACN,CAAC;IACL,oBAAC;AAAD,CAAC,AAtMD,IAsMC"}
|
|
@@ -15,11 +15,153 @@ permissions and limitations under the License.
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import IModel from '../../core/interface/IModel';
|
|
18
|
+
const grnFormat: string = "grn:gs2:{region}:{ownerId}:ranking:{namespaceName}:user:{userId}:subscribe:category:{categoryName}:{targetUserId}";
|
|
18
19
|
|
|
19
20
|
export default class SubscribeUser implements IModel {
|
|
21
|
+
private subscribeUserId: string|null = null;
|
|
20
22
|
private categoryName: string|null = null;
|
|
21
23
|
private userId: string|null = null;
|
|
22
24
|
private targetUserId: string|null = null;
|
|
25
|
+
|
|
26
|
+
public static getRegion(grn: string): string|null {
|
|
27
|
+
const match = grn.match(grnFormat
|
|
28
|
+
.replace('{region}', '(.*)')
|
|
29
|
+
.replace('{ownerId}', '.*')
|
|
30
|
+
.replace('{namespaceName}', '.*')
|
|
31
|
+
.replace('{userId}', '.*')
|
|
32
|
+
.replace('{categoryName}', '.*')
|
|
33
|
+
.replace('{targetUserId}', '.*')
|
|
34
|
+
);
|
|
35
|
+
if (match) {
|
|
36
|
+
return match[1];
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public static getOwnerId(grn: string): string|null {
|
|
42
|
+
const match = grn.match(grnFormat
|
|
43
|
+
.replace('{region}', '.*')
|
|
44
|
+
.replace('{ownerId}', '(.*)')
|
|
45
|
+
.replace('{namespaceName}', '.*')
|
|
46
|
+
.replace('{userId}', '.*')
|
|
47
|
+
.replace('{categoryName}', '.*')
|
|
48
|
+
.replace('{targetUserId}', '.*')
|
|
49
|
+
);
|
|
50
|
+
if (match) {
|
|
51
|
+
return match[1];
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public static getNamespaceName(grn: string): string|null {
|
|
57
|
+
const match = grn.match(grnFormat
|
|
58
|
+
.replace('{region}', '.*')
|
|
59
|
+
.replace('{ownerId}', '.*')
|
|
60
|
+
.replace('{namespaceName}', '(.*)')
|
|
61
|
+
.replace('{userId}', '.*')
|
|
62
|
+
.replace('{categoryName}', '.*')
|
|
63
|
+
.replace('{targetUserId}', '.*')
|
|
64
|
+
);
|
|
65
|
+
if (match) {
|
|
66
|
+
return match[1];
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public static getUserId(grn: string): string|null {
|
|
72
|
+
const match = grn.match(grnFormat
|
|
73
|
+
.replace('{region}', '.*')
|
|
74
|
+
.replace('{ownerId}', '.*')
|
|
75
|
+
.replace('{namespaceName}', '.*')
|
|
76
|
+
.replace('{userId}', '(.*)')
|
|
77
|
+
.replace('{categoryName}', '.*')
|
|
78
|
+
.replace('{targetUserId}', '.*')
|
|
79
|
+
);
|
|
80
|
+
if (match) {
|
|
81
|
+
return match[1];
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public static getCategoryName(grn: string): string|null {
|
|
87
|
+
const match = grn.match(grnFormat
|
|
88
|
+
.replace('{region}', '.*')
|
|
89
|
+
.replace('{ownerId}', '.*')
|
|
90
|
+
.replace('{namespaceName}', '.*')
|
|
91
|
+
.replace('{userId}', '.*')
|
|
92
|
+
.replace('{categoryName}', '(.*)')
|
|
93
|
+
.replace('{targetUserId}', '.*')
|
|
94
|
+
);
|
|
95
|
+
if (match) {
|
|
96
|
+
return match[1];
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
public static getTargetUserId(grn: string): string|null {
|
|
102
|
+
const match = grn.match(grnFormat
|
|
103
|
+
.replace('{region}', '.*')
|
|
104
|
+
.replace('{ownerId}', '.*')
|
|
105
|
+
.replace('{namespaceName}', '.*')
|
|
106
|
+
.replace('{userId}', '.*')
|
|
107
|
+
.replace('{categoryName}', '.*')
|
|
108
|
+
.replace('{targetUserId}', '(.*)')
|
|
109
|
+
);
|
|
110
|
+
if (match) {
|
|
111
|
+
return match[1];
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public static isValid(grn: string): boolean {
|
|
117
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
if (this.getUserId(grn) == null || this.getUserId(grn) === '') {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
if (this.getCategoryName(grn) == null || this.getCategoryName(grn) === '') {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (this.getTargetUserId(grn) == null || this.getTargetUserId(grn) === '') {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
public static createGrn(
|
|
139
|
+
region: string|null,
|
|
140
|
+
ownerId: string|null,
|
|
141
|
+
namespaceName: string|null,
|
|
142
|
+
userId: string|null,
|
|
143
|
+
categoryName: string|null,
|
|
144
|
+
targetUserId: string|null,
|
|
145
|
+
): string|null {
|
|
146
|
+
return grnFormat
|
|
147
|
+
.replace('{region}', region ?? '')
|
|
148
|
+
.replace('{ownerId}', ownerId ?? '')
|
|
149
|
+
.replace('{namespaceName}', namespaceName ?? '')
|
|
150
|
+
.replace('{userId}', userId ?? '')
|
|
151
|
+
.replace('{categoryName}', categoryName ?? '')
|
|
152
|
+
.replace('{targetUserId}', targetUserId ?? '');
|
|
153
|
+
}
|
|
154
|
+
public getSubscribeUserId(): string|null {
|
|
155
|
+
return this.subscribeUserId;
|
|
156
|
+
}
|
|
157
|
+
public setSubscribeUserId(subscribeUserId: string|null) {
|
|
158
|
+
this.subscribeUserId = subscribeUserId;
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
public withSubscribeUserId(subscribeUserId: string|null): this {
|
|
162
|
+
this.subscribeUserId = subscribeUserId;
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
23
165
|
public getCategoryName(): string|null {
|
|
24
166
|
return this.categoryName;
|
|
25
167
|
}
|
|
@@ -59,6 +201,7 @@ export default class SubscribeUser implements IModel {
|
|
|
59
201
|
return null;
|
|
60
202
|
}
|
|
61
203
|
return new SubscribeUser()
|
|
204
|
+
.withSubscribeUserId(data["subscribeUserId"])
|
|
62
205
|
.withCategoryName(data["categoryName"])
|
|
63
206
|
.withUserId(data["userId"])
|
|
64
207
|
.withTargetUserId(data["targetUserId"]);
|
|
@@ -66,6 +209,7 @@ export default class SubscribeUser implements IModel {
|
|
|
66
209
|
|
|
67
210
|
public toDict(): {[key: string]: any} {
|
|
68
211
|
return {
|
|
212
|
+
"subscribeUserId": this.getSubscribeUserId(),
|
|
69
213
|
"categoryName": this.getCategoryName(),
|
|
70
214
|
"userId": this.getUserId(),
|
|
71
215
|
"targetUserId": this.getTargetUserId(),
|