@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.
Files changed (302) hide show
  1. package/dist/browser/docs/index.js +103 -0
  2. package/dist/browser/docs/marketplace.docblock.js +103 -0
  3. package/dist/browser/entities/index.js +721 -0
  4. package/dist/browser/entities/order.js +167 -0
  5. package/dist/browser/entities/payout.js +142 -0
  6. package/dist/browser/entities/product.js +152 -0
  7. package/dist/browser/entities/review.js +129 -0
  8. package/dist/browser/entities/store.js +97 -0
  9. package/dist/browser/example.js +42 -0
  10. package/dist/browser/handlers/index.js +303 -0
  11. package/dist/browser/handlers/marketplace.handlers.js +303 -0
  12. package/dist/browser/index.js +2016 -0
  13. package/dist/browser/marketplace.capability.js +40 -0
  14. package/dist/browser/marketplace.feature.js +137 -0
  15. package/dist/browser/order/index.js +307 -0
  16. package/dist/browser/order/order.enum.js +17 -0
  17. package/dist/browser/order/order.event.js +131 -0
  18. package/dist/browser/order/order.operations.js +172 -0
  19. package/dist/browser/order/order.presentation.js +153 -0
  20. package/dist/browser/order/order.schema.js +79 -0
  21. package/dist/browser/payout/index.js +152 -0
  22. package/dist/browser/payout/payout.enum.js +12 -0
  23. package/dist/browser/payout/payout.event.js +55 -0
  24. package/dist/browser/payout/payout.operations.js +94 -0
  25. package/dist/browser/payout/payout.presentation.js +111 -0
  26. package/dist/browser/payout/payout.schema.js +61 -0
  27. package/dist/browser/product/index.js +249 -0
  28. package/dist/browser/product/product.enum.js +13 -0
  29. package/dist/browser/product/product.event.js +74 -0
  30. package/dist/browser/product/product.operations.js +171 -0
  31. package/dist/browser/product/product.presentation.js +158 -0
  32. package/dist/browser/product/product.schema.js +84 -0
  33. package/dist/browser/review/index.js +206 -0
  34. package/dist/browser/review/review.enum.js +11 -0
  35. package/dist/browser/review/review.event.js +50 -0
  36. package/dist/browser/review/review.operations.js +152 -0
  37. package/dist/browser/review/review.presentation.js +123 -0
  38. package/dist/browser/review/review.schema.js +74 -0
  39. package/dist/browser/seeders/index.js +12 -0
  40. package/dist/browser/store/index.js +142 -0
  41. package/dist/browser/store/store.enum.js +11 -0
  42. package/dist/browser/store/store.event.js +52 -0
  43. package/dist/browser/store/store.operations.js +88 -0
  44. package/dist/browser/store/store.presentation.js +94 -0
  45. package/dist/browser/store/store.schema.js +43 -0
  46. package/dist/browser/tests/operations.test-spec.js +139 -0
  47. package/dist/browser/ui/MarketplaceDashboard.js +418 -0
  48. package/dist/browser/ui/hooks/index.js +59 -0
  49. package/dist/browser/ui/hooks/useMarketplaceData.js +56 -0
  50. package/dist/browser/ui/index.js +668 -0
  51. package/dist/browser/ui/renderers/index.js +248 -0
  52. package/dist/browser/ui/renderers/marketplace.markdown.js +248 -0
  53. package/dist/docs/index.d.ts +2 -1
  54. package/dist/docs/index.d.ts.map +1 -0
  55. package/dist/docs/index.js +104 -1
  56. package/dist/docs/marketplace.docblock.d.ts +2 -1
  57. package/dist/docs/marketplace.docblock.d.ts.map +1 -0
  58. package/dist/docs/marketplace.docblock.js +46 -57
  59. package/dist/entities/index.d.ts +302 -307
  60. package/dist/entities/index.d.ts.map +1 -1
  61. package/dist/entities/index.js +719 -43
  62. package/dist/entities/order.d.ts +77 -82
  63. package/dist/entities/order.d.ts.map +1 -1
  64. package/dist/entities/order.js +162 -167
  65. package/dist/entities/payout.d.ts +64 -69
  66. package/dist/entities/payout.d.ts.map +1 -1
  67. package/dist/entities/payout.js +137 -156
  68. package/dist/entities/product.d.ts +69 -74
  69. package/dist/entities/product.d.ts.map +1 -1
  70. package/dist/entities/product.js +148 -156
  71. package/dist/entities/review.d.ts +55 -60
  72. package/dist/entities/review.d.ts.map +1 -1
  73. package/dist/entities/review.js +124 -146
  74. package/dist/entities/store.d.ts +40 -45
  75. package/dist/entities/store.d.ts.map +1 -1
  76. package/dist/entities/store.js +94 -106
  77. package/dist/example.d.ts +2 -6
  78. package/dist/example.d.ts.map +1 -1
  79. package/dist/example.js +40 -55
  80. package/dist/handlers/index.d.ts +2 -2
  81. package/dist/handlers/index.d.ts.map +1 -0
  82. package/dist/handlers/index.js +304 -3
  83. package/dist/handlers/marketplace.handlers.d.ts +138 -138
  84. package/dist/handlers/marketplace.handlers.d.ts.map +1 -1
  85. package/dist/handlers/marketplace.handlers.js +284 -309
  86. package/dist/index.d.ts +13 -31
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/index.js +2017 -32
  89. package/dist/marketplace.capability.d.ts +3 -8
  90. package/dist/marketplace.capability.d.ts.map +1 -1
  91. package/dist/marketplace.capability.js +41 -34
  92. package/dist/marketplace.feature.d.ts +1 -7
  93. package/dist/marketplace.feature.d.ts.map +1 -1
  94. package/dist/marketplace.feature.js +136 -313
  95. package/dist/node/docs/index.js +103 -0
  96. package/dist/node/docs/marketplace.docblock.js +103 -0
  97. package/dist/node/entities/index.js +721 -0
  98. package/dist/node/entities/order.js +167 -0
  99. package/dist/node/entities/payout.js +142 -0
  100. package/dist/node/entities/product.js +152 -0
  101. package/dist/node/entities/review.js +129 -0
  102. package/dist/node/entities/store.js +97 -0
  103. package/dist/node/example.js +42 -0
  104. package/dist/node/handlers/index.js +303 -0
  105. package/dist/node/handlers/marketplace.handlers.js +303 -0
  106. package/dist/node/index.js +2016 -0
  107. package/dist/node/marketplace.capability.js +40 -0
  108. package/dist/node/marketplace.feature.js +137 -0
  109. package/dist/node/order/index.js +307 -0
  110. package/dist/node/order/order.enum.js +17 -0
  111. package/dist/node/order/order.event.js +131 -0
  112. package/dist/node/order/order.operations.js +172 -0
  113. package/dist/node/order/order.presentation.js +153 -0
  114. package/dist/node/order/order.schema.js +79 -0
  115. package/dist/node/payout/index.js +152 -0
  116. package/dist/node/payout/payout.enum.js +12 -0
  117. package/dist/node/payout/payout.event.js +55 -0
  118. package/dist/node/payout/payout.operations.js +94 -0
  119. package/dist/node/payout/payout.presentation.js +111 -0
  120. package/dist/node/payout/payout.schema.js +61 -0
  121. package/dist/node/product/index.js +249 -0
  122. package/dist/node/product/product.enum.js +13 -0
  123. package/dist/node/product/product.event.js +74 -0
  124. package/dist/node/product/product.operations.js +171 -0
  125. package/dist/node/product/product.presentation.js +158 -0
  126. package/dist/node/product/product.schema.js +84 -0
  127. package/dist/node/review/index.js +206 -0
  128. package/dist/node/review/review.enum.js +11 -0
  129. package/dist/node/review/review.event.js +50 -0
  130. package/dist/node/review/review.operations.js +152 -0
  131. package/dist/node/review/review.presentation.js +123 -0
  132. package/dist/node/review/review.schema.js +74 -0
  133. package/dist/node/seeders/index.js +12 -0
  134. package/dist/node/store/index.js +142 -0
  135. package/dist/node/store/store.enum.js +11 -0
  136. package/dist/node/store/store.event.js +52 -0
  137. package/dist/node/store/store.operations.js +88 -0
  138. package/dist/node/store/store.presentation.js +94 -0
  139. package/dist/node/store/store.schema.js +43 -0
  140. package/dist/node/tests/operations.test-spec.js +139 -0
  141. package/dist/node/ui/MarketplaceDashboard.js +418 -0
  142. package/dist/node/ui/hooks/index.js +59 -0
  143. package/dist/node/ui/hooks/useMarketplaceData.js +56 -0
  144. package/dist/node/ui/index.js +668 -0
  145. package/dist/node/ui/renderers/index.js +248 -0
  146. package/dist/node/ui/renderers/marketplace.markdown.js +248 -0
  147. package/dist/order/index.d.ts +8 -5
  148. package/dist/order/index.d.ts.map +1 -0
  149. package/dist/order/index.js +307 -5
  150. package/dist/order/order.enum.d.ts +1 -6
  151. package/dist/order/order.enum.d.ts.map +1 -1
  152. package/dist/order/order.enum.js +16 -20
  153. package/dist/order/order.event.d.ts +133 -139
  154. package/dist/order/order.event.d.ts.map +1 -1
  155. package/dist/order/order.event.js +121 -205
  156. package/dist/order/order.operations.d.ts +291 -297
  157. package/dist/order/order.operations.d.ts.map +1 -1
  158. package/dist/order/order.operations.js +169 -115
  159. package/dist/order/order.presentation.d.ts +3 -8
  160. package/dist/order/order.presentation.d.ts.map +1 -1
  161. package/dist/order/order.presentation.js +149 -81
  162. package/dist/order/order.schema.d.ts +143 -148
  163. package/dist/order/order.schema.d.ts.map +1 -1
  164. package/dist/order/order.schema.js +75 -150
  165. package/dist/payout/index.d.ts +8 -5
  166. package/dist/payout/index.d.ts.map +1 -0
  167. package/dist/payout/index.js +152 -5
  168. package/dist/payout/payout.enum.d.ts +1 -6
  169. package/dist/payout/payout.enum.d.ts.map +1 -1
  170. package/dist/payout/payout.enum.js +11 -15
  171. package/dist/payout/payout.event.d.ts +54 -60
  172. package/dist/payout/payout.event.d.ts.map +1 -1
  173. package/dist/payout/payout.event.js +51 -87
  174. package/dist/payout/payout.operations.d.ts +82 -88
  175. package/dist/payout/payout.operations.d.ts.map +1 -1
  176. package/dist/payout/payout.operations.js +92 -50
  177. package/dist/payout/payout.presentation.d.ts +2 -7
  178. package/dist/payout/payout.presentation.d.ts.map +1 -1
  179. package/dist/payout/payout.presentation.js +108 -56
  180. package/dist/payout/payout.schema.d.ts +139 -144
  181. package/dist/payout/payout.schema.d.ts.map +1 -1
  182. package/dist/payout/payout.schema.js +58 -112
  183. package/dist/product/index.d.ts +8 -5
  184. package/dist/product/index.d.ts.map +1 -0
  185. package/dist/product/index.js +249 -5
  186. package/dist/product/product.enum.d.ts +1 -6
  187. package/dist/product/product.enum.d.ts.map +1 -1
  188. package/dist/product/product.enum.js +12 -16
  189. package/dist/product/product.event.d.ts +63 -69
  190. package/dist/product/product.event.d.ts.map +1 -1
  191. package/dist/product/product.event.js +68 -113
  192. package/dist/product/product.operations.d.ts +225 -231
  193. package/dist/product/product.operations.d.ts.map +1 -1
  194. package/dist/product/product.operations.js +168 -104
  195. package/dist/product/product.presentation.d.ts +3 -8
  196. package/dist/product/product.presentation.d.ts.map +1 -1
  197. package/dist/product/product.presentation.js +154 -81
  198. package/dist/product/product.schema.d.ts +196 -201
  199. package/dist/product/product.schema.d.ts.map +1 -1
  200. package/dist/product/product.schema.js +80 -171
  201. package/dist/review/index.d.ts +8 -5
  202. package/dist/review/index.d.ts.map +1 -0
  203. package/dist/review/index.js +206 -5
  204. package/dist/review/review.enum.d.ts +1 -6
  205. package/dist/review/review.enum.d.ts.map +1 -1
  206. package/dist/review/review.enum.js +10 -14
  207. package/dist/review/review.event.d.ts +46 -52
  208. package/dist/review/review.event.d.ts.map +1 -1
  209. package/dist/review/review.event.js +46 -79
  210. package/dist/review/review.operations.d.ts +190 -196
  211. package/dist/review/review.operations.d.ts.map +1 -1
  212. package/dist/review/review.operations.js +149 -102
  213. package/dist/review/review.presentation.d.ts +2 -7
  214. package/dist/review/review.presentation.d.ts.map +1 -1
  215. package/dist/review/review.presentation.js +120 -56
  216. package/dist/review/review.schema.d.ts +164 -169
  217. package/dist/review/review.schema.d.ts.map +1 -1
  218. package/dist/review/review.schema.js +70 -151
  219. package/dist/seeders/index.d.ts +4 -8
  220. package/dist/seeders/index.d.ts.map +1 -1
  221. package/dist/seeders/index.js +11 -16
  222. package/dist/store/index.d.ts +8 -5
  223. package/dist/store/index.d.ts.map +1 -0
  224. package/dist/store/index.js +142 -5
  225. package/dist/store/store.enum.d.ts +1 -6
  226. package/dist/store/store.enum.d.ts.map +1 -1
  227. package/dist/store/store.enum.js +10 -14
  228. package/dist/store/store.event.d.ts +42 -48
  229. package/dist/store/store.event.d.ts.map +1 -1
  230. package/dist/store/store.event.js +48 -75
  231. package/dist/store/store.operations.d.ts +98 -104
  232. package/dist/store/store.operations.d.ts.map +1 -1
  233. package/dist/store/store.operations.js +86 -58
  234. package/dist/store/store.presentation.d.ts +2 -7
  235. package/dist/store/store.presentation.d.ts.map +1 -1
  236. package/dist/store/store.presentation.js +91 -56
  237. package/dist/store/store.schema.d.ts +70 -75
  238. package/dist/store/store.schema.d.ts.map +1 -1
  239. package/dist/store/store.schema.js +41 -90
  240. package/dist/tests/operations.test-spec.d.ts +5 -10
  241. package/dist/tests/operations.test-spec.d.ts.map +1 -1
  242. package/dist/tests/operations.test-spec.js +134 -146
  243. package/dist/ui/MarketplaceDashboard.d.ts +1 -6
  244. package/dist/ui/MarketplaceDashboard.d.ts.map +1 -1
  245. package/dist/ui/MarketplaceDashboard.js +413 -313
  246. package/dist/ui/hooks/index.d.ts +2 -2
  247. package/dist/ui/hooks/index.d.ts.map +1 -0
  248. package/dist/ui/hooks/index.js +59 -4
  249. package/dist/ui/hooks/useMarketplaceData.d.ts +16 -20
  250. package/dist/ui/hooks/useMarketplaceData.d.ts.map +1 -1
  251. package/dist/ui/hooks/useMarketplaceData.js +53 -60
  252. package/dist/ui/index.d.ts +7 -6
  253. package/dist/ui/index.d.ts.map +1 -0
  254. package/dist/ui/index.js +668 -5
  255. package/dist/ui/renderers/index.d.ts +2 -2
  256. package/dist/ui/renderers/index.d.ts.map +1 -0
  257. package/dist/ui/renderers/index.js +249 -3
  258. package/dist/ui/renderers/marketplace.markdown.d.ts +13 -15
  259. package/dist/ui/renderers/marketplace.markdown.d.ts.map +1 -1
  260. package/dist/ui/renderers/marketplace.markdown.js +241 -236
  261. package/package.json +529 -110
  262. package/dist/docs/marketplace.docblock.js.map +0 -1
  263. package/dist/entities/index.js.map +0 -1
  264. package/dist/entities/order.js.map +0 -1
  265. package/dist/entities/payout.js.map +0 -1
  266. package/dist/entities/product.js.map +0 -1
  267. package/dist/entities/review.js.map +0 -1
  268. package/dist/entities/store.js.map +0 -1
  269. package/dist/example.js.map +0 -1
  270. package/dist/handlers/marketplace.handlers.js.map +0 -1
  271. package/dist/marketplace.capability.js.map +0 -1
  272. package/dist/marketplace.feature.js.map +0 -1
  273. package/dist/order/order.enum.js.map +0 -1
  274. package/dist/order/order.event.js.map +0 -1
  275. package/dist/order/order.operations.js.map +0 -1
  276. package/dist/order/order.presentation.js.map +0 -1
  277. package/dist/order/order.schema.js.map +0 -1
  278. package/dist/payout/payout.enum.js.map +0 -1
  279. package/dist/payout/payout.event.js.map +0 -1
  280. package/dist/payout/payout.operations.js.map +0 -1
  281. package/dist/payout/payout.presentation.js.map +0 -1
  282. package/dist/payout/payout.schema.js.map +0 -1
  283. package/dist/product/product.enum.js.map +0 -1
  284. package/dist/product/product.event.js.map +0 -1
  285. package/dist/product/product.operations.js.map +0 -1
  286. package/dist/product/product.presentation.js.map +0 -1
  287. package/dist/product/product.schema.js.map +0 -1
  288. package/dist/review/review.enum.js.map +0 -1
  289. package/dist/review/review.event.js.map +0 -1
  290. package/dist/review/review.operations.js.map +0 -1
  291. package/dist/review/review.presentation.js.map +0 -1
  292. package/dist/review/review.schema.js.map +0 -1
  293. package/dist/seeders/index.js.map +0 -1
  294. package/dist/store/store.enum.js.map +0 -1
  295. package/dist/store/store.event.js.map +0 -1
  296. package/dist/store/store.operations.js.map +0 -1
  297. package/dist/store/store.presentation.js.map +0 -1
  298. package/dist/store/store.schema.js.map +0 -1
  299. package/dist/tests/operations.test-spec.js.map +0 -1
  300. package/dist/ui/MarketplaceDashboard.js.map +0 -1
  301. package/dist/ui/hooks/useMarketplaceData.js.map +0 -1
  302. package/dist/ui/renderers/marketplace.markdown.js.map +0 -1
@@ -1,46 +1,722 @@
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";
1
+ // @bun
2
+ // src/entities/store.ts
3
+ import {
4
+ defineEntity,
5
+ defineEntityEnum,
6
+ field,
7
+ index
8
+ } from "@contractspec/lib.schema";
9
+ var StoreStatusEnum = defineEntityEnum({
10
+ name: "StoreStatus",
11
+ values: ["PENDING", "ACTIVE", "SUSPENDED", "CLOSED"],
12
+ schema: "marketplace",
13
+ description: "Status of a store."
14
+ });
15
+ var StoreTypeEnum = defineEntityEnum({
16
+ name: "StoreType",
17
+ values: ["INDIVIDUAL", "BUSINESS", "ENTERPRISE"],
18
+ schema: "marketplace",
19
+ description: "Type of store account."
20
+ });
21
+ var StoreEntity = defineEntity({
22
+ name: "Store",
23
+ description: "A seller storefront on the marketplace.",
24
+ schema: "marketplace",
25
+ map: "store",
26
+ fields: {
27
+ id: field.id({ description: "Unique store ID" }),
28
+ name: field.string({ description: "Store display name" }),
29
+ slug: field.string({ description: "URL-friendly identifier" }),
30
+ description: field.string({ isOptional: true }),
31
+ status: field.enum("StoreStatus", { default: "PENDING" }),
32
+ type: field.enum("StoreType", { default: "INDIVIDUAL" }),
33
+ ownerId: field.foreignKey({ description: "Store owner user ID" }),
34
+ organizationId: field.foreignKey({ isOptional: true }),
35
+ logoFileId: field.string({
36
+ isOptional: true,
37
+ description: "Logo file reference"
38
+ }),
39
+ bannerFileId: field.string({
40
+ isOptional: true,
41
+ description: "Banner file reference"
42
+ }),
43
+ email: field.string({ isOptional: true }),
44
+ phone: field.string({ isOptional: true }),
45
+ website: field.string({ isOptional: true }),
46
+ country: field.string({ isOptional: true }),
47
+ currency: field.string({ default: '"USD"' }),
48
+ timezone: field.string({ isOptional: true }),
49
+ commissionRate: field.decimal({
50
+ default: 0.1,
51
+ description: "Platform commission rate (e.g., 0.1 = 10%)"
52
+ }),
53
+ isVerified: field.boolean({ default: false }),
54
+ verifiedAt: field.dateTime({ isOptional: true }),
55
+ settings: field.json({ isOptional: true }),
56
+ metadata: field.json({ isOptional: true }),
57
+ totalProducts: field.int({ default: 0 }),
58
+ totalOrders: field.int({ default: 0 }),
59
+ totalRevenue: field.decimal({ default: 0 }),
60
+ averageRating: field.decimal({ default: 0 }),
61
+ createdAt: field.createdAt(),
62
+ updatedAt: field.updatedAt(),
63
+ products: field.hasMany("Product"),
64
+ orders: field.hasMany("Order"),
65
+ payouts: field.hasMany("Payout")
66
+ },
67
+ indexes: [
68
+ index.unique(["slug"]),
69
+ index.on(["ownerId"]),
70
+ index.on(["status"]),
71
+ index.on(["country", "status"]),
72
+ index.on(["averageRating"])
73
+ ],
74
+ enums: [StoreStatusEnum, StoreTypeEnum]
75
+ });
76
+ var StoreCategoryEntity = defineEntity({
77
+ name: "StoreCategory",
78
+ description: "Category assignment for stores.",
79
+ schema: "marketplace",
80
+ map: "store_category",
81
+ fields: {
82
+ id: field.id(),
83
+ storeId: field.foreignKey(),
84
+ categoryId: field.foreignKey(),
85
+ isPrimary: field.boolean({ default: false }),
86
+ createdAt: field.createdAt(),
87
+ store: field.belongsTo("Store", ["storeId"], ["id"], {
88
+ onDelete: "Cascade"
89
+ })
90
+ },
91
+ indexes: [index.unique(["storeId", "categoryId"]), index.on(["categoryId"])]
92
+ });
6
93
 
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
94
+ // src/entities/product.ts
95
+ import {
96
+ defineEntity as defineEntity2,
97
+ defineEntityEnum as defineEntityEnum2,
98
+ field as field2,
99
+ index as index2
100
+ } from "@contractspec/lib.schema";
101
+ var ProductStatusEnum = defineEntityEnum2({
102
+ name: "ProductStatus",
103
+ values: [
104
+ "DRAFT",
105
+ "PENDING_REVIEW",
106
+ "ACTIVE",
107
+ "OUT_OF_STOCK",
108
+ "DISCONTINUED",
109
+ "REJECTED"
110
+ ],
111
+ schema: "marketplace",
112
+ description: "Status of a product listing."
113
+ });
114
+ var ProductTypeEnum = defineEntityEnum2({
115
+ name: "ProductType",
116
+ values: ["PHYSICAL", "DIGITAL", "SERVICE", "SUBSCRIPTION"],
117
+ schema: "marketplace",
118
+ description: "Type of product."
119
+ });
120
+ var ProductEntity = defineEntity2({
121
+ name: "Product",
122
+ description: "A product listing on the marketplace.",
123
+ schema: "marketplace",
124
+ map: "product",
125
+ fields: {
126
+ id: field2.id({ description: "Unique product ID" }),
127
+ storeId: field2.foreignKey(),
128
+ name: field2.string({ description: "Product name" }),
129
+ slug: field2.string({ description: "URL-friendly identifier" }),
130
+ description: field2.string({ isOptional: true }),
131
+ shortDescription: field2.string({ isOptional: true }),
132
+ status: field2.enum("ProductStatus", { default: "DRAFT" }),
133
+ type: field2.enum("ProductType", { default: "PHYSICAL" }),
134
+ price: field2.decimal({ description: "Base price" }),
135
+ compareAtPrice: field2.decimal({
136
+ isOptional: true,
137
+ description: "Original price for showing discounts"
138
+ }),
139
+ currency: field2.string({ default: '"USD"' }),
140
+ sku: field2.string({ isOptional: true }),
141
+ barcode: field2.string({ isOptional: true }),
142
+ quantity: field2.int({ default: 0 }),
143
+ trackInventory: field2.boolean({ default: true }),
144
+ allowBackorder: field2.boolean({ default: false }),
145
+ lowStockThreshold: field2.int({ default: 5 }),
146
+ weight: field2.decimal({ isOptional: true }),
147
+ weightUnit: field2.string({ default: '"kg"' }),
148
+ categoryId: field2.string({ isOptional: true }),
149
+ tags: field2.string({ isArray: true }),
150
+ primaryImageId: field2.string({ isOptional: true }),
151
+ seoTitle: field2.string({ isOptional: true }),
152
+ seoDescription: field2.string({ isOptional: true }),
153
+ attributes: field2.json({
154
+ isOptional: true,
155
+ description: "Custom product attributes"
156
+ }),
157
+ reviewCount: field2.int({ default: 0 }),
158
+ averageRating: field2.decimal({ default: 0 }),
159
+ totalSold: field2.int({ default: 0 }),
160
+ createdAt: field2.createdAt(),
161
+ updatedAt: field2.updatedAt(),
162
+ publishedAt: field2.dateTime({ isOptional: true }),
163
+ store: field2.belongsTo("Store", ["storeId"], ["id"]),
164
+ variants: field2.hasMany("ProductVariant"),
165
+ orderItems: field2.hasMany("OrderItem"),
166
+ reviews: field2.hasMany("Review")
167
+ },
168
+ indexes: [
169
+ index2.unique(["storeId", "slug"]),
170
+ index2.on(["storeId", "status"]),
171
+ index2.on(["status", "publishedAt"]),
172
+ index2.on(["categoryId", "status"]),
173
+ index2.on(["averageRating"]),
174
+ index2.on(["totalSold"]),
175
+ index2.on(["price"])
176
+ ],
177
+ enums: [ProductStatusEnum, ProductTypeEnum]
178
+ });
179
+ var ProductVariantEntity = defineEntity2({
180
+ name: "ProductVariant",
181
+ description: "A variant of a product with specific options.",
182
+ schema: "marketplace",
183
+ map: "product_variant",
184
+ fields: {
185
+ id: field2.id(),
186
+ productId: field2.foreignKey(),
187
+ name: field2.string({ description: 'Variant name (e.g., "Large / Blue")' }),
188
+ options: field2.json({
189
+ description: 'Variant options (e.g., {size: "L", color: "Blue"})'
190
+ }),
191
+ price: field2.decimal({ description: "Variant-specific price" }),
192
+ compareAtPrice: field2.decimal({ isOptional: true }),
193
+ sku: field2.string({ isOptional: true }),
194
+ barcode: field2.string({ isOptional: true }),
195
+ quantity: field2.int({ default: 0 }),
196
+ imageId: field2.string({ isOptional: true }),
197
+ isActive: field2.boolean({ default: true }),
198
+ position: field2.int({ default: 0 }),
199
+ createdAt: field2.createdAt(),
200
+ updatedAt: field2.updatedAt(),
201
+ product: field2.belongsTo("Product", ["productId"], ["id"], {
202
+ onDelete: "Cascade"
203
+ })
204
+ },
205
+ indexes: [
206
+ index2.on(["productId", "sku"]),
207
+ index2.on(["productId", "position"]),
208
+ index2.on(["barcode"])
209
+ ]
210
+ });
211
+ var CategoryEntity = defineEntity2({
212
+ name: "Category",
213
+ description: "Product category for organization.",
214
+ schema: "marketplace",
215
+ map: "category",
216
+ fields: {
217
+ id: field2.id(),
218
+ name: field2.string(),
219
+ slug: field2.string(),
220
+ description: field2.string({ isOptional: true }),
221
+ parentId: field2.string({ isOptional: true }),
222
+ path: field2.string({ description: "Full path for hierarchical queries" }),
223
+ level: field2.int({ default: 0 }),
224
+ position: field2.int({ default: 0 }),
225
+ imageId: field2.string({ isOptional: true }),
226
+ isActive: field2.boolean({ default: true }),
227
+ createdAt: field2.createdAt(),
228
+ updatedAt: field2.updatedAt(),
229
+ parent: field2.belongsTo("Category", ["parentId"], ["id"]),
230
+ children: field2.hasMany("Category")
231
+ },
232
+ indexes: [
233
+ index2.unique(["slug"]),
234
+ index2.on(["parentId", "position"]),
235
+ index2.on(["path"]),
236
+ index2.on(["isActive"])
237
+ ]
238
+ });
239
+
240
+ // src/entities/order.ts
241
+ import {
242
+ defineEntity as defineEntity3,
243
+ defineEntityEnum as defineEntityEnum3,
244
+ field as field3,
245
+ index as index3
246
+ } from "@contractspec/lib.schema";
247
+ var OrderStatusEnum = defineEntityEnum3({
248
+ name: "OrderStatus",
249
+ values: [
250
+ "PENDING",
251
+ "PAID",
252
+ "PROCESSING",
253
+ "SHIPPED",
254
+ "DELIVERED",
255
+ "COMPLETED",
256
+ "CANCELLED",
257
+ "REFUNDED",
258
+ "PARTIALLY_REFUNDED",
259
+ "DISPUTED"
260
+ ],
261
+ schema: "marketplace",
262
+ description: "Status of an order."
263
+ });
264
+ var PaymentStatusEnum = defineEntityEnum3({
265
+ name: "PaymentStatus",
266
+ values: [
267
+ "PENDING",
268
+ "AUTHORIZED",
269
+ "CAPTURED",
270
+ "FAILED",
271
+ "REFUNDED",
272
+ "VOIDED"
273
+ ],
274
+ schema: "marketplace",
275
+ description: "Status of payment."
276
+ });
277
+ var OrderEntity = defineEntity3({
278
+ name: "Order",
279
+ description: "A purchase order on the marketplace.",
280
+ schema: "marketplace",
281
+ map: "order",
282
+ fields: {
283
+ id: field3.id({ description: "Unique order ID" }),
284
+ orderNumber: field3.string({ description: "Human-readable order number" }),
285
+ buyerId: field3.foreignKey({ description: "Buyer user ID" }),
286
+ storeId: field3.foreignKey({ description: "Seller store ID" }),
287
+ status: field3.enum("OrderStatus", { default: "PENDING" }),
288
+ paymentStatus: field3.enum("PaymentStatus", { default: "PENDING" }),
289
+ subtotal: field3.decimal({ description: "Sum of item prices" }),
290
+ shippingTotal: field3.decimal({ default: 0 }),
291
+ taxTotal: field3.decimal({ default: 0 }),
292
+ discountTotal: field3.decimal({ default: 0 }),
293
+ total: field3.decimal({ description: "Final total" }),
294
+ currency: field3.string({ default: '"USD"' }),
295
+ platformFee: field3.decimal({ description: "Platform commission amount" }),
296
+ sellerPayout: field3.decimal({ description: "Amount due to seller" }),
297
+ shippingAddress: field3.json({ isOptional: true }),
298
+ billingAddress: field3.json({ isOptional: true }),
299
+ shippingMethod: field3.string({ isOptional: true }),
300
+ trackingNumber: field3.string({ isOptional: true }),
301
+ trackingUrl: field3.string({ isOptional: true }),
302
+ paymentMethod: field3.string({ isOptional: true }),
303
+ paymentIntentId: field3.string({ isOptional: true }),
304
+ buyerNote: field3.string({ isOptional: true }),
305
+ sellerNote: field3.string({ isOptional: true }),
306
+ internalNote: field3.string({ isOptional: true }),
307
+ createdAt: field3.createdAt(),
308
+ updatedAt: field3.updatedAt(),
309
+ paidAt: field3.dateTime({ isOptional: true }),
310
+ shippedAt: field3.dateTime({ isOptional: true }),
311
+ deliveredAt: field3.dateTime({ isOptional: true }),
312
+ completedAt: field3.dateTime({ isOptional: true }),
313
+ cancelledAt: field3.dateTime({ isOptional: true }),
314
+ store: field3.belongsTo("Store", ["storeId"], ["id"]),
315
+ items: field3.hasMany("OrderItem"),
316
+ refunds: field3.hasMany("Refund")
317
+ },
318
+ indexes: [
319
+ index3.unique(["orderNumber"]),
320
+ index3.on(["buyerId", "status"]),
321
+ index3.on(["storeId", "status"]),
322
+ index3.on(["status", "createdAt"]),
323
+ index3.on(["paymentStatus"]),
324
+ index3.on(["createdAt"])
325
+ ],
326
+ enums: [OrderStatusEnum, PaymentStatusEnum]
327
+ });
328
+ var OrderItemEntity = defineEntity3({
329
+ name: "OrderItem",
330
+ description: "An item within an order.",
331
+ schema: "marketplace",
332
+ map: "order_item",
333
+ fields: {
334
+ id: field3.id(),
335
+ orderId: field3.foreignKey(),
336
+ productId: field3.foreignKey(),
337
+ variantId: field3.string({ isOptional: true }),
338
+ productName: field3.string(),
339
+ variantName: field3.string({ isOptional: true }),
340
+ sku: field3.string({ isOptional: true }),
341
+ unitPrice: field3.decimal(),
342
+ quantity: field3.int(),
343
+ subtotal: field3.decimal(),
344
+ quantityFulfilled: field3.int({ default: 0 }),
345
+ quantityRefunded: field3.int({ default: 0 }),
346
+ createdAt: field3.createdAt(),
347
+ updatedAt: field3.updatedAt(),
348
+ order: field3.belongsTo("Order", ["orderId"], ["id"], {
349
+ onDelete: "Cascade"
350
+ }),
351
+ product: field3.belongsTo("Product", ["productId"], ["id"])
352
+ },
353
+ indexes: [index3.on(["orderId"]), index3.on(["productId"])]
354
+ });
355
+ var RefundEntity = defineEntity3({
356
+ name: "Refund",
357
+ description: "A refund for an order.",
358
+ schema: "marketplace",
359
+ map: "refund",
360
+ fields: {
361
+ id: field3.id(),
362
+ orderId: field3.foreignKey(),
363
+ amount: field3.decimal(),
364
+ currency: field3.string(),
365
+ reason: field3.string(),
366
+ notes: field3.string({ isOptional: true }),
367
+ status: field3.string({ default: '"PENDING"' }),
368
+ refundId: field3.string({
369
+ isOptional: true,
370
+ description: "Payment provider refund ID"
371
+ }),
372
+ issuedBy: field3.foreignKey({ description: "User who issued the refund" }),
373
+ createdAt: field3.createdAt(),
374
+ processedAt: field3.dateTime({ isOptional: true }),
375
+ order: field3.belongsTo("Order", ["orderId"], ["id"]),
376
+ items: field3.hasMany("RefundItem")
377
+ },
378
+ indexes: [index3.on(["orderId"]), index3.on(["status"])]
379
+ });
380
+ var RefundItemEntity = defineEntity3({
381
+ name: "RefundItem",
382
+ description: "An item within a refund.",
383
+ schema: "marketplace",
384
+ map: "refund_item",
385
+ fields: {
386
+ id: field3.id(),
387
+ refundId: field3.foreignKey(),
388
+ orderItemId: field3.foreignKey(),
389
+ quantity: field3.int(),
390
+ amount: field3.decimal(),
391
+ createdAt: field3.createdAt(),
392
+ refund: field3.belongsTo("Refund", ["refundId"], ["id"], {
393
+ onDelete: "Cascade"
394
+ }),
395
+ orderItem: field3.belongsTo("OrderItem", ["orderItemId"], ["id"])
396
+ },
397
+ indexes: [index3.on(["refundId"]), index3.on(["orderItemId"])]
398
+ });
399
+
400
+ // src/entities/payout.ts
401
+ import {
402
+ defineEntity as defineEntity4,
403
+ defineEntityEnum as defineEntityEnum4,
404
+ field as field4,
405
+ index as index4
406
+ } from "@contractspec/lib.schema";
407
+ var PayoutStatusEnum = defineEntityEnum4({
408
+ name: "PayoutStatus",
409
+ values: ["PENDING", "PROCESSING", "PAID", "FAILED", "CANCELLED"],
410
+ schema: "marketplace",
411
+ description: "Status of a payout."
412
+ });
413
+ var PayoutScheduleEnum = defineEntityEnum4({
414
+ name: "PayoutSchedule",
415
+ values: ["DAILY", "WEEKLY", "BIWEEKLY", "MONTHLY", "MANUAL"],
416
+ schema: "marketplace",
417
+ description: "Payout schedule frequency."
418
+ });
419
+ var PayoutEntity = defineEntity4({
420
+ name: "Payout",
421
+ description: "A payout to a seller.",
422
+ schema: "marketplace",
423
+ map: "payout",
424
+ fields: {
425
+ id: field4.id({ description: "Unique payout ID" }),
426
+ storeId: field4.foreignKey(),
427
+ payoutNumber: field4.string({ description: "Human-readable payout number" }),
428
+ status: field4.enum("PayoutStatus", { default: "PENDING" }),
429
+ grossAmount: field4.decimal({ description: "Total before fees" }),
430
+ platformFees: field4.decimal({ description: "Platform fees deducted" }),
431
+ otherDeductions: field4.decimal({ default: 0 }),
432
+ netAmount: field4.decimal({ description: "Final payout amount" }),
433
+ currency: field4.string({ default: '"USD"' }),
434
+ periodStart: field4.dateTime({ description: "Start of payout period" }),
435
+ periodEnd: field4.dateTime({ description: "End of payout period" }),
436
+ paymentMethod: field4.string({ isOptional: true }),
437
+ paymentReference: field4.string({ isOptional: true }),
438
+ bankAccountId: field4.string({ isOptional: true }),
439
+ bankAccountLast4: field4.string({ isOptional: true }),
440
+ notes: field4.string({ isOptional: true }),
441
+ failureReason: field4.string({ isOptional: true }),
442
+ orderCount: field4.int({ default: 0 }),
443
+ createdAt: field4.createdAt(),
444
+ updatedAt: field4.updatedAt(),
445
+ scheduledAt: field4.dateTime({ isOptional: true }),
446
+ processedAt: field4.dateTime({ isOptional: true }),
447
+ paidAt: field4.dateTime({ isOptional: true }),
448
+ store: field4.belongsTo("Store", ["storeId"], ["id"]),
449
+ items: field4.hasMany("PayoutItem")
450
+ },
451
+ indexes: [
452
+ index4.unique(["payoutNumber"]),
453
+ index4.on(["storeId", "status"]),
454
+ index4.on(["status", "scheduledAt"]),
455
+ index4.on(["periodStart", "periodEnd"])
456
+ ],
457
+ enums: [PayoutStatusEnum]
458
+ });
459
+ var PayoutItemEntity = defineEntity4({
460
+ name: "PayoutItem",
461
+ description: "An order included in a payout.",
462
+ schema: "marketplace",
463
+ map: "payout_item",
464
+ fields: {
465
+ id: field4.id(),
466
+ payoutId: field4.foreignKey(),
467
+ orderId: field4.foreignKey(),
468
+ orderTotal: field4.decimal(),
469
+ platformFee: field4.decimal(),
470
+ netAmount: field4.decimal(),
471
+ createdAt: field4.createdAt(),
472
+ payout: field4.belongsTo("Payout", ["payoutId"], ["id"], {
473
+ onDelete: "Cascade"
474
+ }),
475
+ order: field4.belongsTo("Order", ["orderId"], ["id"])
476
+ },
477
+ indexes: [index4.on(["payoutId"]), index4.on(["orderId"])]
478
+ });
479
+ var BankAccountEntity = defineEntity4({
480
+ name: "BankAccount",
481
+ description: "A bank account for receiving payouts.",
482
+ schema: "marketplace",
483
+ map: "bank_account",
484
+ fields: {
485
+ id: field4.id(),
486
+ storeId: field4.foreignKey(),
487
+ accountHolderName: field4.string(),
488
+ accountType: field4.string({ default: '"CHECKING"' }),
489
+ bankName: field4.string({ isOptional: true }),
490
+ last4: field4.string({ description: "Last 4 digits of account" }),
491
+ routingLast4: field4.string({ isOptional: true }),
492
+ externalId: field4.string({
493
+ isOptional: true,
494
+ description: "External provider account ID"
495
+ }),
496
+ isDefault: field4.boolean({ default: false }),
497
+ isVerified: field4.boolean({ default: false }),
498
+ createdAt: field4.createdAt(),
499
+ updatedAt: field4.updatedAt(),
500
+ verifiedAt: field4.dateTime({ isOptional: true }),
501
+ store: field4.belongsTo("Store", ["storeId"], ["id"])
502
+ },
503
+ indexes: [index4.on(["storeId", "isDefault"]), index4.on(["externalId"])]
504
+ });
505
+ var PayoutSettingsEntity = defineEntity4({
506
+ name: "PayoutSettings",
507
+ description: "Payout configuration for a store.",
508
+ schema: "marketplace",
509
+ map: "payout_settings",
510
+ fields: {
511
+ id: field4.id(),
512
+ storeId: field4.foreignKey(),
513
+ schedule: field4.enum("PayoutSchedule", { default: "WEEKLY" }),
514
+ dayOfWeek: field4.int({
515
+ isOptional: true,
516
+ description: "Day for weekly/biweekly (0=Sunday)"
517
+ }),
518
+ dayOfMonth: field4.int({
519
+ isOptional: true,
520
+ description: "Day for monthly (1-28)"
521
+ }),
522
+ minimumPayout: field4.decimal({
523
+ default: 50,
524
+ description: "Minimum amount for payout"
525
+ }),
526
+ defaultBankAccountId: field4.string({ isOptional: true }),
527
+ createdAt: field4.createdAt(),
528
+ updatedAt: field4.updatedAt(),
529
+ store: field4.belongsTo("Store", ["storeId"], ["id"])
530
+ },
531
+ indexes: [index4.unique(["storeId"])],
532
+ enums: [PayoutScheduleEnum]
533
+ });
534
+
535
+ // src/entities/review.ts
536
+ import {
537
+ defineEntity as defineEntity5,
538
+ defineEntityEnum as defineEntityEnum5,
539
+ field as field5,
540
+ index as index5
541
+ } from "@contractspec/lib.schema";
542
+ var ReviewStatusEnum = defineEntityEnum5({
543
+ name: "ReviewStatus",
544
+ values: ["PENDING", "APPROVED", "REJECTED", "FLAGGED"],
545
+ schema: "marketplace",
546
+ description: "Status of a review."
547
+ });
548
+ var ReviewTypeEnum = defineEntityEnum5({
549
+ name: "ReviewType",
550
+ values: ["PRODUCT", "STORE", "ORDER"],
551
+ schema: "marketplace",
552
+ description: "Type of review."
553
+ });
554
+ var ReviewEntity = defineEntity5({
555
+ name: "Review",
556
+ description: "A customer review on the marketplace.",
557
+ schema: "marketplace",
558
+ map: "review",
559
+ fields: {
560
+ id: field5.id({ description: "Unique review ID" }),
561
+ type: field5.enum("ReviewType", { default: "PRODUCT" }),
562
+ productId: field5.string({ isOptional: true }),
563
+ storeId: field5.string({ isOptional: true }),
564
+ orderId: field5.string({ isOptional: true }),
565
+ orderItemId: field5.string({ isOptional: true }),
566
+ authorId: field5.foreignKey({ description: "Reviewer user ID" }),
567
+ rating: field5.int({ description: "Rating 1-5" }),
568
+ title: field5.string({ isOptional: true }),
569
+ content: field5.string({ isOptional: true }),
570
+ isVerifiedPurchase: field5.boolean({ default: false }),
571
+ status: field5.enum("ReviewStatus", { default: "PENDING" }),
572
+ hasMedia: field5.boolean({ default: false }),
573
+ helpfulCount: field5.int({ default: 0 }),
574
+ notHelpfulCount: field5.int({ default: 0 }),
575
+ moderatedBy: field5.string({ isOptional: true }),
576
+ moderatedAt: field5.dateTime({ isOptional: true }),
577
+ moderationNote: field5.string({ isOptional: true }),
578
+ hasResponse: field5.boolean({ default: false }),
579
+ createdAt: field5.createdAt(),
580
+ updatedAt: field5.updatedAt(),
581
+ product: field5.belongsTo("Product", ["productId"], ["id"]),
582
+ store: field5.belongsTo("Store", ["storeId"], ["id"]),
583
+ responses: field5.hasMany("ReviewResponse"),
584
+ votes: field5.hasMany("ReviewVote")
585
+ },
586
+ indexes: [
587
+ index5.on(["productId", "status", "createdAt"]),
588
+ index5.on(["storeId", "status", "createdAt"]),
589
+ index5.on(["authorId"]),
590
+ index5.on(["orderId"]),
591
+ index5.on(["status"]),
592
+ index5.on(["rating"]),
593
+ index5.on(["isVerifiedPurchase", "status"])
594
+ ],
595
+ enums: [ReviewStatusEnum, ReviewTypeEnum]
596
+ });
597
+ var ReviewResponseEntity = defineEntity5({
598
+ name: "ReviewResponse",
599
+ description: "A seller response to a review.",
600
+ schema: "marketplace",
601
+ map: "review_response",
602
+ fields: {
603
+ id: field5.id(),
604
+ reviewId: field5.foreignKey(),
605
+ authorId: field5.foreignKey(),
606
+ content: field5.string(),
607
+ createdAt: field5.createdAt(),
608
+ updatedAt: field5.updatedAt(),
609
+ review: field5.belongsTo("Review", ["reviewId"], ["id"], {
610
+ onDelete: "Cascade"
611
+ })
612
+ },
613
+ indexes: [index5.on(["reviewId"]), index5.on(["authorId"])]
614
+ });
615
+ var ReviewVoteEntity = defineEntity5({
616
+ name: "ReviewVote",
617
+ description: "A helpfulness vote on a review.",
618
+ schema: "marketplace",
619
+ map: "review_vote",
620
+ fields: {
621
+ id: field5.id(),
622
+ reviewId: field5.foreignKey(),
623
+ userId: field5.foreignKey(),
624
+ isHelpful: field5.boolean(),
625
+ createdAt: field5.createdAt(),
626
+ review: field5.belongsTo("Review", ["reviewId"], ["id"], {
627
+ onDelete: "Cascade"
628
+ })
629
+ },
630
+ indexes: [index5.unique(["reviewId", "userId"]), index5.on(["userId"])]
631
+ });
632
+ var ReviewReportEntity = defineEntity5({
633
+ name: "ReviewReport",
634
+ description: "A report/flag on a review.",
635
+ schema: "marketplace",
636
+ map: "review_report",
637
+ fields: {
638
+ id: field5.id(),
639
+ reviewId: field5.foreignKey(),
640
+ reporterId: field5.foreignKey(),
641
+ reason: field5.string({ description: "Report reason category" }),
642
+ details: field5.string({ isOptional: true }),
643
+ status: field5.string({ default: '"PENDING"' }),
644
+ resolvedBy: field5.string({ isOptional: true }),
645
+ resolvedAt: field5.dateTime({ isOptional: true }),
646
+ resolution: field5.string({ isOptional: true }),
647
+ createdAt: field5.createdAt(),
648
+ review: field5.belongsTo("Review", ["reviewId"], ["id"])
649
+ },
650
+ indexes: [
651
+ index5.on(["reviewId"]),
652
+ index5.on(["status"]),
653
+ index5.on(["reporterId"])
654
+ ]
655
+ });
656
+ // src/entities/index.ts
657
+ var marketplaceEntities = [
658
+ StoreEntity,
659
+ StoreCategoryEntity,
660
+ ProductEntity,
661
+ ProductVariantEntity,
662
+ CategoryEntity,
663
+ OrderEntity,
664
+ OrderItemEntity,
665
+ RefundEntity,
666
+ RefundItemEntity,
667
+ PayoutEntity,
668
+ PayoutItemEntity,
669
+ BankAccountEntity,
670
+ PayoutSettingsEntity,
671
+ ReviewEntity,
672
+ ReviewResponseEntity,
673
+ ReviewVoteEntity,
674
+ ReviewReportEntity
26
675
  ];
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
- ]
676
+ var marketplaceSchemaContribution = {
677
+ moduleId: "@contractspec/example.marketplace",
678
+ entities: marketplaceEntities,
679
+ enums: [
680
+ StoreStatusEnum,
681
+ StoreTypeEnum,
682
+ ProductStatusEnum,
683
+ ProductTypeEnum,
684
+ OrderStatusEnum,
685
+ PaymentStatusEnum,
686
+ PayoutStatusEnum,
687
+ PayoutScheduleEnum,
688
+ ReviewStatusEnum,
689
+ ReviewTypeEnum
690
+ ]
691
+ };
692
+ export {
693
+ marketplaceSchemaContribution,
694
+ marketplaceEntities,
695
+ StoreTypeEnum,
696
+ StoreStatusEnum,
697
+ StoreEntity,
698
+ StoreCategoryEntity,
699
+ ReviewVoteEntity,
700
+ ReviewTypeEnum,
701
+ ReviewStatusEnum,
702
+ ReviewResponseEntity,
703
+ ReviewReportEntity,
704
+ ReviewEntity,
705
+ RefundItemEntity,
706
+ RefundEntity,
707
+ ProductVariantEntity,
708
+ ProductTypeEnum,
709
+ ProductStatusEnum,
710
+ ProductEntity,
711
+ PayoutStatusEnum,
712
+ PayoutSettingsEntity,
713
+ PayoutScheduleEnum,
714
+ PayoutItemEntity,
715
+ PayoutEntity,
716
+ PaymentStatusEnum,
717
+ OrderStatusEnum,
718
+ OrderItemEntity,
719
+ OrderEntity,
720
+ CategoryEntity,
721
+ BankAccountEntity
42
722
  };
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