gs2 1.3.119 → 1.3.120
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/news/model/Content.d.ts +21 -0
- package/news/model/Content.js +76 -0
- package/news/model/Content.js.map +1 -0
- package/news/model/Content.ts +74 -0
- package/news/model/Output.d.ts +32 -0
- package/news/model/Output.js +177 -0
- package/news/model/Output.js.map +1 -0
- package/news/model/Output.ts +193 -0
- package/news/model/Progress.d.ts +39 -0
- package/news/model/Progress.js +185 -0
- package/news/model/Progress.js.map +1 -0
- package/news/model/Progress.ts +198 -0
- package/news/model/View.d.ts +18 -0
- package/news/model/View.js +76 -0
- package/news/model/View.js.map +1 -0
- package/news/model/View.ts +77 -0
- package/news/model/index.d.ts +5 -1
- package/news/model/index.js +9 -1
- package/news/model/index.js.map +1 -1
- package/news/model/index.ts +8 -0
- package/news/request/DescribeOutputsRequest.d.ts +33 -0
- package/news/request/DescribeOutputsRequest.js +111 -0
- package/news/request/DescribeOutputsRequest.js.map +1 -0
- package/news/request/DescribeOutputsRequest.ts +118 -0
- package/news/request/DescribeProgressesRequest.d.ts +29 -0
- package/news/request/DescribeProgressesRequest.js +97 -0
- package/news/request/DescribeProgressesRequest.js.map +1 -0
- package/news/request/DescribeProgressesRequest.ts +104 -0
- package/news/request/GetOutputRequest.d.ts +29 -0
- package/news/request/GetOutputRequest.js +97 -0
- package/news/request/GetOutputRequest.js.map +1 -0
- package/news/request/GetOutputRequest.ts +104 -0
- package/news/request/GetProgressRequest.d.ts +25 -0
- package/news/request/GetProgressRequest.js +83 -0
- package/news/request/GetProgressRequest.js.map +1 -0
- package/news/request/GetProgressRequest.ts +90 -0
- package/news/request/index.d.ts +5 -1
- package/news/request/index.js +9 -1
- package/news/request/index.js.map +1 -1
- package/news/request/index.ts +8 -0
- package/news/rest.d.ts +4 -0
- package/news/rest.js +96 -0
- package/news/rest.js.map +1 -1
- package/news/rest.ts +112 -0
- package/news/result/DescribeOutputsResult.d.ts +18 -0
- package/news/result/DescribeOutputsResult.js +67 -0
- package/news/result/DescribeOutputsResult.js.map +1 -0
- package/news/result/DescribeOutputsResult.ts +73 -0
- package/news/result/DescribeProgressesResult.d.ts +18 -0
- package/news/result/DescribeProgressesResult.js +67 -0
- package/news/result/DescribeProgressesResult.js.map +1 -0
- package/news/result/DescribeProgressesResult.ts +73 -0
- package/news/result/GetOutputResult.d.ts +14 -0
- package/news/result/GetOutputResult.js +48 -0
- package/news/result/GetOutputResult.js.map +1 -0
- package/news/result/GetOutputResult.ts +48 -0
- package/news/result/GetProgressResult.d.ts +14 -0
- package/news/result/GetProgressResult.js +48 -0
- package/news/result/GetProgressResult.js.map +1 -0
- package/news/result/GetProgressResult.ts +48 -0
- package/news/result/index.d.ts +5 -1
- package/news/result/index.js +9 -1
- package/news/result/index.js.map +1 -1
- package/news/result/index.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class Content implements IModel {
|
|
3
|
+
private section;
|
|
4
|
+
private content;
|
|
5
|
+
private frontMatter;
|
|
6
|
+
getSection(): string | null;
|
|
7
|
+
setSection(section: string | null): this;
|
|
8
|
+
withSection(section: string | null): this;
|
|
9
|
+
getContent(): string | null;
|
|
10
|
+
setContent(content: string | null): this;
|
|
11
|
+
withContent(content: string | null): this;
|
|
12
|
+
getFrontMatter(): string | null;
|
|
13
|
+
setFrontMatter(frontMatter: string | null): this;
|
|
14
|
+
withFrontMatter(frontMatter: string | null): this;
|
|
15
|
+
static fromDict(data: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}): Content | null;
|
|
18
|
+
toDict(): {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 Content = /** @class */ (function () {
|
|
19
|
+
function Content() {
|
|
20
|
+
this.section = null;
|
|
21
|
+
this.content = null;
|
|
22
|
+
this.frontMatter = null;
|
|
23
|
+
}
|
|
24
|
+
Content.prototype.getSection = function () {
|
|
25
|
+
return this.section;
|
|
26
|
+
};
|
|
27
|
+
Content.prototype.setSection = function (section) {
|
|
28
|
+
this.section = section;
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
Content.prototype.withSection = function (section) {
|
|
32
|
+
this.section = section;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
Content.prototype.getContent = function () {
|
|
36
|
+
return this.content;
|
|
37
|
+
};
|
|
38
|
+
Content.prototype.setContent = function (content) {
|
|
39
|
+
this.content = content;
|
|
40
|
+
return this;
|
|
41
|
+
};
|
|
42
|
+
Content.prototype.withContent = function (content) {
|
|
43
|
+
this.content = content;
|
|
44
|
+
return this;
|
|
45
|
+
};
|
|
46
|
+
Content.prototype.getFrontMatter = function () {
|
|
47
|
+
return this.frontMatter;
|
|
48
|
+
};
|
|
49
|
+
Content.prototype.setFrontMatter = function (frontMatter) {
|
|
50
|
+
this.frontMatter = frontMatter;
|
|
51
|
+
return this;
|
|
52
|
+
};
|
|
53
|
+
Content.prototype.withFrontMatter = function (frontMatter) {
|
|
54
|
+
this.frontMatter = frontMatter;
|
|
55
|
+
return this;
|
|
56
|
+
};
|
|
57
|
+
Content.fromDict = function (data) {
|
|
58
|
+
if (data == undefined || data == null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return new Content()
|
|
62
|
+
.withSection(data["section"])
|
|
63
|
+
.withContent(data["content"])
|
|
64
|
+
.withFrontMatter(data["frontMatter"]);
|
|
65
|
+
};
|
|
66
|
+
Content.prototype.toDict = function () {
|
|
67
|
+
return {
|
|
68
|
+
"section": this.getSection(),
|
|
69
|
+
"content": this.getContent(),
|
|
70
|
+
"frontMatter": this.getFrontMatter(),
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
return Content;
|
|
74
|
+
}());
|
|
75
|
+
exports.default = Content;
|
|
76
|
+
//# sourceMappingURL=Content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["Content.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH;IAAA;QACY,YAAO,GAAgB,IAAI,CAAC;QAC5B,YAAO,GAAgB,IAAI,CAAC;QAC5B,gBAAW,GAAgB,IAAI,CAAC;IAoD5C,CAAC;IAnDU,4BAAU,GAAjB;QACI,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IACM,4BAAU,GAAjB,UAAkB,OAAoB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,6BAAW,GAAlB,UAAmB,OAAoB;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,4BAAU,GAAjB;QACI,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IACM,4BAAU,GAAjB,UAAkB,OAAoB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,6BAAW,GAAlB,UAAmB,OAAoB;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,gCAAc,GAArB;QACI,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IACM,gCAAc,GAArB,UAAsB,WAAwB;QAC1C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,iCAAe,GAAtB,UAAuB,WAAwB;QAC3C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,gBAAQ,GAAtB,UAAuB,IAA0B;QAC7C,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,OAAO,EAAE;aACf,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC5B,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC5B,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9C,CAAC;IAEM,wBAAM,GAAb;QACI,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE;YAC5B,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE;YAC5B,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE;SACvC,CAAC;IACN,CAAC;IACL,cAAC;AAAD,CAAC,AAvDD,IAuDC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 Content implements IModel {
|
|
20
|
+
private section: string|null = null;
|
|
21
|
+
private content: string|null = null;
|
|
22
|
+
private frontMatter: string|null = null;
|
|
23
|
+
public getSection(): string|null {
|
|
24
|
+
return this.section;
|
|
25
|
+
}
|
|
26
|
+
public setSection(section: string|null) {
|
|
27
|
+
this.section = section;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
public withSection(section: string|null): this {
|
|
31
|
+
this.section = section;
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
public getContent(): string|null {
|
|
35
|
+
return this.content;
|
|
36
|
+
}
|
|
37
|
+
public setContent(content: string|null) {
|
|
38
|
+
this.content = content;
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
public withContent(content: string|null): this {
|
|
42
|
+
this.content = content;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
public getFrontMatter(): string|null {
|
|
46
|
+
return this.frontMatter;
|
|
47
|
+
}
|
|
48
|
+
public setFrontMatter(frontMatter: string|null) {
|
|
49
|
+
this.frontMatter = frontMatter;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
public withFrontMatter(frontMatter: string|null): this {
|
|
53
|
+
this.frontMatter = frontMatter;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public static fromDict(data: {[key: string]: any}): Content|null {
|
|
58
|
+
if (data == undefined || data == null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return new Content()
|
|
62
|
+
.withSection(data["section"])
|
|
63
|
+
.withContent(data["content"])
|
|
64
|
+
.withFrontMatter(data["frontMatter"]);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public toDict(): {[key: string]: any} {
|
|
68
|
+
return {
|
|
69
|
+
"section": this.getSection(),
|
|
70
|
+
"content": this.getContent(),
|
|
71
|
+
"frontMatter": this.getFrontMatter(),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class Output implements IModel {
|
|
3
|
+
private outputId;
|
|
4
|
+
private name;
|
|
5
|
+
private text;
|
|
6
|
+
private createdAt;
|
|
7
|
+
static getRegion(grn: string): string | null;
|
|
8
|
+
static getOwnerId(grn: string): string | null;
|
|
9
|
+
static getNamespaceName(grn: string): string | null;
|
|
10
|
+
static getUploadToken(grn: string): string | null;
|
|
11
|
+
static getOutputName(grn: string): string | null;
|
|
12
|
+
static isValid(grn: string): boolean;
|
|
13
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, uploadToken: string | null, outputName: string | null): string | null;
|
|
14
|
+
getOutputId(): string | null;
|
|
15
|
+
setOutputId(outputId: string | null): this;
|
|
16
|
+
withOutputId(outputId: string | null): this;
|
|
17
|
+
getName(): string | null;
|
|
18
|
+
setName(name: string | null): this;
|
|
19
|
+
withName(name: string | null): this;
|
|
20
|
+
getText(): string | null;
|
|
21
|
+
setText(text: string | null): this;
|
|
22
|
+
withText(text: string | null): this;
|
|
23
|
+
getCreatedAt(): number | null;
|
|
24
|
+
setCreatedAt(createdAt: number | null): this;
|
|
25
|
+
withCreatedAt(createdAt: number | null): this;
|
|
26
|
+
static fromDict(data: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}): Output | null;
|
|
29
|
+
toDict(): {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
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 grnFormat = "grn:gs2:{region}:{ownerId}:news:{namespaceName}:progress:{uploadToken}:output:{outputName}";
|
|
19
|
+
var Output = /** @class */ (function () {
|
|
20
|
+
function Output() {
|
|
21
|
+
this.outputId = null;
|
|
22
|
+
this.name = null;
|
|
23
|
+
this.text = null;
|
|
24
|
+
this.createdAt = null;
|
|
25
|
+
}
|
|
26
|
+
Output.getRegion = function (grn) {
|
|
27
|
+
var match = grn.match(grnFormat
|
|
28
|
+
.replace('{region}', '(.*)')
|
|
29
|
+
.replace('{ownerId}', '.*')
|
|
30
|
+
.replace('{namespaceName}', '.*')
|
|
31
|
+
.replace('{uploadToken}', '.*')
|
|
32
|
+
.replace('{outputName}', '.*'));
|
|
33
|
+
if (match) {
|
|
34
|
+
return match[1];
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
};
|
|
38
|
+
Output.getOwnerId = function (grn) {
|
|
39
|
+
var match = grn.match(grnFormat
|
|
40
|
+
.replace('{region}', '.*')
|
|
41
|
+
.replace('{ownerId}', '(.*)')
|
|
42
|
+
.replace('{namespaceName}', '.*')
|
|
43
|
+
.replace('{uploadToken}', '.*')
|
|
44
|
+
.replace('{outputName}', '.*'));
|
|
45
|
+
if (match) {
|
|
46
|
+
return match[1];
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
};
|
|
50
|
+
Output.getNamespaceName = function (grn) {
|
|
51
|
+
var match = grn.match(grnFormat
|
|
52
|
+
.replace('{region}', '.*')
|
|
53
|
+
.replace('{ownerId}', '.*')
|
|
54
|
+
.replace('{namespaceName}', '(.*)')
|
|
55
|
+
.replace('{uploadToken}', '.*')
|
|
56
|
+
.replace('{outputName}', '.*'));
|
|
57
|
+
if (match) {
|
|
58
|
+
return match[1];
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
};
|
|
62
|
+
Output.getUploadToken = function (grn) {
|
|
63
|
+
var match = grn.match(grnFormat
|
|
64
|
+
.replace('{region}', '.*')
|
|
65
|
+
.replace('{ownerId}', '.*')
|
|
66
|
+
.replace('{namespaceName}', '.*')
|
|
67
|
+
.replace('{uploadToken}', '(.*)')
|
|
68
|
+
.replace('{outputName}', '.*'));
|
|
69
|
+
if (match) {
|
|
70
|
+
return match[1];
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
};
|
|
74
|
+
Output.getOutputName = function (grn) {
|
|
75
|
+
var match = grn.match(grnFormat
|
|
76
|
+
.replace('{region}', '.*')
|
|
77
|
+
.replace('{ownerId}', '.*')
|
|
78
|
+
.replace('{namespaceName}', '.*')
|
|
79
|
+
.replace('{uploadToken}', '.*')
|
|
80
|
+
.replace('{outputName}', '(.*)'));
|
|
81
|
+
if (match) {
|
|
82
|
+
return match[1];
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
};
|
|
86
|
+
Output.isValid = function (grn) {
|
|
87
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
if (this.getUploadToken(grn) == null || this.getUploadToken(grn) === '') {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if (this.getOutputName(grn) == null || this.getOutputName(grn) === '') {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
};
|
|
104
|
+
Output.createGrn = function (region, ownerId, namespaceName, uploadToken, outputName) {
|
|
105
|
+
return grnFormat
|
|
106
|
+
.replace('{region}', region !== null && region !== void 0 ? region : '')
|
|
107
|
+
.replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
|
|
108
|
+
.replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
|
|
109
|
+
.replace('{uploadToken}', uploadToken !== null && uploadToken !== void 0 ? uploadToken : '')
|
|
110
|
+
.replace('{outputName}', outputName !== null && outputName !== void 0 ? outputName : '');
|
|
111
|
+
};
|
|
112
|
+
Output.prototype.getOutputId = function () {
|
|
113
|
+
return this.outputId;
|
|
114
|
+
};
|
|
115
|
+
Output.prototype.setOutputId = function (outputId) {
|
|
116
|
+
this.outputId = outputId;
|
|
117
|
+
return this;
|
|
118
|
+
};
|
|
119
|
+
Output.prototype.withOutputId = function (outputId) {
|
|
120
|
+
this.outputId = outputId;
|
|
121
|
+
return this;
|
|
122
|
+
};
|
|
123
|
+
Output.prototype.getName = function () {
|
|
124
|
+
return this.name;
|
|
125
|
+
};
|
|
126
|
+
Output.prototype.setName = function (name) {
|
|
127
|
+
this.name = name;
|
|
128
|
+
return this;
|
|
129
|
+
};
|
|
130
|
+
Output.prototype.withName = function (name) {
|
|
131
|
+
this.name = name;
|
|
132
|
+
return this;
|
|
133
|
+
};
|
|
134
|
+
Output.prototype.getText = function () {
|
|
135
|
+
return this.text;
|
|
136
|
+
};
|
|
137
|
+
Output.prototype.setText = function (text) {
|
|
138
|
+
this.text = text;
|
|
139
|
+
return this;
|
|
140
|
+
};
|
|
141
|
+
Output.prototype.withText = function (text) {
|
|
142
|
+
this.text = text;
|
|
143
|
+
return this;
|
|
144
|
+
};
|
|
145
|
+
Output.prototype.getCreatedAt = function () {
|
|
146
|
+
return this.createdAt;
|
|
147
|
+
};
|
|
148
|
+
Output.prototype.setCreatedAt = function (createdAt) {
|
|
149
|
+
this.createdAt = createdAt;
|
|
150
|
+
return this;
|
|
151
|
+
};
|
|
152
|
+
Output.prototype.withCreatedAt = function (createdAt) {
|
|
153
|
+
this.createdAt = createdAt;
|
|
154
|
+
return this;
|
|
155
|
+
};
|
|
156
|
+
Output.fromDict = function (data) {
|
|
157
|
+
if (data == undefined || data == null) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
return new Output()
|
|
161
|
+
.withOutputId(data["outputId"])
|
|
162
|
+
.withName(data["name"])
|
|
163
|
+
.withText(data["text"])
|
|
164
|
+
.withCreatedAt(data["createdAt"]);
|
|
165
|
+
};
|
|
166
|
+
Output.prototype.toDict = function () {
|
|
167
|
+
return {
|
|
168
|
+
"outputId": this.getOutputId(),
|
|
169
|
+
"name": this.getName(),
|
|
170
|
+
"text": this.getText(),
|
|
171
|
+
"createdAt": this.getCreatedAt(),
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
return Output;
|
|
175
|
+
}());
|
|
176
|
+
exports.default = Output;
|
|
177
|
+
//# sourceMappingURL=Output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Output.js","sourceRoot":"","sources":["Output.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,IAAM,SAAS,GAAW,4FAA4F,CAAC;AAEvH;IAAA;QACY,aAAQ,GAAgB,IAAI,CAAC;QAC7B,SAAI,GAAgB,IAAI,CAAC;QACzB,SAAI,GAAgB,IAAI,CAAC;QACzB,cAAS,GAAgB,IAAI,CAAC;IAyK1C,CAAC;IAvKiB,gBAAS,GAAvB,UAAwB,GAAW;QAC/B,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,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AAC,WAAW,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;SACnC,CAAC;IACN,CAAC;IACL,aAAC;AAAD,CAAC,AA7KD,IA6KC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
const grnFormat: string = "grn:gs2:{region}:{ownerId}:news:{namespaceName}:progress:{uploadToken}:output:{outputName}";
|
|
19
|
+
|
|
20
|
+
export default class Output implements IModel {
|
|
21
|
+
private outputId: string|null = null;
|
|
22
|
+
private name: string|null = null;
|
|
23
|
+
private text: string|null = null;
|
|
24
|
+
private createdAt: number|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('{uploadToken}', '.*')
|
|
32
|
+
.replace('{outputName}', '.*')
|
|
33
|
+
);
|
|
34
|
+
if (match) {
|
|
35
|
+
return match[1];
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public static getOwnerId(grn: string): string|null {
|
|
41
|
+
const match = grn.match(grnFormat
|
|
42
|
+
.replace('{region}', '.*')
|
|
43
|
+
.replace('{ownerId}', '(.*)')
|
|
44
|
+
.replace('{namespaceName}', '.*')
|
|
45
|
+
.replace('{uploadToken}', '.*')
|
|
46
|
+
.replace('{outputName}', '.*')
|
|
47
|
+
);
|
|
48
|
+
if (match) {
|
|
49
|
+
return match[1];
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public static getNamespaceName(grn: string): string|null {
|
|
55
|
+
const match = grn.match(grnFormat
|
|
56
|
+
.replace('{region}', '.*')
|
|
57
|
+
.replace('{ownerId}', '.*')
|
|
58
|
+
.replace('{namespaceName}', '(.*)')
|
|
59
|
+
.replace('{uploadToken}', '.*')
|
|
60
|
+
.replace('{outputName}', '.*')
|
|
61
|
+
);
|
|
62
|
+
if (match) {
|
|
63
|
+
return match[1];
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public static getUploadToken(grn: string): string|null {
|
|
69
|
+
const match = grn.match(grnFormat
|
|
70
|
+
.replace('{region}', '.*')
|
|
71
|
+
.replace('{ownerId}', '.*')
|
|
72
|
+
.replace('{namespaceName}', '.*')
|
|
73
|
+
.replace('{uploadToken}', '(.*)')
|
|
74
|
+
.replace('{outputName}', '.*')
|
|
75
|
+
);
|
|
76
|
+
if (match) {
|
|
77
|
+
return match[1];
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public static getOutputName(grn: string): string|null {
|
|
83
|
+
const match = grn.match(grnFormat
|
|
84
|
+
.replace('{region}', '.*')
|
|
85
|
+
.replace('{ownerId}', '.*')
|
|
86
|
+
.replace('{namespaceName}', '.*')
|
|
87
|
+
.replace('{uploadToken}', '.*')
|
|
88
|
+
.replace('{outputName}', '(.*)')
|
|
89
|
+
);
|
|
90
|
+
if (match) {
|
|
91
|
+
return match[1];
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public static isValid(grn: string): boolean {
|
|
97
|
+
if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
if (this.getUploadToken(grn) == null || this.getUploadToken(grn) === '') {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (this.getOutputName(grn) == null || this.getOutputName(grn) === '') {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public static createGrn(
|
|
116
|
+
region: string|null,
|
|
117
|
+
ownerId: string|null,
|
|
118
|
+
namespaceName: string|null,
|
|
119
|
+
uploadToken: string|null,
|
|
120
|
+
outputName: string|null,
|
|
121
|
+
): string|null {
|
|
122
|
+
return grnFormat
|
|
123
|
+
.replace('{region}', region ?? '')
|
|
124
|
+
.replace('{ownerId}', ownerId ?? '')
|
|
125
|
+
.replace('{namespaceName}', namespaceName ?? '')
|
|
126
|
+
.replace('{uploadToken}', uploadToken ?? '')
|
|
127
|
+
.replace('{outputName}', outputName ?? '');
|
|
128
|
+
}
|
|
129
|
+
public getOutputId(): string|null {
|
|
130
|
+
return this.outputId;
|
|
131
|
+
}
|
|
132
|
+
public setOutputId(outputId: string|null) {
|
|
133
|
+
this.outputId = outputId;
|
|
134
|
+
return this;
|
|
135
|
+
}
|
|
136
|
+
public withOutputId(outputId: string|null): this {
|
|
137
|
+
this.outputId = outputId;
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
public getName(): string|null {
|
|
141
|
+
return this.name;
|
|
142
|
+
}
|
|
143
|
+
public setName(name: string|null) {
|
|
144
|
+
this.name = name;
|
|
145
|
+
return this;
|
|
146
|
+
}
|
|
147
|
+
public withName(name: string|null): this {
|
|
148
|
+
this.name = name;
|
|
149
|
+
return this;
|
|
150
|
+
}
|
|
151
|
+
public getText(): string|null {
|
|
152
|
+
return this.text;
|
|
153
|
+
}
|
|
154
|
+
public setText(text: string|null) {
|
|
155
|
+
this.text = text;
|
|
156
|
+
return this;
|
|
157
|
+
}
|
|
158
|
+
public withText(text: string|null): this {
|
|
159
|
+
this.text = text;
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
public getCreatedAt(): number|null {
|
|
163
|
+
return this.createdAt;
|
|
164
|
+
}
|
|
165
|
+
public setCreatedAt(createdAt: number|null) {
|
|
166
|
+
this.createdAt = createdAt;
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
public withCreatedAt(createdAt: number|null): this {
|
|
170
|
+
this.createdAt = createdAt;
|
|
171
|
+
return this;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
public static fromDict(data: {[key: string]: any}): Output|null {
|
|
175
|
+
if (data == undefined || data == null) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
return new Output()
|
|
179
|
+
.withOutputId(data["outputId"])
|
|
180
|
+
.withName(data["name"])
|
|
181
|
+
.withText(data["text"])
|
|
182
|
+
.withCreatedAt(data["createdAt"]);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
public toDict(): {[key: string]: any} {
|
|
186
|
+
return {
|
|
187
|
+
"outputId": this.getOutputId(),
|
|
188
|
+
"name": this.getName(),
|
|
189
|
+
"text": this.getText(),
|
|
190
|
+
"createdAt": this.getCreatedAt(),
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class Progress implements IModel {
|
|
3
|
+
private progressId;
|
|
4
|
+
private uploadToken;
|
|
5
|
+
private generated;
|
|
6
|
+
private patternCount;
|
|
7
|
+
private createdAt;
|
|
8
|
+
private updatedAt;
|
|
9
|
+
static getRegion(grn: string): string | null;
|
|
10
|
+
static getOwnerId(grn: string): string | null;
|
|
11
|
+
static getNamespaceName(grn: string): string | null;
|
|
12
|
+
static getUploadToken(grn: string): string | null;
|
|
13
|
+
static isValid(grn: string): boolean;
|
|
14
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, uploadToken: string | null): string | null;
|
|
15
|
+
getProgressId(): string | null;
|
|
16
|
+
setProgressId(progressId: string | null): this;
|
|
17
|
+
withProgressId(progressId: string | null): this;
|
|
18
|
+
getUploadToken(): string | null;
|
|
19
|
+
setUploadToken(uploadToken: string | null): this;
|
|
20
|
+
withUploadToken(uploadToken: string | null): this;
|
|
21
|
+
getGenerated(): number | null;
|
|
22
|
+
setGenerated(generated: number | null): this;
|
|
23
|
+
withGenerated(generated: number | null): this;
|
|
24
|
+
getPatternCount(): number | null;
|
|
25
|
+
setPatternCount(patternCount: number | null): this;
|
|
26
|
+
withPatternCount(patternCount: number | null): this;
|
|
27
|
+
getCreatedAt(): number | null;
|
|
28
|
+
setCreatedAt(createdAt: number | null): this;
|
|
29
|
+
withCreatedAt(createdAt: number | null): this;
|
|
30
|
+
getUpdatedAt(): number | null;
|
|
31
|
+
setUpdatedAt(updatedAt: number | null): this;
|
|
32
|
+
withUpdatedAt(updatedAt: number | null): this;
|
|
33
|
+
static fromDict(data: {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}): Progress | null;
|
|
36
|
+
toDict(): {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
};
|
|
39
|
+
}
|