@saihu/common 1.1.36 → 1.1.38
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export type ExchangeType = 'topic' | 'direct' | 'fanout' | 'headers';
|
|
2
2
|
export declare enum Exchanges {
|
|
3
3
|
IM_PROCUREMENT_ORDER = "im.procurement.order",
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
SHOP = "shop",
|
|
4
|
+
IM_DATA = "im.data",
|
|
5
|
+
MASTER_DATA = "master.data",
|
|
7
6
|
OPER_LOG_EXCHANGE = "oper_log_exchange"
|
|
8
7
|
}
|
|
9
8
|
export declare const RoutingKeys: {
|
|
@@ -13,14 +12,16 @@ export declare const RoutingKeys: {
|
|
|
13
12
|
readonly ORDER_FINALIZED: "procurement.order.finalized";
|
|
14
13
|
readonly ORDER_CHECK_PASSED: "procurement.order.check.passed";
|
|
15
14
|
};
|
|
16
|
-
readonly
|
|
15
|
+
readonly "master.data": {
|
|
17
16
|
readonly SHOP_UPSERTED: "shop.upserted";
|
|
18
17
|
};
|
|
19
|
-
readonly "im.
|
|
18
|
+
readonly "im.data": {
|
|
20
19
|
readonly SUPPLIER_ITEMS_UPSERTED: "supplier.items.upserted";
|
|
21
|
-
};
|
|
22
|
-
readonly "im.generic.item": {
|
|
23
20
|
readonly GENERIC_ITEM_UPSERTED: "generic.item.upserted";
|
|
21
|
+
readonly GENERIC_ITEM_DELETED: "generic.item.deleted";
|
|
22
|
+
readonly FOOD_ITEM_UPSERTED: "food.item.upserted";
|
|
23
|
+
readonly SHOP_SPECIALTY_ITEM_UPSERTED: "shop.specialty.item.upserted";
|
|
24
|
+
readonly SHOP_SPECIALTY_ITEM_DELETED: "shop.specialty.item.deleted";
|
|
24
25
|
};
|
|
25
26
|
readonly oper_log_exchange: {
|
|
26
27
|
readonly OPER_LOG_CREATED: "oper.log.created";
|
|
@@ -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,
|
|
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,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;CACxC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;CAsBd,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,CAKzD,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,CAMF,CAAC;AAEF,eAAO,MAAM,CAAC,GAAI,SAAS,MAAM,EAAE,IAAI,MAAM,WAAyB,CAAC"}
|
|
@@ -4,9 +4,8 @@ exports.q = exports.ExchangeOptions = exports.ExchangeTypes = exports.RoutingKey
|
|
|
4
4
|
var Exchanges;
|
|
5
5
|
(function (Exchanges) {
|
|
6
6
|
Exchanges["IM_PROCUREMENT_ORDER"] = "im.procurement.order";
|
|
7
|
-
Exchanges["
|
|
8
|
-
Exchanges["
|
|
9
|
-
Exchanges["SHOP"] = "shop";
|
|
7
|
+
Exchanges["IM_DATA"] = "im.data";
|
|
8
|
+
Exchanges["MASTER_DATA"] = "master.data";
|
|
10
9
|
Exchanges["OPER_LOG_EXCHANGE"] = "oper_log_exchange";
|
|
11
10
|
})(Exchanges || (exports.Exchanges = Exchanges = {}));
|
|
12
11
|
exports.RoutingKeys = {
|
|
@@ -16,14 +15,16 @@ exports.RoutingKeys = {
|
|
|
16
15
|
ORDER_FINALIZED: 'procurement.order.finalized',
|
|
17
16
|
ORDER_CHECK_PASSED: 'procurement.order.check.passed',
|
|
18
17
|
},
|
|
19
|
-
[Exchanges.
|
|
18
|
+
[Exchanges.MASTER_DATA]: {
|
|
20
19
|
SHOP_UPSERTED: 'shop.upserted',
|
|
21
20
|
},
|
|
22
|
-
[Exchanges.
|
|
21
|
+
[Exchanges.IM_DATA]: {
|
|
23
22
|
SUPPLIER_ITEMS_UPSERTED: 'supplier.items.upserted',
|
|
24
|
-
},
|
|
25
|
-
[Exchanges.IM_GENERIC_ITEM]: {
|
|
26
23
|
GENERIC_ITEM_UPSERTED: 'generic.item.upserted',
|
|
24
|
+
GENERIC_ITEM_DELETED: 'generic.item.deleted',
|
|
25
|
+
FOOD_ITEM_UPSERTED: 'food.item.upserted',
|
|
26
|
+
SHOP_SPECIALTY_ITEM_UPSERTED: 'shop.specialty.item.upserted',
|
|
27
|
+
SHOP_SPECIALTY_ITEM_DELETED: 'shop.specialty.item.deleted',
|
|
27
28
|
},
|
|
28
29
|
[Exchanges.OPER_LOG_EXCHANGE]: {
|
|
29
30
|
// Add your oper log routing keys here
|
|
@@ -32,17 +33,15 @@ exports.RoutingKeys = {
|
|
|
32
33
|
};
|
|
33
34
|
exports.ExchangeTypes = {
|
|
34
35
|
[Exchanges.IM_PROCUREMENT_ORDER]: 'topic',
|
|
35
|
-
[Exchanges.
|
|
36
|
+
[Exchanges.MASTER_DATA]: 'topic',
|
|
36
37
|
[Exchanges.OPER_LOG_EXCHANGE]: 'direct',
|
|
37
|
-
[Exchanges.
|
|
38
|
-
[Exchanges.IM_GENERIC_ITEM]: 'topic',
|
|
38
|
+
[Exchanges.IM_DATA]: 'topic',
|
|
39
39
|
};
|
|
40
40
|
exports.ExchangeOptions = {
|
|
41
41
|
[Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
|
|
42
|
-
[Exchanges.
|
|
42
|
+
[Exchanges.MASTER_DATA]: { durable: true },
|
|
43
43
|
[Exchanges.OPER_LOG_EXCHANGE]: { durable: true, messageTtl: 86400000 },
|
|
44
|
-
[Exchanges.
|
|
45
|
-
[Exchanges.IM_GENERIC_ITEM]: { durable: true },
|
|
44
|
+
[Exchanges.IM_DATA]: { durable: true },
|
|
46
45
|
};
|
|
47
46
|
const q = (service, rk) => `q.${rk}.${service}`; // e.g. q.procurement.order.delivered.imjobs
|
|
48
47
|
exports.q = q;
|