@sendhome/common 1.0.80 → 1.0.82

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,15 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ export interface CouponCreatedEvent {
3
+ subject: Subjects.CouponCreated;
4
+ data: {
5
+ id: string;
6
+ code: string;
7
+ discount_amount: number;
8
+ expiration_date: Date;
9
+ user: string;
10
+ referred_user: string;
11
+ is_active: boolean;
12
+ created_at: Date;
13
+ updated_at: Date;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ export interface CouponExpiredEvent {
3
+ subject: Subjects.CouponExpired;
4
+ data: {
5
+ id: string;
6
+ code: string;
7
+ };
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ export interface CouponUpdatedEvent {
3
+ subject: Subjects.CouponUpdated;
4
+ data: {
5
+ id: string;
6
+ code: string;
7
+ discount_amount: number;
8
+ expiration_date: Date;
9
+ user: string;
10
+ referred_user: string;
11
+ is_active: boolean;
12
+ created_at: Date;
13
+ updated_at: Date;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -25,6 +25,11 @@ export interface OrderCreatedEvent {
25
25
  commission: number;
26
26
  send_country: SendCountry;
27
27
  receive_country: ReceiveCountry;
28
+ delivery_method: "Delivery" | "Self-Collect";
29
+ delivery_address: {
30
+ address: string;
31
+ city: string;
32
+ };
28
33
  sender: string;
29
34
  receiver: string;
30
35
  company: string;
@@ -25,6 +25,11 @@ export interface OrderUpdatedEvent {
25
25
  commission: number;
26
26
  send_country: SendCountry;
27
27
  receive_country: ReceiveCountry;
28
+ delivery_method: "Delivery" | "Self-Collect";
29
+ delivery_address: {
30
+ address: string;
31
+ city: string;
32
+ };
28
33
  sender: string;
29
34
  receiver: string;
30
35
  company: string;
@@ -31,7 +31,7 @@ export interface UserCreatedEvent {
31
31
  permissions: number[];
32
32
  status: UserStatus;
33
33
  referred_by: number;
34
- bonus: number;
34
+ referred_user_coupon_awarded: boolean;
35
35
  company: string;
36
36
  country: SendCountry;
37
37
  created_at: Date;
@@ -31,7 +31,7 @@ export interface UserUpdatedEvent {
31
31
  permissions: number[];
32
32
  status: UserStatus;
33
33
  referred_by: number;
34
- bonus: number;
34
+ referred_user_coupon_awarded: boolean;
35
35
  company: string;
36
36
  country: SendCountry;
37
37
  created_at: Date;
@@ -30,6 +30,9 @@ export declare enum Subjects {
30
30
  OrderExpirationWarning = "order-expiration:warning",
31
31
  OrderExpirationComplete = "order-expiration:complete",
32
32
  OrderExpiration = "order:expiration",
33
+ CouponCreated = "coupon:created",
34
+ CouponUpdated = "coupon:updated",
35
+ CouponExpired = "coupon:Expired",
33
36
  CollectionCreated = "collection:created",
34
37
  CollectionUpdated = "collection:updated"
35
38
  }
@@ -7,7 +7,7 @@ var Subjects;
7
7
  Subjects["UserCreated"] = "user:created";
8
8
  Subjects["UserUpdated"] = "user:updated";
9
9
  Subjects["UserDeleted"] = "user:deleted";
10
- // Bonus
10
+ // Bonus
11
11
  Subjects["BonusAwarded"] = "bonus:awarded";
12
12
  // company
13
13
  Subjects["CompanyCreated"] = "company:created";
@@ -46,6 +46,10 @@ var Subjects;
46
46
  Subjects["OrderExpirationWarning"] = "order-expiration:warning";
47
47
  Subjects["OrderExpirationComplete"] = "order-expiration:complete";
48
48
  Subjects["OrderExpiration"] = "order:expiration";
49
+ // Orders
50
+ Subjects["CouponCreated"] = "coupon:created";
51
+ Subjects["CouponUpdated"] = "coupon:updated";
52
+ Subjects["CouponExpired"] = "coupon:Expired";
49
53
  // Collection
50
54
  Subjects["CollectionCreated"] = "collection:created";
51
55
  Subjects["CollectionUpdated"] = "collection:updated";
@@ -3,6 +3,7 @@ export declare enum OrderStatus {
3
3
  Declined = "declined",
4
4
  Partial = "partial",
5
5
  Collected = "collected",
6
+ Delivered = "Delivered",
6
7
  Cancelled = "cancelled",
7
8
  Expired = "expired"
8
9
  }
@@ -11,6 +11,8 @@ var OrderStatus;
11
11
  OrderStatus["Partial"] = "partial";
12
12
  // order collected
13
13
  OrderStatus["Collected"] = "collected";
14
+ // order delivered
15
+ OrderStatus["Delivered"] = "Delivered";
14
16
  // order cancelled
15
17
  OrderStatus["Cancelled"] = "cancelled";
16
18
  // order expired
package/build/index.d.ts CHANGED
@@ -29,6 +29,9 @@ export * from './events/publishers/collection-created-event';
29
29
  export * from './events/publishers/collection-updated-event';
30
30
  export * from './events/publishers/company-created-event';
31
31
  export * from './events/publishers/company-updated-event';
32
+ export * from './events/publishers/coupon-created-event';
33
+ export * from './events/publishers/coupon-updated-event';
34
+ export * from './events/publishers/coupon-expired-event';
32
35
  export * from './events/publishers/media-created-event';
33
36
  export * from './events/publishers/media-updated-event';
34
37
  export * from './events/publishers/order-collected-event';
package/build/index.js CHANGED
@@ -42,6 +42,9 @@ __exportStar(require("./events/publishers/collection-created-event"), exports);
42
42
  __exportStar(require("./events/publishers/collection-updated-event"), exports);
43
43
  __exportStar(require("./events/publishers/company-created-event"), exports);
44
44
  __exportStar(require("./events/publishers/company-updated-event"), exports);
45
+ __exportStar(require("./events/publishers/coupon-created-event"), exports);
46
+ __exportStar(require("./events/publishers/coupon-updated-event"), exports);
47
+ __exportStar(require("./events/publishers/coupon-expired-event"), exports);
45
48
  __exportStar(require("./events/publishers/media-created-event"), exports);
46
49
  __exportStar(require("./events/publishers/media-updated-event"), exports);
47
50
  __exportStar(require("./events/publishers/order-collected-event"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendhome/common",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",