cgserver 8.6.8 → 8.7.0
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/README.md +4 -0
- package/dist/lib/Framework/AI/AiObject.js +10 -10
- package/dist/lib/Framework/AI/Astar.js +133 -133
- package/dist/lib/Framework/AI/BehaviorAI.js +307 -307
- package/dist/lib/Framework/AI/Entity.js +33 -33
- package/dist/lib/Framework/AI/Point.js +68 -68
- package/dist/lib/Framework/AI/TriggerMgr.js +201 -201
- package/dist/lib/Framework/Config/Config.js +53 -53
- package/dist/lib/Framework/Config/DbConfig.js +14 -0
- package/dist/lib/Framework/Config/FrameworkConfig.js +207 -240
- package/dist/lib/Framework/Config/IServerConfig.js +26 -26
- package/dist/lib/Framework/Config/_error_.js +35 -35
- package/dist/lib/Framework/Core/Core.js +639 -639
- package/dist/lib/Framework/Core/Timer.js +116 -116
- package/dist/lib/Framework/Database/Decorator/AutoIncrement.js +11 -11
- package/dist/lib/Framework/Database/Decorator/DBCache.js +64 -64
- package/dist/lib/Framework/Database/Decorator/NotNull.js +11 -11
- package/dist/lib/Framework/Database/Decorator/PrimaryKey.js +11 -11
- package/dist/lib/Framework/Database/Decorator/Property.js +61 -61
- package/dist/lib/Framework/Database/Decorator/Table.js +15 -15
- package/dist/lib/Framework/Database/Decorator/Type.js +20 -20
- package/dist/lib/Framework/Database/MSSqlManager.js +53 -43
- package/dist/lib/Framework/Database/MongoBaseService.js +126 -117
- package/dist/lib/Framework/Database/MongoManager.js +462 -462
- package/dist/lib/Framework/Database/MysqlBaseService.js +281 -281
- package/dist/lib/Framework/Database/MysqlManager.js +179 -180
- package/dist/lib/Framework/Database/RedisManager.js +61 -53
- package/dist/lib/Framework/Decorator/AdminValidate.js +19 -19
- package/dist/lib/Framework/Decorator/AuthorityValidate.js +22 -22
- package/dist/lib/Framework/Decorator/CreatorValidate.js +19 -19
- package/dist/lib/Framework/Decorator/JsonAdminValidate.js +15 -15
- package/dist/lib/Framework/Decorator/JsonAuthorityValidate.js +20 -20
- package/dist/lib/Framework/Decorator/JsonCreatorValidate.js +19 -19
- package/dist/lib/Framework/Decorator/SyncCall.js +42 -42
- package/dist/lib/Framework/Decorator/SyncCallServer.js +77 -77
- package/dist/lib/Framework/Logic/CacheTool.js +73 -73
- package/dist/lib/Framework/Logic/EventTool.js +27 -27
- package/dist/lib/Framework/Logic/HttpTool.js +75 -75
- package/dist/lib/Framework/Logic/Log.js +140 -140
- package/dist/lib/Framework/Logic/SyncQueueTool.js +43 -43
- package/dist/lib/Framework/Service/MongoAccountService.js +367 -367
- package/dist/lib/Framework/Service/MongoCacheService.js +42 -42
- package/dist/lib/Framework/Service/MongoUserService.js +100 -100
- package/dist/lib/Framework/Service/MysqlAccountService.js +441 -441
- package/dist/lib/Framework/Service/MysqlUserService.js +171 -171
- package/dist/lib/Framework/Service/ini.js +36 -36
- package/dist/lib/Framework/SocketServer/IClientWebSocket.js +44 -44
- package/dist/lib/Framework/SocketServer/IRpc.js +12 -12
- package/dist/lib/Framework/SocketServer/IRpcClientWebSocket.js +63 -63
- package/dist/lib/Framework/SocketServer/IRpcServerWebSocket.js +63 -63
- package/dist/lib/Framework/SocketServer/IServerWebSocket.js +75 -75
- package/dist/lib/Framework/SocketServer/ISocketServer.js +205 -202
- package/dist/lib/Framework/SocketServer/IWebSocket.js +195 -195
- package/dist/lib/Framework/SocketServer/ProtoFilter/GoogleProtoFilter.js +57 -57
- package/dist/lib/Framework/SocketServer/ProtoFilter/IProtoFilter.js +8 -8
- package/dist/lib/Framework/SocketServer/ProtoFilter/JsonProtoFilter.js +29 -29
- package/dist/lib/Framework/SocketServer/ProtoFilter/ProtoFactory.js +31 -31
- package/dist/lib/Framework/ThirdParty/AlipayTool.js +203 -203
- package/dist/lib/Framework/ThirdParty/Alisms.js +46 -46
- package/dist/lib/Framework/ThirdParty/AppleTool.js +234 -234
- package/dist/lib/Framework/ThirdParty/CgMq.js +132 -132
- package/dist/lib/Framework/ThirdParty/EmailTool.js +33 -33
- package/dist/lib/Framework/ThirdParty/OpenSocial.js +32 -32
- package/dist/lib/Framework/ThirdParty/QQTool.js +118 -118
- package/dist/lib/Framework/ThirdParty/QiniuTool.js +21 -21
- package/dist/lib/Framework/ThirdParty/Rpc.js +63 -63
- package/dist/lib/Framework/ThirdParty/WechatOATool.js +61 -61
- package/dist/lib/Framework/ThirdParty/WechatTool.js +74 -74
- package/dist/lib/Framework/WebServer/Controller/BaseController.js +112 -112
- package/dist/lib/Framework/WebServer/Controller/MongoBaseUserController.js +169 -169
- package/dist/lib/Framework/WebServer/Controller/MysqlBaseUserController.js +169 -169
- package/dist/lib/Framework/WebServer/Engine/ControllerManager.js +112 -112
- package/dist/lib/Framework/WebServer/Engine/Engine.js +152 -152
- package/dist/lib/Framework/WebServer/Engine/RazorJs.js +544 -544
- package/dist/lib/Framework/WebServer/Engine/Request.js +237 -237
- package/dist/lib/Framework/WebServer/Engine/Response.js +100 -100
- package/dist/lib/Framework/WebServer/IWebServer.js +59 -54
- package/dist/lib/Framework/cgserver.js +121 -111
- package/dist/lib/Framework/index.js +201 -191
- package/dist/lib/test/test.js +21 -21
- package/dist/types/Framework/AI/AiObject.d.ts +5 -5
- package/dist/types/Framework/AI/Astar.d.ts +38 -38
- package/dist/types/Framework/AI/BehaviorAI.d.ts +24 -24
- package/dist/types/Framework/AI/Entity.d.ts +12 -12
- package/dist/types/Framework/AI/Point.d.ts +17 -17
- package/dist/types/Framework/AI/TriggerMgr.d.ts +52 -52
- package/dist/types/Framework/Config/Config.d.ts +12 -12
- package/dist/types/Framework/Config/DbConfig.d.ts +10 -0
- package/dist/types/Framework/Config/FrameworkConfig.d.ts +203 -228
- package/dist/types/Framework/Config/IServerConfig.d.ts +9 -9
- package/dist/types/Framework/Config/_error_.d.ts +99 -99
- package/dist/types/Framework/Core/Core.d.ts +108 -108
- package/dist/types/Framework/Core/Timer.d.ts +16 -16
- package/dist/types/Framework/Database/Decorator/AutoIncrement.d.ts +1 -1
- package/dist/types/Framework/Database/Decorator/DBCache.d.ts +23 -23
- package/dist/types/Framework/Database/Decorator/NotNull.d.ts +1 -1
- package/dist/types/Framework/Database/Decorator/PrimaryKey.d.ts +1 -1
- package/dist/types/Framework/Database/Decorator/Property.d.ts +57 -57
- package/dist/types/Framework/Database/Decorator/Table.d.ts +1 -1
- package/dist/types/Framework/Database/Decorator/Type.d.ts +1 -1
- package/dist/types/Framework/Database/MSSqlManager.d.ts +27 -17
- package/dist/types/Framework/Database/MongoBaseService.d.ts +81 -81
- package/dist/types/Framework/Database/MongoManager.d.ts +156 -156
- package/dist/types/Framework/Database/MysqlBaseService.d.ts +34 -34
- package/dist/types/Framework/Database/MysqlManager.d.ts +53 -41
- package/dist/types/Framework/Database/RedisManager.d.ts +24 -17
- package/dist/types/Framework/Decorator/AdminValidate.d.ts +1 -1
- package/dist/types/Framework/Decorator/AuthorityValidate.d.ts +2 -2
- package/dist/types/Framework/Decorator/CreatorValidate.d.ts +1 -1
- package/dist/types/Framework/Decorator/JsonAdminValidate.d.ts +1 -1
- package/dist/types/Framework/Decorator/JsonAuthorityValidate.d.ts +2 -2
- package/dist/types/Framework/Decorator/JsonCreatorValidate.d.ts +1 -1
- package/dist/types/Framework/Decorator/SyncCall.d.ts +12 -12
- package/dist/types/Framework/Decorator/SyncCallServer.d.ts +14 -14
- package/dist/types/Framework/Logic/CacheTool.d.ts +27 -27
- package/dist/types/Framework/Logic/EventTool.d.ts +13 -13
- package/dist/types/Framework/Logic/HttpTool.d.ts +15 -15
- package/dist/types/Framework/Logic/Log.d.ts +25 -25
- package/dist/types/Framework/Logic/SyncQueueTool.d.ts +21 -21
- package/dist/types/Framework/Service/MongoAccountService.d.ts +69 -69
- package/dist/types/Framework/Service/MongoCacheService.d.ts +14 -14
- package/dist/types/Framework/Service/MongoUserService.d.ts +35 -35
- package/dist/types/Framework/Service/MysqlAccountService.d.ts +74 -74
- package/dist/types/Framework/Service/MysqlUserService.d.ts +33 -33
- package/dist/types/Framework/Service/ini.d.ts +29 -29
- package/dist/types/Framework/SocketServer/IClientWebSocket.d.ts +17 -17
- package/dist/types/Framework/SocketServer/IRpc.d.ts +8 -8
- package/dist/types/Framework/SocketServer/IRpcClientWebSocket.d.ts +16 -16
- package/dist/types/Framework/SocketServer/IRpcServerWebSocket.d.ts +16 -16
- package/dist/types/Framework/SocketServer/IServerWebSocket.d.ts +28 -28
- package/dist/types/Framework/SocketServer/ISocketServer.d.ts +45 -45
- package/dist/types/Framework/SocketServer/IWebSocket.d.ts +60 -60
- package/dist/types/Framework/SocketServer/ProtoFilter/GoogleProtoFilter.d.ts +9 -9
- package/dist/types/Framework/SocketServer/ProtoFilter/IProtoFilter.d.ts +9 -9
- package/dist/types/Framework/SocketServer/ProtoFilter/JsonProtoFilter.d.ts +6 -6
- package/dist/types/Framework/SocketServer/ProtoFilter/ProtoFactory.d.ts +8 -8
- package/dist/types/Framework/ThirdParty/AlipayTool.d.ts +109 -109
- package/dist/types/Framework/ThirdParty/Alisms.d.ts +14 -14
- package/dist/types/Framework/ThirdParty/AppleTool.d.ts +131 -131
- package/dist/types/Framework/ThirdParty/CgMq.d.ts +51 -51
- package/dist/types/Framework/ThirdParty/EmailTool.d.ts +5 -5
- package/dist/types/Framework/ThirdParty/OpenSocial.d.ts +7 -7
- package/dist/types/Framework/ThirdParty/QQTool.d.ts +41 -41
- package/dist/types/Framework/ThirdParty/QiniuTool.d.ts +6 -6
- package/dist/types/Framework/ThirdParty/Rpc.d.ts +20 -20
- package/dist/types/Framework/ThirdParty/WechatOATool.d.ts +13 -13
- package/dist/types/Framework/ThirdParty/WechatTool.d.ts +20 -20
- package/dist/types/Framework/WebServer/Controller/BaseController.d.ts +33 -33
- package/dist/types/Framework/WebServer/Controller/MongoBaseUserController.d.ts +27 -27
- package/dist/types/Framework/WebServer/Controller/MysqlBaseUserController.d.ts +27 -27
- package/dist/types/Framework/WebServer/Engine/ControllerManager.d.ts +35 -35
- package/dist/types/Framework/WebServer/Engine/Engine.d.ts +21 -21
- package/dist/types/Framework/WebServer/Engine/RazorJs.d.ts +21 -21
- package/dist/types/Framework/WebServer/Engine/Request.d.ts +35 -35
- package/dist/types/Framework/WebServer/Engine/Response.d.ts +30 -30
- package/dist/types/Framework/WebServer/IWebServer.d.ts +20 -20
- package/dist/types/Framework/cgserver.d.ts +27 -25
- package/dist/types/Framework/index.d.ts +91 -86
- package/dist/types/test/test.d.ts +1 -1
- package/package.json +29 -32
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
import AlipaySdk from 'alipay-sdk';
|
|
2
|
-
import { AliPayUtil } from "alipay_sdk2/AliPayUtil";
|
|
3
|
-
export declare class AlipayResult {
|
|
4
|
-
alipay_trade_app_pay_response: {
|
|
5
|
-
code: string;
|
|
6
|
-
msg: string;
|
|
7
|
-
app_id: string;
|
|
8
|
-
auth_app_id: string;
|
|
9
|
-
charset: string;
|
|
10
|
-
timestamp: string;
|
|
11
|
-
out_trade_no: string;
|
|
12
|
-
total_amount: string;
|
|
13
|
-
trade_no: string;
|
|
14
|
-
seller_id: string;
|
|
15
|
-
};
|
|
16
|
-
sign: string;
|
|
17
|
-
sign_type: string;
|
|
18
|
-
}
|
|
19
|
-
export declare class AlipayCallBack {
|
|
20
|
-
gmt_create: string;
|
|
21
|
-
charset: string;
|
|
22
|
-
seller_email: string;
|
|
23
|
-
subject: string;
|
|
24
|
-
sign: string;
|
|
25
|
-
buyer_id: number;
|
|
26
|
-
invoice_amount: string;
|
|
27
|
-
notify_id: number;
|
|
28
|
-
fund_bill_list: {
|
|
29
|
-
amount: string;
|
|
30
|
-
fundChannel: string;
|
|
31
|
-
}[];
|
|
32
|
-
notify_type: string;
|
|
33
|
-
trade_status: string;
|
|
34
|
-
receipt_amount: string;
|
|
35
|
-
app_id: number;
|
|
36
|
-
buyer_pay_amount: string;
|
|
37
|
-
sign_type: string;
|
|
38
|
-
seller_id: number;
|
|
39
|
-
gmt_payment: string;
|
|
40
|
-
notify_time: string;
|
|
41
|
-
version: number;
|
|
42
|
-
out_trade_no: string;
|
|
43
|
-
total_amount: string;
|
|
44
|
-
trade_no: number;
|
|
45
|
-
auth_app_id: number;
|
|
46
|
-
buyer_logon_id: string;
|
|
47
|
-
point_amount: number;
|
|
48
|
-
}
|
|
49
|
-
export declare let GAlipayTool: AlipayTool;
|
|
50
|
-
declare class AlipayTool {
|
|
51
|
-
protected _alipaySdk: AlipaySdk;
|
|
52
|
-
protected _aliPay: AliPayUtil;
|
|
53
|
-
protected _cfg: {
|
|
54
|
-
app_id: string;
|
|
55
|
-
app_key: string;
|
|
56
|
-
gateway: string;
|
|
57
|
-
signType: "RSA2" | "RSA";
|
|
58
|
-
/** 指定private key类型, 默认: PKCS1, PKCS8: PRIVATE KEY, PKCS1: RSA PRIVATE KEY */
|
|
59
|
-
keyType: "PKCS1" | "PKCS8";
|
|
60
|
-
alipay_root_cert_sn: string;
|
|
61
|
-
alipay_cert_sn: string;
|
|
62
|
-
app_cert_sn: string;
|
|
63
|
-
notify_url: string;
|
|
64
|
-
};
|
|
65
|
-
init(): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* charset:"utf-8",method:"alipay.trade.app.pay",sign_type:"RSA2,version:"1.0"
|
|
68
|
-
* @param out_trade_no
|
|
69
|
-
* @param total_amount
|
|
70
|
-
* @param subject
|
|
71
|
-
* @param body
|
|
72
|
-
* @param timeout_express
|
|
73
|
-
* @param product_code
|
|
74
|
-
* @returns
|
|
75
|
-
*/
|
|
76
|
-
protected _buildOrderParams(out_trade_no: string, total_amount: number, subject?: string, body?: string, timeout_express?: string, product_code?: string): {
|
|
77
|
-
notifyUrl: string;
|
|
78
|
-
bizContent: {
|
|
79
|
-
timeout_express: string;
|
|
80
|
-
product_code: string;
|
|
81
|
-
total_amount: number;
|
|
82
|
-
subject: string;
|
|
83
|
-
body: string;
|
|
84
|
-
out_trade_no: string;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
protected _sign(order_params: any): any;
|
|
88
|
-
getOrderInfo(out_trade_no: string, total_amount: number, subject?: string, body?: string): string;
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
* @param title
|
|
92
|
-
* @param order_id
|
|
93
|
-
* @param money
|
|
94
|
-
*/
|
|
95
|
-
doPay(title: string, order_id: string, money: number): string;
|
|
96
|
-
rsaCheck(payInfo: any): boolean;
|
|
97
|
-
/**
|
|
98
|
-
*
|
|
99
|
-
* @param method get|post
|
|
100
|
-
* @param notifyUrl 通知回调
|
|
101
|
-
* @param returnUrl
|
|
102
|
-
* @param outTradeNo
|
|
103
|
-
* @param money 价格
|
|
104
|
-
* @param subject 标题
|
|
105
|
-
* @param body 内容介绍
|
|
106
|
-
*/
|
|
107
|
-
getAlipayPage(method: "get" | "post", notifyUrl: string, returnUrl: string, outTradeNo: string, money: number, subject: string, body: string): Promise<string | import("alipay-sdk").AlipaySdkCommonResult>;
|
|
108
|
-
}
|
|
109
|
-
export {};
|
|
1
|
+
import AlipaySdk from 'alipay-sdk';
|
|
2
|
+
import { AliPayUtil } from "alipay_sdk2/AliPayUtil";
|
|
3
|
+
export declare class AlipayResult {
|
|
4
|
+
alipay_trade_app_pay_response: {
|
|
5
|
+
code: string;
|
|
6
|
+
msg: string;
|
|
7
|
+
app_id: string;
|
|
8
|
+
auth_app_id: string;
|
|
9
|
+
charset: string;
|
|
10
|
+
timestamp: string;
|
|
11
|
+
out_trade_no: string;
|
|
12
|
+
total_amount: string;
|
|
13
|
+
trade_no: string;
|
|
14
|
+
seller_id: string;
|
|
15
|
+
};
|
|
16
|
+
sign: string;
|
|
17
|
+
sign_type: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class AlipayCallBack {
|
|
20
|
+
gmt_create: string;
|
|
21
|
+
charset: string;
|
|
22
|
+
seller_email: string;
|
|
23
|
+
subject: string;
|
|
24
|
+
sign: string;
|
|
25
|
+
buyer_id: number;
|
|
26
|
+
invoice_amount: string;
|
|
27
|
+
notify_id: number;
|
|
28
|
+
fund_bill_list: {
|
|
29
|
+
amount: string;
|
|
30
|
+
fundChannel: string;
|
|
31
|
+
}[];
|
|
32
|
+
notify_type: string;
|
|
33
|
+
trade_status: string;
|
|
34
|
+
receipt_amount: string;
|
|
35
|
+
app_id: number;
|
|
36
|
+
buyer_pay_amount: string;
|
|
37
|
+
sign_type: string;
|
|
38
|
+
seller_id: number;
|
|
39
|
+
gmt_payment: string;
|
|
40
|
+
notify_time: string;
|
|
41
|
+
version: number;
|
|
42
|
+
out_trade_no: string;
|
|
43
|
+
total_amount: string;
|
|
44
|
+
trade_no: number;
|
|
45
|
+
auth_app_id: number;
|
|
46
|
+
buyer_logon_id: string;
|
|
47
|
+
point_amount: number;
|
|
48
|
+
}
|
|
49
|
+
export declare let GAlipayTool: AlipayTool;
|
|
50
|
+
declare class AlipayTool {
|
|
51
|
+
protected _alipaySdk: AlipaySdk;
|
|
52
|
+
protected _aliPay: AliPayUtil;
|
|
53
|
+
protected _cfg: {
|
|
54
|
+
app_id: string;
|
|
55
|
+
app_key: string;
|
|
56
|
+
gateway: string;
|
|
57
|
+
signType: "RSA2" | "RSA";
|
|
58
|
+
/** 指定private key类型, 默认: PKCS1, PKCS8: PRIVATE KEY, PKCS1: RSA PRIVATE KEY */
|
|
59
|
+
keyType: "PKCS1" | "PKCS8";
|
|
60
|
+
alipay_root_cert_sn: string;
|
|
61
|
+
alipay_cert_sn: string;
|
|
62
|
+
app_cert_sn: string;
|
|
63
|
+
notify_url: string;
|
|
64
|
+
};
|
|
65
|
+
init(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* charset:"utf-8",method:"alipay.trade.app.pay",sign_type:"RSA2,version:"1.0"
|
|
68
|
+
* @param out_trade_no
|
|
69
|
+
* @param total_amount
|
|
70
|
+
* @param subject
|
|
71
|
+
* @param body
|
|
72
|
+
* @param timeout_express
|
|
73
|
+
* @param product_code
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
protected _buildOrderParams(out_trade_no: string, total_amount: number, subject?: string, body?: string, timeout_express?: string, product_code?: string): {
|
|
77
|
+
notifyUrl: string;
|
|
78
|
+
bizContent: {
|
|
79
|
+
timeout_express: string;
|
|
80
|
+
product_code: string;
|
|
81
|
+
total_amount: number;
|
|
82
|
+
subject: string;
|
|
83
|
+
body: string;
|
|
84
|
+
out_trade_no: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
protected _sign(order_params: any): any;
|
|
88
|
+
getOrderInfo(out_trade_no: string, total_amount: number, subject?: string, body?: string): string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @param title
|
|
92
|
+
* @param order_id
|
|
93
|
+
* @param money
|
|
94
|
+
*/
|
|
95
|
+
doPay(title: string, order_id: string, money: number): string;
|
|
96
|
+
rsaCheck(payInfo: any): boolean;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @param method get|post
|
|
100
|
+
* @param notifyUrl 通知回调
|
|
101
|
+
* @param returnUrl
|
|
102
|
+
* @param outTradeNo
|
|
103
|
+
* @param money 价格
|
|
104
|
+
* @param subject 标题
|
|
105
|
+
* @param body 内容介绍
|
|
106
|
+
*/
|
|
107
|
+
getAlipayPage(method: "get" | "post", notifyUrl: string, returnUrl: string, outTradeNo: string, money: number, subject: string, body: string): Promise<string | import("alipay-sdk").AlipaySdkCommonResult>;
|
|
108
|
+
}
|
|
109
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare let GSmsTool: SMSTool;
|
|
2
|
-
declare class SMSTool {
|
|
3
|
-
protected _is_init: boolean;
|
|
4
|
-
protected _sms_client: any;
|
|
5
|
-
init(): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* 发送短信验证码
|
|
8
|
-
* @param code 验证码
|
|
9
|
-
* @param phone 手机号
|
|
10
|
-
* @param callback 回调
|
|
11
|
-
*/
|
|
12
|
-
sendSMS(code: number, phone: string): Promise<String>;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
1
|
+
export declare let GSmsTool: SMSTool;
|
|
2
|
+
declare class SMSTool {
|
|
3
|
+
protected _is_init: boolean;
|
|
4
|
+
protected _sms_client: any;
|
|
5
|
+
init(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* 发送短信验证码
|
|
8
|
+
* @param code 验证码
|
|
9
|
+
* @param phone 手机号
|
|
10
|
+
* @param callback 回调
|
|
11
|
+
*/
|
|
12
|
+
sendSMS(code: number, phone: string): Promise<String>;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
declare class ReceiptInfo {
|
|
2
|
-
cancellation_date: string;
|
|
3
|
-
cancellation_date_ms: string;
|
|
4
|
-
cancellation_date_pst: string;
|
|
5
|
-
cancellation_date_reason: string;
|
|
6
|
-
expires_date: string;
|
|
7
|
-
expires_date_ms: string;
|
|
8
|
-
expires_date_pst: string;
|
|
9
|
-
in_app_ownership_type: "FAMILY_SHARED" | "PURCHASED";
|
|
10
|
-
is_in_intro_offer_period: boolean;
|
|
11
|
-
is_trial_period: boolean;
|
|
12
|
-
is_upgraded: boolean;
|
|
13
|
-
offer_code_ref_name: string;
|
|
14
|
-
original_purchase_date: string;
|
|
15
|
-
original_purchase_date_ms: string;
|
|
16
|
-
original_purchase_date_pst: string;
|
|
17
|
-
original_transaction_id: string;
|
|
18
|
-
purchase_date: string;
|
|
19
|
-
purchase_date_ms: string;
|
|
20
|
-
purchase_date_pst: string;
|
|
21
|
-
quantity: number;
|
|
22
|
-
subscription_group_identifier: string;
|
|
23
|
-
web_order_line_item_id: string;
|
|
24
|
-
transaction_id: string;
|
|
25
|
-
product_id: string;
|
|
26
|
-
}
|
|
27
|
-
declare class PendingRenewalInfo {
|
|
28
|
-
auto_renew_product_id: string;
|
|
29
|
-
auto_renew_status: number;
|
|
30
|
-
expiration_intent: number;
|
|
31
|
-
grace_period_expires_date: string;
|
|
32
|
-
grace_period_expires_date_ms: string;
|
|
33
|
-
grace_period_expires_date_pst: string;
|
|
34
|
-
is_in_billing_retry_period: number;
|
|
35
|
-
offer_code_ref_name: string;
|
|
36
|
-
original_transaction_id: string;
|
|
37
|
-
price_consent_status: string;
|
|
38
|
-
product_id: string;
|
|
39
|
-
promotional_offer_id: string;
|
|
40
|
-
}
|
|
41
|
-
declare class InApp {
|
|
42
|
-
cancellation_date: string;
|
|
43
|
-
cancellation_date_ms: string;
|
|
44
|
-
cancellation_date_pst: string;
|
|
45
|
-
cancellation_reason: string;
|
|
46
|
-
expires_date: string;
|
|
47
|
-
expires_date_ms: string;
|
|
48
|
-
expires_date_pst: string;
|
|
49
|
-
is_in_intro_offer_period: boolean;
|
|
50
|
-
is_trial_period: boolean;
|
|
51
|
-
original_purchase_date: string;
|
|
52
|
-
original_purchase_date_ms: string;
|
|
53
|
-
original_purchase_date_pst: string;
|
|
54
|
-
original_transaction_id: string;
|
|
55
|
-
product_id: string;
|
|
56
|
-
promotional_offer_id: string;
|
|
57
|
-
purchase_date: string;
|
|
58
|
-
purchase_date_ms: string;
|
|
59
|
-
purchase_date_pst: string;
|
|
60
|
-
quantity: number;
|
|
61
|
-
transaction_id: string;
|
|
62
|
-
web_order_line_item_id: string;
|
|
63
|
-
}
|
|
64
|
-
declare class Receipt {
|
|
65
|
-
adam_id: number;
|
|
66
|
-
app_item_id: number;
|
|
67
|
-
application_version: string;
|
|
68
|
-
bundle_id: string;
|
|
69
|
-
download_id: number;
|
|
70
|
-
expiration_date: string;
|
|
71
|
-
expiration_date_ms: string;
|
|
72
|
-
expiration_date_pst: string;
|
|
73
|
-
in_app: InApp;
|
|
74
|
-
original_application_version: string;
|
|
75
|
-
original_purchase_date: string;
|
|
76
|
-
original_purchase_date_ms: string;
|
|
77
|
-
original_purchase_date_pst: string;
|
|
78
|
-
preorder_date: string;
|
|
79
|
-
preorder_date_ms: string;
|
|
80
|
-
preorder_date_pst: string;
|
|
81
|
-
receipt_creation_date: string;
|
|
82
|
-
receipt_creation_date_ms: string;
|
|
83
|
-
receipt_creation_date_pst: string;
|
|
84
|
-
receipt_type: string;
|
|
85
|
-
request_date: string;
|
|
86
|
-
request_date_ms: string;
|
|
87
|
-
request_date_pst: string;
|
|
88
|
-
version_external_identifier: number;
|
|
89
|
-
}
|
|
90
|
-
export declare class ResponseBody {
|
|
91
|
-
environment: "Sandbox" | "Production";
|
|
92
|
-
is_retryable: boolean;
|
|
93
|
-
latest_receipt: string;
|
|
94
|
-
latest_receipt_info: Array<ReceiptInfo>;
|
|
95
|
-
pending_renewal_info: Array<PendingRenewalInfo>;
|
|
96
|
-
receipt: Receipt;
|
|
97
|
-
status: number;
|
|
98
|
-
}
|
|
99
|
-
export declare class NotificationType {
|
|
100
|
-
static CANCEL: string;
|
|
101
|
-
static DID_CHANGE_RENEWAL_PREF: string;
|
|
102
|
-
static DID_CHANGE_RENEWAL_STATUS: string;
|
|
103
|
-
static DID_RECOVER: string;
|
|
104
|
-
static DID_RENEW: string;
|
|
105
|
-
static INTERACTIVE_RENEWAL: string;
|
|
106
|
-
}
|
|
107
|
-
export declare class NotificationBody {
|
|
108
|
-
unified_receipt: ResponseBody;
|
|
109
|
-
environment: string;
|
|
110
|
-
auto_renew_status: string;
|
|
111
|
-
auto_renew_status_change_date: string;
|
|
112
|
-
bvrs: string;
|
|
113
|
-
bid: string;
|
|
114
|
-
password: string;
|
|
115
|
-
auto_renew_product_id: string;
|
|
116
|
-
notification_type: string;
|
|
117
|
-
}
|
|
118
|
-
export declare let GAppleTool: AppleTool;
|
|
119
|
-
declare class AppleTool {
|
|
120
|
-
protected _verifyUrl: string;
|
|
121
|
-
protected _sandboxVerifyUrl: string;
|
|
122
|
-
onNotify(nb: NotificationBody): Promise<void>;
|
|
123
|
-
onVerify(receipt: string, environment: string): Promise<ResponseBody>;
|
|
124
|
-
signature(nickname: string, create_time: number, appBundleID: string, productIdentifier: string, offerIdentifier: string): {
|
|
125
|
-
keyIdentifier: string;
|
|
126
|
-
nonce: any;
|
|
127
|
-
timestamp: number;
|
|
128
|
-
signature: any;
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
export {};
|
|
1
|
+
declare class ReceiptInfo {
|
|
2
|
+
cancellation_date: string;
|
|
3
|
+
cancellation_date_ms: string;
|
|
4
|
+
cancellation_date_pst: string;
|
|
5
|
+
cancellation_date_reason: string;
|
|
6
|
+
expires_date: string;
|
|
7
|
+
expires_date_ms: string;
|
|
8
|
+
expires_date_pst: string;
|
|
9
|
+
in_app_ownership_type: "FAMILY_SHARED" | "PURCHASED";
|
|
10
|
+
is_in_intro_offer_period: boolean;
|
|
11
|
+
is_trial_period: boolean;
|
|
12
|
+
is_upgraded: boolean;
|
|
13
|
+
offer_code_ref_name: string;
|
|
14
|
+
original_purchase_date: string;
|
|
15
|
+
original_purchase_date_ms: string;
|
|
16
|
+
original_purchase_date_pst: string;
|
|
17
|
+
original_transaction_id: string;
|
|
18
|
+
purchase_date: string;
|
|
19
|
+
purchase_date_ms: string;
|
|
20
|
+
purchase_date_pst: string;
|
|
21
|
+
quantity: number;
|
|
22
|
+
subscription_group_identifier: string;
|
|
23
|
+
web_order_line_item_id: string;
|
|
24
|
+
transaction_id: string;
|
|
25
|
+
product_id: string;
|
|
26
|
+
}
|
|
27
|
+
declare class PendingRenewalInfo {
|
|
28
|
+
auto_renew_product_id: string;
|
|
29
|
+
auto_renew_status: number;
|
|
30
|
+
expiration_intent: number;
|
|
31
|
+
grace_period_expires_date: string;
|
|
32
|
+
grace_period_expires_date_ms: string;
|
|
33
|
+
grace_period_expires_date_pst: string;
|
|
34
|
+
is_in_billing_retry_period: number;
|
|
35
|
+
offer_code_ref_name: string;
|
|
36
|
+
original_transaction_id: string;
|
|
37
|
+
price_consent_status: string;
|
|
38
|
+
product_id: string;
|
|
39
|
+
promotional_offer_id: string;
|
|
40
|
+
}
|
|
41
|
+
declare class InApp {
|
|
42
|
+
cancellation_date: string;
|
|
43
|
+
cancellation_date_ms: string;
|
|
44
|
+
cancellation_date_pst: string;
|
|
45
|
+
cancellation_reason: string;
|
|
46
|
+
expires_date: string;
|
|
47
|
+
expires_date_ms: string;
|
|
48
|
+
expires_date_pst: string;
|
|
49
|
+
is_in_intro_offer_period: boolean;
|
|
50
|
+
is_trial_period: boolean;
|
|
51
|
+
original_purchase_date: string;
|
|
52
|
+
original_purchase_date_ms: string;
|
|
53
|
+
original_purchase_date_pst: string;
|
|
54
|
+
original_transaction_id: string;
|
|
55
|
+
product_id: string;
|
|
56
|
+
promotional_offer_id: string;
|
|
57
|
+
purchase_date: string;
|
|
58
|
+
purchase_date_ms: string;
|
|
59
|
+
purchase_date_pst: string;
|
|
60
|
+
quantity: number;
|
|
61
|
+
transaction_id: string;
|
|
62
|
+
web_order_line_item_id: string;
|
|
63
|
+
}
|
|
64
|
+
declare class Receipt {
|
|
65
|
+
adam_id: number;
|
|
66
|
+
app_item_id: number;
|
|
67
|
+
application_version: string;
|
|
68
|
+
bundle_id: string;
|
|
69
|
+
download_id: number;
|
|
70
|
+
expiration_date: string;
|
|
71
|
+
expiration_date_ms: string;
|
|
72
|
+
expiration_date_pst: string;
|
|
73
|
+
in_app: InApp;
|
|
74
|
+
original_application_version: string;
|
|
75
|
+
original_purchase_date: string;
|
|
76
|
+
original_purchase_date_ms: string;
|
|
77
|
+
original_purchase_date_pst: string;
|
|
78
|
+
preorder_date: string;
|
|
79
|
+
preorder_date_ms: string;
|
|
80
|
+
preorder_date_pst: string;
|
|
81
|
+
receipt_creation_date: string;
|
|
82
|
+
receipt_creation_date_ms: string;
|
|
83
|
+
receipt_creation_date_pst: string;
|
|
84
|
+
receipt_type: string;
|
|
85
|
+
request_date: string;
|
|
86
|
+
request_date_ms: string;
|
|
87
|
+
request_date_pst: string;
|
|
88
|
+
version_external_identifier: number;
|
|
89
|
+
}
|
|
90
|
+
export declare class ResponseBody {
|
|
91
|
+
environment: "Sandbox" | "Production";
|
|
92
|
+
is_retryable: boolean;
|
|
93
|
+
latest_receipt: string;
|
|
94
|
+
latest_receipt_info: Array<ReceiptInfo>;
|
|
95
|
+
pending_renewal_info: Array<PendingRenewalInfo>;
|
|
96
|
+
receipt: Receipt;
|
|
97
|
+
status: number;
|
|
98
|
+
}
|
|
99
|
+
export declare class NotificationType {
|
|
100
|
+
static CANCEL: string;
|
|
101
|
+
static DID_CHANGE_RENEWAL_PREF: string;
|
|
102
|
+
static DID_CHANGE_RENEWAL_STATUS: string;
|
|
103
|
+
static DID_RECOVER: string;
|
|
104
|
+
static DID_RENEW: string;
|
|
105
|
+
static INTERACTIVE_RENEWAL: string;
|
|
106
|
+
}
|
|
107
|
+
export declare class NotificationBody {
|
|
108
|
+
unified_receipt: ResponseBody;
|
|
109
|
+
environment: string;
|
|
110
|
+
auto_renew_status: string;
|
|
111
|
+
auto_renew_status_change_date: string;
|
|
112
|
+
bvrs: string;
|
|
113
|
+
bid: string;
|
|
114
|
+
password: string;
|
|
115
|
+
auto_renew_product_id: string;
|
|
116
|
+
notification_type: string;
|
|
117
|
+
}
|
|
118
|
+
export declare let GAppleTool: AppleTool;
|
|
119
|
+
declare class AppleTool {
|
|
120
|
+
protected _verifyUrl: string;
|
|
121
|
+
protected _sandboxVerifyUrl: string;
|
|
122
|
+
onNotify(nb: NotificationBody): Promise<void>;
|
|
123
|
+
onVerify(receipt: string, environment: string): Promise<ResponseBody>;
|
|
124
|
+
signature(nickname: string, create_time: number, appBundleID: string, productIdentifier: string, offerIdentifier: string): {
|
|
125
|
+
keyIdentifier: string;
|
|
126
|
+
nonce: any;
|
|
127
|
+
timestamp: number;
|
|
128
|
+
signature: any;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export {};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { IRpcServerWebSocket } from "../SocketServer/IRpcServerWebSocket";
|
|
2
|
-
import { RpcBaseMsg } from "../SocketServer/IRpc";
|
|
3
|
-
declare class CgMqMsg extends RpcBaseMsg {
|
|
4
|
-
/**
|
|
5
|
-
* 必填,目的身份
|
|
6
|
-
*/
|
|
7
|
-
to_identity: string;
|
|
8
|
-
/**
|
|
9
|
-
* 消息携带的数据
|
|
10
|
-
*/
|
|
11
|
-
data: any;
|
|
12
|
-
}
|
|
13
|
-
export declare class CgMqRetMsg extends CgMqMsg {
|
|
14
|
-
/**
|
|
15
|
-
* 发送者身份
|
|
16
|
-
*/
|
|
17
|
-
from_identity: string;
|
|
18
|
-
/**
|
|
19
|
-
* audience 数量
|
|
20
|
-
*/
|
|
21
|
-
count: number;
|
|
22
|
-
}
|
|
23
|
-
declare class CgMqServerWebsocket extends IRpcServerWebSocket {
|
|
24
|
-
protected _cgmq: CgMq;
|
|
25
|
-
/**
|
|
26
|
-
* 自己的身份
|
|
27
|
-
*/
|
|
28
|
-
protected _identity: string;
|
|
29
|
-
constructor(cgmq: CgMq);
|
|
30
|
-
onOpen(e?: any): void;
|
|
31
|
-
init(identity: string): Promise<unknown>;
|
|
32
|
-
push(to_identity: string, data: any): Promise<unknown>;
|
|
33
|
-
receive_msg(msg: CgMqRetMsg): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export declare class CgMqConfig {
|
|
36
|
-
identity: string;
|
|
37
|
-
host: string;
|
|
38
|
-
port: number;
|
|
39
|
-
}
|
|
40
|
-
export declare class CgMq {
|
|
41
|
-
protected _ws: CgMqServerWebsocket;
|
|
42
|
-
protected _inited: boolean;
|
|
43
|
-
protected _cfg: CgMqConfig;
|
|
44
|
-
protected _onmsg: (msg: CgMqRetMsg) => any;
|
|
45
|
-
get cfg(): CgMqConfig;
|
|
46
|
-
get identity(): string;
|
|
47
|
-
init(cfg: CgMqConfig, onmsg?: (msg: CgMqRetMsg) => any): Promise<unknown>;
|
|
48
|
-
callRemote(to_identity: string, func_name: string, ...args: any[]): Promise<CgMqRetMsg>;
|
|
49
|
-
onMsg(msg: CgMqRetMsg): Promise<any>;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
1
|
+
import { IRpcServerWebSocket } from "../SocketServer/IRpcServerWebSocket";
|
|
2
|
+
import { RpcBaseMsg } from "../SocketServer/IRpc";
|
|
3
|
+
declare class CgMqMsg extends RpcBaseMsg {
|
|
4
|
+
/**
|
|
5
|
+
* 必填,目的身份
|
|
6
|
+
*/
|
|
7
|
+
to_identity: string;
|
|
8
|
+
/**
|
|
9
|
+
* 消息携带的数据
|
|
10
|
+
*/
|
|
11
|
+
data: any;
|
|
12
|
+
}
|
|
13
|
+
export declare class CgMqRetMsg extends CgMqMsg {
|
|
14
|
+
/**
|
|
15
|
+
* 发送者身份
|
|
16
|
+
*/
|
|
17
|
+
from_identity: string;
|
|
18
|
+
/**
|
|
19
|
+
* audience 数量
|
|
20
|
+
*/
|
|
21
|
+
count: number;
|
|
22
|
+
}
|
|
23
|
+
declare class CgMqServerWebsocket extends IRpcServerWebSocket {
|
|
24
|
+
protected _cgmq: CgMq;
|
|
25
|
+
/**
|
|
26
|
+
* 自己的身份
|
|
27
|
+
*/
|
|
28
|
+
protected _identity: string;
|
|
29
|
+
constructor(cgmq: CgMq);
|
|
30
|
+
onOpen(e?: any): void;
|
|
31
|
+
init(identity: string): Promise<unknown>;
|
|
32
|
+
push(to_identity: string, data: any): Promise<unknown>;
|
|
33
|
+
receive_msg(msg: CgMqRetMsg): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export declare class CgMqConfig {
|
|
36
|
+
identity: string;
|
|
37
|
+
host: string;
|
|
38
|
+
port: number;
|
|
39
|
+
}
|
|
40
|
+
export declare class CgMq {
|
|
41
|
+
protected _ws: CgMqServerWebsocket;
|
|
42
|
+
protected _inited: boolean;
|
|
43
|
+
protected _cfg: CgMqConfig;
|
|
44
|
+
protected _onmsg: (msg: CgMqRetMsg) => any;
|
|
45
|
+
get cfg(): CgMqConfig;
|
|
46
|
+
get identity(): string;
|
|
47
|
+
init(cfg: CgMqConfig, onmsg?: (msg: CgMqRetMsg) => any): Promise<unknown>;
|
|
48
|
+
callRemote(to_identity: string, func_name: string, ...args: any[]): Promise<CgMqRetMsg>;
|
|
49
|
+
onMsg(msg: CgMqRetMsg): Promise<any>;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare let GEmailTool: EmailTool;
|
|
2
|
-
declare class EmailTool {
|
|
3
|
-
send(to: string, subject: string, html: string): Promise<unknown>;
|
|
4
|
-
}
|
|
5
|
-
export {};
|
|
1
|
+
export declare let GEmailTool: EmailTool;
|
|
2
|
+
declare class EmailTool {
|
|
3
|
+
send(to: string, subject: string, html: string): Promise<unknown>;
|
|
4
|
+
}
|
|
5
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare let GOpenSocial: OpenSocial;
|
|
2
|
-
declare class OpenSocial {
|
|
3
|
-
protected _getNewMsg(): any;
|
|
4
|
-
getUser(unionid: string, openid: string): Promise<any>;
|
|
5
|
-
updatePwd(unionid: string, openid: string, new_pwd: string): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
export {};
|
|
1
|
+
export declare let GOpenSocial: OpenSocial;
|
|
2
|
+
declare class OpenSocial {
|
|
3
|
+
protected _getNewMsg(): any;
|
|
4
|
+
getUser(unionid: string, openid: string): Promise<any>;
|
|
5
|
+
updatePwd(unionid: string, openid: string, new_pwd: string): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
export {};
|