@tossplace/pos-plugin-sdk 0.0.25 → 0.0.27
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/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/sdk.d.ts +38 -1
- package/package.json +1 -1
- package/types/index.d.ts +38 -1
package/dist/sdk.d.ts
CHANGED
|
@@ -82,8 +82,19 @@ export declare interface Catalog {
|
|
|
82
82
|
getCatalog: (catalogId: number) => Promise<PluginCatalogItem>;
|
|
83
83
|
getCatalogs: () => Promise<PluginCatalogItem[]>;
|
|
84
84
|
on(event: 'update' | 'add' | 'delete', callback: CatalogEventCallback): void;
|
|
85
|
+
on(event: 'before-add', callback: CatalogBeforeAddCallback): void;
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @publicApi
|
|
90
|
+
*/
|
|
91
|
+
export declare type CatalogBeforeAddCallback = (payload: {
|
|
92
|
+
payload: Partial<PluginCatalogItemDto>;
|
|
93
|
+
ui: Ui;
|
|
94
|
+
}) => Promise<{
|
|
95
|
+
initialValue?: PluginCatalogItemDto;
|
|
96
|
+
}>;
|
|
97
|
+
|
|
87
98
|
declare type CatalogEventCallback = (id: PluginCatalogItem['id']) => void;
|
|
88
99
|
|
|
89
100
|
/**
|
|
@@ -439,6 +450,28 @@ declare type MovePayload = {
|
|
|
439
450
|
};
|
|
440
451
|
};
|
|
441
452
|
|
|
453
|
+
/**
|
|
454
|
+
* @publicApi
|
|
455
|
+
*/
|
|
456
|
+
export declare interface Navigation {
|
|
457
|
+
navigate(page: 'plugin-tab', packageName?: string): void;
|
|
458
|
+
navigate(page: 'business-type-setting'): void;
|
|
459
|
+
/**
|
|
460
|
+
* 포스에서 페이지를 이동합니다.
|
|
461
|
+
* @param page business-type-setting 업종유형 변경, plugin-tab 플러그인 탭 이동
|
|
462
|
+
* @param packageName 이동할 탭의 이름, 없는 경우 첫번째 플러그인 탭으로 이동합니다
|
|
463
|
+
*/
|
|
464
|
+
navigate(page: 'business-type-setting' | 'plugin-tab', packageName?: string): void;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @publicApi
|
|
469
|
+
*/
|
|
470
|
+
export declare class NavigationImpl implements Navigation {
|
|
471
|
+
navigate(page: 'plugin-tab', packageName?: string): void;
|
|
472
|
+
navigate(page: 'business-type-setting'): void;
|
|
473
|
+
}
|
|
474
|
+
|
|
442
475
|
/**
|
|
443
476
|
* @publicApi
|
|
444
477
|
* @return number
|
|
@@ -575,7 +608,10 @@ export declare interface Payment {
|
|
|
575
608
|
getPayment: (paymentId: PluginPayment['id']) => Promise<PluginPayment>;
|
|
576
609
|
}
|
|
577
610
|
|
|
578
|
-
|
|
611
|
+
/**
|
|
612
|
+
* @publicApi
|
|
613
|
+
*/
|
|
614
|
+
export declare type PaymentBeforeCancelCallback = (payload: {
|
|
579
615
|
order: PluginOrder;
|
|
580
616
|
payment: PluginPayment;
|
|
581
617
|
}) => Promise<void>;
|
|
@@ -1743,6 +1779,7 @@ export declare type PosPluginSdk = {
|
|
|
1743
1779
|
sound: SoundTypes;
|
|
1744
1780
|
kdsOrder: KdsOrder;
|
|
1745
1781
|
pluginUnicast: PluginUnicastTypes;
|
|
1782
|
+
navigation: Navigation;
|
|
1746
1783
|
};
|
|
1747
1784
|
|
|
1748
1785
|
/**
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -82,8 +82,19 @@ export declare interface Catalog {
|
|
|
82
82
|
getCatalog: (catalogId: number) => Promise<PluginCatalogItem>;
|
|
83
83
|
getCatalogs: () => Promise<PluginCatalogItem[]>;
|
|
84
84
|
on(event: 'update' | 'add' | 'delete', callback: CatalogEventCallback): void;
|
|
85
|
+
on(event: 'before-add', callback: CatalogBeforeAddCallback): void;
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @publicApi
|
|
90
|
+
*/
|
|
91
|
+
export declare type CatalogBeforeAddCallback = (payload: {
|
|
92
|
+
payload: Partial<PluginCatalogItemDto>;
|
|
93
|
+
ui: Ui;
|
|
94
|
+
}) => Promise<{
|
|
95
|
+
initialValue?: PluginCatalogItemDto;
|
|
96
|
+
}>;
|
|
97
|
+
|
|
87
98
|
declare type CatalogEventCallback = (id: PluginCatalogItem['id']) => void;
|
|
88
99
|
|
|
89
100
|
/**
|
|
@@ -439,6 +450,28 @@ declare type MovePayload = {
|
|
|
439
450
|
};
|
|
440
451
|
};
|
|
441
452
|
|
|
453
|
+
/**
|
|
454
|
+
* @publicApi
|
|
455
|
+
*/
|
|
456
|
+
export declare interface Navigation {
|
|
457
|
+
navigate(page: 'plugin-tab', packageName?: string): void;
|
|
458
|
+
navigate(page: 'business-type-setting'): void;
|
|
459
|
+
/**
|
|
460
|
+
* 포스에서 페이지를 이동합니다.
|
|
461
|
+
* @param page business-type-setting 업종유형 변경, plugin-tab 플러그인 탭 이동
|
|
462
|
+
* @param packageName 이동할 탭의 이름, 없는 경우 첫번째 플러그인 탭으로 이동합니다
|
|
463
|
+
*/
|
|
464
|
+
navigate(page: 'business-type-setting' | 'plugin-tab', packageName?: string): void;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @publicApi
|
|
469
|
+
*/
|
|
470
|
+
export declare class NavigationImpl implements Navigation {
|
|
471
|
+
navigate(page: 'plugin-tab', packageName?: string): void;
|
|
472
|
+
navigate(page: 'business-type-setting'): void;
|
|
473
|
+
}
|
|
474
|
+
|
|
442
475
|
/**
|
|
443
476
|
* @publicApi
|
|
444
477
|
* @return number
|
|
@@ -575,7 +608,10 @@ export declare interface Payment {
|
|
|
575
608
|
getPayment: (paymentId: PluginPayment['id']) => Promise<PluginPayment>;
|
|
576
609
|
}
|
|
577
610
|
|
|
578
|
-
|
|
611
|
+
/**
|
|
612
|
+
* @publicApi
|
|
613
|
+
*/
|
|
614
|
+
export declare type PaymentBeforeCancelCallback = (payload: {
|
|
579
615
|
order: PluginOrder;
|
|
580
616
|
payment: PluginPayment;
|
|
581
617
|
}) => Promise<void>;
|
|
@@ -1736,6 +1772,7 @@ export declare type PosPluginSdk = {
|
|
|
1736
1772
|
sound: SoundTypes;
|
|
1737
1773
|
kdsOrder: KdsOrder;
|
|
1738
1774
|
pluginUnicast: PluginUnicastTypes;
|
|
1775
|
+
navigation: Navigation;
|
|
1739
1776
|
};
|
|
1740
1777
|
|
|
1741
1778
|
/**
|