@things-factory/operato-hub 4.1.34 → 4.1.37
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/routers/api/restful-apis/unstable/get-delivery-orders.js +148 -0
- package/dist-server/routers/api/restful-apis/unstable/get-delivery-orders.js.map +1 -0
- package/dist-server/routers/api/restful-apis/unstable/get-goods-received-notes.js +104 -0
- package/dist-server/routers/api/restful-apis/unstable/get-goods-received-notes.js.map +1 -0
- package/dist-server/routers/api/restful-apis/unstable/index.js +2 -0
- package/dist-server/routers/api/restful-apis/unstable/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/get-delivery-orders.js +148 -0
- package/dist-server/routers/api/restful-apis/v1/get-delivery-orders.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/get-goods-received-notes.js +104 -0
- package/dist-server/routers/api/restful-apis/v1/get-goods-received-notes.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/index.js +2 -0
- package/dist-server/routers/api/restful-apis/v1/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v2/get-delivery-orders.js +148 -0
- package/dist-server/routers/api/restful-apis/v2/get-delivery-orders.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v2/get-goods-received-notes.js +104 -0
- package/dist-server/routers/api/restful-apis/v2/get-goods-received-notes.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v2/index.js +2 -0
- package/dist-server/routers/api/restful-apis/v2/index.js.map +1 -1
- package/openapi/unstable/inbound.yaml +178 -0
- package/openapi/unstable/outbound.yaml +316 -0
- package/openapi/v1/inbound.yaml +178 -0
- package/openapi/v1/outbound.yaml +316 -0
- package/openapi/v2/inbound.yaml +178 -0
- package/openapi/v2/outbound.yaml +316 -0
- package/package.json +10 -10
- package/server/routers/api/restful-apis/unstable/get-delivery-orders.ts +162 -0
- package/server/routers/api/restful-apis/unstable/get-goods-received-notes.ts +118 -0
- package/server/routers/api/restful-apis/unstable/index.ts +2 -0
- package/server/routers/api/restful-apis/v1/get-delivery-orders.ts +162 -0
- package/server/routers/api/restful-apis/v1/get-goods-received-notes.ts +118 -0
- package/server/routers/api/restful-apis/v1/index.ts +2 -0
- package/server/routers/api/restful-apis/v2/get-delivery-orders.ts +162 -0
- package/server/routers/api/restful-apis/v2/get-goods-received-notes.ts +118 -0
- package/server/routers/api/restful-apis/v2/index.ts +2 -0
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
+
const typeorm_1 = require("typeorm");
|
|
8
|
+
const api_1 = require("@things-factory/api");
|
|
9
|
+
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
10
|
+
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
11
|
+
const debug = require('debug')('things-factory:operato-hub:restful-api:v2:get-delivery-orders');
|
|
12
|
+
api_1.restfulApiRouter.get('/v2/warehouse/:warehouseId/get-delivery-orders', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
13
|
+
return await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const { client, warehouse: bizplace, domain } = context.state;
|
|
16
|
+
const { warehouseId: customerBizplaceId } = context.params;
|
|
17
|
+
const { t } = context;
|
|
18
|
+
const { fromDate, toDate, limit = 10, page = 1 } = context.query;
|
|
19
|
+
if (!customerBizplaceId)
|
|
20
|
+
context.throw(404, t('Error: Warehouse id not found'));
|
|
21
|
+
if (!fromDate || !toDate)
|
|
22
|
+
context.throw(400, t('Error: Date range not provided correctly'));
|
|
23
|
+
if (limit > 100 || limit < 0)
|
|
24
|
+
context.throw(400, t('Error: Limit value exceed 100 maximum threshold'));
|
|
25
|
+
let noOfDays = (new Date(toDate).getTime() - new Date(fromDate).getTime()) / (1000 * 3600 * 24);
|
|
26
|
+
if (noOfDays >= 31 || noOfDays <= 0)
|
|
27
|
+
context.throw(400, t('Error: Date range value exceed 1 month maximum threshold'));
|
|
28
|
+
let filters = [
|
|
29
|
+
{ name: 'bizplace', operator: 'in', value: [customerBizplaceId], relation: true },
|
|
30
|
+
{ name: 'createdAt', operator: 'between', value: [fromDate, toDate] },
|
|
31
|
+
{ name: 'orderProductsApi', operator: 'equal', value: true }
|
|
32
|
+
];
|
|
33
|
+
let pagination = { page: parseInt(page), limit: parseInt(limit) };
|
|
34
|
+
let data = {
|
|
35
|
+
result: (await client.query({
|
|
36
|
+
query: (0, graphql_tag_1.default) `
|
|
37
|
+
query deliveryOrders($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
38
|
+
deliveryOrders(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
39
|
+
items {
|
|
40
|
+
name
|
|
41
|
+
from
|
|
42
|
+
to
|
|
43
|
+
contactPointRefId
|
|
44
|
+
truckNo
|
|
45
|
+
deliveryDate
|
|
46
|
+
status
|
|
47
|
+
ownCollection
|
|
48
|
+
looseItem
|
|
49
|
+
deliveryDateTime
|
|
50
|
+
loadWeight
|
|
51
|
+
cargoType
|
|
52
|
+
urgency
|
|
53
|
+
telNo
|
|
54
|
+
refNo
|
|
55
|
+
otherDriver
|
|
56
|
+
palletQty
|
|
57
|
+
remark
|
|
58
|
+
description
|
|
59
|
+
reusablePallet
|
|
60
|
+
domain {
|
|
61
|
+
name
|
|
62
|
+
}
|
|
63
|
+
bizplace {
|
|
64
|
+
name
|
|
65
|
+
}
|
|
66
|
+
attachments {
|
|
67
|
+
name
|
|
68
|
+
refBy
|
|
69
|
+
path
|
|
70
|
+
}
|
|
71
|
+
releaseGood {
|
|
72
|
+
name
|
|
73
|
+
description
|
|
74
|
+
refNo
|
|
75
|
+
collectionOrderNo
|
|
76
|
+
truckNo
|
|
77
|
+
exportOption
|
|
78
|
+
ownTransport
|
|
79
|
+
crossDocking
|
|
80
|
+
status
|
|
81
|
+
releaseDateTime
|
|
82
|
+
releaseDate
|
|
83
|
+
remark
|
|
84
|
+
courierOption
|
|
85
|
+
packingOption
|
|
86
|
+
refNo2
|
|
87
|
+
refNo3
|
|
88
|
+
type
|
|
89
|
+
acceptedAt
|
|
90
|
+
marketplaceOrderStatus
|
|
91
|
+
billingAddress
|
|
92
|
+
deliveryAddress1
|
|
93
|
+
deliveryAddress2
|
|
94
|
+
deliveryAddress3
|
|
95
|
+
deliveryAddress4
|
|
96
|
+
deliveryAddress5
|
|
97
|
+
attentionTo
|
|
98
|
+
attentionCompany
|
|
99
|
+
city
|
|
100
|
+
state
|
|
101
|
+
postalCode
|
|
102
|
+
country
|
|
103
|
+
phone1
|
|
104
|
+
phone2
|
|
105
|
+
email
|
|
106
|
+
transporter
|
|
107
|
+
trackingNo
|
|
108
|
+
airwayBill
|
|
109
|
+
invoice
|
|
110
|
+
pickupAddress
|
|
111
|
+
pickupTime
|
|
112
|
+
handoverType
|
|
113
|
+
dropoffAddress
|
|
114
|
+
noOfItems
|
|
115
|
+
orderProducts {
|
|
116
|
+
id
|
|
117
|
+
type
|
|
118
|
+
batchId
|
|
119
|
+
packingType
|
|
120
|
+
packingSize
|
|
121
|
+
releaseQty
|
|
122
|
+
releaseUomValue
|
|
123
|
+
status
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
createdAt
|
|
127
|
+
updatedAt
|
|
128
|
+
updater {
|
|
129
|
+
name
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
total
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
`,
|
|
136
|
+
variables: {
|
|
137
|
+
filters,
|
|
138
|
+
pagination,
|
|
139
|
+
sortings: [{ name: 'createdAt', desc: true }]
|
|
140
|
+
},
|
|
141
|
+
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
142
|
+
domain }) })
|
|
143
|
+
})).data
|
|
144
|
+
};
|
|
145
|
+
context.body = ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a.deliveryOrders) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c.length) == 0 ? 'No data available' : data;
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
//# sourceMappingURL=get-delivery-orders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-delivery-orders.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/get-delivery-orders.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,qCAAsD;AAEtD,6CAAgE;AAEhE,qFAAgF;AAChF,uFAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,+DAA+D,CAAC,CAAA;AAE/F,sBAAM,CAAC,GAAG,CACR,gDAAgD,EAChD,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,OAAO,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC,KAAK,EAAE,EAAiB,EAAE,EAAE;;QACnE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAC7D,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;QAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;QAErB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,IAAI,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhE,IAAI,C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M,CAAC,KAAK,CAAC;gBACjB,KAAK,EAAE,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAmGT;gBACD,SAAS,EAAE;oBACT,OAAO;oBACP,UAAU;oBACV,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;iBAC9C;gBACD,OAAO,kCACF,OAAO,KACV,KAAK,kCACA,OAAO,CAAC,KAAK,KAChB,QAAQ;wBACR,MAAM,MAET;aACK,CAAC,CACV,CAAC,IAAI;SACP,CAAA;QAED,OAAO,CAAC,IAAI,GAAG,CAAA,MAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,0CAAE,cAAc,0CAAE,KAAK,0CAAE,MAAM,KAAI,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAA;IAC9F,CAAC,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
+
const typeorm_1 = require("typeorm");
|
|
8
|
+
const api_1 = require("@things-factory/api");
|
|
9
|
+
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
10
|
+
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
11
|
+
const debug = require('debug')('things-factory:operato-hub:restful-api:v2:get-goods-received-notes');
|
|
12
|
+
api_1.restfulApiRouter.get('/v2/warehouse/:warehouseId/get-goods-received-notes', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
13
|
+
return await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const { client, warehouse: bizplace, domain } = context.state;
|
|
16
|
+
const { warehouseId: customerBizplaceId } = context.params;
|
|
17
|
+
const { t } = context;
|
|
18
|
+
const { fromDate, toDate, limit = 10, page = 1 } = context.query;
|
|
19
|
+
if (!customerBizplaceId)
|
|
20
|
+
context.throw(404, t('Error: Warehouse id not found'));
|
|
21
|
+
if (!fromDate || !toDate)
|
|
22
|
+
context.throw(400, t('Error: Date range not provided correctly'));
|
|
23
|
+
if (limit > 100 || limit < 0)
|
|
24
|
+
context.throw(400, t('Error: Limit value exceed 100 maximum threshold'));
|
|
25
|
+
let noOfDays = (new Date(toDate).getTime() - new Date(fromDate).getTime()) / (1000 * 3600 * 24);
|
|
26
|
+
if (noOfDays >= 31 || noOfDays <= 0)
|
|
27
|
+
context.throw(400, t('Error: Date range value exceed 1 month maximum threshold'));
|
|
28
|
+
let filters = [
|
|
29
|
+
{ name: 'bizplace', operator: 'in', value: [customerBizplaceId], relation: true },
|
|
30
|
+
{ name: 'createdAt', operator: 'between', value: [fromDate, toDate] },
|
|
31
|
+
{ name: 'orderProductsApi', operator: 'equal', value: true }
|
|
32
|
+
];
|
|
33
|
+
let pagination = { page: parseInt(page), limit: parseInt(limit) };
|
|
34
|
+
let data = {
|
|
35
|
+
result: (await client.query({
|
|
36
|
+
query: (0, graphql_tag_1.default) `
|
|
37
|
+
query goodsReceivalNotes($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
38
|
+
goodsReceivalNotes(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
39
|
+
items {
|
|
40
|
+
id
|
|
41
|
+
name
|
|
42
|
+
refNo
|
|
43
|
+
description
|
|
44
|
+
customerStatus
|
|
45
|
+
status
|
|
46
|
+
domain {
|
|
47
|
+
id
|
|
48
|
+
name
|
|
49
|
+
}
|
|
50
|
+
arrivalNotice {
|
|
51
|
+
id
|
|
52
|
+
name
|
|
53
|
+
description
|
|
54
|
+
status
|
|
55
|
+
refNo
|
|
56
|
+
refNo2
|
|
57
|
+
refNo3
|
|
58
|
+
orderProducts {
|
|
59
|
+
id
|
|
60
|
+
type
|
|
61
|
+
batchId
|
|
62
|
+
packingType
|
|
63
|
+
packingSize
|
|
64
|
+
releaseQty
|
|
65
|
+
releaseUomValue
|
|
66
|
+
status
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
bizplace {
|
|
70
|
+
id
|
|
71
|
+
name
|
|
72
|
+
description
|
|
73
|
+
}
|
|
74
|
+
attachments {
|
|
75
|
+
id
|
|
76
|
+
name
|
|
77
|
+
refBy
|
|
78
|
+
path
|
|
79
|
+
}
|
|
80
|
+
createdAt
|
|
81
|
+
updatedAt
|
|
82
|
+
updater {
|
|
83
|
+
id
|
|
84
|
+
name
|
|
85
|
+
description
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
total
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`,
|
|
92
|
+
variables: {
|
|
93
|
+
filters,
|
|
94
|
+
pagination,
|
|
95
|
+
sortings: [{ name: 'createdAt', desc: true }]
|
|
96
|
+
},
|
|
97
|
+
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
98
|
+
domain }) })
|
|
99
|
+
})).data
|
|
100
|
+
};
|
|
101
|
+
context.body = ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a.goodsReceivalNotes) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c.length) == 0 ? 'No data available' : data;
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=get-goods-received-notes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-goods-received-notes.js","sourceRoot":"","sources":["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,IAAI,uBAAJ,IAAI,CAAE,MAAM,0CAAE,kBAAkB,0CAAE,KAAK,0CAAE,MAAM,KAAI,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAA;IAClG,CAAC,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
|
|
@@ -28,4 +28,6 @@ require("./set-marketplace-order-failed-delivery");
|
|
|
28
28
|
require("./update-marketplace-shipping-order");
|
|
29
29
|
require("./update-marketplace-order");
|
|
30
30
|
require("./update-release-order-details");
|
|
31
|
+
require("./get-goods-received-notes");
|
|
32
|
+
require("./get-delivery-orders");
|
|
31
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/index.ts"],"names":[],"mappings":";;AAAA,+BAA4B;AAC5B,+BAA4B;AAC5B,mCAAgC;AAChC,0BAAuB;AACvB,+BAA4B;AAC5B,sBAAmB;AACnB,kCAA+B;AAC/B,oCAAiC;AACjC,uCAAoC;AACpC,qCAAkC;AAClC,sCAAmC;AACnC,oCAAiC;AACjC,yCAAsC;AACtC,iDAA8C;AAC9C,oCAAiC;AACjC,0BAAuB;AACvB,sCAAmC;AACnC,wCAAqC;AACrC,iDAA8C;AAC9C,oCAAiC;AACjC,4BAAyB;AACzB,sCAAmC;AACnC,kCAA+B;AAC/B,6CAA0C;AAC1C,mDAAgD;AAChD,+CAA4C;AAC5C,sCAAmC;AACnC,0CAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/index.ts"],"names":[],"mappings":";;AAAA,+BAA4B;AAC5B,+BAA4B;AAC5B,mCAAgC;AAChC,0BAAuB;AACvB,+BAA4B;AAC5B,sBAAmB;AACnB,kCAA+B;AAC/B,oCAAiC;AACjC,uCAAoC;AACpC,qCAAkC;AAClC,sCAAmC;AACnC,oCAAiC;AACjC,yCAAsC;AACtC,iDAA8C;AAC9C,oCAAiC;AACjC,0BAAuB;AACvB,sCAAmC;AACnC,wCAAqC;AACrC,iDAA8C;AAC9C,oCAAiC;AACjC,4BAAyB;AACzB,sCAAmC;AACnC,kCAA+B;AAC/B,6CAA0C;AAC1C,mDAAgD;AAChD,+CAA4C;AAC5C,sCAAmC;AACnC,0CAAuC;AACvC,sCAAmC;AACnC,iCAA8B"}
|
|
@@ -1,4 +1,134 @@
|
|
|
1
1
|
definitions:
|
|
2
|
+
GRN:
|
|
3
|
+
type: 'object'
|
|
4
|
+
properties:
|
|
5
|
+
result:
|
|
6
|
+
type: 'object'
|
|
7
|
+
properties:
|
|
8
|
+
goodsReceivalNotes:
|
|
9
|
+
type: 'object'
|
|
10
|
+
properties:
|
|
11
|
+
items:
|
|
12
|
+
type: 'array'
|
|
13
|
+
items:
|
|
14
|
+
type: 'object'
|
|
15
|
+
properties:
|
|
16
|
+
id:
|
|
17
|
+
type: 'string'
|
|
18
|
+
example: '7347f0de-127d-473a-a103-00a086dd67be'
|
|
19
|
+
name:
|
|
20
|
+
type: 'string'
|
|
21
|
+
example: 'GRN-2022225847648'
|
|
22
|
+
refNo:
|
|
23
|
+
type: 'string'
|
|
24
|
+
example: 'GAN-202222571720651'
|
|
25
|
+
description:
|
|
26
|
+
type: 'string'
|
|
27
|
+
example: null
|
|
28
|
+
customerStatus:
|
|
29
|
+
type: 'string'
|
|
30
|
+
example: null
|
|
31
|
+
status:
|
|
32
|
+
type: 'string'
|
|
33
|
+
example: 'PENDING_RECEIVE'
|
|
34
|
+
domain:
|
|
35
|
+
type: 'object'
|
|
36
|
+
properties:
|
|
37
|
+
id:
|
|
38
|
+
type: 'string'
|
|
39
|
+
example: 'df6dba81-6029-4f95-96ff-748570dc2f4e'
|
|
40
|
+
name:
|
|
41
|
+
type: 'string'
|
|
42
|
+
example: 'ABC Warehouse'
|
|
43
|
+
arrivalNotice:
|
|
44
|
+
type: 'object'
|
|
45
|
+
properties:
|
|
46
|
+
id:
|
|
47
|
+
type: 'string'
|
|
48
|
+
example: '33db4bbe-f652-440b-9c36-13af627d3989'
|
|
49
|
+
name:
|
|
50
|
+
type: 'string'
|
|
51
|
+
example: 'GAN-202222572720659'
|
|
52
|
+
description:
|
|
53
|
+
type: 'string'
|
|
54
|
+
example: null
|
|
55
|
+
status:
|
|
56
|
+
type: 'string'
|
|
57
|
+
example: 'DONE'
|
|
58
|
+
refNo:
|
|
59
|
+
type: 'string'
|
|
60
|
+
example: 'ABC Transportation - 3 Ton'
|
|
61
|
+
refNo2:
|
|
62
|
+
type: 'string'
|
|
63
|
+
example: 'Loose'
|
|
64
|
+
refNo3:
|
|
65
|
+
type: 'string'
|
|
66
|
+
example: null
|
|
67
|
+
orderProducts:
|
|
68
|
+
type: 'object'
|
|
69
|
+
properties:
|
|
70
|
+
id:
|
|
71
|
+
type: 'string'
|
|
72
|
+
example: 'b6e18590-4876-4cf4-87af-3c53f7c623d1'
|
|
73
|
+
type:
|
|
74
|
+
type: 'string'
|
|
75
|
+
example: null
|
|
76
|
+
batchId:
|
|
77
|
+
type: 'string'
|
|
78
|
+
example: '-'
|
|
79
|
+
packingType:
|
|
80
|
+
type: 'string'
|
|
81
|
+
example: 'CARTON'
|
|
82
|
+
packingSize:
|
|
83
|
+
type: 'number'
|
|
84
|
+
example: 24
|
|
85
|
+
releaseQty:
|
|
86
|
+
type: 'number'
|
|
87
|
+
example: null
|
|
88
|
+
releaseUomValue:
|
|
89
|
+
type: 'number'
|
|
90
|
+
example: null
|
|
91
|
+
status:
|
|
92
|
+
type: 'string'
|
|
93
|
+
example: 'ACTIVE'
|
|
94
|
+
bizplace:
|
|
95
|
+
type: 'object'
|
|
96
|
+
properties:
|
|
97
|
+
id:
|
|
98
|
+
type: 'string'
|
|
99
|
+
example: 'b60feaf2-1940-40cd-9c53-9e9ac072049d'
|
|
100
|
+
name:
|
|
101
|
+
type: 'string'
|
|
102
|
+
example: 'ABC E-commerce'
|
|
103
|
+
description:
|
|
104
|
+
type: 'string'
|
|
105
|
+
example: ''
|
|
106
|
+
attachments:
|
|
107
|
+
type: 'string'
|
|
108
|
+
example: ''
|
|
109
|
+
createdAt:
|
|
110
|
+
type: 'number'
|
|
111
|
+
example: 1645750026391
|
|
112
|
+
updatedAt:
|
|
113
|
+
type: 'number'
|
|
114
|
+
example: 1645750026391
|
|
115
|
+
updater:
|
|
116
|
+
type: 'object'
|
|
117
|
+
properties:
|
|
118
|
+
id:
|
|
119
|
+
type: 'string'
|
|
120
|
+
example: '2ce54c66-436a-40cf-a042-24d032c28ceb'
|
|
121
|
+
name:
|
|
122
|
+
type: 'string'
|
|
123
|
+
example: 'Ee Chern Hao'
|
|
124
|
+
description:
|
|
125
|
+
type: 'string'
|
|
126
|
+
example: null
|
|
127
|
+
total:
|
|
128
|
+
type: 'number'
|
|
129
|
+
example: 12
|
|
130
|
+
xml:
|
|
131
|
+
name: 'GRN'
|
|
2
132
|
Inbound:
|
|
3
133
|
type: 'object'
|
|
4
134
|
required:
|
|
@@ -225,3 +355,51 @@ paths:
|
|
|
225
355
|
'500':
|
|
226
356
|
description: 'Server error'
|
|
227
357
|
deprecated: false
|
|
358
|
+
/warehouse/{warehouseId}/get-goods-received-note:
|
|
359
|
+
get:
|
|
360
|
+
tags:
|
|
361
|
+
- 'inbound'
|
|
362
|
+
description: 'Use this API to get a list of goods receival notes from WMS.'
|
|
363
|
+
operationId: 'getGoodsReceivedNote'
|
|
364
|
+
produces:
|
|
365
|
+
- 'application/json'
|
|
366
|
+
parameters:
|
|
367
|
+
- in: 'path'
|
|
368
|
+
name: 'warehouseId'
|
|
369
|
+
required: true
|
|
370
|
+
type: 'string'
|
|
371
|
+
- name: 'fromDate'
|
|
372
|
+
in: 'query'
|
|
373
|
+
required: true
|
|
374
|
+
type: 'string'
|
|
375
|
+
- name: 'toDate'
|
|
376
|
+
in: 'query'
|
|
377
|
+
description: 'Maximum date range is 1 month'
|
|
378
|
+
required: true
|
|
379
|
+
type: 'string'
|
|
380
|
+
- name: 'limit'
|
|
381
|
+
in: 'query'
|
|
382
|
+
default: 10
|
|
383
|
+
required: false
|
|
384
|
+
type: 'number'
|
|
385
|
+
- name: 'page'
|
|
386
|
+
in: 'query'
|
|
387
|
+
default: 1
|
|
388
|
+
required: false
|
|
389
|
+
type: 'number'
|
|
390
|
+
responses:
|
|
391
|
+
'200':
|
|
392
|
+
description: 'successful operation'
|
|
393
|
+
content:
|
|
394
|
+
application/json:
|
|
395
|
+
schema:
|
|
396
|
+
$ref: '#/definitions/GRN'
|
|
397
|
+
'400':
|
|
398
|
+
description: 'Bad request is sent'
|
|
399
|
+
'401':
|
|
400
|
+
description: 'Authentication Error'
|
|
401
|
+
'404':
|
|
402
|
+
description: 'Resource not found'
|
|
403
|
+
'500':
|
|
404
|
+
description: 'Server error'
|
|
405
|
+
deprecated: false
|