@sendhome/common 1.0.110 → 1.0.112

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.
@@ -1,4 +1,5 @@
1
1
  import { Subjects } from "../subjects/subjects";
2
+ import { ProductClass } from "../types/product_class";
2
3
  import { ProductStatus } from "../types/product-status";
3
4
  import { CompanyType } from "../types/company-type";
4
5
  import { UnitType } from "../types/unit-type";
@@ -22,7 +23,12 @@ interface IClothingFields {
22
23
  material?: string;
23
24
  care_instructions?: string;
24
25
  }
25
- interface IFuelCouponFields {
26
+ interface IFuelFields {
27
+ discount_percentage?: number;
28
+ expiration_date?: Date;
29
+ usage_restrictions?: string;
30
+ }
31
+ interface IGasFields {
26
32
  discount_percentage?: number;
27
33
  expiration_date?: Date;
28
34
  usage_restrictions?: string;
@@ -37,12 +43,13 @@ export interface ProductCreatedEvent {
37
43
  name: string;
38
44
  description: string;
39
45
  product_type: CompanyType;
46
+ product_class: ProductClass;
40
47
  category: string;
41
48
  brand: string;
42
49
  price: number;
43
50
  unit: UnitType;
44
51
  unit_value: number;
45
- properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelCouponFields | {};
52
+ properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IFuelFields | IGasFields | {};
46
53
  status: ProductStatus;
47
54
  module: string;
48
55
  company: string;
@@ -1,4 +1,5 @@
1
1
  import { Subjects } from "../subjects/subjects";
2
+ import { ProductClass } from "../types/product_class";
2
3
  import { ProductStatus } from "../types/product-status";
3
4
  import { CompanyType } from "../types/company-type";
4
5
  import { UnitType } from "../types/unit-type";
@@ -22,7 +23,12 @@ interface IClothingFields {
22
23
  material?: string;
23
24
  care_instructions?: string;
24
25
  }
25
- interface IFuelCouponFields {
26
+ interface IFuelFields {
27
+ discount_percentage?: number;
28
+ expiration_date?: Date;
29
+ usage_restrictions?: string;
30
+ }
31
+ interface IGasFields {
26
32
  discount_percentage?: number;
27
33
  expiration_date?: Date;
28
34
  usage_restrictions?: string;
@@ -37,15 +43,16 @@ export interface ProductUpdatedEvent {
37
43
  name: string;
38
44
  description: string;
39
45
  product_type: CompanyType;
46
+ product_class: ProductClass;
40
47
  category: string;
41
48
  brand: string;
42
49
  price: number;
43
50
  unit: UnitType;
44
51
  unit_value: number;
45
- properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelCouponFields | {};
52
+ properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IFuelFields | IGasFields | {};
46
53
  status: ProductStatus;
47
- company: string;
48
54
  module: string;
55
+ company: string;
49
56
  country: Country;
50
57
  created_at: Date;
51
58
  updated_at: Date;
@@ -0,0 +1,6 @@
1
+ export declare enum ProductClass {
2
+ General = "general",
3
+ Diesel = "diesel",
4
+ Petrol = "petrol",
5
+ Lp = "lp"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductClass = void 0;
4
+ var ProductClass;
5
+ (function (ProductClass) {
6
+ ProductClass["General"] = "general";
7
+ ProductClass["Diesel"] = "diesel";
8
+ ProductClass["Petrol"] = "petrol";
9
+ ProductClass["Lp"] = "lp";
10
+ })(ProductClass = exports.ProductClass || (exports.ProductClass = {}));
package/build/index.d.ts CHANGED
@@ -67,6 +67,7 @@ export * from './events/types/module-status';
67
67
  export * from './events/types/order-cancellation-status';
68
68
  export * from './events/types/order-status';
69
69
  export * from './events/types/payment-status';
70
+ export * from './events/types/product_class';
70
71
  export * from './events/types/product-status';
71
72
  export * from './events/types/receive-country';
72
73
  export * from './events/types/recipient-status';
package/build/index.js CHANGED
@@ -80,6 +80,7 @@ __exportStar(require("./events/types/module-status"), exports);
80
80
  __exportStar(require("./events/types/order-cancellation-status"), exports);
81
81
  __exportStar(require("./events/types/order-status"), exports);
82
82
  __exportStar(require("./events/types/payment-status"), exports);
83
+ __exportStar(require("./events/types/product_class"), exports);
83
84
  __exportStar(require("./events/types/product-status"), exports);
84
85
  __exportStar(require("./events/types/receive-country"), exports);
85
86
  __exportStar(require("./events/types/recipient-status"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendhome/common",
3
- "version": "1.0.110",
3
+ "version": "1.0.112",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",