@saihu/common 1.1.44 → 1.1.46
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.
|
@@ -6,7 +6,14 @@ export declare enum Exchanges {
|
|
|
6
6
|
IM_DATA = "im.data",
|
|
7
7
|
MASTER_DATA = "master.data",
|
|
8
8
|
OPER_LOG_EXCHANGE = "oper_log_exchange",
|
|
9
|
-
SCM_DATA = "scm.data"
|
|
9
|
+
SCM_DATA = "scm.data",
|
|
10
|
+
IM_PROCUREMENT_ORDER_DLX = "im.procurement.order.dlx",
|
|
11
|
+
IM_INVENTORY_DLX = "im.inventory.dlx",
|
|
12
|
+
IM_SALES_ORDER_DLX = "im.sales.order.dlx",
|
|
13
|
+
IM_DATA_DLX = "im.data.dlx",
|
|
14
|
+
MASTER_DATA_DLX = "master.data.dlx",
|
|
15
|
+
OPER_LOG_EXCHANGE_DLX = "oper_log_exchange.dlx",
|
|
16
|
+
SCM_DATA_DLX = "scm.data.dlx"
|
|
10
17
|
}
|
|
11
18
|
export declare const RoutingKeys: {
|
|
12
19
|
readonly "im.procurement.order": {
|
|
@@ -15,17 +22,34 @@ export declare const RoutingKeys: {
|
|
|
15
22
|
readonly ORDER_FINALIZED: "procurement.order.finalized";
|
|
16
23
|
readonly ORDER_CHECK_PASSED: "procurement.order.check.passed";
|
|
17
24
|
};
|
|
25
|
+
readonly "im.procurement.order.dlx": {
|
|
26
|
+
readonly ORDER_DELIVERED: "procurement.order.delivered.dlq";
|
|
27
|
+
readonly RETURN_APPROVED: "procurement.order.return.approved.dlq";
|
|
28
|
+
readonly ORDER_FINALIZED: "procurement.order.finalized.dlq";
|
|
29
|
+
readonly ORDER_CHECK_PASSED: "procurement.order.check.passed.dlq";
|
|
30
|
+
};
|
|
18
31
|
readonly "im.inventory": {
|
|
19
32
|
readonly INVENTORY_COUNT_CREATED: "inventory.count.created";
|
|
20
33
|
readonly INVENTORY_COUNT_DELETED: "inventory.count.deleted";
|
|
21
34
|
};
|
|
35
|
+
readonly "im.inventory.dlx": {
|
|
36
|
+
readonly INVENTORY_COUNT_CREATED: "inventory.count.created.dlq";
|
|
37
|
+
readonly INVENTORY_COUNT_DELETED: "inventory.count.deleted.dlq";
|
|
38
|
+
};
|
|
22
39
|
readonly "im.sales.order": {
|
|
23
40
|
readonly SALES_ORDER_UPSERTED: "sales.orders.upserted";
|
|
24
41
|
readonly SALES_ORDER_DELETED: "sales.order.deleted";
|
|
25
42
|
};
|
|
43
|
+
readonly "im.sales.order.dlx": {
|
|
44
|
+
readonly SALES_ORDER_UPSERTED: "sales.orders.upserted.dlq";
|
|
45
|
+
readonly SALES_ORDER_DELETED: "sales.order.deleted.dlq";
|
|
46
|
+
};
|
|
26
47
|
readonly "master.data": {
|
|
27
48
|
readonly SHOP_UPSERTED: "shop.upserted";
|
|
28
49
|
};
|
|
50
|
+
readonly "master.data.dlx": {
|
|
51
|
+
readonly SHOP_UPSERTED: "shop.upserted.dlq";
|
|
52
|
+
};
|
|
29
53
|
readonly "im.data": {
|
|
30
54
|
readonly SUPPLIER_ITEMS_UPSERTED: "supplier.items.upserted";
|
|
31
55
|
readonly SUPPLIER_ITEM_CATEGORIES_UPSERTED: "supplier.item.categories.upserted";
|
|
@@ -35,13 +59,29 @@ export declare const RoutingKeys: {
|
|
|
35
59
|
readonly SHOP_SPECIALTY_ITEM_UPSERTED: "shop.specialty.item.upserted";
|
|
36
60
|
readonly SHOP_SPECIALTY_ITEM_DELETED: "shop.specialty.item.deleted";
|
|
37
61
|
};
|
|
62
|
+
readonly "im.data.dlx": {
|
|
63
|
+
readonly SUPPLIER_ITEMS_UPSERTED: "supplier.items.upserted.dlq";
|
|
64
|
+
readonly SUPPLIER_ITEM_CATEGORIES_UPSERTED: "supplier.item.categories.upserted.dlq";
|
|
65
|
+
readonly GENERIC_ITEM_UPSERTED: "generic.item.upserted.dlq";
|
|
66
|
+
readonly GENERIC_ITEM_DELETED: "generic.item.deleted.dlq";
|
|
67
|
+
readonly FOOD_ITEM_UPSERTED: "food.item.upserted.dlq";
|
|
68
|
+
readonly SHOP_SPECIALTY_ITEM_UPSERTED: "shop.specialty.item.upserted.dlq";
|
|
69
|
+
readonly SHOP_SPECIALTY_ITEM_DELETED: "shop.specialty.item.deleted.dlq";
|
|
70
|
+
};
|
|
38
71
|
readonly "scm.data": {
|
|
39
72
|
readonly SCM_GOOD_UPSERTED: "scm.good.upserted";
|
|
40
73
|
readonly SCM_GOOD_DELETED: "scm.good.deleted";
|
|
41
74
|
};
|
|
75
|
+
readonly "scm.data.dlx": {
|
|
76
|
+
readonly SCM_GOOD_UPSERTED: "scm.good.upserted.dlq";
|
|
77
|
+
readonly SCM_GOOD_DELETED: "scm.good.deleted.dlq";
|
|
78
|
+
};
|
|
42
79
|
readonly oper_log_exchange: {
|
|
43
80
|
readonly OPER_LOG_CREATED: "oper.log.created";
|
|
44
81
|
};
|
|
82
|
+
readonly "oper_log_exchange.dlx": {
|
|
83
|
+
readonly OPER_LOG_CREATED: "oper.log.created.dlq";
|
|
84
|
+
};
|
|
45
85
|
};
|
|
46
86
|
export type RoutingKeysForExchange<E extends Exchanges> = (typeof RoutingKeys)[E][keyof (typeof RoutingKeys)[E]];
|
|
47
87
|
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;
|
|
1
|
+
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../src/messaging/topology.ts"],"names":[],"mappings":"AAA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// DLX versions
|
|
14
|
+
Exchanges["IM_PROCUREMENT_ORDER_DLX"] = "im.procurement.order.dlx";
|
|
15
|
+
Exchanges["IM_INVENTORY_DLX"] = "im.inventory.dlx";
|
|
16
|
+
Exchanges["IM_SALES_ORDER_DLX"] = "im.sales.order.dlx";
|
|
17
|
+
Exchanges["IM_DATA_DLX"] = "im.data.dlx";
|
|
18
|
+
Exchanges["MASTER_DATA_DLX"] = "master.data.dlx";
|
|
19
|
+
Exchanges["OPER_LOG_EXCHANGE_DLX"] = "oper_log_exchange.dlx";
|
|
20
|
+
Exchanges["SCM_DATA_DLX"] = "scm.data.dlx";
|
|
13
21
|
})(Exchanges || (exports.Exchanges = Exchanges = {}));
|
|
14
22
|
exports.RoutingKeys = {
|
|
15
23
|
[Exchanges.IM_PROCUREMENT_ORDER]: {
|
|
@@ -18,17 +26,34 @@ exports.RoutingKeys = {
|
|
|
18
26
|
ORDER_FINALIZED: 'procurement.order.finalized',
|
|
19
27
|
ORDER_CHECK_PASSED: 'procurement.order.check.passed',
|
|
20
28
|
},
|
|
29
|
+
[Exchanges.IM_PROCUREMENT_ORDER_DLX]: {
|
|
30
|
+
ORDER_DELIVERED: 'procurement.order.delivered.dlq',
|
|
31
|
+
RETURN_APPROVED: 'procurement.order.return.approved.dlq',
|
|
32
|
+
ORDER_FINALIZED: 'procurement.order.finalized.dlq',
|
|
33
|
+
ORDER_CHECK_PASSED: 'procurement.order.check.passed.dlq',
|
|
34
|
+
},
|
|
21
35
|
[Exchanges.IM_INVENTORY]: {
|
|
22
36
|
INVENTORY_COUNT_CREATED: 'inventory.count.created',
|
|
23
37
|
INVENTORY_COUNT_DELETED: 'inventory.count.deleted',
|
|
24
38
|
},
|
|
39
|
+
[Exchanges.IM_INVENTORY_DLX]: {
|
|
40
|
+
INVENTORY_COUNT_CREATED: 'inventory.count.created.dlq',
|
|
41
|
+
INVENTORY_COUNT_DELETED: 'inventory.count.deleted.dlq',
|
|
42
|
+
},
|
|
25
43
|
[Exchanges.IM_SALES_ORDER]: {
|
|
26
44
|
SALES_ORDER_UPSERTED: 'sales.orders.upserted',
|
|
27
45
|
SALES_ORDER_DELETED: 'sales.order.deleted',
|
|
28
46
|
},
|
|
47
|
+
[Exchanges.IM_SALES_ORDER_DLX]: {
|
|
48
|
+
SALES_ORDER_UPSERTED: 'sales.orders.upserted.dlq',
|
|
49
|
+
SALES_ORDER_DELETED: 'sales.order.deleted.dlq',
|
|
50
|
+
},
|
|
29
51
|
[Exchanges.MASTER_DATA]: {
|
|
30
52
|
SHOP_UPSERTED: 'shop.upserted',
|
|
31
53
|
},
|
|
54
|
+
[Exchanges.MASTER_DATA_DLX]: {
|
|
55
|
+
SHOP_UPSERTED: 'shop.upserted.dlq',
|
|
56
|
+
},
|
|
32
57
|
[Exchanges.IM_DATA]: {
|
|
33
58
|
SUPPLIER_ITEMS_UPSERTED: 'supplier.items.upserted',
|
|
34
59
|
SUPPLIER_ITEM_CATEGORIES_UPSERTED: 'supplier.item.categories.upserted',
|
|
@@ -38,14 +63,29 @@ exports.RoutingKeys = {
|
|
|
38
63
|
SHOP_SPECIALTY_ITEM_UPSERTED: 'shop.specialty.item.upserted',
|
|
39
64
|
SHOP_SPECIALTY_ITEM_DELETED: 'shop.specialty.item.deleted',
|
|
40
65
|
},
|
|
66
|
+
[Exchanges.IM_DATA_DLX]: {
|
|
67
|
+
SUPPLIER_ITEMS_UPSERTED: 'supplier.items.upserted.dlq',
|
|
68
|
+
SUPPLIER_ITEM_CATEGORIES_UPSERTED: 'supplier.item.categories.upserted.dlq',
|
|
69
|
+
GENERIC_ITEM_UPSERTED: 'generic.item.upserted.dlq',
|
|
70
|
+
GENERIC_ITEM_DELETED: 'generic.item.deleted.dlq',
|
|
71
|
+
FOOD_ITEM_UPSERTED: 'food.item.upserted.dlq',
|
|
72
|
+
SHOP_SPECIALTY_ITEM_UPSERTED: 'shop.specialty.item.upserted.dlq',
|
|
73
|
+
SHOP_SPECIALTY_ITEM_DELETED: 'shop.specialty.item.deleted.dlq',
|
|
74
|
+
},
|
|
41
75
|
[Exchanges.SCM_DATA]: {
|
|
42
76
|
SCM_GOOD_UPSERTED: 'scm.good.upserted',
|
|
43
77
|
SCM_GOOD_DELETED: 'scm.good.deleted',
|
|
44
78
|
},
|
|
79
|
+
[Exchanges.SCM_DATA_DLX]: {
|
|
80
|
+
SCM_GOOD_UPSERTED: 'scm.good.upserted.dlq',
|
|
81
|
+
SCM_GOOD_DELETED: 'scm.good.deleted.dlq',
|
|
82
|
+
},
|
|
45
83
|
[Exchanges.OPER_LOG_EXCHANGE]: {
|
|
46
|
-
// Add your oper log routing keys here
|
|
47
84
|
OPER_LOG_CREATED: 'oper.log.created',
|
|
48
85
|
},
|
|
86
|
+
[Exchanges.OPER_LOG_EXCHANGE_DLX]: {
|
|
87
|
+
OPER_LOG_CREATED: 'oper.log.created.dlq',
|
|
88
|
+
},
|
|
49
89
|
};
|
|
50
90
|
exports.ExchangeTypes = {
|
|
51
91
|
[Exchanges.IM_PROCUREMENT_ORDER]: 'topic',
|
|
@@ -56,6 +96,13 @@ exports.ExchangeTypes = {
|
|
|
56
96
|
[Exchanges.OPER_LOG_EXCHANGE]: 'direct',
|
|
57
97
|
[Exchanges.IM_SALES_ORDER]: 'topic',
|
|
58
98
|
[Exchanges.SCM_DATA]: 'topic',
|
|
99
|
+
[Exchanges.IM_PROCUREMENT_ORDER_DLX]: 'topic',
|
|
100
|
+
[Exchanges.IM_INVENTORY_DLX]: 'topic',
|
|
101
|
+
[Exchanges.IM_SALES_ORDER_DLX]: 'topic',
|
|
102
|
+
[Exchanges.IM_DATA_DLX]: 'topic',
|
|
103
|
+
[Exchanges.MASTER_DATA_DLX]: 'topic',
|
|
104
|
+
[Exchanges.OPER_LOG_EXCHANGE_DLX]: 'topic',
|
|
105
|
+
[Exchanges.SCM_DATA_DLX]: 'topic',
|
|
59
106
|
};
|
|
60
107
|
exports.ExchangeOptions = {
|
|
61
108
|
[Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
|
|
@@ -65,6 +112,13 @@ exports.ExchangeOptions = {
|
|
|
65
112
|
[Exchanges.OPER_LOG_EXCHANGE]: { durable: true, messageTtl: 86400000 },
|
|
66
113
|
[Exchanges.IM_SALES_ORDER]: { durable: true },
|
|
67
114
|
[Exchanges.SCM_DATA]: { durable: true },
|
|
115
|
+
[Exchanges.IM_PROCUREMENT_ORDER_DLX]: { durable: true },
|
|
116
|
+
[Exchanges.IM_INVENTORY_DLX]: { durable: true },
|
|
117
|
+
[Exchanges.IM_SALES_ORDER_DLX]: { durable: true },
|
|
118
|
+
[Exchanges.IM_DATA_DLX]: { durable: true },
|
|
119
|
+
[Exchanges.MASTER_DATA_DLX]: { durable: true },
|
|
120
|
+
[Exchanges.OPER_LOG_EXCHANGE_DLX]: { durable: true },
|
|
121
|
+
[Exchanges.SCM_DATA_DLX]: { durable: true },
|
|
68
122
|
};
|
|
69
123
|
const q = (service, rk) => `q.${rk}.${service}`; // e.g. q.procurement.order.delivered.imjobs
|
|
70
124
|
exports.q = q;
|