@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,83 +1,78 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema544 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/entities/review.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Review status enum.
|
|
6
3
|
*/
|
|
7
|
-
declare const ReviewStatusEnum:
|
|
4
|
+
export declare const ReviewStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
8
5
|
/**
|
|
9
6
|
* Review type enum.
|
|
10
7
|
*/
|
|
11
|
-
declare const ReviewTypeEnum:
|
|
8
|
+
export declare const ReviewTypeEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
12
9
|
/**
|
|
13
10
|
* Review entity - customer reviews and ratings.
|
|
14
11
|
*/
|
|
15
|
-
declare const ReviewEntity:
|
|
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
|
-
|
|
12
|
+
export declare const ReviewEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
13
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
14
|
+
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
15
|
+
productId: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
+
storeId: import("@contractspec/lib.schema").EntityScalarField;
|
|
17
|
+
orderId: import("@contractspec/lib.schema").EntityScalarField;
|
|
18
|
+
orderItemId: import("@contractspec/lib.schema").EntityScalarField;
|
|
19
|
+
authorId: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
+
rating: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
+
title: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
+
content: import("@contractspec/lib.schema").EntityScalarField;
|
|
23
|
+
isVerifiedPurchase: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
25
|
+
hasMedia: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
helpfulCount: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
notHelpfulCount: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
moderatedBy: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
moderatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
moderationNote: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
+
hasResponse: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
33
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
34
|
+
product: import("@contractspec/lib.schema").EntityRelationField;
|
|
35
|
+
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
36
|
+
responses: import("@contractspec/lib.schema").EntityRelationField;
|
|
37
|
+
votes: import("@contractspec/lib.schema").EntityRelationField;
|
|
41
38
|
}>;
|
|
42
39
|
/**
|
|
43
40
|
* Review response entity - seller responses to reviews.
|
|
44
41
|
*/
|
|
45
|
-
declare const ReviewResponseEntity:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
export declare const ReviewResponseEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
43
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
44
|
+
reviewId: import("@contractspec/lib.schema").EntityScalarField;
|
|
45
|
+
authorId: import("@contractspec/lib.schema").EntityScalarField;
|
|
46
|
+
content: import("@contractspec/lib.schema").EntityScalarField;
|
|
47
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
48
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
49
|
+
review: import("@contractspec/lib.schema").EntityRelationField;
|
|
53
50
|
}>;
|
|
54
51
|
/**
|
|
55
52
|
* Review vote entity - helpfulness votes.
|
|
56
53
|
*/
|
|
57
|
-
declare const ReviewVoteEntity:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
export declare const ReviewVoteEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
55
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
56
|
+
reviewId: import("@contractspec/lib.schema").EntityScalarField;
|
|
57
|
+
userId: import("@contractspec/lib.schema").EntityScalarField;
|
|
58
|
+
isHelpful: import("@contractspec/lib.schema").EntityScalarField;
|
|
59
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
60
|
+
review: import("@contractspec/lib.schema").EntityRelationField;
|
|
64
61
|
}>;
|
|
65
62
|
/**
|
|
66
63
|
* Review report entity - flagged reviews.
|
|
67
64
|
*/
|
|
68
|
-
declare const ReviewReportEntity:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
65
|
+
export declare const ReviewReportEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
66
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
67
|
+
reviewId: import("@contractspec/lib.schema").EntityScalarField;
|
|
68
|
+
reporterId: import("@contractspec/lib.schema").EntityScalarField;
|
|
69
|
+
reason: import("@contractspec/lib.schema").EntityScalarField;
|
|
70
|
+
details: import("@contractspec/lib.schema").EntityScalarField;
|
|
71
|
+
status: import("@contractspec/lib.schema").EntityScalarField;
|
|
72
|
+
resolvedBy: import("@contractspec/lib.schema").EntityScalarField;
|
|
73
|
+
resolvedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
74
|
+
resolution: import("@contractspec/lib.schema").EntityScalarField;
|
|
75
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
76
|
+
review: import("@contractspec/lib.schema").EntityRelationField;
|
|
80
77
|
}>;
|
|
81
|
-
//#endregion
|
|
82
|
-
export { ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity };
|
|
83
78
|
//# sourceMappingURL=review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/entities/review.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,gBAAgB,kDAK3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,kDAKzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;EAgEvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;EAyB/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;EAoB3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EA6B7B,CAAC"}
|
package/dist/entities/review.js
CHANGED
|
@@ -1,152 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
],
|
|
15
|
-
schema: "marketplace",
|
|
16
|
-
description: "Status of a review."
|
|
1
|
+
// @bun
|
|
2
|
+
// src/entities/review.ts
|
|
3
|
+
import {
|
|
4
|
+
defineEntity,
|
|
5
|
+
defineEntityEnum,
|
|
6
|
+
field,
|
|
7
|
+
index
|
|
8
|
+
} from "@contractspec/lib.schema";
|
|
9
|
+
var ReviewStatusEnum = defineEntityEnum({
|
|
10
|
+
name: "ReviewStatus",
|
|
11
|
+
values: ["PENDING", "APPROVED", "REJECTED", "FLAGGED"],
|
|
12
|
+
schema: "marketplace",
|
|
13
|
+
description: "Status of a review."
|
|
17
14
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
values: [
|
|
24
|
-
"PRODUCT",
|
|
25
|
-
"STORE",
|
|
26
|
-
"ORDER"
|
|
27
|
-
],
|
|
28
|
-
schema: "marketplace",
|
|
29
|
-
description: "Type of review."
|
|
15
|
+
var ReviewTypeEnum = defineEntityEnum({
|
|
16
|
+
name: "ReviewType",
|
|
17
|
+
values: ["PRODUCT", "STORE", "ORDER"],
|
|
18
|
+
schema: "marketplace",
|
|
19
|
+
description: "Type of review."
|
|
30
20
|
});
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"storeId",
|
|
74
|
-
"status",
|
|
75
|
-
"createdAt"
|
|
76
|
-
]),
|
|
77
|
-
index.on(["authorId"]),
|
|
78
|
-
index.on(["orderId"]),
|
|
79
|
-
index.on(["status"]),
|
|
80
|
-
index.on(["rating"]),
|
|
81
|
-
index.on(["isVerifiedPurchase", "status"])
|
|
82
|
-
],
|
|
83
|
-
enums: [ReviewStatusEnum, ReviewTypeEnum]
|
|
21
|
+
var ReviewEntity = defineEntity({
|
|
22
|
+
name: "Review",
|
|
23
|
+
description: "A customer review on the marketplace.",
|
|
24
|
+
schema: "marketplace",
|
|
25
|
+
map: "review",
|
|
26
|
+
fields: {
|
|
27
|
+
id: field.id({ description: "Unique review ID" }),
|
|
28
|
+
type: field.enum("ReviewType", { default: "PRODUCT" }),
|
|
29
|
+
productId: field.string({ isOptional: true }),
|
|
30
|
+
storeId: field.string({ isOptional: true }),
|
|
31
|
+
orderId: field.string({ isOptional: true }),
|
|
32
|
+
orderItemId: field.string({ isOptional: true }),
|
|
33
|
+
authorId: field.foreignKey({ description: "Reviewer user ID" }),
|
|
34
|
+
rating: field.int({ description: "Rating 1-5" }),
|
|
35
|
+
title: field.string({ isOptional: true }),
|
|
36
|
+
content: field.string({ isOptional: true }),
|
|
37
|
+
isVerifiedPurchase: field.boolean({ default: false }),
|
|
38
|
+
status: field.enum("ReviewStatus", { default: "PENDING" }),
|
|
39
|
+
hasMedia: field.boolean({ default: false }),
|
|
40
|
+
helpfulCount: field.int({ default: 0 }),
|
|
41
|
+
notHelpfulCount: field.int({ default: 0 }),
|
|
42
|
+
moderatedBy: field.string({ isOptional: true }),
|
|
43
|
+
moderatedAt: field.dateTime({ isOptional: true }),
|
|
44
|
+
moderationNote: field.string({ isOptional: true }),
|
|
45
|
+
hasResponse: field.boolean({ default: false }),
|
|
46
|
+
createdAt: field.createdAt(),
|
|
47
|
+
updatedAt: field.updatedAt(),
|
|
48
|
+
product: field.belongsTo("Product", ["productId"], ["id"]),
|
|
49
|
+
store: field.belongsTo("Store", ["storeId"], ["id"]),
|
|
50
|
+
responses: field.hasMany("ReviewResponse"),
|
|
51
|
+
votes: field.hasMany("ReviewVote")
|
|
52
|
+
},
|
|
53
|
+
indexes: [
|
|
54
|
+
index.on(["productId", "status", "createdAt"]),
|
|
55
|
+
index.on(["storeId", "status", "createdAt"]),
|
|
56
|
+
index.on(["authorId"]),
|
|
57
|
+
index.on(["orderId"]),
|
|
58
|
+
index.on(["status"]),
|
|
59
|
+
index.on(["rating"]),
|
|
60
|
+
index.on(["isVerifiedPurchase", "status"])
|
|
61
|
+
],
|
|
62
|
+
enums: [ReviewStatusEnum, ReviewTypeEnum]
|
|
84
63
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
indexes: [index.on(["reviewId"]), index.on(["authorId"])]
|
|
64
|
+
var ReviewResponseEntity = defineEntity({
|
|
65
|
+
name: "ReviewResponse",
|
|
66
|
+
description: "A seller response to a review.",
|
|
67
|
+
schema: "marketplace",
|
|
68
|
+
map: "review_response",
|
|
69
|
+
fields: {
|
|
70
|
+
id: field.id(),
|
|
71
|
+
reviewId: field.foreignKey(),
|
|
72
|
+
authorId: field.foreignKey(),
|
|
73
|
+
content: field.string(),
|
|
74
|
+
createdAt: field.createdAt(),
|
|
75
|
+
updatedAt: field.updatedAt(),
|
|
76
|
+
review: field.belongsTo("Review", ["reviewId"], ["id"], {
|
|
77
|
+
onDelete: "Cascade"
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
indexes: [index.on(["reviewId"]), index.on(["authorId"])]
|
|
103
81
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
indexes: [index.unique(["reviewId", "userId"]), index.on(["userId"])]
|
|
82
|
+
var ReviewVoteEntity = defineEntity({
|
|
83
|
+
name: "ReviewVote",
|
|
84
|
+
description: "A helpfulness vote on a review.",
|
|
85
|
+
schema: "marketplace",
|
|
86
|
+
map: "review_vote",
|
|
87
|
+
fields: {
|
|
88
|
+
id: field.id(),
|
|
89
|
+
reviewId: field.foreignKey(),
|
|
90
|
+
userId: field.foreignKey(),
|
|
91
|
+
isHelpful: field.boolean(),
|
|
92
|
+
createdAt: field.createdAt(),
|
|
93
|
+
review: field.belongsTo("Review", ["reviewId"], ["id"], {
|
|
94
|
+
onDelete: "Cascade"
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
indexes: [index.unique(["reviewId", "userId"]), index.on(["userId"])]
|
|
121
98
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
index.on(["status"]),
|
|
146
|
-
index.on(["reporterId"])
|
|
147
|
-
]
|
|
99
|
+
var ReviewReportEntity = defineEntity({
|
|
100
|
+
name: "ReviewReport",
|
|
101
|
+
description: "A report/flag on a review.",
|
|
102
|
+
schema: "marketplace",
|
|
103
|
+
map: "review_report",
|
|
104
|
+
fields: {
|
|
105
|
+
id: field.id(),
|
|
106
|
+
reviewId: field.foreignKey(),
|
|
107
|
+
reporterId: field.foreignKey(),
|
|
108
|
+
reason: field.string({ description: "Report reason category" }),
|
|
109
|
+
details: field.string({ isOptional: true }),
|
|
110
|
+
status: field.string({ default: '"PENDING"' }),
|
|
111
|
+
resolvedBy: field.string({ isOptional: true }),
|
|
112
|
+
resolvedAt: field.dateTime({ isOptional: true }),
|
|
113
|
+
resolution: field.string({ isOptional: true }),
|
|
114
|
+
createdAt: field.createdAt(),
|
|
115
|
+
review: field.belongsTo("Review", ["reviewId"], ["id"])
|
|
116
|
+
},
|
|
117
|
+
indexes: [
|
|
118
|
+
index.on(["reviewId"]),
|
|
119
|
+
index.on(["status"]),
|
|
120
|
+
index.on(["reporterId"])
|
|
121
|
+
]
|
|
148
122
|
});
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
123
|
+
export {
|
|
124
|
+
ReviewVoteEntity,
|
|
125
|
+
ReviewTypeEnum,
|
|
126
|
+
ReviewStatusEnum,
|
|
127
|
+
ReviewResponseEntity,
|
|
128
|
+
ReviewReportEntity,
|
|
129
|
+
ReviewEntity
|
|
130
|
+
};
|
package/dist/entities/store.d.ts
CHANGED
|
@@ -1,60 +1,55 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema435 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/entities/store.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Store status enum.
|
|
6
3
|
*/
|
|
7
|
-
declare const StoreStatusEnum:
|
|
4
|
+
export declare const StoreStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
8
5
|
/**
|
|
9
6
|
* Store type enum.
|
|
10
7
|
*/
|
|
11
|
-
declare const StoreTypeEnum:
|
|
8
|
+
export declare const StoreTypeEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
12
9
|
/**
|
|
13
10
|
* Store entity - a seller's storefront on the marketplace.
|
|
14
11
|
*/
|
|
15
|
-
declare const StoreEntity:
|
|
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
|
-
|
|
12
|
+
export declare const StoreEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
13
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
14
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
15
|
+
slug: import("@contractspec/lib.schema").EntityScalarField;
|
|
16
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
17
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
18
|
+
type: import("@contractspec/lib.schema").EntityEnumField;
|
|
19
|
+
ownerId: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
+
organizationId: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
+
logoFileId: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
+
bannerFileId: import("@contractspec/lib.schema").EntityScalarField;
|
|
23
|
+
email: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
phone: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
+
website: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
country: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
currency: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
timezone: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
commissionRate: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
isVerified: import("@contractspec/lib.schema").EntityScalarField;
|
|
31
|
+
verifiedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
32
|
+
settings: import("@contractspec/lib.schema").EntityScalarField;
|
|
33
|
+
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
34
|
+
totalProducts: import("@contractspec/lib.schema").EntityScalarField;
|
|
35
|
+
totalOrders: import("@contractspec/lib.schema").EntityScalarField;
|
|
36
|
+
totalRevenue: import("@contractspec/lib.schema").EntityScalarField;
|
|
37
|
+
averageRating: import("@contractspec/lib.schema").EntityScalarField;
|
|
38
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
39
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
40
|
+
products: import("@contractspec/lib.schema").EntityRelationField;
|
|
41
|
+
orders: import("@contractspec/lib.schema").EntityRelationField;
|
|
42
|
+
payouts: import("@contractspec/lib.schema").EntityRelationField;
|
|
46
43
|
}>;
|
|
47
44
|
/**
|
|
48
45
|
* Store category entity - categorization for stores.
|
|
49
46
|
*/
|
|
50
|
-
declare const StoreCategoryEntity:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
export declare const StoreCategoryEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
48
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
49
|
+
storeId: import("@contractspec/lib.schema").EntityScalarField;
|
|
50
|
+
categoryId: import("@contractspec/lib.schema").EntityScalarField;
|
|
51
|
+
isPrimary: import("@contractspec/lib.schema").EntityScalarField;
|
|
52
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
53
|
+
store: import("@contractspec/lib.schema").EntityRelationField;
|
|
57
54
|
}>;
|
|
58
|
-
//#endregion
|
|
59
|
-
export { StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum };
|
|
60
55
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/entities/store.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,eAAe,kDAK1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,kDAKxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;EAkB9B,CAAC"}
|