@tossplace/pos-plugin-sdk 0.0.6 → 0.0.8
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/{npm-publish.yml → release.yml} +4 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/sdk.d.ts +131 -118
- package/package.json +1 -1
- package/types/index.d.ts +124 -118
package/types/index.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ declare const AvailableLanguageCodes: {
|
|
|
7
7
|
readonly English: "en-US";
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
+
declare interface Barcode {
|
|
11
|
+
send(barcode: string): Promise<void>;
|
|
12
|
+
on(event: 'scan', callback: (barcode: string) => void): void;
|
|
13
|
+
useBarcodeScan(): void;
|
|
14
|
+
unUseBarcodeScan(): void;
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
*/
|
|
12
19
|
declare type BarcodeElements = {
|
|
@@ -35,12 +42,6 @@ declare type BaseInput = {
|
|
|
35
42
|
required: boolean;
|
|
36
43
|
};
|
|
37
44
|
|
|
38
|
-
declare type BaseInput_2 = {
|
|
39
|
-
label: string;
|
|
40
|
-
required: boolean;
|
|
41
|
-
id: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
45
|
declare type CancelCallback = (order: PluginOrder, payment: PluginPayment, ui: Ui) => Promise<PluginCancelledPaymentDto | undefined>;
|
|
45
46
|
|
|
46
47
|
/**
|
|
@@ -71,9 +72,14 @@ export declare interface CashReceiptTypes {
|
|
|
71
72
|
* @publicApi
|
|
72
73
|
*/
|
|
73
74
|
export declare interface Catalog {
|
|
75
|
+
getCatalog: (catalogId: number) => Promise<PluginCatalogItem>;
|
|
74
76
|
getCatalogs: () => Promise<PluginCatalogItem[]>;
|
|
77
|
+
on(event: 'update' | 'add' | 'delete', callback: CatalogEventCallback): void;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated 다음 버전에서 제거 예정입니다
|
|
80
|
+
*/
|
|
81
|
+
on(event: 'sold-out' | 'on-sale', callback: CatalogEventCallback): void;
|
|
75
82
|
on(event: 'sold-out' | 'on-sale' | 'update' | 'add' | 'delete', callback: CatalogEventCallback): void;
|
|
76
|
-
on(event: 'before-add', callback: CatalogRequiredResponseEventCallback): void;
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
declare type CatalogEventCallback = (catalog: PluginCatalogItem) => void;
|
|
@@ -83,22 +89,17 @@ declare type CatalogEventCallback = (catalog: PluginCatalogItem) => void;
|
|
|
83
89
|
*/
|
|
84
90
|
export declare type CatalogItemOptionChoiceState = 'ON_SALE' | 'SOLD_OUT';
|
|
85
91
|
|
|
86
|
-
declare type CatalogRequiredResponseEventCallback = (payload: {
|
|
87
|
-
payload: Partial<PluginCatalogItemDto>;
|
|
88
|
-
ui: Ui;
|
|
89
|
-
}) => Promise<{
|
|
90
|
-
initialValue?: PluginCatalogItemDto;
|
|
91
|
-
}>;
|
|
92
|
-
|
|
93
92
|
/**
|
|
94
93
|
* @publicApi
|
|
95
94
|
*/
|
|
96
95
|
export declare interface CategoryTypes {
|
|
97
96
|
getCategories: () => Promise<PluginCatalogCategory[]>;
|
|
97
|
+
getCategory: (categoryId: number) => Promise<PluginCatalogCategory>;
|
|
98
98
|
on: (event: 'update' | 'add' | 'delete', callback: (category: PluginCatalogCategory) => void) => void;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
+
* @publicApi
|
|
102
103
|
* @return 선택된 values id의 배열 string[]
|
|
103
104
|
* @example ['option1', 'option2']
|
|
104
105
|
*/
|
|
@@ -112,25 +113,20 @@ declare type CheckBoxInput = Omit<BaseInput, 'placeholder'> & {
|
|
|
112
113
|
};
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
|
-
* @
|
|
116
|
-
* @example ['option1', 'option2']
|
|
116
|
+
* @publicApi
|
|
117
117
|
*/
|
|
118
|
-
declare type CheckBoxInput_2 = Omit<BaseInput_2, 'placeholder'> & {
|
|
119
|
-
type: 'checkbox';
|
|
120
|
-
/**
|
|
121
|
-
* @description 선택된 value의 id의 배열
|
|
122
|
-
*/
|
|
123
|
-
default: string[];
|
|
124
|
-
values: InputValue_2[];
|
|
125
|
-
};
|
|
126
|
-
|
|
127
118
|
declare type CtaInput = {
|
|
128
119
|
type: 'cta';
|
|
129
120
|
id: string;
|
|
130
121
|
text: string;
|
|
131
|
-
ctaType: 'primary' | 'danger' | '
|
|
122
|
+
ctaType: 'primary' | 'danger' | 'dark';
|
|
132
123
|
};
|
|
133
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @publicApi
|
|
127
|
+
*/
|
|
128
|
+
export declare type DeliveryConnectionStatusErrorCode = 'NOT_RUNNING' | 'NOT_LOGGED_IN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM';
|
|
129
|
+
|
|
134
130
|
declare type DeliveryOrder = Order_2 & {
|
|
135
131
|
type: 'DELIVERY';
|
|
136
132
|
/**
|
|
@@ -181,7 +177,7 @@ export declare type DeviceInfo = {
|
|
|
181
177
|
osVersion?: string;
|
|
182
178
|
businessType: {
|
|
183
179
|
business: {
|
|
184
|
-
type: '
|
|
180
|
+
type: 'CAFE' | 'RESTAURANT';
|
|
185
181
|
};
|
|
186
182
|
operation: {
|
|
187
183
|
payment: {
|
|
@@ -366,32 +362,30 @@ declare type InputResponse = {
|
|
|
366
362
|
errorMessage: string;
|
|
367
363
|
};
|
|
368
364
|
|
|
365
|
+
/**
|
|
366
|
+
* @publicApi
|
|
367
|
+
*/
|
|
369
368
|
declare type InputValue = {
|
|
370
369
|
id: string;
|
|
371
370
|
label: string;
|
|
372
371
|
};
|
|
373
372
|
|
|
374
|
-
declare type InputValue_2 = {
|
|
375
|
-
id: string;
|
|
376
|
-
label: string;
|
|
377
|
-
};
|
|
378
|
-
|
|
379
373
|
declare type Join<T extends string, U extends string> = `${T}${U}` | '0';
|
|
380
374
|
|
|
381
375
|
declare type Languages = Record<PluginLanguageCode, string>;
|
|
382
376
|
|
|
383
|
-
/**
|
|
384
|
-
* @publicApi
|
|
385
|
-
* @deprecated
|
|
386
|
-
*/
|
|
387
|
-
declare type LegacyPluginInputType = PluginInputsLegacy['type'];
|
|
388
|
-
|
|
389
377
|
/**
|
|
390
378
|
* @publicApi
|
|
391
379
|
*/
|
|
392
380
|
export declare interface MenuOption {
|
|
393
381
|
getOptions: () => Promise<PluginCatalogItemOption[]>;
|
|
394
|
-
|
|
382
|
+
getOption: (optionId: number) => Promise<PluginCatalogItemOption>;
|
|
383
|
+
/**
|
|
384
|
+
* @deprecated 다음 버전에서 제거 예정입니다
|
|
385
|
+
*/
|
|
386
|
+
on(event: 'sold-out' | 'on-sale', callback: (option: PluginCatalogItemOption) => void): void;
|
|
387
|
+
on(event: 'update' | 'add' | 'delete', callback: (option: PluginCatalogItemOption) => void): void;
|
|
388
|
+
on(event: 'sold-out' | 'on-sale' | 'update' | 'add' | 'delete', callback: (option: PluginCatalogItemOption) => void): void;
|
|
395
389
|
}
|
|
396
390
|
|
|
397
391
|
/**
|
|
@@ -424,6 +418,7 @@ export declare class NavigationImpl implements Navigation {
|
|
|
424
418
|
}
|
|
425
419
|
|
|
426
420
|
/**
|
|
421
|
+
* @publicApi
|
|
427
422
|
* @return number
|
|
428
423
|
*/
|
|
429
424
|
declare type NumberInput = BaseInput & {
|
|
@@ -447,8 +442,8 @@ declare type NumberInput = BaseInput & {
|
|
|
447
442
|
export declare interface Order {
|
|
448
443
|
getOrder: (id: string) => Promise<PluginOrder>;
|
|
449
444
|
/**
|
|
450
|
-
* @param start
|
|
451
|
-
* @param end
|
|
445
|
+
* @param start yyyy-MM-dd
|
|
446
|
+
* @param end yyyy-MM-dd
|
|
452
447
|
* @description createdAt 기준으로 주문을 조회합니다
|
|
453
448
|
*/
|
|
454
449
|
getOrders: (range: {
|
|
@@ -456,9 +451,9 @@ export declare interface Order {
|
|
|
456
451
|
end: string;
|
|
457
452
|
}) => Promise<PluginOrder[]>;
|
|
458
453
|
/**
|
|
459
|
-
*
|
|
454
|
+
* @deprecated
|
|
460
455
|
*/
|
|
461
|
-
on
|
|
456
|
+
on(event: 'cancel', callback: (order: PluginOrder) => void): void;
|
|
462
457
|
cancel: (id: string) => Promise<void>;
|
|
463
458
|
add: (order: PluginOrderDto) => Promise<PluginOrder>;
|
|
464
459
|
/**
|
|
@@ -513,6 +508,7 @@ declare type Order_2 = {
|
|
|
513
508
|
declare type OrderItemType = 'ITEM' | 'DELIVERY_FEE' | 'PREPAID_CARD' | 'MULTI_USE_TICKET';
|
|
514
509
|
|
|
515
510
|
/**
|
|
511
|
+
* @publicApi
|
|
516
512
|
* @return string
|
|
517
513
|
*/
|
|
518
514
|
declare type PasswordInput = BaseInput & {
|
|
@@ -521,15 +517,6 @@ declare type PasswordInput = BaseInput & {
|
|
|
521
517
|
placeholder?: string;
|
|
522
518
|
};
|
|
523
519
|
|
|
524
|
-
/**
|
|
525
|
-
* @return string
|
|
526
|
-
*/
|
|
527
|
-
declare type PasswordInput_2 = BaseInput_2 & {
|
|
528
|
-
type: 'password';
|
|
529
|
-
default: string;
|
|
530
|
-
placeholder?: string;
|
|
531
|
-
};
|
|
532
|
-
|
|
533
520
|
declare type PayCallback = (order: PluginOrder, price: PluginPrice, ui: Ui) => Promise<PaymentMethodResponse | undefined>;
|
|
534
521
|
|
|
535
522
|
/**
|
|
@@ -545,9 +532,10 @@ export declare interface Payment {
|
|
|
545
532
|
add: (order: {
|
|
546
533
|
id: string;
|
|
547
534
|
}, paymentDto: PluginPaymentDto) => Promise<PluginPaymentOf<'CARD'> | PluginPaymentOf<'CASH'> | PluginPaymentOf<'EXTERNAL'>>;
|
|
535
|
+
getPayment: (paymentId: PluginPayment['id']) => Promise<PluginPayment>;
|
|
548
536
|
}
|
|
549
537
|
|
|
550
|
-
declare type PaymentCallback = (payment: PluginPayment
|
|
538
|
+
declare type PaymentCallback = (payment: PluginPayment) => void;
|
|
551
539
|
|
|
552
540
|
/**
|
|
553
541
|
* @publicApi
|
|
@@ -882,7 +870,6 @@ export declare interface PluginCatalogItemOptionChoice {
|
|
|
882
870
|
* @publicApi
|
|
883
871
|
*/
|
|
884
872
|
export declare interface PluginCatalogItemPrice {
|
|
885
|
-
id: number;
|
|
886
873
|
/** 상품 가격명 */
|
|
887
874
|
title: string;
|
|
888
875
|
/** 기본 가격 여부 */
|
|
@@ -959,6 +946,34 @@ export declare type PluginDelivery<T extends 'PICKUP' | 'HERE' | 'DELIVERY'> = E
|
|
|
959
946
|
type: T;
|
|
960
947
|
}>;
|
|
961
948
|
|
|
949
|
+
/**
|
|
950
|
+
* @publicApi
|
|
951
|
+
* */
|
|
952
|
+
export declare interface PluginDeliveryDiscount extends PluginDiscount {
|
|
953
|
+
discountBy: 'OWNER' | 'PLATFORM';
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* @publicApi
|
|
958
|
+
* @description order를 만들기 위한 dto
|
|
959
|
+
*/
|
|
960
|
+
export declare type PluginDeliveryOrderDto = Omit<PluginOrderDto, 'lineItems' | 'discounts'> & {
|
|
961
|
+
cancelled: boolean;
|
|
962
|
+
delivery: PluginDelivery<'DELIVERY' | 'PICKUP' | 'HERE'>;
|
|
963
|
+
discounts: Array<PluginDeliveryDiscount>;
|
|
964
|
+
lineItems: Array<Omit<PluginOrderItem, 'id' | 'orderId' | 'item' | 'optionChoices' | 'discounts'> & {
|
|
965
|
+
item: {
|
|
966
|
+
title: string;
|
|
967
|
+
type: 'ITEM' | 'DELIVERY_FEE';
|
|
968
|
+
};
|
|
969
|
+
optionChoices: Array<{
|
|
970
|
+
title: string;
|
|
971
|
+
priceValue: number;
|
|
972
|
+
}>;
|
|
973
|
+
discounts?: Array<PluginDeliveryDiscount>;
|
|
974
|
+
}>;
|
|
975
|
+
};
|
|
976
|
+
|
|
962
977
|
/**
|
|
963
978
|
* @publicApi
|
|
964
979
|
* 할인 정보
|
|
@@ -998,6 +1013,8 @@ export declare interface PluginDraftOrder {
|
|
|
998
1013
|
* 기본값은 false입니다.
|
|
999
1014
|
*/
|
|
1000
1015
|
ignorePrint: boolean;
|
|
1016
|
+
/** 해당 주문의 테이블 인원 수 */
|
|
1017
|
+
numGuests?: number;
|
|
1001
1018
|
}
|
|
1002
1019
|
|
|
1003
1020
|
/**
|
|
@@ -1013,7 +1030,7 @@ export declare interface PluginDraftOrderItem {
|
|
|
1013
1030
|
type: OrderItemType;
|
|
1014
1031
|
};
|
|
1015
1032
|
/** 상품 가격 정보 */
|
|
1016
|
-
itemPrice: Pick<PluginCatalogItemPrice, '
|
|
1033
|
+
itemPrice: Pick<PluginCatalogItemPrice, 'isTaxFree' | 'priceType' | 'priceUnit' | 'priceValue' | 'sku' | 'title'>;
|
|
1017
1034
|
/** 적용된 할인 목록 */
|
|
1018
1035
|
discount: PluginDiscount[];
|
|
1019
1036
|
/** 요청사항 */
|
|
@@ -1122,6 +1139,7 @@ export declare type PluginHttpResponse = {
|
|
|
1122
1139
|
|
|
1123
1140
|
declare class PluginImpl implements Plugin_2 {
|
|
1124
1141
|
private readonly webview;
|
|
1142
|
+
private plugin;
|
|
1125
1143
|
private pluginCallbacks;
|
|
1126
1144
|
constructor(webview: WebView);
|
|
1127
1145
|
private initializePlugin;
|
|
@@ -1138,15 +1156,6 @@ declare class PluginImpl implements Plugin_2 {
|
|
|
1138
1156
|
*/
|
|
1139
1157
|
export declare type PluginInputs = TextInput | PasswordInput | RadioInput | CheckBoxInput | ToggleInput | SliderInput | NumberInput;
|
|
1140
1158
|
|
|
1141
|
-
/**
|
|
1142
|
-
* @publicApi
|
|
1143
|
-
* @deprecated
|
|
1144
|
-
* @see https://deus.toss.im/projects/1057/pages/8gKjmG0l@1
|
|
1145
|
-
*/
|
|
1146
|
-
declare type PluginInputsLegacy<T extends LegacyPluginInputType = any> = Extract<TextInput_2 | PasswordInput_2 | RadioInput_2 | CheckBoxInput_2 | ToggleInput_2 | SliderInput_2, {
|
|
1147
|
-
type: T;
|
|
1148
|
-
}>;
|
|
1149
|
-
|
|
1150
1159
|
declare type PluginLanguageCode = ValueOf<typeof AvailableLanguageCodes>;
|
|
1151
1160
|
|
|
1152
1161
|
/**
|
|
@@ -1202,6 +1211,8 @@ export declare interface PluginOrder {
|
|
|
1202
1211
|
paymentPrice: PluginOrderPaymentPrice;
|
|
1203
1212
|
requestedInfo?: PluginOrderRequestInfo;
|
|
1204
1213
|
source: string;
|
|
1214
|
+
/** 해당 주문의 테이블 인원 수 */
|
|
1215
|
+
numGuests?: number;
|
|
1205
1216
|
memo?: string;
|
|
1206
1217
|
/**
|
|
1207
1218
|
* @description 주문시각
|
|
@@ -1394,11 +1405,18 @@ export declare type PluginPaymentDto<S extends PluginPaymentSourceType = PluginP
|
|
|
1394
1405
|
sourceType: S;
|
|
1395
1406
|
}>;
|
|
1396
1407
|
|
|
1397
|
-
declare
|
|
1408
|
+
declare interface PluginPaymentDtoBase extends Pick<PluginPayment,
|
|
1398
1409
|
/**
|
|
1399
1410
|
* orderId 그냥 열어두면 이상한 값 넣을가봐 걱정... 방어코드 필요
|
|
1400
1411
|
*/
|
|
1401
|
-
'orderId' | 'sourceType' | 'amountMoney' | 'taxMoney' | 'approvedNo' | 'approvedAt' | 'paymentKey' | 'supplyMoney' | 'tipMoney' | 'taxExemptMoney'
|
|
1412
|
+
'orderId' | 'sourceType' | 'amountMoney' | 'taxMoney' | 'approvedNo' | 'approvedAt' | 'paymentKey' | 'supplyMoney' | 'tipMoney' | 'taxExemptMoney'> {
|
|
1413
|
+
/**
|
|
1414
|
+
* default: true
|
|
1415
|
+
* false로 설정 시, 결제 등록 후 자동으로 주문이 완료되지 않습니다.
|
|
1416
|
+
* 테이블의 주문인 경우 autocomplete를 false로 설정하면, 테이블이 비워지지 않습니다
|
|
1417
|
+
*/
|
|
1418
|
+
autocomplete?: boolean;
|
|
1419
|
+
}
|
|
1402
1420
|
|
|
1403
1421
|
/**
|
|
1404
1422
|
* @publicApi
|
|
@@ -1450,6 +1468,8 @@ export declare type PluginPrice = {
|
|
|
1450
1468
|
taxExemptMoney: number;
|
|
1451
1469
|
};
|
|
1452
1470
|
|
|
1471
|
+
/* Excluded from this release type: PluginServerOnHttpRequest */
|
|
1472
|
+
|
|
1453
1473
|
/**
|
|
1454
1474
|
* @publicApi
|
|
1455
1475
|
*/
|
|
@@ -1459,6 +1479,8 @@ export declare interface PluginTable {
|
|
|
1459
1479
|
hallId: number;
|
|
1460
1480
|
/** 테이블명 */
|
|
1461
1481
|
title: string;
|
|
1482
|
+
/** 인원수 */
|
|
1483
|
+
capacity?: number;
|
|
1462
1484
|
group?: PluginTableGroup;
|
|
1463
1485
|
}
|
|
1464
1486
|
|
|
@@ -1512,6 +1534,7 @@ export declare type PosPluginSdk = {
|
|
|
1512
1534
|
paymentMethod: PaymentMethodType;
|
|
1513
1535
|
websocket: WebsocketTypes;
|
|
1514
1536
|
ffi: FFITypes;
|
|
1537
|
+
barcode: Barcode;
|
|
1515
1538
|
plugin: Plugin_2;
|
|
1516
1539
|
pluginMessenger: PluginMessenger;
|
|
1517
1540
|
setting: SettingTypes;
|
|
@@ -1533,32 +1556,29 @@ export declare class PosPluginSdkError extends Error {
|
|
|
1533
1556
|
}
|
|
1534
1557
|
|
|
1535
1558
|
/**
|
|
1536
|
-
* @
|
|
1559
|
+
* @publicApi
|
|
1537
1560
|
*/
|
|
1538
|
-
declare
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
*/
|
|
1543
|
-
default: string;
|
|
1544
|
-
values: InputValue[];
|
|
1545
|
-
};
|
|
1561
|
+
export declare class PosPluginSdkRateLimitError extends PosPluginSdkError {
|
|
1562
|
+
constructor(message: string);
|
|
1563
|
+
static isPosPluginSdkRateLimitError(error: unknown): error is PosPluginSdkRateLimitError;
|
|
1564
|
+
}
|
|
1546
1565
|
|
|
1547
1566
|
/**
|
|
1567
|
+
* @publicApi
|
|
1548
1568
|
* @return string values.id
|
|
1549
1569
|
*/
|
|
1550
|
-
declare type
|
|
1570
|
+
declare type RadioInput = Omit<BaseInput, 'placeholder'> & {
|
|
1551
1571
|
type: 'radio';
|
|
1552
1572
|
/**
|
|
1553
1573
|
* @desciption 선택된 value의 id
|
|
1554
1574
|
*/
|
|
1555
1575
|
default: string;
|
|
1556
|
-
values:
|
|
1576
|
+
values: InputValue[];
|
|
1557
1577
|
};
|
|
1558
1578
|
|
|
1559
1579
|
declare type Response_2 = BarcodeResponse | InputResponse;
|
|
1560
1580
|
|
|
1561
|
-
declare function setInputs(inputs: Array<
|
|
1581
|
+
declare function setInputs(inputs: Array<PluginInputs>): void;
|
|
1562
1582
|
|
|
1563
1583
|
declare const setting: {
|
|
1564
1584
|
setInputs: typeof setInputs;
|
|
@@ -1571,6 +1591,7 @@ declare const setting: {
|
|
|
1571
1591
|
export declare type SettingTypes = typeof setting;
|
|
1572
1592
|
|
|
1573
1593
|
/**
|
|
1594
|
+
* @publicApi
|
|
1574
1595
|
* @return number 0 25 50 75 100
|
|
1575
1596
|
*/
|
|
1576
1597
|
declare type SliderInput = Omit<BaseInput, 'placeholder'> & {
|
|
@@ -1581,17 +1602,6 @@ declare type SliderInput = Omit<BaseInput, 'placeholder'> & {
|
|
|
1581
1602
|
step: number;
|
|
1582
1603
|
};
|
|
1583
1604
|
|
|
1584
|
-
/**
|
|
1585
|
-
* @return number 0 25 50 75 100
|
|
1586
|
-
*/
|
|
1587
|
-
declare type SliderInput_2 = Omit<BaseInput_2, 'placeholder'> & {
|
|
1588
|
-
type: 'slider';
|
|
1589
|
-
default: number;
|
|
1590
|
-
min: number;
|
|
1591
|
-
max: number;
|
|
1592
|
-
step: number;
|
|
1593
|
-
};
|
|
1594
|
-
|
|
1595
1605
|
/**
|
|
1596
1606
|
* @publicApi
|
|
1597
1607
|
*/
|
|
@@ -1614,20 +1624,22 @@ declare type StoreStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_CANCELLE
|
|
|
1614
1624
|
* @publicApi
|
|
1615
1625
|
*/
|
|
1616
1626
|
export declare interface Table {
|
|
1617
|
-
getTables: () => Promise<
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1627
|
+
getTables: () => Promise<PluginTable[]>;
|
|
1628
|
+
getTable: (tableId: number) => Promise<PluginTable>;
|
|
1629
|
+
/**
|
|
1630
|
+
* @deprecated 다음버전에서 제거 예정. order.on 사용 권장
|
|
1631
|
+
*/
|
|
1621
1632
|
on(event: 'order-update' | 'order-add', callback: (order: PluginOrder) => void): void;
|
|
1622
1633
|
on(event: 'clear' | 'add' | 'delete' | 'update', callback: (table: PluginTable) => void): void;
|
|
1623
|
-
on(event: '
|
|
1624
|
-
clearTable: (
|
|
1634
|
+
on(event: 'move', callback: (before: PluginTable, after: PluginTable) => void): void;
|
|
1635
|
+
clearTable: ({ table, order }: {
|
|
1625
1636
|
table: PluginTable;
|
|
1626
1637
|
order?: PluginOrder;
|
|
1627
1638
|
}) => Promise<void>;
|
|
1628
1639
|
}
|
|
1629
1640
|
|
|
1630
1641
|
/**
|
|
1642
|
+
* @publicApi
|
|
1631
1643
|
* @return string
|
|
1632
1644
|
*/
|
|
1633
1645
|
declare type TextInput = BaseInput & {
|
|
@@ -1645,15 +1657,6 @@ declare type TextInput = BaseInput & {
|
|
|
1645
1657
|
}[];
|
|
1646
1658
|
};
|
|
1647
1659
|
|
|
1648
|
-
/**
|
|
1649
|
-
* @return string
|
|
1650
|
-
*/
|
|
1651
|
-
declare type TextInput_2 = BaseInput_2 & {
|
|
1652
|
-
type: 'text';
|
|
1653
|
-
default: string;
|
|
1654
|
-
placeholder?: string;
|
|
1655
|
-
};
|
|
1656
|
-
|
|
1657
1660
|
/**
|
|
1658
1661
|
* @publicApi
|
|
1659
1662
|
*/
|
|
@@ -1662,6 +1665,7 @@ export declare type ToastTypes = {
|
|
|
1662
1665
|
};
|
|
1663
1666
|
|
|
1664
1667
|
/**
|
|
1668
|
+
* @publicApi
|
|
1665
1669
|
* @return boolean
|
|
1666
1670
|
*/
|
|
1667
1671
|
declare type ToggleInput = Omit<BaseInput, 'placeholder'> & {
|
|
@@ -1669,14 +1673,6 @@ declare type ToggleInput = Omit<BaseInput, 'placeholder'> & {
|
|
|
1669
1673
|
default: boolean;
|
|
1670
1674
|
};
|
|
1671
1675
|
|
|
1672
|
-
/**
|
|
1673
|
-
* @return boolean
|
|
1674
|
-
*/
|
|
1675
|
-
declare type ToggleInput_2 = Omit<BaseInput_2, 'placeholder'> & {
|
|
1676
|
-
type: 'toggle';
|
|
1677
|
-
default: boolean;
|
|
1678
|
-
};
|
|
1679
|
-
|
|
1680
1676
|
/**
|
|
1681
1677
|
* @publicApi
|
|
1682
1678
|
* @description 추후에 필요한 정보 더 추가될 예정
|
|
@@ -1685,11 +1681,6 @@ export declare type TossMerchant = {
|
|
|
1685
1681
|
name: string;
|
|
1686
1682
|
id: number;
|
|
1687
1683
|
businessNumber: string;
|
|
1688
|
-
/**
|
|
1689
|
-
* @deprecated
|
|
1690
|
-
* @see DeviceInfo.serialNumber
|
|
1691
|
-
*/
|
|
1692
|
-
serialNumber: string;
|
|
1693
1684
|
franchise?: {
|
|
1694
1685
|
id: string;
|
|
1695
1686
|
name: string;
|
|
@@ -1704,6 +1695,18 @@ export declare type Ui = {
|
|
|
1704
1695
|
openInputModal(message: Omit<PopupElement<'input'>, 'type'>): Promise<PopupActionResponse<'input'>>;
|
|
1705
1696
|
};
|
|
1706
1697
|
|
|
1698
|
+
/**
|
|
1699
|
+
* @publicApi
|
|
1700
|
+
*/
|
|
1701
|
+
export declare const ui: UiImpl;
|
|
1702
|
+
|
|
1703
|
+
declare class UiImpl implements Ui {
|
|
1704
|
+
openBarcode(data: {
|
|
1705
|
+
productName: string;
|
|
1706
|
+
}): Promise<PopupActionResponse<'barcode'>>;
|
|
1707
|
+
openInputModal(data: Omit<PopupElement<'input'>, 'type'>): Promise<PopupActionResponse<'input'>>;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1707
1710
|
declare type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof ObjectType> = ObjectType[ValueType];
|
|
1708
1711
|
|
|
1709
1712
|
/**
|
|
@@ -1711,7 +1714,10 @@ declare type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof Obje
|
|
|
1711
1714
|
*/
|
|
1712
1715
|
export declare type VanType = 'NICE' | 'KIS' | 'SMARTRO' | 'KOVAN';
|
|
1713
1716
|
|
|
1714
|
-
|
|
1717
|
+
/**
|
|
1718
|
+
* @publicApi
|
|
1719
|
+
*/
|
|
1720
|
+
export declare class Websocket {
|
|
1715
1721
|
private readonly url;
|
|
1716
1722
|
private readonly headers;
|
|
1717
1723
|
private readonly options?;
|