@ray-js/api 1.7.81 → 1.7.82

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.
@@ -5,42 +5,111 @@
5
5
  */
6
6
  declare namespace ty.pay {
7
7
  /**
8
- *@description 支付宝快登授权2.0*/
8
+ * 支付宝快登授权2.0
9
+ * @public
10
+ * @since PayKit 0.2.0
11
+ * @platform iOS Android
12
+ */
9
13
  export function alipayAuth(params: {
10
- /** 授权请求信息字串 */
14
+ /**
15
+ * 授权请求信息字串
16
+ * @since PayKit 0.2.0
17
+ */
11
18
  info: string
19
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
20
+ complete?: () => void
21
+ /** 接口调用成功的回调函数 */
12
22
  success?: (params: {
13
- /** 结果 */
14
- result: any
23
+ /**
24
+ * 结果
25
+ * @since PayKit 0.2.0
26
+ */
27
+ result: Record<any, any>
15
28
  }) => void
29
+ /** 接口调用失败的回调函数 */
16
30
  fail?: (params: {
31
+ /** 错误信息 */
17
32
  errorMsg: string
33
+ /** 错误码 */
18
34
  errorCode: string | number
35
+ /** 错误扩展 */
19
36
  innerError: {
37
+ /** 错误扩展码 */
20
38
  errorCode: string | number
39
+ /** 错误扩展信息 */
21
40
  errorMsg: string
22
41
  }
23
42
  }) => void
24
- complete?: () => void
25
43
  }): void
26
44
 
27
45
  /**
28
- *@description 支付宝支付接口*/
46
+ * 支付宝支付接口
47
+ * @public
48
+ * @since PayKit 0.2.0
49
+ * @platform iOS Android
50
+ */
29
51
  export function alipayPay(params: {
30
- /** 支付订单信息字串 */
52
+ /**
53
+ * 支付订单信息字串
54
+ * @since PayKit 0.2.0
55
+ */
31
56
  order: string
57
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
58
+ complete?: () => void
59
+ /** 接口调用成功的回调函数 */
32
60
  success?: (params: {
33
- /** 结果 */
34
- result: any
61
+ /**
62
+ * 结果
63
+ * @since PayKit 0.2.0
64
+ */
65
+ result: Record<any, any>
35
66
  }) => void
67
+ /** 接口调用失败的回调函数 */
36
68
  fail?: (params: {
69
+ /** 错误信息 */
37
70
  errorMsg: string
71
+ /** 错误码 */
38
72
  errorCode: string | number
73
+ /** 错误扩展 */
39
74
  innerError: {
75
+ /** 错误扩展码 */
40
76
  errorCode: string | number
77
+ /** 错误扩展信息 */
41
78
  errorMsg: string
42
79
  }
43
80
  }) => void
44
- complete?: () => void
45
81
  }): void
82
+
83
+ /**
84
+ * 授权请求
85
+ * @since PayKit 0.2.0
86
+ */
87
+ export interface AuthRequestParams {
88
+ /**
89
+ * 授权请求信息字串
90
+ * @since PayKit 0.2.0
91
+ */
92
+ info: string
93
+ }
94
+
95
+ /** @since PayKit 0.2.0 */
96
+ export interface Response {
97
+ /**
98
+ * 结果
99
+ * @since PayKit 0.2.0
100
+ */
101
+ result: Record<any, any>
102
+ }
103
+
104
+ /**
105
+ * 支付请求
106
+ * @since PayKit 0.2.0
107
+ */
108
+ export interface PayRequestParams {
109
+ /**
110
+ * 支付订单信息字串
111
+ * @since PayKit 0.2.0
112
+ */
113
+ order: string
114
+ }
46
115
  }