@things-factory/integration-fulfillment 9.0.0-beta.27 → 9.0.0-beta.29

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 (140) hide show
  1. package/dist-server/controllers/fulfillment-api/decorators.d.ts +1 -0
  2. package/dist-server/controllers/fulfillment-api/decorators.js +30 -0
  3. package/dist-server/controllers/fulfillment-api/decorators.js.map +1 -0
  4. package/dist-server/controllers/fulfillment-api/index.d.ts +19 -0
  5. package/dist-server/controllers/fulfillment-api/index.js +113 -0
  6. package/dist-server/controllers/fulfillment-api/index.js.map +1 -0
  7. package/dist-server/controllers/fulfillment-api/types.d.ts +0 -0
  8. package/dist-server/controllers/fulfillment-api/types.js +1 -0
  9. package/dist-server/controllers/fulfillment-api/types.js.map +1 -0
  10. package/dist-server/controllers/index.d.ts +1 -0
  11. package/dist-server/controllers/index.js +5 -0
  12. package/dist-server/controllers/index.js.map +1 -0
  13. package/dist-server/controllers/operato/cancel-release-order.d.ts +13 -0
  14. package/dist-server/controllers/operato/cancel-release-order.js +21 -0
  15. package/dist-server/controllers/operato/cancel-release-order.js.map +1 -0
  16. package/dist-server/controllers/operato/create-inbound-order.d.ts +23 -0
  17. package/dist-server/controllers/operato/create-inbound-order.js +35 -0
  18. package/dist-server/controllers/operato/create-inbound-order.js.map +1 -0
  19. package/dist-server/controllers/operato/create-outbound-order.d.ts +11 -0
  20. package/dist-server/controllers/operato/create-outbound-order.js +20 -0
  21. package/dist-server/controllers/operato/create-outbound-order.js.map +1 -0
  22. package/dist-server/controllers/operato/create-sales-invoice.d.ts +11 -0
  23. package/dist-server/controllers/operato/create-sales-invoice.js +20 -0
  24. package/dist-server/controllers/operato/create-sales-invoice.js.map +1 -0
  25. package/dist-server/controllers/operato/echo.d.ts +12 -0
  26. package/dist-server/controllers/operato/echo.js +18 -0
  27. package/dist-server/controllers/operato/echo.js.map +1 -0
  28. package/dist-server/controllers/operato/get-center-products.d.ts +10 -0
  29. package/dist-server/controllers/operato/get-center-products.js +22 -0
  30. package/dist-server/controllers/operato/get-center-products.js.map +1 -0
  31. package/dist-server/controllers/operato/get-inbound-order.d.ts +11 -0
  32. package/dist-server/controllers/operato/get-inbound-order.js +26 -0
  33. package/dist-server/controllers/operato/get-inbound-order.js.map +1 -0
  34. package/dist-server/controllers/operato/get-inventory-product-group-open-api.d.ts +14 -0
  35. package/dist-server/controllers/operato/get-inventory-product-group-open-api.js +21 -0
  36. package/dist-server/controllers/operato/get-inventory-product-group-open-api.js.map +1 -0
  37. package/dist-server/controllers/operato/get-inventory-product-group.d.ts +14 -0
  38. package/dist-server/controllers/operato/get-inventory-product-group.js +21 -0
  39. package/dist-server/controllers/operato/get-inventory-product-group.js.map +1 -0
  40. package/dist-server/controllers/operato/get-outbound-order.d.ts +11 -0
  41. package/dist-server/controllers/operato/get-outbound-order.js +26 -0
  42. package/dist-server/controllers/operato/get-outbound-order.js.map +1 -0
  43. package/dist-server/controllers/operato/get-outbound-orders.d.ts +11 -0
  44. package/dist-server/controllers/operato/get-outbound-orders.js +24 -0
  45. package/dist-server/controllers/operato/get-outbound-orders.js.map +1 -0
  46. package/dist-server/controllers/operato/index.d.ts +1 -0
  47. package/dist-server/controllers/operato/index.js +33 -0
  48. package/dist-server/controllers/operato/index.js.map +1 -0
  49. package/dist-server/controllers/operato/operato.d.ts +15 -0
  50. package/dist-server/controllers/operato/operato.js +93 -0
  51. package/dist-server/controllers/operato/operato.js.map +1 -0
  52. package/dist-server/controllers/operato/platform-action.d.ts +12 -0
  53. package/dist-server/controllers/operato/platform-action.js +49 -0
  54. package/dist-server/controllers/operato/platform-action.js.map +1 -0
  55. package/dist-server/controllers/operato/update-release-order-details.d.ts +14 -0
  56. package/dist-server/controllers/operato/update-release-order-details.js +20 -0
  57. package/dist-server/controllers/operato/update-release-order-details.js.map +1 -0
  58. package/dist-server/entities/fulfillment-center.d.ts +24 -0
  59. package/dist-server/entities/fulfillment-center.js +97 -0
  60. package/dist-server/entities/fulfillment-center.js.map +1 -0
  61. package/dist-server/entities/index.d.ts +3 -0
  62. package/dist-server/entities/index.js +7 -0
  63. package/dist-server/entities/index.js.map +1 -0
  64. package/dist-server/graphql/index.d.ts +6 -0
  65. package/dist-server/graphql/index.js +11 -0
  66. package/dist-server/graphql/index.js.map +1 -0
  67. package/dist-server/graphql/resolvers/fulfillment-center/create-fulfillment-center.d.ts +5 -0
  68. package/dist-server/graphql/resolvers/fulfillment-center/create-fulfillment-center.js +11 -0
  69. package/dist-server/graphql/resolvers/fulfillment-center/create-fulfillment-center.js.map +1 -0
  70. package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-center.d.ts +5 -0
  71. package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-center.js +12 -0
  72. package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-center.js.map +1 -0
  73. package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-centers.d.ts +5 -0
  74. package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-centers.js +16 -0
  75. package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-centers.js.map +1 -0
  76. package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-center.d.ts +6 -0
  77. package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-center.js +15 -0
  78. package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-center.js.map +1 -0
  79. package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-centers.d.ts +8 -0
  80. package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-centers.js +18 -0
  81. package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-centers.js.map +1 -0
  82. package/dist-server/graphql/resolvers/fulfillment-center/having-fulfillment-center.d.ts +5 -0
  83. package/dist-server/graphql/resolvers/fulfillment-center/having-fulfillment-center.js +20 -0
  84. package/dist-server/graphql/resolvers/fulfillment-center/having-fulfillment-center.js.map +1 -0
  85. package/dist-server/graphql/resolvers/fulfillment-center/index.d.ts +29 -0
  86. package/dist-server/graphql/resolvers/fulfillment-center/index.js +16 -0
  87. package/dist-server/graphql/resolvers/fulfillment-center/index.js.map +1 -0
  88. package/dist-server/graphql/resolvers/fulfillment-center/operato/deactivate-operato-center.d.ts +6 -0
  89. package/dist-server/graphql/resolvers/fulfillment-center/operato/deactivate-operato-center.js +46 -0
  90. package/dist-server/graphql/resolvers/fulfillment-center/operato/deactivate-operato-center.js.map +1 -0
  91. package/dist-server/graphql/resolvers/fulfillment-center/operato/generate-operato-access-token.d.ts +6 -0
  92. package/dist-server/graphql/resolvers/fulfillment-center/operato/generate-operato-access-token.js +51 -0
  93. package/dist-server/graphql/resolvers/fulfillment-center/operato/generate-operato-access-token.js.map +1 -0
  94. package/dist-server/graphql/resolvers/fulfillment-center/operato/get-operato-auth-url.d.ts +5 -0
  95. package/dist-server/graphql/resolvers/fulfillment-center/operato/get-operato-auth-url.js +14 -0
  96. package/dist-server/graphql/resolvers/fulfillment-center/operato/get-operato-auth-url.js.map +1 -0
  97. package/dist-server/graphql/resolvers/fulfillment-center/operato/index.d.ts +17 -0
  98. package/dist-server/graphql/resolvers/fulfillment-center/operato/index.js +10 -0
  99. package/dist-server/graphql/resolvers/fulfillment-center/operato/index.js.map +1 -0
  100. package/dist-server/graphql/resolvers/fulfillment-center/operato/refresh-operato-access-token.d.ts +5 -0
  101. package/dist-server/graphql/resolvers/fulfillment-center/operato/refresh-operato-access-token.js +46 -0
  102. package/dist-server/graphql/resolvers/fulfillment-center/operato/refresh-operato-access-token.js.map +1 -0
  103. package/dist-server/graphql/resolvers/fulfillment-center/update-fulfillment-center.d.ts +6 -0
  104. package/dist-server/graphql/resolvers/fulfillment-center/update-fulfillment-center.js +15 -0
  105. package/dist-server/graphql/resolvers/fulfillment-center/update-fulfillment-center.js.map +1 -0
  106. package/dist-server/graphql/resolvers/fulfillment-center/update-multiple-fulfillment-center.d.ts +5 -0
  107. package/dist-server/graphql/resolvers/fulfillment-center/update-multiple-fulfillment-center.js +30 -0
  108. package/dist-server/graphql/resolvers/fulfillment-center/update-multiple-fulfillment-center.js.map +1 -0
  109. package/dist-server/graphql/resolvers/index.d.ts +29 -0
  110. package/dist-server/graphql/resolvers/index.js +8 -0
  111. package/dist-server/graphql/resolvers/index.js.map +1 -0
  112. package/dist-server/graphql/types/fulfillment-center/fulfillment-center-list.d.ts +1 -0
  113. package/dist-server/graphql/types/fulfillment-center/fulfillment-center-list.js +12 -0
  114. package/dist-server/graphql/types/fulfillment-center/fulfillment-center-list.js.map +1 -0
  115. package/dist-server/graphql/types/fulfillment-center/fulfillment-center-patch.d.ts +1 -0
  116. package/dist-server/graphql/types/fulfillment-center/fulfillment-center-patch.js +17 -0
  117. package/dist-server/graphql/types/fulfillment-center/fulfillment-center-patch.js.map +1 -0
  118. package/dist-server/graphql/types/fulfillment-center/fulfillment-center.d.ts +1 -0
  119. package/dist-server/graphql/types/fulfillment-center/fulfillment-center.js +23 -0
  120. package/dist-server/graphql/types/fulfillment-center/fulfillment-center.js.map +1 -0
  121. package/dist-server/graphql/types/fulfillment-center/index.d.ts +3 -0
  122. package/dist-server/graphql/types/fulfillment-center/index.js +53 -0
  123. package/dist-server/graphql/types/fulfillment-center/index.js.map +1 -0
  124. package/dist-server/graphql/types/fulfillment-center/new-fulfillment-center.d.ts +1 -0
  125. package/dist-server/graphql/types/fulfillment-center/new-fulfillment-center.js +15 -0
  126. package/dist-server/graphql/types/fulfillment-center/new-fulfillment-center.js.map +1 -0
  127. package/dist-server/graphql/types/index.d.ts +4 -0
  128. package/dist-server/graphql/types/index.js +10 -0
  129. package/dist-server/graphql/types/index.js.map +1 -0
  130. package/dist-server/index.d.ts +5 -0
  131. package/dist-server/index.js +9 -0
  132. package/dist-server/index.js.map +1 -0
  133. package/dist-server/migrations/index.d.ts +1 -0
  134. package/dist-server/migrations/index.js +12 -0
  135. package/dist-server/migrations/index.js.map +1 -0
  136. package/dist-server/routes.d.ts +1 -0
  137. package/dist-server/routes.js +19 -0
  138. package/dist-server/routes.js.map +1 -0
  139. package/dist-server/tsconfig.tsbuildinfo +1 -0
  140. package/package.json +11 -11
@@ -0,0 +1 @@
1
+ export declare const api: (target: Object, property: string, descriptor: TypedPropertyDescriptor<any>) => any;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.api = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const debug_1 = tslib_1.__importDefault(require("debug"));
6
+ const debug = (0, debug_1.default)('things-factory:integration-fulfillment:fulfillment-api-decorator');
7
+ const NOOP = v => v;
8
+ const api = (target, property, descriptor) => {
9
+ const method = descriptor.value;
10
+ descriptor.value = async function (center, request) {
11
+ const FulfillmentAPI = this;
12
+ var { platform } = center;
13
+ var { action: platformAction, apis } = FulfillmentAPI.getPlatform(platform);
14
+ var m = apis[method.name];
15
+ if (!m) {
16
+ throw Error(`Fulfillment Platform '${platform}' doesn't have API ${method.name}`);
17
+ }
18
+ var { path, method: httpMethod = 'post', denormalize = NOOP, normalize = NOOP, action = platformAction } = m.apply(this, [request]);
19
+ var denormalized = denormalize(request || {});
20
+ debug('request', denormalized);
21
+ var response = await action.apply(this, [
22
+ { center, method: httpMethod, path, request: denormalized, platformAction }
23
+ ]);
24
+ debug('response', response);
25
+ return normalize(response);
26
+ };
27
+ return descriptor;
28
+ };
29
+ exports.api = api;
30
+ //# sourceMappingURL=decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../server/controllers/fulfillment-api/decorators.ts"],"names":[],"mappings":";;;;AAAA,0DAAyB;AACzB,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,kEAAkE,CAAC,CAAA;AAIvF,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAEZ,MAAM,GAAG,GAAG,CAAC,MAAc,EAAE,QAAgB,EAAE,UAAwC,EAAO,EAAE;IACrG,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;IAE/B,UAAU,CAAC,KAAK,GAAG,KAAK,WAAW,MAAyB,EAAE,OAAO;QACnE,MAAM,cAAc,GAAG,IAAI,CAAA;QAE3B,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;QAEzB,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;QAE3E,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACzB,IAAI,CAAC,CAAC,EAAE,CAAC;YACP,MAAM,KAAK,CAAC,yBAAyB,QAAQ,sBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;QACnF,CAAC;QAED,IAAI,EACF,IAAI,EACJ,MAAM,EAAE,UAAU,GAAG,MAAM,EAC3B,WAAW,GAAG,IAAI,EAClB,SAAS,GAAG,IAAI,EAChB,MAAM,GAAG,cAAc,EACxB,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;QAE5B,IAAI,YAAY,GAAG,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;QAC7C,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;QAE9B,IAAI,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;YACtC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE;SAC5E,CAAC,CAAA;QAEF,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;QAE3B,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAA;IAC5B,CAAC,CAAA;IAED,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AApCY,QAAA,GAAG,OAoCf","sourcesContent":["import Debug from 'debug'\nconst debug = Debug('things-factory:integration-fulfillment:fulfillment-api-decorator')\n\nimport { FulfillmentCenter } from '../../entities'\n\nconst NOOP = v => v\n\nexport const api = (target: Object, property: string, descriptor: TypedPropertyDescriptor<any>): any => {\n const method = descriptor.value\n\n descriptor.value = async function (center: FulfillmentCenter, request) {\n const FulfillmentAPI = this\n\n var { platform } = center\n\n var { action: platformAction, apis } = FulfillmentAPI.getPlatform(platform)\n\n var m = apis[method.name]\n if (!m) {\n throw Error(`Fulfillment Platform '${platform}' doesn't have API ${method.name}`)\n }\n\n var {\n path,\n method: httpMethod = 'post',\n denormalize = NOOP,\n normalize = NOOP,\n action = platformAction\n } = m.apply(this, [request])\n\n var denormalized = denormalize(request || {})\n debug('request', denormalized)\n\n var response = await action.apply(this, [\n { center, method: httpMethod, path, request: denormalized, platformAction }\n ])\n\n debug('response', response)\n\n return normalize(response)\n }\n\n return descriptor\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { FulfillmentCenter } from '../../entities';
2
+ export declare class FulfillmentAPI {
3
+ static platforms: {};
4
+ static registerPlatform(name: any, action: any, apis: any): void;
5
+ static getPlatform(name: any): any;
6
+ static getFulfillmentCenter(id: any): Promise<FulfillmentCenter>;
7
+ static echo(center: any, req: any): any;
8
+ static getCenterProducts(center: any, req: any): any;
9
+ static getInventoryProductGroup(center: any, req: any): any;
10
+ static getInventoryProductGroupOpenAPI(center: any, req: any): any;
11
+ static getOutboundOrder(center: any, req: any): any;
12
+ static getOutboundOrders(center: any, req: any): any;
13
+ static getInboundOrder(center: any, req: any): any;
14
+ static cancelReleaseOrder(center: any, req: any): any;
15
+ static createOutboundOrder(center: any, req: any): any;
16
+ static createInboundOrder(center: any, req: any): any;
17
+ static createSalesInvoice(center: any, req: any): any;
18
+ static updateReleaseGoodDetails(center: any, req: any): any;
19
+ }
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FulfillmentAPI = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const shell_1 = require("@things-factory/shell");
6
+ const entities_1 = require("../../entities");
7
+ const decorators_1 = require("./decorators");
8
+ class FulfillmentAPI {
9
+ static registerPlatform(name, action, apis) {
10
+ FulfillmentAPI.platforms[name] = {
11
+ action,
12
+ apis
13
+ };
14
+ }
15
+ static getPlatform(name) {
16
+ return FulfillmentAPI.platforms[name];
17
+ }
18
+ static async getFulfillmentCenter(id) {
19
+ const repository = (0, shell_1.getRepository)(entities_1.FulfillmentCenter);
20
+ // return await repository.find(id)
21
+ return await repository.findOne({
22
+ where: { id },
23
+ relations: ['domain']
24
+ });
25
+ }
26
+ static echo(center, req) { }
27
+ static getCenterProducts(center, req) { }
28
+ static getInventoryProductGroup(center, req) { }
29
+ static getInventoryProductGroupOpenAPI(center, req) { }
30
+ static getOutboundOrder(center, req) { }
31
+ static getOutboundOrders(center, req) { }
32
+ static getInboundOrder(center, req) { }
33
+ static cancelReleaseOrder(center, req) { }
34
+ static createOutboundOrder(center, req) { }
35
+ static createInboundOrder(center, req) { }
36
+ static createSalesInvoice(center, req) { }
37
+ static updateReleaseGoodDetails(center, req) { }
38
+ }
39
+ exports.FulfillmentAPI = FulfillmentAPI;
40
+ FulfillmentAPI.platforms = {};
41
+ tslib_1.__decorate([
42
+ decorators_1.api,
43
+ tslib_1.__metadata("design:type", Function),
44
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
45
+ tslib_1.__metadata("design:returntype", Object)
46
+ ], FulfillmentAPI, "echo", null);
47
+ tslib_1.__decorate([
48
+ decorators_1.api,
49
+ tslib_1.__metadata("design:type", Function),
50
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
51
+ tslib_1.__metadata("design:returntype", Object)
52
+ ], FulfillmentAPI, "getCenterProducts", null);
53
+ tslib_1.__decorate([
54
+ decorators_1.api,
55
+ tslib_1.__metadata("design:type", Function),
56
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
57
+ tslib_1.__metadata("design:returntype", Object)
58
+ ], FulfillmentAPI, "getInventoryProductGroup", null);
59
+ tslib_1.__decorate([
60
+ decorators_1.api,
61
+ tslib_1.__metadata("design:type", Function),
62
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
63
+ tslib_1.__metadata("design:returntype", Object)
64
+ ], FulfillmentAPI, "getInventoryProductGroupOpenAPI", null);
65
+ tslib_1.__decorate([
66
+ decorators_1.api,
67
+ tslib_1.__metadata("design:type", Function),
68
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
69
+ tslib_1.__metadata("design:returntype", Object)
70
+ ], FulfillmentAPI, "getOutboundOrder", null);
71
+ tslib_1.__decorate([
72
+ decorators_1.api,
73
+ tslib_1.__metadata("design:type", Function),
74
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
75
+ tslib_1.__metadata("design:returntype", Object)
76
+ ], FulfillmentAPI, "getOutboundOrders", null);
77
+ tslib_1.__decorate([
78
+ decorators_1.api,
79
+ tslib_1.__metadata("design:type", Function),
80
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
81
+ tslib_1.__metadata("design:returntype", Object)
82
+ ], FulfillmentAPI, "getInboundOrder", null);
83
+ tslib_1.__decorate([
84
+ decorators_1.api,
85
+ tslib_1.__metadata("design:type", Function),
86
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
87
+ tslib_1.__metadata("design:returntype", Object)
88
+ ], FulfillmentAPI, "cancelReleaseOrder", null);
89
+ tslib_1.__decorate([
90
+ decorators_1.api,
91
+ tslib_1.__metadata("design:type", Function),
92
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
93
+ tslib_1.__metadata("design:returntype", Object)
94
+ ], FulfillmentAPI, "createOutboundOrder", null);
95
+ tslib_1.__decorate([
96
+ decorators_1.api,
97
+ tslib_1.__metadata("design:type", Function),
98
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
99
+ tslib_1.__metadata("design:returntype", Object)
100
+ ], FulfillmentAPI, "createInboundOrder", null);
101
+ tslib_1.__decorate([
102
+ decorators_1.api,
103
+ tslib_1.__metadata("design:type", Function),
104
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
105
+ tslib_1.__metadata("design:returntype", Object)
106
+ ], FulfillmentAPI, "createSalesInvoice", null);
107
+ tslib_1.__decorate([
108
+ decorators_1.api,
109
+ tslib_1.__metadata("design:type", Function),
110
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
111
+ tslib_1.__metadata("design:returntype", Object)
112
+ ], FulfillmentAPI, "updateReleaseGoodDetails", null);
113
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/controllers/fulfillment-api/index.ts"],"names":[],"mappings":";;;;AAAA,iDAAqD;AAErD,6CAAkD;AAClD,6CAAkC;AAElC,MAAa,cAAc;IAGzB,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI;QACxC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;YAC/B,MAAM;YACN,IAAI;SACL,CAAA;IACH,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAI;QACrB,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE;QAClC,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,4BAAiB,CAAC,CAAA;QACnD,mCAAmC;QACnC,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;YAC9B,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,SAAS,EAAE,CAAC,QAAQ,CAAC;SACtB,CAAC,CAAA;IACJ,CAAC;IAGM,AAAP,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGzB,AAAP,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGtC,AAAP,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAG7C,AAAP,MAAM,CAAC,+BAA+B,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGpD,AAAP,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGrC,AAAP,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGtC,AAAP,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGpC,AAAP,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGvC,AAAP,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGxC,AAAP,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGvC,AAAP,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;IAGvC,AAAP,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,IAAQ,CAAC;;AAzDtD,wCA0DC;AAzDQ,wBAAS,GAAG,EAAE,CAAA;AAuBd;IADN,gBAAG;;;;gCAC4B;AAGzB;IADN,gBAAG;;;;6CACyC;AAGtC;IADN,gBAAG;;;;oDACgD;AAG7C;IADN,gBAAG;;;;2DACuD;AAGpD;IADN,gBAAG;;;;4CACwC;AAGrC;IADN,gBAAG;;;;6CACyC;AAGtC;IADN,gBAAG;;;;2CACuC;AAGpC;IADN,gBAAG;;;;8CAC0C;AAGvC;IADN,gBAAG;;;;+CAC2C;AAGxC;IADN,gBAAG;;;;8CAC0C;AAGvC;IADN,gBAAG;;;;8CAC0C;AAGvC;IADN,gBAAG;;;;oDACgD","sourcesContent":["import { getRepository } from '@things-factory/shell'\n\nimport { FulfillmentCenter } from '../../entities'\nimport { api } from './decorators'\n\nexport class FulfillmentAPI {\n static platforms = {}\n\n static registerPlatform(name, action, apis) {\n FulfillmentAPI.platforms[name] = {\n action,\n apis\n }\n }\n\n static getPlatform(name) {\n return FulfillmentAPI.platforms[name]\n }\n\n static async getFulfillmentCenter(id) {\n const repository = getRepository(FulfillmentCenter)\n // return await repository.find(id)\n return await repository.findOne({\n where: { id },\n relations: ['domain']\n })\n }\n\n @api\n static echo(center, req): any {}\n\n @api\n static getCenterProducts(center, req): any {}\n\n @api\n static getInventoryProductGroup(center, req): any {}\n\n @api\n static getInventoryProductGroupOpenAPI(center, req): any {}\n\n @api\n static getOutboundOrder(center, req): any {}\n\n @api\n static getOutboundOrders(center, req): any {}\n\n @api\n static getInboundOrder(center, req): any {}\n\n @api\n static cancelReleaseOrder(center, req): any {}\n\n @api\n static createOutboundOrder(center, req): any {}\n\n @api\n static createInboundOrder(center, req): any {}\n\n @api\n static createSalesInvoice(center, req): any {}\n\n @api\n static updateReleaseGoodDetails(center, req): any {}\n}\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../server/controllers/fulfillment-api/types.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1 @@
1
+ export * from './fulfillment-api';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./fulfillment-api"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":";;;AAAA,4DAAiC","sourcesContent":["export * from './fulfillment-api'\n"]}
@@ -0,0 +1,13 @@
1
+ export declare function cancelReleaseOrder(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ payload: {
6
+ releaseOrderId: any;
7
+ };
8
+ resource: {
9
+ warehouseId: any;
10
+ };
11
+ };
12
+ normalize(res: any): any;
13
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.cancelReleaseOrder = cancelReleaseOrder;
5
+ function cancelReleaseOrder() {
6
+ return {
7
+ method: 'post',
8
+ path: '/unstable/warehouse/{warehouseId}/cancel-release-order',
9
+ denormalize(req) {
10
+ var { customerBizplaceId, releaseOrderId } = req;
11
+ return {
12
+ payload: { releaseOrderId },
13
+ resource: { warehouseId: customerBizplaceId }
14
+ };
15
+ },
16
+ normalize(res) {
17
+ return res;
18
+ }
19
+ };
20
+ }
21
+ //# sourceMappingURL=cancel-release-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-release-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/cancel-release-order.ts"],"names":[],"mappings":";AAAA,2GAA2G;;AAE3G,gDAgBC;AAhBD,SAAgB,kBAAkB;IAChC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,wDAAwD;QAC9D,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;YAEhD,OAAO;gBACL,OAAO,EAAE,EAAE,cAAc,EAAE;gBAC3B,QAAQ,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;aAC9C,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */\n\nexport function cancelReleaseOrder() {\n return {\n method: 'post',\n path: '/unstable/warehouse/{warehouseId}/cancel-release-order',\n denormalize(req) {\n var { customerBizplaceId, releaseOrderId } = req\n\n return {\n payload: { releaseOrderId },\n resource: { warehouseId: customerBizplaceId }\n }\n },\n normalize(res) {\n return res\n }\n }\n}\n"]}
@@ -0,0 +1,23 @@
1
+ export declare function createInboundOrder(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ payload: {
6
+ containerNo: any;
7
+ containerSize: any;
8
+ ownTransport: any;
9
+ crossDocking: boolean;
10
+ refNo: any;
11
+ refNo2: any;
12
+ importCargo: any;
13
+ looseItem: boolean;
14
+ etaDate: any;
15
+ truckNo: any;
16
+ orderProducts: any;
17
+ };
18
+ resource: {
19
+ warehouseId: any;
20
+ };
21
+ };
22
+ normalize(res: any): any;
23
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.createInboundOrder = createInboundOrder;
5
+ function createInboundOrder() {
6
+ return {
7
+ method: 'post',
8
+ path: '/unstable/warehouse/{warehouseId}/add-inbound-order',
9
+ denormalize(req) {
10
+ var { customerBizplaceId, purchaseOrder } = req;
11
+ return {
12
+ payload: {
13
+ containerNo: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.containerNo,
14
+ containerSize: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.containerSize,
15
+ ownTransport: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.ownTransport,
16
+ crossDocking: false,
17
+ refNo: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.refNo,
18
+ refNo2: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.refNo2,
19
+ importCargo: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.importCargo,
20
+ looseItem: false,
21
+ etaDate: purchaseOrder.etaDate,
22
+ truckNo: purchaseOrder === null || purchaseOrder === void 0 ? void 0 : purchaseOrder.truckNo,
23
+ orderProducts: purchaseOrder.orderProducts
24
+ },
25
+ resource: {
26
+ warehouseId: customerBizplaceId
27
+ }
28
+ };
29
+ },
30
+ normalize(res) {
31
+ return res;
32
+ }
33
+ };
34
+ }
35
+ //# sourceMappingURL=create-inbound-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-inbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/create-inbound-order.ts"],"names":[],"mappings":";AAAA,2GAA2G;;AAE3G,gDA8BC;AA9BD,SAAgB,kBAAkB;IAChC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,qDAAqD;QAC3D,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,GAAG,GAAG,CAAA;YAE/C,OAAO;gBACL,OAAO,EAAE;oBACP,WAAW,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW;oBACvC,aAAa,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,aAAa;oBAC3C,YAAY,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,YAAY;oBACzC,YAAY,EAAE,KAAK;oBACnB,KAAK,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK;oBAC3B,MAAM,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM;oBAC7B,WAAW,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW;oBACvC,SAAS,EAAE,KAAK;oBAChB,OAAO,EAAE,aAAa,CAAC,OAAO;oBAC9B,OAAO,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO;oBAC/B,aAAa,EAAE,aAAa,CAAC,aAAa;iBAC3C;gBACD,QAAQ,EAAE;oBACR,WAAW,EAAE,kBAAkB;iBAChC;aACF,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */\n\nexport function createInboundOrder() {\n return {\n method: 'post',\n path: '/unstable/warehouse/{warehouseId}/add-inbound-order',\n denormalize(req) {\n var { customerBizplaceId, purchaseOrder } = req\n\n return {\n payload: {\n containerNo: purchaseOrder?.containerNo,\n containerSize: purchaseOrder?.containerSize,\n ownTransport: purchaseOrder?.ownTransport,\n crossDocking: false,\n refNo: purchaseOrder?.refNo,\n refNo2: purchaseOrder?.refNo2,\n importCargo: purchaseOrder?.importCargo,\n looseItem: false,\n etaDate: purchaseOrder.etaDate,\n truckNo: purchaseOrder?.truckNo,\n orderProducts: purchaseOrder.orderProducts\n },\n resource: {\n warehouseId: customerBizplaceId\n }\n }\n },\n normalize(res) {\n return res\n }\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export declare function createOutboundOrder(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ payload: any;
6
+ resource: {
7
+ warehouseId: any;
8
+ };
9
+ };
10
+ normalize(res: any): any;
11
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createOutboundOrder = createOutboundOrder;
4
+ function createOutboundOrder() {
5
+ return {
6
+ method: 'post',
7
+ path: '/unstable/warehouse/{warehouseId}/add-release-order',
8
+ denormalize(req) {
9
+ var { customerBizplaceId, releaseOrder } = req;
10
+ return {
11
+ payload: Object.assign({}, releaseOrder),
12
+ resource: { warehouseId: customerBizplaceId }
13
+ };
14
+ },
15
+ normalize(res) {
16
+ return res.result.addReleaseGood;
17
+ }
18
+ };
19
+ }
20
+ //# sourceMappingURL=create-outbound-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-outbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/create-outbound-order.ts"],"names":[],"mappings":";;AAAA,kDAgBC;AAhBD,SAAgB,mBAAmB;IACjC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,qDAAqD;QAC3D,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,YAAY,EAAE,GAAG,GAAG,CAAA;YAE9C,OAAO;gBACL,OAAO,oBAAO,YAAY,CAAE;gBAC5B,QAAQ,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;aAC9C,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAC,MAAM,CAAC,cAAc,CAAA;QAClC,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["export function createOutboundOrder() {\n return {\n method: 'post',\n path: '/unstable/warehouse/{warehouseId}/add-release-order',\n denormalize(req) {\n var { customerBizplaceId, releaseOrder } = req\n\n return {\n payload: { ...releaseOrder },\n resource: { warehouseId: customerBizplaceId }\n }\n },\n normalize(res) {\n return res.result.addReleaseGood\n }\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export declare function createSalesInvoice(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ payload: any;
6
+ resource: {
7
+ warehouseId: any;
8
+ };
9
+ };
10
+ normalize(res: any): any;
11
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSalesInvoice = createSalesInvoice;
4
+ function createSalesInvoice() {
5
+ return {
6
+ method: 'post',
7
+ path: '/unstable/warehouse/{warehouseId}/add-sales-invoice',
8
+ denormalize(req) {
9
+ var { customerBizplaceId, invoice } = req;
10
+ return {
11
+ payload: Object.assign({}, invoice),
12
+ resource: { warehouseId: customerBizplaceId }
13
+ };
14
+ },
15
+ normalize(res) {
16
+ return res.result.createInvoice;
17
+ }
18
+ };
19
+ }
20
+ //# sourceMappingURL=create-sales-invoice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-sales-invoice.js","sourceRoot":"","sources":["../../../server/controllers/operato/create-sales-invoice.ts"],"names":[],"mappings":";;AAAA,gDAgBC;AAhBD,SAAgB,kBAAkB;IAChC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,qDAAqD;QAC3D,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,GAAG,CAAA;YAEzC,OAAO;gBACL,OAAO,oBAAO,OAAO,CAAE;gBACvB,QAAQ,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;aAC9C,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAC,MAAM,CAAC,aAAa,CAAA;QACjC,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["export function createSalesInvoice() {\n return {\n method: 'post',\n path: '/unstable/warehouse/{warehouseId}/add-sales-invoice',\n denormalize(req) {\n var { customerBizplaceId, invoice } = req\n\n return {\n payload: { ...invoice },\n resource: { warehouseId: customerBizplaceId }\n }\n },\n normalize(res) {\n return res.result.createInvoice\n }\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ export declare function echo(): {
2
+ path: string;
3
+ denormalize(req: any): any;
4
+ normalize(res: any): any;
5
+ action({ center, method, path, request, platformAction }: {
6
+ center: any;
7
+ method: any;
8
+ path: any;
9
+ request: any;
10
+ platformAction: any;
11
+ }): any;
12
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.echo = echo;
4
+ function echo() {
5
+ return {
6
+ path: '/echo',
7
+ denormalize(req) {
8
+ return Object.assign({}, req);
9
+ },
10
+ normalize(res) {
11
+ return Object.assign({}, res);
12
+ },
13
+ action({ center, method, path, request, platformAction }) {
14
+ return Object.assign({}, request);
15
+ }
16
+ };
17
+ }
18
+ //# sourceMappingURL=echo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echo.js","sourceRoot":"","sources":["../../../server/controllers/operato/echo.ts"],"names":[],"mappings":";;AAAA,oBAaC;AAbD,SAAgB,IAAI;IAClB,OAAO;QACL,IAAI,EAAE,OAAO;QACb,WAAW,CAAC,GAAG;YACb,yBAAY,GAAG,EAAE;QACnB,CAAC;QACD,SAAS,CAAC,GAAG;YACX,yBAAY,GAAG,EAAE;QACnB,CAAC;QACD,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE;YACtD,yBAAY,OAAO,EAAE;QACvB,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["export function echo() {\n return {\n path: '/echo',\n denormalize(req) {\n return { ...req }\n },\n normalize(res) {\n return { ...res }\n },\n action({ center, method, path, request, platformAction }) {\n return { ...request }\n }\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ export declare function getCenterProducts(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ resource: {
6
+ warehouseId: any;
7
+ };
8
+ };
9
+ normalize(res: any): any;
10
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getCenterProducts = getCenterProducts;
5
+ function getCenterProducts() {
6
+ return {
7
+ method: 'get',
8
+ path: '/unstable/warehouse/{warehouseId}/get-product-list',
9
+ denormalize(req) {
10
+ var { warehouseId } = req;
11
+ return {
12
+ resource: {
13
+ warehouseId: warehouseId
14
+ }
15
+ };
16
+ },
17
+ normalize(res) {
18
+ return res;
19
+ }
20
+ };
21
+ }
22
+ //# sourceMappingURL=get-center-products.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-center-products.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-center-products.ts"],"names":[],"mappings":";AAAA,2GAA2G;;AAE3G,8CAiBC;AAjBD,SAAgB,iBAAiB;IAC/B,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,oDAAoD;QAC1D,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,WAAW,EAAE,GAAG,GAAG,CAAA;YAEzB,OAAO;gBACL,QAAQ,EAAE;oBACR,WAAW,EAAE,WAAW;iBACzB;aACF,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */\n\nexport function getCenterProducts() {\n return {\n method: 'get',\n path: '/unstable/warehouse/{warehouseId}/get-product-list',\n denormalize(req) {\n var { warehouseId } = req\n\n return {\n resource: {\n warehouseId: warehouseId\n }\n }\n },\n normalize(res) {\n return res\n }\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export declare function getInboundOrder(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ resource: {
6
+ warehouseId: any;
7
+ };
8
+ payload: any;
9
+ };
10
+ normalize(res: any): any;
11
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInboundOrder = getInboundOrder;
4
+ function getInboundOrder() {
5
+ return {
6
+ method: 'get',
7
+ path: '/unstable/warehouse/{warehouseId}/get-inbound-order-detail',
8
+ denormalize(req) {
9
+ var { customerBizplaceId, refNo, ganNo } = req;
10
+ let param = {};
11
+ if (ganNo)
12
+ param.ganNo = ganNo;
13
+ if (refNo)
14
+ param.refNo = refNo;
15
+ return {
16
+ resource: { warehouseId: customerBizplaceId },
17
+ payload: Object.assign({}, param)
18
+ };
19
+ },
20
+ normalize(res) {
21
+ const { arrivalNotice } = res.result;
22
+ return arrivalNotice;
23
+ }
24
+ };
25
+ }
26
+ //# sourceMappingURL=get-inbound-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-inbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-inbound-order.ts"],"names":[],"mappings":";;AAAA,0CAqBC;AArBD,SAAgB,eAAe;IAC7B,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,4DAA4D;QAClE,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,GAAG,CAAA;YAC9C,IAAI,KAAK,GAAQ,EAAE,CAAA;YAEnB,IAAI,KAAK;gBAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAA;YAC9B,IAAI,KAAK;gBAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAA;YAE9B,OAAO;gBACL,QAAQ,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;gBAC7C,OAAO,oBAAO,KAAK,CAAE;aACtB,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,MAAM,CAAA;YACpC,OAAO,aAAa,CAAA;QACtB,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["export function getInboundOrder() {\n return {\n method: 'get',\n path: '/unstable/warehouse/{warehouseId}/get-inbound-order-detail',\n denormalize(req) {\n var { customerBizplaceId, refNo, ganNo } = req\n let param: any = {}\n\n if (ganNo) param.ganNo = ganNo\n if (refNo) param.refNo = refNo\n\n return {\n resource: { warehouseId: customerBizplaceId },\n payload: { ...param }\n }\n },\n normalize(res) {\n const { arrivalNotice } = res.result\n return arrivalNotice\n }\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ export declare function getInventoryProductGroupOpenAPI(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ resource: {
6
+ warehouseId: any;
7
+ };
8
+ payload: {
9
+ paginationEntriesPerPage: any;
10
+ paginationOffset: any;
11
+ };
12
+ };
13
+ normalize(res: any): any;
14
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getInventoryProductGroupOpenAPI = getInventoryProductGroupOpenAPI;
5
+ function getInventoryProductGroupOpenAPI() {
6
+ return {
7
+ method: 'get',
8
+ path: '/unstable/warehouse/{warehouseId}/get-inventory-product-group-open-api',
9
+ denormalize(req) {
10
+ var { warehouseId, paginationEntriesPerPage, paginationOffset } = req;
11
+ return {
12
+ resource: { warehouseId },
13
+ payload: { paginationEntriesPerPage, paginationOffset }
14
+ };
15
+ },
16
+ normalize(res) {
17
+ return res.result.inventoryProductGroupOpenAPI;
18
+ }
19
+ };
20
+ }
21
+ //# sourceMappingURL=get-inventory-product-group-open-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-inventory-product-group-open-api.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-inventory-product-group-open-api.ts"],"names":[],"mappings":";AAAA,2GAA2G;;AAE3G,0EAgBC;AAhBD,SAAgB,+BAA+B;IAC7C,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,wEAAwE;QAC9E,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAA;YAErE,OAAO;gBACL,QAAQ,EAAE,EAAE,WAAW,EAAE;gBACzB,OAAO,EAAE,EAAE,wBAAwB,EAAE,gBAAgB,EAAE;aACxD,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAC,MAAM,CAAC,4BAA4B,CAAA;QAChD,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */\n\nexport function getInventoryProductGroupOpenAPI() {\n return {\n method: 'get',\n path: '/unstable/warehouse/{warehouseId}/get-inventory-product-group-open-api',\n denormalize(req) {\n var { warehouseId, paginationEntriesPerPage, paginationOffset } = req\n\n return {\n resource: { warehouseId },\n payload: { paginationEntriesPerPage, paginationOffset }\n }\n },\n normalize(res) {\n return res.result.inventoryProductGroupOpenAPI\n }\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ export declare function getInventoryProductGroup(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ resource: {
6
+ warehouseId: any;
7
+ };
8
+ payload: {
9
+ paginationEntriesPerPage: any;
10
+ paginationOffset: any;
11
+ };
12
+ };
13
+ normalize(res: any): any;
14
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getInventoryProductGroup = getInventoryProductGroup;
5
+ function getInventoryProductGroup() {
6
+ return {
7
+ method: 'get',
8
+ path: '/unstable/warehouse/{warehouseId}/get-inventory-product-group',
9
+ denormalize(req) {
10
+ var { warehouseId, paginationEntriesPerPage, paginationOffset } = req;
11
+ return {
12
+ resource: { warehouseId },
13
+ payload: { paginationEntriesPerPage, paginationOffset }
14
+ };
15
+ },
16
+ normalize(res) {
17
+ return res.result.inventoryProductGroup;
18
+ }
19
+ };
20
+ }
21
+ //# sourceMappingURL=get-inventory-product-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-inventory-product-group.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-inventory-product-group.ts"],"names":[],"mappings":";AAAA,2GAA2G;;AAE3G,4DAgBC;AAhBD,SAAgB,wBAAwB;IACtC,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,+DAA+D;QACrE,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAA;YAErE,OAAO;gBACL,QAAQ,EAAE,EAAE,WAAW,EAAE;gBACzB,OAAO,EAAE,EAAE,wBAAwB,EAAE,gBAAgB,EAAE;aACxD,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAA;QACzC,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */\n\nexport function getInventoryProductGroup() {\n return {\n method: 'get',\n path: '/unstable/warehouse/{warehouseId}/get-inventory-product-group',\n denormalize(req) {\n var { warehouseId, paginationEntriesPerPage, paginationOffset } = req\n\n return {\n resource: { warehouseId },\n payload: { paginationEntriesPerPage, paginationOffset }\n }\n },\n normalize(res) {\n return res.result.inventoryProductGroup\n }\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export declare function getOutboundOrder(): {
2
+ method: string;
3
+ path: string;
4
+ denormalize(req: any): {
5
+ resource: {
6
+ warehouseId: any;
7
+ };
8
+ payload: any;
9
+ };
10
+ normalize(res: any): any;
11
+ };