@weapp-core/api 0.3.8 → 0.4.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/dist/{apiCatalog-aYGell1q.mjs → apiCatalog-CuGS6BXn.mjs} +10 -20
- package/dist/{index-Bt6fzcnM.d.mts → index-DX9lohgi.d.mts} +0 -120
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +25 -49
- package/dist/network-options.d.mts +22 -0
- package/dist/network-options.mjs +1 -0
- package/dist/vitest/setup.mjs +1 -2
- package/dist/vitest.d.mts +2 -3
- package/dist/vitest.mjs +2 -3
- package/package.json +11 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/apiCatalog/myMethodsAddPhoneContactToOnGyroscopeChange.ts
|
|
2
2
|
/**
|
|
3
3
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
4
4
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -185,8 +185,7 @@ const WEAPI_MY_METHODS_ADD_PHONE_CONTACT_TO_ON_GYROSCOPE_CHANGE = [
|
|
|
185
185
|
"onGetWifiList",
|
|
186
186
|
"onGyroscopeChange"
|
|
187
187
|
];
|
|
188
|
-
|
|
189
|
-
//#region src/core/apiCatalog/myMethodsOnLocatedCompleteToWriteBLECharacteristicValue.ts
|
|
188
|
+
// src/core/apiCatalog/myMethodsOnLocatedCompleteToWriteBLECharacteristicValue.ts
|
|
190
189
|
/**
|
|
191
190
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
192
191
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -296,15 +295,13 @@ const WEAPI_MY_METHODS_ON_LOCATED_COMPLETE_TO_WRITE_BLECHARACTERISTIC_VALUE = [
|
|
|
296
295
|
"watchShake",
|
|
297
296
|
"writeBLECharacteristicValue"
|
|
298
297
|
];
|
|
299
|
-
|
|
300
|
-
//#region src/core/apiCatalog/myMethods.ts
|
|
298
|
+
// src/core/apiCatalog/myMethods.ts
|
|
301
299
|
/**
|
|
302
300
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
303
301
|
* @generated by scripts/sync-api-catalog.mjs
|
|
304
302
|
*/
|
|
305
303
|
const WEAPI_MY_METHODS = [...WEAPI_MY_METHODS_ADD_PHONE_CONTACT_TO_ON_GYROSCOPE_CHANGE, ...WEAPI_MY_METHODS_ON_LOCATED_COMPLETE_TO_WRITE_BLECHARACTERISTIC_VALUE];
|
|
306
|
-
|
|
307
|
-
//#region src/core/apiCatalog/ttMethodsApplyEcCouponToUnsubscribeAllSpecifiedUserComment.ts
|
|
304
|
+
// src/core/apiCatalog/ttMethodsApplyEcCouponToUnsubscribeAllSpecifiedUserComment.ts
|
|
308
305
|
/**
|
|
309
306
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
310
307
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -491,8 +488,7 @@ const WEAPI_TT_METHODS_APPLY_EC_COUPON_TO_UNSUBSCRIBE_ALL_SPECIFIED_USER_COMMENT
|
|
|
491
488
|
"unsubscribeAllSpecifiedContentComment",
|
|
492
489
|
"unsubscribeAllSpecifiedUserComment"
|
|
493
490
|
];
|
|
494
|
-
|
|
495
|
-
//#region src/core/apiCatalog/ttMethodsUnsubscribeAudiencesFollowActionToVibrateShort.ts
|
|
491
|
+
// src/core/apiCatalog/ttMethodsUnsubscribeAudiencesFollowActionToVibrateShort.ts
|
|
496
492
|
/**
|
|
497
493
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
498
494
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -506,15 +502,13 @@ const WEAPI_TT_METHODS_UNSUBSCRIBE_AUDIENCES_FOLLOW_ACTION_TO_VIBRATE_SHORT = [
|
|
|
506
502
|
"vibrateLong",
|
|
507
503
|
"vibrateShort"
|
|
508
504
|
];
|
|
509
|
-
|
|
510
|
-
//#region src/core/apiCatalog/ttMethods.ts
|
|
505
|
+
// src/core/apiCatalog/ttMethods.ts
|
|
511
506
|
/**
|
|
512
507
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
513
508
|
* @generated by scripts/sync-api-catalog.mjs
|
|
514
509
|
*/
|
|
515
510
|
const WEAPI_TT_METHODS = [...WEAPI_TT_METHODS_APPLY_EC_COUPON_TO_UNSUBSCRIBE_ALL_SPECIFIED_USER_COMMENT, ...WEAPI_TT_METHODS_UNSUBSCRIBE_AUDIENCES_FOLLOW_ACTION_TO_VIBRATE_SHORT];
|
|
516
|
-
|
|
517
|
-
//#region src/core/apiCatalog/wxMethodsAddCardToHideShareMenu.ts
|
|
511
|
+
// src/core/apiCatalog/wxMethodsAddCardToHideShareMenu.ts
|
|
518
512
|
/**
|
|
519
513
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
520
514
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -701,8 +695,7 @@ const WEAPI_WX_METHODS_ADD_CARD_TO_HIDE_SHARE_MENU = [
|
|
|
701
695
|
"hideNavigationBarLoading",
|
|
702
696
|
"hideShareMenu"
|
|
703
697
|
];
|
|
704
|
-
|
|
705
|
-
//#region src/core/apiCatalog/wxMethodsHideTabBarToOpenStoreCouponDetail.ts
|
|
698
|
+
// src/core/apiCatalog/wxMethodsHideTabBarToOpenStoreCouponDetail.ts
|
|
706
699
|
/**
|
|
707
700
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
708
701
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -889,8 +882,7 @@ const WEAPI_WX_METHODS_HIDE_TAB_BAR_TO_OPEN_STORE_COUPON_DETAIL = [
|
|
|
889
882
|
"openStickerSetView",
|
|
890
883
|
"openStoreCouponDetail"
|
|
891
884
|
];
|
|
892
|
-
|
|
893
|
-
//#region src/core/apiCatalog/wxMethodsOpenStoreOrderDetailToWriteBLECharacteristicValue.ts
|
|
885
|
+
// src/core/apiCatalog/wxMethodsOpenStoreOrderDetailToWriteBLECharacteristicValue.ts
|
|
894
886
|
/**
|
|
895
887
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
896
888
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -1032,8 +1024,7 @@ const WEAPI_WX_METHODS_OPEN_STORE_ORDER_DETAIL_TO_WRITE_BLECHARACTERISTIC_VALUE
|
|
|
1032
1024
|
"vibrateShort",
|
|
1033
1025
|
"writeBLECharacteristicValue"
|
|
1034
1026
|
];
|
|
1035
|
-
|
|
1036
|
-
//#region src/core/apiCatalog/index.ts
|
|
1027
|
+
// src/core/apiCatalog/index.ts
|
|
1037
1028
|
const WEAPI_WECHAT_METHODS = [
|
|
1038
1029
|
...WEAPI_WX_METHODS_ADD_CARD_TO_HIDE_SHARE_MENU,
|
|
1039
1030
|
...WEAPI_WX_METHODS_HIDE_TAB_BAR_TO_OPEN_STORE_COUPON_DETAIL,
|
|
@@ -1042,5 +1033,4 @@ const WEAPI_WECHAT_METHODS = [
|
|
|
1042
1033
|
const WEAPI_ALIPAY_METHODS = WEAPI_MY_METHODS;
|
|
1043
1034
|
const WEAPI_DOUYIN_METHODS = WEAPI_TT_METHODS;
|
|
1044
1035
|
const WEAPI_MINIPROGRAM_METHODS = WEAPI_WECHAT_METHODS;
|
|
1045
|
-
//#endregion
|
|
1046
1036
|
export { WEAPI_WECHAT_METHODS as i, WEAPI_DOUYIN_METHODS as n, WEAPI_MINIPROGRAM_METHODS as r, WEAPI_ALIPAY_METHODS as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/core/miniProgramTypeSources.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* @description 微信小程序 API 原始适配器类型源
|
|
4
3
|
*/
|
|
@@ -48,8 +47,6 @@ type WeapiMiniProgramRuntimeRawAdapterSourceName = keyof WeapiMiniProgramRuntime
|
|
|
48
47
|
* @description 小程序原始适配器类型源名称(兼容层联合视图)
|
|
49
48
|
*/
|
|
50
49
|
type WeapiMiniProgramRawAdapterSourceName = WeapiMiniProgramPlatformRawAdapterSourceName | WeapiMiniProgramRuntimeRawAdapterSourceName;
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/core/miniProgramTypes.d.ts
|
|
53
50
|
/**
|
|
54
51
|
* @description 微信小程序 API 原始适配器类型
|
|
55
52
|
*/
|
|
@@ -138,8 +135,6 @@ type WeapiMiniProgramBluetoothError = WechatMiniprogram.BluetoothError;
|
|
|
138
135
|
* @description 小程序剪贴板读取结果类型(宿主中立别名)
|
|
139
136
|
*/
|
|
140
137
|
type WeapiMiniProgramClipboardDataResult = WechatMiniprogram.GetClipboardDataSuccessCallbackOption;
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region src/core/platformAdapters.d.ts
|
|
143
138
|
type MergeAdapters<Primary extends WeapiAdapter, Secondary extends WeapiAdapter> = Primary & Omit<Secondary, keyof Primary>;
|
|
144
139
|
/**
|
|
145
140
|
* @description 支付宝小程序 API 原始适配器类型
|
|
@@ -174,12 +169,8 @@ type WeapiMiniProgramCrossPlatformRawAdapter = MergeAdapters<MergeAdapters<Weapi
|
|
|
174
169
|
* @description weapi 对齐后的跨平台原始 API 类型
|
|
175
170
|
*/
|
|
176
171
|
type WeapiCrossPlatformRawAdapter = WeapiMiniProgramCrossPlatformRawAdapter;
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/core/nonPromisifiedMethods.d.ts
|
|
179
172
|
declare const WEAPI_NON_PROMISIFIED_METHOD_NAMES: readonly ["arrayBufferToBase64", "base64ToArrayBuffer", "cancelIdleCallback", "canIUse", "checkIsPictureInPictureActive", "createAnimation", "createAudioContext", "createBufferURL", "createCacheManager", "createCameraContext", "createCanvasContext", "createGlobalPayment", "createInferenceSession", "createInnerAudioContext", "createIntersectionObserver", "createInterstitialAd", "createLivePlayerContext", "createLivePusherContext", "createMapContext", "createMediaAudioPlayer", "createMediaContainer", "createMediaRecorder", "createOffscreenCanvas", "createRewardedVideoAd", "createSelectorQuery", "createTCPSocket", "createUDPSocket", "createVideoContext", "createVideoDecoder", "createVKSession", "createWebAudioContext", "createWorker", "getApiCategory", "getAppAuthorizeSetting", "getAppBaseInfo", "getBackgroundAudioManager", "getDeviceInfo", "getFileSystemManager", "getLogManager", "getMenuButtonBoundingClientRect", "getNFCAdapter", "getPerformance", "getPluginUpdateManager", "getRealtimeLogManager", "getRecorderManager", "getSystemSetting", "getUpdateManager", "getUserCryptoManager", "getWindowInfo", "getXrFrameSystem", "isVKSupport", "nextTick", "postMessageToReferrerMiniProgram", "postMessageToReferrerPage", "reportAnalytics", "reportEvent", "reportMonitor", "reportPerformance", "requestAppleSubscribeSign", "requestIdleCallback", "revokeBufferURL", "createEditorContext", "getOpenDataContext"];
|
|
180
173
|
type WeapiNonPromisifiedMethodName = typeof WEAPI_NON_PROMISIFIED_METHOD_NAMES[number];
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/core/promisify/index.d.ts
|
|
183
174
|
type WeapiAdapter = Record<string, any>;
|
|
184
175
|
/**
|
|
185
176
|
* @description weapi Promise 的通用错误类型
|
|
@@ -264,8 +255,6 @@ interface PromisifyCanvasMethod<Option extends object, TAdapter> {
|
|
|
264
255
|
(option: PromisifyOptionWithoutCallbacks<Option>, component?: WechatCanvasComponent): WeapiPromise<ExtractSuccessResult<Option>, PromisifyFailureResult<Option, TAdapter>>;
|
|
265
256
|
}
|
|
266
257
|
type WeapiPromisify<TAdapter extends WeapiAdapter> = { [Key in keyof TAdapter]: Key extends string ? Key extends `${string}Sync` ? TAdapter[Key] : Key extends WeapiNonPromisifiedMethodName ? TAdapter[Key] : Key extends `on${Capitalize<string>}` | `off${Capitalize<string>}` ? TAdapter[Key] : Key extends 'canvasGetImageData' ? TAdapter extends WeapiMiniProgramWechatRawAdapter ? PromisifyCanvasMethod<WechatMiniprogram.CanvasGetImageDataOption, TAdapter> : PromisifyMethod<TAdapter[Key], TAdapter> : Key extends 'canvasPutImageData' ? TAdapter extends WeapiMiniProgramWechatRawAdapter ? PromisifyCanvasMethod<WechatMiniprogram.CanvasPutImageDataOption, TAdapter> : PromisifyMethod<TAdapter[Key], TAdapter> : Key extends 'canvasToTempFilePath' ? TAdapter extends WeapiMiniProgramWechatRawAdapter ? PromisifyCanvasMethod<WechatMiniprogram.CanvasToTempFilePathOption, TAdapter> : PromisifyMethod<TAdapter[Key], TAdapter> : PromisifyMethod<TAdapter[Key], TAdapter> : TAdapter[Key]; };
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region src/core/types/methodDocsCanvasGetImageDataToOpenPrivacyContract/canvasGetImageDataToOpenChannelsActivity.d.ts
|
|
269
258
|
interface WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContractCanvasGetImageDataToOpenChannelsActivity {
|
|
270
259
|
/**
|
|
271
260
|
* 获取 canvas 区域像素数据。
|
|
@@ -455,8 +444,6 @@ interface WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContractCan
|
|
|
455
444
|
*/
|
|
456
445
|
openChannelsActivity: WeapiCrossPlatformAdapter['openChannelsActivity'];
|
|
457
446
|
}
|
|
458
|
-
//#endregion
|
|
459
|
-
//#region src/core/types/methodDocsCanvasGetImageDataToOpenPrivacyContract/openChannelsEventToOpenPrivacyContract.d.ts
|
|
460
447
|
interface WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContractOpenChannelsEventToOpenPrivacyContract {
|
|
461
448
|
/**
|
|
462
449
|
* 打开视频号活动详情。
|
|
@@ -646,11 +633,7 @@ interface WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContractOpe
|
|
|
646
633
|
*/
|
|
647
634
|
openPrivacyContract: WeapiCrossPlatformAdapter['openPrivacyContract'];
|
|
648
635
|
}
|
|
649
|
-
//#endregion
|
|
650
|
-
//#region src/core/types/methodDocsCanvasGetImageDataToOpenPrivacyContract/index.d.ts
|
|
651
636
|
type WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContract = WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContractCanvasGetImageDataToOpenChannelsActivity & WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContractOpenChannelsEventToOpenPrivacyContract;
|
|
652
|
-
//#endregion
|
|
653
|
-
//#region src/core/types/methodDocsChoosePoiToShareFileToGroup/choosePoiToGetChannelsLiveNoticeInfo.d.ts
|
|
654
637
|
interface WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroupChoosePoiToGetChannelsLiveNoticeInfo {
|
|
655
638
|
/**
|
|
656
639
|
* 选择兴趣点 POI。
|
|
@@ -840,8 +823,6 @@ interface WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroupChoosePoiToGetC
|
|
|
840
823
|
*/
|
|
841
824
|
getChannelsLiveNoticeInfo: WeapiCrossPlatformAdapter['getChannelsLiveNoticeInfo'];
|
|
842
825
|
}
|
|
843
|
-
//#endregion
|
|
844
|
-
//#region src/core/types/methodDocsChoosePoiToShareFileToGroup/getChannelsShareKeyToShareFileToGroup.d.ts
|
|
845
826
|
interface WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroupGetChannelsShareKeyToShareFileToGroup {
|
|
846
827
|
/**
|
|
847
828
|
* 获取视频号分享 key。
|
|
@@ -1031,11 +1012,7 @@ interface WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroupGetChannelsShar
|
|
|
1031
1012
|
*/
|
|
1032
1013
|
shareFileToGroup: WeapiCrossPlatformAdapter['shareFileToGroup'];
|
|
1033
1014
|
}
|
|
1034
|
-
//#endregion
|
|
1035
|
-
//#region src/core/types/methodDocsChoosePoiToShareFileToGroup/index.d.ts
|
|
1036
1015
|
type WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroup = WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroupChoosePoiToGetChannelsLiveNoticeInfo & WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroupGetChannelsShareKeyToShareFileToGroup;
|
|
1037
|
-
//#endregion
|
|
1038
|
-
//#region src/core/types/methodDocsChooseVideoToOpenDocument/chooseVideoToGetLogManager.d.ts
|
|
1039
1016
|
interface WeapiCrossPlatformMethodDocsChooseVideoToOpenDocumentChooseVideoToGetLogManager {
|
|
1040
1017
|
/**
|
|
1041
1018
|
* 选择视频。
|
|
@@ -1257,8 +1234,6 @@ interface WeapiCrossPlatformMethodDocsChooseVideoToOpenDocumentChooseVideoToGetL
|
|
|
1257
1234
|
*/
|
|
1258
1235
|
getLogManager: WeapiCrossPlatformAdapter['getLogManager'];
|
|
1259
1236
|
}
|
|
1260
|
-
//#endregion
|
|
1261
|
-
//#region src/core/types/methodDocsChooseVideoToOpenDocument/nextTickToOpenDocument.d.ts
|
|
1262
1237
|
interface WeapiCrossPlatformMethodDocsChooseVideoToOpenDocumentNextTickToOpenDocument {
|
|
1263
1238
|
/**
|
|
1264
1239
|
* 延迟到下一个 UI 更新时机执行回调。
|
|
@@ -1529,11 +1504,7 @@ interface WeapiCrossPlatformMethodDocsChooseVideoToOpenDocumentNextTickToOpenDoc
|
|
|
1529
1504
|
*/
|
|
1530
1505
|
openDocument: WeapiCrossPlatformAdapter['openDocument'];
|
|
1531
1506
|
}
|
|
1532
|
-
//#endregion
|
|
1533
|
-
//#region src/core/types/methodDocsChooseVideoToOpenDocument/index.d.ts
|
|
1534
1507
|
type WeapiCrossPlatformMethodDocsChooseVideoToOpenDocument = WeapiCrossPlatformMethodDocsChooseVideoToOpenDocumentChooseVideoToGetLogManager & WeapiCrossPlatformMethodDocsChooseVideoToOpenDocumentNextTickToOpenDocument;
|
|
1535
|
-
//#endregion
|
|
1536
|
-
//#region src/core/types/methodDocsCreateVideoDecoderToSetInnerAudioOption.d.ts
|
|
1537
1508
|
interface WeapiCrossPlatformMethodDocsCreateVideoDecoderToSetInnerAudioOption {
|
|
1538
1509
|
/**
|
|
1539
1510
|
* 创建视频解码器。
|
|
@@ -1689,8 +1660,6 @@ interface WeapiCrossPlatformMethodDocsCreateVideoDecoderToSetInnerAudioOption {
|
|
|
1689
1660
|
*/
|
|
1690
1661
|
setInnerAudioOption: WeapiCrossPlatformAdapter['setInnerAudioOption'];
|
|
1691
1662
|
}
|
|
1692
|
-
//#endregion
|
|
1693
|
-
//#region src/core/types/methodDocsGetRealtimeLogManagerToCreateUDPSocket/getRealtimeLogManagerToIsBluetoothDevicePaired.d.ts
|
|
1694
1663
|
interface WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocketGetRealtimeLogManagerToIsBluetoothDevicePaired {
|
|
1695
1664
|
/**
|
|
1696
1665
|
* 获取实时日志管理器。
|
|
@@ -1880,8 +1849,6 @@ interface WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocketGetR
|
|
|
1880
1849
|
*/
|
|
1881
1850
|
isBluetoothDevicePaired: WeapiCrossPlatformAdapter['isBluetoothDevicePaired'];
|
|
1882
1851
|
}
|
|
1883
|
-
//#endregion
|
|
1884
|
-
//#region src/core/types/methodDocsGetRealtimeLogManagerToCreateUDPSocket/isVKSupportToCreateUDPSocket.d.ts
|
|
1885
1852
|
interface WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocketIsVKSupportToCreateUDPSocket {
|
|
1886
1853
|
/**
|
|
1887
1854
|
* 判断是否支持视觉识别能力。
|
|
@@ -2071,11 +2038,7 @@ interface WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocketIsVK
|
|
|
2071
2038
|
*/
|
|
2072
2039
|
createUDPSocket: WeapiCrossPlatformAdapter['createUDPSocket'];
|
|
2073
2040
|
}
|
|
2074
|
-
//#endregion
|
|
2075
|
-
//#region src/core/types/methodDocsGetRealtimeLogManagerToCreateUDPSocket/index.d.ts
|
|
2076
2041
|
type WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocket = WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocketGetRealtimeLogManagerToIsBluetoothDevicePaired & WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocketIsVKSupportToCreateUDPSocket;
|
|
2077
|
-
//#endregion
|
|
2078
|
-
//#region src/core/types/methodDocsMissingMethods/arrayBufferToBase64ToCreateCanvasContext.d.ts
|
|
2079
2042
|
interface WeapiCrossPlatformMethodDocsMissingMethodsArrayBufferToBase64ToCreateCanvasContext {
|
|
2080
2043
|
/**
|
|
2081
2044
|
* 对应微信小程序 `wx.arrayBufferToBase64` 的 API。
|
|
@@ -2334,8 +2297,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsArrayBufferToBase64ToCreateC
|
|
|
2334
2297
|
*/
|
|
2335
2298
|
createCanvasContext: WeapiCrossPlatformAdapter['createCanvasContext'];
|
|
2336
2299
|
}
|
|
2337
|
-
//#endregion
|
|
2338
|
-
//#region src/core/types/methodDocsMissingMethods/createInnerAudioContextToGetBLEMTU.d.ts
|
|
2339
2300
|
interface WeapiCrossPlatformMethodDocsMissingMethodsCreateInnerAudioContextToGetBLEMTU {
|
|
2340
2301
|
/**
|
|
2341
2302
|
* 对应微信小程序 `wx.createInnerAudioContext` 的 API。
|
|
@@ -2572,8 +2533,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsCreateInnerAudioContextToGet
|
|
|
2572
2533
|
*/
|
|
2573
2534
|
getBLEMTU: WeapiCrossPlatformAdapter['getBLEMTU'];
|
|
2574
2535
|
}
|
|
2575
|
-
//#endregion
|
|
2576
|
-
//#region src/core/types/methodDocsMissingMethods/getBackgroundAudioManagerToGetMenuButtonBoundingClientRect.d.ts
|
|
2577
2536
|
interface WeapiCrossPlatformMethodDocsMissingMethodsGetBackgroundAudioManagerToGetMenuButtonBoundingClientRect {
|
|
2578
2537
|
/**
|
|
2579
2538
|
* 对应微信小程序 `wx.getBackgroundAudioManager` 的 API。
|
|
@@ -2821,8 +2780,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsGetBackgroundAudioManagerToG
|
|
|
2821
2780
|
*/
|
|
2822
2781
|
getMenuButtonBoundingClientRect: WeapiCrossPlatformAdapter['getMenuButtonBoundingClientRect'];
|
|
2823
2782
|
}
|
|
2824
|
-
//#endregion
|
|
2825
|
-
//#region src/core/types/methodDocsMissingMethods/getRecorderManagerToHideShareMenu.d.ts
|
|
2826
2783
|
interface WeapiCrossPlatformMethodDocsMissingMethodsGetRecorderManagerToHideShareMenu {
|
|
2827
2784
|
/**
|
|
2828
2785
|
* 对应微信小程序 `wx.getRecorderManager` 的 API。
|
|
@@ -3038,8 +2995,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsGetRecorderManagerToHideShar
|
|
|
3038
2995
|
*/
|
|
3039
2996
|
hideShareMenu: WeapiCrossPlatformAdapter['hideShareMenu'];
|
|
3040
2997
|
}
|
|
3041
|
-
//#endregion
|
|
3042
|
-
//#region src/core/types/methodDocsMissingMethods/hideTabBarToOffAppHide.d.ts
|
|
3043
2998
|
interface WeapiCrossPlatformMethodDocsMissingMethodsHideTabBarToOffAppHide {
|
|
3044
2999
|
/**
|
|
3045
3000
|
* 对应微信小程序 `wx.hideTabBar` 的 API。
|
|
@@ -3267,8 +3222,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsHideTabBarToOffAppHide {
|
|
|
3267
3222
|
*/
|
|
3268
3223
|
offAppHide: WeapiCrossPlatformAdapter['offAppHide'];
|
|
3269
3224
|
}
|
|
3270
|
-
//#endregion
|
|
3271
|
-
//#region src/core/types/methodDocsMissingMethods/offAppRouteToOffBluetoothDeviceFound.d.ts
|
|
3272
3225
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOffAppRouteToOffBluetoothDeviceFound {
|
|
3273
3226
|
/**
|
|
3274
3227
|
* 对应微信小程序 `wx.offAppRoute` 的 API。
|
|
@@ -3499,8 +3452,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOffAppRouteToOffBluetoothDev
|
|
|
3499
3452
|
*/
|
|
3500
3453
|
offBluetoothDeviceFound: WeapiCrossPlatformAdapter['offBluetoothDeviceFound'];
|
|
3501
3454
|
}
|
|
3502
|
-
//#endregion
|
|
3503
|
-
//#region src/core/types/methodDocsMissingMethods/offCompassChangeToOffLocalServiceLost.d.ts
|
|
3504
3455
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOffCompassChangeToOffLocalServiceLost {
|
|
3505
3456
|
/**
|
|
3506
3457
|
* 对应微信小程序 `wx.offCompassChange` 的 API。
|
|
@@ -3731,8 +3682,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOffCompassChangeToOffLocalSe
|
|
|
3731
3682
|
*/
|
|
3732
3683
|
offLocalServiceLost: WeapiCrossPlatformAdapter['offLocalServiceLost'];
|
|
3733
3684
|
}
|
|
3734
|
-
//#endregion
|
|
3735
|
-
//#region src/core/types/methodDocsMissingMethods/offLocalServiceResolveFailToOffVoIPChatInterrupted.d.ts
|
|
3736
3685
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOffLocalServiceResolveFailToOffVoIPChatInterrupted {
|
|
3737
3686
|
/**
|
|
3738
3687
|
* 对应微信小程序 `wx.offLocalServiceResolveFail` 的 API。
|
|
@@ -3900,8 +3849,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOffLocalServiceResolveFailTo
|
|
|
3900
3849
|
*/
|
|
3901
3850
|
offVoIPChatInterrupted: WeapiCrossPlatformAdapter['offVoIPChatInterrupted'];
|
|
3902
3851
|
}
|
|
3903
|
-
//#endregion
|
|
3904
|
-
//#region src/core/types/methodDocsMissingMethods/offVoIPChatMembersChangedToOnAudioInterruptionBegin.d.ts
|
|
3905
3852
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOffVoIPChatMembersChangedToOnAudioInterruptionBegin {
|
|
3906
3853
|
/**
|
|
3907
3854
|
* 对应微信小程序 `wx.offVoIPChatMembersChanged` 的 API。
|
|
@@ -4089,8 +4036,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOffVoIPChatMembersChangedToO
|
|
|
4089
4036
|
*/
|
|
4090
4037
|
onAudioInterruptionBegin: WeapiCrossPlatformAdapter['onAudioInterruptionBegin'];
|
|
4091
4038
|
}
|
|
4092
|
-
//#endregion
|
|
4093
|
-
//#region src/core/types/methodDocsMissingMethods/onAudioInterruptionEndToOnBluetoothDeviceFound.d.ts
|
|
4094
4039
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOnAudioInterruptionEndToOnBluetoothDeviceFound {
|
|
4095
4040
|
/**
|
|
4096
4041
|
* 对应微信小程序 `wx.onAudioInterruptionEnd` 的 API。
|
|
@@ -4309,8 +4254,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOnAudioInterruptionEndToOnBl
|
|
|
4309
4254
|
*/
|
|
4310
4255
|
onBluetoothDeviceFound: WeapiCrossPlatformAdapter['onBluetoothDeviceFound'];
|
|
4311
4256
|
}
|
|
4312
|
-
//#endregion
|
|
4313
|
-
//#region src/core/types/methodDocsMissingMethods/onCompassChangeToOnLocalServiceLost.d.ts
|
|
4314
4257
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOnCompassChangeToOnLocalServiceLost {
|
|
4315
4258
|
/**
|
|
4316
4259
|
* 对应微信小程序 `wx.onCompassChange` 的 API。
|
|
@@ -4529,8 +4472,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOnCompassChangeToOnLocalServ
|
|
|
4529
4472
|
*/
|
|
4530
4473
|
onLocalServiceLost: WeapiCrossPlatformAdapter['onLocalServiceLost'];
|
|
4531
4474
|
}
|
|
4532
|
-
//#endregion
|
|
4533
|
-
//#region src/core/types/methodDocsMissingMethods/onLocalServiceResolveFailToOnSocketOpen.d.ts
|
|
4534
4475
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOnLocalServiceResolveFailToOnSocketOpen {
|
|
4535
4476
|
/**
|
|
4536
4477
|
* 对应微信小程序 `wx.onLocalServiceResolveFail` 的 API。
|
|
@@ -4716,8 +4657,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOnLocalServiceResolveFailToO
|
|
|
4716
4657
|
*/
|
|
4717
4658
|
onSocketOpen: WeapiCrossPlatformAdapter['onSocketOpen'];
|
|
4718
4659
|
}
|
|
4719
|
-
//#endregion
|
|
4720
|
-
//#region src/core/types/methodDocsMissingMethods/onThemeChangeToOpenSetting.d.ts
|
|
4721
4660
|
interface WeapiCrossPlatformMethodDocsMissingMethodsOnThemeChangeToOpenSetting {
|
|
4722
4661
|
/**
|
|
4723
4662
|
* 对应微信小程序 `wx.onThemeChange` 的 API。
|
|
@@ -4963,8 +4902,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsOnThemeChangeToOpenSetting {
|
|
|
4963
4902
|
*/
|
|
4964
4903
|
openSetting: WeapiCrossPlatformAdapter['openSetting'];
|
|
4965
4904
|
}
|
|
4966
|
-
//#endregion
|
|
4967
|
-
//#region src/core/types/methodDocsMissingMethods/pageScrollToToSetNavigationBarTitle.d.ts
|
|
4968
4905
|
interface WeapiCrossPlatformMethodDocsMissingMethodsPageScrollToToSetNavigationBarTitle {
|
|
4969
4906
|
/**
|
|
4970
4907
|
* 对应微信小程序 `wx.pageScrollTo` 的 API。
|
|
@@ -5214,8 +5151,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsPageScrollToToSetNavigationB
|
|
|
5214
5151
|
*/
|
|
5215
5152
|
setNavigationBarTitle: WeapiCrossPlatformAdapter['setNavigationBarTitle'];
|
|
5216
5153
|
}
|
|
5217
|
-
//#endregion
|
|
5218
|
-
//#region src/core/types/methodDocsMissingMethods/setScreenBrightnessToStartCompass.d.ts
|
|
5219
5154
|
interface WeapiCrossPlatformMethodDocsMissingMethodsSetScreenBrightnessToStartCompass {
|
|
5220
5155
|
/**
|
|
5221
5156
|
* 对应微信小程序 `wx.setScreenBrightness` 的 API。
|
|
@@ -5412,8 +5347,6 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsSetScreenBrightnessToStartCo
|
|
|
5412
5347
|
*/
|
|
5413
5348
|
startCompass: WeapiCrossPlatformAdapter['startCompass'];
|
|
5414
5349
|
}
|
|
5415
|
-
//#endregion
|
|
5416
|
-
//#region src/core/types/methodDocsMissingMethods/startGyroscopeToWriteBLECharacteristicValue.d.ts
|
|
5417
5350
|
interface WeapiCrossPlatformMethodDocsMissingMethodsStartGyroscopeToWriteBLECharacteristicValue {
|
|
5418
5351
|
/**
|
|
5419
5352
|
* 对应微信小程序 `wx.startGyroscope` 的 API。
|
|
@@ -5612,11 +5545,7 @@ interface WeapiCrossPlatformMethodDocsMissingMethodsStartGyroscopeToWriteBLEChar
|
|
|
5612
5545
|
*/
|
|
5613
5546
|
writeBLECharacteristicValue: WeapiCrossPlatformAdapter['writeBLECharacteristicValue'];
|
|
5614
5547
|
}
|
|
5615
|
-
//#endregion
|
|
5616
|
-
//#region src/core/types/methodDocsMissingMethods/index.d.ts
|
|
5617
5548
|
type WeapiCrossPlatformMethodDocsMissingMethods = WeapiCrossPlatformMethodDocsMissingMethodsArrayBufferToBase64ToCreateCanvasContext & WeapiCrossPlatformMethodDocsMissingMethodsCreateInnerAudioContextToGetBLEMTU & WeapiCrossPlatformMethodDocsMissingMethodsGetBackgroundAudioManagerToGetMenuButtonBoundingClientRect & WeapiCrossPlatformMethodDocsMissingMethodsGetRecorderManagerToHideShareMenu & WeapiCrossPlatformMethodDocsMissingMethodsHideTabBarToOffAppHide & WeapiCrossPlatformMethodDocsMissingMethodsOffAppRouteToOffBluetoothDeviceFound & WeapiCrossPlatformMethodDocsMissingMethodsOffCompassChangeToOffLocalServiceLost & WeapiCrossPlatformMethodDocsMissingMethodsOffLocalServiceResolveFailToOffVoIPChatInterrupted & WeapiCrossPlatformMethodDocsMissingMethodsOffVoIPChatMembersChangedToOnAudioInterruptionBegin & WeapiCrossPlatformMethodDocsMissingMethodsOnAudioInterruptionEndToOnBluetoothDeviceFound & WeapiCrossPlatformMethodDocsMissingMethodsOnCompassChangeToOnLocalServiceLost & WeapiCrossPlatformMethodDocsMissingMethodsOnLocalServiceResolveFailToOnSocketOpen & WeapiCrossPlatformMethodDocsMissingMethodsOnThemeChangeToOpenSetting & WeapiCrossPlatformMethodDocsMissingMethodsPageScrollToToSetNavigationBarTitle & WeapiCrossPlatformMethodDocsMissingMethodsSetScreenBrightnessToStartCompass & WeapiCrossPlatformMethodDocsMissingMethodsStartGyroscopeToWriteBLECharacteristicValue;
|
|
5618
|
-
//#endregion
|
|
5619
|
-
//#region src/core/types/methodDocsOpenSystemBluetoothSettingToChooseLicensePlate/openSystemBluetoothSettingToPauseVoice.d.ts
|
|
5620
5549
|
interface WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicensePlateOpenSystemBluetoothSettingToPauseVoice {
|
|
5621
5550
|
/**
|
|
5622
5551
|
* 打开系统蓝牙设置页面。
|
|
@@ -5806,8 +5735,6 @@ interface WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicenseP
|
|
|
5806
5735
|
*/
|
|
5807
5736
|
pauseVoice: WeapiCrossPlatformAdapter['pauseVoice'];
|
|
5808
5737
|
}
|
|
5809
|
-
//#endregion
|
|
5810
|
-
//#region src/core/types/methodDocsOpenSystemBluetoothSettingToChooseLicensePlate/playBackgroundAudioToChooseLicensePlate.d.ts
|
|
5811
5738
|
interface WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicensePlatePlayBackgroundAudioToChooseLicensePlate {
|
|
5812
5739
|
/**
|
|
5813
5740
|
* 播放后台音频。
|
|
@@ -5997,11 +5924,7 @@ interface WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicenseP
|
|
|
5997
5924
|
*/
|
|
5998
5925
|
chooseLicensePlate: WeapiCrossPlatformAdapter['chooseLicensePlate'];
|
|
5999
5926
|
}
|
|
6000
|
-
//#endregion
|
|
6001
|
-
//#region src/core/types/methodDocsOpenSystemBluetoothSettingToChooseLicensePlate/index.d.ts
|
|
6002
5927
|
type WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicensePlate = WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicensePlateOpenSystemBluetoothSettingToPauseVoice & WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicensePlatePlayBackgroundAudioToChooseLicensePlate;
|
|
6003
|
-
//#endregion
|
|
6004
|
-
//#region src/core/types/methodDocsPluginLoginToGetAppBaseInfo/pluginLoginToRequestPluginPayment.d.ts
|
|
6005
5928
|
interface WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfoPluginLoginToRequestPluginPayment {
|
|
6006
5929
|
/**
|
|
6007
5930
|
* 插件登录。
|
|
@@ -6240,8 +6163,6 @@ interface WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfoPluginLoginToRe
|
|
|
6240
6163
|
*/
|
|
6241
6164
|
requestPluginPayment: WeapiCrossPlatformAdapter['requestPluginPayment'];
|
|
6242
6165
|
}
|
|
6243
|
-
//#endregion
|
|
6244
|
-
//#region src/core/types/methodDocsPluginLoginToGetAppBaseInfo/requestVirtualPaymentToGetAppBaseInfo.d.ts
|
|
6245
6166
|
interface WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfoRequestVirtualPaymentToGetAppBaseInfo {
|
|
6246
6167
|
/**
|
|
6247
6168
|
* 发起虚拟支付。
|
|
@@ -6504,11 +6425,7 @@ interface WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfoRequestVirtualP
|
|
|
6504
6425
|
*/
|
|
6505
6426
|
getAppBaseInfo: WeapiCrossPlatformAdapter['getAppBaseInfo'];
|
|
6506
6427
|
}
|
|
6507
|
-
//#endregion
|
|
6508
|
-
//#region src/core/types/methodDocsPluginLoginToGetAppBaseInfo/index.d.ts
|
|
6509
6428
|
type WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfo = WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfoPluginLoginToRequestPluginPayment & WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfoRequestVirtualPaymentToGetAppBaseInfo;
|
|
6510
|
-
//#endregion
|
|
6511
|
-
//#region src/core/types/methodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPass/addFileToFavoritesToCanAddSecureElementPass.d.ts
|
|
6512
6429
|
interface WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPassAddFileToFavoritesToCanAddSecureElementPass {
|
|
6513
6430
|
/**
|
|
6514
6431
|
* 添加文件到收藏。
|
|
@@ -6698,8 +6615,6 @@ interface WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElemen
|
|
|
6698
6615
|
*/
|
|
6699
6616
|
canAddSecureElementPass: WeapiCrossPlatformAdapter['canAddSecureElementPass'];
|
|
6700
6617
|
}
|
|
6701
|
-
//#endregion
|
|
6702
|
-
//#region src/core/types/methodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPass/saveVideoToPhotosAlbumToAddCard.d.ts
|
|
6703
6618
|
interface WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPassSaveVideoToPhotosAlbumToAddCard {
|
|
6704
6619
|
/**
|
|
6705
6620
|
* 保存视频到系统相册。
|
|
@@ -6899,11 +6814,7 @@ interface WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElemen
|
|
|
6899
6814
|
*/
|
|
6900
6815
|
addCard: WeapiCrossPlatformAdapter['addCard'];
|
|
6901
6816
|
}
|
|
6902
|
-
//#endregion
|
|
6903
|
-
//#region src/core/types/methodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPass/index.d.ts
|
|
6904
6817
|
type WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPass = WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPassSaveVideoToPhotosAlbumToAddCard & WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPassAddFileToFavoritesToCanAddSecureElementPass;
|
|
6905
|
-
//#endregion
|
|
6906
|
-
//#region src/core/types/methodDocsSendHCEMessageToGetRandomValues/sendHCEMessageToStopVoice.d.ts
|
|
6907
6818
|
interface WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValuesSendHCEMessageToStopVoice {
|
|
6908
6819
|
/**
|
|
6909
6820
|
* 发送 HCE 消息。
|
|
@@ -7093,8 +7004,6 @@ interface WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValuesSendHCEMess
|
|
|
7093
7004
|
*/
|
|
7094
7005
|
stopVoice: WeapiCrossPlatformAdapter['stopVoice'];
|
|
7095
7006
|
}
|
|
7096
|
-
//#endregion
|
|
7097
|
-
//#region src/core/types/methodDocsSendHCEMessageToGetRandomValues/subscribeVoIPVideoMembersToGetRandomValues.d.ts
|
|
7098
7007
|
interface WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValuesSubscribeVoIPVideoMembersToGetRandomValues {
|
|
7099
7008
|
/**
|
|
7100
7009
|
* 订阅 VoIP 视频成员变化。
|
|
@@ -7284,11 +7193,7 @@ interface WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValuesSubscribeVo
|
|
|
7284
7193
|
*/
|
|
7285
7194
|
getRandomValues: WeapiCrossPlatformAdapter['getRandomValues'];
|
|
7286
7195
|
}
|
|
7287
|
-
//#endregion
|
|
7288
|
-
//#region src/core/types/methodDocsSendHCEMessageToGetRandomValues/index.d.ts
|
|
7289
7196
|
type WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValues = WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValuesSendHCEMessageToStopVoice & WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValuesSubscribeVoIPVideoMembersToGetRandomValues;
|
|
7290
|
-
//#endregion
|
|
7291
|
-
//#region src/core/types/methodDocsShareImageToGroupToSelectGroupMembers/shareImageToGroupToStartLocationUpdateBackground.d.ts
|
|
7292
7197
|
interface WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembersShareImageToGroupToStartLocationUpdateBackground {
|
|
7293
7198
|
/**
|
|
7294
7199
|
* 分享图片到群。
|
|
@@ -7478,8 +7383,6 @@ interface WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembersShare
|
|
|
7478
7383
|
*/
|
|
7479
7384
|
startLocationUpdateBackground: WeapiCrossPlatformAdapter['startLocationUpdateBackground'];
|
|
7480
7385
|
}
|
|
7481
|
-
//#endregion
|
|
7482
|
-
//#region src/core/types/methodDocsShareImageToGroupToSelectGroupMembers/startRecordToSelectGroupMembers.d.ts
|
|
7483
7386
|
interface WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembersStartRecordToSelectGroupMembers {
|
|
7484
7387
|
/**
|
|
7485
7388
|
* 开始录音。
|
|
@@ -7669,11 +7572,7 @@ interface WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembersStart
|
|
|
7669
7572
|
*/
|
|
7670
7573
|
selectGroupMembers: WeapiCrossPlatformAdapter['selectGroupMembers'];
|
|
7671
7574
|
}
|
|
7672
|
-
//#endregion
|
|
7673
|
-
//#region src/core/types/methodDocsShareImageToGroupToSelectGroupMembers/index.d.ts
|
|
7674
7575
|
type WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembers = WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembersShareImageToGroupToStartLocationUpdateBackground & WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembersStartRecordToSelectGroupMembers;
|
|
7675
|
-
//#endregion
|
|
7676
|
-
//#region src/core/types/methodDocsShowToastToOpenAppAuthorizeSetting/createLivePlayerContextToOpenAppAuthorizeSetting.d.ts
|
|
7677
7576
|
interface WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSettingCreateLivePlayerContextToOpenAppAuthorizeSetting {
|
|
7678
7577
|
/**
|
|
7679
7578
|
* 创建直播播放器上下文。
|
|
@@ -7917,8 +7816,6 @@ interface WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSettingCreateLi
|
|
|
7917
7816
|
*/
|
|
7918
7817
|
openAppAuthorizeSetting: WeapiCrossPlatformAdapter['openAppAuthorizeSetting'];
|
|
7919
7818
|
}
|
|
7920
|
-
//#endregion
|
|
7921
|
-
//#region src/core/types/methodDocsShowToastToOpenAppAuthorizeSetting/showToastToCreateRewardedVideoAd.d.ts
|
|
7922
7819
|
interface WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSettingShowToastToCreateRewardedVideoAd {
|
|
7923
7820
|
/**
|
|
7924
7821
|
* 显示消息提示框。
|
|
@@ -8206,14 +8103,8 @@ interface WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSettingShowToas
|
|
|
8206
8103
|
*/
|
|
8207
8104
|
createRewardedVideoAd: WeapiCrossPlatformAdapter['createRewardedVideoAd'];
|
|
8208
8105
|
}
|
|
8209
|
-
//#endregion
|
|
8210
|
-
//#region src/core/types/methodDocsShowToastToOpenAppAuthorizeSetting/index.d.ts
|
|
8211
8106
|
type WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSetting = WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSettingShowToastToCreateRewardedVideoAd & WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSettingCreateLivePlayerContextToOpenAppAuthorizeSetting;
|
|
8212
|
-
//#endregion
|
|
8213
|
-
//#region src/core/types/methodDocs.d.ts
|
|
8214
8107
|
type WeapiCrossPlatformMethodDocs = WeapiCrossPlatformMethodDocsShowToastToOpenAppAuthorizeSetting & WeapiCrossPlatformMethodDocsPluginLoginToGetAppBaseInfo & WeapiCrossPlatformMethodDocsChooseVideoToOpenDocument & WeapiCrossPlatformMethodDocsSaveVideoToPhotosAlbumToCanAddSecureElementPass & WeapiCrossPlatformMethodDocsCanvasGetImageDataToOpenPrivacyContract & WeapiCrossPlatformMethodDocsOpenSystemBluetoothSettingToChooseLicensePlate & WeapiCrossPlatformMethodDocsChoosePoiToShareFileToGroup & WeapiCrossPlatformMethodDocsShareImageToGroupToSelectGroupMembers & WeapiCrossPlatformMethodDocsSendHCEMessageToGetRandomValues & WeapiCrossPlatformMethodDocsGetRealtimeLogManagerToCreateUDPSocket & WeapiCrossPlatformMethodDocsCreateVideoDecoderToSetInnerAudioOption & WeapiCrossPlatformMethodDocsMissingMethods;
|
|
8215
|
-
//#endregion
|
|
8216
|
-
//#region src/core/types.d.ts
|
|
8217
8108
|
/**
|
|
8218
8109
|
* @description 微信小程序 API 适配器类型
|
|
8219
8110
|
*/
|
|
@@ -8346,14 +8237,10 @@ type WeapiInstance<TAdapter extends WeapiAdapter = WeapiCrossPlatformRawAdapter>
|
|
|
8346
8237
|
*/
|
|
8347
8238
|
supports: (method: string, options?: WeapiMethodSupportQueryOptions) => boolean;
|
|
8348
8239
|
};
|
|
8349
|
-
//#endregion
|
|
8350
|
-
//#region src/core/createWeapi.d.ts
|
|
8351
8240
|
/**
|
|
8352
8241
|
* @description 创建跨平台 API 实例
|
|
8353
8242
|
*/
|
|
8354
8243
|
declare function createWeapi<TAdapter extends WeapiAdapter = WeapiCrossPlatformRawAdapter>(options?: CreateWeapiOptions<TAdapter>): WeapiInstance<TAdapter>;
|
|
8355
|
-
//#endregion
|
|
8356
|
-
//#region src/core/apiCatalog/typeSources.d.ts
|
|
8357
8244
|
/**
|
|
8358
8245
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
8359
8246
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -8420,8 +8307,6 @@ declare const WEAPI_RUNTIME_TYPE_SOURCES: {
|
|
|
8420
8307
|
readonly version: "1.3.1";
|
|
8421
8308
|
};
|
|
8422
8309
|
};
|
|
8423
|
-
//#endregion
|
|
8424
|
-
//#region src/core/apiCatalog/index.d.ts
|
|
8425
8310
|
declare const WEAPI_WECHAT_METHODS: readonly ["addCard", "addFileToFavorites", "addPaymentPassFinish", "addPaymentPassGetCertificateData", "addPhoneCalendar", "addPhoneContact", "addPhoneRepeatCalendar", "addVideoToFavorites", "arrayBufferToBase64", "authorize", "authorizeForMiniProgram", "authPrivateMessage", "base64ToArrayBuffer", "batchGetStorage", "batchGetStorageSync", "batchSetStorage", "batchSetStorageSync", "bindEmployeeRelation", "canAddSecureElementPass", "cancelIdleCallback", "canIUse", "canvasGetImageData", "canvasPutImageData", "canvasToTempFilePath", "checkDeviceSupportHevc", "checkEmployeeRelation", "checkIsAddedToMyMiniProgram", "checkIsOpenAccessibility", "checkIsPictureInPictureActive", "checkIsSoterEnrolledInDevice", "checkIsSupportFacialRecognition", "checkIsSupportSoterAuthentication", "checkSession", "checkTransitCardSupport", "chooseAddress", "chooseContact", "chooseImage", "chooseInvoice", "chooseInvoiceTitle", "chooseLicensePlate", "chooseLocation", "chooseMedia", "chooseMessageFile", "choosePoi", "chooseVideo", "clearStorage", "clearStorageSync", "closeBLEConnection", "closeBluetoothAdapter", "closeSocket", "compressImage", "compressVideo", "connectSocket", "connectWifi", "createAnimation", "createAudioContext", "createBLEConnection", "createBLEPeripheralServer", "createBufferURL", "createCacheManager", "createCameraContext", "createCanvasContext", "createGlobalPayment", "createInferenceSession", "createInnerAudioContext", "createIntersectionObserver", "createInterstitialAd", "createLivePlayerContext", "createLivePusherContext", "createMapContext", "createMediaAudioPlayer", "createMediaContainer", "createMediaRecorder", "createOffscreenCanvas", "createRewardedVideoAd", "createSelectorQuery", "createTCPSocket", "createUDPSocket", "createVideoContext", "createVideoDecoder", "createVKSession", "createWebAudioContext", "createWorker", "cropImage", "deleteTransitCard", "disableAlertBeforeUnload", "downloadFile", "editImage", "enableAlertBeforeUnload", "enterChatToolMode", "exitMiniProgram", "exitVoIPChat", "faceDetect", "getAccountInfoSync", "getApiCategory", "getAppAuthorizeSetting", "getAppBaseInfo", "getAvailableAudioSources", "getBackgroundAudioManager", "getBackgroundAudioPlayerState", "getBackgroundFetchData", "getBackgroundFetchToken", "getBatteryInfo", "getBatteryInfoSync", "getBeacons", "getBLEDeviceCharacteristics", "getBLEDeviceRSSI", "getBLEDeviceServices", "getBLEMTU", "getBluetoothAdapterState", "getBluetoothDevices", "getChannelsLiveInfo", "getChannelsLiveNoticeInfo", "getChannelsShareKey", "getChatToolInfo", "getClipboardData", "getCommonConfig", "getConnectedBluetoothDevices", "getConnectedWifi", "getDeviceBenchmarkInfo", "getDeviceInfo", "getDeviceVoIPList", "getEnterOptionsSync", "getExptInfoSync", "getExtConfig", "getExtConfigSync", "getFileSystemManager", "getFuzzyLocation", "getGroupEnterInfo", "getHCEState", "getImageInfo", "getInferenceEnvInfo", "getLaunchOptionsSync", "getLocalIPAddress", "getLocation", "getLogManager", "getMenuButtonBoundingClientRect", "getNetworkType", "getNFCAdapter", "getPerformance", "getPluginUpdateManager", "getPrivacySetting", "getRandomValues", "getRealtimeLogManager", "getRecorderManager", "getRendererUserAgent", "getScreenBrightness", "getScreenRecordingState", "getSecureElementPasses", "getSelectedTextRange", "getSetting", "getShareInfo", "getShowSplashAdStatus", "getSkylineInfo", "getSkylineInfoSync", "getStorage", "getStorageInfo", "getStorageInfoSync", "getStorageSync", "getSystemInfo", "getSystemInfoAsync", "getSystemInfoSync", "getSystemSetting", "getTransitCardCPLC", "getTransitCardInfo", "getTransitCardList", "getUpdateManager", "getUserCryptoManager", "getUserInfo", "getUserProfile", "getVideoInfo", "getWeRunData", "getWifiList", "getWindowInfo", "getXrFrameSystem", "hideHomeButton", "hideKeyboard", "hideLoading", "hideNavigationBarLoading", "hideShareMenu", "hideTabBar", "hideTabBarRedDot", "hideToast", "initFaceDetect", "isBluetoothDevicePaired", "issueTransitCard", "isVKSupport", "join1v1Chat", "joinVoIPChat", "jumpToOfflinePay", "loadBuiltInFontFace", "loadFontFace", "login", "makeBluetoothPair", "makePhoneCall", "navigateBack", "navigateBackMiniProgram", "navigateTo", "navigateToMiniProgram", "nextTick", "notifyBLECharacteristicValueChange", "notifyGroupMembers", "offAccelerometerChange", "offAfterPageLoad", "offAfterPageUnload", "offApiCategoryChange", "offAppHide", "offAppRoute", "offAppRouteDone", "offAppShow", "offAudioInterruptionBegin", "offAudioInterruptionEnd", "offBatteryInfoChange", "offBeaconServiceChange", "offBeaconUpdate", "offBeforeAppRoute", "offBeforePageLoad", "offBeforePageUnload", "offBLECharacteristicValueChange", "offBLEConnectionStateChange", "offBLEMTUChange", "offBLEPeripheralConnectionStateChanged", "offBluetoothAdapterStateChange", "offBluetoothDeviceFound", "offCompassChange", "offCopyUrl", "offDeviceMotionChange", "offEmbeddedMiniProgramHeightChange", "offError", "offGeneratePoster", "offGetWifiList", "offGyroscopeChange", "offHCEMessage", "offKeyboardHeightChange", "offKeyDown", "offKeyUp", "offLazyLoadError", "offLocalServiceDiscoveryStop", "offLocalServiceFound", "offLocalServiceLost", "offLocalServiceResolveFail", "offLocationChange", "offLocationChangeError", "offMemoryWarning", "offMenuButtonBoundingClientRectWeightChange", "offNetworkStatusChange", "offNetworkWeakChange", "offPageNotFound", "offParallelStateChange", "offScreenRecordingStateChanged", "offThemeChange", "offUnhandledRejection", "offUserCaptureScreen", "offUserOffTranslation", "offUserTriggerTranslation", "offVoIPChatInterrupted", "offVoIPChatMembersChanged", "offVoIPChatSpeakersChanged", "offVoIPChatStateChanged", "offVoIPVideoMembersChanged", "offWifiConnected", "offWifiConnectedWithPartialInfo", "offWindowResize", "offWindowStateChange", "onAccelerometerChange", "onAfterPageLoad", "onAfterPageUnload", "onApiCategoryChange", "onAppHide", "onAppRoute", "onAppRouteDone", "onAppShow", "onAudioInterruptionBegin", "onAudioInterruptionEnd", "onBackgroundAudioPause", "onBackgroundAudioPlay", "onBackgroundAudioStop", "onBackgroundFetchData", "onBatteryInfoChange", "onBeaconServiceChange", "onBeaconUpdate", "onBeforeAppRoute", "onBeforePageLoad", "onBeforePageUnload", "onBLECharacteristicValueChange", "onBLEConnectionStateChange", "onBLEMTUChange", "onBLEPeripheralConnectionStateChanged", "onBluetoothAdapterStateChange", "onBluetoothDeviceFound", "onCompassChange", "onCopyUrl", "onDeviceMotionChange", "onEmbeddedMiniProgramHeightChange", "onError", "onGeneratePoster", "onGetWifiList", "onGyroscopeChange", "onHCEMessage", "onKeyboardHeightChange", "onKeyDown", "onKeyUp", "onLazyLoadError", "onLocalServiceDiscoveryStop", "onLocalServiceFound", "onLocalServiceLost", "onLocalServiceResolveFail", "onLocationChange", "onLocationChangeError", "onMemoryWarning", "onMenuButtonBoundingClientRectWeightChange", "onNeedPrivacyAuthorization", "onNetworkStatusChange", "onNetworkWeakChange", "onPageNotFound", "onParallelStateChange", "onScreenRecordingStateChanged", "onSocketClose", "onSocketError", "onSocketMessage", "onSocketOpen", "onThemeChange", "onUnhandledRejection", "onUserCaptureScreen", "onUserOffTranslation", "onUserTriggerTranslation", "onVoIPChatInterrupted", "onVoIPChatMembersChanged", "onVoIPChatSpeakersChanged", "onVoIPChatStateChanged", "onVoIPVideoMembersChanged", "onWifiConnected", "onWifiConnectedWithPartialInfo", "onWindowResize", "onWindowStateChange", "openAppAuthorizeSetting", "openBluetoothAdapter", "openCard", "openChannelsActivity", "openChannelsEvent", "openChannelsLive", "openChannelsLiveNoticeInfo", "openChannelsUserProfile", "openChatTool", "openCustomerServiceChat", "openDesignerProfile", "openDocument", "openEmbeddedMiniProgram", "openHKOfflinePayView", "openInquiriesTopic", "openLocation", "openOfficialAccountArticle", "openOfficialAccountChat", "openOfficialAccountProfile", "openPrivacyContract", "openSetting", "openSingleStickerView", "openStickerIPView", "openStickerSetView", "openStoreCouponDetail", "openStoreOrderDetail", "openSystemBluetoothSetting", "openVideoEditor", "pageScrollTo", "pauseBackgroundAudio", "pauseVoice", "playBackgroundAudio", "playVoice", "pluginLogin", "postMessageToReferrerMiniProgram", "postMessageToReferrerPage", "preDownloadSubpackage", "preloadAssets", "preloadSkylineView", "preloadWebview", "previewImage", "previewMedia", "readBLECharacteristicValue", "rechargeTransitCard", "redirectTo", "reLaunch", "removeSecureElementPass", "removeStorage", "removeStorageSync", "removeTabBarBadge", "reportAnalytics", "reportEvent", "reportMonitor", "reportPerformance", "request", "requestAppleSubscribeSign", "requestCommonPayment", "requestDeviceVoIP", "requestFacialVerify", "requestIdleCallback", "requestMerchantTransfer", "requestOrderPayment", "requestPayment", "requestPluginPayment", "requestSubscribeDeviceMessage", "requestSubscribeEmployeeMessage", "requestSubscribeMessage", "requestVirtualPayment", "requirePrivacyAuthorize", "reserveChannelsLive", "restartMiniProgram", "revokeBufferURL", "rewriteRoute", "saveFileToDisk", "saveImageToPhotosAlbum", "saveVideoToPhotosAlbum", "scanCode", "seekBackgroundAudio", "selectGroupMembers", "sendHCEMessage", "sendSms", "sendSocketMessage", "setBackgroundColor", "setBackgroundFetchToken", "setBackgroundTextStyle", "setBLEMTU", "setClipboardData", "setEnable1v1Chat", "setEnableDebug", "setInnerAudioOption", "setKeepScreenOn", "setNavigationBarColor", "setNavigationBarTitle", "setScreenBrightness", "setStorage", "setStorageSync", "setTabBarBadge", "setTabBarItem", "setTabBarStyle", "setTopBarText", "setVisualEffectOnCapture", "setWifiList", "setWindowSize", "shareAppMessageToGroup", "shareEmojiToGroup", "shareFileMessage", "shareFileToGroup", "shareImageToGroup", "shareToOfficialAccount", "shareToWeRun", "shareVideoMessage", "shareVideoToGroup", "showActionSheet", "showLoading", "showModal", "showNavigationBarLoading", "showRedPackage", "showShareImageMenu", "showShareMenu", "showTabBar", "showTabBarRedDot", "showToast", "startAccelerometer", "startBeaconDiscovery", "startBluetoothDevicesDiscovery", "startCompass", "startDeviceMotionListening", "startGyroscope", "startHCE", "startLocalServiceDiscovery", "startLocationUpdate", "startLocationUpdateBackground", "startPullDownRefresh", "startRecord", "startSoterAuthentication", "startWifi", "stopAccelerometer", "stopBackgroundAudio", "stopBeaconDiscovery", "stopBluetoothDevicesDiscovery", "stopCompass", "stopDeviceMotionListening", "stopFaceDetect", "stopGyroscope", "stopHCE", "stopLocalServiceDiscovery", "stopLocationUpdate", "stopPullDownRefresh", "stopRecord", "stopVoice", "stopWifi", "subscribeVoIPVideoMembers", "switchTab", "updateShareMenu", "updateVoIPChatMuteConfig", "updateWeChatApp", "uploadFile", "vibrateLong", "vibrateShort", "writeBLECharacteristicValue"];
|
|
8426
8311
|
declare const WEAPI_ALIPAY_METHODS: readonly ["addPhoneContact", "alert", "arrayBufferToBase64", "base64ToArrayBuffer", "calculateRoute", "call", "cancelBluetoothPair", "canIUse", "canvasToTempFilePath", "checkBeforeAddOrder", "checkIsIfaaEnrolledInDevice", "checkIsSupportIfaaAuthentication", "chooseAlipayContact", "chooseCity", "chooseContact", "chooseDistrict", "chooseImage", "chooseLocation", "choosePhoneContact", "chooseVideo", "clearStorage", "clearStorageSync", "closeBluetoothAdapter", "closeSocket", "compressImage", "confirm", "connectBLEDevice", "connectSocket", "connectWifi", "createAnimation", "createCanvasContext", "createInnerAudioContext", "createIntersectionObserver", "createLottieContext", "createMapContext", "createOffscreenCanvas", "createRewardedAd", "createSelectorQuery", "createVideoContext", "createWebViewContext", "createWorker", "datePicker", "detectFileType", "disableAlertBeforeUnload", "disconnectBLEDevice", "downloadFile", "enableAlertBeforeUnload", "exitMiniProgram", "generateImageFromCode", "getAccessibilityManager", "getAccountInfoSync", "getAddress", "getAppAuthorizeSetting", "getAppBaseInfo", "getAppIdSync", "getAuthCode", "getAvailableAudioSources", "getBackgroundAudioManager", "getBackgroundFetchData", "getBatteryInfo", "getBatteryInfoSync", "getBeacons", "getBLEDeviceCharacteristics", "getBLEDeviceRSSI", "getBLEDeviceServices", "getBLEDeviceStatus", "getBLEMTU", "getBluetoothAdapterState", "getBluetoothDevices", "getBluetoothPairs", "getClipboard", "getConnectedBluetoothDevices", "getConnectedWifi", "getEnterOptionsSync", "getExtConfig", "getExtConfigSync", "getFileInfo", "getFileSystemManager", "getGeocoder", "getImageInfo", "getLaunchOptionsSync", "getLeftButtonsBoundingClientRect", "getLocalIPAddress", "getLocation", "getMapInfo", "getMenuButtonBoundingClientRect", "getNetworkType", "getOpenUserInfo", "getParentAppId", "getParentAppIdSync", "getPhoneNumber", "getPluginIdSync", "getRecorderManager", "getRunData", "getRunScene", "getSavedFileInfo", "getSavedFileList", "getScreenBrightness", "getServerTime", "getSetting", "getStorage", "getStorageInfo", "getStorageInfoSync", "getStorageSync", "getSystemInfo", "getSystemInfoSync", "getSystemSetting", "getTitleColor", "getUpdateManager", "getVideoInfo", "getWifiList", "getWindowInfo", "hideAddToDesktopMenu", "hideAllAddToDesktopMenu", "hideBackHome", "hideKeyboard", "hideLoading", "hideNavigationBarLoading", "hideShareMenu", "hideTabBar", "hideTabBarRedDot", "hideToast", "isScreenReaderEnabled", "loadFontFace", "loadPlugin", "makeBluetoothPair", "makePhoneCall", "multiLevelSelect", "navigateBack", "navigateBackMiniProgram", "navigateTo", "navigateToMiniProgram", "notifyBLECharacteristicValueChange", "off", "offAccelerometerChange", "offAppHide", "offAppShow", "offAudioInterruptionBegin", "offAudioInterruptionEnd", "offBeaconServiceChange", "offBeaconUpdate", "offBLECharacteristicValueChange", "offBLEConnectionStateChanged", "offBluetoothAdapterStateChange", "offBluetoothDeviceFound", "offCompassChange", "offComponentError", "offDeviceMotionChange", "offError", "offGetWifiList", "offGyroscopeChange", "offLocatedComplete", "offMemoryWarning", "offNetworkStatusChange", "offPageNotFound", "offSocketClose", "offSocketError", "offSocketMessage", "offSocketOpen", "offUnhandledRejection", "offUserCaptureScreen", "offWifiConnected", "on", "onAccelerometerChange", "onAppHide", "onAppShow", "onAudioInterruptionBegin", "onAudioInterruptionEnd", "onBeaconServiceChange", "onBeaconUpdate", "onBLECharacteristicValueChange", "onBLEConnectionStateChanged", "onBluetoothAdapterStateChange", "onBluetoothDeviceFound", "onCompassChange", "onComponentError", "onDeviceMotionChange", "onError", "onGetWifiList", "onGyroscopeChange", "onLocatedComplete", "onMemoryWarning", "onNetworkStatusChange", "onPageNotFound", "onSocketClose", "onSocketError", "onSocketMessage", "onSocketOpen", "onUnhandledRejection", "onUserCaptureScreen", "onWifiConnected", "openBluetoothAdapter", "openDocument", "openKBVoucherDetail", "openLocation", "openMerchantTicketList", "openMerchantVoucherList", "openOtherApp", "openSetting", "openTicketDetail", "openTicketList", "openVoucherDetail", "openVoucherList", "optionsSelect", "pageScrollTo", "paySignCenter", "previewImage", "prompt", "readBLECharacteristicValue", "redirectTo", "regionPicker", "registerSSID", "reLaunch", "removeSavedFile", "removeStorage", "removeStorageSync", "removeTabBarBadge", "request", "requestSubscribeMessage", "rsa", "saveFile", "saveFileToDisk", "saveImage", "saveImageToPhotosAlbum", "saveVideoToPhotosAlbum", "scan", "sendSocketMessage", "setBackgroundColor", "setBackgroundTextStyle", "setBLEMTU", "setCanPullDown", "setClipboard", "setKeepScreenOn", "setLocatedCity", "setNavigationBar", "setNavigationBarBottomLineColor", "setNavigationBarColor", "setNavigationBarTitle", "setScreenBrightness", "setStorage", "setStorageSync", "setTabBarBadge", "setTabBarItem", "setTabBarStyle", "setVisualEffectOnCapture", "setWifiList", "showActionSheet", "showAuthGuide", "showBLEPermissionGuide", "showLoading", "showModal", "showNavigationBarLoading", "showShareMenu", "showSharePanel", "showTabBar", "showTabBarRedDot", "showToast", "startAccelerometer", "startAPVerify", "startBeaconDiscovery", "startBluetoothDevicesDiscovery", "startCompass", "startGyroscope", "startIfaaAuthentication", "startPullDownRefresh", "startWifi", "stopAccelerometer", "stopBeaconDiscovery", "stopBluetoothDevicesDiscovery", "stopCompass", "stopGyroscope", "stopPullDownRefresh", "stopWifi", "switchTab", "tradePay", "unregisterSSID", "unsubscribeMessage", "uploadFile", "vibrate", "vibrateLong", "vibrateShort", "watchShake", "writeBLECharacteristicValue"];
|
|
8427
8312
|
declare const WEAPI_DOUYIN_METHODS: readonly ["applyEcCoupon", "applyRefund", "arrayBufferToBase64", "authorize", "base64ToArrayBuffer", "canIPutStuffOverComponent", "canIUse", "canvasToTempFilePath", "checkFollowAwemeState", "checkFollowState", "checkSession", "chooseAddress", "chooseImage", "chooseLocation", "chooseMedia", "clearStorage", "clearStorageSync", "completePaySync", "completeRefundSync", "compressImage", "connectSocket", "continueToPay", "createAnimation", "createBytennEngineContext", "createCanvasContext", "createCloud", "createInnerAudioContext", "createIntersectionObserver", "createInterstitialAd", "createLivePlayerContext", "createMapContext", "createMediaRecorder", "createMerchantOrder", "createOffscreenCanvas", "createOrder", "createRefundOrder", "createRewardedVideoAd", "createRtcRoomContext", "createSelectorQuery", "createStickerManager", "createVideoContext", "createWorker", "downloadFile", "exitMiniProgram", "followAwemeUser", "followOfficialAccount", "getAnalysisInfo", "getBackgroundAudioManager", "getClipboardData", "getConnectedWifi", "getCustomButtonBoundingClientRect", "getEnvInfoSync", "getExtConfig", "getExtConfigSync", "getFileInfo", "getFileSystemManager", "getImageInfo", "getLaunchOptionsSync", "getLiveUserInfo", "getLocation", "getMenuButtonBoundingClientRect", "getMenuButtonLayout", "getMicroappInfo", "getRecorderManager", "getRefundOrder", "getRoomInfo", "getSavedFileList", "getScreenBrightness", "getSelfCommentCountDuringPluginRunning", "getSetting", "getShopRecordToken", "getSidebarActivity", "getStorage", "getStorageInfo", "getStorageInfoSync", "getStorageSync", "getSystemInfo", "getSystemInfoSync", "getUpdateManager", "getUserInfo", "getUserProfile", "getWifiList", "hideHomeButton", "hideInteractionBar", "hideKeyboard", "hideLoading", "hideNavigationBarLoading", "hideShareMenu", "hideTabBar", "hideTabBarRedDot", "hideToast", "isFollowingAnchor", "login", "makePhoneCall", "navigateBack", "navigateBackMiniProgram", "navigateTo", "navigateToMiniProgram", "navigateToScene", "navigateToVideoView", "offAppHide", "offAppShow", "offCompassChange", "offError", "offGetWifiList", "offLazyLoadError", "offNetworkStatusChange", "offPageNotFound", "offUnhandledRejection", "offUserCaptureScreen", "offWindowResize", "onAccelerometerChange", "onAppHide", "onAppShow", "onCompassChange", "onError", "onGetWifiList", "onLazyLoadError", "onMemoryWarning", "onNetworkStatusChange", "onPageNotFound", "onReceiveAudiencesFollowAction", "onReceiveSpecifiedComment", "onUnhandledRejection", "onUserCaptureScreen", "onWindowResize", "openAwemeUserProfile", "openLocation", "openSetting", "pageScrollTo", "pay", "preloadDrawAd", "prerenderVideo", "previewImage", "redirectTo", "reLaunch", "removeSavedFile", "removeStorage", "removeStorageSync", "removeTabBarBadge", "reportAnalytics", "request", "requestSubscribeMessage", "saveFile", "saveImageToPhotosAlbum", "scanCode", "setClipboardData", "setKeepScreenOn", "setNavigationBarColor", "setNavigationBarTitle", "setScreenBrightness", "setStorage", "setStorageSync", "setTabBarBadge", "setTabBarItem", "setTabBarStyle", "showActionSheet", "showDouyinOpenAuth", "showFavoriteGuide", "showInteractionBar", "showLoading", "showModal", "showNavigationBarLoading", "showShareMenu", "showTabBar", "showTabBarRedDot", "showToast", "startAccelerometer", "startCompass", "startPullDownRefresh", "stopAccelerometer", "stopCompass", "stopPullDownRefresh", "submitEcCustomGoods", "subscribeAudiencesFollowAction", "subscribeSpecifiedContentComment", "subscribeSpecifiedUserComment", "switchTab", "unsubscribeAllSpecifiedContentComment", "unsubscribeAllSpecifiedUserComment", "unsubscribeAudiencesFollowAction", "updateExitGuideWindowInfo", "updateShopMemberPoints", "updateSidebarActivity", "uploadFile", "vibrateLong", "vibrateShort"];
|
|
@@ -8439,8 +8324,6 @@ type WeapiMiniProgramAlipayMethodName = (typeof WEAPI_ALIPAY_METHODS)[number];
|
|
|
8439
8324
|
type WeapiAlipayMethodName = WeapiMiniProgramAlipayMethodName;
|
|
8440
8325
|
type WeapiMiniProgramDouyinMethodName = (typeof WEAPI_DOUYIN_METHODS)[number];
|
|
8441
8326
|
type WeapiDouyinMethodName = WeapiMiniProgramDouyinMethodName;
|
|
8442
|
-
//#endregion
|
|
8443
|
-
//#region src/core/platformRegistry.d.ts
|
|
8444
8327
|
interface MiniProgramApiPlatformDescriptor {
|
|
8445
8328
|
id: string;
|
|
8446
8329
|
displayName: string;
|
|
@@ -8461,8 +8344,6 @@ declare function normalizeMiniProgramPlatform(value?: string | null): string | u
|
|
|
8461
8344
|
* @description 根据平台标识、别名或宿主全局键解析平台描述。
|
|
8462
8345
|
*/
|
|
8463
8346
|
declare function resolveMiniProgramPlatform(value?: string | null): MiniProgramApiPlatformDescriptor | undefined;
|
|
8464
|
-
//#endregion
|
|
8465
|
-
//#region src/index.d.ts
|
|
8466
8347
|
/**
|
|
8467
8348
|
* @description 默认跨平台 API 实例(推荐使用)
|
|
8468
8349
|
*
|
|
@@ -8488,5 +8369,4 @@ declare const api: WeapiInstance<WeapiMiniProgramCrossPlatformRawAdapter>;
|
|
|
8488
8369
|
* @description 默认跨平台 API 实例的兼容名称。
|
|
8489
8370
|
*/
|
|
8490
8371
|
declare const wpi: WeapiInstance<WeapiMiniProgramCrossPlatformRawAdapter>;
|
|
8491
|
-
//#endregion
|
|
8492
8372
|
export { WeapiMiniProgramLogManager as $, WeapiMiniProgramAlipayAdapter as A, WeapiError as B, CreateWeapiOptions as C, WeapiTtMiniProgramRawAdapterSource as Ct, WeapiInstance as D, WeapiDouyinAdapter as E, WeapiNetworkOverflowPolicy as F, WeapiDouyinRawAdapter as G, WeapiPromisify as H, WeapiResolvedTarget as I, WeapiMiniProgramBluetoothError as J, WeapiMiniProgramCrossPlatformRawAdapter as K, WeapiSupportLevel as L, WeapiMiniProgramDouyinAdapter as M, WeapiMiniProgramWxAdapter as N, WeapiMethodSupportQueryOptions as O, WeapiNetworkOptions as P, WeapiMiniProgramGeneralCallbackResult as Q, WeapiWxAdapter as R, createWeapi as S, WeapiMiniProgramRuntimeRawAdapterSourceRegistry as St, WeapiCrossPlatformAdapter as T, WeapiAlipayRawAdapter as U, WeapiPromise as V, WeapiCrossPlatformRawAdapter as W, WeapiMiniProgramConnectSocketOption as X, WeapiMiniProgramClipboardDataResult as Y, WeapiMiniProgramDouyinRawAdapter as Z, WeapiWechatMethodName as _, WeapiDouyinMiniProgramRawAdapterSource as _t, normalizeMiniProgramPlatform as a, WeapiMiniProgramRequestTask as at, WEAPI_RUNTIME_TYPE_SOURCES as b, WeapiMiniProgramRawAdapterSourceName as bt, WeapiDouyinMethodName as c, WeapiMiniProgramSystemInfo as ct, WeapiMiniProgramMethodName as d, WeapiMiniProgramWechatRawAdapter as dt, WeapiMiniProgramRawAdapter as et, WeapiMiniProgramWechatMethodName as f, WeapiMiniProgramWxRawAdapter as ft, WeapiTypeSourceName as g, WeapiDefaultMiniProgramRawAdapterSource as gt, WeapiRuntimeTypeSourceName as h, WeapiAlipayMiniProgramRawAdapterSource as ht, MiniProgramApiPlatformDescriptor as i, WeapiMiniProgramRequestSuccessResult as it, WeapiMiniProgramCrossPlatformAdapter as j, WeapiMiniProgramAdapter as k, WeapiMiniProgramAlipayMethodName as l, WeapiMiniProgramUpdateManager as lt, WeapiPlatformTypeSourceName as m, WeapiWxRawAdapter as mt, wpi as n, WeapiMiniProgramRequestMethod as nt, resolveMiniProgramPlatform as o, WeapiMiniProgramSelectorQuery as ot, WeapiMiniProgramWxMethodName as p, WeapiWechatRawAdapter as pt, WeapiMiniProgramAlipayRawAdapter as q, MINI_PROGRAM_API_PLATFORM_DESCRIPTORS as r, WeapiMiniProgramRequestOption as rt, WeapiAlipayMethodName as s, WeapiMiniProgramSocketTask as st, api as t, WeapiMiniProgramRequestFailResult as tt, WeapiMiniProgramDouyinMethodName as u, WeapiMiniProgramVideoContext as ut, WeapiWxMethodName as v, WeapiMiniProgramPlatformRawAdapterSourceName as vt, WeapiAlipayAdapter as w, WeapiWechatMiniProgramRawAdapterSource as wt, WEAPI_TYPE_SOURCES as x, WeapiMiniProgramRuntimeRawAdapterSourceName as xt, WEAPI_PLATFORM_TYPE_SOURCES as y, WeapiMiniProgramPlatformRawAdapterSourceRegistry as yt, WeapiAdapter as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as WeapiMiniProgramLogManager, A as WeapiMiniProgramAlipayAdapter, B as WeapiError, C as CreateWeapiOptions, Ct as WeapiTtMiniProgramRawAdapterSource, D as WeapiInstance, E as WeapiDouyinAdapter, F as WeapiNetworkOverflowPolicy, G as WeapiDouyinRawAdapter, H as WeapiPromisify, I as WeapiResolvedTarget, J as WeapiMiniProgramBluetoothError, K as WeapiMiniProgramCrossPlatformRawAdapter, L as WeapiSupportLevel, M as WeapiMiniProgramDouyinAdapter, N as WeapiMiniProgramWxAdapter, O as WeapiMethodSupportQueryOptions, P as WeapiNetworkOptions, Q as WeapiMiniProgramGeneralCallbackResult, R as WeapiWxAdapter, S as createWeapi, St as WeapiMiniProgramRuntimeRawAdapterSourceRegistry, T as WeapiCrossPlatformAdapter, U as WeapiAlipayRawAdapter, V as WeapiPromise, W as WeapiCrossPlatformRawAdapter, X as WeapiMiniProgramConnectSocketOption, Y as WeapiMiniProgramClipboardDataResult, Z as WeapiMiniProgramDouyinRawAdapter, _ as WeapiWechatMethodName, _t as WeapiDouyinMiniProgramRawAdapterSource, a as normalizeMiniProgramPlatform, at as WeapiMiniProgramRequestTask, b as WEAPI_RUNTIME_TYPE_SOURCES, bt as WeapiMiniProgramRawAdapterSourceName, c as WeapiDouyinMethodName, ct as WeapiMiniProgramSystemInfo, d as WeapiMiniProgramMethodName, dt as WeapiMiniProgramWechatRawAdapter, et as WeapiMiniProgramRawAdapter, f as WeapiMiniProgramWechatMethodName, ft as WeapiMiniProgramWxRawAdapter, g as WeapiTypeSourceName, gt as WeapiDefaultMiniProgramRawAdapterSource, h as WeapiRuntimeTypeSourceName, ht as WeapiAlipayMiniProgramRawAdapterSource, i as MiniProgramApiPlatformDescriptor, it as WeapiMiniProgramRequestSuccessResult, j as WeapiMiniProgramCrossPlatformAdapter, k as WeapiMiniProgramAdapter, l as WeapiMiniProgramAlipayMethodName, lt as WeapiMiniProgramUpdateManager, m as WeapiPlatformTypeSourceName, mt as WeapiWxRawAdapter, n as wpi, nt as WeapiMiniProgramRequestMethod, o as resolveMiniProgramPlatform, ot as WeapiMiniProgramSelectorQuery, p as WeapiMiniProgramWxMethodName, pt as WeapiWechatRawAdapter, q as WeapiMiniProgramAlipayRawAdapter, r as MINI_PROGRAM_API_PLATFORM_DESCRIPTORS, rt as WeapiMiniProgramRequestOption, s as WeapiAlipayMethodName, st as WeapiMiniProgramSocketTask, t as api, tt as WeapiMiniProgramRequestFailResult, u as WeapiMiniProgramDouyinMethodName, ut as WeapiMiniProgramVideoContext, v as WeapiWxMethodName, vt as WeapiMiniProgramPlatformRawAdapterSourceName, w as WeapiAlipayAdapter, wt as WeapiWechatMiniProgramRawAdapterSource, x as WEAPI_TYPE_SOURCES, xt as WeapiMiniProgramRuntimeRawAdapterSourceName, y as WEAPI_PLATFORM_TYPE_SOURCES, yt as WeapiMiniProgramPlatformRawAdapterSourceRegistry, z as WeapiAdapter } from "./index-
|
|
1
|
+
import { $ as WeapiMiniProgramLogManager, A as WeapiMiniProgramAlipayAdapter, B as WeapiError, C as CreateWeapiOptions, Ct as WeapiTtMiniProgramRawAdapterSource, D as WeapiInstance, E as WeapiDouyinAdapter, F as WeapiNetworkOverflowPolicy, G as WeapiDouyinRawAdapter, H as WeapiPromisify, I as WeapiResolvedTarget, J as WeapiMiniProgramBluetoothError, K as WeapiMiniProgramCrossPlatformRawAdapter, L as WeapiSupportLevel, M as WeapiMiniProgramDouyinAdapter, N as WeapiMiniProgramWxAdapter, O as WeapiMethodSupportQueryOptions, P as WeapiNetworkOptions, Q as WeapiMiniProgramGeneralCallbackResult, R as WeapiWxAdapter, S as createWeapi, St as WeapiMiniProgramRuntimeRawAdapterSourceRegistry, T as WeapiCrossPlatformAdapter, U as WeapiAlipayRawAdapter, V as WeapiPromise, W as WeapiCrossPlatformRawAdapter, X as WeapiMiniProgramConnectSocketOption, Y as WeapiMiniProgramClipboardDataResult, Z as WeapiMiniProgramDouyinRawAdapter, _ as WeapiWechatMethodName, _t as WeapiDouyinMiniProgramRawAdapterSource, a as normalizeMiniProgramPlatform, at as WeapiMiniProgramRequestTask, b as WEAPI_RUNTIME_TYPE_SOURCES, bt as WeapiMiniProgramRawAdapterSourceName, c as WeapiDouyinMethodName, ct as WeapiMiniProgramSystemInfo, d as WeapiMiniProgramMethodName, dt as WeapiMiniProgramWechatRawAdapter, et as WeapiMiniProgramRawAdapter, f as WeapiMiniProgramWechatMethodName, ft as WeapiMiniProgramWxRawAdapter, g as WeapiTypeSourceName, gt as WeapiDefaultMiniProgramRawAdapterSource, h as WeapiRuntimeTypeSourceName, ht as WeapiAlipayMiniProgramRawAdapterSource, i as MiniProgramApiPlatformDescriptor, it as WeapiMiniProgramRequestSuccessResult, j as WeapiMiniProgramCrossPlatformAdapter, k as WeapiMiniProgramAdapter, l as WeapiMiniProgramAlipayMethodName, lt as WeapiMiniProgramUpdateManager, m as WeapiPlatformTypeSourceName, mt as WeapiWxRawAdapter, n as wpi, nt as WeapiMiniProgramRequestMethod, o as resolveMiniProgramPlatform, ot as WeapiMiniProgramSelectorQuery, p as WeapiMiniProgramWxMethodName, pt as WeapiWechatRawAdapter, q as WeapiMiniProgramAlipayRawAdapter, r as MINI_PROGRAM_API_PLATFORM_DESCRIPTORS, rt as WeapiMiniProgramRequestOption, s as WeapiAlipayMethodName, st as WeapiMiniProgramSocketTask, t as api, tt as WeapiMiniProgramRequestFailResult, u as WeapiMiniProgramDouyinMethodName, ut as WeapiMiniProgramVideoContext, v as WeapiWxMethodName, vt as WeapiMiniProgramPlatformRawAdapterSourceName, w as WeapiAlipayAdapter, wt as WeapiWechatMiniProgramRawAdapterSource, x as WEAPI_TYPE_SOURCES, xt as WeapiMiniProgramRuntimeRawAdapterSourceName, y as WEAPI_PLATFORM_TYPE_SOURCES, yt as WeapiMiniProgramPlatformRawAdapterSourceRegistry, z as WeapiAdapter } from "./index-DX9lohgi.mjs";
|
|
2
2
|
export { type CreateWeapiOptions as CreateApiOptions, type CreateWeapiOptions, MINI_PROGRAM_API_PLATFORM_DESCRIPTORS, type WeapiInstance as MiniProgramApiInstance, type WeapiInstance, type MiniProgramApiPlatformDescriptor, WEAPI_PLATFORM_TYPE_SOURCES, WEAPI_RUNTIME_TYPE_SOURCES, WEAPI_TYPE_SOURCES, type WeapiAdapter, type WeapiAlipayAdapter, type WeapiAlipayMethodName, type WeapiAlipayMiniProgramRawAdapterSource, type WeapiAlipayRawAdapter, type WeapiCrossPlatformAdapter, type WeapiCrossPlatformRawAdapter, type WeapiDefaultMiniProgramRawAdapterSource, type WeapiDouyinAdapter, type WeapiDouyinMethodName, type WeapiDouyinMiniProgramRawAdapterSource, type WeapiDouyinRawAdapter, type WeapiError, type WeapiMethodSupportQueryOptions, type WeapiMiniProgramAdapter, type WeapiMiniProgramAlipayAdapter, type WeapiMiniProgramAlipayMethodName, type WeapiMiniProgramAlipayRawAdapter, type WeapiMiniProgramBluetoothError, type WeapiMiniProgramClipboardDataResult, type WeapiMiniProgramConnectSocketOption, type WeapiMiniProgramCrossPlatformAdapter, type WeapiMiniProgramCrossPlatformRawAdapter, type WeapiMiniProgramDouyinAdapter, type WeapiMiniProgramDouyinMethodName, type WeapiMiniProgramDouyinRawAdapter, type WeapiMiniProgramGeneralCallbackResult, type WeapiMiniProgramLogManager, type WeapiMiniProgramMethodName, type WeapiMiniProgramPlatformRawAdapterSourceName, type WeapiMiniProgramPlatformRawAdapterSourceRegistry, type WeapiMiniProgramRawAdapter, type WeapiMiniProgramRawAdapterSourceName, type WeapiMiniProgramRequestFailResult, type WeapiMiniProgramRequestMethod, type WeapiMiniProgramRequestOption, type WeapiMiniProgramRequestSuccessResult, type WeapiMiniProgramRequestTask, type WeapiMiniProgramRuntimeRawAdapterSourceName, type WeapiMiniProgramRuntimeRawAdapterSourceRegistry, type WeapiMiniProgramSelectorQuery, type WeapiMiniProgramSocketTask, type WeapiMiniProgramSystemInfo, type WeapiMiniProgramUpdateManager, type WeapiMiniProgramVideoContext, type WeapiMiniProgramWechatMethodName, type WeapiMiniProgramWechatRawAdapter, type WeapiMiniProgramWxAdapter, type WeapiMiniProgramWxMethodName, type WeapiMiniProgramWxRawAdapter, type WeapiNetworkOptions, type WeapiNetworkOverflowPolicy, type WeapiPlatformTypeSourceName, type WeapiPromise, type WeapiPromisify, type WeapiResolvedTarget, type WeapiRuntimeTypeSourceName, type WeapiSupportLevel, type WeapiTtMiniProgramRawAdapterSource, type WeapiTypeSourceName, type WeapiWechatMethodName, type WeapiWechatMiniProgramRawAdapterSource, type WeapiWechatRawAdapter, type WeapiWxAdapter, type WeapiWxMethodName, type WeapiWxRawAdapter, api, createWeapi as createApi, createWeapi, normalizeMiniProgramPlatform, resolveMiniProgramPlatform, wpi };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as WEAPI_DOUYIN_METHODS, r as WEAPI_MINIPROGRAM_METHODS, t as WEAPI_ALIPAY_METHODS } from "./apiCatalog-
|
|
2
|
-
|
|
1
|
+
import { n as WEAPI_DOUYIN_METHODS, r as WEAPI_MINIPROGRAM_METHODS, t as WEAPI_ALIPAY_METHODS } from "./apiCatalog-CuGS6BXn.mjs";
|
|
2
|
+
// src/core/platformRegistry.ts
|
|
3
3
|
/**
|
|
4
4
|
* @description 内置小程序宿主注册表;未知宿主仍可通过显式 adapter 接入。
|
|
5
5
|
*/
|
|
@@ -158,8 +158,7 @@ function getMiniProgramPlatformByRuntimeGlobalKey(globalObjectKey) {
|
|
|
158
158
|
function getMiniProgramRuntimeHostConfigKey(platform) {
|
|
159
159
|
return (platform ? descriptorById.get(platform)?.hostConfigKey : void 0) ?? "__wxConfig";
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
//#region src/core/runtimeGlobal.ts
|
|
161
|
+
// src/core/runtimeGlobal.ts
|
|
163
162
|
/**
|
|
164
163
|
* @description 静态解析当前运行环境的全局根对象,兼容不提供 globalThis 的小程序 worker。
|
|
165
164
|
*/
|
|
@@ -209,8 +208,7 @@ function resolveRuntimeGlobalValue(key, root = resolveRuntimeRoot()) {
|
|
|
209
208
|
}
|
|
210
209
|
return resolveTopLevelRuntimeValue(key);
|
|
211
210
|
}
|
|
212
|
-
|
|
213
|
-
//#region src/core/adapter.ts
|
|
211
|
+
// src/core/adapter.ts
|
|
214
212
|
const GLOBAL_ADAPTER_KEYS = [...getMiniProgramRuntimeGlobalKeys().map((key) => ({
|
|
215
213
|
platform: key,
|
|
216
214
|
key
|
|
@@ -232,8 +230,7 @@ function detectGlobalAdapter() {
|
|
|
232
230
|
}
|
|
233
231
|
return {};
|
|
234
232
|
}
|
|
235
|
-
|
|
236
|
-
//#region src/core/apiCatalog/wxDirectReturnMethods.ts
|
|
233
|
+
// src/core/apiCatalog/wxDirectReturnMethods.ts
|
|
237
234
|
/**
|
|
238
235
|
* @description 微信无回调直接返回 API 名单(由 typings 自动提取,请勿手工修改)
|
|
239
236
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -301,8 +298,7 @@ const WEAPI_WX_DIRECT_RETURN_METHODS = [
|
|
|
301
298
|
"requestIdleCallback",
|
|
302
299
|
"revokeBufferURL"
|
|
303
300
|
];
|
|
304
|
-
|
|
305
|
-
//#region src/core/nonPromisifiedMethods.ts
|
|
301
|
+
// src/core/nonPromisifiedMethods.ts
|
|
306
302
|
const WEAPI_LEGACY_NON_PROMISIFIED_METHOD_NAMES = ["createEditorContext", "getOpenDataContext"];
|
|
307
303
|
const WEAPI_NON_PROMISIFIED_METHOD_NAMES = [...WEAPI_WX_DIRECT_RETURN_METHODS, ...WEAPI_LEGACY_NON_PROMISIFIED_METHOD_NAMES];
|
|
308
304
|
const WEAPI_NON_PROMISIFIED_METHOD_NAME_SET = new Set(WEAPI_NON_PROMISIFIED_METHOD_NAMES);
|
|
@@ -312,8 +308,7 @@ const WEAPI_NON_PROMISIFIED_METHOD_NAME_SET = new Set(WEAPI_NON_PROMISIFIED_METH
|
|
|
312
308
|
function isNonPromisifiedMethod(name) {
|
|
313
309
|
return WEAPI_NON_PROMISIFIED_METHOD_NAME_SET.has(name);
|
|
314
310
|
}
|
|
315
|
-
|
|
316
|
-
//#region src/core/utils.ts
|
|
311
|
+
// src/core/utils.ts
|
|
317
312
|
function isPlainObject(value) {
|
|
318
313
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
319
314
|
}
|
|
@@ -338,8 +333,7 @@ function shouldSkipPromise(name) {
|
|
|
338
333
|
function createNotSupportedError(methodName, platform) {
|
|
339
334
|
return { errMsg: `${platform ? `${platform}.${methodName}` : methodName}:fail method not supported` };
|
|
340
335
|
}
|
|
341
|
-
|
|
342
|
-
//#region src/core/callBridge.ts
|
|
336
|
+
// src/core/callBridge.ts
|
|
343
337
|
function resolveOptionsArg$1(args) {
|
|
344
338
|
const nextArgs = args.slice();
|
|
345
339
|
const lastArg = nextArgs.length > 0 ? nextArgs[nextArgs.length - 1] : void 0;
|
|
@@ -415,8 +409,7 @@ function callWithPromise(context, method, args, mapResult, hooks) {
|
|
|
415
409
|
function callMissingApi(methodName, platform, args) {
|
|
416
410
|
return callWithError(createNotSupportedError(methodName, platform), args);
|
|
417
411
|
}
|
|
418
|
-
|
|
419
|
-
//#region src/core/apiCatalog/typeSources.ts
|
|
412
|
+
// src/core/apiCatalog/typeSources.ts
|
|
420
413
|
/**
|
|
421
414
|
* @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
|
|
422
415
|
* @generated by scripts/sync-api-catalog.mjs
|
|
@@ -462,8 +455,7 @@ const WEAPI_RUNTIME_TYPE_SOURCES = {
|
|
|
462
455
|
my: WEAPI_TYPE_SOURCES.my,
|
|
463
456
|
tt: WEAPI_TYPE_SOURCES.tt
|
|
464
457
|
};
|
|
465
|
-
|
|
466
|
-
//#region src/core/methodMapping/rules/helpersDeviceAndStorage.ts
|
|
458
|
+
// src/core/methodMapping/rules/helpersDeviceAndStorage.ts
|
|
467
459
|
const PLATFORM_ALIASES$1 = { kuaishou: "ks" };
|
|
468
460
|
function mapSaveFileArgs(args) {
|
|
469
461
|
if (args.length === 0) return args;
|
|
@@ -577,8 +569,7 @@ function normalizePlatformName$1(value) {
|
|
|
577
569
|
if (miniProgramPlatform) return miniProgramPlatform.globalObjectKey;
|
|
578
570
|
return PLATFORM_ALIASES$1[normalized] ?? normalized;
|
|
579
571
|
}
|
|
580
|
-
|
|
581
|
-
//#region src/core/methodMapping/rules/helpersUi.ts
|
|
572
|
+
// src/core/methodMapping/rules/helpersUi.ts
|
|
582
573
|
function mapToastType(type) {
|
|
583
574
|
if (type === "error") return "fail";
|
|
584
575
|
if (type === "loading") return "none";
|
|
@@ -695,8 +686,7 @@ function mapDouyinChooseImageResult(result) {
|
|
|
695
686
|
}
|
|
696
687
|
return result;
|
|
697
688
|
}
|
|
698
|
-
|
|
699
|
-
//#region src/core/methodMapping/rules/helpersMediaClipboard.ts
|
|
689
|
+
// src/core/methodMapping/rules/helpersMediaClipboard.ts
|
|
700
690
|
function mapSetClipboardArgs(args) {
|
|
701
691
|
if (args.length === 0) return args;
|
|
702
692
|
const nextArgs = [...args];
|
|
@@ -745,8 +735,7 @@ function mapChooseMediaResultFromImage(result) {
|
|
|
745
735
|
type: "image"
|
|
746
736
|
};
|
|
747
737
|
}
|
|
748
|
-
|
|
749
|
-
//#region src/core/methodMapping/rules/myBindEmployeeRelationToSendHCEMessage.ts
|
|
738
|
+
// src/core/methodMapping/rules/myBindEmployeeRelationToSendHCEMessage.ts
|
|
750
739
|
const MY_METHOD_MAPPINGS_BIND_EMPLOYEE_RELATION_TO_SEND_HCEMESSAGE = {
|
|
751
740
|
bindEmployeeRelation: { target: "bindEmployeeRelation" },
|
|
752
741
|
canAddSecureElementPass: { target: "canAddSecureElementPass" },
|
|
@@ -833,8 +822,7 @@ const MY_METHOD_MAPPINGS_BIND_EMPLOYEE_RELATION_TO_SEND_HCEMESSAGE = {
|
|
|
833
822
|
selectGroupMembers: { target: "selectGroupMembers" },
|
|
834
823
|
sendHCEMessage: { target: "sendHCEMessage" }
|
|
835
824
|
};
|
|
836
|
-
|
|
837
|
-
//#region src/core/methodMapping/rules/myCreateVKSessionToOffBLEConnectionStateChange.ts
|
|
825
|
+
// src/core/methodMapping/rules/myCreateVKSessionToOffBLEConnectionStateChange.ts
|
|
838
826
|
const MY_METHOD_MAPPINGS_CREATE_VKSESSION_TO_OFF_BLECONNECTION_STATE_CHANGE = {
|
|
839
827
|
createVKSession: { target: "createVKSession" },
|
|
840
828
|
compressVideo: { target: "compressVideo" },
|
|
@@ -853,8 +841,7 @@ const MY_METHOD_MAPPINGS_CREATE_VKSESSION_TO_OFF_BLECONNECTION_STATE_CHANGE = {
|
|
|
853
841
|
onBLEConnectionStateChange: { target: "onBLEConnectionStateChanged" },
|
|
854
842
|
offBLEConnectionStateChange: { target: "offBLEConnectionStateChanged" }
|
|
855
843
|
};
|
|
856
|
-
|
|
857
|
-
//#region src/core/methodMapping/rules/mySendSmsToOpenCustomerServiceChat.ts
|
|
844
|
+
// src/core/methodMapping/rules/mySendSmsToOpenCustomerServiceChat.ts
|
|
858
845
|
const MY_METHOD_MAPPINGS_SEND_SMS_TO_OPEN_CUSTOMER_SERVICE_CHAT = {
|
|
859
846
|
sendSms: { target: "sendSms" },
|
|
860
847
|
setBackgroundFetchToken: { target: "setBackgroundFetchToken" },
|
|
@@ -930,8 +917,7 @@ const MY_METHOD_MAPPINGS_SEND_SMS_TO_OPEN_CUSTOMER_SERVICE_CHAT = {
|
|
|
930
917
|
stopFaceDetect: { target: "stopFaceDetect" },
|
|
931
918
|
openCustomerServiceChat: { target: "openCustomerServiceChat" }
|
|
932
919
|
};
|
|
933
|
-
|
|
934
|
-
//#region src/core/methodMapping/rules/my.ts
|
|
920
|
+
// src/core/methodMapping/rules/my.ts
|
|
935
921
|
const MY_METHOD_MAPPINGS = {
|
|
936
922
|
showToast: {
|
|
937
923
|
target: "showToast",
|
|
@@ -1037,8 +1023,7 @@ const MY_METHOD_MAPPINGS = {
|
|
|
1037
1023
|
...MY_METHOD_MAPPINGS_SEND_SMS_TO_OPEN_CUSTOMER_SERVICE_CHAT,
|
|
1038
1024
|
...MY_METHOD_MAPPINGS_CREATE_VKSESSION_TO_OFF_BLECONNECTION_STATE_CHANGE
|
|
1039
1025
|
};
|
|
1040
|
-
|
|
1041
|
-
//#region src/core/methodMapping/rules/ttCanvasGetImageDataToSetTopBarText.ts
|
|
1026
|
+
// src/core/methodMapping/rules/ttCanvasGetImageDataToSetTopBarText.ts
|
|
1042
1027
|
const TT_METHOD_MAPPINGS_CANVAS_GET_IMAGE_DATA_TO_SET_TOP_BAR_TEXT = {
|
|
1043
1028
|
canvasGetImageData: { target: "canvasGetImageData" },
|
|
1044
1029
|
canvasPutImageData: { target: "canvasPutImageData" },
|
|
@@ -1114,8 +1099,7 @@ const TT_METHOD_MAPPINGS_CANVAS_GET_IMAGE_DATA_TO_SET_TOP_BAR_TEXT = {
|
|
|
1114
1099
|
setEnable1v1Chat: { target: "setEnable1v1Chat" },
|
|
1115
1100
|
setTopBarText: { target: "setTopBarText" }
|
|
1116
1101
|
};
|
|
1117
|
-
|
|
1118
|
-
//#region src/core/methodMapping/rules/ttJoinVoIPChatToOffBLEConnectionStateChange.ts
|
|
1102
|
+
// src/core/methodMapping/rules/ttJoinVoIPChatToOffBLEConnectionStateChange.ts
|
|
1119
1103
|
const TT_METHOD_MAPPINGS_JOIN_VO_IPCHAT_TO_OFF_BLECONNECTION_STATE_CHANGE = {
|
|
1120
1104
|
joinVoIPChat: { target: "joinVoIPChat" },
|
|
1121
1105
|
openDocument: { target: "openDocument" },
|
|
@@ -1130,8 +1114,7 @@ const TT_METHOD_MAPPINGS_JOIN_VO_IPCHAT_TO_OFF_BLECONNECTION_STATE_CHANGE = {
|
|
|
1130
1114
|
onBLEConnectionStateChange: { target: "onBLEConnectionStateChange" },
|
|
1131
1115
|
offBLEConnectionStateChange: { target: "offBLEConnectionStateChange" }
|
|
1132
1116
|
};
|
|
1133
|
-
|
|
1134
|
-
//#region src/core/methodMapping/rules/ttSetWindowSizeToGetShareInfo.ts
|
|
1117
|
+
// src/core/methodMapping/rules/ttSetWindowSizeToGetShareInfo.ts
|
|
1135
1118
|
const TT_METHOD_MAPPINGS_SET_WINDOW_SIZE_TO_GET_SHARE_INFO = {
|
|
1136
1119
|
setWindowSize: { target: "setWindowSize" },
|
|
1137
1120
|
stopHCE: { target: "stopHCE" },
|
|
@@ -1207,8 +1190,7 @@ const TT_METHOD_MAPPINGS_SET_WINDOW_SIZE_TO_GET_SHARE_INFO = {
|
|
|
1207
1190
|
openVideoEditor: { target: "openVideoEditor" },
|
|
1208
1191
|
getShareInfo: { target: "getShareInfo" }
|
|
1209
1192
|
};
|
|
1210
|
-
|
|
1211
|
-
//#region src/core/methodMapping/rules/index.ts
|
|
1193
|
+
// src/core/methodMapping/rules/index.ts
|
|
1212
1194
|
const METHOD_MAPPINGS = {
|
|
1213
1195
|
my: MY_METHOD_MAPPINGS,
|
|
1214
1196
|
tt: {
|
|
@@ -1338,8 +1320,7 @@ function resolveMethodMappingWithMeta(platform, methodName, options = {}) {
|
|
|
1338
1320
|
if (normalizedPlatform !== "my" && normalizedPlatform !== "tt") return;
|
|
1339
1321
|
return resolveMappingRule(normalizedPlatform, methodName, options);
|
|
1340
1322
|
}
|
|
1341
|
-
|
|
1342
|
-
//#region src/core/networkRequestPolicy/types.ts
|
|
1323
|
+
// src/core/networkRequestPolicy/types.ts
|
|
1343
1324
|
const NETWORK_METHODS = /* @__PURE__ */ new Set([
|
|
1344
1325
|
"request",
|
|
1345
1326
|
"uploadFile",
|
|
@@ -1362,8 +1343,7 @@ const NETWORK_BUCKET_LIMIT = {
|
|
|
1362
1343
|
socket: 5
|
|
1363
1344
|
};
|
|
1364
1345
|
const BACKGROUND_INTERRUPT_DELAY = 5e3;
|
|
1365
|
-
|
|
1366
|
-
//#region src/core/networkRequestPolicy/helpers.ts
|
|
1346
|
+
// src/core/networkRequestPolicy/helpers.ts
|
|
1367
1347
|
function isFinitePositiveNumber(value) {
|
|
1368
1348
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
1369
1349
|
}
|
|
@@ -1433,8 +1413,7 @@ function resolveTimeoutValue(timeout, method, timeoutConfig) {
|
|
|
1433
1413
|
function toNetworkMethod(name) {
|
|
1434
1414
|
return NETWORK_METHODS.has(name) ? name : void 0;
|
|
1435
1415
|
}
|
|
1436
|
-
|
|
1437
|
-
//#region src/core/networkRequestPolicy/index.ts
|
|
1416
|
+
// src/core/networkRequestPolicy/index.ts
|
|
1438
1417
|
/**
|
|
1439
1418
|
* @description 创建微信网络请求语义策略(超时、并发、前后台中断、referer 过滤)。
|
|
1440
1419
|
*/
|
|
@@ -1595,8 +1574,7 @@ function createNetworkRequestPolicy(getPlatform, options = void 0) {
|
|
|
1595
1574
|
prepareCall
|
|
1596
1575
|
};
|
|
1597
1576
|
}
|
|
1598
|
-
|
|
1599
|
-
//#region src/core/createWeapi.ts
|
|
1577
|
+
// src/core/createWeapi.ts
|
|
1600
1578
|
const INTERNAL_KEYS = /* @__PURE__ */ new Set([
|
|
1601
1579
|
"setAdapter",
|
|
1602
1580
|
"getAdapter",
|
|
@@ -1774,8 +1752,7 @@ function createWeapi(options = {}) {
|
|
|
1774
1752
|
return wrapped;
|
|
1775
1753
|
} });
|
|
1776
1754
|
}
|
|
1777
|
-
|
|
1778
|
-
//#region src/index.ts
|
|
1755
|
+
// src/index.ts
|
|
1779
1756
|
/**
|
|
1780
1757
|
* @description 默认跨平台 API 实例(推荐使用)
|
|
1781
1758
|
*
|
|
@@ -1801,5 +1778,4 @@ const api = createWeapi();
|
|
|
1801
1778
|
* @description 默认跨平台 API 实例的兼容名称。
|
|
1802
1779
|
*/
|
|
1803
1780
|
const wpi = api;
|
|
1804
|
-
//#endregion
|
|
1805
1781
|
export { MINI_PROGRAM_API_PLATFORM_DESCRIPTORS, WEAPI_PLATFORM_TYPE_SOURCES, WEAPI_RUNTIME_TYPE_SOURCES, WEAPI_TYPE_SOURCES, api, createWeapi as createApi, createWeapi, normalizeMiniProgramPlatform, resolveMiniProgramPlatform, wpi };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** 不包含请求地址、业务数据或回调的宿主中立网络默认选项。 */
|
|
2
|
+
export interface WeapiMiniProgramRequestDefaults {
|
|
3
|
+
enableCache?: boolean;
|
|
4
|
+
enableChunked?: boolean;
|
|
5
|
+
enableHttp2?: boolean;
|
|
6
|
+
enableHttpDNS?: boolean;
|
|
7
|
+
enableProfile?: boolean;
|
|
8
|
+
enableQuic?: boolean;
|
|
9
|
+
forceCellularNetwork?: boolean;
|
|
10
|
+
httpDNSServiceId?: string;
|
|
11
|
+
httpDNSTimeout?: number;
|
|
12
|
+
redirect?: 'follow' | 'manual';
|
|
13
|
+
timeout?: number;
|
|
14
|
+
useHighPerformanceMode?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** 不包含连接地址、协议或回调的宿主中立 WebSocket 默认选项。 */
|
|
17
|
+
export interface WeapiMiniProgramSocketDefaults {
|
|
18
|
+
forceCellularNetwork?: boolean;
|
|
19
|
+
header?: Record<string, any>;
|
|
20
|
+
perMessageDeflate?: boolean;
|
|
21
|
+
timeout?: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/vitest/setup.mjs
CHANGED
package/dist/vitest.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { D as WeapiInstance, K as WeapiMiniProgramCrossPlatformRawAdapter, W as WeapiCrossPlatformRawAdapter, z as WeapiAdapter } from "./index-
|
|
1
|
+
import { D as WeapiInstance, K as WeapiMiniProgramCrossPlatformRawAdapter, W as WeapiCrossPlatformRawAdapter, z as WeapiAdapter } from "./index-DX9lohgi.mjs";
|
|
2
2
|
import { Mock } from "vitest";
|
|
3
|
-
//#region src/vitest/index.d.ts
|
|
4
3
|
type Procedure = (...args: any[]) => any;
|
|
5
4
|
type MockImplementation<T extends Procedure> = (...args: Parameters<T>) => ReturnType<T>;
|
|
6
5
|
type MockValueMethods<TPublic extends Procedure, TMock> = ReturnType<TPublic> extends PromiseLike<unknown> ? {
|
|
@@ -63,4 +62,4 @@ export declare function resetApiMock(mock?: ApiMock<any>): void;
|
|
|
63
62
|
* @description 在 Vitest setup 文件中注册需要替换 API 实例的模块入口。
|
|
64
63
|
*/
|
|
65
64
|
export declare function setupApiMock(moduleIds: readonly string[]): void;
|
|
66
|
-
|
|
65
|
+
export {};
|
package/dist/vitest.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as WEAPI_WECHAT_METHODS, n as WEAPI_DOUYIN_METHODS, t as WEAPI_ALIPAY_METHODS } from "./apiCatalog-
|
|
1
|
+
import { i as WEAPI_WECHAT_METHODS, n as WEAPI_DOUYIN_METHODS, t as WEAPI_ALIPAY_METHODS } from "./apiCatalog-CuGS6BXn.mjs";
|
|
2
2
|
import { beforeEach, vi } from "vitest";
|
|
3
|
-
|
|
3
|
+
// src/vitest/index.ts
|
|
4
4
|
const INTERNAL_METHOD_NAMES = [
|
|
5
5
|
"getAdapter",
|
|
6
6
|
"resolveTarget",
|
|
@@ -103,5 +103,4 @@ function setupApiMock(moduleIds) {
|
|
|
103
103
|
resetApiMock(apiMock);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
//#endregion
|
|
107
106
|
export { apiMock, createApiMock, createWpiMock, resetApiMock, setupApiMock, wpiMock };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-core/api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Framework-agnostic cross-platform mini-program API proxy",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"./vitest/setup": {
|
|
41
41
|
"types": "./src/vitest/setup.ts",
|
|
42
42
|
"default": "./src/vitest/setup.ts"
|
|
43
|
+
},
|
|
44
|
+
"./network-options": {
|
|
45
|
+
"types": "./src/networkOptions.ts"
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"main": "./src/index.ts",
|
|
@@ -61,6 +64,9 @@
|
|
|
61
64
|
"./vitest/setup": {
|
|
62
65
|
"types": "./dist/vitest/setup.d.mts",
|
|
63
66
|
"import": "./dist/vitest/setup.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./network-options": {
|
|
69
|
+
"types": "./dist/network-options.d.mts"
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
72
|
"main": "./dist/index.mjs",
|
|
@@ -72,7 +78,7 @@
|
|
|
72
78
|
"types"
|
|
73
79
|
],
|
|
74
80
|
"engines": {
|
|
75
|
-
"node": "^
|
|
81
|
+
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
|
|
76
82
|
},
|
|
77
83
|
"peerDependencies": {
|
|
78
84
|
"vitest": ">=4.0.0"
|
|
@@ -104,7 +110,7 @@
|
|
|
104
110
|
"test:dev": "vitest",
|
|
105
111
|
"pretest:types": "pnpm build",
|
|
106
112
|
"test:types": "pnpm run test:types:check",
|
|
107
|
-
"test:types:check": "tsd",
|
|
113
|
+
"test:types:check": "tsd && pnpm run test:types:pure",
|
|
108
114
|
"release": "pnpm publish",
|
|
109
115
|
"lint": "eslint .",
|
|
110
116
|
"lint:fix": "eslint . --fix",
|
|
@@ -123,6 +129,7 @@
|
|
|
123
129
|
"prebuild": "pnpm run structure:check && pnpm run typecheck && pnpm run typecheck:test && pnpm run catalog:check && pnpm run docs:check && pnpm run strict-alias:check && pnpm run omittable-option:check && pnpm run coverage:check",
|
|
124
130
|
"postbuild": "pnpm run callback-types:check && pnpm run promise-types:check",
|
|
125
131
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
126
|
-
"typecheck:test": "tsc --noEmit -p tsconfig.test.json"
|
|
132
|
+
"typecheck:test": "tsc --noEmit -p tsconfig.test.json",
|
|
133
|
+
"test:types:pure": "cd test-d-pure && tsd --files \"**/*.test-d.ts\""
|
|
127
134
|
}
|
|
128
135
|
}
|