@sendhome/common 1.0.137 → 1.0.138

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.
@@ -2,6 +2,54 @@ import { Subjects } from "../subjects/subjects";
2
2
  import { ProductStatus } from "../types/product-status";
3
3
  import { ReceiveCountry } from "../types/receive-country";
4
4
  import { CompanyType } from "../types/company-type";
5
+ import { ProductClass } from "../types/product_class";
6
+ import { UnitType } from "../types/unit-type";
7
+ interface IGroceriesFields {
8
+ expiration_date?: Date;
9
+ organic?: boolean;
10
+ calories?: Number;
11
+ ingredients?: string[];
12
+ allergens?: string[];
13
+ }
14
+ interface IHardwareFields {
15
+ brand?: string;
16
+ model?: string;
17
+ warranty_period?: string;
18
+ specifications?: string;
19
+ }
20
+ interface IClothingFields {
21
+ size?: string;
22
+ color?: string;
23
+ material?: string;
24
+ care_instructions?: string;
25
+ }
26
+ interface IFuelFields {
27
+ discount_percentage?: number;
28
+ expiration_date?: Date;
29
+ usage_restrictions?: string;
30
+ }
31
+ interface IGasFields {
32
+ discount_percentage?: number;
33
+ expiration_date?: Date;
34
+ usage_restrictions?: string;
35
+ }
36
+ interface ProductAttrs {
37
+ images: string[];
38
+ videos: string[];
39
+ product_id: number;
40
+ name: string;
41
+ description: string;
42
+ product_type: CompanyType;
43
+ product_class: ProductClass;
44
+ brand?: string;
45
+ unit?: UnitType;
46
+ unit_value?: number;
47
+ properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IFuelFields | IGasFields | {};
48
+ status: ProductStatus;
49
+ country: ReceiveCountry;
50
+ created_at: Date;
51
+ updated_at: Date;
52
+ }
5
53
  export interface ProductItemCreatedEvent {
6
54
  subject: Subjects.ProductItemCreated;
7
55
  data: {
@@ -10,7 +58,7 @@ export interface ProductItemCreatedEvent {
10
58
  product_type: CompanyType;
11
59
  category: string;
12
60
  brand: string;
13
- product: string;
61
+ product: ProductAttrs | string;
14
62
  company: string;
15
63
  module: string;
16
64
  country: ReceiveCountry;
@@ -20,3 +68,4 @@ export interface ProductItemCreatedEvent {
20
68
  version: number;
21
69
  };
22
70
  }
71
+ export {};
@@ -2,6 +2,54 @@ import { Subjects } from "../subjects/subjects";
2
2
  import { ProductStatus } from "../types/product-status";
3
3
  import { ReceiveCountry } from "../types/receive-country";
4
4
  import { CompanyType } from "../types/company-type";
5
+ import { ProductClass } from "../types/product_class";
6
+ import { UnitType } from "../types/unit-type";
7
+ interface IGroceriesFields {
8
+ expiration_date?: Date;
9
+ organic?: boolean;
10
+ calories?: Number;
11
+ ingredients?: string[];
12
+ allergens?: string[];
13
+ }
14
+ interface IHardwareFields {
15
+ brand?: string;
16
+ model?: string;
17
+ warranty_period?: string;
18
+ specifications?: string;
19
+ }
20
+ interface IClothingFields {
21
+ size?: string;
22
+ color?: string;
23
+ material?: string;
24
+ care_instructions?: string;
25
+ }
26
+ interface IFuelFields {
27
+ discount_percentage?: number;
28
+ expiration_date?: Date;
29
+ usage_restrictions?: string;
30
+ }
31
+ interface IGasFields {
32
+ discount_percentage?: number;
33
+ expiration_date?: Date;
34
+ usage_restrictions?: string;
35
+ }
36
+ interface ProductAttrs {
37
+ images: string[];
38
+ videos: string[];
39
+ product_id: number;
40
+ name: string;
41
+ description: string;
42
+ product_type: CompanyType;
43
+ product_class: ProductClass;
44
+ brand?: string;
45
+ unit?: UnitType;
46
+ unit_value?: number;
47
+ properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IFuelFields | IGasFields | {};
48
+ status: ProductStatus;
49
+ country: ReceiveCountry;
50
+ created_at: Date;
51
+ updated_at: Date;
52
+ }
5
53
  export interface ProductItemUpdatedEvent {
6
54
  subject: Subjects.ProductItemUpdated;
7
55
  data: {
@@ -10,7 +58,7 @@ export interface ProductItemUpdatedEvent {
10
58
  product_type: CompanyType;
11
59
  category: string;
12
60
  brand: string;
13
- product: string;
61
+ product: ProductAttrs | string;
14
62
  company: string;
15
63
  module: string;
16
64
  country: ReceiveCountry;
@@ -20,3 +68,4 @@ export interface ProductItemUpdatedEvent {
20
68
  version: number;
21
69
  };
22
70
  }
71
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendhome/common",
3
- "version": "1.0.137",
3
+ "version": "1.0.138",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",