@tossplace/pos-plugin-sdk 0.0.17 → 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/dist/sdk.d.ts CHANGED
@@ -150,7 +150,7 @@ export declare interface DeliveryCatalogOption {
150
150
  /**
151
151
  * @publicApi
152
152
  */
153
- export declare type DeliveryConnectionStatusErrorCode = 'NOT_RUNNING' | 'NOT_LOGGED_IN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM' | string;
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;
154
154
 
155
155
  /**
156
156
  * @publicApi
@@ -408,7 +408,22 @@ declare type NumberInput = BaseInput & {
408
408
  * @publicApi
409
409
  */
410
410
  export declare interface Order {
411
- 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[]>;
412
427
  /**
413
428
  * @param start ISO 8601 포맷
414
429
  * @param end ISO 8601 포맷
@@ -416,21 +431,21 @@ export declare interface Order {
416
431
  * @param size default 20
417
432
  * @description createdAt 기준으로 주문을 조회합니다
418
433
  */
419
- getOrders: (params: {
434
+ getOrders(params: {
420
435
  start: string;
421
436
  end: string;
422
437
  page?: number;
423
438
  size?: number;
424
439
  orderStates?: PluginOrderState[];
425
- }) => Promise<PluginOrder[]>;
440
+ }): Promise<PluginOrder[]>;
426
441
  on(event: 'add' | 'accept' | 'decline' | 'expire' | 'complete' | 'update', callback: (order: PluginOrder['id']) => void): void;
427
- cancel: (id: string) => Promise<void>;
428
- add: (order: PluginOrderDto) => Promise<PluginOrder>;
442
+ cancel(id: string): Promise<void>;
443
+ add(order: PluginOrderDto): Promise<PluginOrder>;
429
444
  /**
430
445
  * 새로 추가 된 메뉴만 order에 넣으세요
431
446
  */
432
- addMenu: (orderId: string, order: PluginOrderDto) => Promise<PluginOrder>;
433
- complete: (id: string) => Promise<PluginOrder>;
447
+ addMenu(orderId: string, order: PluginOrderDto): Promise<PluginOrder>;
448
+ complete(id: string): Promise<PluginOrder>;
434
449
  }
435
450
 
436
451
  declare type Order_2 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tossplace/pos-plugin-sdk",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "포스 플러그인 sdk",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/types/index.d.ts CHANGED
@@ -150,7 +150,7 @@ export declare interface DeliveryCatalogOption {
150
150
  /**
151
151
  * @publicApi
152
152
  */
153
- export declare type DeliveryConnectionStatusErrorCode = 'NOT_RUNNING' | 'NOT_LOGGED_IN' | 'UNKNOWN' | 'BAEMIN_NOT_SELECTED_PROGRAM' | string;
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;
154
154
 
155
155
  /**
156
156
  * @publicApi
@@ -408,7 +408,22 @@ declare type NumberInput = BaseInput & {
408
408
  * @publicApi
409
409
  */
410
410
  export declare interface Order {
411
- 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[]>;
412
427
  /**
413
428
  * @param start ISO 8601 포맷
414
429
  * @param end ISO 8601 포맷
@@ -416,21 +431,21 @@ export declare interface Order {
416
431
  * @param size default 20
417
432
  * @description createdAt 기준으로 주문을 조회합니다
418
433
  */
419
- getOrders: (params: {
434
+ getOrders(params: {
420
435
  start: string;
421
436
  end: string;
422
437
  page?: number;
423
438
  size?: number;
424
439
  orderStates?: PluginOrderState[];
425
- }) => Promise<PluginOrder[]>;
440
+ }): Promise<PluginOrder[]>;
426
441
  on(event: 'add' | 'accept' | 'decline' | 'expire' | 'complete' | 'update', callback: (order: PluginOrder['id']) => void): void;
427
- cancel: (id: string) => Promise<void>;
428
- add: (order: PluginOrderDto) => Promise<PluginOrder>;
442
+ cancel(id: string): Promise<void>;
443
+ add(order: PluginOrderDto): Promise<PluginOrder>;
429
444
  /**
430
445
  * 새로 추가 된 메뉴만 order에 넣으세요
431
446
  */
432
- addMenu: (orderId: string, order: PluginOrderDto) => Promise<PluginOrder>;
433
- complete: (id: string) => Promise<PluginOrder>;
447
+ addMenu(orderId: string, order: PluginOrderDto): Promise<PluginOrder>;
448
+ complete(id: string): Promise<PluginOrder>;
434
449
  }
435
450
 
436
451
  declare type Order_2 = {