@tossplace/pos-plugin-sdk 0.0.9 → 0.0.10
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/.github/workflows/release.yml +54 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/sdk.d.ts +49 -3
- package/package.json +1 -1
- package/types/index.d.ts +49 -3
package/dist/sdk.d.ts
CHANGED
|
@@ -122,11 +122,42 @@ declare type CtaInput = {
|
|
|
122
122
|
ctaType: 'primary' | 'danger' | 'dark';
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @publicApi
|
|
127
|
+
*/
|
|
128
|
+
export declare interface DeliveryCatalog {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
price: MenuPrice[];
|
|
132
|
+
groupId: string;
|
|
133
|
+
groupName: string;
|
|
134
|
+
vendorName: string;
|
|
135
|
+
status: DeliveryItemStatus;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @publicApi
|
|
140
|
+
*/
|
|
141
|
+
export declare interface DeliveryCatalogOption {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
price?: number;
|
|
145
|
+
groupId: string;
|
|
146
|
+
groupName: string;
|
|
147
|
+
vendorName: string;
|
|
148
|
+
status: DeliveryItemStatus;
|
|
149
|
+
}
|
|
150
|
+
|
|
125
151
|
/**
|
|
126
152
|
* @publicApi
|
|
127
153
|
*/
|
|
128
154
|
export declare type DeliveryConnectionStatusErrorCode = 'NOT_RUNNING' | 'NOT_LOGGED_IN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM';
|
|
129
155
|
|
|
156
|
+
/**
|
|
157
|
+
* @publicApi
|
|
158
|
+
*/
|
|
159
|
+
export declare type DeliveryItemStatus = 'sold-out' | 'hide' | 'active' | 'invisible';
|
|
160
|
+
|
|
130
161
|
declare type DeliveryOrder = Order_2 & {
|
|
131
162
|
type: 'DELIVERY';
|
|
132
163
|
/**
|
|
@@ -148,7 +179,7 @@ declare type DeliveryOrder = Order_2 & {
|
|
|
148
179
|
/**
|
|
149
180
|
* @publicApi
|
|
150
181
|
*/
|
|
151
|
-
declare type DeliveryStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED' | 'RIDER_ASSIGNED' | 'RIDER_ARRIVE_SOON' | 'RIDER_PICKUP_COMPLETED' | 'DONE';
|
|
182
|
+
export declare type DeliveryStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED' | 'RIDER_ASSIGNED' | 'RIDER_ARRIVE_SOON' | 'RIDER_PICKUP_COMPLETED' | 'DONE';
|
|
152
183
|
|
|
153
184
|
/**
|
|
154
185
|
* @publicApi
|
|
@@ -229,6 +260,12 @@ export declare interface DraftOrder {
|
|
|
229
260
|
|
|
230
261
|
declare type Element_2 = BarcodeElements | InputElements;
|
|
231
262
|
|
|
263
|
+
declare class ErrorImpl {
|
|
264
|
+
private readonly webview;
|
|
265
|
+
constructor(webview: WebView);
|
|
266
|
+
addErrorListener(handler: (error: Error) => void): void;
|
|
267
|
+
}
|
|
268
|
+
|
|
232
269
|
/**
|
|
233
270
|
* @publicApi
|
|
234
271
|
*/
|
|
@@ -401,6 +438,14 @@ export declare interface MenuOption {
|
|
|
401
438
|
on(event: 'sold-out' | 'on-sale' | 'update' | 'add' | 'delete', callback: (option: PluginCatalogItemOption) => void): void;
|
|
402
439
|
}
|
|
403
440
|
|
|
441
|
+
/**
|
|
442
|
+
* @publicApi
|
|
443
|
+
*/
|
|
444
|
+
export declare interface MenuPrice {
|
|
445
|
+
name: string;
|
|
446
|
+
price: number;
|
|
447
|
+
}
|
|
448
|
+
|
|
404
449
|
/**
|
|
405
450
|
* @publicApi
|
|
406
451
|
*/
|
|
@@ -1560,6 +1605,7 @@ export declare type PosPluginSdk = {
|
|
|
1560
1605
|
setting: SettingTypes;
|
|
1561
1606
|
draftOrder: DraftOrder;
|
|
1562
1607
|
navigation: Navigation;
|
|
1608
|
+
error: ErrorImpl;
|
|
1563
1609
|
};
|
|
1564
1610
|
|
|
1565
1611
|
/**
|
|
@@ -1634,7 +1680,7 @@ export declare interface StorageTypes {
|
|
|
1634
1680
|
/**
|
|
1635
1681
|
* @publicApi
|
|
1636
1682
|
*/
|
|
1637
|
-
declare type StoreStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED'
|
|
1683
|
+
export declare type StoreStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED'
|
|
1638
1684
|
/**
|
|
1639
1685
|
* 손님이 가져감
|
|
1640
1686
|
*/
|
|
@@ -1738,7 +1784,7 @@ export declare type VanType = 'NICE' | 'KIS' | 'SMARTRO' | 'KOVAN';
|
|
|
1738
1784
|
* @publicApi
|
|
1739
1785
|
*/
|
|
1740
1786
|
export declare class Websocket {
|
|
1741
|
-
|
|
1787
|
+
readonly url: string;
|
|
1742
1788
|
private readonly headers;
|
|
1743
1789
|
private readonly options?;
|
|
1744
1790
|
onMessageCallback: ((message: string) => void) | undefined;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -122,11 +122,42 @@ declare type CtaInput = {
|
|
|
122
122
|
ctaType: 'primary' | 'danger' | 'dark';
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @publicApi
|
|
127
|
+
*/
|
|
128
|
+
export declare interface DeliveryCatalog {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
price: MenuPrice[];
|
|
132
|
+
groupId: string;
|
|
133
|
+
groupName: string;
|
|
134
|
+
vendorName: string;
|
|
135
|
+
status: DeliveryItemStatus;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @publicApi
|
|
140
|
+
*/
|
|
141
|
+
export declare interface DeliveryCatalogOption {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
price?: number;
|
|
145
|
+
groupId: string;
|
|
146
|
+
groupName: string;
|
|
147
|
+
vendorName: string;
|
|
148
|
+
status: DeliveryItemStatus;
|
|
149
|
+
}
|
|
150
|
+
|
|
125
151
|
/**
|
|
126
152
|
* @publicApi
|
|
127
153
|
*/
|
|
128
154
|
export declare type DeliveryConnectionStatusErrorCode = 'NOT_RUNNING' | 'NOT_LOGGED_IN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM';
|
|
129
155
|
|
|
156
|
+
/**
|
|
157
|
+
* @publicApi
|
|
158
|
+
*/
|
|
159
|
+
export declare type DeliveryItemStatus = 'sold-out' | 'hide' | 'active' | 'invisible';
|
|
160
|
+
|
|
130
161
|
declare type DeliveryOrder = Order_2 & {
|
|
131
162
|
type: 'DELIVERY';
|
|
132
163
|
/**
|
|
@@ -148,7 +179,7 @@ declare type DeliveryOrder = Order_2 & {
|
|
|
148
179
|
/**
|
|
149
180
|
* @publicApi
|
|
150
181
|
*/
|
|
151
|
-
declare type DeliveryStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED' | 'RIDER_ASSIGNED' | 'RIDER_ARRIVE_SOON' | 'RIDER_PICKUP_COMPLETED' | 'DONE';
|
|
182
|
+
export declare type DeliveryStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED' | 'RIDER_ASSIGNED' | 'RIDER_ARRIVE_SOON' | 'RIDER_PICKUP_COMPLETED' | 'DONE';
|
|
152
183
|
|
|
153
184
|
/**
|
|
154
185
|
* @publicApi
|
|
@@ -229,6 +260,12 @@ export declare interface DraftOrder {
|
|
|
229
260
|
|
|
230
261
|
declare type Element_2 = BarcodeElements | InputElements;
|
|
231
262
|
|
|
263
|
+
declare class ErrorImpl {
|
|
264
|
+
private readonly webview;
|
|
265
|
+
constructor(webview: WebView);
|
|
266
|
+
addErrorListener(handler: (error: Error) => void): void;
|
|
267
|
+
}
|
|
268
|
+
|
|
232
269
|
/**
|
|
233
270
|
* @publicApi
|
|
234
271
|
*/
|
|
@@ -388,6 +425,14 @@ export declare interface MenuOption {
|
|
|
388
425
|
on(event: 'sold-out' | 'on-sale' | 'update' | 'add' | 'delete', callback: (option: PluginCatalogItemOption) => void): void;
|
|
389
426
|
}
|
|
390
427
|
|
|
428
|
+
/**
|
|
429
|
+
* @publicApi
|
|
430
|
+
*/
|
|
431
|
+
export declare interface MenuPrice {
|
|
432
|
+
name: string;
|
|
433
|
+
price: number;
|
|
434
|
+
}
|
|
435
|
+
|
|
391
436
|
/**
|
|
392
437
|
* @publicApi
|
|
393
438
|
*/
|
|
@@ -1540,6 +1585,7 @@ export declare type PosPluginSdk = {
|
|
|
1540
1585
|
setting: SettingTypes;
|
|
1541
1586
|
draftOrder: DraftOrder;
|
|
1542
1587
|
navigation: Navigation;
|
|
1588
|
+
error: ErrorImpl;
|
|
1543
1589
|
};
|
|
1544
1590
|
|
|
1545
1591
|
/**
|
|
@@ -1614,7 +1660,7 @@ export declare interface StorageTypes {
|
|
|
1614
1660
|
/**
|
|
1615
1661
|
* @publicApi
|
|
1616
1662
|
*/
|
|
1617
|
-
declare type StoreStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED'
|
|
1663
|
+
export declare type StoreStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLED' | 'CANCELLED'
|
|
1618
1664
|
/**
|
|
1619
1665
|
* 손님이 가져감
|
|
1620
1666
|
*/
|
|
@@ -1718,7 +1764,7 @@ export declare type VanType = 'NICE' | 'KIS' | 'SMARTRO' | 'KOVAN';
|
|
|
1718
1764
|
* @publicApi
|
|
1719
1765
|
*/
|
|
1720
1766
|
export declare class Websocket {
|
|
1721
|
-
|
|
1767
|
+
readonly url: string;
|
|
1722
1768
|
private readonly headers;
|
|
1723
1769
|
private readonly options?;
|
|
1724
1770
|
onMessageCallback: ((message: string) => void) | undefined;
|