@seayoo-io/combo-sdk-node 1.4.2 → 1.4.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.
package/README.md CHANGED
@@ -188,7 +188,7 @@ interface ShipOrderNotification {
188
188
  * 是否是沙盒订单。沙盒订单意味着此订单并未产生真实的付款。
189
189
  * 预期此字段仅用于记录日志和数据埋点。无论是否是沙盒订单,游戏侧都应当发货。
190
190
  */
191
- is_sandbox: boolean
191
+ is_sandbox?: boolean
192
192
  }
193
193
 
194
194
  interface RefundNotification {
package/dist/const.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /** SDK 名称 */
2
2
  export declare const SDKName = "combo-sdk-node";
3
3
  /** SDK 版本,在编译前会被动态替换 */
4
- export declare const SDKVersion = "1.4.2";
4
+ export declare const SDKVersion = "1.4.4";
5
5
  /**
6
6
  * 世游支持的服务端点列表
7
7
  */
@@ -21,7 +21,11 @@ export declare enum Platform {
21
21
  Windows = "windows",
22
22
  /** macOS 桌面平台 */
23
23
  macOS = "macos",
24
- /** 微信小游戏 */
24
+ /**
25
+ * 微信小游戏
26
+ *
27
+ * @deprecated 已被 Platform.WebGL 取代
28
+ */
25
29
  Weixin = "weixin",
26
30
  /** WebGL 平台,包括微信、抖音等小游戏,以及 HTML5 网页游戏 */
27
31
  WebGL = "webgl",
@@ -73,7 +77,17 @@ export declare enum IdP {
73
77
  /** 酷派 */
74
78
  Coolpad = "coolpad",
75
79
  /** 努比亚 */
76
- Nubia = "nubia"
80
+ Nubia = "nubia",
81
+ /** 绝峰游戏 */
82
+ Juefeng = "juefeng",
83
+ /** 魅拓游戏 */
84
+ Meituo = "meituo",
85
+ /** 微信小游戏 */
86
+ MinigameWeixin = "minigame_weixin",
87
+ /** MuMu 模拟器 */
88
+ Mumu = "mumu",
89
+ /** 虎牙游戏 */
90
+ Huya = "huya"
77
91
  }
78
92
  /** GM 错误类型枚举 */
79
93
  export declare enum GMError {
package/dist/index.cjs CHANGED
@@ -12,7 +12,7 @@ var https__default = /*#__PURE__*/_interopDefaultLegacy(https);
12
12
  /** SDK 名称 */
13
13
  const SDKName = "combo-sdk-node";
14
14
  /** SDK 版本,在编译前会被动态替换 */
15
- const SDKVersion = "1.4.2";
15
+ const SDKVersion = "1.4.4";
16
16
  /**
17
17
  * 世游支持的服务端点列表
18
18
  */
@@ -34,7 +34,11 @@ exports.Platform = void 0;
34
34
  Platform["Windows"] = "windows";
35
35
  /** macOS 桌面平台 */
36
36
  Platform["macOS"] = "macos";
37
- /** 微信小游戏 */
37
+ /**
38
+ * 微信小游戏
39
+ *
40
+ * @deprecated 已被 Platform.WebGL 取代
41
+ */
38
42
  Platform["Weixin"] = "weixin";
39
43
  /** WebGL 平台,包括微信、抖音等小游戏,以及 HTML5 网页游戏 */
40
44
  Platform["WebGL"] = "webgl";
@@ -88,6 +92,16 @@ exports.IdP = void 0;
88
92
  IdP["Coolpad"] = "coolpad";
89
93
  /** 努比亚 */
90
94
  IdP["Nubia"] = "nubia";
95
+ /** 绝峰游戏 */
96
+ IdP["Juefeng"] = "juefeng";
97
+ /** 魅拓游戏 */
98
+ IdP["Meituo"] = "meituo";
99
+ /** 微信小游戏 */
100
+ IdP["MinigameWeixin"] = "minigame_weixin";
101
+ /** MuMu 模拟器 */
102
+ IdP["Mumu"] = "mumu";
103
+ /** 虎牙游戏 */
104
+ IdP["Huya"] = "huya";
91
105
  })(exports.IdP || (exports.IdP = {}));
92
106
  /** GM 错误类型枚举 */
93
107
  var GMError;
@@ -1240,7 +1254,7 @@ class TokenVerifier {
1240
1254
  }
1241
1255
 
1242
1256
  function isShipOrderPayload(data) {
1243
- return isObject(data) && "order_id" in data && "reference_id" in data && "combo_id" in data && "product_id" in data && "quantity" in data && "currency" in data && "amount" in data && "is_sandbox" in data && typeof data.order_id === "string" && typeof data.combo_id === "string" && typeof data.quantity === "number" && typeof data.amount === "number" && typeof data.is_sandbox === "boolean" && Number.isSafeInteger(data.quantity) && Number.isSafeInteger(data.amount) && !!data.order_id && !!data.combo_id;
1257
+ return isObject(data) && "order_id" in data && "reference_id" in data && "combo_id" in data && "product_id" in data && "quantity" in data && "currency" in data && "amount" in data && typeof data.order_id === "string" && typeof data.combo_id === "string" && typeof data.quantity === "number" && typeof data.amount === "number" && ("is_sandbox" in data ? typeof data.is_sandbox === "boolean" : true) && Number.isSafeInteger(data.quantity) && Number.isSafeInteger(data.amount) && !!data.order_id && !!data.combo_id;
1244
1258
  }
1245
1259
 
1246
1260
  function isRefundPayload(data) {
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { verify } from 'jsonwebtoken';
7
7
  /** SDK 名称 */
8
8
  const SDKName = "combo-sdk-node";
9
9
  /** SDK 版本,在编译前会被动态替换 */
10
- const SDKVersion = "1.4.2";
10
+ const SDKVersion = "1.4.4";
11
11
  /**
12
12
  * 世游支持的服务端点列表
13
13
  */
@@ -29,7 +29,11 @@ var Platform;
29
29
  Platform["Windows"] = "windows";
30
30
  /** macOS 桌面平台 */
31
31
  Platform["macOS"] = "macos";
32
- /** 微信小游戏 */
32
+ /**
33
+ * 微信小游戏
34
+ *
35
+ * @deprecated 已被 Platform.WebGL 取代
36
+ */
33
37
  Platform["Weixin"] = "weixin";
34
38
  /** WebGL 平台,包括微信、抖音等小游戏,以及 HTML5 网页游戏 */
35
39
  Platform["WebGL"] = "webgl";
@@ -83,6 +87,16 @@ var IdP;
83
87
  IdP["Coolpad"] = "coolpad";
84
88
  /** 努比亚 */
85
89
  IdP["Nubia"] = "nubia";
90
+ /** 绝峰游戏 */
91
+ IdP["Juefeng"] = "juefeng";
92
+ /** 魅拓游戏 */
93
+ IdP["Meituo"] = "meituo";
94
+ /** 微信小游戏 */
95
+ IdP["MinigameWeixin"] = "minigame_weixin";
96
+ /** MuMu 模拟器 */
97
+ IdP["Mumu"] = "mumu";
98
+ /** 虎牙游戏 */
99
+ IdP["Huya"] = "huya";
86
100
  })(IdP || (IdP = {}));
87
101
  /** GM 错误类型枚举 */
88
102
  var GMError;
@@ -1235,7 +1249,7 @@ class TokenVerifier {
1235
1249
  }
1236
1250
 
1237
1251
  function isShipOrderPayload(data) {
1238
- return isObject(data) && "order_id" in data && "reference_id" in data && "combo_id" in data && "product_id" in data && "quantity" in data && "currency" in data && "amount" in data && "is_sandbox" in data && typeof data.order_id === "string" && typeof data.combo_id === "string" && typeof data.quantity === "number" && typeof data.amount === "number" && typeof data.is_sandbox === "boolean" && Number.isSafeInteger(data.quantity) && Number.isSafeInteger(data.amount) && !!data.order_id && !!data.combo_id;
1252
+ return isObject(data) && "order_id" in data && "reference_id" in data && "combo_id" in data && "product_id" in data && "quantity" in data && "currency" in data && "amount" in data && typeof data.order_id === "string" && typeof data.combo_id === "string" && typeof data.quantity === "number" && typeof data.amount === "number" && ("is_sandbox" in data ? typeof data.is_sandbox === "boolean" : true) && Number.isSafeInteger(data.quantity) && Number.isSafeInteger(data.amount) && !!data.order_id && !!data.combo_id;
1239
1253
  }
1240
1254
 
1241
1255
  function isRefundPayload(data) {
@@ -21,6 +21,6 @@ export interface ShipOrderNotification {
21
21
  *
22
22
  * 预期此字段仅用于记录日志和数据埋点。无论是否是沙盒订单,游戏侧都应当发货。
23
23
  */
24
- is_sandbox: boolean;
24
+ is_sandbox?: boolean;
25
25
  }
26
26
  export declare function isShipOrderPayload(data: unknown): data is ShipOrderNotification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-io/combo-sdk-node",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Combo SDK for Node.js",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",