superapp-miniapp-invoke-native 1.9.14 → 1.10.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 CHANGED
@@ -131,7 +131,7 @@ declare class CommunicatePlugins implements CommunicatePluginsHookType {
131
131
  homeBtnSwitch(isClick: homeIsClickType): Promise<void | undefined>;
132
132
  setBackBtn(backBtnApiParams: BackBtnParamsType): void;
133
133
  setHomeBtn(cb: PluginCallback): void;
134
- setFabBtn(data: SetFabDataType, position: FabPositionType): void;
134
+ setFabBtn(data: SetFabDataType, position?: FabPositionType): void;
135
135
  touchListener(touchListenerParams: TouchListenerParamsType): void;
136
136
  disableFAB(state: DisableFABType): Promise<DisableFABType | undefined>;
137
137
  disableBack(state: DisableBackType): Promise<DisableBackType | undefined>;
@@ -194,6 +194,12 @@ declare interface CreatePollingParamsType {
194
194
  callBack?: (value: NativeSendPollingParamsType) => void;
195
195
  }
196
196
 
197
+ declare interface CreatePrintParamsType {
198
+ printParams: PrintParamsType;
199
+ mounted?: (fn: () => void) => void;
200
+ callBack?: (value: NativeSendPrintParamsType) => void;
201
+ }
202
+
197
203
  declare const _default: NativeApi;
198
204
  export default _default;
199
205
 
@@ -231,7 +237,7 @@ declare interface DispatchToShellParamsType {
231
237
  [key: string]: any;
232
238
  }
233
239
 
234
- declare type FabBtnHandleType = (data: SetFabDataType | any, position: FabPositionType) => void;
240
+ declare type FabBtnHandleType = (data: SetFabDataType | any, position?: FabPositionType) => void;
235
241
 
236
242
  declare type FabPositionType = {
237
243
  right: number;
@@ -354,6 +360,7 @@ export declare class NativeApi {
354
360
  paymentPlugins: PaymentPlugins;
355
361
  cameraForTakePhotoPlugin: CameraForTakePhotoPlugins;
356
362
  httpPlugin: HttpPlugins;
363
+ printPlugins: PrintPlugins;
357
364
  }
358
365
 
359
366
  declare interface NativeInfoConfigType {
@@ -374,6 +381,10 @@ declare interface NativeSendPollingParamsType {
374
381
  [key: string]: any;
375
382
  }
376
383
 
384
+ declare interface NativeSendPrintParamsType {
385
+ [key: string]: any;
386
+ }
387
+
377
388
  declare type PackOrdersScanBoxType = "pack_orders_scan_box" | "collect_orders_scan_box";
378
389
 
379
390
  declare class PaymentPlugins implements PaymentPluginsHandleType {
@@ -411,6 +422,31 @@ declare interface PollingPluginsHandleType {
411
422
  getStatus(): Promise<any>;
412
423
  }
413
424
 
425
+ declare interface PrintParamsType {
426
+ miniAppName?: string;
427
+ action?: string;
428
+ copies?: number;
429
+ printerName?: string;
430
+ base64Data?: string;
431
+ referencePath?: string;
432
+ referenceType?: string;
433
+ [key: string]: any;
434
+ }
435
+
436
+ declare class PrintPlugins implements PrintPluginsHandleType {
437
+ printList: any[];
438
+ constructor();
439
+ print(createPrintParams: CreatePrintParamsType): {
440
+ id: string;
441
+ };
442
+ getStatus(): Promise<any>;
443
+ }
444
+
445
+ declare interface PrintPluginsHandleType {
446
+ print(createPrintParamsType: CreatePrintParamsType): void;
447
+ getStatus(): Promise<any>;
448
+ }
449
+
414
450
  declare interface Process_ParamsType {
415
451
  [key: string]: string;
416
452
  }