@dcloudio/uni-app-x 0.7.14 → 0.7.16

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 (175) hide show
  1. package/options.d.ts +1 -1
  2. package/package.json +1 -1
  3. package/types/native/CSSStyleDeclaration.d.ts +0 -72
  4. package/types/native/CanvasRenderingContext2D.d.ts +1943 -0
  5. package/types/native/DOMRect.d.ts +0 -180
  6. package/types/native/DrawableContext.d.ts +161 -628
  7. package/types/native/IUniElement.d.ts +513 -1868
  8. package/types/native/IUniObjectElement.d.ts +124 -0
  9. package/types/native/Path2D.d.ts +241 -0
  10. package/types/native/SnapshotOptions.d.ts +1 -0
  11. package/types/native/UniApp.d.ts +110 -0
  12. package/types/native/UniCanvasElement.d.ts +9 -0
  13. package/types/native/UniNativePage.d.ts +48 -1
  14. package/types/native/UniPageManager.d.ts +4 -1
  15. package/types/native/UniProvider.d.ts +1 -0
  16. package/types/native/UniResizeObserver.d.ts +9 -99
  17. package/types/native/UniScrollEvent.d.ts +1 -1
  18. package/types/native/UniSwiperAnimationFinishEvent.d.ts +1 -1
  19. package/types/native/UniSwiperChangeEvent.d.ts +1 -1
  20. package/types/native/UniVideoElement.d.ts +5 -0
  21. package/types/native/global.d.ts +73 -15
  22. package/types/native/index.d.ts +4 -0
  23. package/types/shim-uts-basic.d.ts +4495 -0
  24. package/types/uni/env/index.d.ts +39 -0
  25. package/types/uni/uts-plugin-api/global.d.ts +20 -1
  26. package/types/uni/uts-plugin-api/index.d.ts +20 -1
  27. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +26 -0
  28. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +12 -0
  29. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +231 -0
  30. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -0
  31. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -0
  32. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -0
  33. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -0
  34. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -0
  35. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -0
  36. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/global.d.ts +10 -0
  37. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/index.d.ts +4 -0
  38. package/types/uni/uts-plugin-api/lib/uni-cancelAnimationFrame/utssdk/interface.d.ts +24 -0
  39. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +20 -0
  40. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +9 -0
  41. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +268 -0
  42. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -0
  43. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -0
  44. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -0
  45. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -0
  46. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -0
  47. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -0
  48. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +20 -3
  49. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +24 -9
  50. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +13 -6
  51. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +28 -0
  52. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +13 -0
  53. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1335 -0
  54. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +28 -0
  55. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +6 -1
  56. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +80 -0
  57. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +39 -0
  58. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +174 -0
  59. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +8 -1
  60. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +20 -17
  61. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +28 -20
  62. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +201 -64
  63. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +180 -59
  64. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +10 -2
  65. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +12 -0
  66. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +5 -0
  67. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +47 -0
  68. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +10 -1
  69. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -0
  70. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -0
  71. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +564 -0
  72. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +2 -14
  73. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +1 -6
  74. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -151
  75. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -0
  76. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -0
  77. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/interface.d.ts +1 -0
  78. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +8 -0
  79. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +4 -0
  80. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +114 -34
  81. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +7 -1
  82. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +8 -0
  83. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +4 -0
  84. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +304 -27
  85. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +500 -149
  86. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +123 -112
  87. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +9 -6
  88. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +18 -2
  89. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -0
  90. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -0
  91. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -0
  92. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +8 -1
  93. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/global.d.ts +9 -6
  94. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/index.d.ts +4 -2
  95. package/types/uni/{uts-plugin-extend → uts-plugin-api}/lib/uni-makePhoneCall/utssdk/interface.d.ts +40 -61
  96. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +2 -0
  97. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +1 -0
  98. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +327 -58
  99. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +24 -0
  100. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +12 -0
  101. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +213 -5
  102. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +280 -92
  103. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +20 -15
  104. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -0
  105. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -0
  106. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -0
  107. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +2 -0
  108. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +1 -0
  109. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +16 -6
  110. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +161 -11
  111. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -0
  112. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -0
  113. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/interface.d.ts +1 -0
  114. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -0
  115. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -0
  116. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/interface.d.ts +3 -0
  117. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +120 -42
  118. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +2 -0
  119. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +1 -0
  120. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +16 -1
  121. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/global.d.ts +12 -0
  122. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/index.d.ts +5 -0
  123. package/types/uni/uts-plugin-api/lib/uni-requestAnimationFrame/utssdk/interface.d.ts +28 -0
  124. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +177 -32
  125. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +7 -2
  126. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -0
  127. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -0
  128. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -0
  129. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +112 -43
  130. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +16 -0
  131. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +8 -0
  132. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +78 -1
  133. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +199 -149
  134. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/global.d.ts +112 -0
  135. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/index.d.ts +55 -0
  136. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +1068 -0
  137. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +170 -83
  138. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +11 -7
  139. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +33 -15
  140. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +4 -0
  141. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +2 -0
  142. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +777 -568
  143. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +10 -6
  144. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +132 -15
  145. package/types/uni/uts-plugin-extend/global.d.ts +1 -1
  146. package/types/uni/uts-plugin-extend/index.d.ts +1 -3
  147. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +4 -4
  148. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +1 -0
  149. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/global.d.ts +13 -0
  150. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/index.d.ts +5 -0
  151. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +126 -0
  152. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +3 -3
  153. package/types/uni-cloud/interface.d.ts +57 -3
  154. package/types/uni-cloud/unicloud-db/index.ts +3 -3
  155. package/types/vue/CheckboxGroupChangeEvent.d.ts +9 -1
  156. package/types/vue/PickerViewChangeEvent.d.ts +8 -0
  157. package/types/vue/ProgressActiveendEvent.d.ts +4 -0
  158. package/types/vue/RadioGroupChangeEvent.d.ts +9 -1
  159. package/types/vue/SliderChangeEvent.d.ts +4 -0
  160. package/types/vue/SwitchChangeEvent.d.ts +5 -1
  161. package/types/vue/UniCanvasElement.d.ts +6 -1
  162. package/types/vue/UniCloudDBElement.d.ts +5 -0
  163. package/types/vue/UniFormElement.d.ts +6 -1
  164. package/types/vue/UniNavigatorElement.d.ts +5 -0
  165. package/types/vue/global.d.ts +10 -9
  166. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +0 -78
  167. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +0 -38
  168. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +0 -642
  169. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/global.d.ts +0 -21
  170. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/index.d.ts +0 -9
  171. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/interface.d.ts +0 -119
  172. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/global.d.ts +0 -21
  173. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/index.d.ts +0 -9
  174. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/interface.d.ts +0 -122
  175. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
@@ -0,0 +1,1068 @@
1
+ import { RequestVirtualPaymentFailImpl as RequestVirtualPaymentFailImplement } from './unierror.uts'
2
+
3
+ export type RequestVirtualPaymentFailImpl = RequestVirtualPaymentFailImplement
4
+ export interface Uni {
5
+ /**
6
+ * @description 请求支付
7
+ * @param {RequestVirtualPaymentOptions} options
8
+ * @example
9
+ * ```typescript
10
+ * uni.requestVirtualPayment({
11
+ * provider: "alipay",
12
+ * orderInfo: "",
13
+ * success: function (res) {
14
+ * console.log("支付成功"+JSON.stringify(res))
15
+ * }
16
+ * });
17
+ * ```
18
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#requestvirtualpayment
19
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#requestvirtualpayment
20
+ * @uniPlatform {
21
+ * "app": {
22
+ * "android": {
23
+ * "osVer": "5.0",
24
+ * "uniVer": "x",
25
+ * "unixVer": "x"
26
+ * },
27
+ * "ios": {
28
+ * "osVer": "15.0",
29
+ * "uniVer": "√",
30
+ * "unixVer": "4.25"
31
+ * }
32
+ * },
33
+ * "web": {
34
+ * "uniVer": "x",
35
+ * "unixVer": "x"
36
+ * }
37
+ * }
38
+ */
39
+ requestVirtualPayment(options : RequestVirtualPaymentOptions) : void;
40
+
41
+ /**
42
+ * @description 获取各平台虚拟支付的管理类,用于操作各平台专有的API。
43
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#getvirtualpaymentmanager
44
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#getvirtualpaymentmanager
45
+ * @uniPlatform {
46
+ * "app": {
47
+ * "android": {
48
+ * "osVer": "5.0",
49
+ * "uniVer": "x",
50
+ * "unixVer": "x"
51
+ * },
52
+ * "ios": {
53
+ * "osVer": "15.0",
54
+ * "uniVer": "√",
55
+ * "unixVer": "4.25"
56
+ * },
57
+ * "harmony": {
58
+ * "osVer": "x",
59
+ * "uniVer": "x",
60
+ * "unixVer": "x"
61
+ * }
62
+ * },
63
+ * "web": {
64
+ * "uniVer": "x",
65
+ * "unixVer": "x"
66
+ * }
67
+ * }
68
+ * @return {VirtualPaymentManager} virtual-payment的管理类
69
+ */
70
+ getVirtualPaymentManager() : GetVirtualPaymentManager;
71
+ }
72
+
73
+ export type GetVirtualPaymentManager = () => VirtualPaymentManager;
74
+
75
+ export interface VirtualPaymentManager {
76
+ /**
77
+ * @description 恢复苹果服务器已支付的交易列表
78
+ * @param {AppleIAPRestoreOptions} options
79
+ * @example
80
+ * ```typescript
81
+ * restoreTransactions({
82
+ * success: function (res) {
83
+ * console.log("恢复成功"+JSON.stringify(res))
84
+ * }
85
+ * });
86
+ * ```
87
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#restoretransactions
88
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#restoretransactions
89
+ * @uniPlatform {
90
+ * "app": {
91
+ * "android": {
92
+ * "osVer": "5.0",
93
+ * "uniVer": "x",
94
+ * "unixVer": "x"
95
+ * },
96
+ * "ios": {
97
+ * "osVer": "15.0",
98
+ * "uniVer": "√",
99
+ * "unixVer": "4.25"
100
+ * }
101
+ * },
102
+ * "web": {
103
+ * "uniVer": "x",
104
+ * "unixVer": "x"
105
+ * }
106
+ * }
107
+ */
108
+ restoreTransactions(options : AppleIAPRestoreOptions) : void;
109
+
110
+ /**
111
+ * @description 获取苹果服务器已支付且未关闭的交易列表
112
+ * @param {AppleIAPUnfinishedTransactionOptions} options
113
+ * @example
114
+ * ```typescript
115
+ * getUnfinishedTransactions({
116
+ * success: function (res) {
117
+ * console.log("获取成功"+JSON.stringify(res))
118
+ * }
119
+ * });
120
+ * ```
121
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#getunfinishedtransactions
122
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#getunfinishedtransactions
123
+ * @uniPlatform {
124
+ * "app": {
125
+ * "android": {
126
+ * "osVer": "5.0",
127
+ * "uniVer": "x",
128
+ * "unixVer": "x"
129
+ * },
130
+ * "ios": {
131
+ * "osVer": "15.0",
132
+ * "uniVer": "√",
133
+ * "unixVer": "4.25"
134
+ * }
135
+ * },
136
+ * "web": {
137
+ * "uniVer": "x",
138
+ * "unixVer": "x"
139
+ * }
140
+ * }
141
+ */
142
+ getUnfinishedTransactions(options : AppleIAPUnfinishedTransactionOptions) : void;
143
+ /**
144
+ * @description 关闭苹果服务器订单
145
+ * @param {AppleIAPFinishTransactionOptions} options
146
+ * @example
147
+ * ```typescript
148
+ * finishTransaction({
149
+ * success: function (res) {
150
+ * console.log("关单成功"+JSON.stringify(res))
151
+ * }
152
+ * });
153
+ * ```
154
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#finishtransaction
155
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/virtual-payment.html#finishtransaction
156
+ * @uniPlatform {
157
+ * "app": {
158
+ * "android": {
159
+ * "osVer": "5.0",
160
+ * "uniVer": "x",
161
+ * "unixVer": "x"
162
+ * },
163
+ * "ios": {
164
+ * "osVer": "15.0",
165
+ * "uniVer": "√",
166
+ * "unixVer": "4.25"
167
+ * }
168
+ * },
169
+ * "web": {
170
+ * "uniVer": "x",
171
+ * "unixVer": "x"
172
+ * }
173
+ * }
174
+ */
175
+ finishTransaction(options : AppleIAPFinishTransactionOptions) : void;
176
+ };
177
+
178
+
179
+ /**
180
+ * 错误码
181
+ * - 700600 正在处理中,支付结果未知
182
+ * - 700601 用户中途取消。
183
+ * - 700602 网络连接出错。
184
+ * - 700604 不允许App内购买项目, 请授权应用内购买权限。
185
+ * - 700605 产品无效。
186
+ * - 700606 促销信息错误。
187
+ * - 700607 缺少支付参数。
188
+ * - 700800 只支持iOS15以上的版本。
189
+ * - 700000 其他未知错误。
190
+ */
191
+ export type RequestVirtualPaymentErrorCode = 700600 | 700601 | 700602 | 700604 | 700605 | 700606 | 700607 | 700800 | 700000;
192
+
193
+ export type RequestVirtualPayment = (options : RequestVirtualPaymentOptions) => void;
194
+
195
+ export type AppleIAPPromotionalOffer = {
196
+ /**
197
+ * 促销id
198
+ * @uniPlatform {
199
+ * "app": {
200
+ * "android": {
201
+ * "osVer": "5.0",
202
+ * "uniVer": "x",
203
+ * "unixVer": "x"
204
+ * },
205
+ * "ios": {
206
+ * "osVer": "15.0",
207
+ * "uniVer": "√",
208
+ * "unixVer": "4.25"
209
+ * }
210
+ * },
211
+ * "web": {
212
+ * "uniVer": "x",
213
+ * "unixVer": "x"
214
+ * }
215
+ * }
216
+ */
217
+ offerIdentifier : string,
218
+ /**
219
+ * 密钥
220
+ * @uniPlatform {
221
+ * "app": {
222
+ * "android": {
223
+ * "osVer": "5.0",
224
+ * "uniVer": "x",
225
+ * "unixVer": "x"
226
+ * },
227
+ * "ios": {
228
+ * "osVer": "15.0",
229
+ * "uniVer": "√",
230
+ * "unixVer": "4.25"
231
+ * }
232
+ * },
233
+ * "web": {
234
+ * "uniVer": "x",
235
+ * "unixVer": "x"
236
+ * }
237
+ * }
238
+ */
239
+ keyIdentifier : string,
240
+ /**
241
+ * 唯一id (必须小写 24小时有效)
242
+ * @uniPlatform {
243
+ * "app": {
244
+ * "android": {
245
+ * "osVer": "5.0",
246
+ * "uniVer": "x",
247
+ * "unixVer": "x"
248
+ * },
249
+ * "ios": {
250
+ * "osVer": "15.0",
251
+ * "uniVer": "√",
252
+ * "unixVer": "4.25"
253
+ * }
254
+ * },
255
+ * "web": {
256
+ * "uniVer": "x",
257
+ * "unixVer": "x"
258
+ * }
259
+ * }
260
+ */
261
+ nonce : string,
262
+ /**
263
+ * 签名
264
+ * @uniPlatform {
265
+ * "app": {
266
+ * "android": {
267
+ * "osVer": "5.0",
268
+ * "uniVer": "x",
269
+ * "unixVer": "x"
270
+ * },
271
+ * "ios": {
272
+ * "osVer": "15.0",
273
+ * "uniVer": "√",
274
+ * "unixVer": "4.25"
275
+ * }
276
+ * },
277
+ * "web": {
278
+ * "uniVer": "x",
279
+ * "unixVer": "x"
280
+ * }
281
+ * }
282
+ */
283
+ signature : string,
284
+ /**
285
+ * 创建证书的时间戳(毫秒 24小时有效)
286
+ * @uniPlatform {
287
+ * "app": {
288
+ * "android": {
289
+ * "osVer": "5.0",
290
+ * "uniVer": "x",
291
+ * "unixVer": "x"
292
+ * },
293
+ * "ios": {
294
+ * "osVer": "15.0",
295
+ * "uniVer": "√",
296
+ * "unixVer": "4.25"
297
+ * }
298
+ * },
299
+ * "web": {
300
+ * "uniVer": "x",
301
+ * "unixVer": "x"
302
+ * }
303
+ * }
304
+ */
305
+ timestamp : number
306
+ }
307
+
308
+ export type AppleIAPTransactionOptions = {
309
+ /**
310
+ * 产品id,和苹果开发者中心配置的一样
311
+ * @uniPlatform {
312
+ * "app": {
313
+ * "android": {
314
+ * "osVer": "5.0",
315
+ * "uniVer": "x",
316
+ * "unixVer": "x"
317
+ * },
318
+ * "ios": {
319
+ * "osVer": "15.0",
320
+ * "uniVer": "√",
321
+ * "unixVer": "4.25"
322
+ * }
323
+ * },
324
+ * "web": {
325
+ * "uniVer": "x",
326
+ * "unixVer": "x"
327
+ * }
328
+ * }
329
+ */
330
+ productId : string,
331
+ /**
332
+ * 透传参数,一般用于标记订单和用户的关系,可以用来验证和关联用户账户和购买记录
333
+ * @uniPlatform {
334
+ * "app": {
335
+ * "android": {
336
+ * "osVer": "5.0",
337
+ * "uniVer": "x",
338
+ * "unixVer": "x"
339
+ * },
340
+ * "ios": {
341
+ * "osVer": "15.0",
342
+ * "uniVer": "√",
343
+ * "unixVer": "4.25"
344
+ * }
345
+ * },
346
+ * "web": {
347
+ * "uniVer": "x",
348
+ * "unixVer": "x"
349
+ * }
350
+ * }
351
+ */
352
+ appAccountToken ?: string | null,
353
+ /**
354
+ * 购买数量
355
+ * @uniPlatform {
356
+ * "app": {
357
+ * "android": {
358
+ * "osVer": "5.0",
359
+ * "uniVer": "x",
360
+ * "unixVer": "x"
361
+ * },
362
+ * "ios": {
363
+ * "osVer": "15.0",
364
+ * "uniVer": "√",
365
+ * "unixVer": "4.25"
366
+ * }
367
+ * },
368
+ * "web": {
369
+ * "uniVer": "x",
370
+ * "unixVer": "x"
371
+ * }
372
+ * }
373
+ */
374
+ quantity : number,
375
+ /**
376
+ * 交易日期,示例 2022-01-01 08:00:00
377
+ * @uniPlatform {
378
+ * "app": {
379
+ * "android": {
380
+ * "osVer": "5.0",
381
+ * "uniVer": "x",
382
+ * "unixVer": "x"
383
+ * },
384
+ * "ios": {
385
+ * "osVer": "15.0",
386
+ * "uniVer": "√",
387
+ * "unixVer": "4.25"
388
+ * }
389
+ * },
390
+ * "web": {
391
+ * "uniVer": "x",
392
+ * "unixVer": "x"
393
+ * }
394
+ * }
395
+ */
396
+ transactionDate : Date,
397
+ /**
398
+ * 交易唯一标识
399
+ * @uniPlatform {
400
+ * "app": {
401
+ * "android": {
402
+ * "osVer": "5.0",
403
+ * "uniVer": "x",
404
+ * "unixVer": "x"
405
+ * },
406
+ * "ios": {
407
+ * "osVer": "15.0",
408
+ * "uniVer": "√",
409
+ * "unixVer": "4.25"
410
+ * }
411
+ * },
412
+ * "web": {
413
+ * "uniVer": "x",
414
+ * "unixVer": "x"
415
+ * }
416
+ * }
417
+ */
418
+ transactionIdentifier : string,
419
+ /**
420
+ * 原始交易唯一标识
421
+ * @uniPlatform {
422
+ * "app": {
423
+ * "android": {
424
+ * "osVer": "5.0",
425
+ * "uniVer": "x",
426
+ * "unixVer": "x"
427
+ * },
428
+ * "ios": {
429
+ * "osVer": "15.0",
430
+ * "uniVer": "√",
431
+ * "unixVer": "4.25"
432
+ * }
433
+ * },
434
+ * "web": {
435
+ * "uniVer": "x",
436
+ * "unixVer": "x"
437
+ * }
438
+ * }
439
+ */
440
+ originalTransactionIdentifier : string,
441
+ /**
442
+ * 支付票据
443
+ * @uniPlatform {
444
+ * "app": {
445
+ * "android": {
446
+ * "osVer": "5.0",
447
+ * "uniVer": "x",
448
+ * "unixVer": "x"
449
+ * },
450
+ * "ios": {
451
+ * "osVer": "15.0",
452
+ * "uniVer": "√",
453
+ * "unixVer": "4.25"
454
+ * }
455
+ * },
456
+ * "web": {
457
+ * "uniVer": "x",
458
+ * "unixVer": "x"
459
+ * }
460
+ * }
461
+ */
462
+ jsonRepresentation : string,
463
+ }
464
+ export type GoolgeIapSuccessOptions = {
465
+
466
+ }
467
+ export type HuaweiIapSuccessOptions = {
468
+
469
+ }
470
+ export type WeixinIapSuccessOptions = {
471
+
472
+ }
473
+
474
+ export type RequestVirtualPaymentSuccess = {
475
+ /**
476
+ * 支付成功返回结果
477
+ * @uniPlatform {
478
+ * "app": {
479
+ * "android": {
480
+ * "osVer": "5.0",
481
+ * "uniVer": "x",
482
+ * "unixVer": "x"
483
+ * },
484
+ * "ios": {
485
+ * "osVer": "15.0",
486
+ * "uniVer": "√",
487
+ * "unixVer": "4.25"
488
+ * }
489
+ * },
490
+ * "web": {
491
+ * "uniVer": "x",
492
+ * "unixVer": "x"
493
+ * }
494
+ * }
495
+ */
496
+ apple ?: AppleIAPTransactionOptions | null,
497
+ // google ?: GoolgeIapSuccessOptions | null,
498
+ // huawei ?: HuaweiIapSuccessOptions | null,
499
+ // weixin ?: WeixinIapSuccessOptions | null,
500
+ };
501
+ export type RequestVirtualPaymentSuccessCallback = (result : RequestVirtualPaymentSuccess) => void;
502
+ export type RequestVirtualPaymentFail = IRequestVirtualPaymentFail;
503
+ export type RequestVirtualPaymentFailCallback = (result : RequestVirtualPaymentFail) => void;
504
+ export interface IRequestVirtualPaymentFail extends IUniError {
505
+ errCode : RequestVirtualPaymentErrorCode
506
+ };
507
+ export type RequestVirtualPaymentComplete = any
508
+ export type RequestVirtualPaymentCompleteCallback = (result : RequestVirtualPaymentComplete) => void;
509
+
510
+ export type AppleIAPOptions = {
511
+ /**
512
+ * 产品id,在苹果开发者中心配置
513
+ * @uniPlatform {
514
+ * "app": {
515
+ * "android": {
516
+ * "osVer": "5.0",
517
+ * "uniVer": "x",
518
+ * "unixVer": "x"
519
+ * },
520
+ * "ios": {
521
+ * "osVer": "15.0",
522
+ * "uniVer": "√",
523
+ * "unixVer": "4.25"
524
+ * }
525
+ * },
526
+ * "web": {
527
+ * "uniVer": "x",
528
+ * "unixVer": "x"
529
+ * }
530
+ * }
531
+ */
532
+ productId : string,
533
+ /**
534
+ * 透传参数,一般用于标记订单和用户的关系,可以用来验证和关联用户账户和购买记录
535
+ * @uniPlatform {
536
+ * "app": {
537
+ * "android": {
538
+ * "osVer": "5.0",
539
+ * "uniVer": "x",
540
+ * "unixVer": "x"
541
+ * },
542
+ * "ios": {
543
+ * "osVer": "15.0",
544
+ * "uniVer": "√",
545
+ * "unixVer": "4.25"
546
+ * }
547
+ * },
548
+ * "web": {
549
+ * "uniVer": "x",
550
+ * "unixVer": "x"
551
+ * }
552
+ * }
553
+ */
554
+ appAccountToken ?: string | null,
555
+ /**
556
+ * 购买数量,默认是1,最小值是1,最大值是10
557
+ * @uniPlatform {
558
+ * "app": {
559
+ * "android": {
560
+ * "osVer": "5.0",
561
+ * "uniVer": "x",
562
+ * "unixVer": "x"
563
+ * },
564
+ * "ios": {
565
+ * "osVer": "15.0",
566
+ * "uniVer": "√",
567
+ * "unixVer": "4.25"
568
+ * }
569
+ * },
570
+ * "web": {
571
+ * "uniVer": "x",
572
+ * "unixVer": "x"
573
+ * }
574
+ * }
575
+ */
576
+ quantity : number,
577
+ /**
578
+ * 促销优惠参数说明
579
+ * @uniPlatform {
580
+ * "app": {
581
+ * "android": {
582
+ * "osVer": "5.0",
583
+ * "uniVer": "x",
584
+ * "unixVer": "x"
585
+ * },
586
+ * "ios": {
587
+ * "osVer": "15.0",
588
+ * "uniVer": "√",
589
+ * "unixVer": "4.25"
590
+ * }
591
+ * },
592
+ * "web": {
593
+ * "uniVer": "x",
594
+ * "unixVer": "x"
595
+ * }
596
+ * }
597
+ */
598
+ promotionalOffer ?: AppleIAPPromotionalOffer | null
599
+ };
600
+ export type GoogleIapOptions = {
601
+
602
+ };
603
+ export type HuaweiIapOptions = {
604
+
605
+ };
606
+ export type WeixinIapOptions = {
607
+
608
+ };
609
+ export type RequestVirtualPaymentOptions = {
610
+ /**
611
+ * 苹果IAP的参数
612
+ * @uniPlatform {
613
+ * "app": {
614
+ * "android": {
615
+ * "osVer": "5.0",
616
+ * "uniVer": "x",
617
+ * "unixVer": "x"
618
+ * },
619
+ * "ios": {
620
+ * "osVer": "15.0",
621
+ * "uniVer": "√",
622
+ * "unixVer": "4.25"
623
+ * }
624
+ * },
625
+ * "web": {
626
+ * "uniVer": "x",
627
+ * "unixVer": "x"
628
+ * }
629
+ * }
630
+ */
631
+ apple ?: AppleIAPOptions | null,
632
+ // /**
633
+ // * Google IAP的参数
634
+ // */
635
+ // google ?: GoogleIapOptions | null,
636
+ // /**
637
+ // * 华为 IAP的参数
638
+ // */
639
+ // huawei ?: HuaweiIapOptions | null,
640
+ // /**
641
+ // * 微信虚拟支付的参数
642
+ // */
643
+ // weixin ?: WeixinIapOptions | null,
644
+ /**
645
+ * 接口调用成功的回调函数
646
+ * @uniPlatform {
647
+ * "app": {
648
+ * "android": {
649
+ * "osVer": "5.0",
650
+ * "uniVer": "x",
651
+ * "unixVer": "x"
652
+ * },
653
+ * "ios": {
654
+ * "osVer": "15.0",
655
+ * "uniVer": "√",
656
+ * "unixVer": "4.25"
657
+ * }
658
+ * },
659
+ * "web": {
660
+ * "uniVer": "x",
661
+ * "unixVer": "x"
662
+ * }
663
+ * }
664
+ */
665
+ success ?: RequestVirtualPaymentSuccessCallback | null,
666
+ /**
667
+ * 接口调用失败的回调函数
668
+ * @uniPlatform {
669
+ * "app": {
670
+ * "android": {
671
+ * "osVer": "5.0",
672
+ * "uniVer": "x",
673
+ * "unixVer": "x"
674
+ * },
675
+ * "ios": {
676
+ * "osVer": "15.0",
677
+ * "uniVer": "√",
678
+ * "unixVer": "4.25"
679
+ * }
680
+ * },
681
+ * "web": {
682
+ * "uniVer": "x",
683
+ * "unixVer": "x"
684
+ * }
685
+ * }
686
+ */
687
+ fail ?: RequestVirtualPaymentFailCallback | null,
688
+ /**
689
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
690
+ * @uniPlatform {
691
+ * "app": {
692
+ * "android": {
693
+ * "osVer": "5.0",
694
+ * "uniVer": "x",
695
+ * "unixVer": "x"
696
+ * },
697
+ * "ios": {
698
+ * "osVer": "15.0",
699
+ * "uniVer": "√",
700
+ * "unixVer": "4.25"
701
+ * }
702
+ * },
703
+ * "web": {
704
+ * "uniVer": "x",
705
+ * "unixVer": "x"
706
+ * }
707
+ * }
708
+ */
709
+ complete ?: RequestVirtualPaymentCompleteCallback | null
710
+ };
711
+
712
+
713
+ //restoreTransactions
714
+ export type RestoreTransactions = (options : AppleIAPRestoreOptions) => void;
715
+ export type AppleIAPRestoreSuccess = {
716
+ /**
717
+ * 返回的交易列表
718
+ * @uniPlatform {
719
+ * "app": {
720
+ * "android": {
721
+ * "osVer": "5.0",
722
+ * "uniVer": "x",
723
+ * "unixVer": "x"
724
+ * },
725
+ * "ios": {
726
+ * "osVer": "15.0",
727
+ * "uniVer": "√",
728
+ * "unixVer": "4.25"
729
+ * }
730
+ * },
731
+ * "web": {
732
+ * "uniVer": "x",
733
+ * "unixVer": "x"
734
+ * }
735
+ * }
736
+ */
737
+ transactions ?: AppleIAPTransactionOptions[] | null
738
+ };
739
+ export type AppleIAPRestoreSuccessCallback = (result : AppleIAPRestoreSuccess) => void;
740
+ export type AppleIAPRestoreFail = IAppleIAPRestoreFail;
741
+ export type AppleIAPRestoreFailCallback = (result : AppleIAPRestoreFail) => void;
742
+ export interface IAppleIAPRestoreFail extends IUniError {
743
+ errCode : AppleIAPRestoreErrorCode
744
+ };
745
+ export type AppleIAPRestoreComplete = any
746
+ export type AppleIAPRestoreCompleteCallback = (result : AppleIAPRestoreComplete) => void;
747
+ /**
748
+ * 错误码
749
+ * - 700600 apple restore 请求失败。
750
+ * - 700601 用户中途取消。
751
+ * - 700602 网络连接出错。
752
+ * - 700800 只支持iOS15以上的版本。
753
+ */
754
+ export type AppleIAPRestoreErrorCode = 700600 | 700601 | 700602 | 700800;
755
+
756
+ export type AppleIAPRestoreOptions = {
757
+ /**
758
+ * 接口调用成功的回调函数
759
+ * @uniPlatform {
760
+ * "app": {
761
+ * "android": {
762
+ * "osVer": "5.0",
763
+ * "uniVer": "x",
764
+ * "unixVer": "x"
765
+ * },
766
+ * "ios": {
767
+ * "osVer": "15.0",
768
+ * "uniVer": "√",
769
+ * "unixVer": "4.25"
770
+ * }
771
+ * },
772
+ * "web": {
773
+ * "uniVer": "x",
774
+ * "unixVer": "x"
775
+ * }
776
+ * }
777
+ */
778
+ success ?: AppleIAPRestoreSuccessCallback | null,
779
+ /**
780
+ * 接口调用失败的回调函数
781
+ * @uniPlatform {
782
+ * "app": {
783
+ * "android": {
784
+ * "osVer": "5.0",
785
+ * "uniVer": "x",
786
+ * "unixVer": "x"
787
+ * },
788
+ * "ios": {
789
+ * "osVer": "15.0",
790
+ * "uniVer": "√",
791
+ * "unixVer": "4.25"
792
+ * }
793
+ * },
794
+ * "web": {
795
+ * "uniVer": "x",
796
+ * "unixVer": "x"
797
+ * }
798
+ * }
799
+ */
800
+ fail ?: AppleIAPRestoreFailCallback | null,
801
+ /**
802
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
803
+ * @uniPlatform {
804
+ * "app": {
805
+ * "android": {
806
+ * "osVer": "5.0",
807
+ * "uniVer": "x",
808
+ * "unixVer": "x"
809
+ * },
810
+ * "ios": {
811
+ * "osVer": "15.0",
812
+ * "uniVer": "√",
813
+ * "unixVer": "4.25"
814
+ * }
815
+ * },
816
+ * "web": {
817
+ * "uniVer": "x",
818
+ * "unixVer": "x"
819
+ * }
820
+ * }
821
+ */
822
+ complete ?: AppleIAPRestoreCompleteCallback | null
823
+ };
824
+
825
+
826
+
827
+ //getUnfinishedTransactions
828
+ export type GetUnfinishedTransactions = (options : AppleIAPUnfinishedTransactionOptions) => void;
829
+ export type AppleIAPUnfinishedTransactionSuccess = {
830
+ /**
831
+ * 返回的交易列表
832
+ * @uniPlatform {
833
+ * "app": {
834
+ * "android": {
835
+ * "osVer": "5.0",
836
+ * "uniVer": "x",
837
+ * "unixVer": "x"
838
+ * },
839
+ * "ios": {
840
+ * "osVer": "15.0",
841
+ * "uniVer": "√",
842
+ * "unixVer": "4.25"
843
+ * }
844
+ * },
845
+ * "web": {
846
+ * "uniVer": "x",
847
+ * "unixVer": "x"
848
+ * }
849
+ * }
850
+ */
851
+ transactions ?: AppleIAPTransactionOptions[] | null
852
+ };
853
+ export type AppleIAPUnfinishedTransactionSuccessCallback = (result : AppleIAPUnfinishedTransactionSuccess) => void;
854
+ export type AppleIAPUnfinishedTransactionFail = IAppleIAPUnfinishedTransactionFail;
855
+ export type AppleIAPUnfinishedTransactionFailCallback = (result : AppleIAPUnfinishedTransactionFail) => void;
856
+ export interface IAppleIAPUnfinishedTransactionFail extends IUniError {
857
+ errCode : AppleIAPUnfinishedTransactionErrorCode
858
+ };
859
+ export type AppleIAPUnfinishedTransactionComplete = any
860
+ export type AppleIAPUnfinishedTransactionCompleteCallback = (result : AppleIAPUnfinishedTransactionComplete) => void;
861
+ /**
862
+ * 错误码
863
+ * - 700800 只支持iOS15以上的版本。
864
+ */
865
+ export type AppleIAPUnfinishedTransactionErrorCode = 700800;
866
+
867
+ export type AppleIAPUnfinishedTransactionOptions = {
868
+ /**
869
+ * 接口调用成功的回调函数
870
+ * @uniPlatform {
871
+ * "app": {
872
+ * "android": {
873
+ * "osVer": "5.0",
874
+ * "uniVer": "x",
875
+ * "unixVer": "x"
876
+ * },
877
+ * "ios": {
878
+ * "osVer": "15.0",
879
+ * "uniVer": "√",
880
+ * "unixVer": "4.25"
881
+ * }
882
+ * },
883
+ * "web": {
884
+ * "uniVer": "x",
885
+ * "unixVer": "x"
886
+ * }
887
+ * }
888
+ */
889
+ success ?: AppleIAPUnfinishedTransactionSuccessCallback | null,
890
+ /**
891
+ * 接口调用失败的回调函数
892
+ * @uniPlatform {
893
+ * "app": {
894
+ * "android": {
895
+ * "osVer": "5.0",
896
+ * "uniVer": "x",
897
+ * "unixVer": "x"
898
+ * },
899
+ * "ios": {
900
+ * "osVer": "15.0",
901
+ * "uniVer": "√",
902
+ * "unixVer": "4.25"
903
+ * }
904
+ * },
905
+ * "web": {
906
+ * "uniVer": "x",
907
+ * "unixVer": "x"
908
+ * }
909
+ * }
910
+ */
911
+ fail ?: AppleIAPUnfinishedTransactionFailCallback | null,
912
+ /**
913
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
914
+ * @uniPlatform {
915
+ * "app": {
916
+ * "android": {
917
+ * "osVer": "5.0",
918
+ * "uniVer": "x",
919
+ * "unixVer": "x"
920
+ * },
921
+ * "ios": {
922
+ * "osVer": "15.0",
923
+ * "uniVer": "√",
924
+ * "unixVer": "4.25"
925
+ * }
926
+ * },
927
+ * "web": {
928
+ * "uniVer": "x",
929
+ * "unixVer": "x"
930
+ * }
931
+ * }
932
+ */
933
+ complete ?: AppleIAPUnfinishedTransactionCompleteCallback | null
934
+ };
935
+
936
+
937
+
938
+ //finishTransaction 相关定义
939
+ export type FinishTransaction = (options : AppleIAPFinishTransactionOptions) => void;
940
+ export type AppleIAPFinishTransactionSuccess = {
941
+ /**
942
+ * 关单状态
943
+ * @uniPlatform {
944
+ * "app": {
945
+ * "android": {
946
+ * "osVer": "5.0",
947
+ * "uniVer": "x",
948
+ * "unixVer": "x"
949
+ * },
950
+ * "ios": {
951
+ * "osVer": "15.0",
952
+ * "uniVer": "√",
953
+ * "unixVer": "4.25"
954
+ * }
955
+ * },
956
+ * "web": {
957
+ * "uniVer": "x",
958
+ * "unixVer": "x"
959
+ * }
960
+ * }
961
+ */
962
+ state ?: boolean | null
963
+ };
964
+ export type AppleIAPFinishTransactionSuccessCallback = (result : AppleIAPFinishTransactionSuccess) => void;
965
+ export type AppleIAPFinishTransactionFail = IAppleIAPFinishTransactionFail;
966
+ export type AppleIAPFinishTransactionFailCallback = (result : AppleIAPFinishTransactionFail) => void;
967
+ export interface IAppleIAPFinishTransactionFail extends IUniError {
968
+ errCode : AppleIAPFinishTransactionFailErrorCode
969
+ };
970
+ export type AppleIAPFinishTransactionComplete = any
971
+ export type AppleIAPFinishTransactionCompleteCallback = (result : AppleIAPFinishTransactionComplete) => void;
972
+ /**
973
+ * 错误码
974
+ * - 700600 没有该交易。
975
+ * - 700800 只支持iOS15以上的版本。
976
+ */
977
+ export type AppleIAPFinishTransactionFailErrorCode = 700600 | 700800;
978
+
979
+ export type AppleIAPFinishTransactionOptions = {
980
+ /**
981
+ * 交易对象
982
+ * @uniPlatform {
983
+ * "app": {
984
+ * "android": {
985
+ * "osVer": "5.0",
986
+ * "uniVer": "x",
987
+ * "unixVer": "x"
988
+ * },
989
+ * "ios": {
990
+ * "osVer": "15.0",
991
+ * "uniVer": "√",
992
+ * "unixVer": "4.25"
993
+ * }
994
+ * },
995
+ * "web": {
996
+ * "uniVer": "x",
997
+ * "unixVer": "x"
998
+ * }
999
+ * }
1000
+ */
1001
+ transaction : AppleIAPTransactionOptions
1002
+ /**
1003
+ * 接口调用成功的回调函数
1004
+ * @uniPlatform {
1005
+ * "app": {
1006
+ * "android": {
1007
+ * "osVer": "5.0",
1008
+ * "uniVer": "x",
1009
+ * "unixVer": "x"
1010
+ * },
1011
+ * "ios": {
1012
+ * "osVer": "15.0",
1013
+ * "uniVer": "√",
1014
+ * "unixVer": "4.25"
1015
+ * }
1016
+ * },
1017
+ * "web": {
1018
+ * "uniVer": "x",
1019
+ * "unixVer": "x"
1020
+ * }
1021
+ * }
1022
+ */
1023
+ success ?: AppleIAPFinishTransactionSuccessCallback | null,
1024
+ /**
1025
+ * 接口调用失败的回调函数
1026
+ * @uniPlatform {
1027
+ * "app": {
1028
+ * "android": {
1029
+ * "osVer": "5.0",
1030
+ * "uniVer": "x",
1031
+ * "unixVer": "x"
1032
+ * },
1033
+ * "ios": {
1034
+ * "osVer": "15.0",
1035
+ * "uniVer": "√",
1036
+ * "unixVer": "4.25"
1037
+ * }
1038
+ * },
1039
+ * "web": {
1040
+ * "uniVer": "x",
1041
+ * "unixVer": "x"
1042
+ * }
1043
+ * }
1044
+ */
1045
+ fail ?: AppleIAPFinishTransactionFailCallback | null,
1046
+ /**
1047
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
1048
+ * @uniPlatform {
1049
+ * "app": {
1050
+ * "android": {
1051
+ * "osVer": "5.0",
1052
+ * "uniVer": "x",
1053
+ * "unixVer": "x"
1054
+ * },
1055
+ * "ios": {
1056
+ * "osVer": "15.0",
1057
+ * "uniVer": "√",
1058
+ * "unixVer": "4.25"
1059
+ * }
1060
+ * },
1061
+ * "web": {
1062
+ * "uniVer": "x",
1063
+ * "unixVer": "x"
1064
+ * }
1065
+ * }
1066
+ */
1067
+ complete ?: AppleIAPFinishTransactionCompleteCallback | null
1068
+ };