@sendhome/common 1.0.228 → 1.0.230

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.
@@ -70,6 +70,10 @@ interface IAutomotiveFields {
70
70
  specifications?: string;
71
71
  usage_notes?: string;
72
72
  }
73
+ interface IVariantDefinition {
74
+ name: string;
75
+ values: string[];
76
+ }
73
77
  export interface ProductCreatedEvent {
74
78
  subject: Subjects.ProductCreated;
75
79
  data: {
@@ -80,10 +84,11 @@ export interface ProductCreatedEvent {
80
84
  name: string;
81
85
  description: string;
82
86
  product_category: Category;
83
- brand: string;
84
- unit: UnitType;
85
- unit_value: number;
86
- properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | ILiquorFields | IAutomotiveFields | {};
87
+ brand?: string;
88
+ unit?: UnitType;
89
+ unit_value?: number;
90
+ properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IFuelFields | ILiquorFields | IAutomotiveFields | {};
91
+ variants?: IVariantDefinition[];
87
92
  status: ProductStatus;
88
93
  countries: string[];
89
94
  created_at: Date;
@@ -70,6 +70,10 @@ interface IAutomotiveFields {
70
70
  specifications?: string;
71
71
  usage_notes?: string;
72
72
  }
73
+ interface IVariantDefinition {
74
+ name: string;
75
+ values: string[];
76
+ }
73
77
  export interface ProductUpdatedEvent {
74
78
  subject: Subjects.ProductUpdated;
75
79
  data: {
@@ -80,10 +84,11 @@ export interface ProductUpdatedEvent {
80
84
  name: string;
81
85
  description: string;
82
86
  product_category: Category;
83
- brand: string;
84
- unit: UnitType;
85
- unit_value: number;
86
- properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | ILiquorFields | IAutomotiveFields | {};
87
+ brand?: string;
88
+ unit?: UnitType;
89
+ unit_value?: number;
90
+ properties: IGroceriesFields | IHardwareFields | IClothingFields | IFuelFields | IFuelFields | ILiquorFields | IAutomotiveFields | {};
91
+ variants?: IVariantDefinition[];
87
92
  status: ProductStatus;
88
93
  countries: string[];
89
94
  created_at: Date;
@@ -1,6 +1,18 @@
1
1
  import { Subjects } from "../subjects/subjects";
2
2
  import { ProductStatus } from "../types/product-status";
3
3
  import { Category } from "../types/category";
4
+ interface IVariantStock {
5
+ combination: {
6
+ [variant_name: string]: string;
7
+ };
8
+ available: boolean;
9
+ price: number;
10
+ stock?: number;
11
+ media?: {
12
+ images: string[];
13
+ videos?: string[];
14
+ };
15
+ }
4
16
  export interface ProductItemCreatedEvent {
5
17
  subject: Subjects.ProductItemCreated;
6
18
  data: {
@@ -12,6 +24,7 @@ export interface ProductItemCreatedEvent {
12
24
  product_category: Category;
13
25
  category: string;
14
26
  sub_category: string;
27
+ variants_available: IVariantStock[];
15
28
  brand: string;
16
29
  product: string;
17
30
  company: string;
@@ -29,3 +42,4 @@ export interface ProductItemCreatedEvent {
29
42
  version: number;
30
43
  };
31
44
  }
45
+ export {};
@@ -1,6 +1,18 @@
1
1
  import { Subjects } from "../subjects/subjects";
2
2
  import { ProductStatus } from "../types/product-status";
3
3
  import { Category } from "../types/category";
4
+ interface IVariantStock {
5
+ combination: {
6
+ [variant_name: string]: string;
7
+ };
8
+ available: boolean;
9
+ price: number;
10
+ stock?: number;
11
+ media?: {
12
+ images: string[];
13
+ videos?: string[];
14
+ };
15
+ }
4
16
  export interface ProductItemUpdatedEvent {
5
17
  subject: Subjects.ProductItemUpdated;
6
18
  data: {
@@ -12,6 +24,7 @@ export interface ProductItemUpdatedEvent {
12
24
  product_category: Category;
13
25
  category: string;
14
26
  sub_category: string;
27
+ variants_available: IVariantStock[];
15
28
  brand: string;
16
29
  product: string;
17
30
  company: string;
@@ -29,3 +42,4 @@ export interface ProductItemUpdatedEvent {
29
42
  version: number;
30
43
  };
31
44
  }
45
+ export {};
@@ -30,6 +30,7 @@ export interface UserCreatedEvent {
30
30
  company: string;
31
31
  branch: string;
32
32
  country: string;
33
+ subscribed_to_newsletter: boolean;
33
34
  slug: string;
34
35
  created_at: Date;
35
36
  updated_at: Date;
@@ -30,6 +30,7 @@ export interface UserUpdatedEvent {
30
30
  company: string;
31
31
  branch: string;
32
32
  country: string;
33
+ subscribed_to_newsletter: boolean;
33
34
  slug: string;
34
35
  created_at: Date;
35
36
  updated_at: Date;
@@ -3,6 +3,7 @@ export declare enum Category {
3
3
  Hardware = "hardware",
4
4
  Electricity = "electricity",
5
5
  Clothing = "clothing",
6
+ Gas = "gas",
6
7
  Fuel = "fuel",
7
8
  Furniture = "furniture",
8
9
  Transfer = "transfer",
@@ -7,6 +7,7 @@ var Category;
7
7
  Category["Hardware"] = "hardware";
8
8
  Category["Electricity"] = "electricity";
9
9
  Category["Clothing"] = "clothing";
10
+ Category["Gas"] = "gas";
10
11
  Category["Fuel"] = "fuel";
11
12
  Category["Furniture"] = "furniture";
12
13
  Category["Transfer"] = "transfer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendhome/common",
3
- "version": "1.0.228",
3
+ "version": "1.0.230",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",