@contractspec/example.marketplace 0.0.0-canary-20260113170453
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/LICENSE +21 -0
- package/README.md +141 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/marketplace.docblock.d.ts +1 -0
- package/dist/docs/marketplace.docblock.js +115 -0
- package/dist/docs/marketplace.docblock.js.map +1 -0
- package/dist/entities/index.d.ts +309 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +46 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/order.d.ts +105 -0
- package/dist/entities/order.d.ts.map +1 -0
- package/dist/entities/order.js +173 -0
- package/dist/entities/order.js.map +1 -0
- package/dist/entities/payout.d.ts +92 -0
- package/dist/entities/payout.d.ts.map +1 -0
- package/dist/entities/payout.js +162 -0
- package/dist/entities/payout.js.map +1 -0
- package/dist/entities/product.d.ts +93 -0
- package/dist/entities/product.d.ts.map +1 -0
- package/dist/entities/product.js +161 -0
- package/dist/entities/product.js.map +1 -0
- package/dist/entities/review.d.ts +83 -0
- package/dist/entities/review.d.ts.map +1 -0
- package/dist/entities/review.js +152 -0
- package/dist/entities/review.js.map +1 -0
- package/dist/entities/store.d.ts +60 -0
- package/dist/entities/store.d.ts.map +1 -0
- package/dist/entities/store.js +110 -0
- package/dist/entities/store.js.map +1 -0
- package/dist/example.d.ts +7 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +58 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/marketplace.handlers.d.ts +155 -0
- package/dist/handlers/marketplace.handlers.d.ts.map +1 -0
- package/dist/handlers/marketplace.handlers.js +329 -0
- package/dist/handlers/marketplace.handlers.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +32 -0
- package/dist/marketplace.capability.d.ts +9 -0
- package/dist/marketplace.capability.d.ts.map +1 -0
- package/dist/marketplace.capability.js +34 -0
- package/dist/marketplace.capability.js.map +1 -0
- package/dist/marketplace.feature.d.ts +12 -0
- package/dist/marketplace.feature.d.ts.map +1 -0
- package/dist/marketplace.feature.js +315 -0
- package/dist/marketplace.feature.js.map +1 -0
- package/dist/order/index.d.ts +5 -0
- package/dist/order/index.js +6 -0
- package/dist/order/order.enum.d.ts +10 -0
- package/dist/order/order.enum.d.ts.map +1 -0
- package/dist/order/order.enum.js +22 -0
- package/dist/order/order.enum.js.map +1 -0
- package/dist/order/order.event.d.ts +145 -0
- package/dist/order/order.event.d.ts.map +1 -0
- package/dist/order/order.event.js +216 -0
- package/dist/order/order.event.js.map +1 -0
- package/dist/order/order.operations.d.ts +368 -0
- package/dist/order/order.operations.d.ts.map +1 -0
- package/dist/order/order.operations.js +119 -0
- package/dist/order/order.operations.js.map +1 -0
- package/dist/order/order.presentation.d.ts +9 -0
- package/dist/order/order.presentation.d.ts.map +1 -0
- package/dist/order/order.presentation.js +86 -0
- package/dist/order/order.presentation.js.map +1 -0
- package/dist/order/order.schema.d.ts +165 -0
- package/dist/order/order.schema.d.ts.map +1 -0
- package/dist/order/order.schema.js +155 -0
- package/dist/order/order.schema.js.map +1 -0
- package/dist/payout/index.d.ts +5 -0
- package/dist/payout/index.js +6 -0
- package/dist/payout/payout.enum.d.ts +10 -0
- package/dist/payout/payout.enum.d.ts.map +1 -0
- package/dist/payout/payout.enum.js +17 -0
- package/dist/payout/payout.enum.js.map +1 -0
- package/dist/payout/payout.event.d.ts +63 -0
- package/dist/payout/payout.event.d.ts.map +1 -0
- package/dist/payout/payout.event.js +92 -0
- package/dist/payout/payout.event.js.map +1 -0
- package/dist/payout/payout.operations.d.ts +97 -0
- package/dist/payout/payout.operations.d.ts.map +1 -0
- package/dist/payout/payout.operations.js +53 -0
- package/dist/payout/payout.operations.js.map +1 -0
- package/dist/payout/payout.presentation.d.ts +8 -0
- package/dist/payout/payout.presentation.d.ts.map +1 -0
- package/dist/payout/payout.presentation.js +60 -0
- package/dist/payout/payout.presentation.js.map +1 -0
- package/dist/payout/payout.schema.d.ts +157 -0
- package/dist/payout/payout.schema.d.ts.map +1 -0
- package/dist/payout/payout.schema.js +116 -0
- package/dist/payout/payout.schema.js.map +1 -0
- package/dist/product/index.d.ts +5 -0
- package/dist/product/index.js +6 -0
- package/dist/product/product.enum.d.ts +10 -0
- package/dist/product/product.enum.d.ts.map +1 -0
- package/dist/product/product.enum.js +18 -0
- package/dist/product/product.enum.js.map +1 -0
- package/dist/product/product.event.d.ts +73 -0
- package/dist/product/product.event.d.ts.map +1 -0
- package/dist/product/product.event.js +120 -0
- package/dist/product/product.event.js.map +1 -0
- package/dist/product/product.operations.d.ts +273 -0
- package/dist/product/product.operations.d.ts.map +1 -0
- package/dist/product/product.operations.js +108 -0
- package/dist/product/product.operations.js.map +1 -0
- package/dist/product/product.presentation.d.ts +9 -0
- package/dist/product/product.presentation.d.ts.map +1 -0
- package/dist/product/product.presentation.js +86 -0
- package/dist/product/product.presentation.js.map +1 -0
- package/dist/product/product.schema.d.ts +218 -0
- package/dist/product/product.schema.d.ts.map +1 -0
- package/dist/product/product.schema.js +176 -0
- package/dist/product/product.schema.js.map +1 -0
- package/dist/review/index.d.ts +5 -0
- package/dist/review/index.js +6 -0
- package/dist/review/review.enum.d.ts +10 -0
- package/dist/review/review.enum.d.ts.map +1 -0
- package/dist/review/review.enum.js +16 -0
- package/dist/review/review.enum.js.map +1 -0
- package/dist/review/review.event.d.ts +55 -0
- package/dist/review/review.event.d.ts.map +1 -0
- package/dist/review/review.event.js +84 -0
- package/dist/review/review.event.js.map +1 -0
- package/dist/review/review.operations.d.ts +237 -0
- package/dist/review/review.operations.d.ts.map +1 -0
- package/dist/review/review.operations.js +106 -0
- package/dist/review/review.operations.js.map +1 -0
- package/dist/review/review.presentation.d.ts +8 -0
- package/dist/review/review.presentation.d.ts.map +1 -0
- package/dist/review/review.presentation.js +60 -0
- package/dist/review/review.presentation.js.map +1 -0
- package/dist/review/review.schema.d.ts +190 -0
- package/dist/review/review.schema.d.ts.map +1 -0
- package/dist/review/review.schema.js +156 -0
- package/dist/review/review.schema.js.map +1 -0
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +18 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/store/index.d.ts +5 -0
- package/dist/store/index.js +6 -0
- package/dist/store/store.enum.d.ts +10 -0
- package/dist/store/store.enum.d.ts.map +1 -0
- package/dist/store/store.enum.js +16 -0
- package/dist/store/store.enum.js.map +1 -0
- package/dist/store/store.event.d.ts +51 -0
- package/dist/store/store.event.d.ts.map +1 -0
- package/dist/store/store.event.js +80 -0
- package/dist/store/store.event.js.map +1 -0
- package/dist/store/store.operations.d.ts +131 -0
- package/dist/store/store.operations.d.ts.map +1 -0
- package/dist/store/store.operations.js +61 -0
- package/dist/store/store.operations.js.map +1 -0
- package/dist/store/store.presentation.d.ts +8 -0
- package/dist/store/store.presentation.d.ts.map +1 -0
- package/dist/store/store.presentation.js +60 -0
- package/dist/store/store.presentation.js.map +1 -0
- package/dist/store/store.schema.d.ts +84 -0
- package/dist/store/store.schema.d.ts.map +1 -0
- package/dist/store/store.schema.js +93 -0
- package/dist/store/store.schema.js.map +1 -0
- package/dist/tests/operations.test-spec.d.ts +11 -0
- package/dist/tests/operations.test-spec.d.ts.map +1 -0
- package/dist/tests/operations.test-spec.js +152 -0
- package/dist/tests/operations.test-spec.js.map +1 -0
- package/dist/ui/MarketplaceDashboard.d.ts +7 -0
- package/dist/ui/MarketplaceDashboard.d.ts.map +1 -0
- package/dist/ui/MarketplaceDashboard.js +319 -0
- package/dist/ui/MarketplaceDashboard.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +2 -0
- package/dist/ui/hooks/index.js +5 -0
- package/dist/ui/hooks/useMarketplaceData.d.ts +23 -0
- package/dist/ui/hooks/useMarketplaceData.d.ts.map +1 -0
- package/dist/ui/hooks/useMarketplaceData.js +64 -0
- package/dist/ui/hooks/useMarketplaceData.js.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/renderers/index.d.ts +2 -0
- package/dist/ui/renderers/index.js +3 -0
- package/dist/ui/renderers/marketplace.markdown.d.ts +28 -0
- package/dist/ui/renderers/marketplace.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/marketplace.markdown.js +244 -0
- package/dist/ui/renderers/marketplace.markdown.js.map +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ProductModel } from "./product.schema.js";
|
|
2
|
+
import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/product/product.presentation.ts
|
|
5
|
+
const ProductCatalogPresentation = definePresentation({
|
|
6
|
+
meta: {
|
|
7
|
+
key: "marketplace.product.catalog",
|
|
8
|
+
version: "1.0.0",
|
|
9
|
+
title: "Product Catalog",
|
|
10
|
+
description: "Product catalog with search and filters",
|
|
11
|
+
domain: "marketplace",
|
|
12
|
+
owners: ["@marketplace-team"],
|
|
13
|
+
tags: [
|
|
14
|
+
"marketplace",
|
|
15
|
+
"product",
|
|
16
|
+
"catalog"
|
|
17
|
+
],
|
|
18
|
+
stability: StabilityEnum.Experimental,
|
|
19
|
+
goal: "Enable users to browse and search for products.",
|
|
20
|
+
context: "The primary shopping interface."
|
|
21
|
+
},
|
|
22
|
+
source: {
|
|
23
|
+
type: "component",
|
|
24
|
+
framework: "react",
|
|
25
|
+
componentKey: "ProductCatalog",
|
|
26
|
+
props: ProductModel
|
|
27
|
+
},
|
|
28
|
+
targets: ["react", "markdown"],
|
|
29
|
+
policy: { flags: ["marketplace.products.enabled"] }
|
|
30
|
+
});
|
|
31
|
+
const ProductDetailPresentation = definePresentation({
|
|
32
|
+
meta: {
|
|
33
|
+
key: "marketplace.product.detail",
|
|
34
|
+
version: "1.0.0",
|
|
35
|
+
title: "Product Details",
|
|
36
|
+
description: "Product detail page with images and reviews",
|
|
37
|
+
domain: "marketplace",
|
|
38
|
+
owners: ["@marketplace-team"],
|
|
39
|
+
tags: [
|
|
40
|
+
"marketplace",
|
|
41
|
+
"product",
|
|
42
|
+
"detail"
|
|
43
|
+
],
|
|
44
|
+
stability: StabilityEnum.Experimental,
|
|
45
|
+
goal: "Provide comprehensive information about a specific product.",
|
|
46
|
+
context: "Product showcase including images, descriptions, and ratings."
|
|
47
|
+
},
|
|
48
|
+
source: {
|
|
49
|
+
type: "component",
|
|
50
|
+
framework: "react",
|
|
51
|
+
componentKey: "ProductDetail",
|
|
52
|
+
props: ProductModel
|
|
53
|
+
},
|
|
54
|
+
targets: ["react", "markdown"],
|
|
55
|
+
policy: { flags: ["marketplace.products.enabled"] }
|
|
56
|
+
});
|
|
57
|
+
const ProductEditorPresentation = definePresentation({
|
|
58
|
+
meta: {
|
|
59
|
+
key: "marketplace.product.editor",
|
|
60
|
+
version: "1.0.0",
|
|
61
|
+
title: "Product Editor",
|
|
62
|
+
description: "Product editor for sellers",
|
|
63
|
+
domain: "marketplace",
|
|
64
|
+
owners: ["@marketplace-team"],
|
|
65
|
+
tags: [
|
|
66
|
+
"marketplace",
|
|
67
|
+
"product",
|
|
68
|
+
"editor"
|
|
69
|
+
],
|
|
70
|
+
stability: StabilityEnum.Experimental,
|
|
71
|
+
goal: "Allow sellers to create and modify product listings.",
|
|
72
|
+
context: "Management tool for store owners."
|
|
73
|
+
},
|
|
74
|
+
source: {
|
|
75
|
+
type: "component",
|
|
76
|
+
framework: "react",
|
|
77
|
+
componentKey: "ProductEditor",
|
|
78
|
+
props: ProductModel
|
|
79
|
+
},
|
|
80
|
+
targets: ["react"],
|
|
81
|
+
policy: { flags: ["marketplace.seller.enabled"] }
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
export { ProductCatalogPresentation, ProductDetailPresentation, ProductEditorPresentation };
|
|
86
|
+
//# sourceMappingURL=product.presentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.presentation.js","names":[],"sources":["../../src/product/product.presentation.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { ProductModel } from './product.schema';\n\nexport const ProductCatalogPresentation = definePresentation({\n meta: {\n key: 'marketplace.product.catalog',\n version: '1.0.0',\n title: 'Product Catalog',\n description: 'Product catalog with search and filters',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product', 'catalog'],\n stability: StabilityEnum.Experimental,\n goal: 'Enable users to browse and search for products.',\n context: 'The primary shopping interface.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProductCatalog',\n props: ProductModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['marketplace.products.enabled'],\n },\n});\n\nexport const ProductDetailPresentation = definePresentation({\n meta: {\n key: 'marketplace.product.detail',\n version: '1.0.0',\n title: 'Product Details',\n description: 'Product detail page with images and reviews',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide comprehensive information about a specific product.',\n context: 'Product showcase including images, descriptions, and ratings.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProductDetail',\n props: ProductModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['marketplace.products.enabled'],\n },\n});\n\nexport const ProductEditorPresentation = definePresentation({\n meta: {\n key: 'marketplace.product.editor',\n version: '1.0.0',\n title: 'Product Editor',\n description: 'Product editor for sellers',\n domain: 'marketplace',\n owners: ['@marketplace-team'],\n tags: ['marketplace', 'product', 'editor'],\n stability: StabilityEnum.Experimental,\n goal: 'Allow sellers to create and modify product listings.',\n context: 'Management tool for store owners.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProductEditor',\n props: ProductModel,\n },\n targets: ['react'],\n policy: {\n flags: ['marketplace.seller.enabled'],\n },\n});\n"],"mappings":";;;;AAGA,MAAa,6BAA6B,mBAAmB;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAW;GAAU;EAC3C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC;AAEF,MAAa,4BAA4B,mBAAmB;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAW;GAAS;EAC1C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,+BAA+B,EACxC;CACF,CAAC;AAEF,MAAa,4BAA4B,mBAAmB;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAW;GAAS;EAC1C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,6BAA6B,EACtC;CACF,CAAC"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema285 from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/product/product.schema.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A product listing.
|
|
6
|
+
*/
|
|
7
|
+
declare const ProductModel: _contractspec_lib_schema285.SchemaModel<{
|
|
8
|
+
id: {
|
|
9
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
10
|
+
isOptional: false;
|
|
11
|
+
};
|
|
12
|
+
storeId: {
|
|
13
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
14
|
+
isOptional: false;
|
|
15
|
+
};
|
|
16
|
+
name: {
|
|
17
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
18
|
+
isOptional: false;
|
|
19
|
+
};
|
|
20
|
+
slug: {
|
|
21
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
22
|
+
isOptional: false;
|
|
23
|
+
};
|
|
24
|
+
description: {
|
|
25
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
26
|
+
isOptional: true;
|
|
27
|
+
};
|
|
28
|
+
status: {
|
|
29
|
+
type: _contractspec_lib_schema285.EnumType<[string, string, string, string, string, string]>;
|
|
30
|
+
isOptional: false;
|
|
31
|
+
};
|
|
32
|
+
price: {
|
|
33
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
currency: {
|
|
37
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
39
|
+
};
|
|
40
|
+
quantity: {
|
|
41
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
44
|
+
categoryId: {
|
|
45
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
46
|
+
isOptional: true;
|
|
47
|
+
};
|
|
48
|
+
primaryImageId: {
|
|
49
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
50
|
+
isOptional: true;
|
|
51
|
+
};
|
|
52
|
+
averageRating: {
|
|
53
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
54
|
+
isOptional: false;
|
|
55
|
+
};
|
|
56
|
+
totalSold: {
|
|
57
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
58
|
+
isOptional: false;
|
|
59
|
+
};
|
|
60
|
+
createdAt: {
|
|
61
|
+
type: _contractspec_lib_schema285.FieldType<Date, string>;
|
|
62
|
+
isOptional: false;
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Input for creating a product.
|
|
67
|
+
*/
|
|
68
|
+
declare const CreateProductInputModel: _contractspec_lib_schema285.SchemaModel<{
|
|
69
|
+
storeId: {
|
|
70
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
71
|
+
isOptional: false;
|
|
72
|
+
};
|
|
73
|
+
name: {
|
|
74
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
75
|
+
isOptional: false;
|
|
76
|
+
};
|
|
77
|
+
slug: {
|
|
78
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
79
|
+
isOptional: false;
|
|
80
|
+
};
|
|
81
|
+
description: {
|
|
82
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
83
|
+
isOptional: true;
|
|
84
|
+
};
|
|
85
|
+
price: {
|
|
86
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
87
|
+
isOptional: false;
|
|
88
|
+
};
|
|
89
|
+
currency: {
|
|
90
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
91
|
+
isOptional: true;
|
|
92
|
+
};
|
|
93
|
+
quantity: {
|
|
94
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
95
|
+
isOptional: true;
|
|
96
|
+
};
|
|
97
|
+
categoryId: {
|
|
98
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
99
|
+
isOptional: true;
|
|
100
|
+
};
|
|
101
|
+
sku: {
|
|
102
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
103
|
+
isOptional: true;
|
|
104
|
+
};
|
|
105
|
+
}>;
|
|
106
|
+
/**
|
|
107
|
+
* Input for listing products.
|
|
108
|
+
*/
|
|
109
|
+
declare const ListProductsInputModel: _contractspec_lib_schema285.SchemaModel<{
|
|
110
|
+
storeId: {
|
|
111
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
112
|
+
isOptional: true;
|
|
113
|
+
};
|
|
114
|
+
categoryId: {
|
|
115
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
116
|
+
isOptional: true;
|
|
117
|
+
};
|
|
118
|
+
status: {
|
|
119
|
+
type: _contractspec_lib_schema285.EnumType<[string, string, string, string, string, string]>;
|
|
120
|
+
isOptional: true;
|
|
121
|
+
};
|
|
122
|
+
search: {
|
|
123
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
124
|
+
isOptional: true;
|
|
125
|
+
};
|
|
126
|
+
minPrice: {
|
|
127
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
128
|
+
isOptional: true;
|
|
129
|
+
};
|
|
130
|
+
maxPrice: {
|
|
131
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
132
|
+
isOptional: true;
|
|
133
|
+
};
|
|
134
|
+
limit: {
|
|
135
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
136
|
+
isOptional: true;
|
|
137
|
+
defaultValue: number;
|
|
138
|
+
};
|
|
139
|
+
offset: {
|
|
140
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
141
|
+
isOptional: true;
|
|
142
|
+
defaultValue: number;
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
145
|
+
/**
|
|
146
|
+
* Output for listing products.
|
|
147
|
+
*/
|
|
148
|
+
declare const ListProductsOutputModel: _contractspec_lib_schema285.SchemaModel<{
|
|
149
|
+
products: {
|
|
150
|
+
type: _contractspec_lib_schema285.SchemaModel<{
|
|
151
|
+
id: {
|
|
152
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
153
|
+
isOptional: false;
|
|
154
|
+
};
|
|
155
|
+
storeId: {
|
|
156
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
157
|
+
isOptional: false;
|
|
158
|
+
};
|
|
159
|
+
name: {
|
|
160
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
161
|
+
isOptional: false;
|
|
162
|
+
};
|
|
163
|
+
slug: {
|
|
164
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
165
|
+
isOptional: false;
|
|
166
|
+
};
|
|
167
|
+
description: {
|
|
168
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
169
|
+
isOptional: true;
|
|
170
|
+
};
|
|
171
|
+
status: {
|
|
172
|
+
type: _contractspec_lib_schema285.EnumType<[string, string, string, string, string, string]>;
|
|
173
|
+
isOptional: false;
|
|
174
|
+
};
|
|
175
|
+
price: {
|
|
176
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
177
|
+
isOptional: false;
|
|
178
|
+
};
|
|
179
|
+
currency: {
|
|
180
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
181
|
+
isOptional: false;
|
|
182
|
+
};
|
|
183
|
+
quantity: {
|
|
184
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
185
|
+
isOptional: false;
|
|
186
|
+
};
|
|
187
|
+
categoryId: {
|
|
188
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
189
|
+
isOptional: true;
|
|
190
|
+
};
|
|
191
|
+
primaryImageId: {
|
|
192
|
+
type: _contractspec_lib_schema285.FieldType<string, string>;
|
|
193
|
+
isOptional: true;
|
|
194
|
+
};
|
|
195
|
+
averageRating: {
|
|
196
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
197
|
+
isOptional: false;
|
|
198
|
+
};
|
|
199
|
+
totalSold: {
|
|
200
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
201
|
+
isOptional: false;
|
|
202
|
+
};
|
|
203
|
+
createdAt: {
|
|
204
|
+
type: _contractspec_lib_schema285.FieldType<Date, string>;
|
|
205
|
+
isOptional: false;
|
|
206
|
+
};
|
|
207
|
+
}>;
|
|
208
|
+
isArray: true;
|
|
209
|
+
isOptional: false;
|
|
210
|
+
};
|
|
211
|
+
total: {
|
|
212
|
+
type: _contractspec_lib_schema285.FieldType<number, number>;
|
|
213
|
+
isOptional: false;
|
|
214
|
+
};
|
|
215
|
+
}>;
|
|
216
|
+
//#endregion
|
|
217
|
+
export { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel };
|
|
218
|
+
//# sourceMappingURL=product.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.schema.d.ts","names":[],"sources":["../../src/product/product.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,YAsBX,8BAtBuB,WAsBvB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;;;;;;;;EAtBuB,WAAA,EAAA;IA2BZ,IAAA,uCAaX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;;;;EAbkC,QAAA,EAAA;IAkBvB,IAAA,uCAoBX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;EApBiC,CAAA;EAyBtB,cAAA,EAAA;IAMX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAjDW,qDAAuB;;UAalC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,oDAAsB;;UAoBjC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,qDAAuB;;;;cAMlC,2BAAA,CAAA"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { ProductStatusEnum } from "./product.enum.js";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
|
+
|
|
4
|
+
//#region src/product/product.schema.ts
|
|
5
|
+
/**
|
|
6
|
+
* A product listing.
|
|
7
|
+
*/
|
|
8
|
+
const ProductModel = defineSchemaModel({
|
|
9
|
+
name: "ProductModel",
|
|
10
|
+
description: "A product listing",
|
|
11
|
+
fields: {
|
|
12
|
+
id: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
storeId: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
name: {
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
+
isOptional: false
|
|
23
|
+
},
|
|
24
|
+
slug: {
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
+
isOptional: false
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
+
isOptional: true
|
|
31
|
+
},
|
|
32
|
+
status: {
|
|
33
|
+
type: ProductStatusEnum,
|
|
34
|
+
isOptional: false
|
|
35
|
+
},
|
|
36
|
+
price: {
|
|
37
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
currency: {
|
|
41
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
},
|
|
44
|
+
quantity: {
|
|
45
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
},
|
|
48
|
+
categoryId: {
|
|
49
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
+
isOptional: true
|
|
51
|
+
},
|
|
52
|
+
primaryImageId: {
|
|
53
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
54
|
+
isOptional: true
|
|
55
|
+
},
|
|
56
|
+
averageRating: {
|
|
57
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
58
|
+
isOptional: false
|
|
59
|
+
},
|
|
60
|
+
totalSold: {
|
|
61
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
62
|
+
isOptional: false
|
|
63
|
+
},
|
|
64
|
+
createdAt: {
|
|
65
|
+
type: ScalarTypeEnum.DateTime(),
|
|
66
|
+
isOptional: false
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Input for creating a product.
|
|
72
|
+
*/
|
|
73
|
+
const CreateProductInputModel = defineSchemaModel({
|
|
74
|
+
name: "CreateProductInput",
|
|
75
|
+
fields: {
|
|
76
|
+
storeId: {
|
|
77
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
78
|
+
isOptional: false
|
|
79
|
+
},
|
|
80
|
+
name: {
|
|
81
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
82
|
+
isOptional: false
|
|
83
|
+
},
|
|
84
|
+
slug: {
|
|
85
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
86
|
+
isOptional: false
|
|
87
|
+
},
|
|
88
|
+
description: {
|
|
89
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
90
|
+
isOptional: true
|
|
91
|
+
},
|
|
92
|
+
price: {
|
|
93
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
94
|
+
isOptional: false
|
|
95
|
+
},
|
|
96
|
+
currency: {
|
|
97
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
98
|
+
isOptional: true
|
|
99
|
+
},
|
|
100
|
+
quantity: {
|
|
101
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
102
|
+
isOptional: true
|
|
103
|
+
},
|
|
104
|
+
categoryId: {
|
|
105
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
106
|
+
isOptional: true
|
|
107
|
+
},
|
|
108
|
+
sku: {
|
|
109
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
110
|
+
isOptional: true
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
/**
|
|
115
|
+
* Input for listing products.
|
|
116
|
+
*/
|
|
117
|
+
const ListProductsInputModel = defineSchemaModel({
|
|
118
|
+
name: "ListProductsInput",
|
|
119
|
+
fields: {
|
|
120
|
+
storeId: {
|
|
121
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
122
|
+
isOptional: true
|
|
123
|
+
},
|
|
124
|
+
categoryId: {
|
|
125
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
+
isOptional: true
|
|
127
|
+
},
|
|
128
|
+
status: {
|
|
129
|
+
type: ProductStatusEnum,
|
|
130
|
+
isOptional: true
|
|
131
|
+
},
|
|
132
|
+
search: {
|
|
133
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
134
|
+
isOptional: true
|
|
135
|
+
},
|
|
136
|
+
minPrice: {
|
|
137
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
138
|
+
isOptional: true
|
|
139
|
+
},
|
|
140
|
+
maxPrice: {
|
|
141
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
142
|
+
isOptional: true
|
|
143
|
+
},
|
|
144
|
+
limit: {
|
|
145
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
146
|
+
isOptional: true,
|
|
147
|
+
defaultValue: 20
|
|
148
|
+
},
|
|
149
|
+
offset: {
|
|
150
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
151
|
+
isOptional: true,
|
|
152
|
+
defaultValue: 0
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
/**
|
|
157
|
+
* Output for listing products.
|
|
158
|
+
*/
|
|
159
|
+
const ListProductsOutputModel = defineSchemaModel({
|
|
160
|
+
name: "ListProductsOutput",
|
|
161
|
+
fields: {
|
|
162
|
+
products: {
|
|
163
|
+
type: ProductModel,
|
|
164
|
+
isArray: true,
|
|
165
|
+
isOptional: false
|
|
166
|
+
},
|
|
167
|
+
total: {
|
|
168
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
169
|
+
isOptional: false
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
//#endregion
|
|
175
|
+
export { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel };
|
|
176
|
+
//# sourceMappingURL=product.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.schema.js","names":[],"sources":["../../src/product/product.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { ProductStatusEnum } from './product.enum';\n\n/**\n * A product listing.\n */\nexport const ProductModel = defineSchemaModel({\n name: 'ProductModel',\n description: 'A product listing',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ProductStatusEnum, isOptional: false },\n price: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n quantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n categoryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n primaryImageId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n averageRating: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n totalSold: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a product.\n */\nexport const CreateProductInputModel = defineSchemaModel({\n name: 'CreateProductInput',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n price: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n quantity: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n categoryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sku: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for listing products.\n */\nexport const ListProductsInputModel = defineSchemaModel({\n name: 'ListProductsInput',\n fields: {\n storeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n categoryId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ProductStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n minPrice: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n maxPrice: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing products.\n */\nexport const ListProductsOutputModel = defineSchemaModel({\n name: 'ListProductsOutput',\n fields: {\n products: { type: ProductModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n"],"mappings":";;;;;;;AAMA,MAAa,eAAe,kBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,QAAQ;GAAE,MAAM;GAAmB,YAAY;GAAO;EACtD,OAAO;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACpE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,eAAe;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAC3E,WAAW;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACrE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,kBAAkB;CACvD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAClE,MAAM;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAClE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,OAAO;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACnE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,KAAK;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,kBAAkB;CACtD,MAAM;CACN,QAAQ;EACN,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,QAAQ;GAAE,MAAM;GAAmB,YAAY;GAAM;EACrD,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAM;EACrE,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAM;EACrE,OAAO;GACL,MAAM,eAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACD,QAAQ;GACN,MAAM,eAAe,cAAc;GACnC,YAAY;GACZ,cAAc;GACf;EACF;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,kBAAkB;CACvD,MAAM;CACN,QAAQ;EACN,UAAU;GAAE,MAAM;GAAc,SAAS;GAAM,YAAY;GAAO;EAClE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAClE;CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReviewStatusEnum } from "./review.enum.js";
|
|
2
|
+
import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review.schema.js";
|
|
3
|
+
import { CreateReviewContract, ListReviewsContract } from "./review.operations.js";
|
|
4
|
+
import { ReviewCreatedEvent, ReviewRespondedEvent } from "./review.event.js";
|
|
5
|
+
export { CreateReviewContract, CreateReviewInputModel, ListReviewsContract, ListReviewsInputModel, ListReviewsOutputModel, ReviewCreatedEvent, ReviewModel, ReviewRespondedEvent, ReviewStatusEnum };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReviewStatusEnum } from "./review.enum.js";
|
|
2
|
+
import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review.schema.js";
|
|
3
|
+
import { CreateReviewContract, ListReviewsContract } from "./review.operations.js";
|
|
4
|
+
import { ReviewCreatedEvent, ReviewRespondedEvent } from "./review.event.js";
|
|
5
|
+
|
|
6
|
+
export { CreateReviewContract, CreateReviewInputModel, ListReviewsContract, ListReviewsInputModel, ListReviewsOutputModel, ReviewCreatedEvent, ReviewModel, ReviewRespondedEvent, ReviewStatusEnum };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema373 from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/review/review.enum.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Review status enum.
|
|
6
|
+
*/
|
|
7
|
+
declare const ReviewStatusEnum: _contractspec_lib_schema373.EnumType<[string, string, string, string]>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ReviewStatusEnum };
|
|
10
|
+
//# sourceMappingURL=review.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.enum.d.ts","names":[],"sources":["../../src/review/review.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,gBAKX,EAAA,2BAAA,CAL2B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/review/review.enum.ts
|
|
4
|
+
/**
|
|
5
|
+
* Review status enum.
|
|
6
|
+
*/
|
|
7
|
+
const ReviewStatusEnum = defineEnum("ReviewStatus", [
|
|
8
|
+
"PENDING",
|
|
9
|
+
"APPROVED",
|
|
10
|
+
"REJECTED",
|
|
11
|
+
"FLAGGED"
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ReviewStatusEnum };
|
|
16
|
+
//# sourceMappingURL=review.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.enum.js","names":[],"sources":["../../src/review/review.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Review status enum.\n */\nexport const ReviewStatusEnum = defineEnum('ReviewStatus', [\n 'PENDING',\n 'APPROVED',\n 'REJECTED',\n 'FLAGGED',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB,WAAW,gBAAgB;CACzD;CACA;CACA;CACA;CACD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts26 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema374 from "@contractspec/lib.schema";
|
|
3
|
+
|
|
4
|
+
//#region src/review/review.event.d.ts
|
|
5
|
+
declare const ReviewCreatedEvent: _contractspec_lib_contracts26.EventSpec<_contractspec_lib_schema374.SchemaModel<{
|
|
6
|
+
reviewId: {
|
|
7
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
9
|
+
};
|
|
10
|
+
productId: {
|
|
11
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
12
|
+
isOptional: true;
|
|
13
|
+
};
|
|
14
|
+
storeId: {
|
|
15
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
16
|
+
isOptional: true;
|
|
17
|
+
};
|
|
18
|
+
authorId: {
|
|
19
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
20
|
+
isOptional: false;
|
|
21
|
+
};
|
|
22
|
+
rating: {
|
|
23
|
+
type: _contractspec_lib_schema374.FieldType<number, number>;
|
|
24
|
+
isOptional: false;
|
|
25
|
+
};
|
|
26
|
+
isVerifiedPurchase: {
|
|
27
|
+
type: _contractspec_lib_schema374.FieldType<boolean, boolean>;
|
|
28
|
+
isOptional: false;
|
|
29
|
+
};
|
|
30
|
+
timestamp: {
|
|
31
|
+
type: _contractspec_lib_schema374.FieldType<Date, string>;
|
|
32
|
+
isOptional: false;
|
|
33
|
+
};
|
|
34
|
+
}>>;
|
|
35
|
+
declare const ReviewRespondedEvent: _contractspec_lib_contracts26.EventSpec<_contractspec_lib_schema374.SchemaModel<{
|
|
36
|
+
reviewId: {
|
|
37
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
39
|
+
};
|
|
40
|
+
responseId: {
|
|
41
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
44
|
+
authorId: {
|
|
45
|
+
type: _contractspec_lib_schema374.FieldType<string, string>;
|
|
46
|
+
isOptional: false;
|
|
47
|
+
};
|
|
48
|
+
timestamp: {
|
|
49
|
+
type: _contractspec_lib_schema374.FieldType<Date, string>;
|
|
50
|
+
isOptional: false;
|
|
51
|
+
};
|
|
52
|
+
}>>;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ReviewCreatedEvent, ReviewRespondedEvent };
|
|
55
|
+
//# sourceMappingURL=review.event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.event.d.ts","names":[],"sources":["../../src/review/review.event.ts"],"sourcesContent":[],"mappings":";;;;cA0Ba,oBAAkB,6BAAA,CAAA,sCAAA;;UAU7B,2BAAA,CAAA;;EAVW,CAAA;EAUX,SAAA,EAAA;;;;;;;;;IAV6B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAYlB,CAAA;EAUX,MAAA,EAAA;;;;;+CAV+B,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;;;;;;cAApB,sBAAoB,6BAAA,CAAA,sCAAA;;UAU/B,2BAAA,CAAA"}
|