superapp-miniapp-invoke-native 1.9.14 → 1.10.1

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;
@@ -325,14 +331,26 @@ declare interface MiniAppKongType {
325
331
  [key: string]: any;
326
332
  }
327
333
 
334
+ declare interface MiniAppLinkType {
335
+ url: string;
336
+ target: string;
337
+ title?: string;
338
+ name?: string;
339
+ }
340
+
328
341
  declare interface MiniAppParamsType {
329
342
  miniAppIds?: any[];
330
343
  }
331
344
 
332
- declare interface MiniAppType {
345
+ declare type MiniAppType = {
333
346
  miniApp: string;
347
+ link?: never;
334
348
  params?: string;
335
- }
349
+ } | {
350
+ miniApp?: never;
351
+ link: MiniAppLinkType;
352
+ params?: string;
353
+ };
336
354
 
337
355
  declare interface MiniAppVersionType {
338
356
  miniAppVersion: string;
@@ -354,6 +372,7 @@ export declare class NativeApi {
354
372
  paymentPlugins: PaymentPlugins;
355
373
  cameraForTakePhotoPlugin: CameraForTakePhotoPlugins;
356
374
  httpPlugin: HttpPlugins;
375
+ printPlugins: PrintPlugins;
357
376
  }
358
377
 
359
378
  declare interface NativeInfoConfigType {
@@ -374,6 +393,10 @@ declare interface NativeSendPollingParamsType {
374
393
  [key: string]: any;
375
394
  }
376
395
 
396
+ declare interface NativeSendPrintParamsType {
397
+ [key: string]: any;
398
+ }
399
+
377
400
  declare type PackOrdersScanBoxType = "pack_orders_scan_box" | "collect_orders_scan_box";
378
401
 
379
402
  declare class PaymentPlugins implements PaymentPluginsHandleType {
@@ -411,6 +434,31 @@ declare interface PollingPluginsHandleType {
411
434
  getStatus(): Promise<any>;
412
435
  }
413
436
 
437
+ declare interface PrintParamsType {
438
+ miniAppName?: string;
439
+ action?: string;
440
+ copies?: number;
441
+ printerName?: string;
442
+ base64Data?: string;
443
+ referencePath?: string;
444
+ referenceType?: string;
445
+ [key: string]: any;
446
+ }
447
+
448
+ declare class PrintPlugins implements PrintPluginsHandleType {
449
+ printList: any[];
450
+ constructor();
451
+ print(createPrintParams: CreatePrintParamsType): {
452
+ id: string;
453
+ };
454
+ getStatus(): Promise<any>;
455
+ }
456
+
457
+ declare interface PrintPluginsHandleType {
458
+ print(createPrintParamsType: CreatePrintParamsType): void;
459
+ getStatus(): Promise<any>;
460
+ }
461
+
414
462
  declare interface Process_ParamsType {
415
463
  [key: string]: string;
416
464
  }