@common_ch/common 1.0.29 → 1.0.30

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.
@@ -0,0 +1,10 @@
1
+ import { Subjects } from "../../subjects";
2
+ import { DiscountStatusEnum } from "./discount-create-event";
3
+ export interface DiscountChangeStatusEvent {
4
+ subject: Subjects.DiscountChangeStatus;
5
+ data: {
6
+ id: string;
7
+ status: DiscountStatusEnum;
8
+ version: number;
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { Subjects } from "../../subjects";
2
+ export declare enum DiscountStatusEnum {
3
+ active = "active",
4
+ deactive = "deactive"
5
+ }
6
+ export declare enum DiscountType {
7
+ percentage = "percentage",
8
+ amount = "amount"
9
+ }
10
+ export interface DiscountCreatedEvent {
11
+ subject: Subjects.DiscountCreated;
12
+ data: {
13
+ id: string;
14
+ title: string;
15
+ type: DiscountType;
16
+ amount: string;
17
+ startDate: Date;
18
+ endDate: string;
19
+ users: string[];
20
+ plan?: string[];
21
+ status: DiscountStatusEnum;
22
+ createdAt: Date;
23
+ updatedAt: Date;
24
+ };
25
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DiscountType = exports.DiscountStatusEnum = void 0;
4
+ var DiscountStatusEnum;
5
+ (function (DiscountStatusEnum) {
6
+ DiscountStatusEnum["active"] = "active";
7
+ DiscountStatusEnum["deactive"] = "deactive";
8
+ })(DiscountStatusEnum || (exports.DiscountStatusEnum = DiscountStatusEnum = {}));
9
+ var DiscountType;
10
+ (function (DiscountType) {
11
+ DiscountType["percentage"] = "percentage";
12
+ DiscountType["amount"] = "amount";
13
+ })(DiscountType || (exports.DiscountType = DiscountType = {}));
@@ -0,0 +1,17 @@
1
+ import { Subjects } from "../../subjects";
2
+ import { DiscountStatusEnum, DiscountType } from "./discount-create-event";
3
+ export interface DiscountUpdateEvent {
4
+ subject: Subjects.DiscountUpdated;
5
+ data: {
6
+ id: string;
7
+ title: string;
8
+ type: DiscountType;
9
+ amount: string;
10
+ startDate: Date;
11
+ endDate: string;
12
+ users: string[];
13
+ plan?: string[];
14
+ status: DiscountStatusEnum;
15
+ version: number;
16
+ };
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,5 +6,8 @@ export declare enum Subjects {
6
6
  AiChangeStatus = "ai:changeStatus",
7
7
  BlogCreated = "blog:created",
8
8
  BlogUpdated = "blog:updated",
9
- BlogChangeStatus = "blog:change-status"
9
+ BlogChangeStatus = "blog:change-status",
10
+ DiscountCreated = "discount:created",
11
+ DiscountUpdated = "discount:updated",
12
+ DiscountChangeStatus = "discount:change-status"
10
13
  }
@@ -11,4 +11,7 @@ var Subjects;
11
11
  Subjects["BlogCreated"] = "blog:created";
12
12
  Subjects["BlogUpdated"] = "blog:updated";
13
13
  Subjects["BlogChangeStatus"] = "blog:change-status";
14
+ Subjects["DiscountCreated"] = "discount:created";
15
+ Subjects["DiscountUpdated"] = "discount:updated";
16
+ Subjects["DiscountChangeStatus"] = "discount:change-status";
14
17
  })(Subjects || (exports.Subjects = Subjects = {}));
package/build/index.d.ts CHANGED
@@ -22,3 +22,6 @@ export * from './events/portal/user/user-updated-event';
22
22
  export * from './events/portal/blog/blog-create-event';
23
23
  export * from './events/portal/blog/blog-update-event';
24
24
  export * from './events/portal/blog/blog-change-status-event';
25
+ export * from './events/portal/discount/discount-create-event';
26
+ export * from './events/portal/discount/discount-update-event';
27
+ export * from './events/portal/discount/discount-change-status-event';
package/build/index.js CHANGED
@@ -38,3 +38,6 @@ __exportStar(require("./events/portal/user/user-updated-event"), exports);
38
38
  __exportStar(require("./events/portal/blog/blog-create-event"), exports);
39
39
  __exportStar(require("./events/portal/blog/blog-update-event"), exports);
40
40
  __exportStar(require("./events/portal/blog/blog-change-status-event"), exports);
41
+ __exportStar(require("./events/portal/discount/discount-create-event"), exports);
42
+ __exportStar(require("./events/portal/discount/discount-update-event"), exports);
43
+ __exportStar(require("./events/portal/discount/discount-change-status-event"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [