@saihu/common 1.1.40 → 1.1.42
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.
|
@@ -2,6 +2,7 @@ export type ExchangeType = 'topic' | 'direct' | 'fanout' | 'headers';
|
|
|
2
2
|
export declare enum Exchanges {
|
|
3
3
|
IM_PROCUREMENT_ORDER = "im.procurement.order",
|
|
4
4
|
IM_INVENTORY = "im.inventory",
|
|
5
|
+
IM_SALES_ORDER = "im.sales.order",
|
|
5
6
|
IM_DATA = "im.data",
|
|
6
7
|
MASTER_DATA = "master.data",
|
|
7
8
|
OPER_LOG_EXCHANGE = "oper_log_exchange"
|
|
@@ -15,6 +16,11 @@ export declare const RoutingKeys: {
|
|
|
15
16
|
};
|
|
16
17
|
readonly "im.inventory": {
|
|
17
18
|
readonly INVENTORY_COUNT_CREATED: "inventory.count.created";
|
|
19
|
+
readonly INVENTORY_COUNT_DELETED: "inventory.count.deleted";
|
|
20
|
+
};
|
|
21
|
+
readonly "im.sales.order": {
|
|
22
|
+
readonly SALES_ORDER_CREATED: "sales.orders.upserted";
|
|
23
|
+
readonly SALES_ORDER_DELETED: "sales.order.deleted";
|
|
18
24
|
};
|
|
19
25
|
readonly "master.data": {
|
|
20
26
|
readonly SHOP_UPSERTED: "shop.upserted";
|
|
@@ -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,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;CACxC;AAED,eAAO,MAAM,WAAW
|
|
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;CACxC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bd,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,CAQzD,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,CAQF,CAAC;AAEF,eAAO,MAAM,CAAC,GAAI,SAAS,MAAM,EAAE,IAAI,MAAM,WAAyB,CAAC"}
|
|
@@ -5,6 +5,7 @@ var Exchanges;
|
|
|
5
5
|
(function (Exchanges) {
|
|
6
6
|
Exchanges["IM_PROCUREMENT_ORDER"] = "im.procurement.order";
|
|
7
7
|
Exchanges["IM_INVENTORY"] = "im.inventory";
|
|
8
|
+
Exchanges["IM_SALES_ORDER"] = "im.sales.order";
|
|
8
9
|
Exchanges["IM_DATA"] = "im.data";
|
|
9
10
|
Exchanges["MASTER_DATA"] = "master.data";
|
|
10
11
|
Exchanges["OPER_LOG_EXCHANGE"] = "oper_log_exchange";
|
|
@@ -18,6 +19,11 @@ exports.RoutingKeys = {
|
|
|
18
19
|
},
|
|
19
20
|
[Exchanges.IM_INVENTORY]: {
|
|
20
21
|
INVENTORY_COUNT_CREATED: 'inventory.count.created',
|
|
22
|
+
INVENTORY_COUNT_DELETED: 'inventory.count.deleted',
|
|
23
|
+
},
|
|
24
|
+
[Exchanges.IM_SALES_ORDER]: {
|
|
25
|
+
SALES_ORDER_CREATED: 'sales.orders.upserted',
|
|
26
|
+
SALES_ORDER_DELETED: 'sales.order.deleted',
|
|
21
27
|
},
|
|
22
28
|
[Exchanges.MASTER_DATA]: {
|
|
23
29
|
SHOP_UPSERTED: 'shop.upserted',
|
|
@@ -38,10 +44,12 @@ exports.RoutingKeys = {
|
|
|
38
44
|
};
|
|
39
45
|
exports.ExchangeTypes = {
|
|
40
46
|
[Exchanges.IM_PROCUREMENT_ORDER]: 'topic',
|
|
47
|
+
// [Ex]
|
|
41
48
|
[Exchanges.IM_DATA]: 'topic',
|
|
42
49
|
[Exchanges.IM_INVENTORY]: 'topic',
|
|
43
50
|
[Exchanges.MASTER_DATA]: 'topic',
|
|
44
51
|
[Exchanges.OPER_LOG_EXCHANGE]: 'direct',
|
|
52
|
+
[Exchanges.IM_SALES_ORDER]: 'topic',
|
|
45
53
|
};
|
|
46
54
|
exports.ExchangeOptions = {
|
|
47
55
|
[Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
|
|
@@ -49,6 +57,7 @@ exports.ExchangeOptions = {
|
|
|
49
57
|
[Exchanges.IM_DATA]: { durable: true },
|
|
50
58
|
[Exchanges.MASTER_DATA]: { durable: true },
|
|
51
59
|
[Exchanges.OPER_LOG_EXCHANGE]: { durable: true, messageTtl: 86400000 },
|
|
60
|
+
[Exchanges.IM_SALES_ORDER]: { durable: true },
|
|
52
61
|
};
|
|
53
62
|
const q = (service, rk) => `q.${rk}.${service}`; // e.g. q.procurement.order.delivered.imjobs
|
|
54
63
|
exports.q = q;
|