@xmobitea/gn-server 2.6.2 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,12 @@ export interface IEventCallbackCloudScriptService {
38
38
  executePre(eventName: string, request: {
39
39
  [k: string]: any;
40
40
  }, secretInfo: SecretInfo, operationRequest: OperationRequest): Promise<OperationResponse>;
41
+ executeAuthenticate(eventName: string, request: {
42
+ userId: string;
43
+ ipAddress: string;
44
+ isNewUser: boolean;
45
+ authenticationType: string;
46
+ }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
41
47
  addCloudScriptFunction(eventName: string, script: string): Promise<{
42
48
  success: boolean;
43
49
  errorMessage?: string;
@@ -96,6 +102,12 @@ export declare class EventCallbackCloudScriptService implements IEventCallbackCl
96
102
  executePre(eventName: string, request: {
97
103
  [k: string]: any;
98
104
  }, secretInfo: SecretInfo, operationRequest: OperationRequest): Promise<OperationResponse>;
105
+ executeAuthenticate(eventName: string, request: {
106
+ userId: string;
107
+ ipAddress: string;
108
+ isNewUser: boolean;
109
+ authenticationType: string;
110
+ }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
99
111
  executePost(eventName: string, request: {
100
112
  [k: string]: any;
101
113
  }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
@@ -119,6 +131,12 @@ export declare class PostEventCallbackService implements IPostEventCallbackServi
119
131
  setEventCallbackCollection(eventCallbackCollection: mongoDB.Collection<mongoDB.Document>): void;
120
132
  setCloudScriptService(cloudScriptService: IEventCallbackCloudScriptService): void;
121
133
  onEvent(eventName: string, request: {}, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
134
+ onAuthenticateEvent(eventName: string, request: {
135
+ userId: string;
136
+ ipAddress: string;
137
+ isNewUser: boolean;
138
+ authenticationType: string;
139
+ }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
122
140
  }
123
141
  export declare class PreEventCallbackService implements IPreEventCallbackService {
124
142
  private eventDict;
@@ -8,6 +8,12 @@ export interface IPostEventCallbackService {
8
8
  subscriberEvent(eventName: string, callbackFunction: OnPostCallbackFunction): void;
9
9
  unSubscriberEvent(eventName: string, callbackFunction: OnPostCallbackFunction): void;
10
10
  onEvent(eventName: string, request: {}, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
11
+ onAuthenticateEvent(eventName: string, request: {
12
+ userId: string;
13
+ ipAddress: string;
14
+ isNewUser: boolean;
15
+ authenticationType: string;
16
+ }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse): Promise<void>;
11
17
  }
12
18
  export interface OnPreCallbackFunction {
13
19
  (request: {}, secretInfo: SecretInfo, operationRequest: OperationRequest): Promise<OperationResponse>;
@@ -25,6 +25,11 @@
25
25
  "script": "\nsystemMatchmakingHandlers.system_RequestServerDetail = async (gameId: string, matchmakingTicketCanMatch: MatchmakingTicketCanMatch, log: (log: any) => void): Promise<{ success: boolean }> => {\n\t//call matchmaking.confirmServerDetail(gameId, matchmakingTicketCanMatch, { ipV4Address: '127.0.0.1', ports: [{ name: 'GamePort', publicPort: 2202, privatePort: 3000, protocol: 1 }] }); // after setup success a dedicated server;\n\treturn { success: false };\n}\n",
26
26
  "hasEdit": false
27
27
  },
28
+ {
29
+ "eventName": "system_OnAuthenticateSuccess",
30
+ "script": "\nsystemAuthenticateHandlers.system_OnAuthenticateSuccess = async (request: { userId: string, ipAddress: string, isNewUser: boolean, authenticationType: string }, secretInfo: SecretInfo, operationRequest: OperationRequest, operationResponse: OperationResponse, log: (log: any) => void) => {\nreturn operationResponse;\n}\n",
31
+ "hasEdit": false
32
+ },
28
33
  {
29
34
  "eventName": "system_SendEventTo",
30
35
  "script": "\neventHandlers.system_SendEventTo = async (request: { userId: string }, operationEvent: OperationEvent, log: (log: any) => void) => {\n\n}\n",