@saihu/common 1.1.85 → 1.1.87
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 @@ export declare enum Exchanges {
|
|
|
8
8
|
OPER_LOG_EXCHANGE = "oper_log_exchange",
|
|
9
9
|
SCM_DATA = "scm.data",
|
|
10
10
|
SCM_PROCUREMENT_ORDER = "scm.procurement.order",
|
|
11
|
+
SCM_SORT = "scm.sort",
|
|
11
12
|
IM_PROCUREMENT_ORDER_DLX = "im.procurement.order.dlx",
|
|
12
13
|
IM_INVENTORY_DLX = "im.inventory.dlx",
|
|
13
14
|
IM_SALES_ORDER_DLX = "im.sales.order.dlx",
|
|
@@ -15,7 +16,8 @@ export declare enum Exchanges {
|
|
|
15
16
|
MASTER_DATA_DLX = "master.data.dlx",
|
|
16
17
|
OPER_LOG_EXCHANGE_DLX = "oper_log_exchange.dlx",
|
|
17
18
|
SCM_DATA_DLX = "scm.data.dlx",
|
|
18
|
-
SCM_PROCUREMENT_ORDER_DLX = "scm.procurement.order.dlx"
|
|
19
|
+
SCM_PROCUREMENT_ORDER_DLX = "scm.procurement.order.dlx",
|
|
20
|
+
SCM_SORT_DLX = "scm.sort.dlx"
|
|
19
21
|
}
|
|
20
22
|
export declare const RoutingKeys: {
|
|
21
23
|
readonly "im.procurement.order": {
|
|
@@ -102,6 +104,16 @@ export declare const RoutingKeys: {
|
|
|
102
104
|
readonly "oper_log_exchange.dlx": {
|
|
103
105
|
readonly OPER_LOG_CREATED: "oper.log.created.dlq";
|
|
104
106
|
};
|
|
107
|
+
readonly "scm.sort": {
|
|
108
|
+
readonly SORT_BATCH_CREATED: "sort.batch.created";
|
|
109
|
+
readonly SORT_BATCH_FINISHED: "sort.batch.finished";
|
|
110
|
+
readonly SORT_BATCH_DELETED: "sort.batch.deleted";
|
|
111
|
+
};
|
|
112
|
+
readonly "scm.sort.dlx": {
|
|
113
|
+
readonly SORT_BATCH_CREATED: "sort.batch.created.dlq";
|
|
114
|
+
readonly SORT_BATCH_DELETED: "sort.batch.deleted.dlq";
|
|
115
|
+
readonly SORT_BATCH_FINISHED: "sort.batch.finished.dlq";
|
|
116
|
+
};
|
|
105
117
|
};
|
|
106
118
|
export type RoutingKeysForExchange<E extends Exchanges> = (typeof RoutingKeys)[E][keyof (typeof RoutingKeys)[E]];
|
|
107
119
|
export declare const ExchangeTypes: Record<Exchanges, ExchangeType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../src/messaging/topology.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErE,oBAAY,SAAS;IACnB,oBAAoB,yBAAyB;IAC7C,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,QAAQ,aAAa;IACrB,qBAAqB,0BAA0B;
|
|
1
|
+
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../src/messaging/topology.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErE,oBAAY,SAAS;IACnB,oBAAoB,yBAAyB;IAC7C,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,QAAQ,aAAa;IACrB,qBAAqB,0BAA0B;IAC/C,QAAQ,aAAa;IAGrB,wBAAwB,6BAA6B;IACrD,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,YAAY,iBAAiB;IAC7B,yBAAyB,8BAA8B;IACvD,YAAY,iBAAiB;CAC9B;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Fd,CAAC;AAEX,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,SAAS,IACpD,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAqBzD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,SAAS,EACT;IACE,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAoBF,CAAC;AAEF,eAAO,MAAM,CAAC,GAAI,SAAS,MAAM,EAAE,IAAI,MAAM,WAAyB,CAAC"}
|
|
@@ -11,6 +11,7 @@ var Exchanges;
|
|
|
11
11
|
Exchanges["OPER_LOG_EXCHANGE"] = "oper_log_exchange";
|
|
12
12
|
Exchanges["SCM_DATA"] = "scm.data";
|
|
13
13
|
Exchanges["SCM_PROCUREMENT_ORDER"] = "scm.procurement.order";
|
|
14
|
+
Exchanges["SCM_SORT"] = "scm.sort";
|
|
14
15
|
// DLX versions
|
|
15
16
|
Exchanges["IM_PROCUREMENT_ORDER_DLX"] = "im.procurement.order.dlx";
|
|
16
17
|
Exchanges["IM_INVENTORY_DLX"] = "im.inventory.dlx";
|
|
@@ -20,6 +21,7 @@ var Exchanges;
|
|
|
20
21
|
Exchanges["OPER_LOG_EXCHANGE_DLX"] = "oper_log_exchange.dlx";
|
|
21
22
|
Exchanges["SCM_DATA_DLX"] = "scm.data.dlx";
|
|
22
23
|
Exchanges["SCM_PROCUREMENT_ORDER_DLX"] = "scm.procurement.order.dlx";
|
|
24
|
+
Exchanges["SCM_SORT_DLX"] = "scm.sort.dlx";
|
|
23
25
|
})(Exchanges || (exports.Exchanges = Exchanges = {}));
|
|
24
26
|
exports.RoutingKeys = {
|
|
25
27
|
[Exchanges.IM_PROCUREMENT_ORDER]: {
|
|
@@ -106,6 +108,16 @@ exports.RoutingKeys = {
|
|
|
106
108
|
[Exchanges.OPER_LOG_EXCHANGE_DLX]: {
|
|
107
109
|
OPER_LOG_CREATED: 'oper.log.created.dlq',
|
|
108
110
|
},
|
|
111
|
+
[Exchanges.SCM_SORT]: {
|
|
112
|
+
SORT_BATCH_CREATED: 'sort.batch.created',
|
|
113
|
+
SORT_BATCH_FINISHED: 'sort.batch.finished',
|
|
114
|
+
SORT_BATCH_DELETED: 'sort.batch.deleted',
|
|
115
|
+
},
|
|
116
|
+
[Exchanges.SCM_SORT_DLX]: {
|
|
117
|
+
SORT_BATCH_CREATED: 'sort.batch.created.dlq',
|
|
118
|
+
SORT_BATCH_DELETED: 'sort.batch.deleted.dlq',
|
|
119
|
+
SORT_BATCH_FINISHED: 'sort.batch.finished.dlq',
|
|
120
|
+
},
|
|
109
121
|
};
|
|
110
122
|
exports.ExchangeTypes = {
|
|
111
123
|
[Exchanges.IM_PROCUREMENT_ORDER]: 'topic',
|
|
@@ -117,6 +129,7 @@ exports.ExchangeTypes = {
|
|
|
117
129
|
[Exchanges.IM_SALES_ORDER]: 'topic',
|
|
118
130
|
[Exchanges.SCM_DATA]: 'topic',
|
|
119
131
|
[Exchanges.SCM_PROCUREMENT_ORDER]: 'topic',
|
|
132
|
+
[Exchanges.SCM_SORT]: 'topic',
|
|
120
133
|
[Exchanges.IM_PROCUREMENT_ORDER_DLX]: 'topic',
|
|
121
134
|
[Exchanges.IM_INVENTORY_DLX]: 'topic',
|
|
122
135
|
[Exchanges.IM_SALES_ORDER_DLX]: 'topic',
|
|
@@ -125,6 +138,7 @@ exports.ExchangeTypes = {
|
|
|
125
138
|
[Exchanges.OPER_LOG_EXCHANGE_DLX]: 'topic',
|
|
126
139
|
[Exchanges.SCM_DATA_DLX]: 'topic',
|
|
127
140
|
[Exchanges.SCM_PROCUREMENT_ORDER_DLX]: 'topic',
|
|
141
|
+
[Exchanges.SCM_SORT_DLX]: 'topic',
|
|
128
142
|
};
|
|
129
143
|
exports.ExchangeOptions = {
|
|
130
144
|
[Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
|
|
@@ -135,6 +149,8 @@ exports.ExchangeOptions = {
|
|
|
135
149
|
[Exchanges.IM_SALES_ORDER]: { durable: true },
|
|
136
150
|
[Exchanges.SCM_DATA]: { durable: true },
|
|
137
151
|
[Exchanges.SCM_PROCUREMENT_ORDER]: { durable: true },
|
|
152
|
+
[Exchanges.SCM_SORT]: { durable: true },
|
|
153
|
+
[Exchanges.SCM_SORT_DLX]: { durable: true },
|
|
138
154
|
[Exchanges.IM_PROCUREMENT_ORDER_DLX]: { durable: true },
|
|
139
155
|
[Exchanges.IM_INVENTORY_DLX]: { durable: true },
|
|
140
156
|
[Exchanges.IM_SALES_ORDER_DLX]: { durable: true },
|
package/dist/util/times.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function getDayStart(date: string): Date;
|
|
2
|
+
export declare function getFormattedUTCTime(date: string | null): string | null;
|
|
2
3
|
export declare function getDayEnd(date: string): Date;
|
|
3
4
|
export declare function getCurrentDate(): string;
|
|
4
5
|
export declare function getTomorrowDate(): string;
|
package/dist/util/times.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"times.d.ts","sourceRoot":"","sources":["../../src/util/times.ts"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,QAEvC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,QAErC;AAED,wBAAgB,cAAc,WAE7B;AAED,wBAAgB,eAAe,WAE9B;AAED,wBAAgB,mBAAmB,SAMlC;AAED,wBAA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MAAM,cAAc,QAAO,MAOjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,MAOpC,CAAC"}
|
package/dist/util/times.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getCurrentVersion = exports.getNextVersion = void 0;
|
|
7
7
|
exports.getDayStart = getDayStart;
|
|
8
|
+
exports.getFormattedUTCTime = getFormattedUTCTime;
|
|
8
9
|
exports.getDayEnd = getDayEnd;
|
|
9
10
|
exports.getCurrentDate = getCurrentDate;
|
|
10
11
|
exports.getTomorrowDate = getTomorrowDate;
|
|
@@ -24,6 +25,11 @@ dayjs_1.default.extend(timezone_1.default);
|
|
|
24
25
|
function getDayStart(date) {
|
|
25
26
|
return dayjs_1.default.utc(date).startOf('day').toDate();
|
|
26
27
|
}
|
|
28
|
+
function getFormattedUTCTime(date) {
|
|
29
|
+
if (!date)
|
|
30
|
+
return null;
|
|
31
|
+
return (0, dayjs_1.default)(date).utc().format('YYYY-MM-DD HH:mm:ss');
|
|
32
|
+
}
|
|
27
33
|
function getDayEnd(date) {
|
|
28
34
|
return dayjs_1.default.utc(date).endOf('day').toDate();
|
|
29
35
|
}
|