@contractspec/example.marketplace 3.7.6 → 3.8.2
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/README.md +64 -131
- package/dist/browser/entities/index.js +470 -470
- package/dist/browser/index.js +1257 -1019
- package/dist/browser/marketplace.feature.js +175 -0
- package/dist/browser/order/index.js +155 -155
- package/dist/browser/order/order.event.js +1 -1
- package/dist/browser/payout/index.js +71 -71
- package/dist/browser/payout/payout.event.js +1 -1
- package/dist/browser/product/index.js +104 -104
- package/dist/browser/product/product.event.js +1 -1
- package/dist/browser/review/index.js +75 -75
- package/dist/browser/review/review.event.js +1 -1
- package/dist/browser/store/index.js +68 -68
- package/dist/browser/store/store.event.js +1 -1
- package/dist/browser/ui/MarketplaceDashboard.js +328 -110
- package/dist/browser/ui/MarketplaceDashboard.visualizations.js +216 -0
- package/dist/browser/ui/hooks/index.js +1 -1
- package/dist/browser/ui/hooks/useMarketplaceData.js +1 -1
- package/dist/browser/ui/index.js +590 -359
- package/dist/browser/ui/renderers/index.js +190 -4
- package/dist/browser/ui/renderers/marketplace.markdown.js +190 -4
- package/dist/browser/visualizations/catalog.js +126 -0
- package/dist/browser/visualizations/index.js +183 -0
- package/dist/browser/visualizations/selectors.js +177 -0
- package/dist/entities/index.d.ts +110 -110
- package/dist/entities/index.js +470 -470
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1257 -1019
- package/dist/marketplace.feature.js +175 -0
- package/dist/node/entities/index.js +470 -470
- package/dist/node/index.js +1257 -1019
- package/dist/node/marketplace.feature.js +175 -0
- package/dist/node/order/index.js +155 -155
- package/dist/node/order/order.event.js +1 -1
- package/dist/node/payout/index.js +71 -71
- package/dist/node/payout/payout.event.js +1 -1
- package/dist/node/product/index.js +104 -104
- package/dist/node/product/product.event.js +1 -1
- package/dist/node/review/index.js +75 -75
- package/dist/node/review/review.event.js +1 -1
- package/dist/node/store/index.js +68 -68
- package/dist/node/store/store.event.js +1 -1
- package/dist/node/ui/MarketplaceDashboard.js +328 -110
- package/dist/node/ui/MarketplaceDashboard.visualizations.js +216 -0
- package/dist/node/ui/hooks/index.js +1 -1
- package/dist/node/ui/hooks/useMarketplaceData.js +1 -1
- package/dist/node/ui/index.js +590 -359
- package/dist/node/ui/renderers/index.js +190 -4
- package/dist/node/ui/renderers/marketplace.markdown.js +190 -4
- package/dist/node/visualizations/catalog.js +126 -0
- package/dist/node/visualizations/index.js +183 -0
- package/dist/node/visualizations/selectors.js +177 -0
- package/dist/order/index.d.ts +2 -2
- package/dist/order/index.js +155 -155
- package/dist/order/order.event.js +1 -1
- package/dist/payout/index.d.ts +2 -2
- package/dist/payout/index.js +71 -71
- package/dist/payout/payout.event.js +1 -1
- package/dist/product/index.d.ts +2 -2
- package/dist/product/index.js +104 -104
- package/dist/product/product.event.js +1 -1
- package/dist/review/index.d.ts +2 -2
- package/dist/review/index.js +75 -75
- package/dist/review/review.event.js +1 -1
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +68 -68
- package/dist/store/store.event.js +1 -1
- package/dist/ui/MarketplaceDashboard.js +328 -110
- package/dist/ui/MarketplaceDashboard.visualizations.d.ts +5 -0
- package/dist/ui/MarketplaceDashboard.visualizations.js +217 -0
- package/dist/ui/hooks/index.d.ts +1 -1
- package/dist/ui/hooks/index.js +1 -1
- package/dist/ui/hooks/useMarketplaceData.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +590 -359
- package/dist/ui/renderers/index.d.ts +1 -1
- package/dist/ui/renderers/index.js +190 -4
- package/dist/ui/renderers/marketplace.markdown.js +190 -4
- package/dist/visualizations/catalog.d.ts +10 -0
- package/dist/visualizations/catalog.js +127 -0
- package/dist/visualizations/index.d.ts +2 -0
- package/dist/visualizations/index.js +184 -0
- package/dist/visualizations/selectors.d.ts +11 -0
- package/dist/visualizations/selectors.js +178 -0
- package/dist/visualizations/selectors.test.d.ts +1 -0
- package/package.json +66 -10
|
@@ -7,34 +7,83 @@ var StoreStatusEnum = defineEnum("StoreStatus", [
|
|
|
7
7
|
"CLOSED"
|
|
8
8
|
]);
|
|
9
9
|
|
|
10
|
-
// src/store/store.
|
|
10
|
+
// src/store/store.event.ts
|
|
11
|
+
import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
11
12
|
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
12
|
-
var
|
|
13
|
-
name: "
|
|
14
|
-
description: "A seller store",
|
|
13
|
+
var StoreCreatedPayload = defineSchemaModel({
|
|
14
|
+
name: "StoreCreatedEventPayload",
|
|
15
15
|
fields: {
|
|
16
|
-
|
|
16
|
+
storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
17
17
|
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
18
18
|
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
19
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
20
|
-
status: { type: StoreStatusEnum, isOptional: false },
|
|
21
19
|
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
var StoreStatusChangedPayload = defineSchemaModel({
|
|
24
|
+
name: "StoreStatusChangedEventPayload",
|
|
25
|
+
fields: {
|
|
26
|
+
storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
27
|
+
previousStatus: {
|
|
28
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
+
isOptional: false
|
|
30
|
+
},
|
|
31
|
+
newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
32
|
+
reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
33
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
var StoreCreatedEvent = defineEvent({
|
|
37
|
+
meta: {
|
|
38
|
+
key: "marketplace.store.created",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
description: "A new seller store has been created.",
|
|
41
|
+
stability: "experimental",
|
|
42
|
+
owners: ["@marketplace-team"],
|
|
43
|
+
tags: ["marketplace", "store"]
|
|
44
|
+
},
|
|
45
|
+
payload: StoreCreatedPayload
|
|
46
|
+
});
|
|
47
|
+
var StoreStatusChangedEvent = defineEvent({
|
|
48
|
+
meta: {
|
|
49
|
+
key: "marketplace.store.statusChanged",
|
|
50
|
+
version: "1.0.0",
|
|
51
|
+
description: "A store status has changed.",
|
|
52
|
+
stability: "experimental",
|
|
53
|
+
owners: ["@marketplace-team"],
|
|
54
|
+
tags: ["marketplace", "store"]
|
|
55
|
+
},
|
|
56
|
+
payload: StoreStatusChangedPayload
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// src/store/store.schema.ts
|
|
60
|
+
import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
61
|
+
var StoreModel = defineSchemaModel2({
|
|
62
|
+
name: "StoreModel",
|
|
63
|
+
description: "A seller store",
|
|
64
|
+
fields: {
|
|
65
|
+
id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
66
|
+
name: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
67
|
+
slug: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
68
|
+
description: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
69
|
+
status: { type: StoreStatusEnum, isOptional: false },
|
|
70
|
+
ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
71
|
+
logoFileId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
72
|
+
isVerified: { type: ScalarTypeEnum2.Boolean(), isOptional: false },
|
|
73
|
+
totalProducts: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
|
|
74
|
+
averageRating: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false },
|
|
75
|
+
createdAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
27
76
|
}
|
|
28
77
|
});
|
|
29
|
-
var CreateStoreInputModel =
|
|
78
|
+
var CreateStoreInputModel = defineSchemaModel2({
|
|
30
79
|
name: "CreateStoreInput",
|
|
31
80
|
fields: {
|
|
32
|
-
name: { type:
|
|
33
|
-
slug: { type:
|
|
34
|
-
description: { type:
|
|
35
|
-
email: { type:
|
|
36
|
-
country: { type:
|
|
37
|
-
currency: { type:
|
|
81
|
+
name: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
|
|
82
|
+
slug: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
|
|
83
|
+
description: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
84
|
+
email: { type: ScalarTypeEnum2.EmailAddress(), isOptional: true },
|
|
85
|
+
country: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
86
|
+
currency: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true }
|
|
38
87
|
}
|
|
39
88
|
});
|
|
40
89
|
|
|
@@ -83,55 +132,6 @@ var CreateStoreContract = defineCommand({
|
|
|
83
132
|
]
|
|
84
133
|
}
|
|
85
134
|
});
|
|
86
|
-
|
|
87
|
-
// src/store/store.event.ts
|
|
88
|
-
import { ScalarTypeEnum as ScalarTypeEnum2, defineSchemaModel as defineSchemaModel2 } from "@contractspec/lib.schema";
|
|
89
|
-
import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
90
|
-
var StoreCreatedPayload = defineSchemaModel2({
|
|
91
|
-
name: "StoreCreatedEventPayload",
|
|
92
|
-
fields: {
|
|
93
|
-
storeId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
94
|
-
name: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
95
|
-
slug: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
96
|
-
ownerId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
97
|
-
timestamp: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
var StoreStatusChangedPayload = defineSchemaModel2({
|
|
101
|
-
name: "StoreStatusChangedEventPayload",
|
|
102
|
-
fields: {
|
|
103
|
-
storeId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
104
|
-
previousStatus: {
|
|
105
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
106
|
-
isOptional: false
|
|
107
|
-
},
|
|
108
|
-
newStatus: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
109
|
-
reason: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
|
|
110
|
-
timestamp: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
var StoreCreatedEvent = defineEvent({
|
|
114
|
-
meta: {
|
|
115
|
-
key: "marketplace.store.created",
|
|
116
|
-
version: "1.0.0",
|
|
117
|
-
description: "A new seller store has been created.",
|
|
118
|
-
stability: "experimental",
|
|
119
|
-
owners: ["@marketplace-team"],
|
|
120
|
-
tags: ["marketplace", "store"]
|
|
121
|
-
},
|
|
122
|
-
payload: StoreCreatedPayload
|
|
123
|
-
});
|
|
124
|
-
var StoreStatusChangedEvent = defineEvent({
|
|
125
|
-
meta: {
|
|
126
|
-
key: "marketplace.store.statusChanged",
|
|
127
|
-
version: "1.0.0",
|
|
128
|
-
description: "A store status has changed.",
|
|
129
|
-
stability: "experimental",
|
|
130
|
-
owners: ["@marketplace-team"],
|
|
131
|
-
tags: ["marketplace", "store"]
|
|
132
|
-
},
|
|
133
|
-
payload: StoreStatusChangedPayload
|
|
134
|
-
});
|
|
135
135
|
export {
|
|
136
136
|
StoreStatusEnum,
|
|
137
137
|
StoreStatusChangedEvent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/store/store.event.ts
|
|
2
|
-
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
2
|
import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
4
|
var StoreCreatedPayload = defineSchemaModel({
|
|
5
5
|
name: "StoreCreatedEventPayload",
|
|
6
6
|
fields: {
|