gap-nodejs-sdk 1.0.21 → 1.0.22

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.
Files changed (98) hide show
  1. package/dist/gap-sdk.js +1 -1
  2. package/dist/pos_client_api/1.0.0/api/appointment.d.ts.map +1 -1
  3. package/dist/pos_client_api/1.0.0/api/batch_history.d.ts +3 -2
  4. package/dist/pos_client_api/1.0.0/api/batch_history.d.ts.map +1 -1
  5. package/dist/pos_client_api/1.0.0/api/batch_history.js +6 -2
  6. package/dist/pos_client_api/1.0.0/api/business.d.ts +3 -2
  7. package/dist/pos_client_api/1.0.0/api/business.d.ts.map +1 -1
  8. package/dist/pos_client_api/1.0.0/api/business.js +5 -2
  9. package/dist/pos_client_api/1.0.0/api/category.d.ts +2 -1
  10. package/dist/pos_client_api/1.0.0/api/category.d.ts.map +1 -1
  11. package/dist/pos_client_api/1.0.0/api/category.js +4 -1
  12. package/dist/pos_client_api/1.0.0/api/check_out.d.ts +1 -1
  13. package/dist/pos_client_api/1.0.0/api/check_out.d.ts.map +1 -1
  14. package/dist/pos_client_api/1.0.0/api/customer.d.ts +1 -1
  15. package/dist/pos_client_api/1.0.0/api/customer.d.ts.map +1 -1
  16. package/dist/pos_client_api/1.0.0/api/customer.js +2 -1
  17. package/dist/pos_client_api/1.0.0/api/key_storage.d.ts +2 -1
  18. package/dist/pos_client_api/1.0.0/api/key_storage.d.ts.map +1 -1
  19. package/dist/pos_client_api/1.0.0/api/key_storage.js +4 -1
  20. package/dist/pos_client_api/1.0.0/api/order.d.ts +5 -5
  21. package/dist/pos_client_api/1.0.0/api/order.d.ts.map +1 -1
  22. package/dist/pos_client_api/1.0.0/api/order.js +18 -4
  23. package/dist/pos_client_api/1.0.0/api/payroll.d.ts +15 -14
  24. package/dist/pos_client_api/1.0.0/api/payroll.d.ts.map +1 -1
  25. package/dist/pos_client_api/1.0.0/api/payroll.js +36 -11
  26. package/dist/pos_client_api/1.0.0/api/printer.d.ts.map +1 -1
  27. package/dist/pos_client_api/1.0.0/api/time_keeping.d.ts +9 -7
  28. package/dist/pos_client_api/1.0.0/api/time_keeping.d.ts.map +1 -1
  29. package/dist/pos_client_api/1.0.0/api/time_keeping.js +20 -7
  30. package/dist/pos_client_api/1.0.0/interfaces/batch_history.d.ts +3 -3
  31. package/dist/pos_client_api/1.0.0/interfaces/batch_history.d.ts.map +1 -1
  32. package/dist/pos_client_api/1.0.0/interfaces/business.d.ts +3 -3
  33. package/dist/pos_client_api/1.0.0/interfaces/business.d.ts.map +1 -1
  34. package/dist/pos_client_api/1.0.0/interfaces/category.d.ts +2 -2
  35. package/dist/pos_client_api/1.0.0/interfaces/category.d.ts.map +1 -1
  36. package/dist/pos_client_api/1.0.0/interfaces/customer.d.ts +1 -2
  37. package/dist/pos_client_api/1.0.0/interfaces/customer.d.ts.map +1 -1
  38. package/dist/pos_client_api/1.0.0/interfaces/key_storage.d.ts +2 -2
  39. package/dist/pos_client_api/1.0.0/interfaces/key_storage.d.ts.map +1 -1
  40. package/dist/pos_client_api/1.0.0/interfaces/order.d.ts +5 -6
  41. package/dist/pos_client_api/1.0.0/interfaces/order.d.ts.map +1 -1
  42. package/dist/pos_client_api/1.0.0/interfaces/time_keeping.d.ts +9 -8
  43. package/dist/pos_client_api/1.0.0/interfaces/time_keeping.d.ts.map +1 -1
  44. package/dist/pos_client_api/1.0.0/models/batch_history.d.ts +4 -0
  45. package/dist/pos_client_api/1.0.0/models/batch_history.d.ts.map +1 -0
  46. package/dist/pos_client_api/1.0.0/models/batch_history.js +84 -0
  47. package/dist/pos_client_api/1.0.0/models/business.d.ts +3 -0
  48. package/dist/pos_client_api/1.0.0/models/business.d.ts.map +1 -0
  49. package/dist/pos_client_api/1.0.0/models/business.js +17 -0
  50. package/dist/pos_client_api/1.0.0/models/category.d.ts +3 -0
  51. package/dist/pos_client_api/1.0.0/models/category.d.ts.map +1 -0
  52. package/dist/pos_client_api/1.0.0/models/category.js +30 -0
  53. package/dist/pos_client_api/1.0.0/models/customer.d.ts +1 -0
  54. package/dist/pos_client_api/1.0.0/models/customer.d.ts.map +1 -1
  55. package/dist/pos_client_api/1.0.0/models/customer.js +14 -0
  56. package/dist/pos_client_api/1.0.0/models/index.d.ts +5 -0
  57. package/dist/pos_client_api/1.0.0/models/index.d.ts.map +1 -1
  58. package/dist/pos_client_api/1.0.0/models/index.js +5 -0
  59. package/dist/pos_client_api/1.0.0/models/key_storage.d.ts +3 -0
  60. package/dist/pos_client_api/1.0.0/models/key_storage.d.ts.map +1 -0
  61. package/dist/pos_client_api/1.0.0/models/key_storage.js +45 -0
  62. package/dist/pos_client_api/1.0.0/models/order.d.ts +2 -0
  63. package/dist/pos_client_api/1.0.0/models/order.d.ts.map +1 -1
  64. package/dist/pos_client_api/1.0.0/models/order.js +34 -0
  65. package/dist/pos_client_api/1.0.0/models/payroll.d.ts +7 -0
  66. package/dist/pos_client_api/1.0.0/models/payroll.d.ts.map +1 -1
  67. package/dist/pos_client_api/1.0.0/models/payroll.js +144 -0
  68. package/dist/pos_client_api/1.0.0/models/time_keeping.d.ts +4 -0
  69. package/dist/pos_client_api/1.0.0/models/time_keeping.d.ts.map +1 -0
  70. package/dist/pos_client_api/1.0.0/models/time_keeping.js +25 -0
  71. package/dist/pos_client_api/1.0.0/types/request/category.d.ts.map +1 -1
  72. package/dist/pos_client_api/1.0.0/types/request/income.d.ts +2 -1
  73. package/dist/pos_client_api/1.0.0/types/request/income.d.ts.map +1 -1
  74. package/dist/pos_client_api/1.0.0/types/response/batch_history.d.ts +78 -0
  75. package/dist/pos_client_api/1.0.0/types/response/batch_history.d.ts.map +1 -0
  76. package/dist/pos_client_api/1.0.0/types/response/batch_history.js +1 -0
  77. package/dist/pos_client_api/1.0.0/types/response/business.d.ts +30 -0
  78. package/dist/pos_client_api/1.0.0/types/response/business.d.ts.map +1 -0
  79. package/dist/pos_client_api/1.0.0/types/response/business.js +1 -0
  80. package/dist/pos_client_api/1.0.0/types/response/category.d.ts +26 -0
  81. package/dist/pos_client_api/1.0.0/types/response/category.d.ts.map +1 -0
  82. package/dist/pos_client_api/1.0.0/types/response/category.js +1 -0
  83. package/dist/pos_client_api/1.0.0/types/response/customer.d.ts +11 -0
  84. package/dist/pos_client_api/1.0.0/types/response/customer.d.ts.map +1 -1
  85. package/dist/pos_client_api/1.0.0/types/response/index.d.ts +5 -0
  86. package/dist/pos_client_api/1.0.0/types/response/index.d.ts.map +1 -1
  87. package/dist/pos_client_api/1.0.0/types/response/index.js +5 -0
  88. package/dist/pos_client_api/1.0.0/types/response/key_storage.d.ts +48 -0
  89. package/dist/pos_client_api/1.0.0/types/response/key_storage.d.ts.map +1 -0
  90. package/dist/pos_client_api/1.0.0/types/response/key_storage.js +1 -0
  91. package/dist/pos_client_api/1.0.0/types/response/order.d.ts +28 -0
  92. package/dist/pos_client_api/1.0.0/types/response/order.d.ts.map +1 -1
  93. package/dist/pos_client_api/1.0.0/types/response/payroll.d.ts +119 -0
  94. package/dist/pos_client_api/1.0.0/types/response/payroll.d.ts.map +1 -1
  95. package/dist/pos_client_api/1.0.0/types/response/time_keeping.d.ts +21 -0
  96. package/dist/pos_client_api/1.0.0/types/response/time_keeping.d.ts.map +1 -0
  97. package/dist/pos_client_api/1.0.0/types/response/time_keeping.js +1 -0
  98. package/package.json +1 -1
@@ -1,21 +1,24 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import * as posEndpoints from "../endpoints";
3
3
  import Base from "../../../base/Base";
4
+ import * as Model from "../models";
4
5
  export default class Business extends Base {
5
6
  static getBusinessInfo(data) {
6
7
  return __awaiter(this, void 0, void 0, function* () {
7
- return yield this.client.get({
8
+ const response = yield this.client.get({
8
9
  path: posEndpoints.business.GET_BUSINESS_INFO,
9
10
  query: data
10
11
  });
12
+ return Model.BusinessInfoModel(response.result.data);
11
13
  });
12
14
  }
13
15
  static postBusinessUpdateInfo(data) {
14
16
  return __awaiter(this, void 0, void 0, function* () {
15
- return yield this.client.post({
17
+ const response = yield this.client.post({
16
18
  path: posEndpoints.business.POST_BUSINESS_UPDATE_INFO,
17
19
  data: data
18
20
  });
21
+ return Model.BusinessInfoModel(response.result.data);
19
22
  });
20
23
  }
21
24
  }
@@ -1,7 +1,8 @@
1
1
  import CategoryAbstractClass from "../interfaces/category";
2
2
  import Base from "../../../base/Base";
3
3
  import * as Request from "../types/request";
4
+ import * as Response from "../types/response";
4
5
  export default class Category extends Base implements CategoryAbstractClass {
5
- static getCategoryListItem(data: Request.GetCategoryListItemRequest): Promise<any>;
6
+ static getCategoryListItem(data: Request.GetCategoryListItemRequest): Promise<Array<Response.GetCategoryListItemResponse>>;
6
7
  }
7
8
  //# sourceMappingURL=category.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/category.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAE3C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAK,YAAW,qBAAqB;WACnD,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B;CAQnF"}
1
+ {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/category.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAK,YAAW,qBAAqB;WACnD,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;CAS1I"}
@@ -1,13 +1,16 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import * as posEndpoints from "../endpoints";
3
3
  import Base from "../../../base/Base";
4
+ import * as Model from "../models";
4
5
  export default class Category extends Base {
5
6
  static getCategoryListItem(data) {
7
+ var _a;
6
8
  return __awaiter(this, void 0, void 0, function* () {
7
- return yield this.client.get({
9
+ const response = yield this.client.get({
8
10
  path: posEndpoints.category.GET_CATEGORY_LIST_ITEM,
9
11
  query: data
10
12
  });
13
+ return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.CategoryListItemModel(item));
11
14
  });
12
15
  }
13
16
  }
@@ -6,7 +6,7 @@ export default class CheckOut extends Base implements CheckOutAbstractClass {
6
6
  static getItemList(data: Request.GetItemListRequest): Promise<any>;
7
7
  static getCheckOutHistoryList(data: Request.GetCheckOutHistoryListRequest): Promise<any>;
8
8
  static getCheckOutInfo(data: Request.GetCheckOutInfoRequest): Promise<any>;
9
- static getCheckOutHistoryInfo(data: Request.GetCheckOutHistoryInfoRequest): Promise<Response.DataWithMeta<Response.GetCheckOutHistoryInfoResponse>>;
9
+ static getCheckOutHistoryInfo(data: Request.GetCheckOutHistoryInfoRequest): Promise<Response.DataWithMeta<Array<Response.GetCheckOutHistoryInfoResponse>>>;
10
10
  static getCheckOutBatchCloseSummary(data: Request.GetCheckOutBatchCloseSummaryRequest): Promise<any>;
11
11
  static postCheckOutAddItem(data: Request.PostCheckOutAddItemRequest): Promise<any>;
12
12
  static postCheckOutRemoveItem(data: Request.PostCheckOutRemoveItemRequest): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"check_out.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/check_out.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,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-4,6 +4,6 @@ import * as Request from "../types/request";
4
4
  import * as Response from "../types/response";
5
5
  export default class Customer extends Base implements CustomerAbstractClass {
6
6
  static getCustomerList(data: Request.GetCustomerListRequest): Promise<Array<Response.GetCustomerListResponse>>;
7
- static getCustomerDetail(data: Request.GetCustomerDetailRequest): Promise<any>;
7
+ static getCustomerDetail(data: Request.GetCustomerDetailRequest): Promise<Response.GetCustomerDetailResponse>;
8
8
  }
9
9
  //# sourceMappingURL=customer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/customer.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAK,YAAW,qBAAqB;WACnD,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;WAUvG,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;CAQ/E"}
1
+ {"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/customer.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAK,YAAW,qBAAqB;WACnD,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;WAUvG,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC;CAS7H"}
@@ -15,10 +15,11 @@ export default class Customer extends Base {
15
15
  }
16
16
  static getCustomerDetail(data) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
- return yield this.client.get({
18
+ const response = yield this.client.get({
19
19
  path: posEndpoints.customer.GET_CUSTOMER_DETAIL,
20
20
  query: data
21
21
  });
22
+ return Model.CustomerDetailModel(response.result.data);
22
23
  });
23
24
  }
24
25
  }
@@ -1,7 +1,8 @@
1
1
  import KeyStorageAbstractClass from "../interfaces/key_storage";
2
2
  import Base from "../../../base/Base";
3
3
  import * as Request from "../types/request";
4
+ import * as Response from "../types/response";
4
5
  export default class KeyStorage extends Base implements KeyStorageAbstractClass {
5
- static getKeyStorage(data: Request.GetKeyStorageRequest): Promise<any>;
6
+ static getKeyStorage(data: Request.GetKeyStorageRequest): Promise<Response.GetKeyStorageResponse>;
6
7
  }
7
8
  //# sourceMappingURL=key_storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"key_storage.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/key_storage.ts"],"names":[],"mappings":"AACA,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAE3C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,IAAK,YAAW,uBAAuB;WACvD,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB;CAQvE"}
1
+ {"version":3,"file":"key_storage.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/key_storage.ts"],"names":[],"mappings":"AACA,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,IAAK,YAAW,uBAAuB;WACvD,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CASjH"}
@@ -1,13 +1,16 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import * as posEndpoints from "../endpoints";
3
3
  import Base from "../../../base/Base";
4
+ import * as Model from "../models";
4
5
  export default class KeyStorage extends Base {
5
6
  static getKeyStorage(data) {
7
+ var _a;
6
8
  return __awaiter(this, void 0, void 0, function* () {
7
- return yield this.client.get({
9
+ const response = yield this.client.get({
8
10
  path: posEndpoints.key_storage.GET_KEY_STORAGE,
9
11
  query: data
10
12
  });
13
+ return Model.KeyStorageModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
11
14
  });
12
15
  }
13
16
  }
@@ -3,12 +3,12 @@ import Base from "../../../base/Base";
3
3
  import * as Request from "../types/request";
4
4
  import * as Response from "../types/response";
5
5
  export default class Order extends Base implements OrderAbstractClass {
6
- static getOrderCheckInList(data: Request.GetOrderCheckInListRequest): Promise<any>;
6
+ static getOrderCheckInList(data: Request.GetOrderCheckInListRequest): Promise<Response.DataWithMeta<Array<Response.GetOrderDetailResponse>>>;
7
7
  static getOrderDetail(data: Request.GetOrderDetailRequest): Promise<Response.GetOrderDetailResponse>;
8
- static getOrderHistoryList(data: Request.GetOrderHistoryListRequest): Promise<any>;
8
+ static getOrderHistoryList(data: Request.GetOrderHistoryListRequest): Promise<Response.DataWithMeta<Array<Response.GetOrderHistoryListResponse>>>;
9
9
  static getReportCheckIn(data: Request.GetReportCheckInRequest): Promise<Response.GetReportCheckInResponse>;
10
- static updateOrderStaff(data: Request.UpdateOrderStaffRequest): Promise<any>;
11
- static removeOrder(data: Request.RemoveOrderRequest): Promise<any>;
12
- static exportOrder(data: Request.ExportOrderRequest): Promise<void>;
10
+ static updateOrderStaff(data: Request.UpdateOrderStaffRequest): Promise<Array<Response.UpdateOrderStaffResponse>>;
11
+ static removeOrder(data: Request.RemoveOrderRequest): Promise<null>;
12
+ static exportOrder(data: Request.ExportOrderRequest): Promise<null>;
13
13
  }
14
14
  //# sourceMappingURL=order.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/order.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAKtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,IAAK,YAAW,kBAAkB;WAC7C,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B;WAS5D,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;WAU7F,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B;WAS5D,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC;WAmBnG,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB;WAkBtD,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB;WAS5C,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB;CAmDnE"}
1
+ {"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/order.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAKtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,IAAK,YAAW,kBAAkB;WAC7C,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC;WAarI,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;WAU7F,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,CAAC;WAa1I,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC;WAmBnG,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;WAmB1G,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;WAU5D,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAoDnF"}
@@ -7,11 +7,16 @@ import dayjs from 'dayjs';
7
7
  import * as Model from "../models";
8
8
  export default class Order extends Base {
9
9
  static getOrderCheckInList(data) {
10
+ var _a, _b, _c, _d;
10
11
  return __awaiter(this, void 0, void 0, function* () {
11
- return yield this.client.get({
12
+ const response = yield this.client.get({
12
13
  path: posEndpoints.order.GET_CHECKIN_LIST,
13
14
  query: data
14
15
  });
16
+ return {
17
+ data: (((_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.items) || []).map(item => Model.OrderDetailModel(item)),
18
+ _meta: Model.MetaModel((_d = (_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d._meta)
19
+ };
15
20
  });
16
21
  }
17
22
  static getOrderDetail(data) {
@@ -25,11 +30,16 @@ export default class Order extends Base {
25
30
  });
26
31
  }
27
32
  static getOrderHistoryList(data) {
33
+ var _a, _b, _c, _d;
28
34
  return __awaiter(this, void 0, void 0, function* () {
29
- return yield this.client.get({
35
+ const response = yield this.client.get({
30
36
  path: posEndpoints.order.GET_ORDER_HISTORY_LIST,
31
37
  query: data
32
38
  });
39
+ return {
40
+ data: (((_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.items) || []).map(item => Model.OrderHistoryModel(item)),
41
+ _meta: Model.MetaModel((_d = (_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d._meta)
42
+ };
33
43
  });
34
44
  }
35
45
  static getReportCheckIn(data) {
@@ -50,11 +60,13 @@ export default class Order extends Base {
50
60
  // );
51
61
  // }
52
62
  static updateOrderStaff(data) {
63
+ var _a;
53
64
  return __awaiter(this, void 0, void 0, function* () {
54
- return yield this.client.post({
65
+ const response = yield this.client.post({
55
66
  path: posEndpoints.order.UPDATE_ORDER_STAFF,
56
67
  data: data
57
68
  });
69
+ return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.OrderStaffModel(item));
58
70
  });
59
71
  }
60
72
  // public static async checkPassword(data: InputDataType.GetIncomeHistory) {
@@ -67,10 +79,11 @@ export default class Order extends Base {
67
79
  // }
68
80
  static removeOrder(data) {
69
81
  return __awaiter(this, void 0, void 0, function* () {
70
- return yield this.client.post({
82
+ const response = yield this.client.post({
71
83
  path: posEndpoints.order.REMOVE_ORDER,
72
84
  data: data
73
85
  });
86
+ return null;
74
87
  });
75
88
  }
76
89
  static exportOrder(data) {
@@ -81,6 +94,7 @@ export default class Order extends Base {
81
94
  });
82
95
  let dateFormat = formatExportDateString();
83
96
  FileDownload(response, `export-orders-${dayjs().format(dateFormat)}.xls`);
97
+ return null;
84
98
  });
85
99
  }
86
100
  }
@@ -3,22 +3,23 @@ import Base from "../../../base/Base";
3
3
  import { GapApiVersion } from "../../../base_type";
4
4
  import * as Request from "../types/request";
5
5
  import * as Response from "../types/response";
6
+ import { GetSalaryChartResponse } from "../types/response";
6
7
  export default class Payroll extends Base implements PayrollAbstractClass {
7
8
  static API_VERSION: GapApiVersion;
8
- static getPayrollList(data: Request.GetPayrollListRequest): Promise<any>;
9
- static getPayrollSetting(data: Request.GetPayrollSettingRequest): Promise<any>;
10
- static approvePayroll(data: Request.ApprovePayrollRequest): Promise<any>;
11
- static updatePayrollSetting(data: Request.UpdatePayrollSettingRequest): Promise<any>;
12
- static getDiscountSetting(data: Request.GetDiscountSettingRequest): Promise<any>;
13
- static updateDiscountSetting(data: Request.UpdateDiscountSettingRequest): Promise<any>;
14
- static getCashDiscountSetting(data: Request.GetCashDiscountSettingRequest): Promise<any>;
15
- static updateCashDiscountSetting(data: Request.UpdateCashDiscountSettingRequest): Promise<any>;
16
- static getIncomeDetail(data: Request.GetIncomeDetailRequest): Promise<any>;
17
- static getApprovePayroll(data: Request.GetApprovePayrollRequest): Promise<any>;
18
- static exportPayroll(data: Request.ExportPayrollRequest): Promise<void>;
19
- static exportApprovePayroll(data: Request.ExportApprovePayrollRequest): Promise<void>;
20
- static exportIncomeDetail(data: Request.ExportIncomeDetailRequest): Promise<void>;
21
- static getSalaryChart(data: Request.GetSalaryChartRequest): Promise<any>;
9
+ static getPayrollList(data: Request.GetPayrollListRequest): Promise<Response.GetPayrollListResponse>;
10
+ static getPayrollSetting(data: Request.GetPayrollSettingRequest): Promise<Response.GetPayrollSettingResponse>;
11
+ static approvePayroll(data: Request.ApprovePayrollRequest): Promise<null>;
12
+ static updatePayrollSetting(data: Request.UpdatePayrollSettingRequest): Promise<Response.UpdatePayrollSettingResponse>;
13
+ static getDiscountSetting(data: Request.GetDiscountSettingRequest): Promise<Response.GetDiscountSettingResponse>;
14
+ static updateDiscountSetting(data: Request.UpdateDiscountSettingRequest): Promise<Response.UpdateDiscountSettingResponse>;
15
+ static getCashDiscountSetting(data: Request.GetCashDiscountSettingRequest): Promise<Response.GetCashDiscountSettingResponse>;
16
+ static updateCashDiscountSetting(data: Request.UpdateCashDiscountSettingRequest): Promise<Response.UpdateCashDiscountSettingResponse>;
17
+ static getIncomeDetail(data: Request.GetIncomeDetailRequest): Promise<Response.GetIncomeDetailResponse>;
18
+ static getApprovePayroll(data: Request.GetApprovePayrollRequest): Promise<Response.GetApprovePayrollResponse>;
19
+ static exportPayroll(data: Request.ExportPayrollRequest): Promise<null>;
20
+ static exportApprovePayroll(data: Request.ExportApprovePayrollRequest): Promise<null>;
21
+ static exportIncomeDetail(data: Request.ExportIncomeDetailRequest): Promise<null>;
22
+ static getSalaryChart(data: Request.GetSalaryChartRequest): Promise<GetSalaryChartResponse>;
22
23
  static getAppListPayroll(data: Request.GetAppListPayrollRequest): Promise<Array<Response.GetAppListPayrollResponse>>;
23
24
  static getPayrollDetail(data: Request.GetPayrollDetailRequest): Promise<Array<Response.GetPayrollDetailResponse>>;
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"payroll.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/payroll.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAItC,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;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AG,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC;WAUtG,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;WAYhE,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;WAY9E,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;WAY1E,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;WAUpF,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;WAU7G,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;CASjI"}
@@ -6,85 +6,105 @@ import dayjs from "dayjs";
6
6
  import { formatExportDateString } from "../../../utils/date-time";
7
7
  import { GapApiVersion } from "../../../base_type";
8
8
  import * as Model from "../models";
9
+ import { SalaryChartModel } from "../models";
9
10
  export default class Payroll extends Base {
10
11
  static getPayrollList(data) {
12
+ var _a;
11
13
  return __awaiter(this, void 0, void 0, function* () {
12
- return yield this.client.get({
14
+ const response = yield this.client.get({
13
15
  path: posEndpoints.payroll.GET_PAYROLL_LIST,
14
16
  query: data
15
17
  });
18
+ return Model.PayrollModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
16
19
  });
17
20
  }
18
21
  static getPayrollSetting(data) {
22
+ var _a;
19
23
  return __awaiter(this, void 0, void 0, function* () {
20
- return yield this.client.get({
24
+ const response = yield this.client.get({
21
25
  path: posEndpoints.payroll.GET_PAYROLL_SETTING,
22
26
  query: data
23
27
  });
28
+ return Model.PayrollSettingModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
24
29
  });
25
30
  }
26
31
  static approvePayroll(data) {
27
32
  return __awaiter(this, void 0, void 0, function* () {
28
- return yield this.client.post({
33
+ const response = yield this.client.post({
29
34
  path: posEndpoints.payroll.APPROVE_PAYROLL,
30
35
  data: data
31
36
  });
37
+ return null;
32
38
  });
33
39
  }
34
40
  static updatePayrollSetting(data) {
41
+ var _a;
35
42
  return __awaiter(this, void 0, void 0, function* () {
36
- return yield this.client.post({
43
+ const response = yield this.client.post({
37
44
  path: posEndpoints.payroll.UPDATE_PAYROLL_SETTING,
38
45
  data: data
39
46
  });
47
+ return Model.PayrollSettingModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
40
48
  });
41
49
  }
42
50
  static getDiscountSetting(data) {
51
+ var _a;
43
52
  return __awaiter(this, void 0, void 0, function* () {
44
- return yield this.client.get({
53
+ const response = yield this.client.get({
45
54
  path: posEndpoints.payroll.GET_DISCOUNT_SETTING,
46
55
  query: data
47
56
  });
57
+ return Model.DiscountSettingModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
48
58
  });
49
59
  }
50
60
  static updateDiscountSetting(data) {
61
+ var _a;
51
62
  return __awaiter(this, void 0, void 0, function* () {
52
- return yield this.client.post({
63
+ const response = yield this.client.post({
53
64
  path: posEndpoints.payroll.UPDATE_DISCOUNT_SETTING,
54
65
  data: data
55
66
  });
67
+ return Model.DiscountSettingModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
56
68
  });
57
69
  }
58
70
  static getCashDiscountSetting(data) {
71
+ var _a;
59
72
  return __awaiter(this, void 0, void 0, function* () {
60
- return yield this.client.get({
73
+ const response = yield this.client.get({
61
74
  path: posEndpoints.payroll.GET_CASH_DISCOUNT_SETTING,
62
75
  query: data
63
76
  });
77
+ return Model.CashDisCountSettingModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
64
78
  });
65
79
  }
66
80
  static updateCashDiscountSetting(data) {
81
+ var _a;
67
82
  return __awaiter(this, void 0, void 0, function* () {
68
- return yield this.client.post({
83
+ const response = yield this.client.post({
69
84
  path: posEndpoints.payroll.UPDATE_CASH_DISCOUNT_SETTING,
70
85
  data: data
71
86
  });
87
+ return Model.CashDisCountSettingModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
72
88
  });
73
89
  }
74
90
  static getIncomeDetail(data) {
91
+ var _a;
75
92
  return __awaiter(this, void 0, void 0, function* () {
76
- return yield this.client.get({
93
+ const response = yield this.client.get({
77
94
  path: posEndpoints.payroll.GET_INCOME_DETAIL,
78
95
  query: data
79
96
  });
97
+ return Model.IncomeModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
80
98
  });
81
99
  }
82
100
  static getApprovePayroll(data) {
101
+ var _a;
83
102
  return __awaiter(this, void 0, void 0, function* () {
84
- return yield this.client.get({
103
+ const response = yield this.client.get({
85
104
  path: posEndpoints.payroll.GET_APPROVE_PAYROLL,
86
105
  query: data
87
106
  });
107
+ return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.ApprovePayrollModel(item));
88
108
  });
89
109
  }
90
110
  static exportPayroll(data) {
@@ -95,6 +115,7 @@ export default class Payroll extends Base {
95
115
  });
96
116
  const exportDateFormat = formatExportDateString();
97
117
  FileDownload(response.data, `${dayjs().format(exportDateFormat)}.xlsx`, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
118
+ return null;
98
119
  });
99
120
  }
100
121
  static exportApprovePayroll(data) {
@@ -105,6 +126,7 @@ export default class Payroll extends Base {
105
126
  });
106
127
  const exportDateFormat = formatExportDateString();
107
128
  FileDownload(response.data, `${dayjs().format(exportDateFormat)}.xlsx`, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
129
+ return null;
108
130
  });
109
131
  }
110
132
  static exportIncomeDetail(data) {
@@ -115,14 +137,17 @@ export default class Payroll extends Base {
115
137
  });
116
138
  const exportDateFormat = formatExportDateString();
117
139
  FileDownload(response.data, `${dayjs().format(exportDateFormat)}.xlsx`, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
140
+ return null;
118
141
  });
119
142
  }
120
143
  static getSalaryChart(data) {
144
+ var _a;
121
145
  return __awaiter(this, void 0, void 0, function* () {
122
- return yield this.client.get({
146
+ const response = yield this.client.get({
123
147
  path: posEndpoints.payroll.GET_SALARY_CHART,
124
148
  query: data
125
149
  });
150
+ return SalaryChartModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
126
151
  });
127
152
  }
128
153
  static getAppListPayroll(data) {
@@ -1 +1 @@
1
- {"version":3,"file":"printer.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/printer.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAE3C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,IAAK,YAAW,oBAAoB;WACjD,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB;WAQlD,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB;WAQtD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;WAQxD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;CAQ/E"}
1
+ {"version":3,"file":"printer.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/printer.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAE3C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,IAAK,YAAW,oBAAoB;WACjD,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB;WASlD,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB;WAStD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;WASxD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;CAQ/E"}
@@ -1,13 +1,15 @@
1
1
  import TimeKeepingAbstractClass from "../interfaces/time_keeping";
2
2
  import Base from "../../../base/Base";
3
3
  import * as Request from "../types/request";
4
+ import * as Response from "../types/response";
5
+ import { GetTimeKeepingListStaffResponse } from "../types/response";
4
6
  export default class TimeKeeping extends Base implements TimeKeepingAbstractClass {
5
- static getTimeKeepingList(data: Request.GetTimeKeepingListRequest): Promise<any>;
6
- static addTimeKeeping(data: Request.AddTimeKeepingRequest): Promise<any>;
7
- static updateTimeKeeping(data: Request.UpdateTimeKeepingRequest): Promise<any>;
8
- static removeTimeKeeping(data: Request.RemoveTimeKeepingRequest): Promise<any>;
9
- static getTimeKeepingListStaff(data: Request.GetTimeKeepingListStaffRequest): Promise<any>;
10
- static postTimeKeepingCheckIn(data: Request.PostTimeKeepingCheckInRequest): Promise<any>;
11
- static postTimeKeepingCheckOut(data: Request.PostTimeKeepingCheckOutRequest): Promise<any>;
7
+ static getTimeKeepingList(data: Request.GetTimeKeepingListRequest): Promise<Response.DataWithMeta<Array<Response.GetTimeKeepingListResponse>>>;
8
+ static addTimeKeeping(data: Request.AddTimeKeepingRequest): Promise<null>;
9
+ static updateTimeKeeping(data: Request.UpdateTimeKeepingRequest): Promise<null>;
10
+ static removeTimeKeeping(data: Request.RemoveTimeKeepingRequest): Promise<null>;
11
+ static getTimeKeepingListStaff(data: Request.GetTimeKeepingListStaffRequest): Promise<Array<GetTimeKeepingListStaffResponse>>;
12
+ static postTimeKeepingCheckIn(data: Request.PostTimeKeepingCheckInRequest): Promise<null>;
13
+ static postTimeKeepingCheckOut(data: Request.PostTimeKeepingCheckOutRequest): Promise<null>;
12
14
  }
13
15
  //# sourceMappingURL=time_keeping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time_keeping.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/time_keeping.ts"],"names":[],"mappings":"AACA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,IAAK,YAAW,wBAAwB;WACzD,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,yBAAyB;WAS1D,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB;WASlD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;WASxD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;WASxD,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,8BAA8B;WASpE,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,6BAA6B;WASlE,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,8BAA8B;CAQ3F"}
1
+ {"version":3,"file":"time_keeping.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/time_keeping.ts"],"names":[],"mappings":"AACA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAC,+BAA+B,EAAC,MAAM,mBAAmB,CAAC;AAElE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,IAAK,YAAW,wBAAwB;WACzD,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC,CAAC;WAavI,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB;WAUlD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;WAUxD,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB;WAUxD,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,8BAA8B,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;WAUtH,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,6BAA6B;WAUlE,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,8BAA8B;CAS3F"}
@@ -1,61 +1,74 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import * as posEndpoints from "../endpoints";
3
3
  import Base from "../../../base/Base";
4
+ import * as Model from "../models";
4
5
  export default class TimeKeeping extends Base {
5
6
  static getTimeKeepingList(data) {
7
+ var _a, _b, _c, _d;
6
8
  return __awaiter(this, void 0, void 0, function* () {
7
- return yield this.client.get({
9
+ const response = yield this.client.get({
8
10
  path: posEndpoints.time_keeping.GET_TIME_KEEPING_LIST,
9
11
  query: data
10
12
  });
13
+ return {
14
+ data: (((_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.items) || []).map(item => Model.TimeKeepingListModel(item)),
15
+ _meta: Model.MetaModel((_d = (_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d._meta)
16
+ };
11
17
  });
12
18
  }
13
19
  static addTimeKeeping(data) {
14
20
  return __awaiter(this, void 0, void 0, function* () {
15
- return yield this.client.post({
21
+ yield this.client.post({
16
22
  path: posEndpoints.time_keeping.ADD_TIME_KEEPING,
17
23
  data: data
18
24
  });
25
+ return null;
19
26
  });
20
27
  }
21
28
  static updateTimeKeeping(data) {
22
29
  return __awaiter(this, void 0, void 0, function* () {
23
- return yield this.client.post({
30
+ yield this.client.post({
24
31
  path: posEndpoints.time_keeping.UPDATE_TIME_KEEPING,
25
32
  data: data
26
33
  });
34
+ return null;
27
35
  });
28
36
  }
29
37
  static removeTimeKeeping(data) {
30
38
  return __awaiter(this, void 0, void 0, function* () {
31
- return yield this.client.post({
39
+ yield this.client.post({
32
40
  path: posEndpoints.time_keeping.REMOVE_TIME_KEEPING,
33
41
  data: data
34
42
  });
43
+ return null;
35
44
  });
36
45
  }
37
46
  static getTimeKeepingListStaff(data) {
47
+ var _a;
38
48
  return __awaiter(this, void 0, void 0, function* () {
39
- return yield this.client.get({
49
+ const response = yield this.client.get({
40
50
  path: posEndpoints.time_keeping.GET_TIME_KEEPING_LIST_STAFF,
41
51
  query: data
42
52
  });
53
+ return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.TimeKeepingListStaffModel(item));
43
54
  });
44
55
  }
45
56
  static postTimeKeepingCheckIn(data) {
46
57
  return __awaiter(this, void 0, void 0, function* () {
47
- return yield this.client.post({
58
+ yield this.client.post({
48
59
  path: posEndpoints.time_keeping.POST_TIME_KEEPING_CHECK_IN,
49
60
  data: data
50
61
  });
62
+ return null;
51
63
  });
52
64
  }
53
65
  static postTimeKeepingCheckOut(data) {
54
66
  return __awaiter(this, void 0, void 0, function* () {
55
- return yield this.client.post({
67
+ this.client.post({
56
68
  path: posEndpoints.time_keeping.POST_TIME_KEEPING_CHECK_OUT,
57
69
  data: data
58
70
  });
71
+ return null;
59
72
  });
60
73
  }
61
74
  }
@@ -1,7 +1,7 @@
1
- import { ResponseDataApi } from "src/base_type";
2
1
  import * as Request from "../types/request";
2
+ import * as Response from "../types/response";
3
3
  export default abstract class BatchHistory {
4
- static getBatchHistory: (data: Request.GetBatchHistoryRequest) => Promise<ResponseDataApi>;
5
- static getBatchDetail: (data: Request.GetBatchDetailRequest) => Promise<ResponseDataApi>;
4
+ static getBatchHistory: (data: Request.GetBatchHistoryRequest) => Promise<Response.GetBatchHistoryResponse>;
5
+ static getBatchDetail: (data: Request.GetBatchDetailRequest) => Promise<Response.GetBatchDetailResponse>;
6
6
  }
7
7
  //# sourceMappingURL=batch_history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"batch_history.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/interfaces/batch_history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,YAAY;IACtC,OAAc,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAClG,OAAc,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CACnG"}
1
+ {"version":3,"file":"batch_history.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/interfaces/batch_history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,YAAY;IACtC,OAAc,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACnH,OAAc,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,KAAK,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;CACnH"}
@@ -1,7 +1,7 @@
1
- import { ResponseDataApi } from "src/base_type";
2
1
  import * as Request from "../types/request";
2
+ import * as Response from "../types/response";
3
3
  export default abstract class Business {
4
- static getBusinessInfo: (data: Request.GetBusinessInfoRequest) => Promise<ResponseDataApi>;
5
- static postBusinessUpdateInfo: (data: Request.PostBusinessUpdateInfoRequest) => Promise<ResponseDataApi>;
4
+ static getBusinessInfo: (data: Request.GetBusinessInfoRequest) => Promise<Response.GetBusinessInfoResponse>;
5
+ static postBusinessUpdateInfo: (data: Request.PostBusinessUpdateInfoRequest) => Promise<Response.PostBusinessUpdateInfoResponse>;
6
6
  }
7
7
  //# sourceMappingURL=business.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/interfaces/business.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAE5C,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,QAAQ;IAClC,OAAc,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAClG,OAAc,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,6BAA6B,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CACnH"}
1
+ {"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/interfaces/business.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,QAAQ;IAClC,OAAc,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACnH,OAAc,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,6BAA6B,KAAK,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;CAC3I"}
@@ -1,6 +1,6 @@
1
- import { ResponseDataApi } from "src/base_type";
2
1
  import * as InputDataType from "../types/request";
2
+ import * as Response from "../types/response";
3
3
  export default abstract class Category {
4
- static getCategoryListItem: (data: InputDataType.GetCategoryListItemRequest) => Promise<ResponseDataApi>;
4
+ static getCategoryListItem: (data: InputDataType.GetCategoryListItemRequest) => Promise<Array<Response.GetCategoryListItemResponse>>;
5
5
  }
6
6
  //# sourceMappingURL=category.d.ts.map