gs2 1.3.1 → 1.3.4
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/core/model.js +26 -8
- package/core/model.js.map +1 -1
- 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.js +2 -0
- package/gateway/index.js.map +1 -1
- package/identifier/result/LoginResult.js +8 -6
- package/identifier/result/LoginResult.js.map +1 -1
- package/package.json +1 -1
- package/project/request/CreateAccountRequest.d.ts +4 -0
- package/project/request/CreateAccountRequest.js +15 -1
- package/project/request/CreateAccountRequest.js.map +1 -1
- package/project/request/ForgetRequest.d.ts +4 -0
- package/project/request/ForgetRequest.js +15 -1
- package/project/request/ForgetRequest.js.map +1 -1
- package/project/rest.js +4 -2
- package/project/rest.js.map +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/showcase/model/DisplayItem.d.ts +2 -0
- package/showcase/model/DisplayItem.js +7 -0
- package/showcase/model/DisplayItem.js.map +1 -1
- package/src/core/model.ts +16 -4
- package/src/experience/model/Status.ts +17 -0
- package/src/gateway/index.ts +2 -0
- package/src/identifier/result/LoginResult.ts +8 -6
- package/src/project/request/CreateAccountRequest.ts +18 -1
- package/src/project/request/ForgetRequest.ts +18 -1
- package/src/project/rest.ts +2 -0
- package/src/ranking/model/Score.ts +1 -1
- package/src/ranking/model/Subscribe.ts +1 -1
- package/src/showcase/model/DisplayItem.ts +10 -0
- 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
|
@@ -0,0 +1,176 @@
|
|
|
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 IModel from '../../core/interface/IModel';
|
|
18
|
+
|
|
19
|
+
export default class StatsEvent implements IModel {
|
|
20
|
+
private grn: string|null = null;
|
|
21
|
+
private service: string|null = null;
|
|
22
|
+
private method: string|null = null;
|
|
23
|
+
private metric: string|null = null;
|
|
24
|
+
private cumulative: boolean|null = null;
|
|
25
|
+
private value: number|null = null;
|
|
26
|
+
private tags: string[]|null = null;
|
|
27
|
+
private callAt: number|null = null;
|
|
28
|
+
|
|
29
|
+
public getGrn(): string|null {
|
|
30
|
+
return this.grn;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public setGrn(grn: string|null) {
|
|
34
|
+
this.grn = grn;
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public withGrn(grn: string|null): this {
|
|
39
|
+
this.grn = grn;
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public getService(): string|null {
|
|
44
|
+
return this.service;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public setService(service: string|null) {
|
|
48
|
+
this.service = service;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public withService(service: string|null): this {
|
|
53
|
+
this.service = service;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public getMethod(): string|null {
|
|
58
|
+
return this.method;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public setMethod(method: string|null) {
|
|
62
|
+
this.method = method;
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public withMethod(method: string|null): this {
|
|
67
|
+
this.method = method;
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public getMetric(): string|null {
|
|
72
|
+
return this.metric;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public setMetric(metric: string|null) {
|
|
76
|
+
this.metric = metric;
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public withMetric(metric: string|null): this {
|
|
81
|
+
this.metric = metric;
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public getCumulative(): boolean|null {
|
|
86
|
+
return this.cumulative;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public setCumulative(cumulative: boolean|null) {
|
|
90
|
+
this.cumulative = cumulative;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public withCumulative(cumulative: boolean|null): this {
|
|
95
|
+
this.cumulative = cumulative;
|
|
96
|
+
return this;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public getValue(): number|null {
|
|
100
|
+
return this.value;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public setValue(value: number|null) {
|
|
104
|
+
this.value = value;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public withValue(value: number|null): this {
|
|
109
|
+
this.value = value;
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
public getTags(): string[]|null {
|
|
114
|
+
return this.tags;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
public setTags(tags: string[]|null) {
|
|
118
|
+
this.tags = tags;
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public withTags(tags: string[]|null): this {
|
|
123
|
+
this.tags = tags;
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public getCallAt(): number|null {
|
|
128
|
+
return this.callAt;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
public setCallAt(callAt: number|null) {
|
|
132
|
+
this.callAt = callAt;
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
public withCallAt(callAt: number|null): this {
|
|
137
|
+
this.callAt = callAt;
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
public static fromDict(data: {[key: string]: any}): StatsEvent|null {
|
|
142
|
+
if (data == undefined || data == null) {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
return new StatsEvent()
|
|
146
|
+
.withGrn(data["grn"])
|
|
147
|
+
.withService(data["service"])
|
|
148
|
+
.withMethod(data["method"])
|
|
149
|
+
.withMetric(data["metric"])
|
|
150
|
+
.withCumulative(data["cumulative"])
|
|
151
|
+
.withValue(data["value"])
|
|
152
|
+
.withTags(data.tags ?
|
|
153
|
+
data.tags.map((item: {[key: string]: any}) => {
|
|
154
|
+
return item;
|
|
155
|
+
}
|
|
156
|
+
) : [])
|
|
157
|
+
.withCallAt(data["callAt"]);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
public toDict(): {[key: string]: any} {
|
|
161
|
+
return {
|
|
162
|
+
"grn": this.getGrn(),
|
|
163
|
+
"service": this.getService(),
|
|
164
|
+
"method": this.getMethod(),
|
|
165
|
+
"metric": this.getMetric(),
|
|
166
|
+
"cumulative": this.getCumulative(),
|
|
167
|
+
"value": this.getValue(),
|
|
168
|
+
"tags": this.getTags() ?
|
|
169
|
+
this.getTags()!.map((item: string) => {
|
|
170
|
+
return item;
|
|
171
|
+
}
|
|
172
|
+
) : [],
|
|
173
|
+
"callAt": this.getCallAt(),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
package/src/watch/model/index.ts
CHANGED
|
@@ -16,9 +16,11 @@ permissions and limitations under the License.
|
|
|
16
16
|
import Chart from "./Chart"
|
|
17
17
|
import Cumulative from "./Cumulative"
|
|
18
18
|
import BillingActivity from "./BillingActivity"
|
|
19
|
+
import StatsEvent from "./StatsEvent"
|
|
19
20
|
|
|
20
21
|
export {
|
|
21
22
|
Chart,
|
|
22
23
|
Cumulative,
|
|
23
24
|
BillingActivity,
|
|
25
|
+
StatsEvent,
|
|
24
26
|
};
|
|
@@ -6,6 +6,14 @@ export default class BillingActivity implements IModel {
|
|
|
6
6
|
private service;
|
|
7
7
|
private activityType;
|
|
8
8
|
private value;
|
|
9
|
+
static getRegion(grn: string): string | null;
|
|
10
|
+
static getOwnerId(grn: string): string | null;
|
|
11
|
+
static getYear(grn: string): string | null;
|
|
12
|
+
static getMonth(grn: string): string | null;
|
|
13
|
+
static getService(grn: string): string | null;
|
|
14
|
+
static getActivityType(grn: string): string | null;
|
|
15
|
+
static isValid(grn: string): boolean;
|
|
16
|
+
static createGrn(region: string | null, ownerId: string | null, year: string | null, month: string | null, service: string | null, activityType: string | null): string | null;
|
|
9
17
|
getBillingActivityId(): string | null;
|
|
10
18
|
setBillingActivityId(billingActivityId: string | null): this;
|
|
11
19
|
withBillingActivityId(billingActivityId: string | null): this;
|
|
@@ -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:{year}:{month}:{service}:{activityType}";
|
|
18
19
|
var BillingActivity = /** @class */ (function () {
|
|
19
20
|
function BillingActivity() {
|
|
20
21
|
this.billingActivityId = null;
|
|
@@ -24,6 +25,114 @@ var BillingActivity = /** @class */ (function () {
|
|
|
24
25
|
this.activityType = null;
|
|
25
26
|
this.value = null;
|
|
26
27
|
}
|
|
28
|
+
BillingActivity.getRegion = function (grn) {
|
|
29
|
+
var match = grn.match(grnFormat
|
|
30
|
+
.replace('{region}', '(.*)')
|
|
31
|
+
.replace('{ownerId}', '.*')
|
|
32
|
+
.replace('{year}', '.*')
|
|
33
|
+
.replace('{month}', '.*')
|
|
34
|
+
.replace('{service}', '.*')
|
|
35
|
+
.replace('{activityType}', '.*'));
|
|
36
|
+
if (match) {
|
|
37
|
+
return match[1];
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
BillingActivity.getOwnerId = function (grn) {
|
|
42
|
+
var match = grn.match(grnFormat
|
|
43
|
+
.replace('{region}', '.*')
|
|
44
|
+
.replace('{ownerId}', '(.*)')
|
|
45
|
+
.replace('{year}', '.*')
|
|
46
|
+
.replace('{month}', '.*')
|
|
47
|
+
.replace('{service}', '.*')
|
|
48
|
+
.replace('{activityType}', '.*'));
|
|
49
|
+
if (match) {
|
|
50
|
+
return match[1];
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
BillingActivity.getYear = function (grn) {
|
|
55
|
+
var match = grn.match(grnFormat
|
|
56
|
+
.replace('{region}', '.*')
|
|
57
|
+
.replace('{ownerId}', '.*')
|
|
58
|
+
.replace('{year}', '(.*)')
|
|
59
|
+
.replace('{month}', '.*')
|
|
60
|
+
.replace('{service}', '.*')
|
|
61
|
+
.replace('{activityType}', '.*'));
|
|
62
|
+
if (match) {
|
|
63
|
+
return match[1];
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
};
|
|
67
|
+
BillingActivity.getMonth = function (grn) {
|
|
68
|
+
var match = grn.match(grnFormat
|
|
69
|
+
.replace('{region}', '.*')
|
|
70
|
+
.replace('{ownerId}', '.*')
|
|
71
|
+
.replace('{year}', '.*')
|
|
72
|
+
.replace('{month}', '(.*)')
|
|
73
|
+
.replace('{service}', '.*')
|
|
74
|
+
.replace('{activityType}', '.*'));
|
|
75
|
+
if (match) {
|
|
76
|
+
return match[1];
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
};
|
|
80
|
+
BillingActivity.getService = function (grn) {
|
|
81
|
+
var match = grn.match(grnFormat
|
|
82
|
+
.replace('{region}', '.*')
|
|
83
|
+
.replace('{ownerId}', '.*')
|
|
84
|
+
.replace('{year}', '.*')
|
|
85
|
+
.replace('{month}', '.*')
|
|
86
|
+
.replace('{service}', '(.*)')
|
|
87
|
+
.replace('{activityType}', '.*'));
|
|
88
|
+
if (match) {
|
|
89
|
+
return match[1];
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
};
|
|
93
|
+
BillingActivity.getActivityType = function (grn) {
|
|
94
|
+
var match = grn.match(grnFormat
|
|
95
|
+
.replace('{region}', '.*')
|
|
96
|
+
.replace('{ownerId}', '.*')
|
|
97
|
+
.replace('{year}', '.*')
|
|
98
|
+
.replace('{month}', '.*')
|
|
99
|
+
.replace('{service}', '.*')
|
|
100
|
+
.replace('{activityType}', '(.*)'));
|
|
101
|
+
if (match) {
|
|
102
|
+
return match[1];
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
};
|
|
106
|
+
BillingActivity.isValid = function (grn) {
|
|
107
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (this.getYear(grn) == null || this.getYear(grn) === '') {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (this.getMonth(grn) == null || this.getMonth(grn) === '') {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
if (this.getService(grn) == null || this.getService(grn) === '') {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
if (this.getActivityType(grn) == null || this.getActivityType(grn) === '') {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
return true;
|
|
126
|
+
};
|
|
127
|
+
BillingActivity.createGrn = function (region, ownerId, year, month, service, activityType) {
|
|
128
|
+
return grnFormat
|
|
129
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
130
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
131
|
+
.replace('{year}', year !== null && year !== void 0 ? year : '')
|
|
132
|
+
.replace('{month}', month !== null && month !== void 0 ? month : '')
|
|
133
|
+
.replace('{service}', service !== null && service !== void 0 ? service : '')
|
|
134
|
+
.replace('{activityType}', activityType !== null && activityType !== void 0 ? activityType : '');
|
|
135
|
+
};
|
|
27
136
|
BillingActivity.prototype.getBillingActivityId = function () {
|
|
28
137
|
return this.billingActivityId;
|
|
29
138
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingActivity.js","sourceRoot":"","sources":["../../src/watch/model/BillingActivity.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"BillingActivity.js","sourceRoot":"","sources":["../../src/watch/model/BillingActivity.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,IAAM,SAAS,GAAW,0EAA0E,CAAC;AAErG;IAAA;QACY,sBAAiB,GAAgB,IAAI,CAAC;QACtC,SAAI,GAAgB,IAAI,CAAC;QACzB,UAAK,GAAgB,IAAI,CAAC;Q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,CAAC;IAEM,mCAAS,GAAhB,UAAiB,KAAkB;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,wBAAQ,GAAtB,UAAuB,IAA0B;QAC7C,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,eAAe,EAAE;aACvB,qBAAqB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;aAChD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACxB,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC5B,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aACtC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,CAAC;IAEM,gCAAM,GAAb;QACI,OAAO;YACH,mBAAmB,EAAE,IAAI,CAAC,oBAAoB,EAAE;YAChD,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxB,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE;YAC5B,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE;YACtC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC;IACN,CAAC;IACL,sBAAC;AAAD,CAAC,AApPD,IAoPC"}
|
package/watch/model/Chart.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export default class Chart implements IModel {
|
|
|
3
3
|
private chartId;
|
|
4
4
|
private embedId;
|
|
5
5
|
private html;
|
|
6
|
+
static isValid(grn: string): boolean;
|
|
7
|
+
static createGrn(): string | null;
|
|
6
8
|
getChartId(): string | null;
|
|
7
9
|
setChartId(chartId: string | null): this;
|
|
8
10
|
withChartId(chartId: string | null): this;
|
package/watch/model/Chart.js
CHANGED
|
@@ -15,12 +15,19 @@ 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 = "";
|
|
18
19
|
var Chart = /** @class */ (function () {
|
|
19
20
|
function Chart() {
|
|
20
21
|
this.chartId = null;
|
|
21
22
|
this.embedId = null;
|
|
22
23
|
this.html = null;
|
|
23
24
|
}
|
|
25
|
+
Chart.isValid = function (grn) {
|
|
26
|
+
return true;
|
|
27
|
+
};
|
|
28
|
+
Chart.createGrn = function () {
|
|
29
|
+
return grnFormat;
|
|
30
|
+
};
|
|
24
31
|
Chart.prototype.getChartId = function () {
|
|
25
32
|
return this.chartId;
|
|
26
33
|
};
|
package/watch/model/Chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","sourceRoot":"","sources":["../../src/watch/model/Chart.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"Chart.js","sourceRoot":"","sources":["../../src/watch/model/Chart.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,IAAM,SAAS,GAAW,EAAE,CAAC;AAE7B;IAAA;QACY,YAAO,GAAgB,IAAI,CAAC;QAC5B,YAAO,GAAgB,IAAI,CAAC;QAC5B,SAAI,GAAgB,IAAI,CAAC;IAsErC,CAAC;IApEiB,aAAO,GAArB,UAAsB,GAAW;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,eAAS,GAAvB;QAEI,OAAO,SAAS,CAAC;IACrB,CAAC;IAEM,0BAAU,GAAjB;QACI,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEM,0BAAU,GAAjB,UAAkB,OAAoB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,2BAAW,GAA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6 +5,12 @@ export default class Cumulative implements IModel {
|
|
|
5
5
|
private name;
|
|
6
6
|
private value;
|
|
7
7
|
private updatedAt;
|
|
8
|
+
static getRegion(grn: string): string | null;
|
|
9
|
+
static getOwnerId(grn: string): string | null;
|
|
10
|
+
static getResourceGrn(grn: string): string | null;
|
|
11
|
+
static getName(grn: string): string | null;
|
|
12
|
+
static isValid(grn: string): boolean;
|
|
13
|
+
static createGrn(region: string | null, ownerId: string | null, resourceGrn: string | null, name: string | null): string | null;
|
|
8
14
|
getCumulativeId(): string | null;
|
|
9
15
|
setCumulativeId(cumulativeId: string | null): this;
|
|
10
16
|
withCumulativeId(cumulativeId: string | null): this;
|
|
@@ -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,uDAAuD,CAAC;AAElF;IAAA;QACY,iBAAY,GAAgB,IAAI,CAAC;QACjC,gBAAW,GAAgB,IAAI,CAAC;QAChC,SAAI,GAAgB,IAAI,CAAC;QACzB,UAAK,GAAgB,IAAI,CAAC;QAC1B,cAAS,GAAgB,IAAI,CAAC;IA8K1C,CAAC;IA5KiB,oBAAS,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,eAAe,EAAE,IAAI,CAAC;aAC9B,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAC3B,CAAC;QACF,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;SACnB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,qBAAU,GAAxB,UAAyB,GAAW;QAChC,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;aACzB,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC;aAC5B,OA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,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aACtC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aACpC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACxB,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1C,CAAC;IAEM,2BAAM,GAAb;QACI,OAAO;YACH,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE;YACtC,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE;YACpC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxB,WAAW,EAAE,IAAI,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
|
+
}
|