@ray-js/api 1.5.29 → 1.5.30

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BizKit
3
3
  *
4
- * @version 4.5.1
4
+ * @version 4.10.4
5
5
  */
6
6
  declare namespace ty {
7
7
  /**
@@ -35,6 +35,35 @@ declare namespace ty {
35
35
  }) => void
36
36
  }): void
37
37
 
38
+ /**
39
+ * 获取AI助手组历史消息
40
+ */
41
+ export function getAIAssistantGroupHistory(params: {
42
+ /** 数量,不传递默认值30 */
43
+ size: number
44
+ /** 分页依据,传入0查询最近n条,其他值后根据 id < primaryId 往前查询n条 */
45
+ primaryId: number
46
+ /** 渠道列表,数组其中一个元素支持传递null表示原有AI组手,整个数组为空时,查询所有数据 */
47
+ channels?: string[]
48
+ /** 会话列表,数组其中一个元素支持传递null,整个数组为空时,查询所有数据 */
49
+ sessions?: string[]
50
+ complete?: () => void
51
+ success?: (params: {
52
+ /** 列表数据个数 */
53
+ size: number
54
+ /** 数据列表 */
55
+ list: GroupHistoryResItem[][]
56
+ }) => void
57
+ fail?: (params: {
58
+ errorMsg: string
59
+ errorCode: string | number
60
+ innerError: {
61
+ errorCode: string | number
62
+ errorMsg: string
63
+ }
64
+ }) => void
65
+ }): void
66
+
38
67
  /**
39
68
  * 删除消息
40
69
  */
@@ -61,10 +90,14 @@ declare namespace ty {
61
90
  block: string
62
91
  /** 可选参数 */
63
92
  options: string
64
- /** 类型 TEXT / SKILL,存在DB中的类型是TEXT_FINISH, SKILL_FINISH */
93
+ /** 类型 TEXT/SKILL/其他任意字符CUSTOMXX,存在DB中的类型是TEXT_FINISH, SKILL_FINISH, CUSTOMXX_FINISH */
65
94
  type: string
66
95
  /** 可选字段,如果传递了,则会绑定到该消息上,如果没有传递,则会生成一个新的requestId */
67
96
  requestId?: string
97
+ /** 渠道, 兼容历史不传从options中获取 */
98
+ channel?: string
99
+ /** 会话 */
100
+ session?: string
68
101
  complete?: () => void
69
102
  success?: (params: {
70
103
  /** 单次对话消息标识 */
@@ -144,11 +177,18 @@ declare namespace ty {
144
177
  * 消息来源 1. 本地 2. 云端
145
178
  * 消息的绑定会根据插入的source值相关,只有source相同的才会绑定。比如requestId==1的数据在数据库中有两条,source分别是1和2,插入内容根据source匹配绑定到对应的消息上。
146
179
  */
147
- source: string
180
+ source: number
148
181
  /** 渠道 可选参数,不传表示首页AI组手 */
149
- channel: string
182
+ channel?: string
183
+ /** 会话 */
184
+ session?: string
185
+ /** 发送/接受ws 时候携带数据 */
186
+ options?: string
150
187
  complete?: () => void
151
- success?: (params: null) => void
188
+ success?: (params: {
189
+ /** 主键 */
190
+ primaryId: number
191
+ }) => void
152
192
  fail?: (params: {
153
193
  errorMsg: string
154
194
  errorCode: string | number
@@ -166,13 +206,21 @@ declare namespace ty {
166
206
  /** 消息标识 */
167
207
  primaryId: number
168
208
  /** 消息内容 */
169
- data: string
209
+ data?: string
170
210
  /** 错误码 */
171
- code: string
211
+ code?: string
172
212
  /** 错误信息 */
173
- message: string
213
+ message?: string
174
214
  /** 消息来源 1. 本地 2. 云端 */
175
- source: string
215
+ source?: string
216
+ /** 类型,以_FINISH结尾 */
217
+ type: string
218
+ /** 渠道 可选参数,不传表示首页AI组手 */
219
+ channel?: string
220
+ /** 会话 */
221
+ session?: string
222
+ /** 发送/接受ws 时候携带数据 */
223
+ options?: string
176
224
  complete?: () => void
177
225
  success?: (params: null) => void
178
226
  fail?: (params: {
@@ -267,7 +315,7 @@ declare namespace ty {
267
315
  /** 消息标识 */
268
316
  requestId: string
269
317
  /** 消息来源 1. 本地 2. 云端 */
270
- source: string
318
+ source: number
271
319
  /** 消息内容 */
272
320
  data: string
273
321
  /** 错误码 */
@@ -347,7 +395,6 @@ declare namespace ty {
347
395
  export function apiRequestByHighwayRestful(params: {
348
396
  /**
349
397
  * 域名
350
- * e.g. apigw-cn.wgine.com
351
398
  */
352
399
  host?: string
353
400
  /**
@@ -500,6 +547,29 @@ declare namespace ty {
500
547
  }) => void
501
548
  }): void
502
549
 
550
+ /**
551
+ * 业务侧定义的性能数据,会显示在性能工具中
552
+ */
553
+ export function performanceEvent(params?: {
554
+ /**
555
+ * 性能数据, 这里的数据会以点击小程序的时间为起点,到调用performance方法的时间为终点自动计算耗时
556
+ * example: ty.performanceEvent({launchData: 'map_render_time'})
557
+ */
558
+ launchData?: string
559
+ /** 业务自定义性能数据,会以key-value的形式展示在性能工具中 */
560
+ perfData?: Record<string, string>
561
+ complete?: () => void
562
+ success?: (params: null) => void
563
+ fail?: (params: {
564
+ errorMsg: string
565
+ errorCode: string | number
566
+ innerError: {
567
+ errorCode: string | number
568
+ errorMsg: string
569
+ }
570
+ }) => void
571
+ }): void
572
+
503
573
  /**
504
574
  * 拿到当前App的业务信息
505
575
  */
@@ -654,6 +724,63 @@ declare namespace ty {
654
724
  }) => void
655
725
  }): void
656
726
 
727
+ /**
728
+ * 获取云端环境
729
+ */
730
+ export function getCloudEnv(params?: {
731
+ complete?: () => void
732
+ success?: (params: {
733
+ /** 云端环境 CloudEnvType */
734
+ env: number
735
+ }) => void
736
+ fail?: (params: {
737
+ errorMsg: string
738
+ errorCode: string | number
739
+ innerError: {
740
+ errorCode: string | number
741
+ errorMsg: string
742
+ }
743
+ }) => void
744
+ }): void
745
+
746
+ /**
747
+ * 当前环境是否支持小程序
748
+ */
749
+ export function isMiniAppAvailable(params?: {
750
+ complete?: () => void
751
+ success?: (params: {
752
+ /** 是否支持小程序环境 */
753
+ availalble: boolean
754
+ }) => void
755
+ fail?: (params: {
756
+ errorMsg: string
757
+ errorCode: string | number
758
+ innerError: {
759
+ errorCode: string | number
760
+ errorMsg: string
761
+ }
762
+ }) => void
763
+ }): void
764
+
765
+ /**
766
+ * 获取当前App的tab信息(仅Android)
767
+ */
768
+ export function getAppTabInfo(params?: {
769
+ complete?: () => void
770
+ success?: (params: {
771
+ /** tab信息 */
772
+ tabInfo: AppTabInfo[]
773
+ }) => void
774
+ fail?: (params: {
775
+ errorMsg: string
776
+ errorCode: string | number
777
+ innerError: {
778
+ errorCode: string | number
779
+ errorMsg: string
780
+ }
781
+ }) => void
782
+ }): void
783
+
657
784
  /**
658
785
  * 进入选择国家页面
659
786
  */
@@ -702,10 +829,30 @@ declare namespace ty {
702
829
  productID: string
703
830
  /** 订阅单预支付code */
704
831
  preFlowCode: string
832
+ /** 1: 订阅 0: 非订阅 */
833
+ subscription?: number
834
+ /**
835
+ * 指定订阅升级/降级期间的按比例分配模式
836
+ * Google提供的几种模式:
837
+ * int UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY = 0;
838
+ * int IMMEDIATE_WITH_TIME_PRORATION = 1;
839
+ * int IMMEDIATE_AND_CHARGE_PRORATED_PRICE = 2;
840
+ * int IMMEDIATE_WITHOUT_PRORATION = 3;
841
+ * int DEFERRED = 4
842
+ */
843
+ billing_mode?: number
844
+ /** 之前的sku商品,用于筛选和获取历史订单的令牌做升级处理 */
845
+ previous_sku?: string
705
846
  complete?: () => void
706
847
  success?: (params: {
707
848
  /** 订单ID */
708
- orderID: string
849
+ orderID?: string
850
+ /** 选择订单为备选结算处理token,用于后台主动上报备选结算报告单 */
851
+ token?: string
852
+ /** 选择为备选结算处理的订单 */
853
+ products?: string
854
+ /** 0:iap 1:备选结算 */
855
+ paymentType?: number
709
856
  }) => void
710
857
  fail?: (params: {
711
858
  errorMsg: string
@@ -723,7 +870,7 @@ declare namespace ty {
723
870
  export function iapType(params?: {
724
871
  complete?: () => void
725
872
  success?: (params: {
726
- /** 支付类型 0:三方支付; 1:苹果支付 */
873
+ /** 支付类型 0:三方支付; 1:苹果支付,2:google支付,3:google支付支持备选结算 */
727
874
  data: number
728
875
  }) => void
729
876
  fail?: (params: {
@@ -790,6 +937,28 @@ declare namespace ty {
790
937
  }) => void
791
938
  }): void
792
939
 
940
+ /**
941
+ * 创建实时活动
942
+ */
943
+ export function createLiveActivity(params: {
944
+ /** 实时通知类型 */
945
+ activityType?: any
946
+ /** 实时通知ID */
947
+ activityId: string
948
+ /** 实时通知参数 */
949
+ data: Record<string, string>
950
+ complete?: () => void
951
+ success?: (params: null) => void
952
+ fail?: (params: {
953
+ errorMsg: string
954
+ errorCode: string | number
955
+ innerError: {
956
+ errorCode: string | number
957
+ errorMsg: string
958
+ }
959
+ }) => void
960
+ }): void
961
+
793
962
  /**
794
963
  * 获取手机当前地区语言 zh-hans 、en-GB
795
964
  */
@@ -1178,6 +1347,8 @@ declare namespace ty {
1178
1347
  * 2: google支付
1179
1348
  */
1180
1349
  iapType?: number
1350
+ /** google支付下是否支持用户自选的备选结算 */
1351
+ googleIapEnableUserChoice?: boolean
1181
1352
  }) => void
1182
1353
  fail?: (params: {
1183
1354
  errorMsg: string
@@ -1445,6 +1616,56 @@ declare namespace ty {
1445
1616
  }) => void
1446
1617
  }): void
1447
1618
 
1619
+ /**
1620
+ * 显示分享弹窗
1621
+ */
1622
+ export function showSharePanel(params: {
1623
+ /** 分享内容类型 */
1624
+ contentType: number
1625
+ complete?: () => void
1626
+ success?: (params: {
1627
+ /** 分享平台类型 */
1628
+ platformType: string
1629
+ /** 选中平台是否安装 */
1630
+ installed: boolean
1631
+ }) => void
1632
+ fail?: (params: {
1633
+ errorMsg: string
1634
+ errorCode: string | number
1635
+ innerError: {
1636
+ errorCode: string | number
1637
+ errorMsg: string
1638
+ }
1639
+ }) => void
1640
+ }): void
1641
+
1642
+ /**
1643
+ * 直接分享
1644
+ */
1645
+ export function shareDirectly(params: {
1646
+ /** 分享平台类型 */
1647
+ platformType: string
1648
+ /** 相册内容标识 */
1649
+ localIdentifier: string
1650
+ /** 分享内容类型 */
1651
+ contentType: number
1652
+ complete?: () => void
1653
+ success?: (params: {
1654
+ /** 分享结果码 */
1655
+ code: number
1656
+ /** 分享结果描述 */
1657
+ msg: string
1658
+ }) => void
1659
+ fail?: (params: {
1660
+ errorMsg: string
1661
+ errorCode: string | number
1662
+ innerError: {
1663
+ errorCode: string | number
1664
+ errorMsg: string
1665
+ }
1666
+ }) => void
1667
+ }): void
1668
+
1448
1669
  /**
1449
1670
  * 是否支持 siri, 仅 iOS
1450
1671
  */
@@ -1531,7 +1752,7 @@ declare namespace ty {
1531
1752
  /** 是否是临时用户 */
1532
1753
  isTemporaryUser: boolean
1533
1754
  }) => void
1534
- fail?: (params: {
1755
+ failure?: (params: {
1535
1756
  errorMsg: string
1536
1757
  errorCode: string | number
1537
1758
  innerError: {
@@ -1627,6 +1848,28 @@ declare namespace ty {
1627
1848
  }) => void
1628
1849
  }): void
1629
1850
 
1851
+ /**
1852
+ * 截图
1853
+ */
1854
+ export function takeScreenShot(params?: {
1855
+ complete?: () => void
1856
+ success?: (params: {
1857
+ /**
1858
+ * 截图本地地址
1859
+ * path 图片路径
1860
+ */
1861
+ path: string
1862
+ }) => void
1863
+ fail?: (params: {
1864
+ errorMsg: string
1865
+ errorCode: string | number
1866
+ innerError: {
1867
+ errorCode: string | number
1868
+ errorMsg: string
1869
+ }
1870
+ }) => void
1871
+ }): void
1872
+
1630
1873
  /**
1631
1874
  * 获取websocket的连接状态
1632
1875
  */
@@ -1782,12 +2025,16 @@ declare namespace ty {
1782
2025
  /**
1783
2026
  * 添加消息监听
1784
2027
  */
1785
- export function onAIAssistantChange(listener: (params: ReceiveBean) => void): void
2028
+ export function onAIAssistantChange(
2029
+ listener: (params: ReceiveBean) => void
2030
+ ): void
1786
2031
 
1787
2032
  /**
1788
2033
  * 取消监听:添加消息监听
1789
2034
  */
1790
- export function offAIAssistantChange(listener: (params: ReceiveBean) => void): void
2035
+ export function offAIAssistantChange(
2036
+ listener: (params: ReceiveBean) => void
2037
+ ): void
1791
2038
 
1792
2039
  /**
1793
2040
  * 国家列表界面选择的国家信息
@@ -1806,12 +2053,16 @@ declare namespace ty {
1806
2053
  /**
1807
2054
  * 上传进度回调
1808
2055
  */
1809
- export function onUploadProgressUpdate(listener: (params: ProgressEvent) => void): void
2056
+ export function onUploadProgressUpdate(
2057
+ listener: (params: ProgressEvent) => void
2058
+ ): void
1810
2059
 
1811
2060
  /**
1812
2061
  * 取消监听:上传进度回调
1813
2062
  */
1814
- export function offUploadProgressUpdate(listener: (params: ProgressEvent) => void): void
2063
+ export function offUploadProgressUpdate(
2064
+ listener: (params: ProgressEvent) => void
2065
+ ): void
1815
2066
 
1816
2067
  /**
1817
2068
  * 页面刷新事件
@@ -1821,27 +2072,51 @@ declare namespace ty {
1821
2072
  /**
1822
2073
  * 取消监听:页面刷新事件
1823
2074
  */
1824
- export function offPageRefresh(listener: (params: RefreshParams) => void): void
2075
+ export function offPageRefresh(
2076
+ listener: (params: RefreshParams) => void
2077
+ ): void
1825
2078
 
1826
2079
  /**
1827
2080
  * 事件通道响应
1828
2081
  */
1829
- export function onReceiveMessage(listener: (params: EventChannelMessageParams) => void): void
2082
+ export function onReceiveMessage(
2083
+ listener: (params: EventChannelMessageParams) => void
2084
+ ): void
1830
2085
 
1831
2086
  /**
1832
2087
  * 取消监听:事件通道响应
1833
2088
  */
1834
- export function offReceiveMessage(listener: (params: EventChannelMessageParams) => void): void
2089
+ export function offReceiveMessage(
2090
+ listener: (params: EventChannelMessageParams) => void
2091
+ ): void
1835
2092
 
1836
2093
  /**
1837
2094
  * 订单状态监听, 只有在addOrderStatusListener之后, 才能收到监听
1838
2095
  */
1839
- export function onOrderStatusListener(listener: (params: OrderStatusEvent) => void): void
2096
+ export function onOrderStatusListener(
2097
+ listener: (params: OrderStatusEvent) => void
2098
+ ): void
1840
2099
 
1841
2100
  /**
1842
2101
  * 取消监听:订单状态监听, 只有在addOrderStatusListener之后, 才能收到监听
1843
2102
  */
1844
- export function offOrderStatusListener(listener: (params: OrderStatusEvent) => void): void
2103
+ export function offOrderStatusListener(
2104
+ listener: (params: OrderStatusEvent) => void
2105
+ ): void
2106
+
2107
+ /**
2108
+ * 用户自选备选结算监听, 只有在addOrderStatusListener之后, 才能收到监听
2109
+ */
2110
+ export function onUserSelectedAlternativeBilling(
2111
+ listener: (params: UserSelectedAlternativeEvent) => void
2112
+ ): void
2113
+
2114
+ /**
2115
+ * 取消监听:用户自选备选结算监听, 只有在addOrderStatusListener之后, 才能收到监听
2116
+ */
2117
+ export function offUserSelectedAlternativeBilling(
2118
+ listener: (params: UserSelectedAlternativeEvent) => void
2119
+ ): void
1845
2120
 
1846
2121
  /**
1847
2122
  * 统一路由事件通知
@@ -1856,45 +2131,84 @@ declare namespace ty {
1856
2131
  /**
1857
2132
  * 万能路由界面返回的数据
1858
2133
  */
1859
- export function onRouterResult(listener: (params: RouterResultResponse) => void): void
2134
+ export function onRouterResult(
2135
+ listener: (params: RouterResultResponse) => void
2136
+ ): void
1860
2137
 
1861
2138
  /**
1862
2139
  * 取消监听:万能路由界面返回的数据
1863
2140
  */
1864
- export function offRouterResult(listener: (params: RouterResultResponse) => void): void
2141
+ export function offRouterResult(
2142
+ listener: (params: RouterResultResponse) => void
2143
+ ): void
1865
2144
 
1866
2145
  /**
1867
2146
  * RN或小程序页面关闭事件(Android独有)
1868
2147
  */
1869
- export function onFrontPageClose(listener: (params: PageCloseResponse) => void): void
2148
+ export function onFrontPageClose(
2149
+ listener: (params: PageCloseResponse) => void
2150
+ ): void
1870
2151
 
1871
2152
  /**
1872
2153
  * 取消监听:RN或小程序页面关闭事件(Android独有)
1873
2154
  */
1874
- export function offFrontPageClose(listener: (params: PageCloseResponse) => void): void
2155
+ export function offFrontPageClose(
2156
+ listener: (params: PageCloseResponse) => void
2157
+ ): void
1875
2158
 
1876
2159
  /**
1877
2160
  * onWebSocketStatusChange 接受消息
1878
2161
  */
1879
- export function onWebSocketStatusChange(listener: (params: StatusBean) => void): void
2162
+ export function onWebSocketStatusChange(
2163
+ listener: (params: StatusBean) => void
2164
+ ): void
1880
2165
 
1881
2166
  /**
1882
2167
  * 取消监听:onWebSocketStatusChange 接受消息
1883
2168
  */
1884
- export function offWebSocketStatusChange(listener: (params: StatusBean) => void): void
2169
+ export function offWebSocketStatusChange(
2170
+ listener: (params: StatusBean) => void
2171
+ ): void
2172
+
2173
+ export type GroupHistoryResItem = {
2174
+ /** 主键,消息标识 */
2175
+ primaryId: number
2176
+ /** 单条消息标识 */
2177
+ requestId: string
2178
+ /** 消息来源 1. 发送 2. 接收 */
2179
+ source: number
2180
+ /** 发送码 */
2181
+ code: string
2182
+ /** 错误信息 */
2183
+ message: string
2184
+ /** 类型,和发送时候type一致,以_Finish结尾 */
2185
+ type: string
2186
+ /** 创建时间 */
2187
+ createTime: number
2188
+ /** 家庭ID */
2189
+ homeId: string
2190
+ /** 渠道 */
2191
+ channel: string
2192
+ /** 会话 */
2193
+ session: string
2194
+ /** 发送/接收ws 时候携带数据 */
2195
+ options: string
2196
+ /** 数据内容 */
2197
+ data: string
2198
+ }
1885
2199
 
1886
2200
  export enum HighwayMethod {
1887
2201
  /** HTTP 请求 GET */
1888
- GET = 'GET',
2202
+ GET = "GET",
1889
2203
 
1890
2204
  /** HTTP 请求 POST */
1891
- POST = 'POST',
2205
+ POST = "POST",
1892
2206
 
1893
2207
  /** HTTP 请求 PUT */
1894
- PUT = 'PUT',
2208
+ PUT = "PUT",
1895
2209
 
1896
2210
  /** HTTP 请求 DELETE */
1897
- DELETE = 'DELETE',
2211
+ DELETE = "DELETE",
1898
2212
  }
1899
2213
 
1900
2214
  export type ThirdPartyServiceInfo = {
@@ -1908,6 +2222,17 @@ declare namespace ty {
1908
2222
  type: number
1909
2223
  }
1910
2224
 
2225
+ export type AppTabInfo = {
2226
+ /** tab的唯一标志符 */
2227
+ key: string
2228
+ /** tab的文案 */
2229
+ text: string
2230
+ /** tab的icon */
2231
+ iconPath: string
2232
+ /** tab的选中icon */
2233
+ selectedIconPath: string
2234
+ }
2235
+
1911
2236
  export type PanelUiInfoBean = {
1912
2237
  /** phase 面板phase */
1913
2238
  phase?: string
@@ -2031,6 +2356,13 @@ declare namespace ty {
2031
2356
  errorMsg?: string
2032
2357
  }
2033
2358
 
2359
+ export type UserSelectedAlternativeEvent = {
2360
+ /** google支付下,在支持备选结算系统的情况下,用户选择备选结算方式,需要携带相关toke信息,后续完成支付以后,报告云端。 */
2361
+ externalTransactionToken?: string
2362
+ /** google支付下,在支持备选结算系统的情况下,用户选择备选结算方式,需要携带相关products信息。 */
2363
+ products?: string
2364
+ }
2365
+
2034
2366
  export type RouterEvent = {
2035
2367
  /** 业务事件名称,例如设备定时更新onDeviceAlarmUpdate */
2036
2368
  bizEventName: string
@@ -2085,7 +2417,6 @@ declare namespace ty {
2085
2417
  export type HighwayReq = {
2086
2418
  /**
2087
2419
  * 域名
2088
- * e.g. apigw-cn.wgine.com
2089
2420
  */
2090
2421
  host?: string
2091
2422
  /**
@@ -2140,6 +2471,16 @@ declare namespace ty {
2140
2471
  params: string
2141
2472
  }
2142
2473
 
2474
+ export type PerformanceBean = {
2475
+ /**
2476
+ * 性能数据, 这里的数据会以点击小程序的时间为起点,到调用performance方法的时间为终点自动计算耗时
2477
+ * example: ty.performanceEvent({launchData: 'map_render_time'})
2478
+ */
2479
+ launchData?: string
2480
+ /** 业务自定义性能数据,会以key-value的形式展示在性能工具中 */
2481
+ perfData?: Record<string, string>
2482
+ }
2483
+
2143
2484
  export type ManagerContext = {
2144
2485
  /** managerId */
2145
2486
  managerId: number
@@ -2151,7 +2492,7 @@ declare namespace ty {
2151
2492
  channels: number
2152
2493
  /** 编码格式,eg:ThingAudioAsrCodeTypePCM = 0 ,ThingAudioAsrCodeTypePCMU = 1 */
2153
2494
  codec: string
2154
- /** 云端asr解析选项,参考:https://wiki.tuya-inc.com:7799/page/1400707433826881594#5A14F9, 注意不要设置其他跟文本无关的参数,本检测只会处理跟文本相关的数据,nlp,skill,tts不包含。 */
2495
+ /** 云端asr解析选项, 注意不要设置其他跟文本无关的参数,本检测只会处理跟文本相关的数据,nlp,skill,tts不包含。 */
2155
2496
  options: string
2156
2497
  }
2157
2498
 
@@ -2240,6 +2581,21 @@ declare namespace ty {
2240
2581
  data: Record<string, {}>
2241
2582
  }
2242
2583
 
2584
+ export type CloudEnvResult = {
2585
+ /** 云端环境 CloudEnvType */
2586
+ env: number
2587
+ }
2588
+
2589
+ export type MiniAppAvailableRes = {
2590
+ /** 是否支持小程序环境 */
2591
+ availalble: boolean
2592
+ }
2593
+
2594
+ export type AppTabInfoResponse = {
2595
+ /** tab信息 */
2596
+ tabInfo: AppTabInfo[]
2597
+ }
2598
+
2243
2599
  export type IconfontInfoBean = {
2244
2600
  /**
2245
2601
  * iconfont 信息结构体
@@ -2255,15 +2611,35 @@ declare namespace ty {
2255
2611
  productID: string
2256
2612
  /** 订阅单预支付code */
2257
2613
  preFlowCode: string
2614
+ /** 1: 订阅 0: 非订阅 */
2615
+ subscription?: number
2616
+ /**
2617
+ * 指定订阅升级/降级期间的按比例分配模式
2618
+ * Google提供的几种模式:
2619
+ * int UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY = 0;
2620
+ * int IMMEDIATE_WITH_TIME_PRORATION = 1;
2621
+ * int IMMEDIATE_AND_CHARGE_PRORATED_PRICE = 2;
2622
+ * int IMMEDIATE_WITHOUT_PRORATION = 3;
2623
+ * int DEFERRED = 4
2624
+ */
2625
+ billing_mode?: number
2626
+ /** 之前的sku商品,用于筛选和获取历史订单的令牌做升级处理 */
2627
+ previous_sku?: string
2258
2628
  }
2259
2629
 
2260
2630
  export type PaymentResponse = {
2261
2631
  /** 订单ID */
2262
- orderID: string
2632
+ orderID?: string
2633
+ /** 选择订单为备选结算处理token,用于后台主动上报备选结算报告单 */
2634
+ token?: string
2635
+ /** 选择为备选结算处理的订单 */
2636
+ products?: string
2637
+ /** 0:iap 1:备选结算 */
2638
+ paymentType?: number
2263
2639
  }
2264
2640
 
2265
2641
  export type TypeResponse = {
2266
- /** 支付类型 0:三方支付; 1:苹果支付 */
2642
+ /** 支付类型 0:三方支付; 1:苹果支付,2:google支付,3:google支付支持备选结算 */
2267
2643
  data: number
2268
2644
  }
2269
2645
 
@@ -2294,6 +2670,15 @@ declare namespace ty {
2294
2670
  contentType?: string
2295
2671
  }
2296
2672
 
2673
+ export type RequestModel = {
2674
+ /** 实时通知类型 */
2675
+ activityType?: any
2676
+ /** 实时通知ID */
2677
+ activityId: string
2678
+ /** 实时通知参数 */
2679
+ data: Record<string, string>
2680
+ }
2681
+
2297
2682
  export type LocalConstants = {
2298
2683
  /** 手机当前地区语言 */
2299
2684
  langKey: string
@@ -2311,7 +2696,7 @@ declare namespace ty {
2311
2696
  langContent: {}
2312
2697
  }
2313
2698
 
2314
- export type ManagerContext_QpZPYN = {
2699
+ export type ManagerContext_asWhI2 = {
2315
2700
  /** managerId */
2316
2701
  managerId: number
2317
2702
  /** 自定义标记 */
@@ -2450,6 +2835,8 @@ declare namespace ty {
2450
2835
  * 2: google支付
2451
2836
  */
2452
2837
  iapType?: number
2838
+ /** google支付下是否支持用户自选的备选结算 */
2839
+ googleIapEnableUserChoice?: boolean
2453
2840
  }
2454
2841
 
2455
2842
  export type iapPayReadyReq = {
@@ -2568,6 +2955,34 @@ declare namespace ty {
2568
2955
  shareChannelList: string[]
2569
2956
  }
2570
2957
 
2958
+ export type SharePanelParams = {
2959
+ /** 分享内容类型 */
2960
+ contentType: number
2961
+ }
2962
+
2963
+ export type SharePanelResponse = {
2964
+ /** 分享平台类型 */
2965
+ platformType: string
2966
+ /** 选中平台是否安装 */
2967
+ installed: boolean
2968
+ }
2969
+
2970
+ export type ShareContentParams = {
2971
+ /** 分享平台类型 */
2972
+ platformType: string
2973
+ /** 相册内容标识 */
2974
+ localIdentifier: string
2975
+ /** 分享内容类型 */
2976
+ contentType: number
2977
+ }
2978
+
2979
+ export type ShareContentResponse = {
2980
+ /** 分享结果码 */
2981
+ code: number
2982
+ /** 分享结果描述 */
2983
+ msg: string
2984
+ }
2985
+
2571
2986
  export type SiriEnabledResponse = {
2572
2987
  /** 是否支持 */
2573
2988
  isSupported: boolean
@@ -2663,6 +3078,14 @@ declare namespace ty {
2663
3078
  orientation: number
2664
3079
  }
2665
3080
 
3081
+ export type ScreenShotResultBean = {
3082
+ /**
3083
+ * 截图本地地址
3084
+ * path 图片路径
3085
+ */
3086
+ path: string
3087
+ }
3088
+
2666
3089
  export type WechatSupport = {
2667
3090
  /** 是否支持微信绑定 */
2668
3091
  isSupport: boolean
@@ -2712,7 +3135,7 @@ declare namespace ty {
2712
3135
  /** 状态 */
2713
3136
  isActive: boolean
2714
3137
  }) => void
2715
- fail?: (params: {
3138
+ failure?: (params: {
2716
3139
  errorMsg: string
2717
3140
  errorCode: string | number
2718
3141
  innerError: {
@@ -2795,11 +3218,11 @@ declare namespace ty {
2795
3218
  channels: number
2796
3219
  /** 编码格式,eg:ThingAudioAsrCodeTypePCM = 0 ,ThingAudioAsrCodeTypePCMU = 1 */
2797
3220
  codec: string
2798
- /** 云端asr解析选项,参考:https://wiki.tuya-inc.com:7799/page/1400707433826881594#5A14F9, 注意不要设置其他跟文本无关的参数,本检测只会处理跟文本相关的数据,nlp,skill,tts不包含。 */
3221
+ /** 云端asr解析选项, 注意不要设置其他跟文本无关的参数,本检测只会处理跟文本相关的数据,nlp,skill,tts不包含。 */
2799
3222
  options: string
2800
3223
  complete?: () => void
2801
3224
  success?: (params: null) => void
2802
- fail?: (params: {
3225
+ failure?: (params: {
2803
3226
  errorMsg: string
2804
3227
  errorCode: string | number
2805
3228
  innerError: {
@@ -2810,7 +3233,7 @@ declare namespace ty {
2810
3233
  }): GetAsrListenerManagerTask
2811
3234
 
2812
3235
  /**
2813
- * AI语音助手管理器
3236
+ * 日志管理器
2814
3237
  */
2815
3238
  interface GetLogManagerTask {
2816
3239
  /**