@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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// src/visualizations/catalog.ts
|
|
2
|
+
import {
|
|
3
|
+
defineVisualization,
|
|
4
|
+
VisualizationRegistry
|
|
5
|
+
} from "@contractspec/lib.contracts-spec/visualizations";
|
|
6
|
+
var ORDER_LIST_REF = {
|
|
7
|
+
key: "marketplace.order.list",
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
};
|
|
10
|
+
var PRODUCT_LIST_REF = {
|
|
11
|
+
key: "marketplace.product.list",
|
|
12
|
+
version: "1.0.0"
|
|
13
|
+
};
|
|
14
|
+
var META = {
|
|
15
|
+
version: "1.0.0",
|
|
16
|
+
domain: "marketplace",
|
|
17
|
+
stability: "experimental",
|
|
18
|
+
owners: ["@example.marketplace"],
|
|
19
|
+
tags: ["marketplace", "visualization", "commerce"]
|
|
20
|
+
};
|
|
21
|
+
var MarketplaceOrderStatusVisualization = defineVisualization({
|
|
22
|
+
meta: {
|
|
23
|
+
...META,
|
|
24
|
+
key: "marketplace.visualization.order-status",
|
|
25
|
+
title: "Order Status Breakdown",
|
|
26
|
+
description: "Distribution of current order states.",
|
|
27
|
+
goal: "Expose delivery and backlog mix at a glance.",
|
|
28
|
+
context: "Marketplace operations overview."
|
|
29
|
+
},
|
|
30
|
+
source: { primary: ORDER_LIST_REF, resultPath: "data" },
|
|
31
|
+
visualization: {
|
|
32
|
+
kind: "pie",
|
|
33
|
+
nameDimension: "status",
|
|
34
|
+
valueMeasure: "orders",
|
|
35
|
+
dimensions: [
|
|
36
|
+
{ key: "status", label: "Status", dataPath: "status", type: "category" }
|
|
37
|
+
],
|
|
38
|
+
measures: [
|
|
39
|
+
{ key: "orders", label: "Orders", dataPath: "orders", format: "number" }
|
|
40
|
+
],
|
|
41
|
+
table: { caption: "Order counts by status." }
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
var MarketplaceCategoryValueVisualization = defineVisualization({
|
|
45
|
+
meta: {
|
|
46
|
+
...META,
|
|
47
|
+
key: "marketplace.visualization.category-value",
|
|
48
|
+
title: "Category Value Comparison",
|
|
49
|
+
description: "Catalog value by product category derived from current pricing and stock.",
|
|
50
|
+
goal: "Compare where the marketplace catalog is concentrated.",
|
|
51
|
+
context: "Merchandising overview."
|
|
52
|
+
},
|
|
53
|
+
source: { primary: PRODUCT_LIST_REF, resultPath: "data" },
|
|
54
|
+
visualization: {
|
|
55
|
+
kind: "cartesian",
|
|
56
|
+
variant: "bar",
|
|
57
|
+
xDimension: "category",
|
|
58
|
+
yMeasures: ["catalogValue"],
|
|
59
|
+
dimensions: [
|
|
60
|
+
{
|
|
61
|
+
key: "category",
|
|
62
|
+
label: "Category",
|
|
63
|
+
dataPath: "category",
|
|
64
|
+
type: "category"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
measures: [
|
|
68
|
+
{
|
|
69
|
+
key: "catalogValue",
|
|
70
|
+
label: "Catalog Value",
|
|
71
|
+
dataPath: "catalogValue",
|
|
72
|
+
format: "currency",
|
|
73
|
+
color: "#1d4ed8"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
table: { caption: "Catalog value by product category." }
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var MarketplaceOrderActivityVisualization = defineVisualization({
|
|
80
|
+
meta: {
|
|
81
|
+
...META,
|
|
82
|
+
key: "marketplace.visualization.order-activity",
|
|
83
|
+
title: "Recent Order Activity",
|
|
84
|
+
description: "Daily order volume from recent order creation timestamps.",
|
|
85
|
+
goal: "Show recent order activity trends.",
|
|
86
|
+
context: "Commerce operations trend monitoring."
|
|
87
|
+
},
|
|
88
|
+
source: { primary: ORDER_LIST_REF, resultPath: "data" },
|
|
89
|
+
visualization: {
|
|
90
|
+
kind: "cartesian",
|
|
91
|
+
variant: "line",
|
|
92
|
+
xDimension: "day",
|
|
93
|
+
yMeasures: ["orders"],
|
|
94
|
+
dimensions: [{ key: "day", label: "Day", dataPath: "day", type: "time" }],
|
|
95
|
+
measures: [
|
|
96
|
+
{
|
|
97
|
+
key: "orders",
|
|
98
|
+
label: "Orders",
|
|
99
|
+
dataPath: "orders",
|
|
100
|
+
format: "number",
|
|
101
|
+
color: "#0f766e"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
table: { caption: "Daily order counts." }
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
var MarketplaceVisualizationSpecs = [
|
|
108
|
+
MarketplaceOrderStatusVisualization,
|
|
109
|
+
MarketplaceCategoryValueVisualization,
|
|
110
|
+
MarketplaceOrderActivityVisualization
|
|
111
|
+
];
|
|
112
|
+
var MarketplaceVisualizationRegistry = new VisualizationRegistry([
|
|
113
|
+
...MarketplaceVisualizationSpecs
|
|
114
|
+
]);
|
|
115
|
+
var MarketplaceVisualizationRefs = MarketplaceVisualizationSpecs.map((spec) => ({
|
|
116
|
+
key: spec.meta.key,
|
|
117
|
+
version: spec.meta.version
|
|
118
|
+
}));
|
|
119
|
+
|
|
120
|
+
// src/visualizations/selectors.ts
|
|
121
|
+
function toDayKey(value) {
|
|
122
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
123
|
+
return date.toISOString().slice(0, 10);
|
|
124
|
+
}
|
|
125
|
+
function createMarketplaceVisualizationItems(products, orders) {
|
|
126
|
+
const orderStatus = new Map;
|
|
127
|
+
const orderActivity = new Map;
|
|
128
|
+
const categoryValue = new Map;
|
|
129
|
+
for (const order of orders) {
|
|
130
|
+
orderStatus.set(order.status, (orderStatus.get(order.status) ?? 0) + 1);
|
|
131
|
+
const day = toDayKey(order.createdAt);
|
|
132
|
+
orderActivity.set(day, (orderActivity.get(day) ?? 0) + 1);
|
|
133
|
+
}
|
|
134
|
+
for (const product of products) {
|
|
135
|
+
const category = product.category ?? "Uncategorized";
|
|
136
|
+
categoryValue.set(category, (categoryValue.get(category) ?? 0) + product.price * product.stock);
|
|
137
|
+
}
|
|
138
|
+
return [
|
|
139
|
+
{
|
|
140
|
+
key: "marketplace-order-status",
|
|
141
|
+
spec: MarketplaceOrderStatusVisualization,
|
|
142
|
+
data: {
|
|
143
|
+
data: Array.from(orderStatus.entries()).map(([status, count]) => ({
|
|
144
|
+
status,
|
|
145
|
+
orders: count
|
|
146
|
+
}))
|
|
147
|
+
},
|
|
148
|
+
title: "Order Status Breakdown",
|
|
149
|
+
description: "Status mix across the current order set.",
|
|
150
|
+
height: 260
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
key: "marketplace-category-value",
|
|
154
|
+
spec: MarketplaceCategoryValueVisualization,
|
|
155
|
+
data: {
|
|
156
|
+
data: Array.from(categoryValue.entries()).sort(([, left], [, right]) => right - left).map(([category, value]) => ({
|
|
157
|
+
category,
|
|
158
|
+
catalogValue: value
|
|
159
|
+
}))
|
|
160
|
+
},
|
|
161
|
+
title: "Category Value Comparison",
|
|
162
|
+
description: "Derived from current product pricing and stock."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: "marketplace-order-activity",
|
|
166
|
+
spec: MarketplaceOrderActivityVisualization,
|
|
167
|
+
data: {
|
|
168
|
+
data: Array.from(orderActivity.entries()).sort(([left], [right]) => left.localeCompare(right)).map(([day, count]) => ({ day, orders: count }))
|
|
169
|
+
},
|
|
170
|
+
title: "Recent Order Activity",
|
|
171
|
+
description: "Daily order count from current order history."
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
createMarketplaceVisualizationItems,
|
|
177
|
+
MarketplaceVisualizationSpecs,
|
|
178
|
+
MarketplaceVisualizationRegistry,
|
|
179
|
+
MarketplaceVisualizationRefs,
|
|
180
|
+
MarketplaceOrderStatusVisualization,
|
|
181
|
+
MarketplaceOrderActivityVisualization,
|
|
182
|
+
MarketplaceCategoryValueVisualization
|
|
183
|
+
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// src/visualizations/catalog.ts
|
|
2
|
+
import {
|
|
3
|
+
defineVisualization,
|
|
4
|
+
VisualizationRegistry
|
|
5
|
+
} from "@contractspec/lib.contracts-spec/visualizations";
|
|
6
|
+
var ORDER_LIST_REF = {
|
|
7
|
+
key: "marketplace.order.list",
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
};
|
|
10
|
+
var PRODUCT_LIST_REF = {
|
|
11
|
+
key: "marketplace.product.list",
|
|
12
|
+
version: "1.0.0"
|
|
13
|
+
};
|
|
14
|
+
var META = {
|
|
15
|
+
version: "1.0.0",
|
|
16
|
+
domain: "marketplace",
|
|
17
|
+
stability: "experimental",
|
|
18
|
+
owners: ["@example.marketplace"],
|
|
19
|
+
tags: ["marketplace", "visualization", "commerce"]
|
|
20
|
+
};
|
|
21
|
+
var MarketplaceOrderStatusVisualization = defineVisualization({
|
|
22
|
+
meta: {
|
|
23
|
+
...META,
|
|
24
|
+
key: "marketplace.visualization.order-status",
|
|
25
|
+
title: "Order Status Breakdown",
|
|
26
|
+
description: "Distribution of current order states.",
|
|
27
|
+
goal: "Expose delivery and backlog mix at a glance.",
|
|
28
|
+
context: "Marketplace operations overview."
|
|
29
|
+
},
|
|
30
|
+
source: { primary: ORDER_LIST_REF, resultPath: "data" },
|
|
31
|
+
visualization: {
|
|
32
|
+
kind: "pie",
|
|
33
|
+
nameDimension: "status",
|
|
34
|
+
valueMeasure: "orders",
|
|
35
|
+
dimensions: [
|
|
36
|
+
{ key: "status", label: "Status", dataPath: "status", type: "category" }
|
|
37
|
+
],
|
|
38
|
+
measures: [
|
|
39
|
+
{ key: "orders", label: "Orders", dataPath: "orders", format: "number" }
|
|
40
|
+
],
|
|
41
|
+
table: { caption: "Order counts by status." }
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
var MarketplaceCategoryValueVisualization = defineVisualization({
|
|
45
|
+
meta: {
|
|
46
|
+
...META,
|
|
47
|
+
key: "marketplace.visualization.category-value",
|
|
48
|
+
title: "Category Value Comparison",
|
|
49
|
+
description: "Catalog value by product category derived from current pricing and stock.",
|
|
50
|
+
goal: "Compare where the marketplace catalog is concentrated.",
|
|
51
|
+
context: "Merchandising overview."
|
|
52
|
+
},
|
|
53
|
+
source: { primary: PRODUCT_LIST_REF, resultPath: "data" },
|
|
54
|
+
visualization: {
|
|
55
|
+
kind: "cartesian",
|
|
56
|
+
variant: "bar",
|
|
57
|
+
xDimension: "category",
|
|
58
|
+
yMeasures: ["catalogValue"],
|
|
59
|
+
dimensions: [
|
|
60
|
+
{
|
|
61
|
+
key: "category",
|
|
62
|
+
label: "Category",
|
|
63
|
+
dataPath: "category",
|
|
64
|
+
type: "category"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
measures: [
|
|
68
|
+
{
|
|
69
|
+
key: "catalogValue",
|
|
70
|
+
label: "Catalog Value",
|
|
71
|
+
dataPath: "catalogValue",
|
|
72
|
+
format: "currency",
|
|
73
|
+
color: "#1d4ed8"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
table: { caption: "Catalog value by product category." }
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var MarketplaceOrderActivityVisualization = defineVisualization({
|
|
80
|
+
meta: {
|
|
81
|
+
...META,
|
|
82
|
+
key: "marketplace.visualization.order-activity",
|
|
83
|
+
title: "Recent Order Activity",
|
|
84
|
+
description: "Daily order volume from recent order creation timestamps.",
|
|
85
|
+
goal: "Show recent order activity trends.",
|
|
86
|
+
context: "Commerce operations trend monitoring."
|
|
87
|
+
},
|
|
88
|
+
source: { primary: ORDER_LIST_REF, resultPath: "data" },
|
|
89
|
+
visualization: {
|
|
90
|
+
kind: "cartesian",
|
|
91
|
+
variant: "line",
|
|
92
|
+
xDimension: "day",
|
|
93
|
+
yMeasures: ["orders"],
|
|
94
|
+
dimensions: [{ key: "day", label: "Day", dataPath: "day", type: "time" }],
|
|
95
|
+
measures: [
|
|
96
|
+
{
|
|
97
|
+
key: "orders",
|
|
98
|
+
label: "Orders",
|
|
99
|
+
dataPath: "orders",
|
|
100
|
+
format: "number",
|
|
101
|
+
color: "#0f766e"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
table: { caption: "Daily order counts." }
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
var MarketplaceVisualizationSpecs = [
|
|
108
|
+
MarketplaceOrderStatusVisualization,
|
|
109
|
+
MarketplaceCategoryValueVisualization,
|
|
110
|
+
MarketplaceOrderActivityVisualization
|
|
111
|
+
];
|
|
112
|
+
var MarketplaceVisualizationRegistry = new VisualizationRegistry([
|
|
113
|
+
...MarketplaceVisualizationSpecs
|
|
114
|
+
]);
|
|
115
|
+
var MarketplaceVisualizationRefs = MarketplaceVisualizationSpecs.map((spec) => ({
|
|
116
|
+
key: spec.meta.key,
|
|
117
|
+
version: spec.meta.version
|
|
118
|
+
}));
|
|
119
|
+
|
|
120
|
+
// src/visualizations/selectors.ts
|
|
121
|
+
function toDayKey(value) {
|
|
122
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
123
|
+
return date.toISOString().slice(0, 10);
|
|
124
|
+
}
|
|
125
|
+
function createMarketplaceVisualizationItems(products, orders) {
|
|
126
|
+
const orderStatus = new Map;
|
|
127
|
+
const orderActivity = new Map;
|
|
128
|
+
const categoryValue = new Map;
|
|
129
|
+
for (const order of orders) {
|
|
130
|
+
orderStatus.set(order.status, (orderStatus.get(order.status) ?? 0) + 1);
|
|
131
|
+
const day = toDayKey(order.createdAt);
|
|
132
|
+
orderActivity.set(day, (orderActivity.get(day) ?? 0) + 1);
|
|
133
|
+
}
|
|
134
|
+
for (const product of products) {
|
|
135
|
+
const category = product.category ?? "Uncategorized";
|
|
136
|
+
categoryValue.set(category, (categoryValue.get(category) ?? 0) + product.price * product.stock);
|
|
137
|
+
}
|
|
138
|
+
return [
|
|
139
|
+
{
|
|
140
|
+
key: "marketplace-order-status",
|
|
141
|
+
spec: MarketplaceOrderStatusVisualization,
|
|
142
|
+
data: {
|
|
143
|
+
data: Array.from(orderStatus.entries()).map(([status, count]) => ({
|
|
144
|
+
status,
|
|
145
|
+
orders: count
|
|
146
|
+
}))
|
|
147
|
+
},
|
|
148
|
+
title: "Order Status Breakdown",
|
|
149
|
+
description: "Status mix across the current order set.",
|
|
150
|
+
height: 260
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
key: "marketplace-category-value",
|
|
154
|
+
spec: MarketplaceCategoryValueVisualization,
|
|
155
|
+
data: {
|
|
156
|
+
data: Array.from(categoryValue.entries()).sort(([, left], [, right]) => right - left).map(([category, value]) => ({
|
|
157
|
+
category,
|
|
158
|
+
catalogValue: value
|
|
159
|
+
}))
|
|
160
|
+
},
|
|
161
|
+
title: "Category Value Comparison",
|
|
162
|
+
description: "Derived from current product pricing and stock."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: "marketplace-order-activity",
|
|
166
|
+
spec: MarketplaceOrderActivityVisualization,
|
|
167
|
+
data: {
|
|
168
|
+
data: Array.from(orderActivity.entries()).sort(([left], [right]) => left.localeCompare(right)).map(([day, count]) => ({ day, orders: count }))
|
|
169
|
+
},
|
|
170
|
+
title: "Recent Order Activity",
|
|
171
|
+
description: "Daily order count from current order history."
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
createMarketplaceVisualizationItems
|
|
177
|
+
};
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -1,115 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
export { OrderEntity, OrderItemEntity, OrderStatusEnum, PaymentStatusEnum, RefundEntity, RefundItemEntity, } from './order';
|
|
2
|
+
export { BankAccountEntity, PayoutEntity, PayoutItemEntity, PayoutScheduleEnum, PayoutSettingsEntity, PayoutStatusEnum, } from './payout';
|
|
3
|
+
export { CategoryEntity, ProductEntity, ProductStatusEnum, ProductTypeEnum, ProductVariantEntity, } from './product';
|
|
4
|
+
export { ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity, } from './review';
|
|
5
|
+
export { StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum, } from './store';
|
|
6
6
|
import type { ModuleSchemaContribution } from '@contractspec/lib.schema';
|
|
7
7
|
export declare const marketplaceEntities: (import("@contractspec/lib.schema").EntitySpec<{
|
|
8
|
-
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
9
|
-
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
10
|
-
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
11
|
-
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
12
|
-
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
13
|
-
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
14
|
-
ownerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
15
|
-
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
-
logoFileId: import("@contractspec/lib.schema").EntityScalarField;
|
|
17
|
-
bannerFileId: import("@contractspec/lib.schema").EntityScalarField;
|
|
18
|
-
email: import("@contractspec/lib.schema").EntityScalarField;
|
|
19
|
-
phone: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
-
website: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
-
country: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
-
currency: import("@contractspec/lib.schema").EntityScalarField;
|
|
23
|
-
timezone: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
-
commissionRate: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
-
isVerified: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
-
verifiedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
-
settings: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
-
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
-
totalProducts: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
-
totalOrders: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
-
totalRevenue: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
-
averageRating: import("@contractspec/lib.schema").EntityScalarField;
|
|
33
|
-
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
34
|
-
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
35
|
-
products: import("@contractspec/lib.schema").EntityRelationField;
|
|
36
|
-
orders: import("@contractspec/lib.schema").EntityRelationField;
|
|
37
|
-
payouts: import("@contractspec/lib.schema").EntityRelationField;
|
|
38
|
-
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
39
|
-
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
40
|
-
storeId: import("@contractspec/lib.schema").EntityScalarField;
|
|
41
|
-
categoryId: import("@contractspec/lib.schema").EntityScalarField;
|
|
42
|
-
isPrimary: import("@contractspec/lib.schema").EntityScalarField;
|
|
43
|
-
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
44
|
-
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
45
|
-
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
46
|
-
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
47
|
-
storeId: import("@contractspec/lib.schema").EntityScalarField;
|
|
48
|
-
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
49
|
-
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
50
|
-
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
51
|
-
shortDescription: import("@contractspec/lib.schema").EntityScalarField;
|
|
52
|
-
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
53
|
-
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
54
|
-
price: import("@contractspec/lib.schema").EntityScalarField;
|
|
55
|
-
compareAtPrice: import("@contractspec/lib.schema").EntityScalarField;
|
|
56
|
-
currency: import("@contractspec/lib.schema").EntityScalarField;
|
|
57
|
-
sku: import("@contractspec/lib.schema").EntityScalarField;
|
|
58
|
-
barcode: import("@contractspec/lib.schema").EntityScalarField;
|
|
59
|
-
quantity: import("@contractspec/lib.schema").EntityScalarField;
|
|
60
|
-
trackInventory: import("@contractspec/lib.schema").EntityScalarField;
|
|
61
|
-
allowBackorder: import("@contractspec/lib.schema").EntityScalarField;
|
|
62
|
-
lowStockThreshold: import("@contractspec/lib.schema").EntityScalarField;
|
|
63
|
-
weight: import("@contractspec/lib.schema").EntityScalarField;
|
|
64
|
-
weightUnit: import("@contractspec/lib.schema").EntityScalarField;
|
|
65
|
-
categoryId: import("@contractspec/lib.schema").EntityScalarField;
|
|
66
|
-
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
67
|
-
primaryImageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
68
|
-
seoTitle: import("@contractspec/lib.schema").EntityScalarField;
|
|
69
|
-
seoDescription: import("@contractspec/lib.schema").EntityScalarField;
|
|
70
|
-
attributes: import("@contractspec/lib.schema").EntityScalarField;
|
|
71
|
-
reviewCount: import("@contractspec/lib.schema").EntityScalarField;
|
|
72
|
-
averageRating: import("@contractspec/lib.schema").EntityScalarField;
|
|
73
|
-
totalSold: import("@contractspec/lib.schema").EntityScalarField;
|
|
74
|
-
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
75
|
-
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
76
|
-
publishedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
77
|
-
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
78
|
-
variants: import("@contractspec/lib.schema").EntityRelationField;
|
|
79
|
-
orderItems: import("@contractspec/lib.schema").EntityRelationField;
|
|
80
|
-
reviews: import("@contractspec/lib.schema").EntityRelationField;
|
|
81
|
-
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
82
|
-
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
83
|
-
productId: import("@contractspec/lib.schema").EntityScalarField;
|
|
84
|
-
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
85
|
-
options: import("@contractspec/lib.schema").EntityScalarField;
|
|
86
|
-
price: import("@contractspec/lib.schema").EntityScalarField;
|
|
87
|
-
compareAtPrice: import("@contractspec/lib.schema").EntityScalarField;
|
|
88
|
-
sku: import("@contractspec/lib.schema").EntityScalarField;
|
|
89
|
-
barcode: import("@contractspec/lib.schema").EntityScalarField;
|
|
90
|
-
quantity: import("@contractspec/lib.schema").EntityScalarField;
|
|
91
|
-
imageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
92
|
-
isActive: import("@contractspec/lib.schema").EntityScalarField;
|
|
93
|
-
position: import("@contractspec/lib.schema").EntityScalarField;
|
|
94
|
-
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
95
|
-
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
96
|
-
product: import("@contractspec/lib.schema").EntityRelationField;
|
|
97
|
-
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
98
|
-
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
99
|
-
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
100
|
-
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
101
|
-
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
102
|
-
parentId: import("@contractspec/lib.schema").EntityScalarField;
|
|
103
|
-
path: import("@contractspec/lib.schema").EntityScalarField;
|
|
104
|
-
level: import("@contractspec/lib.schema").EntityScalarField;
|
|
105
|
-
position: import("@contractspec/lib.schema").EntityScalarField;
|
|
106
|
-
imageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
107
|
-
isActive: import("@contractspec/lib.schema").EntityScalarField;
|
|
108
|
-
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
109
|
-
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
110
|
-
parent: import("@contractspec/lib.schema").EntityRelationField;
|
|
111
|
-
children: import("@contractspec/lib.schema").EntityRelationField;
|
|
112
|
-
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
113
8
|
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
114
9
|
orderNumber: import("@contractspec/lib.schema").EntityScalarField;
|
|
115
10
|
buyerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
@@ -246,6 +141,73 @@ export declare const marketplaceEntities: (import("@contractspec/lib.schema").En
|
|
|
246
141
|
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
247
142
|
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
248
143
|
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
144
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
145
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
146
|
+
storeId: import("@contractspec/lib.schema").EntityScalarField;
|
|
147
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
148
|
+
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
149
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
150
|
+
shortDescription: import("@contractspec/lib.schema").EntityScalarField;
|
|
151
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
152
|
+
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
153
|
+
price: import("@contractspec/lib.schema").EntityScalarField;
|
|
154
|
+
compareAtPrice: import("@contractspec/lib.schema").EntityScalarField;
|
|
155
|
+
currency: import("@contractspec/lib.schema").EntityScalarField;
|
|
156
|
+
sku: import("@contractspec/lib.schema").EntityScalarField;
|
|
157
|
+
barcode: import("@contractspec/lib.schema").EntityScalarField;
|
|
158
|
+
quantity: import("@contractspec/lib.schema").EntityScalarField;
|
|
159
|
+
trackInventory: import("@contractspec/lib.schema").EntityScalarField;
|
|
160
|
+
allowBackorder: import("@contractspec/lib.schema").EntityScalarField;
|
|
161
|
+
lowStockThreshold: import("@contractspec/lib.schema").EntityScalarField;
|
|
162
|
+
weight: import("@contractspec/lib.schema").EntityScalarField;
|
|
163
|
+
weightUnit: import("@contractspec/lib.schema").EntityScalarField;
|
|
164
|
+
categoryId: import("@contractspec/lib.schema").EntityScalarField;
|
|
165
|
+
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
166
|
+
primaryImageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
167
|
+
seoTitle: import("@contractspec/lib.schema").EntityScalarField;
|
|
168
|
+
seoDescription: import("@contractspec/lib.schema").EntityScalarField;
|
|
169
|
+
attributes: import("@contractspec/lib.schema").EntityScalarField;
|
|
170
|
+
reviewCount: import("@contractspec/lib.schema").EntityScalarField;
|
|
171
|
+
averageRating: import("@contractspec/lib.schema").EntityScalarField;
|
|
172
|
+
totalSold: import("@contractspec/lib.schema").EntityScalarField;
|
|
173
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
174
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
175
|
+
publishedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
176
|
+
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
177
|
+
variants: import("@contractspec/lib.schema").EntityRelationField;
|
|
178
|
+
orderItems: import("@contractspec/lib.schema").EntityRelationField;
|
|
179
|
+
reviews: import("@contractspec/lib.schema").EntityRelationField;
|
|
180
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
181
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
182
|
+
productId: import("@contractspec/lib.schema").EntityScalarField;
|
|
183
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
184
|
+
options: import("@contractspec/lib.schema").EntityScalarField;
|
|
185
|
+
price: import("@contractspec/lib.schema").EntityScalarField;
|
|
186
|
+
compareAtPrice: import("@contractspec/lib.schema").EntityScalarField;
|
|
187
|
+
sku: import("@contractspec/lib.schema").EntityScalarField;
|
|
188
|
+
barcode: import("@contractspec/lib.schema").EntityScalarField;
|
|
189
|
+
quantity: import("@contractspec/lib.schema").EntityScalarField;
|
|
190
|
+
imageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
191
|
+
isActive: import("@contractspec/lib.schema").EntityScalarField;
|
|
192
|
+
position: import("@contractspec/lib.schema").EntityScalarField;
|
|
193
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
194
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
195
|
+
product: import("@contractspec/lib.schema").EntityRelationField;
|
|
196
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
197
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
198
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
199
|
+
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
200
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
201
|
+
parentId: import("@contractspec/lib.schema").EntityScalarField;
|
|
202
|
+
path: import("@contractspec/lib.schema").EntityScalarField;
|
|
203
|
+
level: import("@contractspec/lib.schema").EntityScalarField;
|
|
204
|
+
position: import("@contractspec/lib.schema").EntityScalarField;
|
|
205
|
+
imageId: import("@contractspec/lib.schema").EntityScalarField;
|
|
206
|
+
isActive: import("@contractspec/lib.schema").EntityScalarField;
|
|
207
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
208
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
209
|
+
parent: import("@contractspec/lib.schema").EntityRelationField;
|
|
210
|
+
children: import("@contractspec/lib.schema").EntityRelationField;
|
|
249
211
|
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
250
212
|
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
251
213
|
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
@@ -299,5 +261,43 @@ export declare const marketplaceEntities: (import("@contractspec/lib.schema").En
|
|
|
299
261
|
resolution: import("@contractspec/lib.schema").EntityScalarField;
|
|
300
262
|
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
301
263
|
review: import("@contractspec/lib.schema").EntityRelationField;
|
|
264
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
265
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
266
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
267
|
+
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
268
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
269
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
270
|
+
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
271
|
+
ownerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
272
|
+
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
273
|
+
logoFileId: import("@contractspec/lib.schema").EntityScalarField;
|
|
274
|
+
bannerFileId: import("@contractspec/lib.schema").EntityScalarField;
|
|
275
|
+
email: import("@contractspec/lib.schema").EntityScalarField;
|
|
276
|
+
phone: import("@contractspec/lib.schema").EntityScalarField;
|
|
277
|
+
website: import("@contractspec/lib.schema").EntityScalarField;
|
|
278
|
+
country: import("@contractspec/lib.schema").EntityScalarField;
|
|
279
|
+
currency: import("@contractspec/lib.schema").EntityScalarField;
|
|
280
|
+
timezone: import("@contractspec/lib.schema").EntityScalarField;
|
|
281
|
+
commissionRate: import("@contractspec/lib.schema").EntityScalarField;
|
|
282
|
+
isVerified: import("@contractspec/lib.schema").EntityScalarField;
|
|
283
|
+
verifiedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
284
|
+
settings: import("@contractspec/lib.schema").EntityScalarField;
|
|
285
|
+
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
286
|
+
totalProducts: import("@contractspec/lib.schema").EntityScalarField;
|
|
287
|
+
totalOrders: import("@contractspec/lib.schema").EntityScalarField;
|
|
288
|
+
totalRevenue: import("@contractspec/lib.schema").EntityScalarField;
|
|
289
|
+
averageRating: import("@contractspec/lib.schema").EntityScalarField;
|
|
290
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
291
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
292
|
+
products: import("@contractspec/lib.schema").EntityRelationField;
|
|
293
|
+
orders: import("@contractspec/lib.schema").EntityRelationField;
|
|
294
|
+
payouts: import("@contractspec/lib.schema").EntityRelationField;
|
|
295
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
296
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
297
|
+
storeId: import("@contractspec/lib.schema").EntityScalarField;
|
|
298
|
+
categoryId: import("@contractspec/lib.schema").EntityScalarField;
|
|
299
|
+
isPrimary: import("@contractspec/lib.schema").EntityScalarField;
|
|
300
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
301
|
+
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
302
302
|
}>)[];
|
|
303
303
|
export declare const marketplaceSchemaContribution: ModuleSchemaContribution;
|