@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.
Files changed (188) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -0
  3. package/dist/docs/index.d.ts +1 -0
  4. package/dist/docs/index.js +1 -0
  5. package/dist/docs/marketplace.docblock.d.ts +1 -0
  6. package/dist/docs/marketplace.docblock.js +115 -0
  7. package/dist/docs/marketplace.docblock.js.map +1 -0
  8. package/dist/entities/index.d.ts +309 -0
  9. package/dist/entities/index.d.ts.map +1 -0
  10. package/dist/entities/index.js +46 -0
  11. package/dist/entities/index.js.map +1 -0
  12. package/dist/entities/order.d.ts +105 -0
  13. package/dist/entities/order.d.ts.map +1 -0
  14. package/dist/entities/order.js +173 -0
  15. package/dist/entities/order.js.map +1 -0
  16. package/dist/entities/payout.d.ts +92 -0
  17. package/dist/entities/payout.d.ts.map +1 -0
  18. package/dist/entities/payout.js +162 -0
  19. package/dist/entities/payout.js.map +1 -0
  20. package/dist/entities/product.d.ts +93 -0
  21. package/dist/entities/product.d.ts.map +1 -0
  22. package/dist/entities/product.js +161 -0
  23. package/dist/entities/product.js.map +1 -0
  24. package/dist/entities/review.d.ts +83 -0
  25. package/dist/entities/review.d.ts.map +1 -0
  26. package/dist/entities/review.js +152 -0
  27. package/dist/entities/review.js.map +1 -0
  28. package/dist/entities/store.d.ts +60 -0
  29. package/dist/entities/store.d.ts.map +1 -0
  30. package/dist/entities/store.js +110 -0
  31. package/dist/entities/store.js.map +1 -0
  32. package/dist/example.d.ts +7 -0
  33. package/dist/example.d.ts.map +1 -0
  34. package/dist/example.js +58 -0
  35. package/dist/example.js.map +1 -0
  36. package/dist/handlers/index.d.ts +2 -0
  37. package/dist/handlers/index.js +3 -0
  38. package/dist/handlers/marketplace.handlers.d.ts +155 -0
  39. package/dist/handlers/marketplace.handlers.d.ts.map +1 -0
  40. package/dist/handlers/marketplace.handlers.js +329 -0
  41. package/dist/handlers/marketplace.handlers.js.map +1 -0
  42. package/dist/index.d.ts +31 -0
  43. package/dist/index.js +32 -0
  44. package/dist/marketplace.capability.d.ts +9 -0
  45. package/dist/marketplace.capability.d.ts.map +1 -0
  46. package/dist/marketplace.capability.js +34 -0
  47. package/dist/marketplace.capability.js.map +1 -0
  48. package/dist/marketplace.feature.d.ts +12 -0
  49. package/dist/marketplace.feature.d.ts.map +1 -0
  50. package/dist/marketplace.feature.js +315 -0
  51. package/dist/marketplace.feature.js.map +1 -0
  52. package/dist/order/index.d.ts +5 -0
  53. package/dist/order/index.js +6 -0
  54. package/dist/order/order.enum.d.ts +10 -0
  55. package/dist/order/order.enum.d.ts.map +1 -0
  56. package/dist/order/order.enum.js +22 -0
  57. package/dist/order/order.enum.js.map +1 -0
  58. package/dist/order/order.event.d.ts +145 -0
  59. package/dist/order/order.event.d.ts.map +1 -0
  60. package/dist/order/order.event.js +216 -0
  61. package/dist/order/order.event.js.map +1 -0
  62. package/dist/order/order.operations.d.ts +368 -0
  63. package/dist/order/order.operations.d.ts.map +1 -0
  64. package/dist/order/order.operations.js +119 -0
  65. package/dist/order/order.operations.js.map +1 -0
  66. package/dist/order/order.presentation.d.ts +9 -0
  67. package/dist/order/order.presentation.d.ts.map +1 -0
  68. package/dist/order/order.presentation.js +86 -0
  69. package/dist/order/order.presentation.js.map +1 -0
  70. package/dist/order/order.schema.d.ts +165 -0
  71. package/dist/order/order.schema.d.ts.map +1 -0
  72. package/dist/order/order.schema.js +155 -0
  73. package/dist/order/order.schema.js.map +1 -0
  74. package/dist/payout/index.d.ts +5 -0
  75. package/dist/payout/index.js +6 -0
  76. package/dist/payout/payout.enum.d.ts +10 -0
  77. package/dist/payout/payout.enum.d.ts.map +1 -0
  78. package/dist/payout/payout.enum.js +17 -0
  79. package/dist/payout/payout.enum.js.map +1 -0
  80. package/dist/payout/payout.event.d.ts +63 -0
  81. package/dist/payout/payout.event.d.ts.map +1 -0
  82. package/dist/payout/payout.event.js +92 -0
  83. package/dist/payout/payout.event.js.map +1 -0
  84. package/dist/payout/payout.operations.d.ts +97 -0
  85. package/dist/payout/payout.operations.d.ts.map +1 -0
  86. package/dist/payout/payout.operations.js +53 -0
  87. package/dist/payout/payout.operations.js.map +1 -0
  88. package/dist/payout/payout.presentation.d.ts +8 -0
  89. package/dist/payout/payout.presentation.d.ts.map +1 -0
  90. package/dist/payout/payout.presentation.js +60 -0
  91. package/dist/payout/payout.presentation.js.map +1 -0
  92. package/dist/payout/payout.schema.d.ts +157 -0
  93. package/dist/payout/payout.schema.d.ts.map +1 -0
  94. package/dist/payout/payout.schema.js +116 -0
  95. package/dist/payout/payout.schema.js.map +1 -0
  96. package/dist/product/index.d.ts +5 -0
  97. package/dist/product/index.js +6 -0
  98. package/dist/product/product.enum.d.ts +10 -0
  99. package/dist/product/product.enum.d.ts.map +1 -0
  100. package/dist/product/product.enum.js +18 -0
  101. package/dist/product/product.enum.js.map +1 -0
  102. package/dist/product/product.event.d.ts +73 -0
  103. package/dist/product/product.event.d.ts.map +1 -0
  104. package/dist/product/product.event.js +120 -0
  105. package/dist/product/product.event.js.map +1 -0
  106. package/dist/product/product.operations.d.ts +273 -0
  107. package/dist/product/product.operations.d.ts.map +1 -0
  108. package/dist/product/product.operations.js +108 -0
  109. package/dist/product/product.operations.js.map +1 -0
  110. package/dist/product/product.presentation.d.ts +9 -0
  111. package/dist/product/product.presentation.d.ts.map +1 -0
  112. package/dist/product/product.presentation.js +86 -0
  113. package/dist/product/product.presentation.js.map +1 -0
  114. package/dist/product/product.schema.d.ts +218 -0
  115. package/dist/product/product.schema.d.ts.map +1 -0
  116. package/dist/product/product.schema.js +176 -0
  117. package/dist/product/product.schema.js.map +1 -0
  118. package/dist/review/index.d.ts +5 -0
  119. package/dist/review/index.js +6 -0
  120. package/dist/review/review.enum.d.ts +10 -0
  121. package/dist/review/review.enum.d.ts.map +1 -0
  122. package/dist/review/review.enum.js +16 -0
  123. package/dist/review/review.enum.js.map +1 -0
  124. package/dist/review/review.event.d.ts +55 -0
  125. package/dist/review/review.event.d.ts.map +1 -0
  126. package/dist/review/review.event.js +84 -0
  127. package/dist/review/review.event.js.map +1 -0
  128. package/dist/review/review.operations.d.ts +237 -0
  129. package/dist/review/review.operations.d.ts.map +1 -0
  130. package/dist/review/review.operations.js +106 -0
  131. package/dist/review/review.operations.js.map +1 -0
  132. package/dist/review/review.presentation.d.ts +8 -0
  133. package/dist/review/review.presentation.d.ts.map +1 -0
  134. package/dist/review/review.presentation.js +60 -0
  135. package/dist/review/review.presentation.js.map +1 -0
  136. package/dist/review/review.schema.d.ts +190 -0
  137. package/dist/review/review.schema.d.ts.map +1 -0
  138. package/dist/review/review.schema.js +156 -0
  139. package/dist/review/review.schema.js.map +1 -0
  140. package/dist/seeders/index.d.ts +10 -0
  141. package/dist/seeders/index.d.ts.map +1 -0
  142. package/dist/seeders/index.js +18 -0
  143. package/dist/seeders/index.js.map +1 -0
  144. package/dist/store/index.d.ts +5 -0
  145. package/dist/store/index.js +6 -0
  146. package/dist/store/store.enum.d.ts +10 -0
  147. package/dist/store/store.enum.d.ts.map +1 -0
  148. package/dist/store/store.enum.js +16 -0
  149. package/dist/store/store.enum.js.map +1 -0
  150. package/dist/store/store.event.d.ts +51 -0
  151. package/dist/store/store.event.d.ts.map +1 -0
  152. package/dist/store/store.event.js +80 -0
  153. package/dist/store/store.event.js.map +1 -0
  154. package/dist/store/store.operations.d.ts +131 -0
  155. package/dist/store/store.operations.d.ts.map +1 -0
  156. package/dist/store/store.operations.js +61 -0
  157. package/dist/store/store.operations.js.map +1 -0
  158. package/dist/store/store.presentation.d.ts +8 -0
  159. package/dist/store/store.presentation.d.ts.map +1 -0
  160. package/dist/store/store.presentation.js +60 -0
  161. package/dist/store/store.presentation.js.map +1 -0
  162. package/dist/store/store.schema.d.ts +84 -0
  163. package/dist/store/store.schema.d.ts.map +1 -0
  164. package/dist/store/store.schema.js +93 -0
  165. package/dist/store/store.schema.js.map +1 -0
  166. package/dist/tests/operations.test-spec.d.ts +11 -0
  167. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  168. package/dist/tests/operations.test-spec.js +152 -0
  169. package/dist/tests/operations.test-spec.js.map +1 -0
  170. package/dist/ui/MarketplaceDashboard.d.ts +7 -0
  171. package/dist/ui/MarketplaceDashboard.d.ts.map +1 -0
  172. package/dist/ui/MarketplaceDashboard.js +319 -0
  173. package/dist/ui/MarketplaceDashboard.js.map +1 -0
  174. package/dist/ui/hooks/index.d.ts +2 -0
  175. package/dist/ui/hooks/index.js +5 -0
  176. package/dist/ui/hooks/useMarketplaceData.d.ts +23 -0
  177. package/dist/ui/hooks/useMarketplaceData.d.ts.map +1 -0
  178. package/dist/ui/hooks/useMarketplaceData.js +64 -0
  179. package/dist/ui/hooks/useMarketplaceData.js.map +1 -0
  180. package/dist/ui/index.d.ts +6 -0
  181. package/dist/ui/index.js +6 -0
  182. package/dist/ui/renderers/index.d.ts +2 -0
  183. package/dist/ui/renderers/index.js +3 -0
  184. package/dist/ui/renderers/marketplace.markdown.d.ts +28 -0
  185. package/dist/ui/renderers/marketplace.markdown.d.ts.map +1 -0
  186. package/dist/ui/renderers/marketplace.markdown.js +244 -0
  187. package/dist/ui/renderers/marketplace.markdown.js.map +1 -0
  188. package/package.json +149 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,141 @@
1
+ # @contractspec/example.marketplace
2
+
3
+ Website: https://contractspec.io/
4
+
5
+
6
+ A comprehensive multi-vendor marketplace example demonstrating ContractSpec principles.
7
+
8
+ ## Features
9
+
10
+ - **Multi-Vendor Stores**: Seller storefronts with profiles and verification
11
+ - **Product Catalog**: Products with variants, categories, and inventory tracking
12
+ - **Order Management**: Full order lifecycle with status tracking
13
+ - **Payment Processing**: Commission calculation and seller payouts
14
+ - **Reviews & Ratings**: Customer feedback with seller responses
15
+ - **File Attachments**: Product images and media using @contractspec/lib.files
16
+ - **Usage Metering**: Platform analytics using @contractspec/lib.metering
17
+
18
+ ## Entities
19
+
20
+ ### Store
21
+ - `Store` - Seller storefront
22
+ - `StoreCategory` - Store categorization
23
+
24
+ ### Product
25
+ - `Product` - Product listing
26
+ - `ProductVariant` - Product variations (size, color)
27
+ - `Category` - Product categorization
28
+
29
+ ### Order
30
+ - `Order` - Purchase transaction
31
+ - `OrderItem` - Items in an order
32
+ - `Refund` - Refund records
33
+ - `RefundItem` - Items being refunded
34
+
35
+ ### Payout
36
+ - `Payout` - Payment to seller
37
+ - `PayoutItem` - Orders in a payout
38
+ - `BankAccount` - Seller payment destination
39
+ - `PayoutSettings` - Payout configuration
40
+
41
+ ### Review
42
+ - `Review` - Customer review
43
+ - `ReviewResponse` - Seller response
44
+ - `ReviewVote` - Helpfulness votes
45
+ - `ReviewReport` - Flagged reviews
46
+
47
+ ## Contracts
48
+
49
+ ### Store Operations
50
+ - `marketplace.store.create` - Create a seller store
51
+
52
+ ### Product Operations
53
+ - `marketplace.product.create` - Create a product
54
+ - `marketplace.product.list` - List/search products
55
+
56
+ ### Order Operations
57
+ - `marketplace.order.create` - Create an order
58
+ - `marketplace.order.updateStatus` - Update order status
59
+
60
+ ### Payout Operations
61
+ - `marketplace.payout.list` - List payouts
62
+
63
+ ### Review Operations
64
+ - `marketplace.review.create` - Create a review
65
+ - `marketplace.review.list` - List reviews
66
+
67
+ ## Events
68
+
69
+ - Store: `created`, `statusChanged`
70
+ - Product: `created`, `published`, `inventory.updated`
71
+ - Order: `created`, `paid`, `statusUpdated`, `shipped`, `completed`
72
+ - Payout: `created`, `paid`
73
+ - Review: `created`, `responded`
74
+
75
+ ## Commission Model
76
+
77
+ The marketplace uses a configurable commission model:
78
+
79
+ ```typescript
80
+ // Default 10% commission
81
+ const commission = calculateCommission(orderTotal, 0.1);
82
+
83
+ // Result:
84
+ {
85
+ subtotal: 100,
86
+ platformFee: 10,
87
+ sellerPayout: 90
88
+ }
89
+ ```
90
+
91
+ ## Usage
92
+
93
+ ```typescript
94
+ import {
95
+ CreateOrderContract,
96
+ ListProductsContract,
97
+ marketplaceSchemaContribution
98
+ } from '@contractspec/example.marketplace';
99
+
100
+ // List products
101
+ const products = await executeQuery(ListProductsContract, {
102
+ categoryId: 'electronics',
103
+ minPrice: 10,
104
+ maxPrice: 100,
105
+ limit: 20,
106
+ });
107
+
108
+ // Create an order
109
+ const order = await executeContract(CreateOrderContract, {
110
+ storeId: 'store_123',
111
+ items: [
112
+ { productId: 'prod_456', quantity: 2 },
113
+ { productId: 'prod_789', variantId: 'var_abc', quantity: 1 },
114
+ ],
115
+ shippingAddress: { ... },
116
+ });
117
+ ```
118
+
119
+ ## Dependencies
120
+
121
+ - `@contractspec/lib.identity-rbac` - User identity and roles
122
+ - `@contractspec/lib.files` - Product images and media
123
+ - `@contractspec/lib.metering` - Usage tracking and analytics
124
+ - `@contractspec/module.audit-trail` - Action auditing
125
+ - `@contractspec/module.notifications` - Order and payout notifications
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "./marketplace.docblock.js";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,115 @@
1
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
2
+
3
+ //#region src/docs/marketplace.docblock.ts
4
+ registerDocBlocks([
5
+ {
6
+ id: "docs.examples.marketplace",
7
+ title: "Marketplace (2-sided)",
8
+ summary: "Two-sided marketplace with stores, products, orders, payouts, and reviews. Demonstrates multi-actor flows, payments, and attachments.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/examples/marketplace",
12
+ tags: [
13
+ "marketplace",
14
+ "orders",
15
+ "payouts",
16
+ "reviews"
17
+ ],
18
+ body: `## Entities
19
+
20
+ - Store, Product, Order, OrderItem, Payout, Review.
21
+ - Uses Files module for product media and receipt attachments.
22
+
23
+ ## Contracts
24
+
25
+ - \`marketplace.store.create\`, \`marketplace.product.add\`, \`marketplace.order.place\`, \`marketplace.payout.process\`, \`marketplace.review.submit\`.
26
+ - Policy guards via Identity/RBAC for provider vs client actions.
27
+
28
+ ## Events
29
+
30
+ - order.created/completed/cancelled, payout.queued/completed, review.submitted.
31
+ - Hooked into Notifications and Audit Trail modules.
32
+
33
+ ## UI / Presentations
34
+
35
+ - Dashboard, product catalog, order list/detail, store management.
36
+ - Templates registered under \`marketplace\` in Studio Template Registry.
37
+
38
+ ## Notes
39
+
40
+ - Commission model encoded in spec; payouts scheduled via Jobs module.
41
+ - Feature flags can gate beta checkout or new reviews flow.
42
+ `
43
+ },
44
+ {
45
+ id: "docs.examples.marketplace.goal",
46
+ title: "Marketplace — Goal",
47
+ summary: "Why this marketplace template exists and the outcomes it targets.",
48
+ kind: "goal",
49
+ visibility: "public",
50
+ route: "/docs/examples/marketplace/goal",
51
+ tags: ["marketplace", "goal"],
52
+ body: `## Why it matters
53
+ - Provides a regenerable 2-sided marketplace baseline without bespoke glue.
54
+ - Keeps payouts, catalog, orders, and reviews consistent across surfaces.
55
+
56
+ ## Business/Product goal
57
+ - Safe provider/client flows with auditable payouts and moderation-ready reviews.
58
+ - Staged rollouts for payments/reviews via feature flags; explicit commission/tax fields.
59
+
60
+ ## Success criteria
61
+ - Orders/payouts regenerate cleanly after spec changes.
62
+ - Events emit for lifecycle + audit; PII is scoped/redacted in presentations.`
63
+ },
64
+ {
65
+ id: "docs.examples.marketplace.usage",
66
+ title: "Marketplace — Usage",
67
+ summary: "How to seed, extend, and safely regenerate the marketplace.",
68
+ kind: "usage",
69
+ visibility: "public",
70
+ route: "/docs/examples/marketplace/usage",
71
+ tags: ["marketplace", "usage"],
72
+ body: `## Setup
73
+ 1) Seed sample stores/products/orders via template registry (or create via UI).
74
+ 2) Configure Files storage for media/receipts; set policy.pii for sensitive fields.
75
+
76
+ ## Extend & regenerate
77
+ 1) Adjust schemas for commission/tax/payout states or review moderation in the spec.
78
+ 2) Regenerate to sync UI, API, events, notifications.
79
+ 3) Gate risky changes (new payment providers) behind Feature Flags.
80
+
81
+ ## Guardrails
82
+ - Emit events for order/payout state changes; log via Audit Trail.
83
+ - Avoid hidden commission math—keep explicit fields.
84
+ - Redact buyer/provider PII in markdown/JSON presentations.`
85
+ },
86
+ {
87
+ id: "docs.examples.marketplace.constraints",
88
+ title: "Marketplace — Constraints & Safety",
89
+ summary: "Internal guardrails for payouts, order states, and regeneration semantics.",
90
+ kind: "reference",
91
+ visibility: "internal",
92
+ route: "/docs/examples/marketplace/constraints",
93
+ tags: [
94
+ "marketplace",
95
+ "constraints",
96
+ "internal"
97
+ ],
98
+ body: `## Constraints
99
+ - Commission logic and order states must stay spec-defined; never adjust in code-only patches.
100
+ - Events to emit: order.created, order.completed, payout.queued, review.posted (minimum).
101
+ - Regeneration must not change payment semantics without explicit spec diff.
102
+
103
+ ## Safety & PII
104
+ - Redact buyer/provider identifiers in markdown/JSON outputs; scope payouts per tenant/org.
105
+ - For MCP/web surfaces, avoid exposing raw payout calc inputs; use summaries.
106
+
107
+ ## Testing/Verification
108
+ - Add fixtures covering order lifecycle and payout queueing.
109
+ - Run regeneration diff when changing commission/tax fields; verify presentations updated.
110
+ - Ensure Notifications/Audit wiring remains intact for order/payout/review events.`
111
+ }
112
+ ]);
113
+
114
+ //#endregion
115
+ //# sourceMappingURL=marketplace.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketplace.docblock.js","names":[],"sources":["../../src/docs/marketplace.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst marketplaceDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.marketplace',\n title: 'Marketplace (2-sided)',\n summary:\n 'Two-sided marketplace with stores, products, orders, payouts, and reviews. Demonstrates multi-actor flows, payments, and attachments.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/marketplace',\n tags: ['marketplace', 'orders', 'payouts', 'reviews'],\n body: `## Entities\n\n- Store, Product, Order, OrderItem, Payout, Review.\n- Uses Files module for product media and receipt attachments.\n\n## Contracts\n\n- \\`marketplace.store.create\\`, \\`marketplace.product.add\\`, \\`marketplace.order.place\\`, \\`marketplace.payout.process\\`, \\`marketplace.review.submit\\`.\n- Policy guards via Identity/RBAC for provider vs client actions.\n\n## Events\n\n- order.created/completed/cancelled, payout.queued/completed, review.submitted.\n- Hooked into Notifications and Audit Trail modules.\n\n## UI / Presentations\n\n- Dashboard, product catalog, order list/detail, store management.\n- Templates registered under \\`marketplace\\` in Studio Template Registry.\n\n## Notes\n\n- Commission model encoded in spec; payouts scheduled via Jobs module.\n- Feature flags can gate beta checkout or new reviews flow.\n`,\n },\n {\n id: 'docs.examples.marketplace.goal',\n title: 'Marketplace — Goal',\n summary:\n 'Why this marketplace template exists and the outcomes it targets.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/marketplace/goal',\n tags: ['marketplace', 'goal'],\n body: `## Why it matters\n- Provides a regenerable 2-sided marketplace baseline without bespoke glue.\n- Keeps payouts, catalog, orders, and reviews consistent across surfaces.\n\n## Business/Product goal\n- Safe provider/client flows with auditable payouts and moderation-ready reviews.\n- Staged rollouts for payments/reviews via feature flags; explicit commission/tax fields.\n\n## Success criteria\n- Orders/payouts regenerate cleanly after spec changes.\n- Events emit for lifecycle + audit; PII is scoped/redacted in presentations.`,\n },\n {\n id: 'docs.examples.marketplace.usage',\n title: 'Marketplace — Usage',\n summary: 'How to seed, extend, and safely regenerate the marketplace.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/marketplace/usage',\n tags: ['marketplace', 'usage'],\n body: `## Setup\n1) Seed sample stores/products/orders via template registry (or create via UI).\n2) Configure Files storage for media/receipts; set policy.pii for sensitive fields.\n\n## Extend & regenerate\n1) Adjust schemas for commission/tax/payout states or review moderation in the spec.\n2) Regenerate to sync UI, API, events, notifications.\n3) Gate risky changes (new payment providers) behind Feature Flags.\n\n## Guardrails\n- Emit events for order/payout state changes; log via Audit Trail.\n- Avoid hidden commission math—keep explicit fields.\n- Redact buyer/provider PII in markdown/JSON presentations.`,\n },\n {\n id: 'docs.examples.marketplace.constraints',\n title: 'Marketplace — Constraints & Safety',\n summary:\n 'Internal guardrails for payouts, order states, and regeneration semantics.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/marketplace/constraints',\n tags: ['marketplace', 'constraints', 'internal'],\n body: `## Constraints\n- Commission logic and order states must stay spec-defined; never adjust in code-only patches.\n- Events to emit: order.created, order.completed, payout.queued, review.posted (minimum).\n- Regeneration must not change payment semantics without explicit spec diff.\n\n## Safety & PII\n- Redact buyer/provider identifiers in markdown/JSON outputs; scope payouts per tenant/org.\n- For MCP/web surfaces, avoid exposing raw payout calc inputs; use summaries.\n\n## Testing/Verification\n- Add fixtures covering order lifecycle and payout queueing.\n- Run regeneration diff when changing commission/tax fields; verify presentations updated.\n- Ensure Notifications/Audit wiring remains intact for order/payout/review events.`,\n },\n];\n\nregisterDocBlocks(marketplaceDocBlocks);\n"],"mappings":";;;AA2GA,kBAxGyC;CACvC;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAe;GAAU;GAAW;GAAU;EACrD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EAyBP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,eAAe,OAAO;EAC7B,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,eAAe,QAAQ;EAC9B,MAAM;;;;;;;;;;;;;EAaP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAe;GAAe;GAAW;EAChD,MAAM;;;;;;;;;;;;;EAaP;CACF,CAEsC"}
@@ -0,0 +1,309 @@
1
+ import { StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum } from "./store.js";
2
+ import { CategoryEntity, ProductEntity, ProductStatusEnum, ProductTypeEnum, ProductVariantEntity } from "./product.js";
3
+ import { OrderEntity, OrderItemEntity, OrderStatusEnum, PaymentStatusEnum, RefundEntity, RefundItemEntity } from "./order.js";
4
+ import { BankAccountEntity, PayoutEntity, PayoutItemEntity, PayoutScheduleEnum, PayoutSettingsEntity, PayoutStatusEnum } from "./payout.js";
5
+ import { ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity } from "./review.js";
6
+ import * as _contractspec_lib_schema856 from "@contractspec/lib.schema";
7
+ import { ModuleSchemaContribution } from "@contractspec/lib.schema";
8
+
9
+ //#region src/entities/index.d.ts
10
+ declare const marketplaceEntities: (_contractspec_lib_schema856.EntitySpec<{
11
+ id: _contractspec_lib_schema856.EntityScalarField;
12
+ orderNumber: _contractspec_lib_schema856.EntityScalarField;
13
+ buyerId: _contractspec_lib_schema856.EntityScalarField;
14
+ storeId: _contractspec_lib_schema856.EntityScalarField;
15
+ status: _contractspec_lib_schema856.EntityEnumField;
16
+ paymentStatus: _contractspec_lib_schema856.EntityEnumField;
17
+ subtotal: _contractspec_lib_schema856.EntityScalarField;
18
+ shippingTotal: _contractspec_lib_schema856.EntityScalarField;
19
+ taxTotal: _contractspec_lib_schema856.EntityScalarField;
20
+ discountTotal: _contractspec_lib_schema856.EntityScalarField;
21
+ total: _contractspec_lib_schema856.EntityScalarField;
22
+ currency: _contractspec_lib_schema856.EntityScalarField;
23
+ platformFee: _contractspec_lib_schema856.EntityScalarField;
24
+ sellerPayout: _contractspec_lib_schema856.EntityScalarField;
25
+ shippingAddress: _contractspec_lib_schema856.EntityScalarField;
26
+ billingAddress: _contractspec_lib_schema856.EntityScalarField;
27
+ shippingMethod: _contractspec_lib_schema856.EntityScalarField;
28
+ trackingNumber: _contractspec_lib_schema856.EntityScalarField;
29
+ trackingUrl: _contractspec_lib_schema856.EntityScalarField;
30
+ paymentMethod: _contractspec_lib_schema856.EntityScalarField;
31
+ paymentIntentId: _contractspec_lib_schema856.EntityScalarField;
32
+ buyerNote: _contractspec_lib_schema856.EntityScalarField;
33
+ sellerNote: _contractspec_lib_schema856.EntityScalarField;
34
+ internalNote: _contractspec_lib_schema856.EntityScalarField;
35
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
36
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
37
+ paidAt: _contractspec_lib_schema856.EntityScalarField;
38
+ shippedAt: _contractspec_lib_schema856.EntityScalarField;
39
+ deliveredAt: _contractspec_lib_schema856.EntityScalarField;
40
+ completedAt: _contractspec_lib_schema856.EntityScalarField;
41
+ cancelledAt: _contractspec_lib_schema856.EntityScalarField;
42
+ store: _contractspec_lib_schema856.EntityRelationField;
43
+ items: _contractspec_lib_schema856.EntityRelationField;
44
+ refunds: _contractspec_lib_schema856.EntityRelationField;
45
+ }> | _contractspec_lib_schema856.EntitySpec<{
46
+ id: _contractspec_lib_schema856.EntityScalarField;
47
+ orderId: _contractspec_lib_schema856.EntityScalarField;
48
+ productId: _contractspec_lib_schema856.EntityScalarField;
49
+ variantId: _contractspec_lib_schema856.EntityScalarField;
50
+ productName: _contractspec_lib_schema856.EntityScalarField;
51
+ variantName: _contractspec_lib_schema856.EntityScalarField;
52
+ sku: _contractspec_lib_schema856.EntityScalarField;
53
+ unitPrice: _contractspec_lib_schema856.EntityScalarField;
54
+ quantity: _contractspec_lib_schema856.EntityScalarField;
55
+ subtotal: _contractspec_lib_schema856.EntityScalarField;
56
+ quantityFulfilled: _contractspec_lib_schema856.EntityScalarField;
57
+ quantityRefunded: _contractspec_lib_schema856.EntityScalarField;
58
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
59
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
60
+ order: _contractspec_lib_schema856.EntityRelationField;
61
+ product: _contractspec_lib_schema856.EntityRelationField;
62
+ }> | _contractspec_lib_schema856.EntitySpec<{
63
+ id: _contractspec_lib_schema856.EntityScalarField;
64
+ orderId: _contractspec_lib_schema856.EntityScalarField;
65
+ amount: _contractspec_lib_schema856.EntityScalarField;
66
+ currency: _contractspec_lib_schema856.EntityScalarField;
67
+ reason: _contractspec_lib_schema856.EntityScalarField;
68
+ notes: _contractspec_lib_schema856.EntityScalarField;
69
+ status: _contractspec_lib_schema856.EntityScalarField;
70
+ refundId: _contractspec_lib_schema856.EntityScalarField;
71
+ issuedBy: _contractspec_lib_schema856.EntityScalarField;
72
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
73
+ processedAt: _contractspec_lib_schema856.EntityScalarField;
74
+ order: _contractspec_lib_schema856.EntityRelationField;
75
+ items: _contractspec_lib_schema856.EntityRelationField;
76
+ }> | _contractspec_lib_schema856.EntitySpec<{
77
+ id: _contractspec_lib_schema856.EntityScalarField;
78
+ refundId: _contractspec_lib_schema856.EntityScalarField;
79
+ orderItemId: _contractspec_lib_schema856.EntityScalarField;
80
+ quantity: _contractspec_lib_schema856.EntityScalarField;
81
+ amount: _contractspec_lib_schema856.EntityScalarField;
82
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
83
+ refund: _contractspec_lib_schema856.EntityRelationField;
84
+ orderItem: _contractspec_lib_schema856.EntityRelationField;
85
+ }> | _contractspec_lib_schema856.EntitySpec<{
86
+ id: _contractspec_lib_schema856.EntityScalarField;
87
+ storeId: _contractspec_lib_schema856.EntityScalarField;
88
+ payoutNumber: _contractspec_lib_schema856.EntityScalarField;
89
+ status: _contractspec_lib_schema856.EntityEnumField;
90
+ grossAmount: _contractspec_lib_schema856.EntityScalarField;
91
+ platformFees: _contractspec_lib_schema856.EntityScalarField;
92
+ otherDeductions: _contractspec_lib_schema856.EntityScalarField;
93
+ netAmount: _contractspec_lib_schema856.EntityScalarField;
94
+ currency: _contractspec_lib_schema856.EntityScalarField;
95
+ periodStart: _contractspec_lib_schema856.EntityScalarField;
96
+ periodEnd: _contractspec_lib_schema856.EntityScalarField;
97
+ paymentMethod: _contractspec_lib_schema856.EntityScalarField;
98
+ paymentReference: _contractspec_lib_schema856.EntityScalarField;
99
+ bankAccountId: _contractspec_lib_schema856.EntityScalarField;
100
+ bankAccountLast4: _contractspec_lib_schema856.EntityScalarField;
101
+ notes: _contractspec_lib_schema856.EntityScalarField;
102
+ failureReason: _contractspec_lib_schema856.EntityScalarField;
103
+ orderCount: _contractspec_lib_schema856.EntityScalarField;
104
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
105
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
106
+ scheduledAt: _contractspec_lib_schema856.EntityScalarField;
107
+ processedAt: _contractspec_lib_schema856.EntityScalarField;
108
+ paidAt: _contractspec_lib_schema856.EntityScalarField;
109
+ store: _contractspec_lib_schema856.EntityRelationField;
110
+ items: _contractspec_lib_schema856.EntityRelationField;
111
+ }> | _contractspec_lib_schema856.EntitySpec<{
112
+ id: _contractspec_lib_schema856.EntityScalarField;
113
+ payoutId: _contractspec_lib_schema856.EntityScalarField;
114
+ orderId: _contractspec_lib_schema856.EntityScalarField;
115
+ orderTotal: _contractspec_lib_schema856.EntityScalarField;
116
+ platformFee: _contractspec_lib_schema856.EntityScalarField;
117
+ netAmount: _contractspec_lib_schema856.EntityScalarField;
118
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
119
+ payout: _contractspec_lib_schema856.EntityRelationField;
120
+ order: _contractspec_lib_schema856.EntityRelationField;
121
+ }> | _contractspec_lib_schema856.EntitySpec<{
122
+ id: _contractspec_lib_schema856.EntityScalarField;
123
+ storeId: _contractspec_lib_schema856.EntityScalarField;
124
+ accountHolderName: _contractspec_lib_schema856.EntityScalarField;
125
+ accountType: _contractspec_lib_schema856.EntityScalarField;
126
+ bankName: _contractspec_lib_schema856.EntityScalarField;
127
+ last4: _contractspec_lib_schema856.EntityScalarField;
128
+ routingLast4: _contractspec_lib_schema856.EntityScalarField;
129
+ externalId: _contractspec_lib_schema856.EntityScalarField;
130
+ isDefault: _contractspec_lib_schema856.EntityScalarField;
131
+ isVerified: _contractspec_lib_schema856.EntityScalarField;
132
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
133
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
134
+ verifiedAt: _contractspec_lib_schema856.EntityScalarField;
135
+ store: _contractspec_lib_schema856.EntityRelationField;
136
+ }> | _contractspec_lib_schema856.EntitySpec<{
137
+ id: _contractspec_lib_schema856.EntityScalarField;
138
+ storeId: _contractspec_lib_schema856.EntityScalarField;
139
+ schedule: _contractspec_lib_schema856.EntityEnumField;
140
+ dayOfWeek: _contractspec_lib_schema856.EntityScalarField;
141
+ dayOfMonth: _contractspec_lib_schema856.EntityScalarField;
142
+ minimumPayout: _contractspec_lib_schema856.EntityScalarField;
143
+ defaultBankAccountId: _contractspec_lib_schema856.EntityScalarField;
144
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
145
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
146
+ store: _contractspec_lib_schema856.EntityRelationField;
147
+ }> | _contractspec_lib_schema856.EntitySpec<{
148
+ id: _contractspec_lib_schema856.EntityScalarField;
149
+ storeId: _contractspec_lib_schema856.EntityScalarField;
150
+ name: _contractspec_lib_schema856.EntityScalarField;
151
+ slug: _contractspec_lib_schema856.EntityScalarField;
152
+ description: _contractspec_lib_schema856.EntityScalarField;
153
+ shortDescription: _contractspec_lib_schema856.EntityScalarField;
154
+ status: _contractspec_lib_schema856.EntityEnumField;
155
+ type: _contractspec_lib_schema856.EntityEnumField;
156
+ price: _contractspec_lib_schema856.EntityScalarField;
157
+ compareAtPrice: _contractspec_lib_schema856.EntityScalarField;
158
+ currency: _contractspec_lib_schema856.EntityScalarField;
159
+ sku: _contractspec_lib_schema856.EntityScalarField;
160
+ barcode: _contractspec_lib_schema856.EntityScalarField;
161
+ quantity: _contractspec_lib_schema856.EntityScalarField;
162
+ trackInventory: _contractspec_lib_schema856.EntityScalarField;
163
+ allowBackorder: _contractspec_lib_schema856.EntityScalarField;
164
+ lowStockThreshold: _contractspec_lib_schema856.EntityScalarField;
165
+ weight: _contractspec_lib_schema856.EntityScalarField;
166
+ weightUnit: _contractspec_lib_schema856.EntityScalarField;
167
+ categoryId: _contractspec_lib_schema856.EntityScalarField;
168
+ tags: _contractspec_lib_schema856.EntityScalarField;
169
+ primaryImageId: _contractspec_lib_schema856.EntityScalarField;
170
+ seoTitle: _contractspec_lib_schema856.EntityScalarField;
171
+ seoDescription: _contractspec_lib_schema856.EntityScalarField;
172
+ attributes: _contractspec_lib_schema856.EntityScalarField;
173
+ reviewCount: _contractspec_lib_schema856.EntityScalarField;
174
+ averageRating: _contractspec_lib_schema856.EntityScalarField;
175
+ totalSold: _contractspec_lib_schema856.EntityScalarField;
176
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
177
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
178
+ publishedAt: _contractspec_lib_schema856.EntityScalarField;
179
+ store: _contractspec_lib_schema856.EntityRelationField;
180
+ variants: _contractspec_lib_schema856.EntityRelationField;
181
+ orderItems: _contractspec_lib_schema856.EntityRelationField;
182
+ reviews: _contractspec_lib_schema856.EntityRelationField;
183
+ }> | _contractspec_lib_schema856.EntitySpec<{
184
+ id: _contractspec_lib_schema856.EntityScalarField;
185
+ productId: _contractspec_lib_schema856.EntityScalarField;
186
+ name: _contractspec_lib_schema856.EntityScalarField;
187
+ options: _contractspec_lib_schema856.EntityScalarField;
188
+ price: _contractspec_lib_schema856.EntityScalarField;
189
+ compareAtPrice: _contractspec_lib_schema856.EntityScalarField;
190
+ sku: _contractspec_lib_schema856.EntityScalarField;
191
+ barcode: _contractspec_lib_schema856.EntityScalarField;
192
+ quantity: _contractspec_lib_schema856.EntityScalarField;
193
+ imageId: _contractspec_lib_schema856.EntityScalarField;
194
+ isActive: _contractspec_lib_schema856.EntityScalarField;
195
+ position: _contractspec_lib_schema856.EntityScalarField;
196
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
197
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
198
+ product: _contractspec_lib_schema856.EntityRelationField;
199
+ }> | _contractspec_lib_schema856.EntitySpec<{
200
+ id: _contractspec_lib_schema856.EntityScalarField;
201
+ name: _contractspec_lib_schema856.EntityScalarField;
202
+ slug: _contractspec_lib_schema856.EntityScalarField;
203
+ description: _contractspec_lib_schema856.EntityScalarField;
204
+ parentId: _contractspec_lib_schema856.EntityScalarField;
205
+ path: _contractspec_lib_schema856.EntityScalarField;
206
+ level: _contractspec_lib_schema856.EntityScalarField;
207
+ position: _contractspec_lib_schema856.EntityScalarField;
208
+ imageId: _contractspec_lib_schema856.EntityScalarField;
209
+ isActive: _contractspec_lib_schema856.EntityScalarField;
210
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
211
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
212
+ parent: _contractspec_lib_schema856.EntityRelationField;
213
+ children: _contractspec_lib_schema856.EntityRelationField;
214
+ }> | _contractspec_lib_schema856.EntitySpec<{
215
+ id: _contractspec_lib_schema856.EntityScalarField;
216
+ type: _contractspec_lib_schema856.EntityEnumField;
217
+ productId: _contractspec_lib_schema856.EntityScalarField;
218
+ storeId: _contractspec_lib_schema856.EntityScalarField;
219
+ orderId: _contractspec_lib_schema856.EntityScalarField;
220
+ orderItemId: _contractspec_lib_schema856.EntityScalarField;
221
+ authorId: _contractspec_lib_schema856.EntityScalarField;
222
+ rating: _contractspec_lib_schema856.EntityScalarField;
223
+ title: _contractspec_lib_schema856.EntityScalarField;
224
+ content: _contractspec_lib_schema856.EntityScalarField;
225
+ isVerifiedPurchase: _contractspec_lib_schema856.EntityScalarField;
226
+ status: _contractspec_lib_schema856.EntityEnumField;
227
+ hasMedia: _contractspec_lib_schema856.EntityScalarField;
228
+ helpfulCount: _contractspec_lib_schema856.EntityScalarField;
229
+ notHelpfulCount: _contractspec_lib_schema856.EntityScalarField;
230
+ moderatedBy: _contractspec_lib_schema856.EntityScalarField;
231
+ moderatedAt: _contractspec_lib_schema856.EntityScalarField;
232
+ moderationNote: _contractspec_lib_schema856.EntityScalarField;
233
+ hasResponse: _contractspec_lib_schema856.EntityScalarField;
234
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
235
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
236
+ product: _contractspec_lib_schema856.EntityRelationField;
237
+ store: _contractspec_lib_schema856.EntityRelationField;
238
+ responses: _contractspec_lib_schema856.EntityRelationField;
239
+ votes: _contractspec_lib_schema856.EntityRelationField;
240
+ }> | _contractspec_lib_schema856.EntitySpec<{
241
+ id: _contractspec_lib_schema856.EntityScalarField;
242
+ reviewId: _contractspec_lib_schema856.EntityScalarField;
243
+ authorId: _contractspec_lib_schema856.EntityScalarField;
244
+ content: _contractspec_lib_schema856.EntityScalarField;
245
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
246
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
247
+ review: _contractspec_lib_schema856.EntityRelationField;
248
+ }> | _contractspec_lib_schema856.EntitySpec<{
249
+ id: _contractspec_lib_schema856.EntityScalarField;
250
+ reviewId: _contractspec_lib_schema856.EntityScalarField;
251
+ userId: _contractspec_lib_schema856.EntityScalarField;
252
+ isHelpful: _contractspec_lib_schema856.EntityScalarField;
253
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
254
+ review: _contractspec_lib_schema856.EntityRelationField;
255
+ }> | _contractspec_lib_schema856.EntitySpec<{
256
+ id: _contractspec_lib_schema856.EntityScalarField;
257
+ reviewId: _contractspec_lib_schema856.EntityScalarField;
258
+ reporterId: _contractspec_lib_schema856.EntityScalarField;
259
+ reason: _contractspec_lib_schema856.EntityScalarField;
260
+ details: _contractspec_lib_schema856.EntityScalarField;
261
+ status: _contractspec_lib_schema856.EntityScalarField;
262
+ resolvedBy: _contractspec_lib_schema856.EntityScalarField;
263
+ resolvedAt: _contractspec_lib_schema856.EntityScalarField;
264
+ resolution: _contractspec_lib_schema856.EntityScalarField;
265
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
266
+ review: _contractspec_lib_schema856.EntityRelationField;
267
+ }> | _contractspec_lib_schema856.EntitySpec<{
268
+ id: _contractspec_lib_schema856.EntityScalarField;
269
+ name: _contractspec_lib_schema856.EntityScalarField;
270
+ slug: _contractspec_lib_schema856.EntityScalarField;
271
+ description: _contractspec_lib_schema856.EntityScalarField;
272
+ status: _contractspec_lib_schema856.EntityEnumField;
273
+ type: _contractspec_lib_schema856.EntityEnumField;
274
+ ownerId: _contractspec_lib_schema856.EntityScalarField;
275
+ organizationId: _contractspec_lib_schema856.EntityScalarField;
276
+ logoFileId: _contractspec_lib_schema856.EntityScalarField;
277
+ bannerFileId: _contractspec_lib_schema856.EntityScalarField;
278
+ email: _contractspec_lib_schema856.EntityScalarField;
279
+ phone: _contractspec_lib_schema856.EntityScalarField;
280
+ website: _contractspec_lib_schema856.EntityScalarField;
281
+ country: _contractspec_lib_schema856.EntityScalarField;
282
+ currency: _contractspec_lib_schema856.EntityScalarField;
283
+ timezone: _contractspec_lib_schema856.EntityScalarField;
284
+ commissionRate: _contractspec_lib_schema856.EntityScalarField;
285
+ isVerified: _contractspec_lib_schema856.EntityScalarField;
286
+ verifiedAt: _contractspec_lib_schema856.EntityScalarField;
287
+ settings: _contractspec_lib_schema856.EntityScalarField;
288
+ metadata: _contractspec_lib_schema856.EntityScalarField;
289
+ totalProducts: _contractspec_lib_schema856.EntityScalarField;
290
+ totalOrders: _contractspec_lib_schema856.EntityScalarField;
291
+ totalRevenue: _contractspec_lib_schema856.EntityScalarField;
292
+ averageRating: _contractspec_lib_schema856.EntityScalarField;
293
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
294
+ updatedAt: _contractspec_lib_schema856.EntityScalarField;
295
+ products: _contractspec_lib_schema856.EntityRelationField;
296
+ orders: _contractspec_lib_schema856.EntityRelationField;
297
+ payouts: _contractspec_lib_schema856.EntityRelationField;
298
+ }> | _contractspec_lib_schema856.EntitySpec<{
299
+ id: _contractspec_lib_schema856.EntityScalarField;
300
+ storeId: _contractspec_lib_schema856.EntityScalarField;
301
+ categoryId: _contractspec_lib_schema856.EntityScalarField;
302
+ isPrimary: _contractspec_lib_schema856.EntityScalarField;
303
+ createdAt: _contractspec_lib_schema856.EntityScalarField;
304
+ store: _contractspec_lib_schema856.EntityRelationField;
305
+ }>)[];
306
+ declare const marketplaceSchemaContribution: ModuleSchemaContribution;
307
+ //#endregion
308
+ export { BankAccountEntity, CategoryEntity, OrderEntity, OrderItemEntity, OrderStatusEnum, PaymentStatusEnum, PayoutEntity, PayoutItemEntity, PayoutScheduleEnum, PayoutSettingsEntity, PayoutStatusEnum, ProductEntity, ProductStatusEnum, ProductTypeEnum, ProductVariantEntity, RefundEntity, RefundItemEntity, ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity, StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum, marketplaceEntities, marketplaceSchemaContribution };
309
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/entities/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAuFa,kDAAmB;MA2B/B,2BAAA,CAAA;;EA3BY,OAAA,+CA2BZ;EAAA,OAAA,+CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA3B+B,2BAAA,CAAA;;0DAAA;EAAA,SAAA,+CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6BnB,+BAA+B"}
@@ -0,0 +1,46 @@
1
+ import { StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum } from "./store.js";
2
+ import { CategoryEntity, ProductEntity, ProductStatusEnum, ProductTypeEnum, ProductVariantEntity } from "./product.js";
3
+ import { OrderEntity, OrderItemEntity, OrderStatusEnum, PaymentStatusEnum, RefundEntity, RefundItemEntity } from "./order.js";
4
+ import { BankAccountEntity, PayoutEntity, PayoutItemEntity, PayoutScheduleEnum, PayoutSettingsEntity, PayoutStatusEnum } from "./payout.js";
5
+ import { ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity } from "./review.js";
6
+
7
+ //#region src/entities/index.ts
8
+ const marketplaceEntities = [
9
+ StoreEntity,
10
+ StoreCategoryEntity,
11
+ ProductEntity,
12
+ ProductVariantEntity,
13
+ CategoryEntity,
14
+ OrderEntity,
15
+ OrderItemEntity,
16
+ RefundEntity,
17
+ RefundItemEntity,
18
+ PayoutEntity,
19
+ PayoutItemEntity,
20
+ BankAccountEntity,
21
+ PayoutSettingsEntity,
22
+ ReviewEntity,
23
+ ReviewResponseEntity,
24
+ ReviewVoteEntity,
25
+ ReviewReportEntity
26
+ ];
27
+ const marketplaceSchemaContribution = {
28
+ moduleId: "@contractspec/example.marketplace",
29
+ entities: marketplaceEntities,
30
+ enums: [
31
+ StoreStatusEnum,
32
+ StoreTypeEnum,
33
+ ProductStatusEnum,
34
+ ProductTypeEnum,
35
+ OrderStatusEnum,
36
+ PaymentStatusEnum,
37
+ PayoutStatusEnum,
38
+ PayoutScheduleEnum,
39
+ ReviewStatusEnum,
40
+ ReviewTypeEnum
41
+ ]
42
+ };
43
+
44
+ //#endregion
45
+ export { BankAccountEntity, CategoryEntity, OrderEntity, OrderItemEntity, OrderStatusEnum, PaymentStatusEnum, PayoutEntity, PayoutItemEntity, PayoutScheduleEnum, PayoutSettingsEntity, PayoutStatusEnum, ProductEntity, ProductStatusEnum, ProductTypeEnum, ProductVariantEntity, RefundEntity, RefundItemEntity, ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity, StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum, marketplaceEntities, marketplaceSchemaContribution };
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/entities/index.ts"],"sourcesContent":["// Store entities\nexport {\n StoreStatusEnum,\n StoreTypeEnum,\n StoreEntity,\n StoreCategoryEntity,\n} from './store';\n\n// Product entities\nexport {\n ProductStatusEnum,\n ProductTypeEnum,\n ProductEntity,\n ProductVariantEntity,\n CategoryEntity,\n} from './product';\n\n// Order entities\nexport {\n OrderStatusEnum,\n PaymentStatusEnum,\n OrderEntity,\n OrderItemEntity,\n RefundEntity,\n RefundItemEntity,\n} from './order';\n\n// Payout entities\nexport {\n PayoutStatusEnum,\n PayoutScheduleEnum,\n PayoutEntity,\n PayoutItemEntity,\n BankAccountEntity,\n PayoutSettingsEntity,\n} from './payout';\n\n// Review entities\nexport {\n ReviewStatusEnum,\n ReviewTypeEnum,\n ReviewEntity,\n ReviewResponseEntity,\n ReviewVoteEntity,\n ReviewReportEntity,\n} from './review';\n\n// Schema contribution\nimport {\n StoreStatusEnum,\n StoreTypeEnum,\n StoreEntity,\n StoreCategoryEntity,\n} from './store';\nimport {\n ProductStatusEnum,\n ProductTypeEnum,\n ProductEntity,\n ProductVariantEntity,\n CategoryEntity,\n} from './product';\nimport {\n OrderStatusEnum,\n PaymentStatusEnum,\n OrderEntity,\n OrderItemEntity,\n RefundEntity,\n RefundItemEntity,\n} from './order';\nimport {\n PayoutStatusEnum,\n PayoutScheduleEnum,\n PayoutEntity,\n PayoutItemEntity,\n BankAccountEntity,\n PayoutSettingsEntity,\n} from './payout';\nimport {\n ReviewStatusEnum,\n ReviewTypeEnum,\n ReviewEntity,\n ReviewResponseEntity,\n ReviewVoteEntity,\n ReviewReportEntity,\n} from './review';\nimport type { ModuleSchemaContribution } from '@contractspec/lib.schema';\n\nexport const marketplaceEntities = [\n // Store\n StoreEntity,\n StoreCategoryEntity,\n\n // Product\n ProductEntity,\n ProductVariantEntity,\n CategoryEntity,\n\n // Order\n OrderEntity,\n OrderItemEntity,\n RefundEntity,\n RefundItemEntity,\n\n // Payout\n PayoutEntity,\n PayoutItemEntity,\n BankAccountEntity,\n PayoutSettingsEntity,\n\n // Review\n ReviewEntity,\n ReviewResponseEntity,\n ReviewVoteEntity,\n ReviewReportEntity,\n];\n\nexport const marketplaceSchemaContribution: ModuleSchemaContribution = {\n moduleId: '@contractspec/example.marketplace',\n entities: marketplaceEntities,\n enums: [\n StoreStatusEnum,\n StoreTypeEnum,\n ProductStatusEnum,\n ProductTypeEnum,\n OrderStatusEnum,\n PaymentStatusEnum,\n PayoutStatusEnum,\n PayoutScheduleEnum,\n ReviewStatusEnum,\n ReviewTypeEnum,\n ],\n};\n"],"mappings":";;;;;;;AAuFA,MAAa,sBAAsB;CAEjC;CACA;CAGA;CACA;CACA;CAGA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACD;AAED,MAAa,gCAA0D;CACrE,UAAU;CACV,UAAU;CACV,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACF"}