@things-factory/integration-fulfillment 6.2.177 → 6.3.0
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-server/controllers/fulfillment-api/decorators.d.ts +1 -0
- package/dist-server/controllers/fulfillment-api/decorators.js.map +1 -1
- package/dist-server/controllers/fulfillment-api/index.d.ts +19 -0
- package/dist-server/controllers/fulfillment-api/index.js +1 -1
- package/dist-server/controllers/fulfillment-api/index.js.map +1 -1
- package/dist-server/controllers/fulfillment-api/types.d.ts +0 -0
- package/dist-server/controllers/index.d.ts +1 -0
- package/dist-server/controllers/operato/cancel-release-order.d.ts +13 -0
- package/dist-server/controllers/operato/cancel-release-order.js +1 -2
- package/dist-server/controllers/operato/cancel-release-order.js.map +1 -1
- package/dist-server/controllers/operato/create-inbound-order.d.ts +23 -0
- package/dist-server/controllers/operato/create-inbound-order.js +1 -2
- package/dist-server/controllers/operato/create-inbound-order.js.map +1 -1
- package/dist-server/controllers/operato/create-outbound-order.d.ts +11 -0
- package/dist-server/controllers/operato/create-outbound-order.js +1 -2
- package/dist-server/controllers/operato/create-outbound-order.js.map +1 -1
- package/dist-server/controllers/operato/create-sales-invoice.d.ts +11 -0
- package/dist-server/controllers/operato/create-sales-invoice.js +1 -2
- package/dist-server/controllers/operato/create-sales-invoice.js.map +1 -1
- package/dist-server/controllers/operato/echo.d.ts +12 -0
- package/dist-server/controllers/operato/echo.js +1 -2
- package/dist-server/controllers/operato/echo.js.map +1 -1
- package/dist-server/controllers/operato/get-center-products.d.ts +10 -0
- package/dist-server/controllers/operato/get-center-products.js +1 -2
- package/dist-server/controllers/operato/get-center-products.js.map +1 -1
- package/dist-server/controllers/operato/get-inbound-order.d.ts +11 -0
- package/dist-server/controllers/operato/get-inbound-order.js +1 -2
- package/dist-server/controllers/operato/get-inbound-order.js.map +1 -1
- package/dist-server/controllers/operato/get-inventory-product-group-open-api.d.ts +14 -0
- package/dist-server/controllers/operato/get-inventory-product-group-open-api.js +1 -2
- package/dist-server/controllers/operato/get-inventory-product-group-open-api.js.map +1 -1
- package/dist-server/controllers/operato/get-inventory-product-group.d.ts +14 -0
- package/dist-server/controllers/operato/get-inventory-product-group.js +1 -2
- package/dist-server/controllers/operato/get-inventory-product-group.js.map +1 -1
- package/dist-server/controllers/operato/get-outbound-order.d.ts +11 -0
- package/dist-server/controllers/operato/get-outbound-order.js +1 -2
- package/dist-server/controllers/operato/get-outbound-order.js.map +1 -1
- package/dist-server/controllers/operato/get-outbound-orders.d.ts +11 -0
- package/dist-server/controllers/operato/get-outbound-orders.js +1 -2
- package/dist-server/controllers/operato/get-outbound-orders.js.map +1 -1
- package/dist-server/controllers/operato/index.d.ts +1 -0
- package/dist-server/controllers/operato/operato.d.ts +15 -0
- package/dist-server/controllers/operato/operato.js.map +1 -1
- package/dist-server/controllers/operato/platform-action.d.ts +12 -0
- package/dist-server/controllers/operato/platform-action.js.map +1 -1
- package/dist-server/controllers/operato/update-release-order-details.d.ts +14 -0
- package/dist-server/controllers/operato/update-release-order-details.js +1 -2
- package/dist-server/controllers/operato/update-release-order-details.js.map +1 -1
- package/dist-server/entities/fulfillment-center.d.ts +24 -0
- package/dist-server/entities/fulfillment-center.js +2 -2
- package/dist-server/entities/fulfillment-center.js.map +1 -1
- package/dist-server/entities/index.d.ts +3 -0
- package/dist-server/graphql/index.d.ts +6 -0
- package/dist-server/graphql/resolvers/fulfillment-center/create-fulfillment-center.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-center.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/delete-fulfillment-centers.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-center.d.ts +6 -0
- package/dist-server/graphql/resolvers/fulfillment-center/fulfillment-centers.d.ts +8 -0
- package/dist-server/graphql/resolvers/fulfillment-center/having-fulfillment-center.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/index.d.ts +41 -0
- package/dist-server/graphql/resolvers/fulfillment-center/operato/deactivate-operato-center.d.ts +6 -0
- package/dist-server/graphql/resolvers/fulfillment-center/operato/deactivate-operato-center.js.map +1 -1
- package/dist-server/graphql/resolvers/fulfillment-center/operato/generate-operato-access-token.d.ts +6 -0
- package/dist-server/graphql/resolvers/fulfillment-center/operato/generate-operato-access-token.js.map +1 -1
- package/dist-server/graphql/resolvers/fulfillment-center/operato/get-operato-auth-url.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/operato/index.d.ts +17 -0
- package/dist-server/graphql/resolvers/fulfillment-center/operato/refresh-operato-access-token.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/operato/refresh-operato-access-token.js.map +1 -1
- package/dist-server/graphql/resolvers/fulfillment-center/update-fulfillment-center.d.ts +6 -0
- package/dist-server/graphql/resolvers/fulfillment-center/update-multiple-fulfillment-center.d.ts +5 -0
- package/dist-server/graphql/resolvers/fulfillment-center/update-multiple-fulfillment-center.js.map +1 -1
- package/dist-server/graphql/resolvers/index.d.ts +41 -0
- package/dist-server/graphql/types/fulfillment-center/fulfillment-center-list.d.ts +1 -0
- package/dist-server/graphql/types/fulfillment-center/fulfillment-center-patch.d.ts +1 -0
- package/dist-server/graphql/types/fulfillment-center/fulfillment-center.d.ts +1 -0
- package/dist-server/graphql/types/fulfillment-center/index.d.ts +3 -0
- package/dist-server/graphql/types/fulfillment-center/new-fulfillment-center.d.ts +1 -0
- package/dist-server/graphql/types/index.d.ts +4 -0
- package/dist-server/index.d.ts +5 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const api: (target: Object, property: string, descriptor: TypedPropertyDescriptor<any>) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../server/controllers/fulfillment-api/decorators.ts"],"names":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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
|
+
}
|
|
@@ -36,6 +36,7 @@ class FulfillmentAPI {
|
|
|
36
36
|
static createSalesInvoice(center, req) { }
|
|
37
37
|
static updateReleaseGoodDetails(center, req) { }
|
|
38
38
|
}
|
|
39
|
+
exports.FulfillmentAPI = FulfillmentAPI;
|
|
39
40
|
FulfillmentAPI.platforms = {};
|
|
40
41
|
tslib_1.__decorate([
|
|
41
42
|
decorators_1.api,
|
|
@@ -109,5 +110,4 @@ tslib_1.__decorate([
|
|
|
109
110
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
110
111
|
tslib_1.__metadata("design:returntype", Object)
|
|
111
112
|
], FulfillmentAPI, "updateReleaseGoodDetails", null);
|
|
112
|
-
exports.FulfillmentAPI = FulfillmentAPI;
|
|
113
113
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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,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BAAG;;;;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"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fulfillment-api';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.cancelReleaseOrder =
|
|
4
|
+
exports.cancelReleaseOrder = cancelReleaseOrder;
|
|
5
5
|
function cancelReleaseOrder() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'post',
|
|
@@ -18,5 +18,4 @@ function cancelReleaseOrder() {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
exports.cancelReleaseOrder = cancelReleaseOrder;
|
|
22
21
|
//# sourceMappingURL=cancel-release-order.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel-release-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/cancel-release-order.ts"],"names":[],"mappings":";AAAA,2GAA2G
|
|
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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.createInboundOrder =
|
|
4
|
+
exports.createInboundOrder = createInboundOrder;
|
|
5
5
|
function createInboundOrder() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'post',
|
|
@@ -32,5 +32,4 @@ function createInboundOrder() {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
exports.createInboundOrder = createInboundOrder;
|
|
36
35
|
//# sourceMappingURL=create-inbound-order.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-inbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/create-inbound-order.ts"],"names":[],"mappings":";AAAA,2GAA2G
|
|
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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createOutboundOrder =
|
|
3
|
+
exports.createOutboundOrder = createOutboundOrder;
|
|
4
4
|
function createOutboundOrder() {
|
|
5
5
|
return {
|
|
6
6
|
method: 'post',
|
|
@@ -17,5 +17,4 @@ function createOutboundOrder() {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
exports.createOutboundOrder = createOutboundOrder;
|
|
21
20
|
//# sourceMappingURL=create-outbound-order.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-outbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/create-outbound-order.ts"],"names":[],"mappings":"
|
|
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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSalesInvoice =
|
|
3
|
+
exports.createSalesInvoice = createSalesInvoice;
|
|
4
4
|
function createSalesInvoice() {
|
|
5
5
|
return {
|
|
6
6
|
method: 'post',
|
|
@@ -17,5 +17,4 @@ function createSalesInvoice() {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
exports.createSalesInvoice = createSalesInvoice;
|
|
21
20
|
//# sourceMappingURL=create-sales-invoice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-sales-invoice.js","sourceRoot":"","sources":["../../../server/controllers/operato/create-sales-invoice.ts"],"names":[],"mappings":"
|
|
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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.echo =
|
|
3
|
+
exports.echo = echo;
|
|
4
4
|
function echo() {
|
|
5
5
|
return {
|
|
6
6
|
path: '/echo',
|
|
@@ -15,5 +15,4 @@ function echo() {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
exports.echo = echo;
|
|
19
18
|
//# sourceMappingURL=echo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.js","sourceRoot":"","sources":["../../../server/controllers/operato/echo.ts"],"names":[],"mappings":"
|
|
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"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getCenterProducts =
|
|
4
|
+
exports.getCenterProducts = getCenterProducts;
|
|
5
5
|
function getCenterProducts() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'get',
|
|
@@ -19,5 +19,4 @@ function getCenterProducts() {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
exports.getCenterProducts = getCenterProducts;
|
|
23
22
|
//# sourceMappingURL=get-center-products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-center-products.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-center-products.ts"],"names":[],"mappings":";AAAA,2GAA2G
|
|
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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInboundOrder =
|
|
3
|
+
exports.getInboundOrder = getInboundOrder;
|
|
4
4
|
function getInboundOrder() {
|
|
5
5
|
return {
|
|
6
6
|
method: 'get',
|
|
@@ -23,5 +23,4 @@ function getInboundOrder() {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
exports.getInboundOrder = getInboundOrder;
|
|
27
26
|
//# sourceMappingURL=get-inbound-order.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-inbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-inbound-order.ts"],"names":[],"mappings":"
|
|
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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getInventoryProductGroupOpenAPI =
|
|
4
|
+
exports.getInventoryProductGroupOpenAPI = getInventoryProductGroupOpenAPI;
|
|
5
5
|
function getInventoryProductGroupOpenAPI() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'get',
|
|
@@ -18,5 +18,4 @@ function getInventoryProductGroupOpenAPI() {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
exports.getInventoryProductGroupOpenAPI = getInventoryProductGroupOpenAPI;
|
|
22
21
|
//# sourceMappingURL=get-inventory-product-group-open-api.js.map
|
|
@@ -1 +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
|
|
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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* https://operato.dev/docs/admin-api/rest/reference/products/product?api[version]=2020-07#index-2020-07 */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getInventoryProductGroup =
|
|
4
|
+
exports.getInventoryProductGroup = getInventoryProductGroup;
|
|
5
5
|
function getInventoryProductGroup() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'get',
|
|
@@ -18,5 +18,4 @@ function getInventoryProductGroup() {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
exports.getInventoryProductGroup = getInventoryProductGroup;
|
|
22
21
|
//# sourceMappingURL=get-inventory-product-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-inventory-product-group.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-inventory-product-group.ts"],"names":[],"mappings":";AAAA,2GAA2G
|
|
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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOutboundOrder =
|
|
3
|
+
exports.getOutboundOrder = getOutboundOrder;
|
|
4
4
|
function getOutboundOrder() {
|
|
5
5
|
return {
|
|
6
6
|
method: 'get',
|
|
@@ -23,5 +23,4 @@ function getOutboundOrder() {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
exports.getOutboundOrder = getOutboundOrder;
|
|
27
26
|
//# sourceMappingURL=get-outbound-order.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-outbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-outbound-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-outbound-order.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-outbound-order.ts"],"names":[],"mappings":";;AAAA,4CAqBC;AArBD,SAAgB,gBAAgB;IAC9B,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,4DAA4D;QAClE,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;YACvD,IAAI,KAAK,GAAQ,EAAE,CAAA;YAEnB,IAAI,cAAc;gBAAE,KAAK,CAAC,cAAc,GAAG,cAAc,CAAA;YACzD,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,iBAAiB,EAAE,GAAG,GAAG,CAAC,MAAM,CAAA;YACxC,OAAO,iBAAiB,CAAA;QAC1B,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["export function getOutboundOrder() {\n return {\n method: 'get',\n path: '/unstable/warehouse/{warehouseId}/get-release-order-detail',\n denormalize(req) {\n var { customerBizplaceId, refNo, releaseOrderNo } = req\n let param: any = {}\n\n if (releaseOrderNo) param.releaseOrderNo = releaseOrderNo\n if (refNo) param.refNo = refNo\n\n return {\n resource: { warehouseId: customerBizplaceId },\n payload: { ...param }\n }\n },\n normalize(res) {\n const { releaseGoodDetail } = res.result\n return releaseGoodDetail\n }\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOutboundOrders =
|
|
3
|
+
exports.getOutboundOrders = getOutboundOrders;
|
|
4
4
|
function getOutboundOrders() {
|
|
5
5
|
return {
|
|
6
6
|
method: 'get',
|
|
@@ -21,5 +21,4 @@ function getOutboundOrders() {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
exports.getOutboundOrders = getOutboundOrders;
|
|
25
24
|
//# sourceMappingURL=get-outbound-orders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-outbound-orders.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-outbound-orders.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-outbound-orders.js","sourceRoot":"","sources":["../../../server/controllers/operato/get-outbound-orders.ts"],"names":[],"mappings":";;AAAA,8CAoBC;AApBD,SAAgB,iBAAiB;IAC/B,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,0DAA0D;QAChE,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG,GAAG,CAAA;YACvC,IAAI,KAAK,GAAQ,EAAE,CAAA;YAEnB,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,YAAY,EAAE,GAAG,GAAG,CAAC,MAAM,CAAA;YACnC,OAAO,YAAY,CAAA;QACrB,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["export function getOutboundOrders() {\n return {\n method: 'get',\n path: '/unstable/warehouse/{warehouseId}/get-release-order-list',\n denormalize(req) {\n var { customerBizplaceId, refNo } = req\n let param: any = {}\n\n if (refNo) param.refNo = refNo\n\n return {\n resource: { warehouseId: customerBizplaceId },\n payload: { ...param }\n }\n },\n normalize(res) {\n const { releaseGoods } = res.result\n return releaseGoods\n }\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './operato';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type OperatoConfig = {
|
|
2
|
+
appKey: string;
|
|
3
|
+
appSecret: string;
|
|
4
|
+
center?: string;
|
|
5
|
+
accessToken?: string;
|
|
6
|
+
redirectUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class Operato {
|
|
9
|
+
private config;
|
|
10
|
+
constructor(config: OperatoConfig);
|
|
11
|
+
buildAuthURL(state: any): string;
|
|
12
|
+
get(center: any, path: string, data: any): Promise<any>;
|
|
13
|
+
post(center: any, path: string, data?: any): Promise<any>;
|
|
14
|
+
static refreshAccessToken(fulfillmentCenter: any): Promise<any>;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operato.js","sourceRoot":"","sources":["../../../server/controllers/operato/operato.ts"],"names":[],"mappings":";;;;AAAA,0DAAyB;AACzB,oEAA8B;AAE9B,6CAA4C;AAC5C,iDAAqD;AACrD,iDAAgD;AAEhD,6CAAkD;AAElD,MAAM,EAAE,QAAQ,GAAG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,YAAM,CA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1C,YAAY;QACZ;WACG;UACJ,GAAG,IAAI,CAAA;QAER,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,gBAAQ,EAAC,WAAW,CAAC,CAAA;QAErC,IAAI,KAAK,GAAG;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,SAAS,EAAE,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;SAChC,CAAA;QAED,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,4BAAiB,CAAC,CAAA;QAEnD,OAAO,MAAM,UAAU,CAAC,IAAI,iCACvB,iBAAiB,GACjB,KAAK,EACR,CAAA;IACJ,CAAC;CACF;AA5GD,0BA4GC","sourcesContent":["import Debug from 'debug'\nimport fetch from 'node-fetch'\n\nimport { config } from '@things-factory/env'\nimport { getRepository } from '@things-factory/shell'\nimport { parseJwt } from '@things-factory/utils'\n\nimport { FulfillmentCenter } from '../../entities'\n\nconst { protocol = 'https', host, callback } = config.get('fulfillmentIntegrationOperato', {})\n\nconst debug = Debug('things-factory:integration-fulfillment:operato')\n\nexport type OperatoConfig = {\n appKey: string\n appSecret: string\n center?: string\n accessToken?: string\n redirectUrl?: string\n}\n\nexport class Operato {\n private config: OperatoConfig\n\n constructor(config: OperatoConfig) {\n this.config = {\n ...config\n }\n }\n\n buildAuthURL(state) {\n // TODO make scopes properly\n const { appKey, redirectUrl } = this.config\n // return `http://${center}.${host}/oauth/authorize?response_type=code&client_id=${appKey}&scope=${scopes}&redirect_uri=${redirectUrl}&state=${state}`\n return `${protocol}://${host}/oauth/authorize?response_type=code&client_id=${appKey}&scope=warehouse&redirect_uri=${redirectUrl}&state=${state}`\n }\n\n async get(center: any, path: string, data: any) {\n const qs = Object.entries(data)\n .map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`)\n .join('&')\n\n const endpoint = `${protocol}://${host}/api${path}${qs ? '?' + qs : ''}`\n debug('endpoint', endpoint)\n\n const response = await fetch(endpoint, {\n headers: {\n 'Content-Type': 'application/json',\n 'x-access-token': center.accessToken,\n 'x-things-factory-domain': center.centerId\n }\n })\n\n const result = await response.json()\n debug('response result', result)\n\n return result\n }\n\n async post(center: any, path: string, data: any = {}) {\n debug('data', data)\n\n const jsondata = JSON.stringify(data)\n\n const endpoint = `${protocol}://${host}/api${path}`\n\n const response = await fetch(endpoint, {\n method: 'post',\n headers: {\n 'Content-Type': 'application/json',\n 'x-access-token': center.accessToken,\n 'x-things-factory-domain': center.centerId\n },\n body: jsondata\n })\n\n if (response.ok) {\n return await response.json()\n } else {\n const text = await response.text()\n debug('response result', text)\n throw response\n }\n }\n\n public static async refreshAccessToken(fulfillmentCenter) {\n const requestBody = {\n refreshToken: fulfillmentCenter.refreshToken\n }\n\n const refreshResponse = await fetch(`${protocol}://${host}/oauth/refresh-token`, {\n method: 'post',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestBody)\n })\n\n if (!refreshResponse.ok) {\n throw new Error(`get operato information failed: ${await refreshResponse.text()}`)\n }\n\n const body = await refreshResponse.json()\n const {\n accessToken /* token used to call the API */,\n id_token /* token containing user identity details (only returned if OpenID Connect scopes are requested) */,\n expires_in /* amount of seconds until the access token expires */,\n token_type: tokenType /* must be Bearer */,\n refreshToken\n /* token used to refresh the access token once it has expired (only returned if the offline_access scope is requested).\n */\n } = body\n\n const { exp } = parseJwt(accessToken)\n\n var patch = {\n accessToken,\n refreshToken,\n tokenType,\n expiresIn: new Date(exp * 1000)\n }\n\n const repository = getRepository(FulfillmentCenter)\n\n return await repository.save({\n ...fulfillmentCenter,\n ...patch\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const _action: ({ center, method, path, request }: {
|
|
2
|
+
center: any;
|
|
3
|
+
method?: string;
|
|
4
|
+
path: any;
|
|
5
|
+
request: any;
|
|
6
|
+
}) => Promise<any>;
|
|
7
|
+
export declare const action: ({ center, method, path, request }: {
|
|
8
|
+
center: any;
|
|
9
|
+
method?: string;
|
|
10
|
+
path: any;
|
|
11
|
+
request: any;
|
|
12
|
+
}) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-action.js","sourceRoot":"","sources":["../../../server/controllers/operato/platform-action.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,6CAA4C;AAC5C,MAAM,aAAa,GAAG,YAAM,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAA;AACrE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,aAAa,CAAA;AAE3C,SAAS,UAAU,CAAC,IAAI,EAAE,GAAG;IAC3B,IAAI,KAAK,GAAG,EAAE,CAAA;IACd,IAAI,EAAE,GAAG,YAAY,CAAA;IACrB,IAAI,IAAI,CAAA;IAER,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"platform-action.js","sourceRoot":"","sources":["../../../server/controllers/operato/platform-action.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,6CAA4C;AAC5C,MAAM,aAAa,GAAG,YAAM,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAA;AACrE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,aAAa,CAAA;AAE3C,SAAS,UAAU,CAAC,IAAI,EAAE,GAAG;IAC3B,IAAI,KAAK,GAAG,EAAE,CAAA;IACd,IAAI,EAAE,GAAG,YAAY,CAAA;IACrB,IAAI,IAAI,CAAA;IAER,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IACrB,CAAC;IAED,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,IAAI,KAAK,GAAG,GAAG,CAAC,IAAI,CA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MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;QACpE,CAAC;aAAM,CAAC;YACN,MAAM,EAAE,CAAA;QACV,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAXY,QAAA,MAAM,UAWlB","sourcesContent":["import { Operato } from './operato'\n\nimport { config } from '@things-factory/env'\nconst operatoConfig = config.get('fulfillmentIntegrationOperato', {})\nconst { appKey, appSecret } = operatoConfig\n\nfunction substitute(path, obj) {\n var props = []\n var re = /{([^}]+)}/g\n var text\n\n while ((text = re.exec(path))) {\n props.push(text[1])\n }\n\n var result = path\n props.forEach(prop => {\n let value = obj[prop.trim()]\n result = result.replace(`{${prop}}`, value === undefined ? '' : value)\n })\n\n return result\n}\n\nexport const _action = async ({ center, method = 'get', path, request }) => {\n const client = new Operato({\n center: center.centerId,\n appKey,\n appSecret,\n accessToken: center.accessToken\n })\n\n const { resource = {}, payload = {} } = request\n\n path = substitute(path, resource)\n\n return await client[method](center, path, payload)\n}\n\nexport const action = async ({ center, method = 'get', path, request }) => {\n try {\n return await _action({ center, method, path, request })\n } catch (ex) {\n if (ex.status === 401) {\n var refreshed = await Operato.refreshAccessToken(center)\n return await _action({ center: refreshed, method, path, request })\n } else {\n throw ex\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function updateReleaseGoodDetails(): {
|
|
2
|
+
method: string;
|
|
3
|
+
path: string;
|
|
4
|
+
denormalize(req: any): {
|
|
5
|
+
payload: {
|
|
6
|
+
releaseOrder: any;
|
|
7
|
+
shippingOrder: any;
|
|
8
|
+
};
|
|
9
|
+
resource: {
|
|
10
|
+
warehouseId: any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
normalize(res: any): any;
|
|
14
|
+
};
|