gs2 1.3.3 → 1.3.6
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/experience/model/Status.d.ts +4 -0
- package/experience/model/Status.js +14 -0
- package/experience/model/Status.js.map +1 -1
- package/gateway/index.d.ts +2 -1
- package/gateway/index.js +5 -1
- package/gateway/index.js.map +1 -1
- package/identifier/result/LoginResult.js +8 -6
- package/identifier/result/LoginResult.js.map +1 -1
- package/money/model/Receipt.d.ts +4 -0
- package/money/model/Receipt.js +14 -0
- package/money/model/Receipt.js.map +1 -1
- package/package.json +1 -1
- package/ranking/model/Score.js +1 -1
- package/ranking/model/Score.js.map +1 -1
- package/ranking/model/Subscribe.js +1 -1
- package/ranking/model/Subscribe.js.map +1 -1
- package/src/experience/model/Status.ts +17 -0
- package/src/gateway/index.ts +4 -0
- package/src/identifier/result/LoginResult.ts +8 -6
- package/src/money/model/Receipt.ts +17 -0
- package/src/ranking/model/Score.ts +1 -1
- package/src/ranking/model/Subscribe.ts +1 -1
- package/src/watch/model/BillingActivity.ts +130 -0
- package/src/watch/model/Chart.ts +10 -0
- package/src/watch/model/Cumulative.ts +82 -0
- package/src/watch/model/StatsEvent.ts +176 -0
- package/src/watch/model/index.ts +2 -0
- package/watch/model/BillingActivity.d.ts +8 -0
- package/watch/model/BillingActivity.js +109 -0
- package/watch/model/BillingActivity.js.map +1 -1
- package/watch/model/Chart.d.ts +2 -0
- package/watch/model/Chart.js +7 -0
- package/watch/model/Chart.js.map +1 -1
- package/watch/model/Cumulative.d.ts +6 -0
- package/watch/model/Cumulative.js +67 -0
- package/watch/model/Cumulative.js.map +1 -1
- package/watch/model/StatsEvent.d.ts +41 -0
- package/watch/model/StatsEvent.js +152 -0
- package/watch/model/StatsEvent.js.map +1 -0
- package/watch/model/index.d.ts +2 -1
- package/watch/model/index.js +3 -1
- package/watch/model/index.js.map +1 -1
|
@@ -15,6 +15,7 @@ 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}:watch:{resourceGrn}:{name}";
|
|
18
19
|
var Cumulative = /** @class */ (function () {
|
|
19
20
|
function Cumulative() {
|
|
20
21
|
this.cumulativeId = null;
|
|
@@ -23,6 +24,72 @@ var Cumulative = /** @class */ (function () {
|
|
|
23
24
|
this.value = null;
|
|
24
25
|
this.updatedAt = null;
|
|
25
26
|
}
|
|
27
|
+
Cumulative.getRegion = function (grn) {
|
|
28
|
+
var match = grn.match(grnFormat
|
|
29
|
+
.replace('{region}', '(.*)')
|
|
30
|
+
.replace('{ownerId}', '.*')
|
|
31
|
+
.replace('{resourceGrn}', '.*')
|
|
32
|
+
.replace('{name}', '.*'));
|
|
33
|
+
if (match) {
|
|
34
|
+
return match[1];
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
};
|
|
38
|
+
Cumulative.getOwnerId = function (grn) {
|
|
39
|
+
var match = grn.match(grnFormat
|
|
40
|
+
.replace('{region}', '.*')
|
|
41
|
+
.replace('{ownerId}', '(.*)')
|
|
42
|
+
.replace('{resourceGrn}', '.*')
|
|
43
|
+
.replace('{name}', '.*'));
|
|
44
|
+
if (match) {
|
|
45
|
+
return match[1];
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
Cumulative.getResourceGrn = function (grn) {
|
|
50
|
+
var match = grn.match(grnFormat
|
|
51
|
+
.replace('{region}', '.*')
|
|
52
|
+
.replace('{ownerId}', '.*')
|
|
53
|
+
.replace('{resourceGrn}', '(.*)')
|
|
54
|
+
.replace('{name}', '.*'));
|
|
55
|
+
if (match) {
|
|
56
|
+
return match[1];
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
};
|
|
60
|
+
Cumulative.getName = function (grn) {
|
|
61
|
+
var match = grn.match(grnFormat
|
|
62
|
+
.replace('{region}', '.*')
|
|
63
|
+
.replace('{ownerId}', '.*')
|
|
64
|
+
.replace('{resourceGrn}', '.*')
|
|
65
|
+
.replace('{name}', '(.*)'));
|
|
66
|
+
if (match) {
|
|
67
|
+
return match[1];
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
};
|
|
71
|
+
Cumulative.isValid = function (grn) {
|
|
72
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
if (this.getResourceGrn(grn) == null || this.getResourceGrn(grn) === '') {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (this.getName(grn) == null || this.getName(grn) === '') {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
};
|
|
86
|
+
Cumulative.createGrn = function (region, ownerId, resourceGrn, name) {
|
|
87
|
+
return grnFormat
|
|
88
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
89
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
90
|
+
.replace('{resourceGrn}', resourceGrn !== null && resourceGrn !== void 0 ? resourceGrn : '')
|
|
91
|
+
.replace('{name}', name !== null && name !== void 0 ? name : '');
|
|
92
|
+
};
|
|
26
93
|
Cumulative.prototype.getCumulativeId = function () {
|
|
27
94
|
return this.cumulativeId;
|
|
28
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cumulative.js","sourceRoot":"","sources":["../../src/watch/model/Cumulative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"Cumulative.js","sourceRoot":"","sources":["../../src/watch/model/Cumulative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,IAAM,SAAS,GAAW,uD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AAI,CAAC,YAAY,EAAE;SACnC,CAAC;IACN,CAAC;IACL,iBAAC;AAAD,CAAC,AAnLD,IAmLC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class StatsEvent implements IModel {
|
|
3
|
+
private grn;
|
|
4
|
+
private service;
|
|
5
|
+
private method;
|
|
6
|
+
private metric;
|
|
7
|
+
private cumulative;
|
|
8
|
+
private value;
|
|
9
|
+
private tags;
|
|
10
|
+
private callAt;
|
|
11
|
+
getGrn(): string | null;
|
|
12
|
+
setGrn(grn: string | null): this;
|
|
13
|
+
withGrn(grn: string | null): this;
|
|
14
|
+
getService(): string | null;
|
|
15
|
+
setService(service: string | null): this;
|
|
16
|
+
withService(service: string | null): this;
|
|
17
|
+
getMethod(): string | null;
|
|
18
|
+
setMethod(method: string | null): this;
|
|
19
|
+
withMethod(method: string | null): this;
|
|
20
|
+
getMetric(): string | null;
|
|
21
|
+
setMetric(metric: string | null): this;
|
|
22
|
+
withMetric(metric: string | null): this;
|
|
23
|
+
getCumulative(): boolean | null;
|
|
24
|
+
setCumulative(cumulative: boolean | null): this;
|
|
25
|
+
withCumulative(cumulative: boolean | null): this;
|
|
26
|
+
getValue(): number | null;
|
|
27
|
+
setValue(value: number | null): this;
|
|
28
|
+
withValue(value: number | null): this;
|
|
29
|
+
getTags(): string[] | null;
|
|
30
|
+
setTags(tags: string[] | null): this;
|
|
31
|
+
withTags(tags: string[] | null): this;
|
|
32
|
+
getCallAt(): number | null;
|
|
33
|
+
setCallAt(callAt: number | null): this;
|
|
34
|
+
withCallAt(callAt: number | null): this;
|
|
35
|
+
static fromDict(data: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}): StatsEvent | null;
|
|
38
|
+
toDict(): {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
var StatsEvent = /** @class */ (function () {
|
|
19
|
+
function StatsEvent() {
|
|
20
|
+
this.grn = null;
|
|
21
|
+
this.service = null;
|
|
22
|
+
this.method = null;
|
|
23
|
+
this.metric = null;
|
|
24
|
+
this.cumulative = null;
|
|
25
|
+
this.value = null;
|
|
26
|
+
this.tags = null;
|
|
27
|
+
this.callAt = null;
|
|
28
|
+
}
|
|
29
|
+
StatsEvent.prototype.getGrn = function () {
|
|
30
|
+
return this.grn;
|
|
31
|
+
};
|
|
32
|
+
StatsEvent.prototype.setGrn = function (grn) {
|
|
33
|
+
this.grn = grn;
|
|
34
|
+
return this;
|
|
35
|
+
};
|
|
36
|
+
StatsEvent.prototype.withGrn = function (grn) {
|
|
37
|
+
this.grn = grn;
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
StatsEvent.prototype.getService = function () {
|
|
41
|
+
return this.service;
|
|
42
|
+
};
|
|
43
|
+
StatsEvent.prototype.setService = function (service) {
|
|
44
|
+
this.service = service;
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
StatsEvent.prototype.withService = function (service) {
|
|
48
|
+
this.service = service;
|
|
49
|
+
return this;
|
|
50
|
+
};
|
|
51
|
+
StatsEvent.prototype.getMethod = function () {
|
|
52
|
+
return this.method;
|
|
53
|
+
};
|
|
54
|
+
StatsEvent.prototype.setMethod = function (method) {
|
|
55
|
+
this.method = method;
|
|
56
|
+
return this;
|
|
57
|
+
};
|
|
58
|
+
StatsEvent.prototype.withMethod = function (method) {
|
|
59
|
+
this.method = method;
|
|
60
|
+
return this;
|
|
61
|
+
};
|
|
62
|
+
StatsEvent.prototype.getMetric = function () {
|
|
63
|
+
return this.metric;
|
|
64
|
+
};
|
|
65
|
+
StatsEvent.prototype.setMetric = function (metric) {
|
|
66
|
+
this.metric = metric;
|
|
67
|
+
return this;
|
|
68
|
+
};
|
|
69
|
+
StatsEvent.prototype.withMetric = function (metric) {
|
|
70
|
+
this.metric = metric;
|
|
71
|
+
return this;
|
|
72
|
+
};
|
|
73
|
+
StatsEvent.prototype.getCumulative = function () {
|
|
74
|
+
return this.cumulative;
|
|
75
|
+
};
|
|
76
|
+
StatsEvent.prototype.setCumulative = function (cumulative) {
|
|
77
|
+
this.cumulative = cumulative;
|
|
78
|
+
return this;
|
|
79
|
+
};
|
|
80
|
+
StatsEvent.prototype.withCumulative = function (cumulative) {
|
|
81
|
+
this.cumulative = cumulative;
|
|
82
|
+
return this;
|
|
83
|
+
};
|
|
84
|
+
StatsEvent.prototype.getValue = function () {
|
|
85
|
+
return this.value;
|
|
86
|
+
};
|
|
87
|
+
StatsEvent.prototype.setValue = function (value) {
|
|
88
|
+
this.value = value;
|
|
89
|
+
return this;
|
|
90
|
+
};
|
|
91
|
+
StatsEvent.prototype.withValue = function (value) {
|
|
92
|
+
this.value = value;
|
|
93
|
+
return this;
|
|
94
|
+
};
|
|
95
|
+
StatsEvent.prototype.getTags = function () {
|
|
96
|
+
return this.tags;
|
|
97
|
+
};
|
|
98
|
+
StatsEvent.prototype.setTags = function (tags) {
|
|
99
|
+
this.tags = tags;
|
|
100
|
+
return this;
|
|
101
|
+
};
|
|
102
|
+
StatsEvent.prototype.withTags = function (tags) {
|
|
103
|
+
this.tags = tags;
|
|
104
|
+
return this;
|
|
105
|
+
};
|
|
106
|
+
StatsEvent.prototype.getCallAt = function () {
|
|
107
|
+
return this.callAt;
|
|
108
|
+
};
|
|
109
|
+
StatsEvent.prototype.setCallAt = function (callAt) {
|
|
110
|
+
this.callAt = callAt;
|
|
111
|
+
return this;
|
|
112
|
+
};
|
|
113
|
+
StatsEvent.prototype.withCallAt = function (callAt) {
|
|
114
|
+
this.callAt = callAt;
|
|
115
|
+
return this;
|
|
116
|
+
};
|
|
117
|
+
StatsEvent.fromDict = function (data) {
|
|
118
|
+
if (data == undefined || data == null) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
return new StatsEvent()
|
|
122
|
+
.withGrn(data["grn"])
|
|
123
|
+
.withService(data["service"])
|
|
124
|
+
.withMethod(data["method"])
|
|
125
|
+
.withMetric(data["metric"])
|
|
126
|
+
.withCumulative(data["cumulative"])
|
|
127
|
+
.withValue(data["value"])
|
|
128
|
+
.withTags(data.tags ?
|
|
129
|
+
data.tags.map(function (item) {
|
|
130
|
+
return item;
|
|
131
|
+
}) : [])
|
|
132
|
+
.withCallAt(data["callAt"]);
|
|
133
|
+
};
|
|
134
|
+
StatsEvent.prototype.toDict = function () {
|
|
135
|
+
return {
|
|
136
|
+
"grn": this.getGrn(),
|
|
137
|
+
"service": this.getService(),
|
|
138
|
+
"method": this.getMethod(),
|
|
139
|
+
"metric": this.getMetric(),
|
|
140
|
+
"cumulative": this.getCumulative(),
|
|
141
|
+
"value": this.getValue(),
|
|
142
|
+
"tags": this.getTags() ?
|
|
143
|
+
this.getTags().map(function (item) {
|
|
144
|
+
return item;
|
|
145
|
+
}) : [],
|
|
146
|
+
"callAt": this.getCallAt(),
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
return StatsEvent;
|
|
150
|
+
}());
|
|
151
|
+
exports.default = StatsEvent;
|
|
152
|
+
//# sourceMappingURL=StatsEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsEv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;YACxB,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpB,IAAI,CAAC,OAAO,EAAG,CAAC,GAAG,CAAC,UAAC,IAAY;oBAC7B,OAAO,IAAI,CAAC;gBAChB,CAAC,CACJ,CAAC,CAAC,CAAC,EAAE;YACN,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;SAC7B,CAAC;IACN,CAAC;IACL,iBAAC;AAAD,CAAC,AA7JD,IA6JC"}
|
package/watch/model/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Chart from "./Chart";
|
|
2
2
|
import Cumulative from "./Cumulative";
|
|
3
3
|
import BillingActivity from "./BillingActivity";
|
|
4
|
-
|
|
4
|
+
import StatsEvent from "./StatsEvent";
|
|
5
|
+
export { Chart, Cumulative, BillingActivity, StatsEvent, };
|
package/watch/model/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BillingActivity = exports.Cumulative = exports.Chart = void 0;
|
|
3
|
+
exports.StatsEvent = exports.BillingActivity = exports.Cumulative = exports.Chart = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
/*
|
|
6
6
|
Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
|
|
@@ -23,4 +23,6 @@ var Cumulative_1 = (0, tslib_1.__importDefault)(require("./Cumulative"));
|
|
|
23
23
|
exports.Cumulative = Cumulative_1.default;
|
|
24
24
|
var BillingActivity_1 = (0, tslib_1.__importDefault)(require("./BillingActivity"));
|
|
25
25
|
exports.BillingActivity = BillingActivity_1.default;
|
|
26
|
+
var StatsEvent_1 = (0, tslib_1.__importDefault)(require("./StatsEvent"));
|
|
27
|
+
exports.StatsEvent = StatsEvent_1.default;
|
|
26
28
|
//# sourceMappingURL=index.js.map
|
package/watch/model/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/watch/model/index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+DAA2B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/watch/model/index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+DAA2B;AAMvB,gBANG,eAAK,CAMH;AALT,yEAAqC;AAMjC,qBANG,oBAAU,CAMH;AALd,mFAA+C;AAM3C,0BANG,yBAAe,CAMH;AALnB,yEAAqC;AAMjC,qBANG,oBAAU,CAMH"}
|