@saihu/common 1.1.99 → 1.2.1

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,8 @@ export declare enum Exchanges {
8
8
  SCM_DATA = "scm.data",
9
9
  SCM_PROCUREMENT_ORDER = "scm.procurement.order",
10
10
  SCM_SORT = "scm.sort",
11
+ SCM_JOB = "scm.job",
12
+ IM_JOB = "im.job",
11
13
  IM_PROCUREMENT_ORDER_DLX = "im.procurement.order.dlx",
12
14
  IM_INVENTORY_DLX = "im.inventory.dlx",
13
15
  IM_SALES_ORDER_DLX = "im.sales.order.dlx",
@@ -15,9 +17,23 @@ export declare enum Exchanges {
15
17
  OPER_LOG_EXCHANGE_DLX = "oper_log_exchange.dlx",
16
18
  SCM_DATA_DLX = "scm.data.dlx",
17
19
  SCM_PROCUREMENT_ORDER_DLX = "scm.procurement.order.dlx",
18
- SCM_SORT_DLX = "scm.sort.dlx"
20
+ SCM_SORT_DLX = "scm.sort.dlx",
21
+ SCM_JOB_DLX = "scm.job.dlx",
22
+ IM_JOB_DLX = "im.job.dlx"
19
23
  }
20
24
  export declare const RoutingKeys: {
25
+ readonly "im.job": {
26
+ readonly IM_EXPORT_REQUESTED: "im.export.requested";
27
+ };
28
+ readonly "im.job.dlx": {
29
+ readonly IM_EXPORT_REQUESTED: "im.export.requested.dlq";
30
+ };
31
+ readonly "scm.job": {
32
+ readonly SCM_EXPORT_REQUESTED: "scm.export.requested";
33
+ };
34
+ readonly "scm.job.dlx": {
35
+ readonly SCM_EXPORT_REQUESTED: "scm.export.requested.dlq";
36
+ };
21
37
  readonly "im.procurement.order": {
22
38
  readonly ORDER_CREATED: "procurement.order.created";
23
39
  readonly ORDER_DELIVERED: "procurement.order.delivered";
@@ -79,10 +95,20 @@ export declare const RoutingKeys: {
79
95
  readonly SCM_GOOD_DELETED: "scm.good.deleted";
80
96
  readonly SCM_SHOP_UPSERTED: "scm.shop.upserted";
81
97
  readonly SCM_SHOP_DELETED: "scm.shop.deleted";
98
+ readonly SCM_REGION_UPSERTED: "scm.region.upserted";
99
+ readonly SCM_REGION_DELETED: "scm.region.deleted";
100
+ readonly SCM_CITY_UPSERTED: "scm.city.upserted";
101
+ readonly SCM_CITY_DELETED: "scm.city.deleted";
82
102
  };
83
103
  readonly "scm.data.dlx": {
84
104
  readonly SCM_GOOD_UPSERTED: "scm.good.upserted.dlq";
85
105
  readonly SCM_GOOD_DELETED: "scm.good.deleted.dlq";
106
+ readonly SCM_SHOP_UPSERTED: "scm.shop.upserted.dlq";
107
+ readonly SCM_SHOP_DELETED: "scm.shop.deleted.dlq";
108
+ readonly SCM_REGION_UPSERTED: "scm.region.upserted.dlq";
109
+ readonly SCM_REGION_DELETED: "scm.region.deleted.dlq";
110
+ readonly SCM_CITY_UPSERTED: "scm.city.upserted.dlq";
111
+ readonly SCM_CITY_DELETED: "scm.city.deleted.dlq";
86
112
  };
87
113
  readonly "scm.procurement.order": {
88
114
  readonly SCM_PROCUREMENT_ORDER_CREATED: "scm.procurement.order.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,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,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,qBAAqB,0BAA0B;IAC/C,YAAY,iBAAiB;IAC7B,yBAAyB,8BAA8B;IACvD,YAAY,iBAAiB;CAC9B;AAED,eAAO,MAAM,WAAW;;;;;;;;;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AAU,eAAe;CAC1B;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHd,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,CAsBzD,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,CAsBF,CAAC;AAEF,eAAO,MAAM,CAAC,GAAI,SAAS,MAAM,EAAE,IAAI,MAAM,WAAyB,CAAC"}
@@ -11,6 +11,8 @@ var Exchanges;
11
11
  Exchanges["SCM_DATA"] = "scm.data";
12
12
  Exchanges["SCM_PROCUREMENT_ORDER"] = "scm.procurement.order";
13
13
  Exchanges["SCM_SORT"] = "scm.sort";
14
+ Exchanges["SCM_JOB"] = "scm.job";
15
+ Exchanges["IM_JOB"] = "im.job";
14
16
  // DLX versions
15
17
  Exchanges["IM_PROCUREMENT_ORDER_DLX"] = "im.procurement.order.dlx";
16
18
  Exchanges["IM_INVENTORY_DLX"] = "im.inventory.dlx";
@@ -20,8 +22,22 @@ var Exchanges;
20
22
  Exchanges["SCM_DATA_DLX"] = "scm.data.dlx";
21
23
  Exchanges["SCM_PROCUREMENT_ORDER_DLX"] = "scm.procurement.order.dlx";
22
24
  Exchanges["SCM_SORT_DLX"] = "scm.sort.dlx";
25
+ Exchanges["SCM_JOB_DLX"] = "scm.job.dlx";
26
+ Exchanges["IM_JOB_DLX"] = "im.job.dlx";
23
27
  })(Exchanges || (exports.Exchanges = Exchanges = {}));
24
28
  exports.RoutingKeys = {
29
+ [Exchanges.IM_JOB]: {
30
+ IM_EXPORT_REQUESTED: 'im.export.requested',
31
+ },
32
+ [Exchanges.IM_JOB_DLX]: {
33
+ IM_EXPORT_REQUESTED: 'im.export.requested.dlq',
34
+ },
35
+ [Exchanges.SCM_JOB]: {
36
+ SCM_EXPORT_REQUESTED: 'scm.export.requested',
37
+ },
38
+ [Exchanges.SCM_JOB_DLX]: {
39
+ SCM_EXPORT_REQUESTED: 'scm.export.requested.dlq',
40
+ },
25
41
  [Exchanges.IM_PROCUREMENT_ORDER]: {
26
42
  ORDER_CREATED: 'procurement.order.created',
27
43
  ORDER_DELIVERED: 'procurement.order.delivered',
@@ -83,10 +99,20 @@ exports.RoutingKeys = {
83
99
  SCM_GOOD_DELETED: 'scm.good.deleted',
84
100
  SCM_SHOP_UPSERTED: 'scm.shop.upserted',
85
101
  SCM_SHOP_DELETED: 'scm.shop.deleted',
102
+ SCM_REGION_UPSERTED: 'scm.region.upserted',
103
+ SCM_REGION_DELETED: 'scm.region.deleted',
104
+ SCM_CITY_UPSERTED: 'scm.city.upserted',
105
+ SCM_CITY_DELETED: 'scm.city.deleted',
86
106
  },
87
107
  [Exchanges.SCM_DATA_DLX]: {
88
108
  SCM_GOOD_UPSERTED: 'scm.good.upserted.dlq',
89
109
  SCM_GOOD_DELETED: 'scm.good.deleted.dlq',
110
+ SCM_SHOP_UPSERTED: 'scm.shop.upserted.dlq',
111
+ SCM_SHOP_DELETED: 'scm.shop.deleted.dlq',
112
+ SCM_REGION_UPSERTED: 'scm.region.upserted.dlq',
113
+ SCM_REGION_DELETED: 'scm.region.deleted.dlq',
114
+ SCM_CITY_UPSERTED: 'scm.city.upserted.dlq',
115
+ SCM_CITY_DELETED: 'scm.city.deleted.dlq',
90
116
  },
91
117
  [Exchanges.SCM_PROCUREMENT_ORDER]: {
92
118
  SCM_PROCUREMENT_ORDER_CREATED: 'scm.procurement.order.created',
@@ -117,7 +143,8 @@ exports.RoutingKeys = {
117
143
  };
118
144
  exports.ExchangeTypes = {
119
145
  [Exchanges.IM_PROCUREMENT_ORDER]: 'topic',
120
- // [Ex]
146
+ [Exchanges.IM_JOB]: 'topic',
147
+ [Exchanges.SCM_JOB]: 'topic',
121
148
  [Exchanges.IM_DATA]: 'topic',
122
149
  [Exchanges.IM_INVENTORY]: 'topic',
123
150
  [Exchanges.OPER_LOG_EXCHANGE]: 'topic',
@@ -133,9 +160,13 @@ exports.ExchangeTypes = {
133
160
  [Exchanges.SCM_DATA_DLX]: 'topic',
134
161
  [Exchanges.SCM_PROCUREMENT_ORDER_DLX]: 'topic',
135
162
  [Exchanges.SCM_SORT_DLX]: 'topic',
163
+ [Exchanges.IM_JOB_DLX]: 'topic',
164
+ [Exchanges.SCM_JOB_DLX]: 'topic',
136
165
  };
137
166
  exports.ExchangeOptions = {
138
167
  [Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
168
+ [Exchanges.IM_JOB]: { durable: true },
169
+ [Exchanges.SCM_JOB]: { durable: true },
139
170
  [Exchanges.IM_INVENTORY]: { durable: true },
140
171
  [Exchanges.IM_DATA]: { durable: true },
141
172
  [Exchanges.OPER_LOG_EXCHANGE]: { durable: true, messageTtl: 86400000 },
@@ -151,6 +182,8 @@ exports.ExchangeOptions = {
151
182
  [Exchanges.OPER_LOG_EXCHANGE_DLX]: { durable: true },
152
183
  [Exchanges.SCM_DATA_DLX]: { durable: true },
153
184
  [Exchanges.SCM_PROCUREMENT_ORDER_DLX]: { durable: true },
185
+ [Exchanges.IM_JOB_DLX]: { durable: true },
186
+ [Exchanges.SCM_JOB_DLX]: { durable: true },
154
187
  };
155
188
  const q = (service, rk) => `q.${rk}.${service}`; // e.g. q.procurement.order.delivered.imjobs
156
189
  exports.q = q;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saihu/common",
3
- "version": "1.1.99",
3
+ "version": "1.2.1",
4
4
  "description": "Common utilities for NestJS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",