@xmobitea/gn-server 2.5.1 → 2.6.1

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.
Files changed (27) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +3 -0
  3. package/THIRD_PARTY_LICENSES +97 -0
  4. package/dist/GN-app-api/handler/controller/handler/dashboard/SetSecretInfoInformationRequestHandler.d.ts +1 -0
  5. package/dist/GN-app-api/handler/controller/handler/dashboard/model/EmailSettingsParam.d.ts +5 -1
  6. package/dist/GN-app-api/service/EmailService.d.ts +9 -4
  7. package/dist/GN-app-api/service/IEmailService.d.ts +2 -2
  8. package/dist/GN-app-api/service/IPlayStationNetworkService.d.ts +5 -0
  9. package/dist/GN-app-api/service/ISteamService.d.ts +5 -0
  10. package/dist/GN-app-api/service/PlayStationNetworkService.d.ts +14 -0
  11. package/dist/GN-app-api/service/SteamService.d.ts +12 -0
  12. package/dist/GN-common/constant/parameterCode/GNParameterCode.d.ts +6 -0
  13. package/dist/GN-common/entity/SecretInfo.d.ts +4 -0
  14. package/dist/GN-library/xdatabase/lib/entity/pro/masterAdmin/SecretInfoItem.d.ts +4 -0
  15. package/dist/GN-library/xdatabase/lib/xDatabase.d.ts +15 -8
  16. package/dist/GN-library/xsettings/lib/entity/xEmailSettings.d.ts +5 -1
  17. package/dist/GN-startup/cloudScript/eventCallbackCloudScriptData.json +1 -1
  18. package/dist/GN-startup/middleware/AntiDdosMiddleware.d.ts +1 -0
  19. package/dist/GN-startup/routes/SocketAppHandler.d.ts +7 -8
  20. package/dist/GN-startup/routes/utils/wrap.d.ts +2 -0
  21. package/dist/GNServer.d.ts +6 -5
  22. package/dist/index.d.ts +0 -4
  23. package/dist/index.js +841 -460
  24. package/gn.sh +1 -1
  25. package/package.json +9 -21
  26. package/dist/GN-app-api/service/ILockService.d.ts +0 -4
  27. package/dist/GN-app-api/service/LockService.d.ts +0 -5
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2024] [XmobiTea Family]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 📦 Third-Party Dependencies
2
+
3
+ This project makes use of several open source libraries. A full list including their license terms can be found in [THIRD_PARTY_LICENSES](./THIRD_PARTY_LICENSES).
@@ -0,0 +1,97 @@
1
+ THIRD-PARTY LICENSES
2
+ =====================
3
+
4
+ This project includes third-party packages that are subject to their own licenses. Below is a list of key dependencies and their licenses.
5
+
6
+ You must comply with their terms in accordance with the Apache 2.0 license of this project.
7
+
8
+ ---
9
+
10
+ 1. bcrypt | Nick Campbell (https://github.com/ncb000gt)
11
+ License: MIT
12
+ https://github.com/kelektiv/node.bcrypt.js
13
+
14
+ 2. express | TJ Holowaychuk <tj@vision-media.ca>
15
+ License: MIT
16
+ https://github.com/expressjs/express
17
+
18
+ 3. jsonwebtoken | auth0
19
+ License: MIT
20
+ https://github.com/auth0/node-jsonwebtoken
21
+
22
+ 4. multer | Hage Yaapa <captain@hacksparrow.com> (http://www.hacksparrow.com) Jaret Pfluger <https://github.com/jpfluger> Linus Unnebäck <linus@folkdatorn.se>
23
+ License: MIT
24
+ https://github.com/expressjs/multer
25
+
26
+ 5. @msgpack/msgpack | The MessagePack community (https://msgpack.org)
27
+ License: ISC
28
+ https://github.com/msgpack/msgpack-javascript
29
+
30
+ 6. @sendgrid/mail | Twilio SendGrid
31
+ License: MIT
32
+ https://github.com/sendgrid/sendgrid-nodejs
33
+
34
+ 7. @socket.io/mongo-adapter | darrachequesne
35
+ License: MIT
36
+ https://github.com/socketio/socket.io-mongo-adapter
37
+
38
+ 8. @socket.io/mongo-emitter | darrachequesne
39
+ License: MIT
40
+ https://github.com/socketio/socket.io-mongo-emitter
41
+
42
+ 9. @xmobitea/gn-typescript-client | Chang X <changx.develop@gmail.com> (https://xmobitea.com)
43
+ License: Apache-2.0
44
+ https://github.com/XmobiTea-Family/gn-typescript-client
45
+
46
+ 10. axios | Matt Zabriskie
47
+ License: MIT
48
+ https://github.com/axios/axios
49
+
50
+ 11. cors | Troy Goode <troygoode@gmail.com> (https://github.com/troygoode/)
51
+ License: MIT
52
+ https://github.com/expressjs/cors
53
+
54
+ 12. firebase-admin | Firebase <firebase-support@google.com> (https://firebase.google.com/)
55
+ License: Apache-2.0
56
+ https://github.com/firebase/firebase-admin-node
57
+
58
+ 13. jwks-rsa | Auth0
59
+ License: MIT
60
+ https://github.com/auth0/node-jwks-rsa
61
+
62
+ 14. log4js | Gareth Jones <gareth.nomiddlename@gmail.com> Lam Wei Li <lam_wei_li@hotmail.com>
63
+ License: Apache-2.0
64
+ https://github.com/log4js-node/log4js-node
65
+
66
+ 15. mongodb | The MongoDB NodeJS Team dbx-node@mongodb.com
67
+ License: Apache-2.0
68
+ https://github.com/mongodb/node-mongodb-native
69
+
70
+ 16. reflect-metadata | Ron Buckton ron.buckton@microsoft.com
71
+ License: Apache-2.0
72
+ https://github.com/rbuckton/reflect-metadata
73
+
74
+ 17. socket.io | socket.io
75
+ License: MIT
76
+ https://github.com/socketio/socket.io
77
+
78
+ 18. systeminformation | Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)
79
+ License: MIT
80
+ https://github.com/sebhildebrandt/systeminformation
81
+
82
+ ---
83
+
84
+ DevDependencies:
85
+ ----------------
86
+ These are used only during development/build and not included in final distribution.
87
+
88
+ - typescript@^5.7.2 — Apache-2.0 — https://github.com/microsoft/TypeScript | Microsoft Corp.
89
+ - webpack@^5.97.1 — MIT — https://github.com/webpack/webpack | Tobias Koppers @sokra
90
+ - webpack-cli@^5.1.4 — MIT — https://github.com/webpack/webpack-cli | webpack
91
+ - terser-webpack-plugin@^5.3.10 — MIT — https://github.com/webpack-contrib/terser-webpack-plugin | webpack Contrib Team
92
+ - ts-loader@^9.5.1 — MIT — https://github.com/TypeStrong/ts-loader | John Reilly <johnny_reilly@hotmail.com> (https://johnnyreilly.com)
93
+ - webpack-node-externals@^3.0.0 — MIT — https://github.com/liady/webpack-node-externals | Liad Yosef (https://github.com/liady)
94
+
95
+ ---
96
+
97
+ This list may not be exhaustive. Please refer to each individual package's LICENSE file for full terms.
@@ -9,6 +9,7 @@ declare class SetSecretInfoInformationOperationRequest extends OperationRequest
9
9
  remove?: boolean;
10
10
  tsExpire?: number;
11
11
  permissionParam?: PermissionParam;
12
+ displayName?: string;
12
13
  isValidRequest(): boolean;
13
14
  }
14
15
  export declare class SetSecretInfoInformationRequestHandler extends RequestHandler {
@@ -1,4 +1,8 @@
1
1
  export declare class EmailSettingsParam {
2
2
  sendFrom: string;
3
- sendGridApiKey: string;
3
+ secure: boolean;
4
+ host: string;
5
+ port: number;
6
+ username: string;
7
+ password: string;
4
8
  }
@@ -1,11 +1,16 @@
1
1
  import { IEmailService, OnSendMailError, OnSendMailSuccess } from "./IEmailService";
2
2
  export declare class EmailService implements IEmailService {
3
3
  private isInit;
4
- private sendGridApiKey;
4
+ private host;
5
+ private port;
6
+ private secure;
7
+ private username;
8
+ private password;
5
9
  private fromEmail;
6
10
  private needSetup;
7
- init(sendGridApiKey: string, fromEmail: string): void;
11
+ private transporter;
12
+ init(host: string, port: number, secure: boolean, username: string, password: string, fromEmail: string): void;
8
13
  run(): void;
9
- sendMail(toEmail: string, subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): Promise<void>;
10
- sendMailToMore(toEmails: string[], subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): Promise<void>;
14
+ sendMail(toEmail: string, subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): void;
15
+ sendMailToMore(toEmails: string[], subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): void;
11
16
  }
@@ -5,6 +5,6 @@ export interface OnSendMailError {
5
5
  (error: string): void;
6
6
  }
7
7
  export interface IEmailService {
8
- sendMail(toEmail: string, subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): Promise<void>;
9
- sendMailToMore(toEmails: string[], subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): Promise<void>;
8
+ sendMail(toEmail: string, subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): void;
9
+ sendMailToMore(toEmails: string[], subject: string, contentHtml: string, onSendMailSuccess?: OnSendMailSuccess, onSendMailError?: OnSendMailError): void;
10
10
  }
@@ -0,0 +1,5 @@
1
+ export interface IPlayStationNetworkService {
2
+ verifyPSNToken(token: string): Promise<{
3
+ [k: string]: any;
4
+ }>;
5
+ }
@@ -0,0 +1,5 @@
1
+ export interface ISteamService {
2
+ verifyTicket(ticket: string, identity: string): Promise<{
3
+ [k: string]: any;
4
+ }>;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { IPlayStationNetworkService } from "./IPlayStationNetworkService";
2
+ export declare class PlayStationNetworkService implements IPlayStationNetworkService {
3
+ private static readonly MAIN_iss;
4
+ private static readonly MAIN_iss_auth_keys;
5
+ private client;
6
+ private appleClientId;
7
+ constructor();
8
+ init(): void;
9
+ private getSigningKey;
10
+ private verifyToken;
11
+ verifyPSNToken(token: string): Promise<{
12
+ [k: string]: any;
13
+ }>;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { ISteamService } from "./ISteamService";
2
+ export declare class SteamService implements ISteamService {
3
+ private steamApiKey;
4
+ private steamAppId;
5
+ init(request: {
6
+ steamApiKey: string;
7
+ steamAppId: string;
8
+ }): void;
9
+ verifyTicket(ticket: string, identity: string): Promise<{
10
+ [k: string]: any;
11
+ }>;
12
+ }
@@ -549,6 +549,9 @@ export declare class GNParameterCode {
549
549
  static readonly PushNotificationSettings: string;
550
550
  static readonly SendFrom: string;
551
551
  static readonly SendGridApiKey: string;
552
+ static readonly Host: string;
553
+ static readonly Port: string;
554
+ static readonly Secure: string;
552
555
  static readonly Subject: string;
553
556
  static readonly ContentHtml: string;
554
557
  static readonly PushNotifications: string;
@@ -590,4 +593,7 @@ export declare class GNParameterCode {
590
593
  static readonly OwnerIds: string;
591
594
  static readonly GetStoreUsed: string;
592
595
  static readonly RemoveStoreUsed: string;
596
+ static readonly AdminSecretKeys: string;
597
+ static readonly ServerSecretKeys: string;
598
+ static readonly PlayerSecretKeys: string;
593
599
  }
@@ -449,6 +449,7 @@ declare abstract class BuilderBase {
449
449
  protected role: number;
450
450
  protected remove: boolean;
451
451
  protected tsExpire: number;
452
+ protected displayName: string;
452
453
  protected permission: SecretPermissionItem;
453
454
  protected gameId: string;
454
455
  protected isDefault: boolean;
@@ -458,6 +459,7 @@ declare abstract class BuilderBase {
458
459
  getRole(): number;
459
460
  isRemove(): boolean;
460
461
  getTsExpire(): number;
462
+ getDisplayName(): string;
461
463
  getGameId(): string;
462
464
  getIsDefault(): boolean;
463
465
  getIsOnlyMasterAdmin(): boolean;
@@ -469,6 +471,7 @@ declare abstract class BuilderBase {
469
471
  setIsDefault(isDefault: boolean): Builder;
470
472
  setIsOnlyMasterAdmin(onlyMasterAdmin: boolean): Builder;
471
473
  setTsExpire(tsExpire: number): Builder;
474
+ setDisplayName(displayName: string): Builder;
472
475
  build(): SecretInfo;
473
476
  constructor();
474
477
  }
@@ -476,6 +479,7 @@ declare class Builder extends BuilderBase implements IBuilder<SecretInfo> {
476
479
  setSecretKey(secretKey: string): Builder;
477
480
  setRole(role: number): Builder;
478
481
  setTsExpire(tsExpire: number): Builder;
482
+ setDisplayName(displayName: string): Builder;
479
483
  setPermission(permission: SecretPermissionItem): Builder;
480
484
  setGameId(gameId: string): Builder;
481
485
  build(): SecretInfo;
@@ -9,6 +9,7 @@ export declare class SecretInfoItem extends MasterAdminMongoObject {
9
9
  private static readonly _tsExpire;
10
10
  private static readonly _permission;
11
11
  private static readonly _tsCreate;
12
+ private static readonly _displayName;
12
13
  private static readonly _creatorId;
13
14
  private readonly gameId;
14
15
  private readonly secretKey;
@@ -17,6 +18,7 @@ export declare class SecretInfoItem extends MasterAdminMongoObject {
17
18
  private readonly creatorId;
18
19
  private remove;
19
20
  private tsExpire;
21
+ private displayName;
20
22
  private permission;
21
23
  constructor(result: mongoDB.WithId<mongoDB.Document>, collection: mongoDB.Collection<mongoDB.Document>);
22
24
  private setDocumentMasterSecretInfoItem;
@@ -29,6 +31,8 @@ export declare class SecretInfoItem extends MasterAdminMongoObject {
29
31
  setRemove(isRemove: boolean): void;
30
32
  getTsExpire(): number;
31
33
  setTsExpire(tsExpire: number): void;
34
+ getDisplayName(): string;
35
+ setDisplayName(displayName: string): void;
32
36
  getPermission(): SecretPermissionItem;
33
37
  setPermission(permission: SecretPermissionItem): void;
34
38
  }
@@ -49,8 +49,9 @@ export declare class xDatabase {
49
49
  loadMasterPlayersWithGenericServiceAsync(genericService: string, genericIds: string[], masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
50
50
  loadMasterPlayersWithSegmentAsync(segment: string, skip: number, limit: number, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
51
51
  loadMasterPlayersWithTagAsync(key: string, value: string, skip: number, limit: number, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
52
- loadMasterPlayersWithDisplayNameAsync(keyword: string, skip: number, limit: number, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
53
- loadMasterPlayerWithDisplayNameAsync(displayNameNormalize: string, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<MasterPlayer>;
52
+ loadMasterPlayerWithDisplayNameAsync(displayName: string, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<MasterPlayer>;
53
+ loadMasterPlayerWithDisplayNameNormalizeAsync(displayNameNormalize: string, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<MasterPlayer>;
54
+ loadMasterPlayersWithDisplayNameNormalizeRegexAsync(keyword: string, skip: number, limit: number, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
54
55
  loadMasterPlayersLeaderboardWithStatisticsAsync(key: string, skip: number, limit: number, direction: -1 | 1, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
55
56
  loadMasterPlayersLeaderboardWithStatisticsAllAsync(key: string, direction: -1 | 1, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
56
57
  loadMasterPlayersLeaderboardWithCurrenciesAsync(key: string, skip: number, limit: number, masterPlayerFindOptions?: MasterPlayerFindOptions): Promise<Array<MasterPlayer>>;
@@ -79,8 +80,9 @@ export declare class xDatabase {
79
80
  private convertToGamePlayers;
80
81
  loadGamePlayersWithSegmentAsync(segment: string, skip: number, limit: number, gameId: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
81
82
  loadGamePlayersWithTagAsync(key: string, value: string, skip: number, limit: number, gameId: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
82
- loadGamePlayersWithDisplayNameAsync(keyword: string, skip: number, limit: number, gameId: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
83
- loadGamePlayerWithDisplayNameAsync(displayNameNormalize: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<GamePlayer>;
83
+ loadGamePlayerWithDisplayNameAsync(displayName: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<GamePlayer>;
84
+ loadGamePlayerWithDisplayNameNormalizeAsync(displayNameNormalize: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<GamePlayer>;
85
+ loadGamePlayersWithDisplayNameNormalizeRegexAsync(keyword: string, skip: number, limit: number, gameId: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
84
86
  loadGamePlayersLeaderboardWithStatisticsAsync(key: string, skip: number, limit: number, gameId: string, direction: -1 | 1, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
85
87
  loadGamePlayersLeaderboardWithStatisticsAllAsync(key: string, gameId: string, direction: -1 | 1, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
86
88
  loadGamePlayersLeaderboardWithCreateAsync(skip: number, limit: number, gameId: string, gamePlayerFindOptions?: GamePlayerFindOptions): Promise<Array<GamePlayer>>;
@@ -120,8 +122,9 @@ export declare class xDatabase {
120
122
  private convertToCharacterPlayers;
121
123
  loadCharacterPlayersWithSegmentAsync(segment: string, skip: number, limit: number, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
122
124
  loadCharacterPlayersWithTagAsync(key: string, value: string, skip: number, limit: number, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
123
- loadCharacterPlayersWithDisplayNameAsync(keyword: string, skip: number, limit: number, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
124
- loadCharacterPlayerWithDisplayNameAsync(displayNameNormalize: string, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<CharacterPlayer>;
125
+ loadCharacterPlayerWithDisplayNameAsync(displayName: string, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<CharacterPlayer>;
126
+ loadCharacterPlayerWithDisplayNameNormalizeAsync(displayNameNormalize: string, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<CharacterPlayer>;
127
+ loadCharacterPlayersWithDisplayNameNormalizeRegexAsync(keyword: string, skip: number, limit: number, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
125
128
  loadCharacterPlayersLeaderboardWithStatisticsAsync(key: string, skip: number, limit: number, catalogId: string, gameId: string, direction: -1 | 1, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
126
129
  loadCharacterPlayersLeaderboardWithStatisticsAllAsync(key: string, catalogId: string, gameId: string, direction: -1 | 1, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
127
130
  loadCharacterPlayersLeaderboardWithCreateAsync(skip: number, limit: number, gameId: string, characterPlayerFindOptions?: CharacterPlayerFindOptions): Promise<Array<CharacterPlayer>>;
@@ -172,7 +175,9 @@ export declare class xDatabase {
172
175
  private convertToGroups;
173
176
  loadGroupsWithSegmentAsync(segment: string, skip: number, limit: number, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
174
177
  loadGroupsWithTagAsync(key: string, value: string, skip: number, limit: number, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
175
- loadGroupsWithDisplayNameAsync(keyword: string, skip: number, limit: number, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
178
+ loadGroupWithDisplayNameAsync(displayName: string, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Group>;
179
+ loadGroupWithDisplayNameNormalizeAsync(displayNameNormalize: string, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Group>;
180
+ loadGroupsWithDisplayNameNormalizeRegexAsync(keyword: string, skip: number, limit: number, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
176
181
  loadGroupsLeaderboardWithStatisticsAsync(key: string, skip: number, limit: number, catalogId: string, gameId: string, direction: -1 | 1, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
177
182
  loadGroupsLeaderboardWithStatisticsAllAsync(key: string, catalogId: string, gameId: string, direction: -1 | 1, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
178
183
  loadGroupsLeaderboardWithCreateAsync(skip: number, limit: number, gameId: string, groupFindOptions?: GroupFindOptions): Promise<Array<Group>>;
@@ -184,7 +189,9 @@ export declare class xDatabase {
184
189
  private convertToInventories;
185
190
  loadInventoriesWithSegmentAsync(segment: string, skip: number, limit: number, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
186
191
  loadInventoriesWithTagAsync(key: string, value: string, skip: number, limit: number, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
187
- loadInventoriesWithDisplayNameAsync(keyword: string, skip: number, limit: number, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
192
+ loadInventoryWithDisplayNameAsync(displayName: string, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Inventory>;
193
+ loadInventoryWithDisplayNameNormalizeAsync(displayNameNormalize: string, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Inventory>;
194
+ loadInventoriesWithDisplayNameNormalizeRegexAsync(keyword: string, skip: number, limit: number, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
188
195
  loadInventoriesLeaderboardWithStatisticsAsync(key: string, skip: number, limit: number, catalogId: string, gameId: string, direction: -1 | 1, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
189
196
  loadInventoriesLeaderboardWithStatisticsAllAsync(key: string, catalogId: string, gameId: string, direction: -1 | 1, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
190
197
  loadInventoriesLeaderboardWithCreateAsync(skip: number, limit: number, gameId: string, inventoryFindOptions?: InventoryFindOptions): Promise<Array<Inventory>>;
@@ -1,4 +1,8 @@
1
1
  export interface xEmailSettings {
2
2
  sendFrom: string;
3
- sendGridApiKey: string;
3
+ secure: boolean;
4
+ host: string;
5
+ port: number;
6
+ username: string;
7
+ password: string;
4
8
  }
@@ -622,7 +622,7 @@
622
622
  },
623
623
  {
624
624
  "eventName": "dashboard_SetSecretInfoInformation",
625
- "script": "\npreHandlers.dashboard_SetSecretInfoInformation = async (request: { secretKey: string, remove: boolean, tsExpire: number, permissionParam: PermissionParam }, secretInfo: SecretInfo, operationRequest: OperationRequest, log: (log: any) => void) => {\n\n\treturn null;\n}\n\npostHandlers.dashboard_SetSecretInfoInformation = async (request: { secretKey: string, remove: boolean, tsExpire: number, permissionParam: PermissionParam }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse, log: (log: any) => void) => {\n\n\treturn operationResponse;\n}\n",
625
+ "script": "\npreHandlers.dashboard_SetSecretInfoInformation = async (request: { secretKey: string, remove: boolean, tsExpire: number, permissionParam: PermissionParam, displayName: string, }, secretInfo: SecretInfo, operationRequest: OperationRequest, log: (log: any) => void) => {\n\n\treturn null;\n}\n\npostHandlers.dashboard_SetSecretInfoInformation = async (request: { secretKey: string, remove: boolean, tsExpire: number, permissionParam: PermissionParam, displayName: string, }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse, log: (log: any) => void) => {\n\n\treturn operationResponse;\n}\n",
626
626
  "hasEdit": false
627
627
  },
628
628
  {
@@ -3,6 +3,7 @@ import { Socket } from "socket.io";
3
3
  import * as mongoDB from "mongodb";
4
4
  export declare class AntiDdosMiddleware {
5
5
  private static readonly FIVE_MINUTE_TS;
6
+ private static readonly K_MULTIPLE_ADMIN;
6
7
  private static readonly K_MULTIPLE_WHITE_LIST;
7
8
  private static readonly K_MULTIPLE_BLACK_LIST;
8
9
  private socketRequestPerIPDic;
@@ -44,16 +44,15 @@ export declare class SocketAppHandler {
44
44
  private onSocketResponse;
45
45
  private onSocketDisconnect;
46
46
  private sendResponseForSocket;
47
- private sendEventForSocket;
48
- sendEventTo(userId: string, operationEvent: OperationEvent): Promise<void>;
49
- sendEventToRoom(roomId: string, operationEvent: OperationEvent): Promise<void>;
50
- sendEventToMoreUser(userIds: string[], operationEvent: OperationEvent): Promise<void>;
51
- sendEventToAllPlayer(operationEvent: OperationEvent): Promise<void>;
52
- sendEventToNamespace(namespace: string, operationEvent: OperationEvent): Promise<void>;
47
+ sendEventTo(userId: string, operationEvent: OperationEvent, useMsgPack?: boolean): void;
48
+ sendEventToRoom(roomId: string, operationEvent: OperationEvent, useMsgPack?: boolean): void;
49
+ sendEventToMoreUser(userIds: string[], operationEvent: OperationEvent, useMsgPack?: boolean): void;
50
+ sendEventToAllPlayer(operationEvent: OperationEvent, useMsgPack?: boolean): void;
51
+ sendEventToNamespace(namespace: string, operationEvent: OperationEvent): void;
53
52
  getSocketViaSocketId(socketId: string): Socket;
54
53
  getSockets(userId: string): import("socket.io").BroadcastOperator<import("socket.io/dist/typed-events").DecorateAcknowledgementsWithMultipleResponses<import("socket.io").DefaultEventsMap>, any>;
55
- joinRoom(userId: string, roomId: string): Promise<void>;
56
- leaveRoom(userId: string, roomId: string): Promise<void>;
54
+ joinRoom(userId: string, roomId: string): void;
55
+ leaveRoom(userId: string, roomId: string): void;
57
56
  getRooms(userId: string): Promise<string[]>;
58
57
  }
59
58
  export {};
@@ -0,0 +1,2 @@
1
+ import { Request, Response, NextFunction, RequestHandler } from 'express';
2
+ export declare function wrap(fn: (req: Request, res: Response, next: NextFunction) => any): RequestHandler;
@@ -10,7 +10,6 @@ import { IAppleService } from "./GN-app-api/service/IAppleService";
10
10
  import { ICloudScriptService } from "./GN-app-api/service/ICloudScriptService";
11
11
  import { ITimerService } from "./GN-app-api/service/ITimerService";
12
12
  import { OnRunSuccess } from "./GN-library/xbuilder/lib/OnRunSuccess";
13
- import { ILockService } from "./GN-app-api/service/ILockService";
14
13
  import { ApiMiddleware } from "./GN-startup/middleware/ApiMiddleware";
15
14
  import { IRequestConverterService } from "./GN-app-api/service/IRequestConverterService";
16
15
  import { IGoogleService } from "./GN-app-api/service/IGoogleService";
@@ -47,7 +46,6 @@ export declare class GNServer {
47
46
  private googlePlayGameService;
48
47
  private gameCenterService;
49
48
  private timerService;
50
- private lockService;
51
49
  private requestConverterService;
52
50
  private analyticsService;
53
51
  private postEventCallbackService;
@@ -98,7 +96,6 @@ export declare class GNServer {
98
96
  getGooglePlayGameService(): IGooglePlayGameService;
99
97
  getGameCenterService(): IGameCenterService;
100
98
  getTimerService(): ITimerService;
101
- getLockService(): ILockService;
102
99
  getAnalyticsService(): IAnalyticsService;
103
100
  getRequestConverterService(): IRequestConverterService;
104
101
  getEmailService(): IEmailService;
@@ -106,11 +103,15 @@ export declare class GNServer {
106
103
  getCloudScriptService(gameId: string): ICloudScriptService;
107
104
  setCloudScriptService(gameId: string, cloudScriptService: ICloudScriptService): Map<string, ICloudScriptService>;
108
105
  sendEventTo(userId: string, operationEvent: OperationEvent): Promise<void>;
106
+ private executeSendEventTo;
109
107
  sendEventToRoom(roomId: string, operationEvent: OperationEvent): Promise<void>;
108
+ private executeSendEventToRoom;
110
109
  sendEventToMoreUser(userIds: string[], operationEvent: OperationEvent): Promise<void>;
110
+ private executeSendEventToMoreUser;
111
111
  sendEventToAllPlayer(operationEvent: OperationEvent): Promise<void>;
112
- joinRoom(userId: string, roomId: string): Promise<void>;
113
- leaveRoom(userId: string, roomId: string): Promise<void>;
112
+ private executeSendEventToAllPlayer;
113
+ joinRoom(userId: string, roomId: string): void;
114
+ leaveRoom(userId: string, roomId: string): void;
114
115
  getRooms(userId: string): Promise<string[]>;
115
116
  private handleSocketDisconnect;
116
117
  private handleOnRequest;