@saihu/common 1.1.33 → 1.1.34
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,6 +1,7 @@
|
|
|
1
1
|
export type ExchangeType = 'topic' | 'direct' | 'fanout' | 'headers';
|
|
2
2
|
export declare enum Exchanges {
|
|
3
3
|
IM_PROCUREMENT_ORDER = "im.procurement.order",
|
|
4
|
+
IM_SUPPLIER_ITEM = "im.supplier.item",
|
|
4
5
|
SHOP = "shop",
|
|
5
6
|
OPER_LOG_EXCHANGE = "oper_log_exchange"
|
|
6
7
|
}
|
|
@@ -12,6 +13,9 @@ export declare const RoutingKeys: {
|
|
|
12
13
|
readonly shop: {
|
|
13
14
|
readonly SHOP_CREATED: "shop.created";
|
|
14
15
|
};
|
|
16
|
+
readonly "im.supplier.item": {
|
|
17
|
+
readonly SUPPLIER_ITEM_UPDATED: "supplier.item.updated";
|
|
18
|
+
};
|
|
15
19
|
readonly oper_log_exchange: {};
|
|
16
20
|
};
|
|
17
21
|
export type RoutingKeysForExchange<E extends Exchanges> = (typeof RoutingKeys)[E][keyof (typeof RoutingKeys)[E]];
|
|
@@ -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,IAAI,SAAS;IACb,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,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb,iBAAiB,sBAAsB;CACxC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;CAcd,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;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAM/D,CAAC;AAEF,eAAO,MAAM,CAAC,GAAI,SAAS,MAAM,EAAE,IAAI,MAAM,WAAyB,CAAC"}
|
|
@@ -4,6 +4,7 @@ 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["IM_SUPPLIER_ITEM"] = "im.supplier.item";
|
|
7
8
|
Exchanges["SHOP"] = "shop";
|
|
8
9
|
Exchanges["OPER_LOG_EXCHANGE"] = "oper_log_exchange";
|
|
9
10
|
})(Exchanges || (exports.Exchanges = Exchanges = {}));
|
|
@@ -15,6 +16,9 @@ exports.RoutingKeys = {
|
|
|
15
16
|
[Exchanges.SHOP]: {
|
|
16
17
|
SHOP_CREATED: 'shop.created',
|
|
17
18
|
},
|
|
19
|
+
[Exchanges.IM_SUPPLIER_ITEM]: {
|
|
20
|
+
SUPPLIER_ITEM_UPDATED: 'supplier.item.updated',
|
|
21
|
+
},
|
|
18
22
|
[Exchanges.OPER_LOG_EXCHANGE]: {
|
|
19
23
|
// Add your oper log routing keys here
|
|
20
24
|
},
|
|
@@ -23,11 +27,13 @@ exports.ExchangeTypes = {
|
|
|
23
27
|
[Exchanges.IM_PROCUREMENT_ORDER]: 'topic',
|
|
24
28
|
[Exchanges.SHOP]: 'topic',
|
|
25
29
|
[Exchanges.OPER_LOG_EXCHANGE]: 'direct',
|
|
30
|
+
[Exchanges.IM_SUPPLIER_ITEM]: 'topic',
|
|
26
31
|
};
|
|
27
32
|
exports.ExchangeOptions = {
|
|
28
33
|
[Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
|
|
29
34
|
[Exchanges.SHOP]: { durable: true },
|
|
30
35
|
[Exchanges.OPER_LOG_EXCHANGE]: { durable: true },
|
|
36
|
+
[Exchanges.IM_SUPPLIER_ITEM]: { durable: true },
|
|
31
37
|
};
|
|
32
38
|
const q = (service, rk) => `q.${rk}.${service}`; // e.g. q.procurement.order.delivered.imjobs
|
|
33
39
|
exports.q = q;
|