@things-factory/operato-hub 4.3.178 → 4.3.180
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.
|
@@ -8,6 +8,7 @@ const typeorm_1 = require("typeorm");
|
|
|
8
8
|
const api_1 = require("@things-factory/api");
|
|
9
9
|
const biz_base_1 = require("@things-factory/biz-base");
|
|
10
10
|
const sales_base_1 = require("@things-factory/sales-base");
|
|
11
|
+
const integration_base_1 = require("@things-factory/integration-base");
|
|
11
12
|
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
12
13
|
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
13
14
|
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:cancel-release-order');
|
|
@@ -57,17 +58,25 @@ api_1.restfulApiRouter.post('/unstable/warehouse/:warehouseId/cancel-release-ord
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
debug('post:/cancel-release-order body request', bodyReq);
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
try {
|
|
62
|
+
await client.mutate({
|
|
62
63
|
mutation: (0, graphql_tag_1.default) `
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
mutation pendingCancellationReleaseOrder($name: String!) {
|
|
65
|
+
pendingCancellationReleaseOrder(name: $name)
|
|
66
|
+
}
|
|
67
|
+
`,
|
|
67
68
|
variables: { name: releaseOrder.name },
|
|
68
69
|
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { customerBizplace,
|
|
69
70
|
domain, type: 'api' }) })
|
|
70
|
-
})
|
|
71
|
-
|
|
71
|
+
});
|
|
72
|
+
context.body = { result: true };
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
context.body = { result: false };
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
(0, integration_base_1.createPayloadLog)(customerBizplace.id, `/unstable/warehouse/:warehouseId/cancel-release-order`, context.request.body, context.body, context, integration_base_1.PayloadType.INGESTION);
|
|
79
|
+
}
|
|
80
|
+
catch (e) { }
|
|
72
81
|
});
|
|
73
82
|
//# sourceMappingURL=cancel-release-order.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel-release-order.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/cancel-release-order.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,qCAAuC;AAEvC,6CAAgE;AAChE,uDAAmD;AACnD,2DAA0E;
|
|
1
|
+
{"version":3,"file":"cancel-release-order.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/cancel-release-order.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,qCAAuC;AAEvC,6CAAgE;AAChE,uDAAmD;AACnD,2DAA0E;AAC1E,uEAAgF;AAEhF,qFAAgF;AAChF,uFAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,sEAAsE,CAAC,CAAA;AAEtG,sBAAM,CAAC,IAAI,CACT,uDAAuD,EACvD,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;;IACtB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IACxC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;IACtC,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;IAEpC,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,CAAC,CAAA,MAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,0CAAE,MAAM,CAAA,EAAE;QACjE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAA;KAC3D;IAED,MAAM,gBAAgB,GAAa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;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAA;SACvD;KACF;IAED,KAAK,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAA;IAEzD,IAAI;QACF,MAAM,MAAM,CAAC,MAAM,CAAC;YAClB,QAAQ,EAAE,IAAA,qBAAG,EAAA;;;;SAIZ;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE;YACtC,OAAO,kCACF,OAAO,KACV,KAAK,kCACA,OAAO,CAAC,KAAK,KAChB,gBAAgB;oBAChB,MAAM,EACN,IAAI,EAAE,KAAK,MAEd;SACK,CAAC,CAAA;QACT,OAAO,CAAC,IAAI,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;KAChC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,IAAI,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;KACjC;IAED,IAAI;QACF,IAAA,mCAAgB,EACd,gBAAgB,CAAC,EAAE,EACnB,uDAAuD,EACvD,OAAO,CAAC,OAAO,CAAC,IAAI,EACpB,OAAO,CAAC,IAAI,EACZ,OAAO,EACP,8BAAW,CAAC,SAAS,CACtB,CAAA;KACF;IAAC,OAAO,CAAC,EAAE,GAAE;AAChB,CAAC,CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-hub",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.180",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -55,68 +55,68 @@
|
|
|
55
55
|
"@operato/scene-tab": "^0.1.8",
|
|
56
56
|
"@operato/scene-table": "^0.1.8",
|
|
57
57
|
"@operato/scene-wheel-sorter": "^0.1.8",
|
|
58
|
-
"@things-factory/api": "^4.3.
|
|
59
|
-
"@things-factory/apptool-ui": "^4.3.
|
|
60
|
-
"@things-factory/attachment-base": "^4.3.
|
|
61
|
-
"@things-factory/auth-base": "^4.3.
|
|
62
|
-
"@things-factory/auth-ui": "^4.3.
|
|
63
|
-
"@things-factory/biz-base": "^4.3.
|
|
64
|
-
"@things-factory/biz-ui": "^4.3.
|
|
65
|
-
"@things-factory/board-service": "^4.3.
|
|
66
|
-
"@things-factory/board-ui": "^4.3.
|
|
67
|
-
"@things-factory/code-ui": "^4.3.
|
|
58
|
+
"@things-factory/api": "^4.3.179",
|
|
59
|
+
"@things-factory/apptool-ui": "^4.3.179",
|
|
60
|
+
"@things-factory/attachment-base": "^4.3.179",
|
|
61
|
+
"@things-factory/auth-base": "^4.3.179",
|
|
62
|
+
"@things-factory/auth-ui": "^4.3.179",
|
|
63
|
+
"@things-factory/biz-base": "^4.3.179",
|
|
64
|
+
"@things-factory/biz-ui": "^4.3.179",
|
|
65
|
+
"@things-factory/board-service": "^4.3.179",
|
|
66
|
+
"@things-factory/board-ui": "^4.3.179",
|
|
67
|
+
"@things-factory/code-ui": "^4.3.179",
|
|
68
68
|
"@things-factory/component-ui": "^4.3.159",
|
|
69
|
-
"@things-factory/context-ui": "^4.3.
|
|
70
|
-
"@things-factory/document-template-ui": "^4.3.
|
|
71
|
-
"@things-factory/export-ui": "^4.3.
|
|
72
|
-
"@things-factory/export-ui-csv": "^4.3.
|
|
73
|
-
"@things-factory/export-ui-excel": "^4.3.
|
|
74
|
-
"@things-factory/geography": "^4.3.
|
|
75
|
-
"@things-factory/grist-ui": "^4.3.
|
|
76
|
-
"@things-factory/help": "^4.3.
|
|
77
|
-
"@things-factory/i18n-base": "^4.3.
|
|
78
|
-
"@things-factory/import-ui": "^4.3.
|
|
79
|
-
"@things-factory/import-ui-excel": "^4.3.
|
|
80
|
-
"@things-factory/integration-accounting": "^4.3.
|
|
81
|
-
"@things-factory/integration-fulfillment": "^4.3.
|
|
82
|
-
"@things-factory/integration-lmd": "^4.3.
|
|
83
|
-
"@things-factory/integration-marketplace": "^4.3.
|
|
84
|
-
"@things-factory/integration-pos": "^4.3.
|
|
85
|
-
"@things-factory/integration-sellercraft": "^4.3.
|
|
86
|
-
"@things-factory/integration-sftp": "^4.3.
|
|
87
|
-
"@things-factory/lite-menu": "^4.3.
|
|
88
|
-
"@things-factory/more-ui": "^4.3.
|
|
89
|
-
"@things-factory/notification": "^4.3.
|
|
69
|
+
"@things-factory/context-ui": "^4.3.179",
|
|
70
|
+
"@things-factory/document-template-ui": "^4.3.179",
|
|
71
|
+
"@things-factory/export-ui": "^4.3.179",
|
|
72
|
+
"@things-factory/export-ui-csv": "^4.3.179",
|
|
73
|
+
"@things-factory/export-ui-excel": "^4.3.179",
|
|
74
|
+
"@things-factory/geography": "^4.3.179",
|
|
75
|
+
"@things-factory/grist-ui": "^4.3.179",
|
|
76
|
+
"@things-factory/help": "^4.3.179",
|
|
77
|
+
"@things-factory/i18n-base": "^4.3.179",
|
|
78
|
+
"@things-factory/import-ui": "^4.3.179",
|
|
79
|
+
"@things-factory/import-ui-excel": "^4.3.179",
|
|
80
|
+
"@things-factory/integration-accounting": "^4.3.179",
|
|
81
|
+
"@things-factory/integration-fulfillment": "^4.3.179",
|
|
82
|
+
"@things-factory/integration-lmd": "^4.3.179",
|
|
83
|
+
"@things-factory/integration-marketplace": "^4.3.179",
|
|
84
|
+
"@things-factory/integration-pos": "^4.3.179",
|
|
85
|
+
"@things-factory/integration-sellercraft": "^4.3.179",
|
|
86
|
+
"@things-factory/integration-sftp": "^4.3.179",
|
|
87
|
+
"@things-factory/lite-menu": "^4.3.179",
|
|
88
|
+
"@things-factory/more-ui": "^4.3.179",
|
|
89
|
+
"@things-factory/notification": "^4.3.179",
|
|
90
90
|
"@things-factory/pdf": "^4.3.159",
|
|
91
|
-
"@things-factory/product-ui": "^4.3.
|
|
92
|
-
"@things-factory/resource-ui": "^4.3.
|
|
93
|
-
"@things-factory/sales-base": "^4.3.
|
|
91
|
+
"@things-factory/product-ui": "^4.3.179",
|
|
92
|
+
"@things-factory/resource-ui": "^4.3.179",
|
|
93
|
+
"@things-factory/sales-base": "^4.3.180",
|
|
94
94
|
"@things-factory/scene-data-transform": "^4.3.159",
|
|
95
95
|
"@things-factory/scene-excel": "^4.3.159",
|
|
96
96
|
"@things-factory/scene-firebase": "^4.3.159",
|
|
97
97
|
"@things-factory/scene-form": "^4.3.159",
|
|
98
98
|
"@things-factory/scene-google-map": "^4.3.159",
|
|
99
99
|
"@things-factory/scene-graphql": "^4.3.159",
|
|
100
|
-
"@things-factory/scene-label": "^4.3.
|
|
100
|
+
"@things-factory/scene-label": "^4.3.179",
|
|
101
101
|
"@things-factory/scene-marker": "^4.3.159",
|
|
102
|
-
"@things-factory/scene-mqtt": "^4.3.
|
|
102
|
+
"@things-factory/scene-mqtt": "^4.3.179",
|
|
103
103
|
"@things-factory/scene-restful": "^4.3.159",
|
|
104
104
|
"@things-factory/scene-visualizer": "^4.3.159",
|
|
105
|
-
"@things-factory/setting-ui": "^4.3.
|
|
106
|
-
"@things-factory/shell": "^4.3.
|
|
107
|
-
"@things-factory/system-ui": "^4.3.
|
|
108
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
109
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
105
|
+
"@things-factory/setting-ui": "^4.3.179",
|
|
106
|
+
"@things-factory/shell": "^4.3.179",
|
|
107
|
+
"@things-factory/system-ui": "^4.3.179",
|
|
108
|
+
"@things-factory/warehouse-base": "^4.3.180",
|
|
109
|
+
"@things-factory/worksheet-base": "^4.3.180",
|
|
110
110
|
"cron-parser": "^4.7.0",
|
|
111
111
|
"koa2-swagger-ui": "^5.0.2",
|
|
112
112
|
"swagger-jsdoc": "^5.0.0",
|
|
113
113
|
"yamljs": "^0.3.0"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@things-factory/builder": "^4.3.
|
|
116
|
+
"@things-factory/builder": "^4.3.179"
|
|
117
117
|
},
|
|
118
118
|
"resolutions": {
|
|
119
119
|
"core-js": "^3.16.0"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "15d2c49b93638fceb097e06570bd0116ed5e24e3"
|
|
122
122
|
}
|
|
@@ -4,6 +4,7 @@ import { getRepository } from 'typeorm'
|
|
|
4
4
|
import { restfulApiRouter as router } from '@things-factory/api'
|
|
5
5
|
import { Bizplace } from '@things-factory/biz-base'
|
|
6
6
|
import { DraftReleaseGood, ReleaseGood } from '@things-factory/sales-base'
|
|
7
|
+
import { createPayloadLog, PayloadType } from '@things-factory/integration-base'
|
|
7
8
|
|
|
8
9
|
import { businessMiddleware } from '../../../../middlewares/business-middleware'
|
|
9
10
|
import { warehouseMiddleware } from '../../../../middlewares/warehouse-middleware'
|
|
@@ -75,26 +76,38 @@ router.post(
|
|
|
75
76
|
|
|
76
77
|
debug('post:/cancel-release-order body request', bodyReq)
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
mutation:
|
|
82
|
-
|
|
83
|
-
pendingCancellationReleaseOrder(name: $name)
|
|
84
|
-
}
|
|
85
|
-
`,
|
|
86
|
-
variables: { name: releaseOrder.name },
|
|
87
|
-
context: {
|
|
88
|
-
...context,
|
|
89
|
-
state: {
|
|
90
|
-
...context.state,
|
|
91
|
-
customerBizplace,
|
|
92
|
-
domain,
|
|
93
|
-
type: 'api'
|
|
94
|
-
}
|
|
79
|
+
try {
|
|
80
|
+
await client.mutate({
|
|
81
|
+
mutation: gql`
|
|
82
|
+
mutation pendingCancellationReleaseOrder($name: String!) {
|
|
83
|
+
pendingCancellationReleaseOrder(name: $name)
|
|
95
84
|
}
|
|
96
|
-
|
|
97
|
-
|
|
85
|
+
`,
|
|
86
|
+
variables: { name: releaseOrder.name },
|
|
87
|
+
context: {
|
|
88
|
+
...context,
|
|
89
|
+
state: {
|
|
90
|
+
...context.state,
|
|
91
|
+
customerBizplace,
|
|
92
|
+
domain,
|
|
93
|
+
type: 'api'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
} as any)
|
|
97
|
+
context.body = { result: true }
|
|
98
|
+
} catch (e) {
|
|
99
|
+
context.body = { result: false }
|
|
98
100
|
}
|
|
101
|
+
|
|
102
|
+
try {
|
|
103
|
+
createPayloadLog(
|
|
104
|
+
customerBizplace.id,
|
|
105
|
+
`/unstable/warehouse/:warehouseId/cancel-release-order`,
|
|
106
|
+
context.request.body,
|
|
107
|
+
context.body,
|
|
108
|
+
context,
|
|
109
|
+
PayloadType.INGESTION
|
|
110
|
+
)
|
|
111
|
+
} catch (e) {}
|
|
99
112
|
}
|
|
100
113
|
)
|