@saihu/common 1.1.96 → 1.1.98
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.
- package/dist/dto/index.d.ts +1 -0
- package/dist/dto/index.d.ts.map +1 -1
- package/dist/dto/index.js +1 -0
- package/dist/dto/page.dto.d.ts +15 -0
- package/dist/dto/page.dto.d.ts.map +1 -0
- package/dist/dto/page.dto.js +46 -0
- package/dist/messaging/topology.d.ts +4 -8
- package/dist/messaging/topology.d.ts.map +1 -1
- package/dist/messaging/topology.js +4 -12
- package/package.json +1 -1
package/dist/dto/index.d.ts
CHANGED
package/dist/dto/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
package/dist/dto/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class PageQueryDto {
|
|
2
|
+
page: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class PageMetaDto {
|
|
6
|
+
itemCount: number;
|
|
7
|
+
pageCount: number;
|
|
8
|
+
page: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class PagedResultDto<T> {
|
|
12
|
+
meta: PageMetaDto;
|
|
13
|
+
items: T[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=page.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.dto.d.ts","sourceRoot":"","sources":["../../src/dto/page.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,YAAY;IAMvB,IAAI,EAAE,MAAM,CAAK;IAQjB,QAAQ,EAAE,MAAM,CAAM;CACvB;AAED,qBAAa,WAAW;IAEtB,SAAS,EAAG,MAAM,CAAC;IAGnB,SAAS,EAAG,MAAM,CAAC;IAGnB,IAAI,EAAG,MAAM,CAAC;IAEd,QAAQ,EAAG,MAAM,CAAC;CAInB;AAED,qBAAa,cAAc,CAAC,CAAC;IAC3B,IAAI,EAAG,WAAW,CAAC;IAInB,KAAK,EAAG,CAAC,EAAE,CAAC;CACb"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PagedResultDto = exports.PageMetaDto = exports.PageQueryDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class PageQueryDto {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.page = 1;
|
|
18
|
+
this.pageSize = 10;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.PageQueryDto = PageQueryDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
25
|
+
(0, class_validator_1.IsInt)(),
|
|
26
|
+
(0, class_validator_1.Min)(1)
|
|
27
|
+
// Renamed from pageNo to page for simplicity, or pageNumber for explicitness
|
|
28
|
+
,
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], PageQueryDto.prototype, "page", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
34
|
+
(0, class_validator_1.IsInt)(),
|
|
35
|
+
(0, class_validator_1.Min)(1),
|
|
36
|
+
(0, class_validator_1.Max)(100)
|
|
37
|
+
// pageSize is excellent; it clearly indicates the limit
|
|
38
|
+
,
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], PageQueryDto.prototype, "pageSize", void 0);
|
|
41
|
+
class PageMetaDto {
|
|
42
|
+
}
|
|
43
|
+
exports.PageMetaDto = PageMetaDto;
|
|
44
|
+
class PagedResultDto {
|
|
45
|
+
}
|
|
46
|
+
exports.PagedResultDto = PagedResultDto;
|
|
@@ -4,7 +4,6 @@ export declare enum Exchanges {
|
|
|
4
4
|
IM_INVENTORY = "im.inventory",
|
|
5
5
|
IM_SALES_ORDER = "im.sales.order",
|
|
6
6
|
IM_DATA = "im.data",
|
|
7
|
-
MASTER_DATA = "master.data",
|
|
8
7
|
OPER_LOG_EXCHANGE = "oper_log_exchange",
|
|
9
8
|
SCM_DATA = "scm.data",
|
|
10
9
|
SCM_PROCUREMENT_ORDER = "scm.procurement.order",
|
|
@@ -13,7 +12,6 @@ export declare enum Exchanges {
|
|
|
13
12
|
IM_INVENTORY_DLX = "im.inventory.dlx",
|
|
14
13
|
IM_SALES_ORDER_DLX = "im.sales.order.dlx",
|
|
15
14
|
IM_DATA_DLX = "im.data.dlx",
|
|
16
|
-
MASTER_DATA_DLX = "master.data.dlx",
|
|
17
15
|
OPER_LOG_EXCHANGE_DLX = "oper_log_exchange.dlx",
|
|
18
16
|
SCM_DATA_DLX = "scm.data.dlx",
|
|
19
17
|
SCM_PROCUREMENT_ORDER_DLX = "scm.procurement.order.dlx",
|
|
@@ -56,12 +54,6 @@ export declare const RoutingKeys: {
|
|
|
56
54
|
readonly SALES_ORDER_UPSERTED: "sales.orders.upserted.dlq";
|
|
57
55
|
readonly SALES_ORDER_DELETED: "sales.order.deleted.dlq";
|
|
58
56
|
};
|
|
59
|
-
readonly "master.data": {
|
|
60
|
-
readonly SHOP_UPSERTED: "shop.upserted";
|
|
61
|
-
};
|
|
62
|
-
readonly "master.data.dlx": {
|
|
63
|
-
readonly SHOP_UPSERTED: "shop.upserted.dlq";
|
|
64
|
-
};
|
|
65
57
|
readonly "im.data": {
|
|
66
58
|
readonly SUPPLIER_ITEMS_UPSERTED: "supplier.items.upserted";
|
|
67
59
|
readonly SUPPLIER_ITEM_CATEGORIES_UPSERTED: "supplier.item.categories.upserted";
|
|
@@ -70,6 +62,8 @@ export declare const RoutingKeys: {
|
|
|
70
62
|
readonly FOOD_ITEM_UPSERTED: "food.item.upserted";
|
|
71
63
|
readonly SHOP_SPECIALTY_ITEM_UPSERTED: "shop.specialty.item.upserted";
|
|
72
64
|
readonly SHOP_SPECIALTY_ITEM_DELETED: "shop.specialty.item.deleted";
|
|
65
|
+
readonly IM_SHOP_UPSERTED: "im.shop.upserted";
|
|
66
|
+
readonly IM_SHOP_DELETED: "im.shop.deleted";
|
|
73
67
|
};
|
|
74
68
|
readonly "im.data.dlx": {
|
|
75
69
|
readonly SUPPLIER_ITEMS_UPSERTED: "supplier.items.upserted.dlq";
|
|
@@ -83,6 +77,8 @@ export declare const RoutingKeys: {
|
|
|
83
77
|
readonly "scm.data": {
|
|
84
78
|
readonly SCM_GOOD_UPSERTED: "scm.good.upserted";
|
|
85
79
|
readonly SCM_GOOD_DELETED: "scm.good.deleted";
|
|
80
|
+
readonly SCM_SHOP_UPSERTED: "scm.shop.upserted";
|
|
81
|
+
readonly SCM_SHOP_DELETED: "scm.shop.deleted";
|
|
86
82
|
};
|
|
87
83
|
readonly "scm.data.dlx": {
|
|
88
84
|
readonly SCM_GOOD_UPSERTED: "scm.good.upserted.dlq";
|
|
@@ -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,
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Fd,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,CAmBzD,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,CAkBF,CAAC;AAEF,eAAO,MAAM,CAAC,GAAI,SAAS,MAAM,EAAE,IAAI,MAAM,WAAyB,CAAC"}
|
|
@@ -7,7 +7,6 @@ var Exchanges;
|
|
|
7
7
|
Exchanges["IM_INVENTORY"] = "im.inventory";
|
|
8
8
|
Exchanges["IM_SALES_ORDER"] = "im.sales.order";
|
|
9
9
|
Exchanges["IM_DATA"] = "im.data";
|
|
10
|
-
Exchanges["MASTER_DATA"] = "master.data";
|
|
11
10
|
Exchanges["OPER_LOG_EXCHANGE"] = "oper_log_exchange";
|
|
12
11
|
Exchanges["SCM_DATA"] = "scm.data";
|
|
13
12
|
Exchanges["SCM_PROCUREMENT_ORDER"] = "scm.procurement.order";
|
|
@@ -17,7 +16,6 @@ var Exchanges;
|
|
|
17
16
|
Exchanges["IM_INVENTORY_DLX"] = "im.inventory.dlx";
|
|
18
17
|
Exchanges["IM_SALES_ORDER_DLX"] = "im.sales.order.dlx";
|
|
19
18
|
Exchanges["IM_DATA_DLX"] = "im.data.dlx";
|
|
20
|
-
Exchanges["MASTER_DATA_DLX"] = "master.data.dlx";
|
|
21
19
|
Exchanges["OPER_LOG_EXCHANGE_DLX"] = "oper_log_exchange.dlx";
|
|
22
20
|
Exchanges["SCM_DATA_DLX"] = "scm.data.dlx";
|
|
23
21
|
Exchanges["SCM_PROCUREMENT_ORDER_DLX"] = "scm.procurement.order.dlx";
|
|
@@ -60,12 +58,6 @@ exports.RoutingKeys = {
|
|
|
60
58
|
SALES_ORDER_UPSERTED: 'sales.orders.upserted.dlq',
|
|
61
59
|
SALES_ORDER_DELETED: 'sales.order.deleted.dlq',
|
|
62
60
|
},
|
|
63
|
-
[Exchanges.MASTER_DATA]: {
|
|
64
|
-
SHOP_UPSERTED: 'shop.upserted',
|
|
65
|
-
},
|
|
66
|
-
[Exchanges.MASTER_DATA_DLX]: {
|
|
67
|
-
SHOP_UPSERTED: 'shop.upserted.dlq',
|
|
68
|
-
},
|
|
69
61
|
[Exchanges.IM_DATA]: {
|
|
70
62
|
SUPPLIER_ITEMS_UPSERTED: 'supplier.items.upserted',
|
|
71
63
|
SUPPLIER_ITEM_CATEGORIES_UPSERTED: 'supplier.item.categories.upserted',
|
|
@@ -74,6 +66,8 @@ exports.RoutingKeys = {
|
|
|
74
66
|
FOOD_ITEM_UPSERTED: 'food.item.upserted',
|
|
75
67
|
SHOP_SPECIALTY_ITEM_UPSERTED: 'shop.specialty.item.upserted',
|
|
76
68
|
SHOP_SPECIALTY_ITEM_DELETED: 'shop.specialty.item.deleted',
|
|
69
|
+
IM_SHOP_UPSERTED: 'im.shop.upserted',
|
|
70
|
+
IM_SHOP_DELETED: 'im.shop.deleted',
|
|
77
71
|
},
|
|
78
72
|
[Exchanges.IM_DATA_DLX]: {
|
|
79
73
|
SUPPLIER_ITEMS_UPSERTED: 'supplier.items.upserted.dlq',
|
|
@@ -87,6 +81,8 @@ exports.RoutingKeys = {
|
|
|
87
81
|
[Exchanges.SCM_DATA]: {
|
|
88
82
|
SCM_GOOD_UPSERTED: 'scm.good.upserted',
|
|
89
83
|
SCM_GOOD_DELETED: 'scm.good.deleted',
|
|
84
|
+
SCM_SHOP_UPSERTED: 'scm.shop.upserted',
|
|
85
|
+
SCM_SHOP_DELETED: 'scm.shop.deleted',
|
|
90
86
|
},
|
|
91
87
|
[Exchanges.SCM_DATA_DLX]: {
|
|
92
88
|
SCM_GOOD_UPSERTED: 'scm.good.upserted.dlq',
|
|
@@ -124,7 +120,6 @@ exports.ExchangeTypes = {
|
|
|
124
120
|
// [Ex]
|
|
125
121
|
[Exchanges.IM_DATA]: 'topic',
|
|
126
122
|
[Exchanges.IM_INVENTORY]: 'topic',
|
|
127
|
-
[Exchanges.MASTER_DATA]: 'topic',
|
|
128
123
|
[Exchanges.OPER_LOG_EXCHANGE]: 'topic',
|
|
129
124
|
[Exchanges.IM_SALES_ORDER]: 'topic',
|
|
130
125
|
[Exchanges.SCM_DATA]: 'topic',
|
|
@@ -134,7 +129,6 @@ exports.ExchangeTypes = {
|
|
|
134
129
|
[Exchanges.IM_INVENTORY_DLX]: 'topic',
|
|
135
130
|
[Exchanges.IM_SALES_ORDER_DLX]: 'topic',
|
|
136
131
|
[Exchanges.IM_DATA_DLX]: 'topic',
|
|
137
|
-
[Exchanges.MASTER_DATA_DLX]: 'topic',
|
|
138
132
|
[Exchanges.OPER_LOG_EXCHANGE_DLX]: 'topic',
|
|
139
133
|
[Exchanges.SCM_DATA_DLX]: 'topic',
|
|
140
134
|
[Exchanges.SCM_PROCUREMENT_ORDER_DLX]: 'topic',
|
|
@@ -144,7 +138,6 @@ exports.ExchangeOptions = {
|
|
|
144
138
|
[Exchanges.IM_PROCUREMENT_ORDER]: { durable: true },
|
|
145
139
|
[Exchanges.IM_INVENTORY]: { durable: true },
|
|
146
140
|
[Exchanges.IM_DATA]: { durable: true },
|
|
147
|
-
[Exchanges.MASTER_DATA]: { durable: true },
|
|
148
141
|
[Exchanges.OPER_LOG_EXCHANGE]: { durable: true, messageTtl: 86400000 },
|
|
149
142
|
[Exchanges.IM_SALES_ORDER]: { durable: true },
|
|
150
143
|
[Exchanges.SCM_DATA]: { durable: true },
|
|
@@ -155,7 +148,6 @@ exports.ExchangeOptions = {
|
|
|
155
148
|
[Exchanges.IM_INVENTORY_DLX]: { durable: true },
|
|
156
149
|
[Exchanges.IM_SALES_ORDER_DLX]: { durable: true },
|
|
157
150
|
[Exchanges.IM_DATA_DLX]: { durable: true },
|
|
158
|
-
[Exchanges.MASTER_DATA_DLX]: { durable: true },
|
|
159
151
|
[Exchanges.OPER_LOG_EXCHANGE_DLX]: { durable: true },
|
|
160
152
|
[Exchanges.SCM_DATA_DLX]: { durable: true },
|
|
161
153
|
[Exchanges.SCM_PROCUREMENT_ORDER_DLX]: { durable: true },
|