synunu-libs 1.0.23 → 1.0.25

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.
@@ -7,16 +7,18 @@ export declare class ProductOptionInput {
7
7
  export declare class CreateProductInput {
8
8
  name: string;
9
9
  alias?: string;
10
- meta_title?: string;
11
- meta_description?: string;
12
- published_on?: Date;
13
- template_layout?: string;
10
+ vendor?: string;
11
+ productType?: string;
12
+ metaTitle?: string;
13
+ metaDescription?: string;
14
+ publishedOn?: Date;
15
+ templateLayout?: string;
14
16
  content?: string;
15
17
  tags?: string[];
16
18
  images?: string[];
17
19
  variants: CreateVariantInput[];
18
20
  options: ProductOptionInput[];
19
- default_variant_unit?: string;
21
+ defaultVariantUnit?: string;
20
22
  }
21
23
  export declare class ProductFilterInput {
22
24
  createdAt?: DateRangeInput;
@@ -1 +1 @@
1
- {"version":3,"file":"product.dto.d.ts","sourceRoot":"","sources":["../../src/dto/product.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,qBACa,kBAAkB;IAE7B,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,qBACa,kBAAkB;IAE7B,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,YAAY,CAAC,EAAE,IAAI,CAAC;IAGpB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAGhB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAGlB,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAG/B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAG9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBACa,kBAAkB;IAE7B,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;;AAED,qBACa,kBAAmB,SAAQ,uBAA+B;IAErE,GAAG,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"product.dto.d.ts","sourceRoot":"","sources":["../../src/dto/product.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,qBACa,kBAAkB;IAE7B,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,qBACa,kBAAkB;IAE7B,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,WAAW,CAAC,EAAE,IAAI,CAAC;IAGnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAGhB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAGlB,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAG/B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAG9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBACa,kBAAkB;IAE7B,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;;AAED,qBACa,kBAAmB,SAAQ,uBAA+B;IAErE,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -41,29 +41,37 @@ __decorate([
41
41
  __decorate([
42
42
  (0, graphql_1.Field)({ nullable: true }),
43
43
  __metadata("design:type", String)
44
- ], CreateProductInput.prototype, "meta_title", void 0);
44
+ ], CreateProductInput.prototype, "vendor", void 0);
45
45
  __decorate([
46
46
  (0, graphql_1.Field)({ nullable: true }),
47
47
  __metadata("design:type", String)
48
- ], CreateProductInput.prototype, "meta_description", void 0);
48
+ ], CreateProductInput.prototype, "productType", void 0);
49
+ __decorate([
50
+ (0, graphql_1.Field)({ nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], CreateProductInput.prototype, "metaTitle", void 0);
53
+ __decorate([
54
+ (0, graphql_1.Field)({ nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], CreateProductInput.prototype, "metaDescription", void 0);
49
57
  __decorate([
50
58
  (0, graphql_1.Field)({ nullable: true }),
51
59
  __metadata("design:type", Date)
52
- ], CreateProductInput.prototype, "published_on", void 0);
60
+ ], CreateProductInput.prototype, "publishedOn", void 0);
53
61
  __decorate([
54
62
  (0, graphql_1.Field)({ nullable: true }),
55
63
  __metadata("design:type", String)
56
- ], CreateProductInput.prototype, "template_layout", void 0);
64
+ ], CreateProductInput.prototype, "templateLayout", void 0);
57
65
  __decorate([
58
66
  (0, graphql_1.Field)({ nullable: true }),
59
67
  __metadata("design:type", String)
60
68
  ], CreateProductInput.prototype, "content", void 0);
61
69
  __decorate([
62
- (0, graphql_1.Field)(() => [String], { nullable: "itemsAndList" }),
70
+ (0, graphql_1.Field)(() => [String], { nullable: true }),
63
71
  __metadata("design:type", Array)
64
72
  ], CreateProductInput.prototype, "tags", void 0);
65
73
  __decorate([
66
- (0, graphql_1.Field)(() => [String], { nullable: "itemsAndList" }),
74
+ (0, graphql_1.Field)(() => [String], { nullable: true }),
67
75
  __metadata("design:type", Array)
68
76
  ], CreateProductInput.prototype, "images", void 0);
69
77
  __decorate([
@@ -77,7 +85,7 @@ __decorate([
77
85
  __decorate([
78
86
  (0, graphql_1.Field)({ nullable: true }),
79
87
  __metadata("design:type", String)
80
- ], CreateProductInput.prototype, "default_variant_unit", void 0);
88
+ ], CreateProductInput.prototype, "defaultVariantUnit", void 0);
81
89
  exports.CreateProductInput = CreateProductInput = __decorate([
82
90
  (0, graphql_1.InputType)()
83
91
  ], CreateProductInput);
@@ -1 +1 @@
1
- {"version":3,"file":"product.dto.js","sourceRoot":"","sources":["../../src/dto/product.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAgE;AAGhE,yDAAoD;AACpD,+CAAmD;AAG5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAM9B,CAAA;AANY,gDAAkB;AAE7B;IADC,IAAA,eAAK,GAAE;;gDACK;AAGb;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;;kDACL;6BALN,kBAAkB;IAD9B,IAAA,mBAAS,GAAE;GACC,kBAAkB,CAM9B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAoC9B,CAAA;AApCY,gDAAkB;AAE7B;IADC,IAAA,eAAK,GAAE;;gDACK;AAGb;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACX;AAGf;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACN;AAGpB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACA;AAG1B;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACX,IAAI;wDAAC;AAGpB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACD;AAGzB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;AAGjB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;;gDACpC;AAGhB;IADC,IAAA,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C;;8DACE;6BAzCjB,kBAAkB;IAD9B,IAAA,mBAAS,GAAE;GACC,kBAAkB,CA0C9B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAG9B,CAAA;AAHY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,iCAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACpC,iCAAc;qDAAC;6BAFhB,kBAAkB;IAD9B,IAAA,mBAAS,GAAE;GACC,kBAAkB,CAG9B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,IAAA,qBAAW,EAAC,kBAAkB,CAAC;CAGtE,CAAA;AAHY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;+CACR;6BAFD,kBAAkB;IAD9B,IAAA,mBAAS,GAAE;GACC,kBAAkB,CAG9B"}
@@ -1,29 +1,30 @@
1
1
  import { DateRangeInput } from "./date-range.input";
2
2
  export declare class InventoryQuantityInput {
3
- location_id: number;
4
- on_hand: number;
3
+ locationId: number;
4
+ onHand: number;
5
5
  available: number;
6
+ storageLocation?: string;
6
7
  }
7
8
  export declare class CreateVariantInput {
8
9
  barcode?: string;
9
10
  sku: string;
10
11
  price: number;
11
- compare_at_price?: number;
12
+ compareAtPrice?: number;
13
+ costPrice?: number;
12
14
  option1?: string;
13
15
  option2?: string;
14
16
  option3?: string;
15
17
  taxable: boolean;
16
- inventory_management?: string;
17
- inventory_policy?: string;
18
- lot_management?: boolean;
19
- alert_before_expired_in_day?: number;
20
- requires_shipping?: boolean;
21
- weight_unit?: string;
18
+ inventoryManagement?: string;
19
+ inventoryPolicy?: string;
20
+ lotManagement?: boolean;
21
+ alertBeforeExpiredInDay?: number;
22
+ requiresShipping?: boolean;
23
+ weightUnit?: string;
22
24
  weight?: number;
23
25
  unit?: string;
24
- inventory_quantities: InventoryQuantityInput[];
25
- cost_price?: number;
26
- local_status?: string;
26
+ inventoryQuantities: InventoryQuantityInput[];
27
+ localStatus?: string;
27
28
  type?: string;
28
29
  uuid: string;
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"variant.dto.d.ts","sourceRoot":"","sources":["../../src/dto/variant.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBACa,sBAAsB;IAEjC,WAAW,EAAE,MAAM,CAAC;IAGpB,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBACa,kBAAkB;IAE7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAC;IAGd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAE,OAAO,CAAC;IAGjB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAG9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAGrC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAG5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,oBAAoB,EAAE,sBAAsB,EAAE,CAAC;IAG/C,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBACa,kBAAkB;IAE7B,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;;AAED,qBACa,kBAAmB,SAAQ,u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AAG,EAAE,MAAM,CAAC;CACb"}
@@ -18,15 +18,19 @@ exports.InventoryQuantityInput = InventoryQuantityInput;
18
18
  __decorate([
19
19
  (0, graphql_1.Field)(() => graphql_1.Float),
20
20
  __metadata("design:type", Number)
21
- ], InventoryQuantityInput.prototype, "location_id", void 0);
21
+ ], InventoryQuantityInput.prototype, "locationId", void 0);
22
22
  __decorate([
23
23
  (0, graphql_1.Field)(() => graphql_1.Float),
24
24
  __metadata("design:type", Number)
25
- ], InventoryQuantityInput.prototype, "on_hand", void 0);
25
+ ], InventoryQuantityInput.prototype, "onHand", void 0);
26
26
  __decorate([
27
27
  (0, graphql_1.Field)(() => graphql_1.Float),
28
28
  __metadata("design:type", Number)
29
29
  ], InventoryQuantityInput.prototype, "available", void 0);
30
+ __decorate([
31
+ (0, graphql_1.Field)({ nullable: true }),
32
+ __metadata("design:type", String)
33
+ ], InventoryQuantityInput.prototype, "storageLocation", void 0);
30
34
  exports.InventoryQuantityInput = InventoryQuantityInput = __decorate([
31
35
  (0, graphql_1.InputType)()
32
36
  ], InventoryQuantityInput);
@@ -48,7 +52,11 @@ __decorate([
48
52
  __decorate([
49
53
  (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true }),
50
54
  __metadata("design:type", Number)
51
- ], CreateVariantInput.prototype, "compare_at_price", void 0);
55
+ ], CreateVariantInput.prototype, "compareAtPrice", void 0);
56
+ __decorate([
57
+ (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true }),
58
+ __metadata("design:type", Number)
59
+ ], CreateVariantInput.prototype, "costPrice", void 0);
52
60
  __decorate([
53
61
  (0, graphql_1.Field)({ nullable: true }),
54
62
  __metadata("design:type", String)
@@ -68,27 +76,27 @@ __decorate([
68
76
  __decorate([
69
77
  (0, graphql_1.Field)({ nullable: true }),
70
78
  __metadata("design:type", String)
71
- ], CreateVariantInput.prototype, "inventory_management", void 0);
79
+ ], CreateVariantInput.prototype, "inventoryManagement", void 0);
72
80
  __decorate([
73
81
  (0, graphql_1.Field)({ nullable: true }),
74
82
  __metadata("design:type", String)
75
- ], CreateVariantInput.prototype, "inventory_policy", void 0);
83
+ ], CreateVariantInput.prototype, "inventoryPolicy", void 0);
76
84
  __decorate([
77
85
  (0, graphql_1.Field)({ nullable: true }),
78
86
  __metadata("design:type", Boolean)
79
- ], CreateVariantInput.prototype, "lot_management", void 0);
87
+ ], CreateVariantInput.prototype, "lotManagement", void 0);
80
88
  __decorate([
81
89
  (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true }),
82
90
  __metadata("design:type", Number)
83
- ], CreateVariantInput.prototype, "alert_before_expired_in_day", void 0);
91
+ ], CreateVariantInput.prototype, "alertBeforeExpiredInDay", void 0);
84
92
  __decorate([
85
93
  (0, graphql_1.Field)({ nullable: true }),
86
94
  __metadata("design:type", Boolean)
87
- ], CreateVariantInput.prototype, "requires_shipping", void 0);
95
+ ], CreateVariantInput.prototype, "requiresShipping", void 0);
88
96
  __decorate([
89
97
  (0, graphql_1.Field)({ nullable: true }),
90
98
  __metadata("design:type", String)
91
- ], CreateVariantInput.prototype, "weight_unit", void 0);
99
+ ], CreateVariantInput.prototype, "weightUnit", void 0);
92
100
  __decorate([
93
101
  (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true }),
94
102
  __metadata("design:type", Number)
@@ -100,15 +108,11 @@ __decorate([
100
108
  __decorate([
101
109
  (0, graphql_1.Field)(() => [InventoryQuantityInput]),
102
110
  __metadata("design:type", Array)
103
- ], CreateVariantInput.prototype, "inventory_quantities", void 0);
104
- __decorate([
105
- (0, graphql_1.Field)(() => graphql_1.Float, { nullable: true }),
106
- __metadata("design:type", Number)
107
- ], CreateVariantInput.prototype, "cost_price", void 0);
111
+ ], CreateVariantInput.prototype, "inventoryQuantities", void 0);
108
112
  __decorate([
109
113
  (0, graphql_1.Field)({ nullable: true }),
110
114
  __metadata("design:type", String)
111
- ], CreateVariantInput.prototype, "local_status", void 0);
115
+ ], CreateVariantInput.prototype, "localStatus", void 0);
112
116
  __decorate([
113
117
  (0, graphql_1.Field)({ nullable: true }),
114
118
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"variant.dto.js","sourceRoot":"","sources":["../../src/dto/variant.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAuE;AAGvE,yDAAoD;AAG7C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CASlC,CAAA;AATY,wDAAsB;AAEjC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,eAAK,CAAC;;2DACC;AAGpB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,eAAK,CAAC;;uDACH;AAGhB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,eAAK,CAAC;;yDACD;iCARP,sBAAsB;IADlC,IAAA,mBAAS,GAAE;GACC,sBAAsB,CASlC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CA+D9B,CAAA;AA/DY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;AAGjB;IADC,IAAA,eAAK,GAAE;;+CACI;AAGZ;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,eAAK,CAAC;;iDACL;AAGd;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,eAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACb;AAG1B;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;AAGjB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;AAGjB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;AAGjB;IADC,IAAA,eAAK,GAAE;;mDACS;AAGjB;IADC,IAAA,eAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACI;AAG9B;IADC,IAAA,eAAK,EA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IAAA,mBAAS,GAAE;GACC,kBAAkB,CA+D9B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAG9B,CAAA;AAHY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,iCAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACpC,iCAAc;qDAAC;6BAFhB,kBAAkB;IAD9B,IAAA,mBAAS,GAAE;GACC,kBAAkB,CAG9B;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,IAAA,qBAAW,EAAC,kBAAkB,CAAC;CAGtE,CAAA;AAHY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;+CACR;6BAFD,kBAAkB;IAD9B,IAAA,mBAAS,GAAE;GACC,kBAAkB,CAG9B"}
@@ -1,2 +1,4 @@
1
1
  export * from "./time.util";
2
+ export * from "./transaction.util";
3
+ export * from "./string.utiil";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./time.util"), exports);
18
+ __exportStar(require("./transaction.util"), exports);
19
+ __exportStar(require("./string.utiil"), exports);
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,qDAAmC;AACnC,iDAA+B"}
@@ -0,0 +1,5 @@
1
+ export declare function removeVietnameseAccents(str: string, { removePunctuations }: {
2
+ removePunctuations?: boolean | undefined;
3
+ }): string;
4
+ export declare function slugify(str: string): string;
5
+ //# sourceMappingURL=string.utiil.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.utiil.d.ts","sourceRoot":"","sources":["../../src/utils/string.utiil.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,EAAE,kBAA0B,EAAE;;CAAA,UA8B/B;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,UAQlC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeVietnameseAccents = removeVietnameseAccents;
4
+ exports.slugify = slugify;
5
+ function removeVietnameseAccents(str, { removePunctuations = false }) {
6
+ str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a");
7
+ str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e");
8
+ str = str.replace(/ì|í|ị|ỉ|ĩ/g, "i");
9
+ str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o");
10
+ str = str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u");
11
+ str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y");
12
+ str = str.replace(/đ/g, "d");
13
+ str = str.replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g, "A");
14
+ str = str.replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g, "E");
15
+ str = str.replace(/Ì|Í|Ị|Ỉ|Ĩ/g, "I");
16
+ str = str.replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g, "O");
17
+ str = str.replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g, "U");
18
+ str = str.replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g, "Y");
19
+ str = str.replace(/Đ/g, "D");
20
+ // Some system encode vietnamese combining accent as individual utf-8 characters
21
+ str = str.replace(/\u0300|\u0301|\u0303|\u0309|\u0323/g, ""); // ̀ ́ ̃ ̉
22
+ str = str.replace(/\u02C6|\u0306|\u031B/g, ""); // ˆ ̆ ̛ Â, Ê, Ă, Ơ, Ư
23
+ // Remove punctuations
24
+ if (removePunctuations) {
25
+ str = str.replace(/%|\^|\*|\(|\)|\+|=|<|>|\?|\/|'|"|&|#|\[|\]|~|\$|_|`|{|}|\||\\/g, "");
26
+ }
27
+ str = str.trim();
28
+ return str;
29
+ }
30
+ function slugify(str) {
31
+ str = removeVietnameseAccents(str, { removePunctuations: true });
32
+ return str
33
+ .toLowerCase()
34
+ .replace(/\s+/g, "-")
35
+ .replace(/-+/g, "-")
36
+ .replace(/^-+|-+$/g, "");
37
+ }
38
+ //# sourceMappingURL=string.utiil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.utiil.js","sourceRoot":"","sources":["../../src/utils/string.utiil.ts"],"names":[],"mappings":";;AAAA,0DAgCC;AAED,0BAQC;AA1CD,SAAgB,uBAAuB,CACrC,GAAW,EACX,EAAE,kBAAkB,GAAG,KAAK,EAAE;IAE9B,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,oCAAoC,EAAE,GAAG,CAAC,CAAC;IAC7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CACf,gEAAgE,EAChE,EAAE,CACH,CAAC;IACJ,CAAC;IAED,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACjB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,OAAO,CAAC,GAAW;IACjC,GAAG,GAAG,uBAAuB,CAAC,GAAG,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;IAEjE,OAAO,GAAG;SACP,WAAW,EAAE;SACb,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Connection, ClientSession } from "mongoose";
2
+ export declare function withTransaction<T>(connection: Connection, session: ClientSession | undefined, handler: (s: ClientSession) => Promise<T>): Promise<T>;
3
+ //# sourceMappingURL=transaction.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.util.d.ts","sourceRoot":"","sources":["../../src/utils/transaction.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAsB,eAAe,CAAC,CAAC,EACrC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,aAAa,GAAG,SAAS,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,CAAC,CAAC,CAeZ"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withTransaction = withTransaction;
4
+ async function withTransaction(connection, session, handler) {
5
+ const ownSession = !session;
6
+ const s = session ?? (await connection.startSession());
7
+ if (ownSession)
8
+ s.startTransaction();
9
+ try {
10
+ const result = await handler(s);
11
+ if (ownSession)
12
+ await s.commitTransaction();
13
+ return result;
14
+ }
15
+ catch (err) {
16
+ if (ownSession)
17
+ await s.abortTransaction();
18
+ throw err;
19
+ }
20
+ finally {
21
+ if (ownSession)
22
+ s.endSession();
23
+ }
24
+ }
25
+ //# sourceMappingURL=transaction.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.util.js","sourceRoot":"","sources":["../../src/utils/transaction.util.ts"],"names":[],"mappings":";;AAEA,0CAmBC;AAnBM,KAAK,UAAU,eAAe,CACnC,UAAsB,EACtB,OAAkC,EAClC,OAAyC;IAEzC,MAAM,UAAU,GAAG,CAAC,OAAO,CAAC;IAC5B,MAAM,CAAC,GAAG,OAAO,IAAI,CAAC,MAAM,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;IACvD,IAAI,UAAU;QAAE,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAErC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,UAAU;YAAE,MAAM,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAC5C,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,UAAU;YAAE,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAC3C,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,IAAI,UAAU;YAAE,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synunu-libs",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Shared DTOs, constants, and utilities for Synunu microservices",
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "class-validator": "^0.14.2",
22
+ "mongoose": "^8.19.3",
22
23
  "reflect-metadata": "^0.2.2"
23
24
  },
24
25
  "peerDependencies": {