@sendhome/common 1.0.243 → 1.0.245
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.
- package/build/events/publishers/product-created-event.d.ts +2 -20
- package/build/events/publishers/product-updated-event.d.ts +2 -20
- package/build/events/publishers/product-variant-created-event.d.ts +30 -0
- package/build/events/publishers/product-variant-created-event.js +2 -0
- package/build/events/publishers/product-variant-updated-event.d.ts +30 -0
- package/build/events/publishers/product-variant-updated-event.js +2 -0
- package/build/events/subjects/subjects.d.ts +2 -0
- package/build/events/subjects/subjects.js +3 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +1 -1
|
@@ -2,25 +2,6 @@ import mongoose from "mongoose";
|
|
|
2
2
|
import { Subjects } from "../subjects/subjects";
|
|
3
3
|
import { ProductStatus } from "../types/product-status";
|
|
4
4
|
import { Category } from "../types/category";
|
|
5
|
-
import { UnitType } from "../types/unit-type";
|
|
6
|
-
interface VariantAttribute {
|
|
7
|
-
name: string;
|
|
8
|
-
value: string;
|
|
9
|
-
label: string;
|
|
10
|
-
unit: UnitType;
|
|
11
|
-
}
|
|
12
|
-
interface IVariant {
|
|
13
|
-
sku: string;
|
|
14
|
-
combination: VariantAttribute[];
|
|
15
|
-
available: boolean;
|
|
16
|
-
media: {
|
|
17
|
-
images: string[];
|
|
18
|
-
videos?: string[];
|
|
19
|
-
};
|
|
20
|
-
attributes?: {
|
|
21
|
-
[key: string]: string | number;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
5
|
interface ITransportSchedule {
|
|
25
6
|
departure_time: string;
|
|
26
7
|
arrival_time: string;
|
|
@@ -45,12 +26,13 @@ export interface ProductCreatedEvent {
|
|
|
45
26
|
quantity_type?: "decimal" | "integer";
|
|
46
27
|
brand: string;
|
|
47
28
|
variant_mode: "single" | "multiple";
|
|
48
|
-
variants:
|
|
29
|
+
variants: string[];
|
|
49
30
|
specifications: {
|
|
50
31
|
[key: string]: string | number;
|
|
51
32
|
};
|
|
52
33
|
tags: string[];
|
|
53
34
|
transport_details?: ITransportDetails;
|
|
35
|
+
countries: string[];
|
|
54
36
|
status: ProductStatus;
|
|
55
37
|
created_at: Date;
|
|
56
38
|
updated_at: Date;
|
|
@@ -2,25 +2,6 @@ import mongoose from "mongoose";
|
|
|
2
2
|
import { Subjects } from "../subjects/subjects";
|
|
3
3
|
import { ProductStatus } from "../types/product-status";
|
|
4
4
|
import { Category } from "../types/category";
|
|
5
|
-
import { UnitType } from "../types/unit-type";
|
|
6
|
-
interface VariantAttribute {
|
|
7
|
-
name: string;
|
|
8
|
-
value: string;
|
|
9
|
-
label: string;
|
|
10
|
-
unit: UnitType;
|
|
11
|
-
}
|
|
12
|
-
interface IVariant {
|
|
13
|
-
sku: string;
|
|
14
|
-
combination: VariantAttribute[];
|
|
15
|
-
available: boolean;
|
|
16
|
-
media: {
|
|
17
|
-
images: string[];
|
|
18
|
-
videos?: string[];
|
|
19
|
-
};
|
|
20
|
-
attributes?: {
|
|
21
|
-
[key: string]: string | number;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
5
|
interface ITransportSchedule {
|
|
25
6
|
departure_time: string;
|
|
26
7
|
arrival_time: string;
|
|
@@ -45,12 +26,13 @@ export interface ProductUpdatedEvent {
|
|
|
45
26
|
quantity_type?: "decimal" | "integer";
|
|
46
27
|
brand: string;
|
|
47
28
|
variant_mode: "single" | "multiple";
|
|
48
|
-
variants:
|
|
29
|
+
variants: string[];
|
|
49
30
|
specifications: {
|
|
50
31
|
[key: string]: string | number;
|
|
51
32
|
};
|
|
52
33
|
tags: string[];
|
|
53
34
|
transport_details?: ITransportDetails;
|
|
35
|
+
countries: string[];
|
|
54
36
|
status: ProductStatus;
|
|
55
37
|
created_at: Date;
|
|
56
38
|
updated_at: Date;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { Subjects } from "../subjects/subjects";
|
|
3
|
+
import { UnitType } from "../types/unit-type";
|
|
4
|
+
interface VariantAttribute {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
unit: UnitType;
|
|
9
|
+
}
|
|
10
|
+
export interface ProductVariantCreatedEvent {
|
|
11
|
+
subject: Subjects.ProductVariantCreated;
|
|
12
|
+
data: {
|
|
13
|
+
id: string;
|
|
14
|
+
sku: string;
|
|
15
|
+
combination: VariantAttribute[];
|
|
16
|
+
available: boolean;
|
|
17
|
+
media: {
|
|
18
|
+
images: string[];
|
|
19
|
+
videos?: string[];
|
|
20
|
+
};
|
|
21
|
+
attributes?: {
|
|
22
|
+
[key: string]: string | number;
|
|
23
|
+
};
|
|
24
|
+
product: mongoose.Types.ObjectId;
|
|
25
|
+
created_at: Date;
|
|
26
|
+
updated_at: Date;
|
|
27
|
+
version: number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
import { Subjects } from "../subjects/subjects";
|
|
3
|
+
import { UnitType } from "../types/unit-type";
|
|
4
|
+
interface VariantAttribute {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
unit: UnitType;
|
|
9
|
+
}
|
|
10
|
+
export interface ProductVariantUpdatedEvent {
|
|
11
|
+
subject: Subjects.ProductVariantUpdated;
|
|
12
|
+
data: {
|
|
13
|
+
id: string;
|
|
14
|
+
sku: string;
|
|
15
|
+
combination: VariantAttribute[];
|
|
16
|
+
available: boolean;
|
|
17
|
+
media: {
|
|
18
|
+
images: string[];
|
|
19
|
+
videos?: string[];
|
|
20
|
+
};
|
|
21
|
+
attributes?: {
|
|
22
|
+
[key: string]: string | number;
|
|
23
|
+
};
|
|
24
|
+
product: mongoose.Types.ObjectId;
|
|
25
|
+
created_at: Date;
|
|
26
|
+
updated_at: Date;
|
|
27
|
+
version: number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -23,6 +23,8 @@ export declare enum Subjects {
|
|
|
23
23
|
MediaUpdated = "media:updated",
|
|
24
24
|
ProductCreated = "product:created",
|
|
25
25
|
ProductUpdated = "product:updated",
|
|
26
|
+
ProductVariantCreated = "productVariant:created",
|
|
27
|
+
ProductVariantUpdated = "productVariant:updated",
|
|
26
28
|
ProductItemCreated = "productItem:created",
|
|
27
29
|
ProductItemUpdated = "productItem:updated",
|
|
28
30
|
CartItemCreated = "cart-item:created",
|
|
@@ -39,6 +39,9 @@ var Subjects;
|
|
|
39
39
|
// products
|
|
40
40
|
Subjects["ProductCreated"] = "product:created";
|
|
41
41
|
Subjects["ProductUpdated"] = "product:updated";
|
|
42
|
+
// product variants
|
|
43
|
+
Subjects["ProductVariantCreated"] = "productVariant:created";
|
|
44
|
+
Subjects["ProductVariantUpdated"] = "productVariant:updated";
|
|
42
45
|
// productItems
|
|
43
46
|
Subjects["ProductItemCreated"] = "productItem:created";
|
|
44
47
|
Subjects["ProductItemUpdated"] = "productItem:updated";
|
package/build/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export * from "./events/publishers/payout-updated-event";
|
|
|
64
64
|
export * from "./events/publishers/order-updated-event";
|
|
65
65
|
export * from "./events/publishers/product-created-event";
|
|
66
66
|
export * from "./events/publishers/product-updated-event";
|
|
67
|
+
export * from "./events/publishers/product-variant-created-event";
|
|
68
|
+
export * from "./events/publishers/product-variant-updated-event";
|
|
67
69
|
export * from "./events/publishers/productItem-created-event";
|
|
68
70
|
export * from "./events/publishers/productItem-promotion-created-event";
|
|
69
71
|
export * from "./events/publishers/productItem-updated-event";
|
package/build/index.js
CHANGED
|
@@ -77,6 +77,8 @@ __exportStar(require("./events/publishers/payout-updated-event"), exports);
|
|
|
77
77
|
__exportStar(require("./events/publishers/order-updated-event"), exports);
|
|
78
78
|
__exportStar(require("./events/publishers/product-created-event"), exports);
|
|
79
79
|
__exportStar(require("./events/publishers/product-updated-event"), exports);
|
|
80
|
+
__exportStar(require("./events/publishers/product-variant-created-event"), exports);
|
|
81
|
+
__exportStar(require("./events/publishers/product-variant-updated-event"), exports);
|
|
80
82
|
__exportStar(require("./events/publishers/productItem-created-event"), exports);
|
|
81
83
|
__exportStar(require("./events/publishers/productItem-promotion-created-event"), exports);
|
|
82
84
|
__exportStar(require("./events/publishers/productItem-updated-event"), exports);
|