@contractspec/example.marketplace 1.56.1 → 1.58.0
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/dist/browser/docs/index.js +103 -0
- package/dist/browser/docs/marketplace.docblock.js +103 -0
- package/dist/browser/entities/index.js +721 -0
- package/dist/browser/entities/order.js +167 -0
- package/dist/browser/entities/payout.js +142 -0
- package/dist/browser/entities/product.js +152 -0
- package/dist/browser/entities/review.js +129 -0
- package/dist/browser/entities/store.js +97 -0
- package/dist/browser/example.js +42 -0
- package/dist/browser/handlers/index.js +303 -0
- package/dist/browser/handlers/marketplace.handlers.js +303 -0
- package/dist/browser/index.js +2016 -0
- package/dist/browser/marketplace.capability.js +40 -0
- package/dist/browser/marketplace.feature.js +137 -0
- package/dist/browser/order/index.js +307 -0
- package/dist/browser/order/order.enum.js +17 -0
- package/dist/browser/order/order.event.js +131 -0
- package/dist/browser/order/order.operations.js +172 -0
- package/dist/browser/order/order.presentation.js +153 -0
- package/dist/browser/order/order.schema.js +79 -0
- package/dist/browser/payout/index.js +152 -0
- package/dist/browser/payout/payout.enum.js +12 -0
- package/dist/browser/payout/payout.event.js +55 -0
- package/dist/browser/payout/payout.operations.js +94 -0
- package/dist/browser/payout/payout.presentation.js +111 -0
- package/dist/browser/payout/payout.schema.js +61 -0
- package/dist/browser/product/index.js +249 -0
- package/dist/browser/product/product.enum.js +13 -0
- package/dist/browser/product/product.event.js +74 -0
- package/dist/browser/product/product.operations.js +171 -0
- package/dist/browser/product/product.presentation.js +158 -0
- package/dist/browser/product/product.schema.js +84 -0
- package/dist/browser/review/index.js +206 -0
- package/dist/browser/review/review.enum.js +11 -0
- package/dist/browser/review/review.event.js +50 -0
- package/dist/browser/review/review.operations.js +152 -0
- package/dist/browser/review/review.presentation.js +123 -0
- package/dist/browser/review/review.schema.js +74 -0
- package/dist/browser/seeders/index.js +12 -0
- package/dist/browser/store/index.js +142 -0
- package/dist/browser/store/store.enum.js +11 -0
- package/dist/browser/store/store.event.js +52 -0
- package/dist/browser/store/store.operations.js +88 -0
- package/dist/browser/store/store.presentation.js +94 -0
- package/dist/browser/store/store.schema.js +43 -0
- package/dist/browser/tests/operations.test-spec.js +139 -0
- package/dist/browser/ui/MarketplaceDashboard.js +418 -0
- package/dist/browser/ui/hooks/index.js +59 -0
- package/dist/browser/ui/hooks/useMarketplaceData.js +56 -0
- package/dist/browser/ui/index.js +668 -0
- package/dist/browser/ui/renderers/index.js +248 -0
- package/dist/browser/ui/renderers/marketplace.markdown.js +248 -0
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +104 -1
- package/dist/docs/marketplace.docblock.d.ts +2 -1
- package/dist/docs/marketplace.docblock.d.ts.map +1 -0
- package/dist/docs/marketplace.docblock.js +46 -57
- package/dist/entities/index.d.ts +302 -307
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +719 -43
- package/dist/entities/order.d.ts +77 -82
- package/dist/entities/order.d.ts.map +1 -1
- package/dist/entities/order.js +162 -167
- package/dist/entities/payout.d.ts +64 -69
- package/dist/entities/payout.d.ts.map +1 -1
- package/dist/entities/payout.js +137 -156
- package/dist/entities/product.d.ts +69 -74
- package/dist/entities/product.d.ts.map +1 -1
- package/dist/entities/product.js +148 -156
- package/dist/entities/review.d.ts +55 -60
- package/dist/entities/review.d.ts.map +1 -1
- package/dist/entities/review.js +124 -146
- package/dist/entities/store.d.ts +40 -45
- package/dist/entities/store.d.ts.map +1 -1
- package/dist/entities/store.js +94 -106
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +40 -55
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +304 -3
- package/dist/handlers/marketplace.handlers.d.ts +138 -138
- package/dist/handlers/marketplace.handlers.d.ts.map +1 -1
- package/dist/handlers/marketplace.handlers.js +284 -309
- package/dist/index.d.ts +13 -31
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2017 -32
- package/dist/marketplace.capability.d.ts +3 -8
- package/dist/marketplace.capability.d.ts.map +1 -1
- package/dist/marketplace.capability.js +41 -34
- package/dist/marketplace.feature.d.ts +1 -7
- package/dist/marketplace.feature.d.ts.map +1 -1
- package/dist/marketplace.feature.js +136 -313
- package/dist/node/docs/index.js +103 -0
- package/dist/node/docs/marketplace.docblock.js +103 -0
- package/dist/node/entities/index.js +721 -0
- package/dist/node/entities/order.js +167 -0
- package/dist/node/entities/payout.js +142 -0
- package/dist/node/entities/product.js +152 -0
- package/dist/node/entities/review.js +129 -0
- package/dist/node/entities/store.js +97 -0
- package/dist/node/example.js +42 -0
- package/dist/node/handlers/index.js +303 -0
- package/dist/node/handlers/marketplace.handlers.js +303 -0
- package/dist/node/index.js +2016 -0
- package/dist/node/marketplace.capability.js +40 -0
- package/dist/node/marketplace.feature.js +137 -0
- package/dist/node/order/index.js +307 -0
- package/dist/node/order/order.enum.js +17 -0
- package/dist/node/order/order.event.js +131 -0
- package/dist/node/order/order.operations.js +172 -0
- package/dist/node/order/order.presentation.js +153 -0
- package/dist/node/order/order.schema.js +79 -0
- package/dist/node/payout/index.js +152 -0
- package/dist/node/payout/payout.enum.js +12 -0
- package/dist/node/payout/payout.event.js +55 -0
- package/dist/node/payout/payout.operations.js +94 -0
- package/dist/node/payout/payout.presentation.js +111 -0
- package/dist/node/payout/payout.schema.js +61 -0
- package/dist/node/product/index.js +249 -0
- package/dist/node/product/product.enum.js +13 -0
- package/dist/node/product/product.event.js +74 -0
- package/dist/node/product/product.operations.js +171 -0
- package/dist/node/product/product.presentation.js +158 -0
- package/dist/node/product/product.schema.js +84 -0
- package/dist/node/review/index.js +206 -0
- package/dist/node/review/review.enum.js +11 -0
- package/dist/node/review/review.event.js +50 -0
- package/dist/node/review/review.operations.js +152 -0
- package/dist/node/review/review.presentation.js +123 -0
- package/dist/node/review/review.schema.js +74 -0
- package/dist/node/seeders/index.js +12 -0
- package/dist/node/store/index.js +142 -0
- package/dist/node/store/store.enum.js +11 -0
- package/dist/node/store/store.event.js +52 -0
- package/dist/node/store/store.operations.js +88 -0
- package/dist/node/store/store.presentation.js +94 -0
- package/dist/node/store/store.schema.js +43 -0
- package/dist/node/tests/operations.test-spec.js +139 -0
- package/dist/node/ui/MarketplaceDashboard.js +418 -0
- package/dist/node/ui/hooks/index.js +59 -0
- package/dist/node/ui/hooks/useMarketplaceData.js +56 -0
- package/dist/node/ui/index.js +668 -0
- package/dist/node/ui/renderers/index.js +248 -0
- package/dist/node/ui/renderers/marketplace.markdown.js +248 -0
- package/dist/order/index.d.ts +8 -5
- package/dist/order/index.d.ts.map +1 -0
- package/dist/order/index.js +307 -5
- package/dist/order/order.enum.d.ts +1 -6
- package/dist/order/order.enum.d.ts.map +1 -1
- package/dist/order/order.enum.js +16 -20
- package/dist/order/order.event.d.ts +133 -139
- package/dist/order/order.event.d.ts.map +1 -1
- package/dist/order/order.event.js +121 -205
- package/dist/order/order.operations.d.ts +291 -297
- package/dist/order/order.operations.d.ts.map +1 -1
- package/dist/order/order.operations.js +169 -115
- package/dist/order/order.presentation.d.ts +3 -8
- package/dist/order/order.presentation.d.ts.map +1 -1
- package/dist/order/order.presentation.js +149 -81
- package/dist/order/order.schema.d.ts +143 -148
- package/dist/order/order.schema.d.ts.map +1 -1
- package/dist/order/order.schema.js +75 -150
- package/dist/payout/index.d.ts +8 -5
- package/dist/payout/index.d.ts.map +1 -0
- package/dist/payout/index.js +152 -5
- package/dist/payout/payout.enum.d.ts +1 -6
- package/dist/payout/payout.enum.d.ts.map +1 -1
- package/dist/payout/payout.enum.js +11 -15
- package/dist/payout/payout.event.d.ts +54 -60
- package/dist/payout/payout.event.d.ts.map +1 -1
- package/dist/payout/payout.event.js +51 -87
- package/dist/payout/payout.operations.d.ts +82 -88
- package/dist/payout/payout.operations.d.ts.map +1 -1
- package/dist/payout/payout.operations.js +92 -50
- package/dist/payout/payout.presentation.d.ts +2 -7
- package/dist/payout/payout.presentation.d.ts.map +1 -1
- package/dist/payout/payout.presentation.js +108 -56
- package/dist/payout/payout.schema.d.ts +139 -144
- package/dist/payout/payout.schema.d.ts.map +1 -1
- package/dist/payout/payout.schema.js +58 -112
- package/dist/product/index.d.ts +8 -5
- package/dist/product/index.d.ts.map +1 -0
- package/dist/product/index.js +249 -5
- package/dist/product/product.enum.d.ts +1 -6
- package/dist/product/product.enum.d.ts.map +1 -1
- package/dist/product/product.enum.js +12 -16
- package/dist/product/product.event.d.ts +63 -69
- package/dist/product/product.event.d.ts.map +1 -1
- package/dist/product/product.event.js +68 -113
- package/dist/product/product.operations.d.ts +225 -231
- package/dist/product/product.operations.d.ts.map +1 -1
- package/dist/product/product.operations.js +168 -104
- package/dist/product/product.presentation.d.ts +3 -8
- package/dist/product/product.presentation.d.ts.map +1 -1
- package/dist/product/product.presentation.js +154 -81
- package/dist/product/product.schema.d.ts +196 -201
- package/dist/product/product.schema.d.ts.map +1 -1
- package/dist/product/product.schema.js +80 -171
- package/dist/review/index.d.ts +8 -5
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/index.js +206 -5
- package/dist/review/review.enum.d.ts +1 -6
- package/dist/review/review.enum.d.ts.map +1 -1
- package/dist/review/review.enum.js +10 -14
- package/dist/review/review.event.d.ts +46 -52
- package/dist/review/review.event.d.ts.map +1 -1
- package/dist/review/review.event.js +46 -79
- package/dist/review/review.operations.d.ts +190 -196
- package/dist/review/review.operations.d.ts.map +1 -1
- package/dist/review/review.operations.js +149 -102
- package/dist/review/review.presentation.d.ts +2 -7
- package/dist/review/review.presentation.d.ts.map +1 -1
- package/dist/review/review.presentation.js +120 -56
- package/dist/review/review.schema.d.ts +164 -169
- package/dist/review/review.schema.d.ts.map +1 -1
- package/dist/review/review.schema.js +70 -151
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +11 -16
- package/dist/store/index.d.ts +8 -5
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +142 -5
- package/dist/store/store.enum.d.ts +1 -6
- package/dist/store/store.enum.d.ts.map +1 -1
- package/dist/store/store.enum.js +10 -14
- package/dist/store/store.event.d.ts +42 -48
- package/dist/store/store.event.d.ts.map +1 -1
- package/dist/store/store.event.js +48 -75
- package/dist/store/store.operations.d.ts +98 -104
- package/dist/store/store.operations.d.ts.map +1 -1
- package/dist/store/store.operations.js +86 -58
- package/dist/store/store.presentation.d.ts +2 -7
- package/dist/store/store.presentation.d.ts.map +1 -1
- package/dist/store/store.presentation.js +91 -56
- package/dist/store/store.schema.d.ts +70 -75
- package/dist/store/store.schema.d.ts.map +1 -1
- package/dist/store/store.schema.js +41 -90
- package/dist/tests/operations.test-spec.d.ts +5 -10
- package/dist/tests/operations.test-spec.d.ts.map +1 -1
- package/dist/tests/operations.test-spec.js +134 -146
- package/dist/ui/MarketplaceDashboard.d.ts +1 -6
- package/dist/ui/MarketplaceDashboard.d.ts.map +1 -1
- package/dist/ui/MarketplaceDashboard.js +413 -313
- package/dist/ui/hooks/index.d.ts +2 -2
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +59 -4
- package/dist/ui/hooks/useMarketplaceData.d.ts +16 -20
- package/dist/ui/hooks/useMarketplaceData.d.ts.map +1 -1
- package/dist/ui/hooks/useMarketplaceData.js +53 -60
- package/dist/ui/index.d.ts +7 -6
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +668 -5
- package/dist/ui/renderers/index.d.ts +2 -2
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +249 -3
- package/dist/ui/renderers/marketplace.markdown.d.ts +13 -15
- package/dist/ui/renderers/marketplace.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/marketplace.markdown.js +241 -236
- package/package.json +529 -110
- package/dist/docs/marketplace.docblock.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/entities/order.js.map +0 -1
- package/dist/entities/payout.js.map +0 -1
- package/dist/entities/product.js.map +0 -1
- package/dist/entities/review.js.map +0 -1
- package/dist/entities/store.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/marketplace.handlers.js.map +0 -1
- package/dist/marketplace.capability.js.map +0 -1
- package/dist/marketplace.feature.js.map +0 -1
- package/dist/order/order.enum.js.map +0 -1
- package/dist/order/order.event.js.map +0 -1
- package/dist/order/order.operations.js.map +0 -1
- package/dist/order/order.presentation.js.map +0 -1
- package/dist/order/order.schema.js.map +0 -1
- package/dist/payout/payout.enum.js.map +0 -1
- package/dist/payout/payout.event.js.map +0 -1
- package/dist/payout/payout.operations.js.map +0 -1
- package/dist/payout/payout.presentation.js.map +0 -1
- package/dist/payout/payout.schema.js.map +0 -1
- package/dist/product/product.enum.js.map +0 -1
- package/dist/product/product.event.js.map +0 -1
- package/dist/product/product.operations.js.map +0 -1
- package/dist/product/product.presentation.js.map +0 -1
- package/dist/product/product.schema.js.map +0 -1
- package/dist/review/review.enum.js.map +0 -1
- package/dist/review/review.event.js.map +0 -1
- package/dist/review/review.operations.js.map +0 -1
- package/dist/review/review.presentation.js.map +0 -1
- package/dist/review/review.schema.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/store/store.enum.js.map +0 -1
- package/dist/store/store.event.js.map +0 -1
- package/dist/store/store.operations.js.map +0 -1
- package/dist/store/store.presentation.js.map +0 -1
- package/dist/store/store.schema.js.map +0 -1
- package/dist/tests/operations.test-spec.js.map +0 -1
- package/dist/ui/MarketplaceDashboard.js.map +0 -1
- package/dist/ui/hooks/useMarketplaceData.js.map +0 -1
- package/dist/ui/renderers/marketplace.markdown.js.map +0 -1
|
@@ -1,190 +1,185 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema1030 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/review/review.schema.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* A customer review.
|
|
6
3
|
*/
|
|
7
|
-
declare const ReviewModel:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
4
|
+
export declare const ReviewModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
id: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
productId: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: true;
|
|
12
|
+
};
|
|
13
|
+
storeId: {
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
15
|
+
isOptional: true;
|
|
16
|
+
};
|
|
17
|
+
authorId: {
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
rating: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
title: {
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
29
|
+
content: {
|
|
30
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
31
|
+
isOptional: true;
|
|
32
|
+
};
|
|
33
|
+
status: {
|
|
34
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
35
|
+
isOptional: false;
|
|
36
|
+
};
|
|
37
|
+
isVerifiedPurchase: {
|
|
38
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
41
|
+
helpfulCount: {
|
|
42
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
43
|
+
isOptional: false;
|
|
44
|
+
};
|
|
45
|
+
hasResponse: {
|
|
46
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
47
|
+
isOptional: false;
|
|
48
|
+
};
|
|
49
|
+
createdAt: {
|
|
50
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
51
|
+
isOptional: false;
|
|
52
|
+
};
|
|
56
53
|
}>;
|
|
57
54
|
/**
|
|
58
55
|
* Input for creating a review.
|
|
59
56
|
*/
|
|
60
|
-
declare const CreateReviewInputModel:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
57
|
+
export declare const CreateReviewInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
58
|
+
productId: {
|
|
59
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
60
|
+
isOptional: true;
|
|
61
|
+
};
|
|
62
|
+
storeId: {
|
|
63
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
64
|
+
isOptional: true;
|
|
65
|
+
};
|
|
66
|
+
orderId: {
|
|
67
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
68
|
+
isOptional: true;
|
|
69
|
+
};
|
|
70
|
+
rating: {
|
|
71
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
72
|
+
isOptional: false;
|
|
73
|
+
};
|
|
74
|
+
title: {
|
|
75
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
76
|
+
isOptional: true;
|
|
77
|
+
};
|
|
78
|
+
content: {
|
|
79
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
80
|
+
isOptional: true;
|
|
81
|
+
};
|
|
85
82
|
}>;
|
|
86
83
|
/**
|
|
87
84
|
* Input for listing reviews.
|
|
88
85
|
*/
|
|
89
|
-
declare const ListReviewsInputModel:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
isOptional: true;
|
|
93
|
-
};
|
|
94
|
-
storeId: {
|
|
95
|
-
type: _contractspec_lib_schema1030.FieldType<string, string>;
|
|
96
|
-
isOptional: true;
|
|
97
|
-
};
|
|
98
|
-
status: {
|
|
99
|
-
type: _contractspec_lib_schema1030.EnumType<[string, string, string, string]>;
|
|
100
|
-
isOptional: true;
|
|
101
|
-
};
|
|
102
|
-
minRating: {
|
|
103
|
-
type: _contractspec_lib_schema1030.FieldType<number, number>;
|
|
104
|
-
isOptional: true;
|
|
105
|
-
};
|
|
106
|
-
limit: {
|
|
107
|
-
type: _contractspec_lib_schema1030.FieldType<number, number>;
|
|
108
|
-
isOptional: true;
|
|
109
|
-
defaultValue: number;
|
|
110
|
-
};
|
|
111
|
-
offset: {
|
|
112
|
-
type: _contractspec_lib_schema1030.FieldType<number, number>;
|
|
113
|
-
isOptional: true;
|
|
114
|
-
defaultValue: number;
|
|
115
|
-
};
|
|
116
|
-
}>;
|
|
117
|
-
/**
|
|
118
|
-
* Output for listing reviews.
|
|
119
|
-
*/
|
|
120
|
-
declare const ListReviewsOutputModel: _contractspec_lib_schema1030.SchemaModel<{
|
|
121
|
-
reviews: {
|
|
122
|
-
type: _contractspec_lib_schema1030.SchemaModel<{
|
|
123
|
-
id: {
|
|
124
|
-
type: _contractspec_lib_schema1030.FieldType<string, string>;
|
|
125
|
-
isOptional: false;
|
|
126
|
-
};
|
|
127
|
-
productId: {
|
|
128
|
-
type: _contractspec_lib_schema1030.FieldType<string, string>;
|
|
86
|
+
export declare const ListReviewsInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
87
|
+
productId: {
|
|
88
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
129
89
|
isOptional: true;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
type:
|
|
90
|
+
};
|
|
91
|
+
storeId: {
|
|
92
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
133
93
|
isOptional: true;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
type:
|
|
137
|
-
isOptional: false;
|
|
138
|
-
};
|
|
139
|
-
rating: {
|
|
140
|
-
type: _contractspec_lib_schema1030.FieldType<number, number>;
|
|
141
|
-
isOptional: false;
|
|
142
|
-
};
|
|
143
|
-
title: {
|
|
144
|
-
type: _contractspec_lib_schema1030.FieldType<string, string>;
|
|
94
|
+
};
|
|
95
|
+
status: {
|
|
96
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
145
97
|
isOptional: true;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
type:
|
|
98
|
+
};
|
|
99
|
+
minRating: {
|
|
100
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
149
101
|
isOptional: true;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
type:
|
|
153
|
-
isOptional:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
102
|
+
};
|
|
103
|
+
limit: {
|
|
104
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
105
|
+
isOptional: true;
|
|
106
|
+
defaultValue: number;
|
|
107
|
+
};
|
|
108
|
+
offset: {
|
|
109
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
110
|
+
isOptional: true;
|
|
111
|
+
defaultValue: number;
|
|
112
|
+
};
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Output for listing reviews.
|
|
116
|
+
*/
|
|
117
|
+
export declare const ListReviewsOutputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
118
|
+
reviews: {
|
|
119
|
+
type: import("@contractspec/lib.schema").SchemaModel<{
|
|
120
|
+
id: {
|
|
121
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
122
|
+
isOptional: false;
|
|
123
|
+
};
|
|
124
|
+
productId: {
|
|
125
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
126
|
+
isOptional: true;
|
|
127
|
+
};
|
|
128
|
+
storeId: {
|
|
129
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
130
|
+
isOptional: true;
|
|
131
|
+
};
|
|
132
|
+
authorId: {
|
|
133
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
134
|
+
isOptional: false;
|
|
135
|
+
};
|
|
136
|
+
rating: {
|
|
137
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
138
|
+
isOptional: false;
|
|
139
|
+
};
|
|
140
|
+
title: {
|
|
141
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
142
|
+
isOptional: true;
|
|
143
|
+
};
|
|
144
|
+
content: {
|
|
145
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
146
|
+
isOptional: true;
|
|
147
|
+
};
|
|
148
|
+
status: {
|
|
149
|
+
type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
|
|
150
|
+
isOptional: false;
|
|
151
|
+
};
|
|
152
|
+
isVerifiedPurchase: {
|
|
153
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
154
|
+
isOptional: false;
|
|
155
|
+
};
|
|
156
|
+
helpfulCount: {
|
|
157
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
158
|
+
isOptional: false;
|
|
159
|
+
};
|
|
160
|
+
hasResponse: {
|
|
161
|
+
type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
|
|
162
|
+
isOptional: false;
|
|
163
|
+
};
|
|
164
|
+
createdAt: {
|
|
165
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
166
|
+
isOptional: false;
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
isArray: true;
|
|
157
170
|
isOptional: false;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
type:
|
|
171
|
+
};
|
|
172
|
+
total: {
|
|
173
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
161
174
|
isOptional: false;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
type:
|
|
175
|
+
};
|
|
176
|
+
averageRating: {
|
|
177
|
+
type: import("@contractspec/lib.schema").FieldType<number, number>;
|
|
165
178
|
isOptional: false;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
type:
|
|
179
|
+
};
|
|
180
|
+
ratingDistribution: {
|
|
181
|
+
type: import("@contractspec/lib.schema").FieldType<unknown, unknown>;
|
|
169
182
|
isOptional: false;
|
|
170
|
-
|
|
171
|
-
}>;
|
|
172
|
-
isArray: true;
|
|
173
|
-
isOptional: false;
|
|
174
|
-
};
|
|
175
|
-
total: {
|
|
176
|
-
type: _contractspec_lib_schema1030.FieldType<number, number>;
|
|
177
|
-
isOptional: false;
|
|
178
|
-
};
|
|
179
|
-
averageRating: {
|
|
180
|
-
type: _contractspec_lib_schema1030.FieldType<number, number>;
|
|
181
|
-
isOptional: false;
|
|
182
|
-
};
|
|
183
|
-
ratingDistribution: {
|
|
184
|
-
type: _contractspec_lib_schema1030.FieldType<unknown, unknown>;
|
|
185
|
-
isOptional: false;
|
|
186
|
-
};
|
|
183
|
+
};
|
|
187
184
|
}>;
|
|
188
|
-
//#endregion
|
|
189
|
-
export { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel };
|
|
190
185
|
//# sourceMappingURL=review.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.schema.d.ts","
|
|
1
|
+
{"version":3,"file":"review.schema.d.ts","sourceRoot":"","sources":["../../src/review/review.schema.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;EAUjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQjC,CAAC"}
|
|
@@ -1,156 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/review/review.enum.ts
|
|
3
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var ReviewStatusEnum = defineEnum("ReviewStatus", [
|
|
5
|
+
"PENDING",
|
|
6
|
+
"APPROVED",
|
|
7
|
+
"REJECTED",
|
|
8
|
+
"FLAGGED"
|
|
9
|
+
]);
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
authorId: {
|
|
25
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
-
isOptional: false
|
|
27
|
-
},
|
|
28
|
-
rating: {
|
|
29
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
30
|
-
isOptional: false
|
|
31
|
-
},
|
|
32
|
-
title: {
|
|
33
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
34
|
-
isOptional: true
|
|
35
|
-
},
|
|
36
|
-
content: {
|
|
37
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
-
isOptional: true
|
|
39
|
-
},
|
|
40
|
-
status: {
|
|
41
|
-
type: ReviewStatusEnum,
|
|
42
|
-
isOptional: false
|
|
43
|
-
},
|
|
44
|
-
isVerifiedPurchase: {
|
|
45
|
-
type: ScalarTypeEnum.Boolean(),
|
|
46
|
-
isOptional: false
|
|
47
|
-
},
|
|
48
|
-
helpfulCount: {
|
|
49
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
50
|
-
isOptional: false
|
|
51
|
-
},
|
|
52
|
-
hasResponse: {
|
|
53
|
-
type: ScalarTypeEnum.Boolean(),
|
|
54
|
-
isOptional: false
|
|
55
|
-
},
|
|
56
|
-
createdAt: {
|
|
57
|
-
type: ScalarTypeEnum.DateTime(),
|
|
58
|
-
isOptional: false
|
|
59
|
-
}
|
|
60
|
-
}
|
|
11
|
+
// src/review/review.schema.ts
|
|
12
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
13
|
+
var ReviewModel = defineSchemaModel({
|
|
14
|
+
name: "ReviewModel",
|
|
15
|
+
description: "A customer review",
|
|
16
|
+
fields: {
|
|
17
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
18
|
+
productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
19
|
+
storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
20
|
+
authorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
+
rating: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
22
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
23
|
+
content: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
24
|
+
status: { type: ReviewStatusEnum, isOptional: false },
|
|
25
|
+
isVerifiedPurchase: { type: ScalarTypeEnum.Boolean(), isOptional: false },
|
|
26
|
+
helpfulCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
27
|
+
hasResponse: { type: ScalarTypeEnum.Boolean(), isOptional: false },
|
|
28
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
29
|
+
}
|
|
61
30
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
storeId: {
|
|
73
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
74
|
-
isOptional: true
|
|
75
|
-
},
|
|
76
|
-
orderId: {
|
|
77
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
78
|
-
isOptional: true
|
|
79
|
-
},
|
|
80
|
-
rating: {
|
|
81
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
82
|
-
isOptional: false
|
|
83
|
-
},
|
|
84
|
-
title: {
|
|
85
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
-
isOptional: true
|
|
87
|
-
},
|
|
88
|
-
content: {
|
|
89
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
90
|
-
isOptional: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
31
|
+
var CreateReviewInputModel = defineSchemaModel({
|
|
32
|
+
name: "CreateReviewInput",
|
|
33
|
+
fields: {
|
|
34
|
+
productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
35
|
+
storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
36
|
+
orderId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
37
|
+
rating: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
38
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
39
|
+
content: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
40
|
+
}
|
|
93
41
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
minRating: {
|
|
113
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
114
|
-
isOptional: true
|
|
115
|
-
},
|
|
116
|
-
limit: {
|
|
117
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
118
|
-
isOptional: true,
|
|
119
|
-
defaultValue: 20
|
|
120
|
-
},
|
|
121
|
-
offset: {
|
|
122
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
123
|
-
isOptional: true,
|
|
124
|
-
defaultValue: 0
|
|
125
|
-
}
|
|
126
|
-
}
|
|
42
|
+
var ListReviewsInputModel = defineSchemaModel({
|
|
43
|
+
name: "ListReviewsInput",
|
|
44
|
+
fields: {
|
|
45
|
+
productId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
46
|
+
storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
47
|
+
status: { type: ReviewStatusEnum, isOptional: true },
|
|
48
|
+
minRating: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
49
|
+
limit: {
|
|
50
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
51
|
+
isOptional: true,
|
|
52
|
+
defaultValue: 20
|
|
53
|
+
},
|
|
54
|
+
offset: {
|
|
55
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
56
|
+
isOptional: true,
|
|
57
|
+
defaultValue: 0
|
|
58
|
+
}
|
|
59
|
+
}
|
|
127
60
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
isArray: true,
|
|
137
|
-
isOptional: false
|
|
138
|
-
},
|
|
139
|
-
total: {
|
|
140
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
141
|
-
isOptional: false
|
|
142
|
-
},
|
|
143
|
-
averageRating: {
|
|
144
|
-
type: ScalarTypeEnum.Float_unsecure(),
|
|
145
|
-
isOptional: false
|
|
146
|
-
},
|
|
147
|
-
ratingDistribution: {
|
|
148
|
-
type: ScalarTypeEnum.JSON(),
|
|
149
|
-
isOptional: false
|
|
150
|
-
}
|
|
151
|
-
}
|
|
61
|
+
var ListReviewsOutputModel = defineSchemaModel({
|
|
62
|
+
name: "ListReviewsOutput",
|
|
63
|
+
fields: {
|
|
64
|
+
reviews: { type: ReviewModel, isArray: true, isOptional: false },
|
|
65
|
+
total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
66
|
+
averageRating: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
|
|
67
|
+
ratingDistribution: { type: ScalarTypeEnum.JSON(), isOptional: false }
|
|
68
|
+
}
|
|
152
69
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
70
|
+
export {
|
|
71
|
+
ReviewModel,
|
|
72
|
+
ListReviewsOutputModel,
|
|
73
|
+
ListReviewsInputModel,
|
|
74
|
+
CreateReviewInputModel
|
|
75
|
+
};
|
package/dist/seeders/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { DatabasePort } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
projectId: string;
|
|
6
|
-
db: DatabasePort;
|
|
1
|
+
import type { DatabasePort } from '@contractspec/lib.runtime-sandbox';
|
|
2
|
+
export declare function seedMarketplace(params: {
|
|
3
|
+
projectId: string;
|
|
4
|
+
db: DatabasePort;
|
|
7
5
|
}): Promise<void>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { seedMarketplace };
|
|
10
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seeders/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,wBAAsB,eAAe,CAAC,MAAM,EAAE;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,YAAY,CAAC;CAClB,iBAcA"}
|
package/dist/seeders/index.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/seeders/index.ts
|
|
2
3
|
async function seedMarketplace(params) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"org_demo",
|
|
10
|
-
"Demo Store",
|
|
11
|
-
"A demo store",
|
|
12
|
-
"ACTIVE"
|
|
13
|
-
]);
|
|
4
|
+
const { projectId, db } = params;
|
|
5
|
+
const existing = await db.query(`SELECT COUNT(*) as count FROM marketplace_store WHERE "projectId" = $1`, [projectId]);
|
|
6
|
+
if (existing.rows[0]?.count > 0)
|
|
7
|
+
return;
|
|
8
|
+
await db.execute(`INSERT INTO marketplace_store (id, "projectId", "organizationId", name, description, status)
|
|
9
|
+
VALUES ($1, $2, $3, $4, $5, $6)`, ["store_1", projectId, "org_demo", "Demo Store", "A demo store", "ACTIVE"]);
|
|
14
10
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
11
|
+
export {
|
|
12
|
+
seedMarketplace
|
|
13
|
+
};
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
1
|
+
/**
|
|
2
|
+
* Store domain - Seller store management.
|
|
3
|
+
*/
|
|
4
|
+
export { StoreStatusEnum } from './store.enum';
|
|
5
|
+
export { StoreModel, CreateStoreInputModel } from './store.schema';
|
|
6
|
+
export { CreateStoreContract } from './store.operations';
|
|
7
|
+
export { StoreCreatedEvent, StoreStatusChangedEvent } from './store.event';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
|