@lssm/example.marketplace 0.0.0-canary-20251217060834 → 0.0.0-canary-20251217072406

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 (189) hide show
  1. package/dist/docs/index.js +1 -1
  2. package/dist/docs/marketplace.docblock.js +61 -5
  3. package/dist/entities/index.d.ts +296 -296
  4. package/dist/entities/index.js +45 -1
  5. package/dist/entities/order.d.ts +78 -78
  6. package/dist/entities/order.js +173 -1
  7. package/dist/entities/payout.d.ts +65 -65
  8. package/dist/entities/payout.js +162 -1
  9. package/dist/entities/product.d.ts +70 -70
  10. package/dist/entities/product.js +161 -1
  11. package/dist/entities/review.d.ts +56 -56
  12. package/dist/entities/review.js +152 -1
  13. package/dist/entities/store.d.ts +41 -41
  14. package/dist/entities/store.js +110 -1
  15. package/dist/example.js +50 -1
  16. package/dist/index.d.ts +0 -5
  17. package/dist/index.js +27 -1
  18. package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -0
  19. package/dist/libs/contracts/dist/client/index.js +5 -0
  20. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -0
  21. package/dist/libs/contracts/dist/client/react/form-render.js +4 -0
  22. package/dist/libs/contracts/dist/client/react/index.js +4 -0
  23. package/dist/libs/contracts/dist/contract-registry/index.js +1 -0
  24. package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -0
  25. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -0
  26. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
  27. package/dist/libs/contracts/dist/docs/index.js +29 -0
  28. package/dist/libs/contracts/dist/docs/presentations.js +71 -0
  29. package/dist/libs/contracts/dist/docs/registry.js +44 -0
  30. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -0
  31. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -0
  32. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -0
  33. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -0
  34. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -0
  35. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
  36. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
  37. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
  38. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
  39. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
  40. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
  41. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
  43. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
  44. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
  45. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
  46. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
  47. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
  48. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
  49. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
  50. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
  51. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
  52. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
  53. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
  54. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
  55. package/dist/libs/contracts/dist/events.js +10 -0
  56. package/dist/libs/contracts/dist/experiments/evaluator.js +1 -0
  57. package/dist/libs/contracts/dist/index.js +71 -0
  58. package/dist/libs/contracts/dist/install.js +2 -0
  59. package/dist/libs/contracts/dist/integrations/contracts.js +377 -0
  60. package/dist/libs/contracts/dist/integrations/index.js +18 -0
  61. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -0
  62. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -0
  63. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -0
  64. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -0
  65. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -0
  66. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -0
  67. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -0
  68. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -0
  69. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -0
  70. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -0
  71. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -0
  72. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -0
  73. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -0
  74. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -0
  75. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -0
  76. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -0
  77. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -0
  78. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -0
  79. package/dist/libs/contracts/dist/jsonschema.js +1 -0
  80. package/dist/libs/contracts/dist/knowledge/contracts.js +306 -0
  81. package/dist/libs/contracts/dist/knowledge/index.js +7 -0
  82. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -0
  83. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -0
  84. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -0
  85. package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -0
  86. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -0
  87. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -0
  88. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -0
  89. package/dist/libs/contracts/dist/llm/exporters.js +19 -0
  90. package/dist/libs/contracts/dist/llm/index.js +2 -0
  91. package/dist/libs/contracts/dist/llm/prompts.js +1 -0
  92. package/dist/libs/contracts/dist/onboarding-base.js +196 -0
  93. package/dist/libs/contracts/dist/openapi.js +1 -0
  94. package/dist/libs/contracts/dist/ownership.js +21 -0
  95. package/dist/libs/contracts/dist/presentations.js +1 -0
  96. package/dist/libs/contracts/dist/presentations.v2.js +11 -0
  97. package/dist/libs/contracts/dist/prompt.js +1 -0
  98. package/dist/libs/contracts/dist/promptRegistry.js +1 -0
  99. package/dist/libs/contracts/dist/regenerator/index.js +1 -0
  100. package/dist/libs/contracts/dist/regenerator/service.js +6 -0
  101. package/dist/libs/contracts/dist/registry.js +2 -0
  102. package/dist/libs/contracts/dist/resources.js +1 -0
  103. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -0
  104. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -0
  105. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -0
  106. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -0
  107. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -0
  108. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -0
  109. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -0
  110. package/dist/libs/contracts/dist/schema/dist/index.js +6 -0
  111. package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -0
  112. package/dist/libs/contracts/dist/server/index.js +8 -0
  113. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -0
  114. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -0
  115. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -0
  116. package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -0
  117. package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -0
  118. package/dist/libs/contracts/dist/server/provider-mcp.js +1 -0
  119. package/dist/libs/contracts/dist/server/rest-elysia.js +1 -0
  120. package/dist/libs/contracts/dist/server/rest-express.js +1 -0
  121. package/dist/libs/contracts/dist/server/rest-generic.js +1 -0
  122. package/dist/libs/contracts/dist/server/rest-next-app.js +1 -0
  123. package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -0
  124. package/dist/libs/contracts/dist/spec.js +34 -0
  125. package/dist/libs/contracts/dist/telemetry/index.js +1 -0
  126. package/dist/libs/contracts/dist/telemetry/tracker.js +1 -0
  127. package/dist/libs/contracts/dist/tests/index.js +1 -0
  128. package/dist/libs/contracts/dist/tests/runner.js +2 -0
  129. package/dist/libs/contracts/dist/workflow/index.js +1 -0
  130. package/dist/libs/contracts/dist/workflow/runner.js +1 -0
  131. package/dist/libs/schema/dist/EnumType.js +56 -0
  132. package/dist/libs/schema/dist/FieldType.js +49 -0
  133. package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -0
  134. package/dist/libs/schema/dist/SchemaModel.js +39 -0
  135. package/dist/libs/schema/dist/entity/defineEntity.js +236 -0
  136. package/dist/libs/schema/dist/entity/index.js +2 -0
  137. package/dist/libs/schema/dist/entity/types.js +1 -0
  138. package/dist/libs/schema/dist/index.js +6 -0
  139. package/dist/marketplace.feature.js +308 -1
  140. package/dist/order/index.js +6 -1
  141. package/dist/order/order.contracts.d.ts +90 -90
  142. package/dist/order/order.contracts.js +74 -1
  143. package/dist/order/order.enum.d.ts +2 -2
  144. package/dist/order/order.enum.js +22 -1
  145. package/dist/order/order.event.d.ts +39 -39
  146. package/dist/order/order.event.js +193 -1
  147. package/dist/order/order.presentation.js +72 -1
  148. package/dist/order/order.schema.d.ts +39 -39
  149. package/dist/order/order.schema.js +156 -1
  150. package/dist/payout/index.js +6 -1
  151. package/dist/payout/payout.contracts.d.ts +24 -24
  152. package/dist/payout/payout.contracts.js +32 -1
  153. package/dist/payout/payout.enum.d.ts +2 -2
  154. package/dist/payout/payout.enum.js +17 -1
  155. package/dist/payout/payout.event.d.ts +17 -17
  156. package/dist/payout/payout.event.js +84 -1
  157. package/dist/payout/payout.presentation.js +50 -1
  158. package/dist/payout/payout.schema.d.ts +37 -37
  159. package/dist/payout/payout.schema.js +117 -1
  160. package/dist/product/index.js +6 -1
  161. package/dist/product/product.contracts.d.ts +68 -68
  162. package/dist/product/product.contracts.js +65 -1
  163. package/dist/product/product.enum.d.ts +2 -2
  164. package/dist/product/product.enum.js +18 -1
  165. package/dist/product/product.event.d.ts +20 -20
  166. package/dist/product/product.event.js +103 -1
  167. package/dist/product/product.presentation.js +72 -1
  168. package/dist/product/product.schema.d.ts +52 -52
  169. package/dist/product/product.schema.js +177 -1
  170. package/dist/review/index.js +6 -1
  171. package/dist/review/review.contracts.d.ts +59 -59
  172. package/dist/review/review.contracts.js +65 -1
  173. package/dist/review/review.enum.d.ts +2 -2
  174. package/dist/review/review.enum.js +16 -1
  175. package/dist/review/review.event.d.ts +15 -15
  176. package/dist/review/review.event.js +76 -1
  177. package/dist/review/review.presentation.js +50 -1
  178. package/dist/review/review.schema.d.ts +45 -45
  179. package/dist/review/review.schema.js +157 -1
  180. package/dist/store/index.js +6 -1
  181. package/dist/store/store.contracts.d.ts +33 -33
  182. package/dist/store/store.contracts.js +41 -1
  183. package/dist/store/store.enum.d.ts +2 -2
  184. package/dist/store/store.enum.js +16 -1
  185. package/dist/store/store.event.d.ts +14 -14
  186. package/dist/store/store.event.js +72 -1
  187. package/dist/store/store.presentation.js +50 -1
  188. package/dist/store/store.schema.js +94 -1
  189. package/package.json +12 -12
@@ -1 +1,65 @@
1
- import{CreateProductInputModel as e,ListProductsInputModel as t,ListProductsOutputModel as n,ProductModel as r}from"./product.schema.js";import{defineCommand as i,defineQuery as a}from"@lssm/lib.contracts/spec";const o=[`@example.marketplace`],s=i({meta:{name:`marketplace.product.create`,version:1,stability:`stable`,owners:[...o],tags:[`marketplace`,`product`,`create`],description:`Create a new product listing.`,goal:`Allow sellers to list products.`,context:`Product management.`},io:{input:e,output:r},policy:{auth:`user`},sideEffects:{emits:[{name:`marketplace.product.created`,version:1,when:`Product is created`,payload:r}],audit:[`marketplace.product.created`]}}),c=a({meta:{name:`marketplace.product.list`,version:1,stability:`stable`,owners:[...o],tags:[`marketplace`,`product`,`list`],description:`List products with filters.`,goal:`Browse products on the marketplace.`,context:`Product catalog, search.`},io:{input:t,output:n},policy:{auth:`anonymous`}});export{s as CreateProductContract,c as ListProductsContract};
1
+ import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
2
+ import { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel } from "./product.schema.js";
3
+
4
+ //#region src/product/product.contracts.ts
5
+ const OWNERS = ["@example.marketplace"];
6
+ /**
7
+ * Create a new product listing.
8
+ */
9
+ const CreateProductContract = defineCommand({
10
+ meta: {
11
+ name: "marketplace.product.create",
12
+ version: 1,
13
+ stability: "stable",
14
+ owners: [...OWNERS],
15
+ tags: [
16
+ "marketplace",
17
+ "product",
18
+ "create"
19
+ ],
20
+ description: "Create a new product listing.",
21
+ goal: "Allow sellers to list products.",
22
+ context: "Product management."
23
+ },
24
+ io: {
25
+ input: CreateProductInputModel,
26
+ output: ProductModel
27
+ },
28
+ policy: { auth: "user" },
29
+ sideEffects: {
30
+ emits: [{
31
+ name: "marketplace.product.created",
32
+ version: 1,
33
+ when: "Product is created",
34
+ payload: ProductModel
35
+ }],
36
+ audit: ["marketplace.product.created"]
37
+ }
38
+ });
39
+ /**
40
+ * List products with filters.
41
+ */
42
+ const ListProductsContract = defineQuery({
43
+ meta: {
44
+ name: "marketplace.product.list",
45
+ version: 1,
46
+ stability: "stable",
47
+ owners: [...OWNERS],
48
+ tags: [
49
+ "marketplace",
50
+ "product",
51
+ "list"
52
+ ],
53
+ description: "List products with filters.",
54
+ goal: "Browse products on the marketplace.",
55
+ context: "Product catalog, search."
56
+ },
57
+ io: {
58
+ input: ListProductsInputModel,
59
+ output: ListProductsOutputModel
60
+ },
61
+ policy: { auth: "anonymous" }
62
+ });
63
+
64
+ //#endregion
65
+ export { CreateProductContract, ListProductsContract };
@@ -1,9 +1,9 @@
1
- import * as _lssm_lib_schema454 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema1150 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/product/product.enum.d.ts
4
4
  /**
5
5
  * Product status enum.
6
6
  */
7
- declare const ProductStatusEnum: _lssm_lib_schema454.EnumType<[string, string, string, string, string, string]>;
7
+ declare const ProductStatusEnum: _lssm_lib_schema1150.EnumType<[string, string, string, string, string, string]>;
8
8
  //#endregion
9
9
  export { ProductStatusEnum };
@@ -1 +1,18 @@
1
- import{defineEnum as e}from"@lssm/lib.schema";const t=e(`ProductStatus`,[`DRAFT`,`PENDING_REVIEW`,`ACTIVE`,`OUT_OF_STOCK`,`DISCONTINUED`,`REJECTED`]);export{t as ProductStatusEnum};
1
+ import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
+ import "../libs/schema/dist/index.js";
3
+
4
+ //#region src/product/product.enum.ts
5
+ /**
6
+ * Product status enum.
7
+ */
8
+ const ProductStatusEnum = defineEnum("ProductStatus", [
9
+ "DRAFT",
10
+ "PENDING_REVIEW",
11
+ "ACTIVE",
12
+ "OUT_OF_STOCK",
13
+ "DISCONTINUED",
14
+ "REJECTED"
15
+ ]);
16
+
17
+ //#endregion
18
+ export { ProductStatusEnum };
@@ -1,70 +1,70 @@
1
- import * as _lssm_lib_schema532 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts6 from "@lssm/lib.contracts";
1
+ import * as _lssm_lib_schema1030 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts16 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/product/product.event.d.ts
5
- declare const ProductCreatedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema532.SchemaModel<{
5
+ declare const ProductCreatedEvent: _lssm_lib_contracts16.EventSpec<_lssm_lib_schema1030.SchemaModel<{
6
6
  productId: {
7
- type: _lssm_lib_schema532.FieldType<string, string>;
7
+ type: _lssm_lib_schema1030.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  storeId: {
11
- type: _lssm_lib_schema532.FieldType<string, string>;
11
+ type: _lssm_lib_schema1030.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  name: {
15
- type: _lssm_lib_schema532.FieldType<string, string>;
15
+ type: _lssm_lib_schema1030.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  price: {
19
- type: _lssm_lib_schema532.FieldType<number, number>;
19
+ type: _lssm_lib_schema1030.FieldType<number, number>;
20
20
  isOptional: false;
21
21
  };
22
22
  currency: {
23
- type: _lssm_lib_schema532.FieldType<string, string>;
23
+ type: _lssm_lib_schema1030.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  timestamp: {
27
- type: _lssm_lib_schema532.FieldType<Date, string>;
27
+ type: _lssm_lib_schema1030.FieldType<Date, string>;
28
28
  isOptional: false;
29
29
  };
30
30
  }>>;
31
- declare const ProductPublishedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema532.SchemaModel<{
31
+ declare const ProductPublishedEvent: _lssm_lib_contracts16.EventSpec<_lssm_lib_schema1030.SchemaModel<{
32
32
  productId: {
33
- type: _lssm_lib_schema532.FieldType<string, string>;
33
+ type: _lssm_lib_schema1030.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  storeId: {
37
- type: _lssm_lib_schema532.FieldType<string, string>;
37
+ type: _lssm_lib_schema1030.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  timestamp: {
41
- type: _lssm_lib_schema532.FieldType<Date, string>;
41
+ type: _lssm_lib_schema1030.FieldType<Date, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  }>>;
45
- declare const InventoryUpdatedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema532.SchemaModel<{
45
+ declare const InventoryUpdatedEvent: _lssm_lib_contracts16.EventSpec<_lssm_lib_schema1030.SchemaModel<{
46
46
  productId: {
47
- type: _lssm_lib_schema532.FieldType<string, string>;
47
+ type: _lssm_lib_schema1030.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  variantId: {
51
- type: _lssm_lib_schema532.FieldType<string, string>;
51
+ type: _lssm_lib_schema1030.FieldType<string, string>;
52
52
  isOptional: true;
53
53
  };
54
54
  previousQuantity: {
55
- type: _lssm_lib_schema532.FieldType<number, number>;
55
+ type: _lssm_lib_schema1030.FieldType<number, number>;
56
56
  isOptional: false;
57
57
  };
58
58
  newQuantity: {
59
- type: _lssm_lib_schema532.FieldType<number, number>;
59
+ type: _lssm_lib_schema1030.FieldType<number, number>;
60
60
  isOptional: false;
61
61
  };
62
62
  reason: {
63
- type: _lssm_lib_schema532.FieldType<string, string>;
63
+ type: _lssm_lib_schema1030.FieldType<string, string>;
64
64
  isOptional: false;
65
65
  };
66
66
  timestamp: {
67
- type: _lssm_lib_schema532.FieldType<Date, string>;
67
+ type: _lssm_lib_schema1030.FieldType<Date, string>;
68
68
  isOptional: false;
69
69
  };
70
70
  }>>;
@@ -1 +1,103 @@
1
- import{ScalarTypeEnum as e,defineSchemaModel as t}from"@lssm/lib.schema";import{defineEvent as n}from"@lssm/lib.contracts";const r=t({name:`ProductCreatedEventPayload`,fields:{productId:{type:e.String_unsecure(),isOptional:!1},storeId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},price:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1},timestamp:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`ProductPublishedEventPayload`,fields:{productId:{type:e.String_unsecure(),isOptional:!1},storeId:{type:e.String_unsecure(),isOptional:!1},timestamp:{type:e.DateTime(),isOptional:!1}}}),a=t({name:`InventoryUpdatedEventPayload`,fields:{productId:{type:e.String_unsecure(),isOptional:!1},variantId:{type:e.String_unsecure(),isOptional:!0},previousQuantity:{type:e.Int_unsecure(),isOptional:!1},newQuantity:{type:e.Int_unsecure(),isOptional:!1},reason:{type:e.String_unsecure(),isOptional:!1},timestamp:{type:e.DateTime(),isOptional:!1}}}),o=n({name:`marketplace.product.created`,version:1,description:`A new product has been created.`,payload:r}),s=n({name:`marketplace.product.published`,version:1,description:`A product has been published.`,payload:i}),c=n({name:`marketplace.inventory.updated`,version:1,description:`Product inventory has been updated.`,payload:a});export{c as InventoryUpdatedEvent,o as ProductCreatedEvent,s as ProductPublishedEvent};
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/product/product.event.ts
8
+ const ProductCreatedPayload = defineSchemaModel({
9
+ name: "ProductCreatedEventPayload",
10
+ fields: {
11
+ productId: {
12
+ type: ScalarTypeEnum.String_unsecure(),
13
+ isOptional: false
14
+ },
15
+ storeId: {
16
+ type: ScalarTypeEnum.String_unsecure(),
17
+ isOptional: false
18
+ },
19
+ name: {
20
+ type: ScalarTypeEnum.String_unsecure(),
21
+ isOptional: false
22
+ },
23
+ price: {
24
+ type: ScalarTypeEnum.Float_unsecure(),
25
+ isOptional: false
26
+ },
27
+ currency: {
28
+ type: ScalarTypeEnum.String_unsecure(),
29
+ isOptional: false
30
+ },
31
+ timestamp: {
32
+ type: ScalarTypeEnum.DateTime(),
33
+ isOptional: false
34
+ }
35
+ }
36
+ });
37
+ const ProductPublishedPayload = defineSchemaModel({
38
+ name: "ProductPublishedEventPayload",
39
+ fields: {
40
+ productId: {
41
+ type: ScalarTypeEnum.String_unsecure(),
42
+ isOptional: false
43
+ },
44
+ storeId: {
45
+ type: ScalarTypeEnum.String_unsecure(),
46
+ isOptional: false
47
+ },
48
+ timestamp: {
49
+ type: ScalarTypeEnum.DateTime(),
50
+ isOptional: false
51
+ }
52
+ }
53
+ });
54
+ const InventoryUpdatedPayload = defineSchemaModel({
55
+ name: "InventoryUpdatedEventPayload",
56
+ fields: {
57
+ productId: {
58
+ type: ScalarTypeEnum.String_unsecure(),
59
+ isOptional: false
60
+ },
61
+ variantId: {
62
+ type: ScalarTypeEnum.String_unsecure(),
63
+ isOptional: true
64
+ },
65
+ previousQuantity: {
66
+ type: ScalarTypeEnum.Int_unsecure(),
67
+ isOptional: false
68
+ },
69
+ newQuantity: {
70
+ type: ScalarTypeEnum.Int_unsecure(),
71
+ isOptional: false
72
+ },
73
+ reason: {
74
+ type: ScalarTypeEnum.String_unsecure(),
75
+ isOptional: false
76
+ },
77
+ timestamp: {
78
+ type: ScalarTypeEnum.DateTime(),
79
+ isOptional: false
80
+ }
81
+ }
82
+ });
83
+ const ProductCreatedEvent = defineEvent({
84
+ name: "marketplace.product.created",
85
+ version: 1,
86
+ description: "A new product has been created.",
87
+ payload: ProductCreatedPayload
88
+ });
89
+ const ProductPublishedEvent = defineEvent({
90
+ name: "marketplace.product.published",
91
+ version: 1,
92
+ description: "A product has been published.",
93
+ payload: ProductPublishedPayload
94
+ });
95
+ const InventoryUpdatedEvent = defineEvent({
96
+ name: "marketplace.inventory.updated",
97
+ version: 1,
98
+ description: "Product inventory has been updated.",
99
+ payload: InventoryUpdatedPayload
100
+ });
101
+
102
+ //#endregion
103
+ export { InventoryUpdatedEvent, ProductCreatedEvent, ProductPublishedEvent };
@@ -1 +1,72 @@
1
- import{ProductModel as e}from"./product.schema.js";const t={meta:{name:`marketplace.product.catalog`,version:1,description:`Product catalog with search and filters`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`product`,`catalog`]},source:{type:`component`,framework:`react`,componentKey:`ProductCatalog`,props:e},targets:[`react`,`markdown`],policy:{flags:[`marketplace.products.enabled`]}},n={meta:{name:`marketplace.product.detail`,version:1,description:`Product detail page with images and reviews`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`product`,`detail`]},source:{type:`component`,framework:`react`,componentKey:`ProductDetail`,props:e},targets:[`react`,`markdown`],policy:{flags:[`marketplace.products.enabled`]}},r={meta:{name:`marketplace.product.editor`,version:1,description:`Product editor for sellers`,domain:`marketplace`,owners:[`@marketplace-team`],tags:[`marketplace`,`product`,`editor`]},source:{type:`component`,framework:`react`,componentKey:`ProductEditor`,props:e},targets:[`react`],policy:{flags:[`marketplace.seller.enabled`]}};export{t as ProductCatalogPresentation,n as ProductDetailPresentation,r as ProductEditorPresentation};
1
+ import { ProductModel } from "./product.schema.js";
2
+
3
+ //#region src/product/product.presentation.ts
4
+ const ProductCatalogPresentation = {
5
+ meta: {
6
+ name: "marketplace.product.catalog",
7
+ version: 1,
8
+ description: "Product catalog with search and filters",
9
+ domain: "marketplace",
10
+ owners: ["@marketplace-team"],
11
+ tags: [
12
+ "marketplace",
13
+ "product",
14
+ "catalog"
15
+ ]
16
+ },
17
+ source: {
18
+ type: "component",
19
+ framework: "react",
20
+ componentKey: "ProductCatalog",
21
+ props: ProductModel
22
+ },
23
+ targets: ["react", "markdown"],
24
+ policy: { flags: ["marketplace.products.enabled"] }
25
+ };
26
+ const ProductDetailPresentation = {
27
+ meta: {
28
+ name: "marketplace.product.detail",
29
+ version: 1,
30
+ description: "Product detail page with images and reviews",
31
+ domain: "marketplace",
32
+ owners: ["@marketplace-team"],
33
+ tags: [
34
+ "marketplace",
35
+ "product",
36
+ "detail"
37
+ ]
38
+ },
39
+ source: {
40
+ type: "component",
41
+ framework: "react",
42
+ componentKey: "ProductDetail",
43
+ props: ProductModel
44
+ },
45
+ targets: ["react", "markdown"],
46
+ policy: { flags: ["marketplace.products.enabled"] }
47
+ };
48
+ const ProductEditorPresentation = {
49
+ meta: {
50
+ name: "marketplace.product.editor",
51
+ version: 1,
52
+ description: "Product editor for sellers",
53
+ domain: "marketplace",
54
+ owners: ["@marketplace-team"],
55
+ tags: [
56
+ "marketplace",
57
+ "product",
58
+ "editor"
59
+ ]
60
+ },
61
+ source: {
62
+ type: "component",
63
+ framework: "react",
64
+ componentKey: "ProductEditor",
65
+ props: ProductModel
66
+ },
67
+ targets: ["react"],
68
+ policy: { flags: ["marketplace.seller.enabled"] }
69
+ };
70
+
71
+ //#endregion
72
+ export { ProductCatalogPresentation, ProductDetailPresentation, ProductEditorPresentation };
@@ -1,143 +1,143 @@
1
- import * as _lssm_lib_schema683 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema868 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/product/product.schema.d.ts
4
4
  /**
5
5
  * A product listing.
6
6
  */
7
- declare const ProductModel: _lssm_lib_schema683.SchemaModel<{
7
+ declare const ProductModel: _lssm_lib_schema868.SchemaModel<{
8
8
  id: {
9
- type: _lssm_lib_schema683.FieldType<string, string>;
9
+ type: _lssm_lib_schema868.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  storeId: {
13
- type: _lssm_lib_schema683.FieldType<string, string>;
13
+ type: _lssm_lib_schema868.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  name: {
17
- type: _lssm_lib_schema683.FieldType<string, string>;
17
+ type: _lssm_lib_schema868.FieldType<string, string>;
18
18
  isOptional: false;
19
19
  };
20
20
  slug: {
21
- type: _lssm_lib_schema683.FieldType<string, string>;
21
+ type: _lssm_lib_schema868.FieldType<string, string>;
22
22
  isOptional: false;
23
23
  };
24
24
  description: {
25
- type: _lssm_lib_schema683.FieldType<string, string>;
25
+ type: _lssm_lib_schema868.FieldType<string, string>;
26
26
  isOptional: true;
27
27
  };
28
28
  status: {
29
- type: _lssm_lib_schema683.EnumType<[string, string, string, string, string, string]>;
29
+ type: _lssm_lib_schema868.EnumType<[string, string, string, string, string, string]>;
30
30
  isOptional: false;
31
31
  };
32
32
  price: {
33
- type: _lssm_lib_schema683.FieldType<number, number>;
33
+ type: _lssm_lib_schema868.FieldType<number, number>;
34
34
  isOptional: false;
35
35
  };
36
36
  currency: {
37
- type: _lssm_lib_schema683.FieldType<string, string>;
37
+ type: _lssm_lib_schema868.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  quantity: {
41
- type: _lssm_lib_schema683.FieldType<number, number>;
41
+ type: _lssm_lib_schema868.FieldType<number, number>;
42
42
  isOptional: false;
43
43
  };
44
44
  categoryId: {
45
- type: _lssm_lib_schema683.FieldType<string, string>;
45
+ type: _lssm_lib_schema868.FieldType<string, string>;
46
46
  isOptional: true;
47
47
  };
48
48
  primaryImageId: {
49
- type: _lssm_lib_schema683.FieldType<string, string>;
49
+ type: _lssm_lib_schema868.FieldType<string, string>;
50
50
  isOptional: true;
51
51
  };
52
52
  averageRating: {
53
- type: _lssm_lib_schema683.FieldType<number, number>;
53
+ type: _lssm_lib_schema868.FieldType<number, number>;
54
54
  isOptional: false;
55
55
  };
56
56
  totalSold: {
57
- type: _lssm_lib_schema683.FieldType<number, number>;
57
+ type: _lssm_lib_schema868.FieldType<number, number>;
58
58
  isOptional: false;
59
59
  };
60
60
  createdAt: {
61
- type: _lssm_lib_schema683.FieldType<Date, string>;
61
+ type: _lssm_lib_schema868.FieldType<Date, string>;
62
62
  isOptional: false;
63
63
  };
64
64
  }>;
65
65
  /**
66
66
  * Input for creating a product.
67
67
  */
68
- declare const CreateProductInputModel: _lssm_lib_schema683.SchemaModel<{
68
+ declare const CreateProductInputModel: _lssm_lib_schema868.SchemaModel<{
69
69
  storeId: {
70
- type: _lssm_lib_schema683.FieldType<string, string>;
70
+ type: _lssm_lib_schema868.FieldType<string, string>;
71
71
  isOptional: false;
72
72
  };
73
73
  name: {
74
- type: _lssm_lib_schema683.FieldType<string, string>;
74
+ type: _lssm_lib_schema868.FieldType<string, string>;
75
75
  isOptional: false;
76
76
  };
77
77
  slug: {
78
- type: _lssm_lib_schema683.FieldType<string, string>;
78
+ type: _lssm_lib_schema868.FieldType<string, string>;
79
79
  isOptional: false;
80
80
  };
81
81
  description: {
82
- type: _lssm_lib_schema683.FieldType<string, string>;
82
+ type: _lssm_lib_schema868.FieldType<string, string>;
83
83
  isOptional: true;
84
84
  };
85
85
  price: {
86
- type: _lssm_lib_schema683.FieldType<number, number>;
86
+ type: _lssm_lib_schema868.FieldType<number, number>;
87
87
  isOptional: false;
88
88
  };
89
89
  currency: {
90
- type: _lssm_lib_schema683.FieldType<string, string>;
90
+ type: _lssm_lib_schema868.FieldType<string, string>;
91
91
  isOptional: true;
92
92
  };
93
93
  quantity: {
94
- type: _lssm_lib_schema683.FieldType<number, number>;
94
+ type: _lssm_lib_schema868.FieldType<number, number>;
95
95
  isOptional: true;
96
96
  };
97
97
  categoryId: {
98
- type: _lssm_lib_schema683.FieldType<string, string>;
98
+ type: _lssm_lib_schema868.FieldType<string, string>;
99
99
  isOptional: true;
100
100
  };
101
101
  sku: {
102
- type: _lssm_lib_schema683.FieldType<string, string>;
102
+ type: _lssm_lib_schema868.FieldType<string, string>;
103
103
  isOptional: true;
104
104
  };
105
105
  }>;
106
106
  /**
107
107
  * Input for listing products.
108
108
  */
109
- declare const ListProductsInputModel: _lssm_lib_schema683.SchemaModel<{
109
+ declare const ListProductsInputModel: _lssm_lib_schema868.SchemaModel<{
110
110
  storeId: {
111
- type: _lssm_lib_schema683.FieldType<string, string>;
111
+ type: _lssm_lib_schema868.FieldType<string, string>;
112
112
  isOptional: true;
113
113
  };
114
114
  categoryId: {
115
- type: _lssm_lib_schema683.FieldType<string, string>;
115
+ type: _lssm_lib_schema868.FieldType<string, string>;
116
116
  isOptional: true;
117
117
  };
118
118
  status: {
119
- type: _lssm_lib_schema683.EnumType<[string, string, string, string, string, string]>;
119
+ type: _lssm_lib_schema868.EnumType<[string, string, string, string, string, string]>;
120
120
  isOptional: true;
121
121
  };
122
122
  search: {
123
- type: _lssm_lib_schema683.FieldType<string, string>;
123
+ type: _lssm_lib_schema868.FieldType<string, string>;
124
124
  isOptional: true;
125
125
  };
126
126
  minPrice: {
127
- type: _lssm_lib_schema683.FieldType<number, number>;
127
+ type: _lssm_lib_schema868.FieldType<number, number>;
128
128
  isOptional: true;
129
129
  };
130
130
  maxPrice: {
131
- type: _lssm_lib_schema683.FieldType<number, number>;
131
+ type: _lssm_lib_schema868.FieldType<number, number>;
132
132
  isOptional: true;
133
133
  };
134
134
  limit: {
135
- type: _lssm_lib_schema683.FieldType<number, number>;
135
+ type: _lssm_lib_schema868.FieldType<number, number>;
136
136
  isOptional: true;
137
137
  defaultValue: number;
138
138
  };
139
139
  offset: {
140
- type: _lssm_lib_schema683.FieldType<number, number>;
140
+ type: _lssm_lib_schema868.FieldType<number, number>;
141
141
  isOptional: true;
142
142
  defaultValue: number;
143
143
  };
@@ -145,63 +145,63 @@ declare const ListProductsInputModel: _lssm_lib_schema683.SchemaModel<{
145
145
  /**
146
146
  * Output for listing products.
147
147
  */
148
- declare const ListProductsOutputModel: _lssm_lib_schema683.SchemaModel<{
148
+ declare const ListProductsOutputModel: _lssm_lib_schema868.SchemaModel<{
149
149
  products: {
150
- type: _lssm_lib_schema683.SchemaModel<{
150
+ type: _lssm_lib_schema868.SchemaModel<{
151
151
  id: {
152
- type: _lssm_lib_schema683.FieldType<string, string>;
152
+ type: _lssm_lib_schema868.FieldType<string, string>;
153
153
  isOptional: false;
154
154
  };
155
155
  storeId: {
156
- type: _lssm_lib_schema683.FieldType<string, string>;
156
+ type: _lssm_lib_schema868.FieldType<string, string>;
157
157
  isOptional: false;
158
158
  };
159
159
  name: {
160
- type: _lssm_lib_schema683.FieldType<string, string>;
160
+ type: _lssm_lib_schema868.FieldType<string, string>;
161
161
  isOptional: false;
162
162
  };
163
163
  slug: {
164
- type: _lssm_lib_schema683.FieldType<string, string>;
164
+ type: _lssm_lib_schema868.FieldType<string, string>;
165
165
  isOptional: false;
166
166
  };
167
167
  description: {
168
- type: _lssm_lib_schema683.FieldType<string, string>;
168
+ type: _lssm_lib_schema868.FieldType<string, string>;
169
169
  isOptional: true;
170
170
  };
171
171
  status: {
172
- type: _lssm_lib_schema683.EnumType<[string, string, string, string, string, string]>;
172
+ type: _lssm_lib_schema868.EnumType<[string, string, string, string, string, string]>;
173
173
  isOptional: false;
174
174
  };
175
175
  price: {
176
- type: _lssm_lib_schema683.FieldType<number, number>;
176
+ type: _lssm_lib_schema868.FieldType<number, number>;
177
177
  isOptional: false;
178
178
  };
179
179
  currency: {
180
- type: _lssm_lib_schema683.FieldType<string, string>;
180
+ type: _lssm_lib_schema868.FieldType<string, string>;
181
181
  isOptional: false;
182
182
  };
183
183
  quantity: {
184
- type: _lssm_lib_schema683.FieldType<number, number>;
184
+ type: _lssm_lib_schema868.FieldType<number, number>;
185
185
  isOptional: false;
186
186
  };
187
187
  categoryId: {
188
- type: _lssm_lib_schema683.FieldType<string, string>;
188
+ type: _lssm_lib_schema868.FieldType<string, string>;
189
189
  isOptional: true;
190
190
  };
191
191
  primaryImageId: {
192
- type: _lssm_lib_schema683.FieldType<string, string>;
192
+ type: _lssm_lib_schema868.FieldType<string, string>;
193
193
  isOptional: true;
194
194
  };
195
195
  averageRating: {
196
- type: _lssm_lib_schema683.FieldType<number, number>;
196
+ type: _lssm_lib_schema868.FieldType<number, number>;
197
197
  isOptional: false;
198
198
  };
199
199
  totalSold: {
200
- type: _lssm_lib_schema683.FieldType<number, number>;
200
+ type: _lssm_lib_schema868.FieldType<number, number>;
201
201
  isOptional: false;
202
202
  };
203
203
  createdAt: {
204
- type: _lssm_lib_schema683.FieldType<Date, string>;
204
+ type: _lssm_lib_schema868.FieldType<Date, string>;
205
205
  isOptional: false;
206
206
  };
207
207
  }>;
@@ -209,7 +209,7 @@ declare const ListProductsOutputModel: _lssm_lib_schema683.SchemaModel<{
209
209
  isOptional: false;
210
210
  };
211
211
  total: {
212
- type: _lssm_lib_schema683.FieldType<number, number>;
212
+ type: _lssm_lib_schema868.FieldType<number, number>;
213
213
  isOptional: false;
214
214
  };
215
215
  }>;