superapp-miniapp-invoke-native 1.4.0 → 1.5.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/lib/main.d.ts +35 -0
- package/lib/main.js +414 -333
- package/lib/main.umd.cjs +1 -1
- package/package.json +1 -1
package/lib/main.d.ts
CHANGED
|
@@ -140,9 +140,19 @@ declare interface CountAssistPluginsType {
|
|
|
140
140
|
setCountAssistBtn(setCountAssistBtnParams: SetCountAssistBtnParamsType): void;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
declare interface CreatePollingParamsType {
|
|
144
|
+
pollingParams: PollingParamsType;
|
|
145
|
+
mounted: (fn: () => void) => void;
|
|
146
|
+
callBack?: (value: NativeSendPollingParamsType) => void;
|
|
147
|
+
}
|
|
148
|
+
|
|
143
149
|
declare const _default: NativeApi;
|
|
144
150
|
export default _default;
|
|
145
151
|
|
|
152
|
+
declare interface DestroyPollingParamsType {
|
|
153
|
+
pollingId: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
146
156
|
declare interface DeviceInteractionHandleType {
|
|
147
157
|
callVibrate: () => Promise<void | undefined>;
|
|
148
158
|
callErrorBeep: () => Promise<void | undefined>;
|
|
@@ -243,6 +253,7 @@ export declare class NativeApi {
|
|
|
243
253
|
clickStreamPlugins: ClickStreamPlugins;
|
|
244
254
|
lifecyclePlugins: LifecyclePlugins;
|
|
245
255
|
deviceInteractionPlugins: DeviceInteractionPlugin;
|
|
256
|
+
pollingPlugins: PollingPlugins;
|
|
246
257
|
}
|
|
247
258
|
|
|
248
259
|
declare interface NativeInfoConfigType {
|
|
@@ -258,12 +269,36 @@ declare interface NativeInfoConfigType {
|
|
|
258
269
|
};
|
|
259
270
|
}
|
|
260
271
|
|
|
272
|
+
declare interface NativeSendPollingParamsType {
|
|
273
|
+
pollingId: string;
|
|
274
|
+
[key: string]: any;
|
|
275
|
+
}
|
|
276
|
+
|
|
261
277
|
declare type PackOrdersScanBoxType = "pack_orders_scan_box" | "collect_orders_scan_box";
|
|
262
278
|
|
|
263
279
|
declare interface PickCameraScanParamsType {
|
|
264
280
|
title: string;
|
|
265
281
|
}
|
|
266
282
|
|
|
283
|
+
declare interface PollingParamsType {
|
|
284
|
+
pollingId: string;
|
|
285
|
+
pollingStartTime: number;
|
|
286
|
+
pollingEndTime: number;
|
|
287
|
+
delay: number;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
declare class PollingPlugins implements PollingPluginsHandleType {
|
|
291
|
+
pollingList: any[];
|
|
292
|
+
constructor();
|
|
293
|
+
create(createPollingParams: CreatePollingParamsType): () => void | null;
|
|
294
|
+
destroy(destroyPollingParams: DestroyPollingParamsType): void;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
declare interface PollingPluginsHandleType {
|
|
298
|
+
create(createPollingParams: CreatePollingParamsType): void;
|
|
299
|
+
destroy(pollingParams: PollingParamsType): void;
|
|
300
|
+
}
|
|
301
|
+
|
|
267
302
|
declare interface SetCountAssistBtnParamsType {
|
|
268
303
|
mounted: (fn: () => void) => void;
|
|
269
304
|
beforeUnmount: (fn: () => void) => void;
|