@tossplace/pos-plugin-sdk 0.0.22 → 0.0.24
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 +40 -3
- package/package.json +1 -1
- package/types/index.d.ts +40 -3
package/dist/sdk.d.ts
CHANGED
|
@@ -395,6 +395,41 @@ export declare interface Merchant {
|
|
|
395
395
|
getMerchant: () => Promise<TossMerchant>;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
declare type MergePayload = {
|
|
399
|
+
from: {
|
|
400
|
+
table: {
|
|
401
|
+
id: PluginTable['id'];
|
|
402
|
+
};
|
|
403
|
+
order: {
|
|
404
|
+
id: PluginOrder['id'];
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
to: {
|
|
408
|
+
table: {
|
|
409
|
+
id: PluginTable['id'];
|
|
410
|
+
};
|
|
411
|
+
order: {
|
|
412
|
+
id: PluginOrder['id'];
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
declare type MovePayload = {
|
|
418
|
+
order: {
|
|
419
|
+
id: PluginOrder['id'];
|
|
420
|
+
};
|
|
421
|
+
from: {
|
|
422
|
+
table: {
|
|
423
|
+
id: PluginTable['id'];
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
to: {
|
|
427
|
+
table: {
|
|
428
|
+
id: PluginTable['id'];
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
|
|
398
433
|
/**
|
|
399
434
|
* @publicApi
|
|
400
435
|
* @return number
|
|
@@ -1163,11 +1198,12 @@ export declare type PluginHttpResponse = {
|
|
|
1163
1198
|
|
|
1164
1199
|
declare class PluginImpl implements Plugin_2 {
|
|
1165
1200
|
constructor();
|
|
1166
|
-
|
|
1167
|
-
getPluginInfo(): Promise<{
|
|
1201
|
+
getPluginInfo: () => Promise<{
|
|
1168
1202
|
name: string;
|
|
1169
1203
|
version: string;
|
|
1170
1204
|
}>;
|
|
1205
|
+
private initializePlugin;
|
|
1206
|
+
private fetchPluginInfo;
|
|
1171
1207
|
}
|
|
1172
1208
|
|
|
1173
1209
|
/**
|
|
@@ -1800,7 +1836,8 @@ export declare interface Table {
|
|
|
1800
1836
|
})[]>;
|
|
1801
1837
|
getTable: (tableId: number) => Promise<PluginTable>;
|
|
1802
1838
|
on(event: 'clear' | 'add' | 'delete' | 'update', callback: (id: PluginTable['id']) => void): void;
|
|
1803
|
-
on(event: 'move', callback: (
|
|
1839
|
+
on(event: 'move', callback: (payload: MovePayload) => void): void;
|
|
1840
|
+
on(event: 'merge', callback: (payload: MergePayload) => void): void;
|
|
1804
1841
|
}
|
|
1805
1842
|
|
|
1806
1843
|
/**
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -395,6 +395,41 @@ export declare interface Merchant {
|
|
|
395
395
|
getMerchant: () => Promise<TossMerchant>;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
declare type MergePayload = {
|
|
399
|
+
from: {
|
|
400
|
+
table: {
|
|
401
|
+
id: PluginTable['id'];
|
|
402
|
+
};
|
|
403
|
+
order: {
|
|
404
|
+
id: PluginOrder['id'];
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
to: {
|
|
408
|
+
table: {
|
|
409
|
+
id: PluginTable['id'];
|
|
410
|
+
};
|
|
411
|
+
order: {
|
|
412
|
+
id: PluginOrder['id'];
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
declare type MovePayload = {
|
|
418
|
+
order: {
|
|
419
|
+
id: PluginOrder['id'];
|
|
420
|
+
};
|
|
421
|
+
from: {
|
|
422
|
+
table: {
|
|
423
|
+
id: PluginTable['id'];
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
to: {
|
|
427
|
+
table: {
|
|
428
|
+
id: PluginTable['id'];
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
|
|
398
433
|
/**
|
|
399
434
|
* @publicApi
|
|
400
435
|
* @return number
|
|
@@ -1163,11 +1198,12 @@ export declare type PluginHttpResponse = {
|
|
|
1163
1198
|
|
|
1164
1199
|
declare class PluginImpl implements Plugin_2 {
|
|
1165
1200
|
constructor();
|
|
1166
|
-
|
|
1167
|
-
getPluginInfo(): Promise<{
|
|
1201
|
+
getPluginInfo: () => Promise<{
|
|
1168
1202
|
name: string;
|
|
1169
1203
|
version: string;
|
|
1170
1204
|
}>;
|
|
1205
|
+
private initializePlugin;
|
|
1206
|
+
private fetchPluginInfo;
|
|
1171
1207
|
}
|
|
1172
1208
|
|
|
1173
1209
|
/**
|
|
@@ -1793,7 +1829,8 @@ export declare interface Table {
|
|
|
1793
1829
|
})[]>;
|
|
1794
1830
|
getTable: (tableId: number) => Promise<PluginTable>;
|
|
1795
1831
|
on(event: 'clear' | 'add' | 'delete' | 'update', callback: (id: PluginTable['id']) => void): void;
|
|
1796
|
-
on(event: 'move', callback: (
|
|
1832
|
+
on(event: 'move', callback: (payload: MovePayload) => void): void;
|
|
1833
|
+
on(event: 'merge', callback: (payload: MergePayload) => void): void;
|
|
1797
1834
|
}
|
|
1798
1835
|
|
|
1799
1836
|
/**
|