@tossplace/pos-plugin-sdk 0.0.16 → 0.0.18

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/types/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { WebView } from '@tossplace-nexus/pos-webview';
2
-
3
1
  declare type AllPaymentCreateDto = PluginCardDto | PluginCashDto | PluginExternalDto;
4
2
 
5
3
  declare const AvailableLanguageCodes: {
@@ -75,14 +73,9 @@ export declare interface Catalog {
75
73
  getCatalog: (catalogId: number) => Promise<PluginCatalogItem>;
76
74
  getCatalogs: () => Promise<PluginCatalogItem[]>;
77
75
  on(event: 'update' | 'add' | 'delete', callback: CatalogEventCallback): void;
78
- /**
79
- * @deprecated 다음 버전에서 제거 예정입니다
80
- */
81
- on(event: 'sold-out' | 'on-sale', callback: CatalogEventCallback): void;
82
- on(event: 'sold-out' | 'on-sale' | 'update' | 'add' | 'delete', callback: CatalogEventCallback): void;
83
76
  }
84
77
 
85
- declare type CatalogEventCallback = (catalog: PluginCatalogItem) => void;
78
+ declare type CatalogEventCallback = (id: PluginCatalogItem['id']) => void;
86
79
 
87
80
  /**
88
81
  * @publicApi
@@ -95,7 +88,7 @@ export declare type CatalogItemOptionChoiceState = 'ON_SALE' | 'SOLD_OUT';
95
88
  export declare interface CategoryTypes {
96
89
  getCategories: () => Promise<PluginCatalogCategory[]>;
97
90
  getCategory: (categoryId: number) => Promise<PluginCatalogCategory>;
98
- on: (event: 'update' | 'add' | 'delete', callback: (category: PluginCatalogCategory) => void) => void;
91
+ on: (event: 'update' | 'add' | 'delete', callback: (category: PluginCatalogCategory['id']) => void) => void;
99
92
  }
100
93
 
101
94
  /**
@@ -112,6 +105,12 @@ declare type CheckBoxInput = Omit<BaseInput, 'placeholder'> & {
112
105
  values: InputValue[];
113
106
  };
114
107
 
108
+ /**
109
+ * @publicApi
110
+ * @param length
111
+ */
112
+ export declare function createCallbackId(length?: number): string;
113
+
115
114
  /**
116
115
  * @publicApi
117
116
  */
@@ -151,7 +150,7 @@ export declare interface DeliveryCatalogOption {
151
150
  /**
152
151
  * @publicApi
153
152
  */
154
- export declare type DeliveryConnectionStatusErrorCode = 'NOT_RUNNING' | 'NOT_LOGGED_IN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM';
153
+ export declare type DeliveryConnectionStatusErrorCode = 'BMPC_NOT_RUNNING' | 'NOT_RUNNING' | 'BMPC_NOT_LOGGED_IN' | 'NOT_LOGGED_IN' | 'BMPC_UNKNOWN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM' | string;
155
154
 
156
155
  /**
157
156
  * @publicApi
@@ -245,6 +244,7 @@ declare type Digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
245
244
  * @publicApi
246
245
  */
247
246
  export declare interface DraftOrder {
247
+ on(event: 'update', callback: (draftOrder: PluginDraftOrder) => void): void;
248
248
  clear(): Promise<void>;
249
249
  get(): Promise<PluginDraftOrder>;
250
250
  addLineItem(lineItem: PluginDraftOrderItemDto): Promise<PluginDraftOrder>;
@@ -258,88 +258,33 @@ export declare interface DraftOrder {
258
258
  startPayment(): Promise<void>;
259
259
  }
260
260
 
261
- declare type Element_2 = BarcodeElements | InputElements;
262
-
263
- declare class ErrorImpl {
264
- private readonly webview;
265
- constructor(webview: WebView);
266
- addErrorListener(handler: (error: Error) => void): void;
267
- }
268
-
269
261
  /**
270
262
  * @publicApi
271
263
  */
272
- declare type FFIAbiType = '__stdcall';
264
+ export declare const draftOrder: DraftOrderImpl;
273
265
 
274
- /**
275
- * @publicApi
276
- */
277
- declare interface FFIApi extends FFIFunction {
278
- name: string;
279
- }
280
-
281
- /* Excluded from this release type: FFIDownloadInfo */
282
-
283
- /**
284
- * @publicApi
285
- */
286
- declare interface FFIFunction {
287
- params?: FFIFunctionParam[];
288
- return: FFIFunctionReturn;
289
- options?: FFIFunctionOptions;
290
- returnData?: any;
291
- }
292
-
293
- /**
294
- * @publicApi
295
- */
296
- declare interface FFIFunctionOptions {
297
- /**
298
- * Application Binary Interface
299
- * - 응용 프로그램 바이너리 인터페이스: 컴파일된 프로그램 모듈들이 바이너리 수준에서 상호작용하는 방식을 정의하는 인터페이스
300
- */
301
- abi?: FFIAbiType;
266
+ declare class DraftOrderImpl implements DraftOrder {
267
+ constructor();
268
+ on(event: 'update', callback: (draftOrder: PluginDraftOrder) => void): void;
269
+ deleteDiscount(indexOfDiscount: number): Promise<PluginDraftOrder>;
270
+ updateItemOptionChoice(itemKey: string, choices: PluginCatalogItemOptionChoice[]): Promise<PluginDraftOrder>;
271
+ updateItemMemo(itemKey: string, memo: string): Promise<PluginDraftOrder>;
272
+ updateIgnorePrint(ignorePrint: boolean): Promise<PluginDraftOrder>;
273
+ deleteItemDiscount(itemKey: string, indexOfDiscount: number): Promise<PluginDraftOrder>;
274
+ clear(): Promise<void>;
275
+ get(): Promise<PluginDraftOrder>;
276
+ addLineItem(lineItem: PluginDraftOrderItemDto): Promise<PluginDraftOrder>;
277
+ deleteLineItem(key: string): Promise<PluginDraftOrder>;
278
+ startPayment(): Promise<void>;
279
+ updateItemQuantity(itemKey: string, quantity: number): Promise<PluginDraftOrder>;
302
280
  }
303
281
 
304
- /**
305
- * @publicApi
306
- */
307
- declare type FFIFunctionParam = {
308
- type: 'str';
309
- } | {
310
- type: 'int';
311
- } | {
312
- type: 'bool';
313
- } | {
314
- type: 'wchar *';
315
- } | {
316
- type: 'callback';
317
- };
318
-
319
- /**
320
- * @publicApi
321
- */
322
- declare type FFIFunctionReturn = 'void' | 'str' | 'int' | 'bool' | 'wchar *' | 'void *';
282
+ declare type Element_2 = BarcodeElements | InputElements;
323
283
 
324
- /**
325
- * @publicApi
326
- */
327
- export declare interface FFITypes {
328
- download: (downloadInfo: FFIDownloadInfo) => Promise<{
329
- platform: keyof FFIDownloadInfo;
330
- }>;
331
- load: (filePath: string, apis: FFIApi[]) => Promise<void>;
332
- unload: (filePath: string) => Promise<void>;
333
- invoke: (filePath: string, apiName: string, params?: any[]) => Promise<any>;
334
- registerCallback: (filePath: string, signature: FFIFunction, callback: (...args: any[]) => any) => Promise<{
335
- ffiCallbackId: string;
336
- }>;
337
- unregisterCallback: (filePath: string, callbackId: string) => Promise<void>;
338
- addCallbackErrorHandler: (filePath: string, handler: (error: Error) => void) => void;
284
+ declare class ErrorImpl {
285
+ addErrorListener(handler: (error: Error) => void): void;
339
286
  }
340
287
 
341
- declare function getValues<T extends Record<string, number | string | string[] | boolean | undefined>>(): Promise<T>;
342
-
343
288
  declare type HereOrder = Order_2 & {
344
289
  type: 'HERE';
345
290
  memo: {
@@ -354,23 +299,28 @@ declare type HereOrder = Order_2 & {
354
299
  */
355
300
  export declare type HttpMethod = 'GET' | 'POST' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'PUT' | 'PATCH';
356
301
 
302
+ declare interface HttpOption {
303
+ timeoutMs?: number;
304
+ }
305
+
357
306
  declare interface HttpRequest {
358
307
  method: HttpMethod;
359
308
  payload?: string;
360
309
  headers: [string, string][];
310
+ timeoutMs?: number;
361
311
  }
362
312
 
363
313
  /**
364
314
  * @publicApi
365
315
  */
366
316
  export declare interface HttpTypes {
367
- get: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
368
- post: (url: string, payload: any, headers?: [string, string][]) => Promise<PluginHttpResponse>;
369
- delete: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
370
- head: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
371
- options: (url: string, headers?: [string, string][]) => Promise<PluginHttpResponse>;
372
- put: (url: string, payload: any, headers?: [string, string][]) => Promise<PluginHttpResponse>;
373
- patch: (url: string, payload: any, headers?: [string, string][]) => Promise<PluginHttpResponse>;
317
+ get: (url: string, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
318
+ post: (url: string, payload: any, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
319
+ delete: (url: string, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
320
+ head: (url: string, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
321
+ options: (url: string, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
322
+ put: (url: string, payload: any, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
323
+ patch: (url: string, payload: any, headers?: [string, string][], options?: HttpOption) => Promise<PluginHttpResponse>;
374
324
  }
375
325
 
376
326
  declare type InputElements = {
@@ -417,12 +367,7 @@ declare type Languages = Record<PluginLanguageCode, string>;
417
367
  export declare interface MenuOption {
418
368
  getOptions: () => Promise<PluginCatalogItemOption[]>;
419
369
  getOption: (optionId: number) => Promise<PluginCatalogItemOption>;
420
- /**
421
- * @deprecated 다음 버전에서 제거 예정입니다
422
- */
423
- on(event: 'sold-out' | 'on-sale', callback: (option: PluginCatalogItemOption) => void): void;
424
- on(event: 'update' | 'add' | 'delete', callback: (option: PluginCatalogItemOption) => void): void;
425
- on(event: 'sold-out' | 'on-sale' | 'update' | 'add' | 'delete', callback: (option: PluginCatalogItemOption) => void): void;
370
+ on(event: 'update' | 'add' | 'delete', callback: (id: PluginCatalogItemOption['id']) => void): void;
426
371
  }
427
372
 
428
373
  /**
@@ -440,28 +385,6 @@ export declare interface Merchant {
440
385
  getMerchant: () => Promise<TossMerchant>;
441
386
  }
442
387
 
443
- /**
444
- * @publicApi
445
- */
446
- export declare interface Navigation {
447
- navigate(page: 'plugin-tab', packageName?: string): void;
448
- navigate(page: 'business-type-setting'): void;
449
- /**
450
- * 포스에서 페이지를 이동합니다.
451
- * @param page business-type-setting 업종유형 변경, plugin-tab 플러그인 탭 이동
452
- * @param packageName 이동할 탭의 이름, 없는 경우 첫번째 플러그인 탭으로 이동합니다
453
- */
454
- navigate(page: 'business-type-setting' | 'plugin-tab', packageName?: string): void;
455
- }
456
-
457
- /**
458
- * @publicApi
459
- */
460
- export declare class NavigationImpl implements Navigation {
461
- navigate(page: 'plugin-tab', packageName?: string): void;
462
- navigate(page: 'business-type-setting'): void;
463
- }
464
-
465
388
  /**
466
389
  * @publicApi
467
390
  * @return number
@@ -485,7 +408,22 @@ declare type NumberInput = BaseInput & {
485
408
  * @publicApi
486
409
  */
487
410
  export declare interface Order {
488
- getOrder: (id: string) => Promise<PluginOrder>;
411
+ getOrder(id: string): Promise<PluginOrder>;
412
+ /**
413
+ * @description tableId와 orderState로 주문을 조회합니다 search는 다른 도메인의 인자로 검색이 가능합니다
414
+ * @param tableId 테이블 id
415
+ * @param orderState 주문 상태
416
+ * @param start start 날짜의 00시부터 부터 주문을 검색합니다 (ISO 8601 포맷)
417
+ * @param end end 날짜 저녁 12시까지 주문을 검색합니다 (ISO 8601 포맷)
418
+ */
419
+ search(params: {
420
+ start: string;
421
+ end: string;
422
+ page?: number;
423
+ size?: number;
424
+ tableId?: PluginTable['id'];
425
+ orderState?: PluginOrderState[];
426
+ }): Promise<PluginOrder[]>;
489
427
  /**
490
428
  * @param start ISO 8601 포맷
491
429
  * @param end ISO 8601 포맷
@@ -493,24 +431,21 @@ export declare interface Order {
493
431
  * @param size default 20
494
432
  * @description createdAt 기준으로 주문을 조회합니다
495
433
  */
496
- getOrders: (params: {
434
+ getOrders(params: {
497
435
  start: string;
498
436
  end: string;
499
437
  page?: number;
500
438
  size?: number;
501
439
  orderStates?: PluginOrderState[];
502
- }) => Promise<PluginOrder[]>;
503
- /**
504
- * @deprecated
505
- */
506
- on(event: 'cancel', callback: (order: PluginOrder) => void): void;
507
- cancel: (id: string) => Promise<void>;
508
- add: (order: PluginOrderDto) => Promise<PluginOrder>;
440
+ }): Promise<PluginOrder[]>;
441
+ on(event: 'add' | 'accept' | 'decline' | 'expire' | 'complete' | 'update', callback: (order: PluginOrder['id']) => void): void;
442
+ cancel(id: string): Promise<void>;
443
+ add(order: PluginOrderDto): Promise<PluginOrder>;
509
444
  /**
510
445
  * 새로 추가 된 메뉴만 order에 넣으세요
511
446
  */
512
- addMenu: (orderId: string, order: PluginOrderDto) => Promise<PluginOrder>;
513
- complete: (id: string) => Promise<PluginOrder>;
447
+ addMenu(orderId: string, order: PluginOrderDto): Promise<PluginOrder>;
448
+ complete(id: string): Promise<PluginOrder>;
514
449
  }
515
450
 
516
451
  declare type Order_2 = {
@@ -555,7 +490,7 @@ declare type Order_2 = {
555
490
  customerChargedPrice: number;
556
491
  };
557
492
 
558
- declare type OrderItemType = 'ITEM' | 'DELIVERY_FEE' | 'PREPAID_CARD' | 'MULTI_USE_TICKET';
493
+ declare type OrderItemType = 'ITEM' | 'DELIVERY_FEE' | 'PREPAID_CARD' | 'MULTI_USE_TICKET' | 'COMBO' | 'GIFT_CARD';
559
494
 
560
495
  /**
561
496
  * @publicApi
@@ -585,7 +520,7 @@ export declare interface Payment {
585
520
  getPayment: (paymentId: PluginPayment['id']) => Promise<PluginPayment>;
586
521
  }
587
522
 
588
- declare type PaymentCallback = (payment: PluginPayment) => void;
523
+ declare type PaymentCallback = (paymentId: PluginPayment['id'], orderId: PluginOrder['id']) => void;
589
524
 
590
525
  /**
591
526
  * @publicApi
@@ -647,7 +582,6 @@ export declare const plugin: PluginImpl;
647
582
  * @publicApi
648
583
  */
649
584
  declare interface Plugin_2 {
650
- on(event: 'close', callback: () => Promise<void>): void;
651
585
  getPluginInfo(): Promise<{
652
586
  name: string;
653
587
  version: string;
@@ -888,10 +822,14 @@ export declare interface PluginCatalogItemOption {
888
822
  title: string;
889
823
  titleI18n?: PluginLanguagePack;
890
824
  isRequired: boolean;
825
+ /**
826
+ * 토스 포스에서 최소 수량은 선택 불가능하며 필수선택 여부에 따라 0 또는 1로 내려옴
827
+ * 0 - 필수아님
828
+ * 1 - 필수
829
+ */
891
830
  minChoices: number;
892
831
  /**
893
832
  * 최대로 선택가능한 선택 수
894
- * -1인 경우 무제한 선택이 가능합니다.
895
833
  */
896
834
  maxChoices: number;
897
835
  choices: PluginCatalogItemOptionChoice[];
@@ -1008,15 +946,21 @@ export declare interface PluginDeliveryDiscount extends PluginDiscount {
1008
946
  * @publicApi
1009
947
  * @description order를 만들기 위한 dto
1010
948
  */
1011
- export declare type PluginDeliveryOrderDto = Omit<PluginOrderDto, 'lineItems' | 'discounts'> & {
949
+ export declare type PluginDeliveryOrderDtoV2 = Omit<PluginOrderDto, 'lineItems' | 'discounts'> & {
1012
950
  cancelled: boolean;
1013
951
  delivery: PluginDelivery<'DELIVERY' | 'PICKUP' | 'HERE'>;
1014
952
  discounts: Array<PluginDeliveryDiscount>;
1015
- lineItems: Array<Omit<PluginOrderItem, 'id' | 'orderId' | 'item' | 'optionChoices' | 'discounts'> & {
953
+ lineItems: Array<Omit<PluginOrderItem, 'id' | 'orderId' | 'item' | 'optionChoices' | 'discounts' | 'chargePrice'> & {
1016
954
  item: {
1017
955
  title: string;
1018
956
  type: 'ITEM' | 'DELIVERY_FEE';
1019
957
  };
958
+ /**
959
+ * @description 옵션,할인을 제외한 메뉴 1개의 단일 가격
960
+ */
961
+ itemPrice: {
962
+ value: number;
963
+ };
1020
964
  optionChoices: Array<{
1021
965
  title: string;
1022
966
  priceValue: number;
@@ -1024,6 +968,9 @@ export declare type PluginDeliveryOrderDto = Omit<PluginOrderDto, 'lineItems' |
1024
968
  }>;
1025
969
  discounts?: Array<PluginDeliveryDiscount>;
1026
970
  }>;
971
+ metadata?: {
972
+ bmpc?: boolean;
973
+ };
1027
974
  };
1028
975
 
1029
976
  /**
@@ -1190,12 +1137,8 @@ export declare type PluginHttpResponse = {
1190
1137
  };
1191
1138
 
1192
1139
  declare class PluginImpl implements Plugin_2 {
1193
- private readonly webview;
1194
- private plugin;
1195
- private pluginCallbacks;
1196
- constructor(webview: WebView);
1140
+ constructor();
1197
1141
  private initializePlugin;
1198
- on(event: 'close', callback: () => Promise<void>): void;
1199
1142
  getPluginInfo(): Promise<{
1200
1143
  name: string;
1201
1144
  version: string;
@@ -1218,26 +1161,6 @@ export declare interface PluginLanguagePack {
1218
1161
  languages: Partial<Languages>;
1219
1162
  }
1220
1163
 
1221
- /**
1222
- * @publicApi
1223
- */
1224
- export declare interface PluginMessenger {
1225
- broadcast<T = any>(message: T): void;
1226
- on<T = any>(event: 'message', callback: (message: T) => void): void;
1227
- }
1228
-
1229
- /**
1230
- * @publicApi
1231
- */
1232
- export declare const pluginMessenger: PluginMessengerImpl;
1233
-
1234
- declare class PluginMessengerImpl implements PluginMessenger {
1235
- private readonly webview;
1236
- constructor(webview: WebView);
1237
- broadcast<T = any>(message: T): void;
1238
- on<T = any>(event: 'message', callback: (message: T) => void): void;
1239
- }
1240
-
1241
1164
  /**
1242
1165
  * @publicApi
1243
1166
  * @description pluginOrder orderDto를 서버에 저장 후 가공해서 내려 준 값
@@ -1263,6 +1186,11 @@ export declare interface PluginOrder {
1263
1186
  paymentPrice: PluginOrderPaymentPrice;
1264
1187
  requestedInfo?: PluginOrderRequestInfo;
1265
1188
  source: string;
1189
+ channel: {
1190
+ source: string;
1191
+ /** @memo 생성할 때 source를 넣고 groups를 따로 명시하지 않으면, groups는 source로부터 유도되어 채워집니다 */
1192
+ groups: PluginOrderGroup[];
1193
+ };
1266
1194
  /** 해당 주문의 테이블 인원 수 */
1267
1195
  numGuests?: number;
1268
1196
  memo?: string;
@@ -1319,8 +1247,16 @@ export declare type PluginOrderDto = {
1319
1247
  discounts: PluginDiscount[];
1320
1248
  tableId?: number;
1321
1249
  lineItems: PluginOrderItemDto[];
1250
+ channel?: {
1251
+ /**
1252
+ * 주문의 타입을 지정합니다 아무것도 지정되지 않을 경우 POS로 간주됩니다.
1253
+ */
1254
+ groups: PluginOrderGroup[];
1255
+ };
1322
1256
  };
1323
1257
 
1258
+ declare type PluginOrderGroup = 'POS' | 'KIOSK' | 'DELIVERY' | 'TABLE_ORDER' | 'MOBILE_ORDER';
1259
+
1324
1260
  /**
1325
1261
  * @publicApi
1326
1262
  */
@@ -1335,7 +1271,7 @@ export declare interface PluginOrderItem {
1335
1271
  value: number;
1336
1272
  };
1337
1273
  /**
1338
- * @description 실제 고객이 결제하는 금액에 대한 정보입니다. (할인 적용 금액)
1274
+ * @description 실제 고객이 결제하는 금액에 대한 정보입니다. (할인 적용 금액 + 옵션합산금액)
1339
1275
  */
1340
1276
  chargePrice: {
1341
1277
  value: number;
@@ -1376,6 +1312,7 @@ declare interface PluginOrderItemItemOptionChoiceDto {
1376
1312
  }
1377
1313
 
1378
1314
  /**
1315
+ * @publicApi
1379
1316
  * 주문항목 옵션 선택
1380
1317
  */
1381
1318
  declare interface PluginOrderItemOptionChoice extends PluginCatalogItemOptionChoice {
@@ -1610,6 +1547,7 @@ export declare type PosPluginSdk = {
1610
1547
  catalog: Catalog;
1611
1548
  option: MenuOption;
1612
1549
  storage: StorageTypes;
1550
+ secureStore: SecureStore;
1613
1551
  cashReceipt: CashReceiptTypes;
1614
1552
  order: Order;
1615
1553
  payment: Payment;
@@ -1619,14 +1557,12 @@ export declare type PosPluginSdk = {
1619
1557
  merchant: Merchant;
1620
1558
  paymentMethod: PaymentMethodType;
1621
1559
  websocket: WebsocketTypes;
1622
- ffi: FFITypes;
1623
1560
  barcode: Barcode;
1624
1561
  plugin: Plugin_2;
1625
- pluginMessenger: PluginMessenger;
1626
1562
  setting: SettingTypes;
1627
1563
  draftOrder: DraftOrder;
1628
- navigation: Navigation;
1629
1564
  error: ErrorImpl;
1565
+ powerSaver: PowerSaverTypes;
1630
1566
  };
1631
1567
 
1632
1568
  /**
@@ -1650,6 +1586,24 @@ export declare class PosPluginSdkRateLimitError extends PosPluginSdkError {
1650
1586
  static isPosPluginSdkRateLimitError(error: unknown): error is PosPluginSdkRateLimitError;
1651
1587
  }
1652
1588
 
1589
+ /**
1590
+ * @publicApi
1591
+ */
1592
+ export declare type PowerSaverTypes = {
1593
+ /**
1594
+ * 절전모드 방지를 시작합니다.
1595
+ */
1596
+ startBlocking(): Promise<void>;
1597
+ /**
1598
+ * 절전모드 방지를 해제합니다.
1599
+ */
1600
+ stopBlocking(): Promise<void>;
1601
+ /**
1602
+ * 절전모드 방지가 활성화 상태인지 확인합니다.
1603
+ */
1604
+ isBlocked(): Promise<boolean>;
1605
+ };
1606
+
1653
1607
  /**
1654
1608
  * @publicApi
1655
1609
  * @return string values.id
@@ -1665,17 +1619,22 @@ declare type RadioInput = Omit<BaseInput, 'placeholder'> & {
1665
1619
 
1666
1620
  declare type Response_2 = BarcodeResponse | InputResponse;
1667
1621
 
1668
- declare function setInputs(inputs: Array<PluginInputs>): Promise<void>;
1669
-
1670
- declare const setting: {
1671
- setInputs: typeof setInputs;
1672
- getValues: typeof getValues;
1673
- };
1622
+ /**
1623
+ * @publicApi
1624
+ */
1625
+ export declare interface SecureStore {
1626
+ get: (key: string) => Promise<string | undefined>;
1627
+ set: (key: string, value: string) => Promise<void>;
1628
+ del: (key: string) => Promise<void>;
1629
+ }
1674
1630
 
1675
1631
  /**
1676
1632
  * @publicApi
1677
1633
  */
1678
- export declare type SettingTypes = typeof setting;
1634
+ export declare type SettingTypes = {
1635
+ setInputs: (inputs: Array<PluginInputs>) => Promise<void>;
1636
+ getValues: <T extends Record<string, number | string | string[] | boolean | undefined>>() => Promise<T>;
1637
+ };
1679
1638
 
1680
1639
  /**
1681
1640
  * @publicApi
@@ -1711,14 +1670,12 @@ export declare type StoreStatus = 'NEW' | 'ACCEPTED' | 'REJECTED' | 'PARTIALLY_C
1711
1670
  * @publicApi
1712
1671
  */
1713
1672
  export declare interface Table {
1714
- getTables: () => Promise<PluginTable[]>;
1673
+ getTables: () => Promise<(PluginTable & {
1674
+ order?: PluginOrder;
1675
+ })[]>;
1715
1676
  getTable: (tableId: number) => Promise<PluginTable>;
1716
- /**
1717
- * @deprecated 다음버전에서 제거 예정. order.on 사용 권장
1718
- */
1719
- on(event: 'order-update' | 'order-add', callback: (order: PluginOrder) => void): void;
1720
- on(event: 'clear' | 'add' | 'delete' | 'update', callback: (table: PluginTable) => void): void;
1721
- on(event: 'move', callback: (before: PluginTable, after: PluginTable) => void): void;
1677
+ on(event: 'clear' | 'add' | 'delete' | 'update', callback: (id: PluginTable['id']) => void): void;
1678
+ on(event: 'move', callback: (before: PluginTable['id'], after: PluginTable['id']) => void): void;
1722
1679
  clearTable: ({ table, order }: {
1723
1680
  table: PluginTable;
1724
1681
  order?: PluginOrder;
@@ -1817,18 +1774,18 @@ export declare class Websocket {
1817
1774
  followRedirects?: boolean | undefined;
1818
1775
  timeout?: number | undefined;
1819
1776
  } | undefined);
1820
- connect(): Promise<void>;
1821
- disconnect(): Promise<void>;
1822
- send(data: {
1777
+ connect: () => Promise<void>;
1778
+ disconnect: () => Promise<void>;
1779
+ send: (data: {
1823
1780
  data: string;
1824
1781
  option?: {
1825
- mask?: boolean;
1826
- };
1827
- }): void;
1828
- onMessage(callback: (message: string) => void): void;
1829
- onError(callback: (errorName?: string, errorMessage?: string) => void): void;
1830
- onClose(callback: (code: string) => void): void;
1831
- onOpen(callback: () => void): void;
1782
+ mask?: boolean | undefined;
1783
+ } | undefined;
1784
+ }) => void;
1785
+ onMessage: (callback: (message: string) => void) => void;
1786
+ onError: (callback: (errorName?: string, errorMessage?: string) => void) => void;
1787
+ onClose: (callback: (code: string) => void) => void;
1788
+ onOpen: (callback: () => void) => void;
1832
1789
  }
1833
1790
 
1834
1791
  /**