@lssm/example.marketplace 0.0.0-canary-20251217083314 → 1.41.1

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 (205) hide show
  1. package/dist/docs/index.js +1 -1
  2. package/dist/docs/marketplace.docblock.js +5 -61
  3. package/dist/entities/index.js +1 -45
  4. package/dist/entities/order.js +1 -173
  5. package/dist/entities/payout.js +1 -162
  6. package/dist/entities/product.js +1 -161
  7. package/dist/entities/review.js +1 -152
  8. package/dist/entities/store.js +1 -110
  9. package/dist/example.js +1 -50
  10. package/dist/index.js +1 -27
  11. package/dist/marketplace.feature.js +1 -308
  12. package/dist/order/index.js +1 -6
  13. package/dist/order/order.contracts.js +1 -74
  14. package/dist/order/order.enum.js +1 -22
  15. package/dist/order/order.event.js +1 -193
  16. package/dist/order/order.presentation.js +1 -72
  17. package/dist/order/order.schema.js +1 -156
  18. package/dist/payout/index.js +1 -6
  19. package/dist/payout/payout.contracts.js +1 -32
  20. package/dist/payout/payout.enum.js +1 -17
  21. package/dist/payout/payout.event.js +1 -84
  22. package/dist/payout/payout.presentation.js +1 -50
  23. package/dist/payout/payout.schema.js +1 -117
  24. package/dist/product/index.js +1 -6
  25. package/dist/product/product.contracts.js +1 -65
  26. package/dist/product/product.enum.js +1 -18
  27. package/dist/product/product.event.js +1 -103
  28. package/dist/product/product.presentation.js +1 -72
  29. package/dist/product/product.schema.js +1 -177
  30. package/dist/review/index.js +1 -6
  31. package/dist/review/review.contracts.js +1 -65
  32. package/dist/review/review.enum.js +1 -16
  33. package/dist/review/review.event.js +1 -76
  34. package/dist/review/review.presentation.js +1 -50
  35. package/dist/review/review.schema.js +1 -157
  36. package/dist/store/index.js +1 -6
  37. package/dist/store/store.contracts.js +1 -41
  38. package/dist/store/store.enum.js +1 -16
  39. package/dist/store/store.event.js +1 -72
  40. package/dist/store/store.presentation.js +1 -50
  41. package/dist/store/store.schema.js +1 -94
  42. package/dist/tsconfig.tsbuildinfo +1 -0
  43. package/package.json +53 -53
  44. package/dist/docs/index.d.ts +0 -1
  45. package/dist/docs/marketplace.docblock.d.ts +0 -1
  46. package/dist/entities/index.d.ts +0 -308
  47. package/dist/entities/order.d.ts +0 -104
  48. package/dist/entities/payout.d.ts +0 -91
  49. package/dist/entities/product.d.ts +0 -92
  50. package/dist/entities/review.d.ts +0 -82
  51. package/dist/entities/store.d.ts +0 -59
  52. package/dist/example.d.ts +0 -39
  53. package/dist/index.d.ts +0 -21
  54. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -88
  55. package/dist/libs/contracts/dist/client/index.js +0 -5
  56. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
  57. package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
  58. package/dist/libs/contracts/dist/client/react/index.js +0 -4
  59. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  60. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -60
  61. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  62. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  63. package/dist/libs/contracts/dist/docs/index.js +0 -29
  64. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  65. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  66. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  67. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  68. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  69. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  70. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  71. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  72. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  73. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  74. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  75. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  76. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  77. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  78. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  79. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  80. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  81. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  82. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  83. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  84. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  85. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  86. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  87. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  88. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  89. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  90. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  91. package/dist/libs/contracts/dist/events.js +0 -10
  92. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  93. package/dist/libs/contracts/dist/index.js +0 -71
  94. package/dist/libs/contracts/dist/install.js +0 -2
  95. package/dist/libs/contracts/dist/integrations/contracts.js +0 -377
  96. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  97. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  98. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  99. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  100. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  101. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
  102. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -13
  103. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  104. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  105. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
  106. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
  107. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  108. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
  109. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
  110. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
  111. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
  112. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  113. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
  114. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  115. package/dist/libs/contracts/dist/jsonschema.js +0 -1
  116. package/dist/libs/contracts/dist/knowledge/contracts.js +0 -306
  117. package/dist/libs/contracts/dist/knowledge/index.js +0 -7
  118. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  119. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  120. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  121. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
  122. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  123. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  124. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  125. package/dist/libs/contracts/dist/llm/exporters.js +0 -19
  126. package/dist/libs/contracts/dist/llm/index.js +0 -2
  127. package/dist/libs/contracts/dist/llm/prompts.js +0 -1
  128. package/dist/libs/contracts/dist/onboarding-base.js +0 -196
  129. package/dist/libs/contracts/dist/openapi.js +0 -1
  130. package/dist/libs/contracts/dist/ownership.js +0 -21
  131. package/dist/libs/contracts/dist/presentations.js +0 -1
  132. package/dist/libs/contracts/dist/presentations.v2.js +0 -11
  133. package/dist/libs/contracts/dist/prompt.js +0 -1
  134. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  135. package/dist/libs/contracts/dist/regenerator/index.js +0 -1
  136. package/dist/libs/contracts/dist/regenerator/service.js +0 -6
  137. package/dist/libs/contracts/dist/registry.js +0 -2
  138. package/dist/libs/contracts/dist/resources.js +0 -1
  139. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  140. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  141. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  142. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
  143. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  144. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  145. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  146. package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
  147. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
  148. package/dist/libs/contracts/dist/server/index.js +0 -8
  149. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
  150. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
  151. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  152. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
  153. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  154. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  155. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  156. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  157. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  158. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  159. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  160. package/dist/libs/contracts/dist/spec.js +0 -34
  161. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  162. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  163. package/dist/libs/contracts/dist/tests/index.js +0 -1
  164. package/dist/libs/contracts/dist/tests/runner.js +0 -2
  165. package/dist/libs/contracts/dist/workflow/index.js +0 -1
  166. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  167. package/dist/libs/schema/dist/EnumType.js +0 -56
  168. package/dist/libs/schema/dist/FieldType.js +0 -49
  169. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  170. package/dist/libs/schema/dist/SchemaModel.js +0 -39
  171. package/dist/libs/schema/dist/entity/defineEntity.js +0 -236
  172. package/dist/libs/schema/dist/entity/index.js +0 -2
  173. package/dist/libs/schema/dist/entity/types.js +0 -1
  174. package/dist/libs/schema/dist/index.js +0 -6
  175. package/dist/marketplace.feature.d.ts +0 -11
  176. package/dist/order/index.d.ts +0 -5
  177. package/dist/order/order.contracts.d.ts +0 -367
  178. package/dist/order/order.enum.d.ts +0 -9
  179. package/dist/order/order.event.d.ts +0 -144
  180. package/dist/order/order.presentation.d.ts +0 -8
  181. package/dist/order/order.schema.d.ts +0 -164
  182. package/dist/payout/index.d.ts +0 -5
  183. package/dist/payout/payout.contracts.d.ts +0 -96
  184. package/dist/payout/payout.enum.d.ts +0 -9
  185. package/dist/payout/payout.event.d.ts +0 -62
  186. package/dist/payout/payout.presentation.d.ts +0 -7
  187. package/dist/payout/payout.schema.d.ts +0 -156
  188. package/dist/product/index.d.ts +0 -5
  189. package/dist/product/product.contracts.d.ts +0 -272
  190. package/dist/product/product.enum.d.ts +0 -9
  191. package/dist/product/product.event.d.ts +0 -72
  192. package/dist/product/product.presentation.d.ts +0 -8
  193. package/dist/product/product.schema.d.ts +0 -217
  194. package/dist/review/index.d.ts +0 -5
  195. package/dist/review/review.contracts.d.ts +0 -236
  196. package/dist/review/review.enum.d.ts +0 -9
  197. package/dist/review/review.event.d.ts +0 -54
  198. package/dist/review/review.presentation.d.ts +0 -7
  199. package/dist/review/review.schema.d.ts +0 -189
  200. package/dist/store/index.d.ts +0 -5
  201. package/dist/store/store.contracts.d.ts +0 -130
  202. package/dist/store/store.enum.d.ts +0 -9
  203. package/dist/store/store.event.d.ts +0 -50
  204. package/dist/store/store.presentation.d.ts +0 -7
  205. package/dist/store/store.schema.d.ts +0 -83
@@ -1,65 +1 @@
1
- import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
2
- import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review.schema.js";
3
-
4
- //#region src/review/review.contracts.ts
5
- const OWNERS = ["@example.marketplace"];
6
- /**
7
- * Create a product/store review.
8
- */
9
- const CreateReviewContract = defineCommand({
10
- meta: {
11
- name: "marketplace.review.create",
12
- version: 1,
13
- stability: "stable",
14
- owners: [...OWNERS],
15
- tags: [
16
- "marketplace",
17
- "review",
18
- "create"
19
- ],
20
- description: "Create a product/store review.",
21
- goal: "Allow buyers to leave feedback.",
22
- context: "Post-purchase."
23
- },
24
- io: {
25
- input: CreateReviewInputModel,
26
- output: ReviewModel
27
- },
28
- policy: { auth: "user" },
29
- sideEffects: {
30
- emits: [{
31
- name: "marketplace.review.created",
32
- version: 1,
33
- when: "Review is created",
34
- payload: ReviewModel
35
- }],
36
- audit: ["marketplace.review.created"]
37
- }
38
- });
39
- /**
40
- * List reviews with filters.
41
- */
42
- const ListReviewsContract = defineQuery({
43
- meta: {
44
- name: "marketplace.review.list",
45
- version: 1,
46
- stability: "stable",
47
- owners: [...OWNERS],
48
- tags: [
49
- "marketplace",
50
- "review",
51
- "list"
52
- ],
53
- description: "List reviews with filters.",
54
- goal: "Display product/store reviews.",
55
- context: "Product page, store page."
56
- },
57
- io: {
58
- input: ListReviewsInputModel,
59
- output: ListReviewsOutputModel
60
- },
61
- policy: { auth: "anonymous" }
62
- });
63
-
64
- //#endregion
65
- export { CreateReviewContract, ListReviewsContract };
1
+ import{CreateReviewInputModel as e,ListReviewsInputModel as t,ListReviewsOutputModel as n,ReviewModel as r}from"./review.schema.js";import{defineCommand as i,defineQuery as a}from"@lssm/lib.contracts/spec";const o=[`@example.marketplace`],s=i({meta:{name:`marketplace.review.create`,version:1,stability:`stable`,owners:[...o],tags:[`marketplace`,`review`,`create`],description:`Create a product/store review.`,goal:`Allow buyers to leave feedback.`,context:`Post-purchase.`},io:{input:e,output:r},policy:{auth:`user`},sideEffects:{emits:[{name:`marketplace.review.created`,version:1,when:`Review is created`,payload:r}],audit:[`marketplace.review.created`]}}),c=a({meta:{name:`marketplace.review.list`,version:1,stability:`stable`,owners:[...o],tags:[`marketplace`,`review`,`list`],description:`List reviews with filters.`,goal:`Display product/store reviews.`,context:`Product page, store page.`},io:{input:t,output:n},policy:{auth:`anonymous`}});export{s as CreateReviewContract,c as ListReviewsContract};
@@ -1,16 +1 @@
1
- import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
- import "../libs/schema/dist/index.js";
3
-
4
- //#region src/review/review.enum.ts
5
- /**
6
- * Review status enum.
7
- */
8
- const ReviewStatusEnum = defineEnum("ReviewStatus", [
9
- "PENDING",
10
- "APPROVED",
11
- "REJECTED",
12
- "FLAGGED"
13
- ]);
14
-
15
- //#endregion
16
- export { ReviewStatusEnum };
1
+ import{defineEnum as e}from"@lssm/lib.schema";const t=e(`ReviewStatus`,[`PENDING`,`APPROVED`,`REJECTED`,`FLAGGED`]);export{t as ReviewStatusEnum};
@@ -1,76 +1 @@
1
- import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
2
- import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
3
- import "../libs/schema/dist/index.js";
4
- import { defineEvent } from "../libs/contracts/dist/events.js";
5
- import "../libs/contracts/dist/index.js";
6
-
7
- //#region src/review/review.event.ts
8
- const ReviewCreatedPayload = defineSchemaModel({
9
- name: "ReviewCreatedEventPayload",
10
- fields: {
11
- reviewId: {
12
- type: ScalarTypeEnum.String_unsecure(),
13
- isOptional: false
14
- },
15
- productId: {
16
- type: ScalarTypeEnum.String_unsecure(),
17
- isOptional: true
18
- },
19
- storeId: {
20
- type: ScalarTypeEnum.String_unsecure(),
21
- isOptional: true
22
- },
23
- authorId: {
24
- type: ScalarTypeEnum.String_unsecure(),
25
- isOptional: false
26
- },
27
- rating: {
28
- type: ScalarTypeEnum.Int_unsecure(),
29
- isOptional: false
30
- },
31
- isVerifiedPurchase: {
32
- type: ScalarTypeEnum.Boolean(),
33
- isOptional: false
34
- },
35
- timestamp: {
36
- type: ScalarTypeEnum.DateTime(),
37
- isOptional: false
38
- }
39
- }
40
- });
41
- const ReviewRespondedPayload = defineSchemaModel({
42
- name: "ReviewRespondedEventPayload",
43
- fields: {
44
- reviewId: {
45
- type: ScalarTypeEnum.String_unsecure(),
46
- isOptional: false
47
- },
48
- responseId: {
49
- type: ScalarTypeEnum.String_unsecure(),
50
- isOptional: false
51
- },
52
- authorId: {
53
- type: ScalarTypeEnum.String_unsecure(),
54
- isOptional: false
55
- },
56
- timestamp: {
57
- type: ScalarTypeEnum.DateTime(),
58
- isOptional: false
59
- }
60
- }
61
- });
62
- const ReviewCreatedEvent = defineEvent({
63
- name: "marketplace.review.created",
64
- version: 1,
65
- description: "A review has been created.",
66
- payload: ReviewCreatedPayload
67
- });
68
- const ReviewRespondedEvent = defineEvent({
69
- name: "marketplace.review.responded",
70
- version: 1,
71
- description: "A seller has responded to a review.",
72
- payload: ReviewRespondedPayload
73
- });
74
-
75
- //#endregion
76
- export { ReviewCreatedEvent, ReviewRespondedEvent };
1
+ import{ScalarTypeEnum as e,defineSchemaModel as t}from"@lssm/lib.schema";import{defineEvent as n}from"@lssm/lib.contracts";const r=t({name:`ReviewCreatedEventPayload`,fields:{reviewId:{type:e.String_unsecure(),isOptional:!1},productId:{type:e.String_unsecure(),isOptional:!0},storeId:{type:e.String_unsecure(),isOptional:!0},authorId:{type:e.String_unsecure(),isOptional:!1},rating:{type:e.Int_unsecure(),isOptional:!1},isVerifiedPurchase:{type:e.Boolean(),isOptional:!1},timestamp:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`ReviewRespondedEventPayload`,fields:{reviewId:{type:e.String_unsecure(),isOptional:!1},responseId:{type:e.String_unsecure(),isOptional:!1},authorId:{type:e.String_unsecure(),isOptional:!1},timestamp:{type:e.DateTime(),isOptional:!1}}}),a=n({name:`marketplace.review.created`,version:1,description:`A review has been created.`,payload:r}),o=n({name:`marketplace.review.responded`,version:1,description:`A seller has responded to a review.`,payload:i});export{a as ReviewCreatedEvent,o as ReviewRespondedEvent};
@@ -1,50 +1 @@
1
- import { ReviewModel } from "./review.schema.js";
2
-
3
- //#region src/review/review.presentation.ts
4
- const ReviewListPresentation = {
5
- meta: {
6
- name: "marketplace.review.list",
7
- version: 1,
8
- description: "List of product reviews",
9
- domain: "marketplace",
10
- owners: ["@marketplace-team"],
11
- tags: [
12
- "marketplace",
13
- "review",
14
- "list"
15
- ]
16
- },
17
- source: {
18
- type: "component",
19
- framework: "react",
20
- componentKey: "ReviewList",
21
- props: ReviewModel
22
- },
23
- targets: ["react", "markdown"],
24
- policy: { flags: ["marketplace.reviews.enabled"] }
25
- };
26
- const ReviewFormPresentation = {
27
- meta: {
28
- name: "marketplace.review.form",
29
- version: 1,
30
- description: "Form for submitting product reviews",
31
- domain: "marketplace",
32
- owners: ["@marketplace-team"],
33
- tags: [
34
- "marketplace",
35
- "review",
36
- "form"
37
- ]
38
- },
39
- source: {
40
- type: "component",
41
- framework: "react",
42
- componentKey: "ReviewForm",
43
- props: ReviewModel
44
- },
45
- targets: ["react"],
46
- policy: { flags: ["marketplace.reviews.enabled"] }
47
- };
48
-
49
- //#endregion
50
- export { ReviewFormPresentation, ReviewListPresentation };
1
+ import{ReviewModel as e}from"./review.schema.js";const t={meta:{name:`marketplace.review.list`,version:1,description:`List of product reviews`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`review`,`list`]},source:{type:`component`,framework:`react`,componentKey:`ReviewList`,props:e},targets:[`react`,`markdown`],policy:{flags:[`marketplace.reviews.enabled`]}},n={meta:{name:`marketplace.review.form`,version:1,description:`Form for submitting product reviews`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`review`,`form`]},source:{type:`component`,framework:`react`,componentKey:`ReviewForm`,props:e},targets:[`react`],policy:{flags:[`marketplace.reviews.enabled`]}};export{n as ReviewFormPresentation,t as ReviewListPresentation};
@@ -1,157 +1 @@
1
- import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
2
- import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
3
- import "../libs/schema/dist/index.js";
4
- import { ReviewStatusEnum } from "./review.enum.js";
5
-
6
- //#region src/review/review.schema.ts
7
- /**
8
- * A customer review.
9
- */
10
- const ReviewModel = defineSchemaModel({
11
- name: "ReviewModel",
12
- description: "A customer review",
13
- fields: {
14
- id: {
15
- type: ScalarTypeEnum.String_unsecure(),
16
- isOptional: false
17
- },
18
- productId: {
19
- type: ScalarTypeEnum.String_unsecure(),
20
- isOptional: true
21
- },
22
- storeId: {
23
- type: ScalarTypeEnum.String_unsecure(),
24
- isOptional: true
25
- },
26
- authorId: {
27
- type: ScalarTypeEnum.String_unsecure(),
28
- isOptional: false
29
- },
30
- rating: {
31
- type: ScalarTypeEnum.Int_unsecure(),
32
- isOptional: false
33
- },
34
- title: {
35
- type: ScalarTypeEnum.String_unsecure(),
36
- isOptional: true
37
- },
38
- content: {
39
- type: ScalarTypeEnum.String_unsecure(),
40
- isOptional: true
41
- },
42
- status: {
43
- type: ReviewStatusEnum,
44
- isOptional: false
45
- },
46
- isVerifiedPurchase: {
47
- type: ScalarTypeEnum.Boolean(),
48
- isOptional: false
49
- },
50
- helpfulCount: {
51
- type: ScalarTypeEnum.Int_unsecure(),
52
- isOptional: false
53
- },
54
- hasResponse: {
55
- type: ScalarTypeEnum.Boolean(),
56
- isOptional: false
57
- },
58
- createdAt: {
59
- type: ScalarTypeEnum.DateTime(),
60
- isOptional: false
61
- }
62
- }
63
- });
64
- /**
65
- * Input for creating a review.
66
- */
67
- const CreateReviewInputModel = defineSchemaModel({
68
- name: "CreateReviewInput",
69
- fields: {
70
- productId: {
71
- type: ScalarTypeEnum.String_unsecure(),
72
- isOptional: true
73
- },
74
- storeId: {
75
- type: ScalarTypeEnum.String_unsecure(),
76
- isOptional: true
77
- },
78
- orderId: {
79
- type: ScalarTypeEnum.String_unsecure(),
80
- isOptional: true
81
- },
82
- rating: {
83
- type: ScalarTypeEnum.Int_unsecure(),
84
- isOptional: false
85
- },
86
- title: {
87
- type: ScalarTypeEnum.String_unsecure(),
88
- isOptional: true
89
- },
90
- content: {
91
- type: ScalarTypeEnum.String_unsecure(),
92
- isOptional: true
93
- }
94
- }
95
- });
96
- /**
97
- * Input for listing reviews.
98
- */
99
- const ListReviewsInputModel = defineSchemaModel({
100
- name: "ListReviewsInput",
101
- fields: {
102
- productId: {
103
- type: ScalarTypeEnum.String_unsecure(),
104
- isOptional: true
105
- },
106
- storeId: {
107
- type: ScalarTypeEnum.String_unsecure(),
108
- isOptional: true
109
- },
110
- status: {
111
- type: ReviewStatusEnum,
112
- isOptional: true
113
- },
114
- minRating: {
115
- type: ScalarTypeEnum.Int_unsecure(),
116
- isOptional: true
117
- },
118
- limit: {
119
- type: ScalarTypeEnum.Int_unsecure(),
120
- isOptional: true,
121
- defaultValue: 20
122
- },
123
- offset: {
124
- type: ScalarTypeEnum.Int_unsecure(),
125
- isOptional: true,
126
- defaultValue: 0
127
- }
128
- }
129
- });
130
- /**
131
- * Output for listing reviews.
132
- */
133
- const ListReviewsOutputModel = defineSchemaModel({
134
- name: "ListReviewsOutput",
135
- fields: {
136
- reviews: {
137
- type: ReviewModel,
138
- isArray: true,
139
- isOptional: false
140
- },
141
- total: {
142
- type: ScalarTypeEnum.Int_unsecure(),
143
- isOptional: false
144
- },
145
- averageRating: {
146
- type: ScalarTypeEnum.Float_unsecure(),
147
- isOptional: false
148
- },
149
- ratingDistribution: {
150
- type: ScalarTypeEnum.JSON(),
151
- isOptional: false
152
- }
153
- }
154
- });
155
-
156
- //#endregion
157
- export { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel };
1
+ import{ReviewStatusEnum as e}from"./review.enum.js";import{ScalarTypeEnum as t,defineSchemaModel as n}from"@lssm/lib.schema";const r=n({name:`ReviewModel`,description:`A customer review`,fields:{id:{type:t.String_unsecure(),isOptional:!1},productId:{type:t.String_unsecure(),isOptional:!0},storeId:{type:t.String_unsecure(),isOptional:!0},authorId:{type:t.String_unsecure(),isOptional:!1},rating:{type:t.Int_unsecure(),isOptional:!1},title:{type:t.String_unsecure(),isOptional:!0},content:{type:t.String_unsecure(),isOptional:!0},status:{type:e,isOptional:!1},isVerifiedPurchase:{type:t.Boolean(),isOptional:!1},helpfulCount:{type:t.Int_unsecure(),isOptional:!1},hasResponse:{type:t.Boolean(),isOptional:!1},createdAt:{type:t.DateTime(),isOptional:!1}}}),i=n({name:`CreateReviewInput`,fields:{productId:{type:t.String_unsecure(),isOptional:!0},storeId:{type:t.String_unsecure(),isOptional:!0},orderId:{type:t.String_unsecure(),isOptional:!0},rating:{type:t.Int_unsecure(),isOptional:!1},title:{type:t.String_unsecure(),isOptional:!0},content:{type:t.String_unsecure(),isOptional:!0}}}),a=n({name:`ListReviewsInput`,fields:{productId:{type:t.String_unsecure(),isOptional:!0},storeId:{type:t.String_unsecure(),isOptional:!0},status:{type:e,isOptional:!0},minRating:{type:t.Int_unsecure(),isOptional:!0},limit:{type:t.Int_unsecure(),isOptional:!0,defaultValue:20},offset:{type:t.Int_unsecure(),isOptional:!0,defaultValue:0}}}),o=n({name:`ListReviewsOutput`,fields:{reviews:{type:r,isArray:!0,isOptional:!1},total:{type:t.Int_unsecure(),isOptional:!1},averageRating:{type:t.Float_unsecure(),isOptional:!1},ratingDistribution:{type:t.JSON(),isOptional:!1}}});export{i as CreateReviewInputModel,a as ListReviewsInputModel,o as ListReviewsOutputModel,r as ReviewModel};
@@ -1,6 +1 @@
1
- import { StoreStatusEnum } from "./store.enum.js";
2
- import { CreateStoreInputModel, StoreModel } from "./store.schema.js";
3
- import { CreateStoreContract } from "./store.contracts.js";
4
- import { StoreCreatedEvent, StoreStatusChangedEvent } from "./store.event.js";
5
-
6
- export { CreateStoreContract, CreateStoreInputModel, StoreCreatedEvent, StoreModel, StoreStatusChangedEvent, StoreStatusEnum };
1
+ import{StoreStatusEnum as e}from"./store.enum.js";import{CreateStoreInputModel as t,StoreModel as n}from"./store.schema.js";import{CreateStoreContract as r}from"./store.contracts.js";import{StoreCreatedEvent as i,StoreStatusChangedEvent as a}from"./store.event.js";export{r as CreateStoreContract,t as CreateStoreInputModel,i as StoreCreatedEvent,n as StoreModel,a as StoreStatusChangedEvent,e as StoreStatusEnum};
@@ -1,41 +1 @@
1
- import { CreateStoreInputModel, StoreModel } from "./store.schema.js";
2
- import { defineCommand } from "../libs/contracts/dist/spec.js";
3
-
4
- //#region src/store/store.contracts.ts
5
- const OWNERS = ["@example.marketplace"];
6
- /**
7
- * Create a new seller store.
8
- */
9
- const CreateStoreContract = defineCommand({
10
- meta: {
11
- name: "marketplace.store.create",
12
- version: 1,
13
- stability: "stable",
14
- owners: [...OWNERS],
15
- tags: [
16
- "marketplace",
17
- "store",
18
- "create"
19
- ],
20
- description: "Create a new seller store.",
21
- goal: "Allow users to become sellers on the marketplace.",
22
- context: "Seller onboarding."
23
- },
24
- io: {
25
- input: CreateStoreInputModel,
26
- output: StoreModel
27
- },
28
- policy: { auth: "user" },
29
- sideEffects: {
30
- emits: [{
31
- name: "marketplace.store.created",
32
- version: 1,
33
- when: "Store is created",
34
- payload: StoreModel
35
- }],
36
- audit: ["marketplace.store.created"]
37
- }
38
- });
39
-
40
- //#endregion
41
- export { CreateStoreContract };
1
+ import{CreateStoreInputModel as e,StoreModel as t}from"./store.schema.js";import{defineCommand as n}from"@lssm/lib.contracts/spec";const r=n({meta:{name:`marketplace.store.create`,version:1,stability:`stable`,owners:[...[`@example.marketplace`]],tags:[`marketplace`,`store`,`create`],description:`Create a new seller store.`,goal:`Allow users to become sellers on the marketplace.`,context:`Seller onboarding.`},io:{input:e,output:t},policy:{auth:`user`},sideEffects:{emits:[{name:`marketplace.store.created`,version:1,when:`Store is created`,payload:t}],audit:[`marketplace.store.created`]}});export{r as CreateStoreContract};
@@ -1,16 +1 @@
1
- import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
- import "../libs/schema/dist/index.js";
3
-
4
- //#region src/store/store.enum.ts
5
- /**
6
- * Store status enum.
7
- */
8
- const StoreStatusEnum = defineEnum("StoreStatus", [
9
- "PENDING",
10
- "ACTIVE",
11
- "SUSPENDED",
12
- "CLOSED"
13
- ]);
14
-
15
- //#endregion
16
- export { StoreStatusEnum };
1
+ import{defineEnum as e}from"@lssm/lib.schema";const t=e(`StoreStatus`,[`PENDING`,`ACTIVE`,`SUSPENDED`,`CLOSED`]);export{t as StoreStatusEnum};
@@ -1,72 +1 @@
1
- import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
2
- import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
3
- import "../libs/schema/dist/index.js";
4
- import { defineEvent } from "../libs/contracts/dist/events.js";
5
- import "../libs/contracts/dist/index.js";
6
-
7
- //#region src/store/store.event.ts
8
- const StoreCreatedPayload = defineSchemaModel({
9
- name: "StoreCreatedEventPayload",
10
- fields: {
11
- storeId: {
12
- type: ScalarTypeEnum.String_unsecure(),
13
- isOptional: false
14
- },
15
- name: {
16
- type: ScalarTypeEnum.String_unsecure(),
17
- isOptional: false
18
- },
19
- slug: {
20
- type: ScalarTypeEnum.String_unsecure(),
21
- isOptional: false
22
- },
23
- ownerId: {
24
- type: ScalarTypeEnum.String_unsecure(),
25
- isOptional: false
26
- },
27
- timestamp: {
28
- type: ScalarTypeEnum.DateTime(),
29
- isOptional: false
30
- }
31
- }
32
- });
33
- const StoreStatusChangedPayload = defineSchemaModel({
34
- name: "StoreStatusChangedEventPayload",
35
- fields: {
36
- storeId: {
37
- type: ScalarTypeEnum.String_unsecure(),
38
- isOptional: false
39
- },
40
- previousStatus: {
41
- type: ScalarTypeEnum.String_unsecure(),
42
- isOptional: false
43
- },
44
- newStatus: {
45
- type: ScalarTypeEnum.String_unsecure(),
46
- isOptional: false
47
- },
48
- reason: {
49
- type: ScalarTypeEnum.String_unsecure(),
50
- isOptional: true
51
- },
52
- timestamp: {
53
- type: ScalarTypeEnum.DateTime(),
54
- isOptional: false
55
- }
56
- }
57
- });
58
- const StoreCreatedEvent = defineEvent({
59
- name: "marketplace.store.created",
60
- version: 1,
61
- description: "A new seller store has been created.",
62
- payload: StoreCreatedPayload
63
- });
64
- const StoreStatusChangedEvent = defineEvent({
65
- name: "marketplace.store.statusChanged",
66
- version: 1,
67
- description: "A store status has changed.",
68
- payload: StoreStatusChangedPayload
69
- });
70
-
71
- //#endregion
72
- export { StoreCreatedEvent, StoreStatusChangedEvent };
1
+ import{ScalarTypeEnum as e,defineSchemaModel as t}from"@lssm/lib.schema";import{defineEvent as n}from"@lssm/lib.contracts";const r=t({name:`StoreCreatedEventPayload`,fields:{storeId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},slug:{type:e.String_unsecure(),isOptional:!1},ownerId:{type:e.String_unsecure(),isOptional:!1},timestamp:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`StoreStatusChangedEventPayload`,fields:{storeId:{type:e.String_unsecure(),isOptional:!1},previousStatus:{type:e.String_unsecure(),isOptional:!1},newStatus:{type:e.String_unsecure(),isOptional:!1},reason:{type:e.String_unsecure(),isOptional:!0},timestamp:{type:e.DateTime(),isOptional:!1}}}),a=n({name:`marketplace.store.created`,version:1,description:`A new seller store has been created.`,payload:r}),o=n({name:`marketplace.store.statusChanged`,version:1,description:`A store status has changed.`,payload:i});export{a as StoreCreatedEvent,o as StoreStatusChangedEvent};
@@ -1,50 +1 @@
1
- import { StoreModel } from "./store.schema.js";
2
-
3
- //#region src/store/store.presentation.ts
4
- const StoreProfilePresentation = {
5
- meta: {
6
- name: "marketplace.store.profile",
7
- version: 1,
8
- description: "Public store profile page",
9
- domain: "marketplace",
10
- owners: ["@marketplace-team"],
11
- tags: [
12
- "marketplace",
13
- "store",
14
- "profile"
15
- ]
16
- },
17
- source: {
18
- type: "component",
19
- framework: "react",
20
- componentKey: "StoreProfile",
21
- props: StoreModel
22
- },
23
- targets: ["react", "markdown"],
24
- policy: { flags: ["marketplace.stores.enabled"] }
25
- };
26
- const SellerDashboardPresentation = {
27
- meta: {
28
- name: "marketplace.seller.dashboard",
29
- version: 1,
30
- description: "Seller dashboard with sales and analytics",
31
- domain: "marketplace",
32
- owners: ["@marketplace-team"],
33
- tags: [
34
- "marketplace",
35
- "seller",
36
- "dashboard"
37
- ]
38
- },
39
- source: {
40
- type: "component",
41
- framework: "react",
42
- componentKey: "SellerDashboard",
43
- props: StoreModel
44
- },
45
- targets: ["react"],
46
- policy: { flags: ["marketplace.seller.enabled"] }
47
- };
48
-
49
- //#endregion
50
- export { SellerDashboardPresentation, StoreProfilePresentation };
1
+ import{StoreModel as e}from"./store.schema.js";const t={meta:{name:`marketplace.store.profile`,version:1,description:`Public store profile page`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`store`,`profile`]},source:{type:`component`,framework:`react`,componentKey:`StoreProfile`,props:e},targets:[`react`,`markdown`],policy:{flags:[`marketplace.stores.enabled`]}},n={meta:{name:`marketplace.seller.dashboard`,version:1,description:`Seller dashboard with sales and analytics`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`seller`,`dashboard`]},source:{type:`component`,framework:`react`,componentKey:`SellerDashboard`,props:e},targets:[`react`],policy:{flags:[`marketplace.seller.enabled`]}};export{n as SellerDashboardPresentation,t as StoreProfilePresentation};
@@ -1,94 +1 @@
1
- import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
2
- import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
3
- import "../libs/schema/dist/index.js";
4
- import { StoreStatusEnum } from "./store.enum.js";
5
-
6
- //#region src/store/store.schema.ts
7
- /**
8
- * A seller store.
9
- */
10
- const StoreModel = defineSchemaModel({
11
- name: "StoreModel",
12
- description: "A seller store",
13
- fields: {
14
- id: {
15
- type: ScalarTypeEnum.String_unsecure(),
16
- isOptional: false
17
- },
18
- name: {
19
- type: ScalarTypeEnum.String_unsecure(),
20
- isOptional: false
21
- },
22
- slug: {
23
- type: ScalarTypeEnum.String_unsecure(),
24
- isOptional: false
25
- },
26
- description: {
27
- type: ScalarTypeEnum.String_unsecure(),
28
- isOptional: true
29
- },
30
- status: {
31
- type: StoreStatusEnum,
32
- isOptional: false
33
- },
34
- ownerId: {
35
- type: ScalarTypeEnum.String_unsecure(),
36
- isOptional: false
37
- },
38
- logoFileId: {
39
- type: ScalarTypeEnum.String_unsecure(),
40
- isOptional: true
41
- },
42
- isVerified: {
43
- type: ScalarTypeEnum.Boolean(),
44
- isOptional: false
45
- },
46
- totalProducts: {
47
- type: ScalarTypeEnum.Int_unsecure(),
48
- isOptional: false
49
- },
50
- averageRating: {
51
- type: ScalarTypeEnum.Float_unsecure(),
52
- isOptional: false
53
- },
54
- createdAt: {
55
- type: ScalarTypeEnum.DateTime(),
56
- isOptional: false
57
- }
58
- }
59
- });
60
- /**
61
- * Input for creating a store.
62
- */
63
- const CreateStoreInputModel = defineSchemaModel({
64
- name: "CreateStoreInput",
65
- fields: {
66
- name: {
67
- type: ScalarTypeEnum.NonEmptyString(),
68
- isOptional: false
69
- },
70
- slug: {
71
- type: ScalarTypeEnum.NonEmptyString(),
72
- isOptional: false
73
- },
74
- description: {
75
- type: ScalarTypeEnum.String_unsecure(),
76
- isOptional: true
77
- },
78
- email: {
79
- type: ScalarTypeEnum.EmailAddress(),
80
- isOptional: true
81
- },
82
- country: {
83
- type: ScalarTypeEnum.String_unsecure(),
84
- isOptional: true
85
- },
86
- currency: {
87
- type: ScalarTypeEnum.String_unsecure(),
88
- isOptional: true
89
- }
90
- }
91
- });
92
-
93
- //#endregion
94
- export { CreateStoreInputModel, StoreModel };
1
+ import{StoreStatusEnum as e}from"./store.enum.js";import{ScalarTypeEnum as t,defineSchemaModel as n}from"@lssm/lib.schema";const r=n({name:`StoreModel`,description:`A seller store`,fields:{id:{type:t.String_unsecure(),isOptional:!1},name:{type:t.String_unsecure(),isOptional:!1},slug:{type:t.String_unsecure(),isOptional:!1},description:{type:t.String_unsecure(),isOptional:!0},status:{type:e,isOptional:!1},ownerId:{type:t.String_unsecure(),isOptional:!1},logoFileId:{type:t.String_unsecure(),isOptional:!0},isVerified:{type:t.Boolean(),isOptional:!1},totalProducts:{type:t.Int_unsecure(),isOptional:!1},averageRating:{type:t.Float_unsecure(),isOptional:!1},createdAt:{type:t.DateTime(),isOptional:!1}}}),i=n({name:`CreateStoreInput`,fields:{name:{type:t.NonEmptyString(),isOptional:!1},slug:{type:t.NonEmptyString(),isOptional:!1},description:{type:t.String_unsecure(),isOptional:!0},email:{type:t.EmailAddress(),isOptional:!0},country:{type:t.String_unsecure(),isOptional:!0},currency:{type:t.String_unsecure(),isOptional:!0}}});export{i as CreateStoreInputModel,r as StoreModel};