gs2 1.3.173 → 1.3.175
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/LICENSE.txt +63 -0
- package/README-en.md +38 -0
- package/README.md +38 -0
- package/account/model/Account.d.ts +5 -0
- package/account/model/Account.js +22 -0
- package/account/model/Account.js.map +1 -1
- package/account/model/Account.ts +23 -0
- package/account/model/BanStatus.d.ts +21 -0
- package/account/model/BanStatus.js +76 -0
- package/account/model/BanStatus.js.map +1 -0
- package/account/model/BanStatus.ts +74 -0
- package/account/model/index.d.ts +2 -1
- package/account/model/index.js +3 -1
- package/account/model/index.js.map +1 -1
- package/account/model/index.ts +2 -0
- package/account/request/AddBanRequest.d.ts +34 -0
- package/account/request/AddBanRequest.js +112 -0
- package/account/request/AddBanRequest.js.map +1 -0
- package/account/request/AddBanRequest.ts +119 -0
- package/account/request/RemoveBanRequest.d.ts +33 -0
- package/account/request/RemoveBanRequest.js +109 -0
- package/account/request/RemoveBanRequest.js.map +1 -0
- package/account/request/RemoveBanRequest.ts +119 -0
- package/account/request/index.d.ts +3 -1
- package/account/request/index.js +5 -1
- package/account/request/index.js.map +1 -1
- package/account/request/index.ts +4 -0
- package/account/rest.d.ts +2 -0
- package/account/rest.js +58 -0
- package/account/rest.js.map +1 -1
- package/account/rest.ts +66 -0
- package/account/result/AddBanResult.d.ts +14 -0
- package/account/result/AddBanResult.js +48 -0
- package/account/result/AddBanResult.js.map +1 -0
- package/account/result/AddBanResult.ts +48 -0
- package/account/result/AuthenticationResult.d.ts +4 -0
- package/account/result/AuthenticationResult.js +20 -0
- package/account/result/AuthenticationResult.js.map +1 -1
- package/account/result/AuthenticationResult.ts +25 -0
- package/account/result/RemoveBanResult.d.ts +14 -0
- package/account/result/RemoveBanResult.js +48 -0
- package/account/result/RemoveBanResult.js.map +1 -0
- package/account/result/RemoveBanResult.ts +48 -0
- package/account/result/index.d.ts +3 -1
- package/account/result/index.js +5 -1
- package/account/result/index.js.map +1 -1
- package/account/result/index.ts +4 -0
- package/package.json +1 -1
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
|
|
4
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
5
|
+
|
|
6
|
+
1. Definitions.
|
|
7
|
+
|
|
8
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
9
|
+
|
|
10
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
11
|
+
|
|
12
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
13
|
+
|
|
14
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
15
|
+
|
|
16
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
17
|
+
|
|
18
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
19
|
+
|
|
20
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
21
|
+
|
|
22
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
23
|
+
|
|
24
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
25
|
+
|
|
26
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
27
|
+
|
|
28
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
29
|
+
|
|
30
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
31
|
+
|
|
32
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
33
|
+
|
|
34
|
+
1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
35
|
+
2. You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
36
|
+
3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
37
|
+
4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
38
|
+
|
|
39
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
40
|
+
|
|
41
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
42
|
+
|
|
43
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
44
|
+
|
|
45
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
46
|
+
|
|
47
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
48
|
+
|
|
49
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
50
|
+
|
|
51
|
+
END OF TERMS AND CONDITIONS
|
|
52
|
+
|
|
53
|
+
Note: Other license terms may apply to certain, identified software files contained within or distributed with the accompanying software if such terms are included in the directory containing the accompanying software. Such other license terms will then apply in lieu of the terms of the software license above.
|
|
54
|
+
|
|
55
|
+
JSON processing code subject to the JSON License from JSON.org:
|
|
56
|
+
|
|
57
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
58
|
+
|
|
59
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
60
|
+
|
|
61
|
+
The Software shall be used for Good, not Evil.
|
|
62
|
+
|
|
63
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README-en.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[⇒日本語のREADMEへ](README.md)
|
|
2
|
+
|
|
3
|
+
# gs2-typescript-cdk
|
|
4
|
+
|
|
5
|
+
CDK for TypeScript generation of GS2-Deploy templates for Game Server Services (https://gs2.io).
|
|
6
|
+
|
|
7
|
+
## What is Game Server Services?
|
|
8
|
+
|
|
9
|
+
Game Server Services(GS2) is a back-end server service (BaaS) specialized for game development.
|
|
10
|
+
|
|
11
|
+
GS2 is a general-purpose game server solution created to improve efficiency for game developers and supports Games as a Service (GaaS) and Live Gaming.
|
|
12
|
+
|
|
13
|
+
The service allows for flexible management of player data and data analysis, enabling proper analysis of in-game resource distribution and consumption to maintain a healthy environment.
|
|
14
|
+
In addition, it provides story progression management and possession management, contributing to game monetization and player engagement.
|
|
15
|
+
GS2 supports online functionality and makes it easy for game developers to analyze data and manage economics to help their games succeed.
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
|
|
19
|
+
GS2 credentials are required to use the SDK.
|
|
20
|
+
Follow the instructions in [GS2 Setup](https://docs.gs2.io/en/get_start/tutorial/setup_gs2/) to issue the credential.
|
|
21
|
+
|
|
22
|
+
### Requirements
|
|
23
|
+
|
|
24
|
+
- TypeScript 4.5+
|
|
25
|
+
|
|
26
|
+
[⇒Start using GS2 - SDK - Various programming languages](https://docs.gs2.io/en/get_start/#various-programming-languages)
|
|
27
|
+
|
|
28
|
+
## SDK detailed specifications
|
|
29
|
+
|
|
30
|
+
For details on the API for each service and communication method, please refer to the
|
|
31
|
+
|
|
32
|
+
[⇒API Reference](https://docs.gs2.io/en/api_reference/) page.
|
|
33
|
+
|
|
34
|
+
For information on the initialization process, please refer to the
|
|
35
|
+
|
|
36
|
+
[⇒API Reference - Initialization process](https://docs.gs2.io/en/api_reference/initialize/) page.
|
|
37
|
+
|
|
38
|
+
*All code in this project is auto-generated except for gs2-java-sdk-core, so we cannot respond to individual Pull-Requests. *
|
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[⇒README in English](README-en.md)
|
|
2
|
+
|
|
3
|
+
# gs2-typescript-sdk
|
|
4
|
+
|
|
5
|
+
Game Server Services(https://gs2.io) を TypeScript で利用するためのSDKです。
|
|
6
|
+
|
|
7
|
+
## Game Server Services とは
|
|
8
|
+
|
|
9
|
+
Game Server Services(GS2) とはゲーム開発に特化したバックエンドサーバサービス(BaaS)です。
|
|
10
|
+
|
|
11
|
+
GS2は、ゲーム開発者の効率化を目指して生まれた汎用ゲームサーバーのソリューションであり、Games as a Service(GaaS) や Live Gaming などをサポートしています。
|
|
12
|
+
|
|
13
|
+
このサービスでは、プレイヤーデータの柔軟な管理やデータ分析が可能であり、ゲーム内の資源の流通や消費量を適切に分析して健全な環境を維持することができます。
|
|
14
|
+
さらに、ストーリー進行管理や所持品管理などの機能を提供し、ゲームの収益化やプレイヤーエンゲージメントの向上に貢献します。
|
|
15
|
+
GS2は、オンライン機能をサポートし、ゲーム開発者がデータの分析や経済管理を容易に行えるようにすることで、ゲームの成功を支援します。
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
|
|
19
|
+
SDKを利用するには GS2 のクレデンシャルが必要です。
|
|
20
|
+
[はじめかた](https://app.gs2.io/docs/index.html?java#get-start) の手順に従ってクレデンシャルを発行してください。
|
|
21
|
+
|
|
22
|
+
### 動作条件
|
|
23
|
+
|
|
24
|
+
- TypeScript 4.5+
|
|
25
|
+
|
|
26
|
+
[⇒GS2の利用を開始 - SDK - 各種プログラミング言語](https://docs.gs2.io/ja/get_start/#%E5%90%84%E7%A8%AE%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E8%A8%80%E8%AA%9E)
|
|
27
|
+
|
|
28
|
+
## SDK の詳細仕様
|
|
29
|
+
|
|
30
|
+
各種サービス・通信方式の詳細は
|
|
31
|
+
|
|
32
|
+
[⇒API リファレンス](https://docs.gs2.io/ja/api_reference/)
|
|
33
|
+
|
|
34
|
+
[⇒API リファレンス - 初期化処理](https://docs.gs2.io/ja/api_reference/initialize/)
|
|
35
|
+
|
|
36
|
+
をご参照ください。
|
|
37
|
+
|
|
38
|
+
*本プロジェクトのコードは gs2-golang-sdk-core 以外は全て自動生成されているため、個別に Pull-Request を頂いても対応できません。*
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import IModel from '../../core/interface/IModel';
|
|
2
|
+
import BanStatus from './BanStatus';
|
|
2
3
|
export default class Account implements IModel {
|
|
3
4
|
private accountId;
|
|
4
5
|
private userId;
|
|
5
6
|
private password;
|
|
6
7
|
private timeOffset;
|
|
8
|
+
private banStatuses;
|
|
7
9
|
private banned;
|
|
8
10
|
private createdAt;
|
|
9
11
|
private revision;
|
|
@@ -25,6 +27,9 @@ export default class Account implements IModel {
|
|
|
25
27
|
getTimeOffset(): number | null;
|
|
26
28
|
setTimeOffset(timeOffset: number | null): this;
|
|
27
29
|
withTimeOffset(timeOffset: number | null): this;
|
|
30
|
+
getBanStatuses(): BanStatus[] | null;
|
|
31
|
+
setBanStatuses(banStatuses: BanStatus[] | null): this;
|
|
32
|
+
withBanStatuses(banStatuses: BanStatus[] | null): this;
|
|
28
33
|
getBanned(): boolean | null;
|
|
29
34
|
setBanned(banned: boolean | null): this;
|
|
30
35
|
withBanned(banned: boolean | null): this;
|
package/account/model/Account.js
CHANGED
|
@@ -15,6 +15,8 @@ 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 tslib_1 = require("tslib");
|
|
19
|
+
var BanStatus_1 = tslib_1.__importDefault(require("./BanStatus"));
|
|
18
20
|
var grnFormat = "grn:gs2:{region}:{ownerId}:account:{namespaceName}:account:{userId}";
|
|
19
21
|
var Account = /** @class */ (function () {
|
|
20
22
|
function Account() {
|
|
@@ -22,6 +24,7 @@ var Account = /** @class */ (function () {
|
|
|
22
24
|
this.userId = null;
|
|
23
25
|
this.password = null;
|
|
24
26
|
this.timeOffset = null;
|
|
27
|
+
this.banStatuses = null;
|
|
25
28
|
this.banned = null;
|
|
26
29
|
this.createdAt = null;
|
|
27
30
|
this.revision = null;
|
|
@@ -136,6 +139,17 @@ var Account = /** @class */ (function () {
|
|
|
136
139
|
this.timeOffset = timeOffset;
|
|
137
140
|
return this;
|
|
138
141
|
};
|
|
142
|
+
Account.prototype.getBanStatuses = function () {
|
|
143
|
+
return this.banStatuses;
|
|
144
|
+
};
|
|
145
|
+
Account.prototype.setBanStatuses = function (banStatuses) {
|
|
146
|
+
this.banStatuses = banStatuses;
|
|
147
|
+
return this;
|
|
148
|
+
};
|
|
149
|
+
Account.prototype.withBanStatuses = function (banStatuses) {
|
|
150
|
+
this.banStatuses = banStatuses;
|
|
151
|
+
return this;
|
|
152
|
+
};
|
|
139
153
|
Account.prototype.getBanned = function () {
|
|
140
154
|
return this.banned;
|
|
141
155
|
};
|
|
@@ -178,6 +192,10 @@ var Account = /** @class */ (function () {
|
|
|
178
192
|
.withUserId(data["userId"])
|
|
179
193
|
.withPassword(data["password"])
|
|
180
194
|
.withTimeOffset(data["timeOffset"])
|
|
195
|
+
.withBanStatuses(data.banStatuses ?
|
|
196
|
+
data.banStatuses.map(function (item) {
|
|
197
|
+
return BanStatus_1.default.fromDict(item);
|
|
198
|
+
}) : [])
|
|
181
199
|
.withBanned(data["banned"])
|
|
182
200
|
.withCreatedAt(data["createdAt"])
|
|
183
201
|
.withRevision(data["revision"]);
|
|
@@ -188,6 +206,10 @@ var Account = /** @class */ (function () {
|
|
|
188
206
|
"userId": this.getUserId(),
|
|
189
207
|
"password": this.getPassword(),
|
|
190
208
|
"timeOffset": this.getTimeOffset(),
|
|
209
|
+
"banStatuses": this.getBanStatuses() ?
|
|
210
|
+
this.getBanStatuses().map(function (item) {
|
|
211
|
+
return item.toDict();
|
|
212
|
+
}) : [],
|
|
191
213
|
"banned": this.getBanned(),
|
|
192
214
|
"createdAt": this.getCreatedAt(),
|
|
193
215
|
"revision": this.getRevision(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.js","sourceRoot":"","sources":["Account.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"Account.js","sourceRoot":"","sources":["Account.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,kEAAoC;AACpC,IAAM,SAAS,GAAW,qEAAqE,CAAC;AAEhG;IAAA;QACY,cAAS,GAAgB,IAAI,CAAC;QAC9B,WAAM,GAAgB,IAAI,CAAC;QAC3B,aAAQ,GAAgB,IAAI,CAAC;QAC7B,eAAU,GAAgB,IAAI,CAAC;QAC/B,gBAAW,GAAqB,IAAI,CAAC;QACrC,WAAM,GAAiB,IAAI,CAAC;QAC5B,cAAS,GAAgB,IAAI,CAAC;QAC9B,aAAQ,GAAgB,IAAI,CAAC;IA8MzC,CAAC;IA5MiB,iBAAS,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,CAAC,CAC7B,CAAC;QACF,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;SACnB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,kBAAU,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,OAAO,CAAC,iBAAiB,EAAE,IAA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C;aACN,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC1B,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aAChC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACxC,CAAC;IAEM,wBAAM,GAAb;QACI,OAAO;YACH,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;YAChC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;YAC9B,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE;YAClC,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;gBAClC,IAAI,CAAC,cAAc,EAAG,CAAC,GAAG,CAAC,UAAC,IAAe;oBACvC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;gBACzB,CAAC,CACJ,CAAC,CAAC,CAAC,EAAE;YACN,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;YAChC,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;SACjC,CAAC;IACN,CAAC;IACL,cAAC;AAAD,CAAC,AAtND,IAsNC"}
|
package/account/model/Account.ts
CHANGED
|
@@ -15,6 +15,7 @@ permissions and limitations under the License.
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import IModel from '../../core/interface/IModel';
|
|
18
|
+
import BanStatus from './BanStatus';
|
|
18
19
|
const grnFormat: string = "grn:gs2:{region}:{ownerId}:account:{namespaceName}:account:{userId}";
|
|
19
20
|
|
|
20
21
|
export default class Account implements IModel {
|
|
@@ -22,6 +23,7 @@ export default class Account implements IModel {
|
|
|
22
23
|
private userId: string|null = null;
|
|
23
24
|
private password: string|null = null;
|
|
24
25
|
private timeOffset: number|null = null;
|
|
26
|
+
private banStatuses: BanStatus[]|null = null;
|
|
25
27
|
private banned: boolean|null = null;
|
|
26
28
|
private createdAt: number|null = null;
|
|
27
29
|
private revision: number|null = null;
|
|
@@ -150,6 +152,17 @@ export default class Account implements IModel {
|
|
|
150
152
|
this.timeOffset = timeOffset;
|
|
151
153
|
return this;
|
|
152
154
|
}
|
|
155
|
+
public getBanStatuses(): BanStatus[]|null {
|
|
156
|
+
return this.banStatuses;
|
|
157
|
+
}
|
|
158
|
+
public setBanStatuses(banStatuses: BanStatus[]|null) {
|
|
159
|
+
this.banStatuses = banStatuses;
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
public withBanStatuses(banStatuses: BanStatus[]|null): this {
|
|
163
|
+
this.banStatuses = banStatuses;
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
153
166
|
public getBanned(): boolean|null {
|
|
154
167
|
return this.banned;
|
|
155
168
|
}
|
|
@@ -193,6 +206,11 @@ export default class Account implements IModel {
|
|
|
193
206
|
.withUserId(data["userId"])
|
|
194
207
|
.withPassword(data["password"])
|
|
195
208
|
.withTimeOffset(data["timeOffset"])
|
|
209
|
+
.withBanStatuses(data.banStatuses ?
|
|
210
|
+
data.banStatuses.map((item: {[key: string]: any}) => {
|
|
211
|
+
return BanStatus.fromDict(item);
|
|
212
|
+
}
|
|
213
|
+
) : [])
|
|
196
214
|
.withBanned(data["banned"])
|
|
197
215
|
.withCreatedAt(data["createdAt"])
|
|
198
216
|
.withRevision(data["revision"]);
|
|
@@ -204,6 +222,11 @@ export default class Account implements IModel {
|
|
|
204
222
|
"userId": this.getUserId(),
|
|
205
223
|
"password": this.getPassword(),
|
|
206
224
|
"timeOffset": this.getTimeOffset(),
|
|
225
|
+
"banStatuses": this.getBanStatuses() ?
|
|
226
|
+
this.getBanStatuses()!.map((item: BanStatus) => {
|
|
227
|
+
return item.toDict();
|
|
228
|
+
}
|
|
229
|
+
) : [],
|
|
207
230
|
"banned": this.getBanned(),
|
|
208
231
|
"createdAt": this.getCreatedAt(),
|
|
209
232
|
"revision": this.getRevision(),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class BanStatus implements IModel {
|
|
3
|
+
private name;
|
|
4
|
+
private reason;
|
|
5
|
+
private releaseTimestamp;
|
|
6
|
+
getName(): string | null;
|
|
7
|
+
setName(name: string | null): this;
|
|
8
|
+
withName(name: string | null): this;
|
|
9
|
+
getReason(): string | null;
|
|
10
|
+
setReason(reason: string | null): this;
|
|
11
|
+
withReason(reason: string | null): this;
|
|
12
|
+
getReleaseTimestamp(): number | null;
|
|
13
|
+
setReleaseTimestamp(releaseTimestamp: number | null): this;
|
|
14
|
+
withReleaseTimestamp(releaseTimestamp: number | null): this;
|
|
15
|
+
static fromDict(data: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}): BanStatus | 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 BanStatus = /** @class */ (function () {
|
|
19
|
+
function BanStatus() {
|
|
20
|
+
this.name = null;
|
|
21
|
+
this.reason = null;
|
|
22
|
+
this.releaseTimestamp = null;
|
|
23
|
+
}
|
|
24
|
+
BanStatus.prototype.getName = function () {
|
|
25
|
+
return this.name;
|
|
26
|
+
};
|
|
27
|
+
BanStatus.prototype.setName = function (name) {
|
|
28
|
+
this.name = name;
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
BanStatus.prototype.withName = function (name) {
|
|
32
|
+
this.name = name;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
BanStatus.prototype.getReason = function () {
|
|
36
|
+
return this.reason;
|
|
37
|
+
};
|
|
38
|
+
BanStatus.prototype.setReason = function (reason) {
|
|
39
|
+
this.reason = reason;
|
|
40
|
+
return this;
|
|
41
|
+
};
|
|
42
|
+
BanStatus.prototype.withReason = function (reason) {
|
|
43
|
+
this.reason = reason;
|
|
44
|
+
return this;
|
|
45
|
+
};
|
|
46
|
+
BanStatus.prototype.getReleaseTimestamp = function () {
|
|
47
|
+
return this.releaseTimestamp;
|
|
48
|
+
};
|
|
49
|
+
BanStatus.prototype.setReleaseTimestamp = function (releaseTimestamp) {
|
|
50
|
+
this.releaseTimestamp = releaseTimestamp;
|
|
51
|
+
return this;
|
|
52
|
+
};
|
|
53
|
+
BanStatus.prototype.withReleaseTimestamp = function (releaseTimestamp) {
|
|
54
|
+
this.releaseTimestamp = releaseTimestamp;
|
|
55
|
+
return this;
|
|
56
|
+
};
|
|
57
|
+
BanStatus.fromDict = function (data) {
|
|
58
|
+
if (data == undefined || data == null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return new BanStatus()
|
|
62
|
+
.withName(data["name"])
|
|
63
|
+
.withReason(data["reason"])
|
|
64
|
+
.withReleaseTimestamp(data["releaseTimestamp"]);
|
|
65
|
+
};
|
|
66
|
+
BanStatus.prototype.toDict = function () {
|
|
67
|
+
return {
|
|
68
|
+
"name": this.getName(),
|
|
69
|
+
"reason": this.getReason(),
|
|
70
|
+
"releaseTimestamp": this.getReleaseTimestamp(),
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
return BanStatus;
|
|
74
|
+
}());
|
|
75
|
+
exports.default = BanSt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AAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,IAAI,SAAS,EAAE;aACjB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACtB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC1B,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACxD,CAAC;IAEM,0BAAM,GAAb;QACI,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACtB,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,kBAAkB,EAAE,IAAI,CAAC,mBAAmB,EAAE;SACjD,CAAC;IACN,CAAC;IACL,gBAAC;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 BanStatus implements IModel {
|
|
20
|
+
private name: string|null = null;
|
|
21
|
+
private reason: string|null = null;
|
|
22
|
+
private releaseTimestamp: number|null = null;
|
|
23
|
+
public getName(): string|null {
|
|
24
|
+
return this.name;
|
|
25
|
+
}
|
|
26
|
+
public setName(name: string|null) {
|
|
27
|
+
this.name = name;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
public withName(name: string|null): this {
|
|
31
|
+
this.name = name;
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
public getReason(): string|null {
|
|
35
|
+
return this.reason;
|
|
36
|
+
}
|
|
37
|
+
public setReason(reason: string|null) {
|
|
38
|
+
this.reason = reason;
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
public withReason(reason: string|null): this {
|
|
42
|
+
this.reason = reason;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
public getReleaseTimestamp(): number|null {
|
|
46
|
+
return this.releaseTimestamp;
|
|
47
|
+
}
|
|
48
|
+
public setReleaseTimestamp(releaseTimestamp: number|null) {
|
|
49
|
+
this.releaseTimestamp = releaseTimestamp;
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
public withReleaseTimestamp(releaseTimestamp: number|null): this {
|
|
53
|
+
this.releaseTimestamp = releaseTimestamp;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public static fromDict(data: {[key: string]: any}): BanStatus|null {
|
|
58
|
+
if (data == undefined || data == null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return new BanStatus()
|
|
62
|
+
.withName(data["name"])
|
|
63
|
+
.withReason(data["reason"])
|
|
64
|
+
.withReleaseTimestamp(data["releaseTimestamp"]);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public toDict(): {[key: string]: any} {
|
|
68
|
+
return {
|
|
69
|
+
"name": this.getName(),
|
|
70
|
+
"reason": this.getReason(),
|
|
71
|
+
"releaseTimestamp": this.getReleaseTimestamp(),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
package/account/model/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Namespace from "./Namespace";
|
|
|
2
2
|
import Account from "./Account";
|
|
3
3
|
import TakeOver from "./TakeOver";
|
|
4
4
|
import DataOwner from "./DataOwner";
|
|
5
|
+
import BanStatus from "./BanStatus";
|
|
5
6
|
import ScriptSetting from "./ScriptSetting";
|
|
6
7
|
import LogSetting from "./LogSetting";
|
|
7
|
-
export { Namespace, Account, TakeOver, DataOwner, ScriptSetting, LogSetting, };
|
|
8
|
+
export { Namespace, Account, TakeOver, DataOwner, BanStatus, ScriptSetting, LogSetting, };
|
package/account/model/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogSetting = exports.ScriptSetting = exports.DataOwner = exports.TakeOver = exports.Account = exports.Namespace = void 0;
|
|
3
|
+
exports.LogSetting = exports.ScriptSetting = exports.BanStatus = exports.DataOwner = exports.TakeOver = exports.Account = exports.Namespace = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
/*
|
|
6
6
|
Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
|
|
@@ -25,6 +25,8 @@ var TakeOver_1 = tslib_1.__importDefault(require("./TakeOver"));
|
|
|
25
25
|
exports.TakeOver = TakeOver_1.default;
|
|
26
26
|
var DataOwner_1 = tslib_1.__importDefault(require("./DataOwner"));
|
|
27
27
|
exports.DataOwner = DataOwner_1.default;
|
|
28
|
+
var BanStatus_1 = tslib_1.__importDefault(require("./BanStatus"));
|
|
29
|
+
exports.BanStatus = BanStatus_1.default;
|
|
28
30
|
var ScriptSetting_1 = tslib_1.__importDefault(require("./ScriptSetting"));
|
|
29
31
|
exports.ScriptSetting = ScriptSetting_1.default;
|
|
30
32
|
var LogSetting_1 = tslib_1.__importDefault(require("./LogSetting"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,kEAAmC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,kEAAmC;AAS/B,oBATG,mBAAS,CASH;AARb,8DAA+B;AAS3B,kBATG,iBAAO,CASH;AARX,gEAAiC;AAS7B,mBATG,kBAAQ,CASH;AARZ,kEAAmC;AAS/B,oBATG,mBAAS,CASH;AARb,kEAAmC;AAS/B,oBATG,mBAAS,CASH;AARb,0EAA2C;AASvC,wBATG,uBAAa,CASH;AARjB,oEAAqC;AASjC,qBATG,oBAAU,CASH"}
|
package/account/model/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ import Namespace from "./Namespace"
|
|
|
17
17
|
import Account from "./Account"
|
|
18
18
|
import TakeOver from "./TakeOver"
|
|
19
19
|
import DataOwner from "./DataOwner"
|
|
20
|
+
import BanStatus from "./BanStatus"
|
|
20
21
|
import ScriptSetting from "./ScriptSetting"
|
|
21
22
|
import LogSetting from "./LogSetting"
|
|
22
23
|
|
|
@@ -25,6 +26,7 @@ export {
|
|
|
25
26
|
Account,
|
|
26
27
|
TakeOver,
|
|
27
28
|
DataOwner,
|
|
29
|
+
BanStatus,
|
|
28
30
|
ScriptSetting,
|
|
29
31
|
LogSetting,
|
|
30
32
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import IRequest from '../../core/interface/IRequest';
|
|
2
|
+
import * as Gs2Account from '../model';
|
|
3
|
+
export default class AddBanRequest implements IRequest {
|
|
4
|
+
private requestId;
|
|
5
|
+
private contextStack;
|
|
6
|
+
private namespaceName;
|
|
7
|
+
private userId;
|
|
8
|
+
private banStatus;
|
|
9
|
+
private duplicationAvoider;
|
|
10
|
+
getRequestId(): string | null;
|
|
11
|
+
setRequestId(requestId: string | null): this;
|
|
12
|
+
withRequestId(requestId: string | null): this;
|
|
13
|
+
getContextStack(): string | null;
|
|
14
|
+
setContextStack(contextStack: string | null): this;
|
|
15
|
+
withContextStack(contextStack: string | null): this;
|
|
16
|
+
getNamespaceName(): string | null;
|
|
17
|
+
setNamespaceName(namespaceName: string | null): this;
|
|
18
|
+
withNamespaceName(namespaceName: string | null): this;
|
|
19
|
+
getUserId(): string | null;
|
|
20
|
+
setUserId(userId: string | null): this;
|
|
21
|
+
withUserId(userId: string | null): this;
|
|
22
|
+
getBanStatus(): Gs2Account.BanStatus | null;
|
|
23
|
+
setBanStatus(banStatus: Gs2Account.BanStatus | null): this;
|
|
24
|
+
withBanStatus(banStatus: Gs2Account.BanStatus | null): this;
|
|
25
|
+
getDuplicationAvoider(): string | null;
|
|
26
|
+
setDuplicationAvoider(duplicationAvoider: string | null): this;
|
|
27
|
+
withDuplicationAvoider(duplicationAvoider: string | null): this;
|
|
28
|
+
static fromDict(data: {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}): AddBanRequest;
|
|
31
|
+
toDict(): {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
};
|
|
34
|
+
}
|