@lssm/example.marketplace 0.0.0-canary-20251217063201 → 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.js +27 -1
  17. package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
  18. package/dist/libs/contracts/dist/client/index.js +5 -1
  19. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  20. package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
  21. package/dist/libs/contracts/dist/client/react/index.js +4 -1
  22. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  23. package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
  24. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  25. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  26. package/dist/libs/contracts/dist/docs/index.js +29 -1
  27. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  28. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  29. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  30. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  31. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  32. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  33. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  34. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  35. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  36. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  37. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  38. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  39. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  40. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  41. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  43. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  44. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  45. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  46. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  47. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  48. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  49. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  50. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  51. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  52. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  53. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  54. package/dist/libs/contracts/dist/events.js +10 -1
  55. package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
  56. package/dist/libs/contracts/dist/index.js +71 -1
  57. package/dist/libs/contracts/dist/install.js +2 -1
  58. package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
  59. package/dist/libs/contracts/dist/integrations/index.js +18 -1
  60. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  61. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  62. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  63. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  64. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
  65. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
  66. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  67. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  68. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
  69. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
  70. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
  71. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
  72. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
  73. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
  74. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
  75. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
  76. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
  77. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  78. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  79. package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
  80. package/dist/libs/contracts/dist/knowledge/index.js +7 -1
  81. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
  82. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
  83. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
  84. package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
  85. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
  86. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
  87. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
  88. package/dist/libs/contracts/dist/llm/exporters.js +19 -1
  89. package/dist/libs/contracts/dist/llm/index.js +2 -1
  90. package/dist/libs/contracts/dist/llm/prompts.js +1 -1
  91. package/dist/libs/contracts/dist/onboarding-base.js +196 -1
  92. package/dist/libs/contracts/dist/openapi.js +1 -1
  93. package/dist/libs/contracts/dist/ownership.js +21 -1
  94. package/dist/libs/contracts/dist/presentations.js +1 -1
  95. package/dist/libs/contracts/dist/presentations.v2.js +11 -1
  96. package/dist/libs/contracts/dist/prompt.js +1 -1
  97. package/dist/libs/contracts/dist/promptRegistry.js +1 -1
  98. package/dist/libs/contracts/dist/regenerator/index.js +1 -1
  99. package/dist/libs/contracts/dist/regenerator/service.js +6 -1
  100. package/dist/libs/contracts/dist/registry.js +2 -1
  101. package/dist/libs/contracts/dist/resources.js +1 -1
  102. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
  103. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
  104. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  105. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
  106. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  107. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
  108. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
  109. package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
  110. package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
  111. package/dist/libs/contracts/dist/server/index.js +8 -1
  112. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
  113. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
  114. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  115. package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
  116. package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
  117. package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
  118. package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
  119. package/dist/libs/contracts/dist/server/rest-express.js +1 -1
  120. package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
  121. package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
  122. package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
  123. package/dist/libs/contracts/dist/spec.js +34 -1
  124. package/dist/libs/contracts/dist/telemetry/index.js +1 -1
  125. package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
  126. package/dist/libs/contracts/dist/tests/index.js +1 -1
  127. package/dist/libs/contracts/dist/tests/runner.js +2 -1
  128. package/dist/libs/contracts/dist/workflow/index.js +1 -1
  129. package/dist/libs/contracts/dist/workflow/runner.js +1 -1
  130. package/dist/libs/schema/dist/EnumType.js +56 -1
  131. package/dist/libs/schema/dist/FieldType.js +49 -1
  132. package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
  133. package/dist/libs/schema/dist/SchemaModel.js +39 -1
  134. package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
  135. package/dist/libs/schema/dist/entity/index.js +2 -1
  136. package/dist/libs/schema/dist/entity/types.js +1 -1
  137. package/dist/libs/schema/dist/index.js +6 -1
  138. package/dist/marketplace.feature.js +308 -1
  139. package/dist/order/index.js +6 -1
  140. package/dist/order/order.contracts.d.ts +90 -90
  141. package/dist/order/order.contracts.js +74 -1
  142. package/dist/order/order.enum.d.ts +2 -2
  143. package/dist/order/order.enum.js +22 -1
  144. package/dist/order/order.event.d.ts +39 -39
  145. package/dist/order/order.event.js +193 -1
  146. package/dist/order/order.presentation.js +72 -1
  147. package/dist/order/order.schema.d.ts +39 -39
  148. package/dist/order/order.schema.js +156 -1
  149. package/dist/payout/index.js +6 -1
  150. package/dist/payout/payout.contracts.d.ts +24 -24
  151. package/dist/payout/payout.contracts.js +32 -1
  152. package/dist/payout/payout.enum.d.ts +2 -2
  153. package/dist/payout/payout.enum.js +17 -1
  154. package/dist/payout/payout.event.d.ts +17 -17
  155. package/dist/payout/payout.event.js +84 -1
  156. package/dist/payout/payout.presentation.js +50 -1
  157. package/dist/payout/payout.schema.d.ts +37 -37
  158. package/dist/payout/payout.schema.js +117 -1
  159. package/dist/product/index.js +6 -1
  160. package/dist/product/product.contracts.d.ts +68 -68
  161. package/dist/product/product.contracts.js +65 -1
  162. package/dist/product/product.enum.d.ts +2 -2
  163. package/dist/product/product.enum.js +18 -1
  164. package/dist/product/product.event.d.ts +20 -20
  165. package/dist/product/product.event.js +103 -1
  166. package/dist/product/product.presentation.js +72 -1
  167. package/dist/product/product.schema.d.ts +52 -52
  168. package/dist/product/product.schema.js +177 -1
  169. package/dist/review/index.js +6 -1
  170. package/dist/review/review.contracts.d.ts +59 -59
  171. package/dist/review/review.contracts.js +65 -1
  172. package/dist/review/review.enum.d.ts +2 -2
  173. package/dist/review/review.enum.js +16 -1
  174. package/dist/review/review.event.d.ts +15 -15
  175. package/dist/review/review.event.js +76 -1
  176. package/dist/review/review.presentation.js +50 -1
  177. package/dist/review/review.schema.d.ts +45 -45
  178. package/dist/review/review.schema.js +157 -1
  179. package/dist/store/index.js +6 -1
  180. package/dist/store/store.contracts.d.ts +33 -33
  181. package/dist/store/store.contracts.js +41 -1
  182. package/dist/store/store.enum.d.ts +2 -2
  183. package/dist/store/store.enum.js +16 -1
  184. package/dist/store/store.event.d.ts +14 -14
  185. package/dist/store/store.event.js +72 -1
  186. package/dist/store/store.presentation.js +50 -1
  187. package/dist/store/store.schema.d.ts +20 -20
  188. package/dist/store/store.schema.js +94 -1
  189. package/package.json +12 -12
@@ -1 +1,177 @@
1
- import{l as e}from"../libs/schema/dist/ScalarTypeEnum.js";import{n as t}from"../libs/schema/dist/SchemaModel.js";import"../libs/schema/dist/index.js";import{ProductStatusEnum as n}from"./product.enum.js";const r=t({name:`ProductModel`,description:`A product listing`,fields:{id:{type:e.String_unsecure(),isOptional:!1},storeId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},slug:{type:e.String_unsecure(),isOptional:!1},description:{type:e.String_unsecure(),isOptional:!0},status:{type:n,isOptional:!1},price:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1},quantity:{type:e.Int_unsecure(),isOptional:!1},categoryId:{type:e.String_unsecure(),isOptional:!0},primaryImageId:{type:e.String_unsecure(),isOptional:!0},averageRating:{type:e.Float_unsecure(),isOptional:!1},totalSold:{type:e.Int_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`CreateProductInput`,fields:{storeId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.NonEmptyString(),isOptional:!1},slug:{type:e.NonEmptyString(),isOptional:!1},description:{type:e.String_unsecure(),isOptional:!0},price:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!0},quantity:{type:e.Int_unsecure(),isOptional:!0},categoryId:{type:e.String_unsecure(),isOptional:!0},sku:{type:e.String_unsecure(),isOptional:!0}}}),a=t({name:`ListProductsInput`,fields:{storeId:{type:e.String_unsecure(),isOptional:!0},categoryId:{type:e.String_unsecure(),isOptional:!0},status:{type:n,isOptional:!0},search:{type:e.String_unsecure(),isOptional:!0},minPrice:{type:e.Float_unsecure(),isOptional:!0},maxPrice:{type:e.Float_unsecure(),isOptional:!0},limit:{type:e.Int_unsecure(),isOptional:!0,defaultValue:20},offset:{type:e.Int_unsecure(),isOptional:!0,defaultValue:0}}}),o=t({name:`ListProductsOutput`,fields:{products:{type:r,isArray:!0,isOptional:!1},total:{type:e.Int_unsecure(),isOptional:!1}}});export{i as CreateProductInputModel,a as ListProductsInputModel,o as ListProductsOutputModel,r as ProductModel};
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 { ProductStatusEnum } from "./product.enum.js";
5
+
6
+ //#region src/product/product.schema.ts
7
+ /**
8
+ * A product listing.
9
+ */
10
+ const ProductModel = defineSchemaModel({
11
+ name: "ProductModel",
12
+ description: "A product listing",
13
+ fields: {
14
+ id: {
15
+ type: ScalarTypeEnum.String_unsecure(),
16
+ isOptional: false
17
+ },
18
+ storeId: {
19
+ type: ScalarTypeEnum.String_unsecure(),
20
+ isOptional: false
21
+ },
22
+ name: {
23
+ type: ScalarTypeEnum.String_unsecure(),
24
+ isOptional: false
25
+ },
26
+ slug: {
27
+ type: ScalarTypeEnum.String_unsecure(),
28
+ isOptional: false
29
+ },
30
+ description: {
31
+ type: ScalarTypeEnum.String_unsecure(),
32
+ isOptional: true
33
+ },
34
+ status: {
35
+ type: ProductStatusEnum,
36
+ isOptional: false
37
+ },
38
+ price: {
39
+ type: ScalarTypeEnum.Float_unsecure(),
40
+ isOptional: false
41
+ },
42
+ currency: {
43
+ type: ScalarTypeEnum.String_unsecure(),
44
+ isOptional: false
45
+ },
46
+ quantity: {
47
+ type: ScalarTypeEnum.Int_unsecure(),
48
+ isOptional: false
49
+ },
50
+ categoryId: {
51
+ type: ScalarTypeEnum.String_unsecure(),
52
+ isOptional: true
53
+ },
54
+ primaryImageId: {
55
+ type: ScalarTypeEnum.String_unsecure(),
56
+ isOptional: true
57
+ },
58
+ averageRating: {
59
+ type: ScalarTypeEnum.Float_unsecure(),
60
+ isOptional: false
61
+ },
62
+ totalSold: {
63
+ type: ScalarTypeEnum.Int_unsecure(),
64
+ isOptional: false
65
+ },
66
+ createdAt: {
67
+ type: ScalarTypeEnum.DateTime(),
68
+ isOptional: false
69
+ }
70
+ }
71
+ });
72
+ /**
73
+ * Input for creating a product.
74
+ */
75
+ const CreateProductInputModel = defineSchemaModel({
76
+ name: "CreateProductInput",
77
+ fields: {
78
+ storeId: {
79
+ type: ScalarTypeEnum.String_unsecure(),
80
+ isOptional: false
81
+ },
82
+ name: {
83
+ type: ScalarTypeEnum.NonEmptyString(),
84
+ isOptional: false
85
+ },
86
+ slug: {
87
+ type: ScalarTypeEnum.NonEmptyString(),
88
+ isOptional: false
89
+ },
90
+ description: {
91
+ type: ScalarTypeEnum.String_unsecure(),
92
+ isOptional: true
93
+ },
94
+ price: {
95
+ type: ScalarTypeEnum.Float_unsecure(),
96
+ isOptional: false
97
+ },
98
+ currency: {
99
+ type: ScalarTypeEnum.String_unsecure(),
100
+ isOptional: true
101
+ },
102
+ quantity: {
103
+ type: ScalarTypeEnum.Int_unsecure(),
104
+ isOptional: true
105
+ },
106
+ categoryId: {
107
+ type: ScalarTypeEnum.String_unsecure(),
108
+ isOptional: true
109
+ },
110
+ sku: {
111
+ type: ScalarTypeEnum.String_unsecure(),
112
+ isOptional: true
113
+ }
114
+ }
115
+ });
116
+ /**
117
+ * Input for listing products.
118
+ */
119
+ const ListProductsInputModel = defineSchemaModel({
120
+ name: "ListProductsInput",
121
+ fields: {
122
+ storeId: {
123
+ type: ScalarTypeEnum.String_unsecure(),
124
+ isOptional: true
125
+ },
126
+ categoryId: {
127
+ type: ScalarTypeEnum.String_unsecure(),
128
+ isOptional: true
129
+ },
130
+ status: {
131
+ type: ProductStatusEnum,
132
+ isOptional: true
133
+ },
134
+ search: {
135
+ type: ScalarTypeEnum.String_unsecure(),
136
+ isOptional: true
137
+ },
138
+ minPrice: {
139
+ type: ScalarTypeEnum.Float_unsecure(),
140
+ isOptional: true
141
+ },
142
+ maxPrice: {
143
+ type: ScalarTypeEnum.Float_unsecure(),
144
+ isOptional: true
145
+ },
146
+ limit: {
147
+ type: ScalarTypeEnum.Int_unsecure(),
148
+ isOptional: true,
149
+ defaultValue: 20
150
+ },
151
+ offset: {
152
+ type: ScalarTypeEnum.Int_unsecure(),
153
+ isOptional: true,
154
+ defaultValue: 0
155
+ }
156
+ }
157
+ });
158
+ /**
159
+ * Output for listing products.
160
+ */
161
+ const ListProductsOutputModel = defineSchemaModel({
162
+ name: "ListProductsOutput",
163
+ fields: {
164
+ products: {
165
+ type: ProductModel,
166
+ isArray: true,
167
+ isOptional: false
168
+ },
169
+ total: {
170
+ type: ScalarTypeEnum.Int_unsecure(),
171
+ isOptional: false
172
+ }
173
+ }
174
+ });
175
+
176
+ //#endregion
177
+ export { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel };
@@ -1 +1,6 @@
1
- import{ReviewStatusEnum as e}from"./review.enum.js";import{CreateReviewInputModel as t,ListReviewsInputModel as n,ListReviewsOutputModel as r,ReviewModel as i}from"./review.schema.js";import{CreateReviewContract as a,ListReviewsContract as o}from"./review.contracts.js";import{ReviewCreatedEvent as s,ReviewRespondedEvent as c}from"./review.event.js";export{a as CreateReviewContract,t as CreateReviewInputModel,o as ListReviewsContract,n as ListReviewsInputModel,r as ListReviewsOutputModel,s as ReviewCreatedEvent,i as ReviewModel,c as ReviewRespondedEvent,e as ReviewStatusEnum};
1
+ import { ReviewStatusEnum } from "./review.enum.js";
2
+ import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review.schema.js";
3
+ import { CreateReviewContract, ListReviewsContract } from "./review.contracts.js";
4
+ import { ReviewCreatedEvent, ReviewRespondedEvent } from "./review.event.js";
5
+
6
+ export { CreateReviewContract, CreateReviewInputModel, ListReviewsContract, ListReviewsInputModel, ListReviewsOutputModel, ReviewCreatedEvent, ReviewModel, ReviewRespondedEvent, ReviewStatusEnum };
@@ -1,135 +1,135 @@
1
- import * as _lssm_lib_schema805 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts5 from "@lssm/lib.contracts";
1
+ import * as _lssm_lib_schema957 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts12 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/review/review.contracts.d.ts
5
5
  /**
6
6
  * Create a product/store review.
7
7
  */
8
- declare const CreateReviewContract: _lssm_lib_contracts5.ContractSpec<_lssm_lib_schema805.SchemaModel<{
8
+ declare const CreateReviewContract: _lssm_lib_contracts12.ContractSpec<_lssm_lib_schema957.SchemaModel<{
9
9
  productId: {
10
- type: _lssm_lib_schema805.FieldType<string, string>;
10
+ type: _lssm_lib_schema957.FieldType<string, string>;
11
11
  isOptional: true;
12
12
  };
13
13
  storeId: {
14
- type: _lssm_lib_schema805.FieldType<string, string>;
14
+ type: _lssm_lib_schema957.FieldType<string, string>;
15
15
  isOptional: true;
16
16
  };
17
17
  orderId: {
18
- type: _lssm_lib_schema805.FieldType<string, string>;
18
+ type: _lssm_lib_schema957.FieldType<string, string>;
19
19
  isOptional: true;
20
20
  };
21
21
  rating: {
22
- type: _lssm_lib_schema805.FieldType<number, number>;
22
+ type: _lssm_lib_schema957.FieldType<number, number>;
23
23
  isOptional: false;
24
24
  };
25
25
  title: {
26
- type: _lssm_lib_schema805.FieldType<string, string>;
26
+ type: _lssm_lib_schema957.FieldType<string, string>;
27
27
  isOptional: true;
28
28
  };
29
29
  content: {
30
- type: _lssm_lib_schema805.FieldType<string, string>;
30
+ type: _lssm_lib_schema957.FieldType<string, string>;
31
31
  isOptional: true;
32
32
  };
33
- }>, _lssm_lib_schema805.SchemaModel<{
33
+ }>, _lssm_lib_schema957.SchemaModel<{
34
34
  id: {
35
- type: _lssm_lib_schema805.FieldType<string, string>;
35
+ type: _lssm_lib_schema957.FieldType<string, string>;
36
36
  isOptional: false;
37
37
  };
38
38
  productId: {
39
- type: _lssm_lib_schema805.FieldType<string, string>;
39
+ type: _lssm_lib_schema957.FieldType<string, string>;
40
40
  isOptional: true;
41
41
  };
42
42
  storeId: {
43
- type: _lssm_lib_schema805.FieldType<string, string>;
43
+ type: _lssm_lib_schema957.FieldType<string, string>;
44
44
  isOptional: true;
45
45
  };
46
46
  authorId: {
47
- type: _lssm_lib_schema805.FieldType<string, string>;
47
+ type: _lssm_lib_schema957.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  rating: {
51
- type: _lssm_lib_schema805.FieldType<number, number>;
51
+ type: _lssm_lib_schema957.FieldType<number, number>;
52
52
  isOptional: false;
53
53
  };
54
54
  title: {
55
- type: _lssm_lib_schema805.FieldType<string, string>;
55
+ type: _lssm_lib_schema957.FieldType<string, string>;
56
56
  isOptional: true;
57
57
  };
58
58
  content: {
59
- type: _lssm_lib_schema805.FieldType<string, string>;
59
+ type: _lssm_lib_schema957.FieldType<string, string>;
60
60
  isOptional: true;
61
61
  };
62
62
  status: {
63
- type: _lssm_lib_schema805.EnumType<[string, string, string, string]>;
63
+ type: _lssm_lib_schema957.EnumType<[string, string, string, string]>;
64
64
  isOptional: false;
65
65
  };
66
66
  isVerifiedPurchase: {
67
- type: _lssm_lib_schema805.FieldType<boolean, boolean>;
67
+ type: _lssm_lib_schema957.FieldType<boolean, boolean>;
68
68
  isOptional: false;
69
69
  };
70
70
  helpfulCount: {
71
- type: _lssm_lib_schema805.FieldType<number, number>;
71
+ type: _lssm_lib_schema957.FieldType<number, number>;
72
72
  isOptional: false;
73
73
  };
74
74
  hasResponse: {
75
- type: _lssm_lib_schema805.FieldType<boolean, boolean>;
75
+ type: _lssm_lib_schema957.FieldType<boolean, boolean>;
76
76
  isOptional: false;
77
77
  };
78
78
  createdAt: {
79
- type: _lssm_lib_schema805.FieldType<Date, string>;
79
+ type: _lssm_lib_schema957.FieldType<Date, string>;
80
80
  isOptional: false;
81
81
  };
82
82
  }>, {
83
83
  name: string;
84
84
  version: number;
85
85
  when: string;
86
- payload: _lssm_lib_schema805.SchemaModel<{
86
+ payload: _lssm_lib_schema957.SchemaModel<{
87
87
  id: {
88
- type: _lssm_lib_schema805.FieldType<string, string>;
88
+ type: _lssm_lib_schema957.FieldType<string, string>;
89
89
  isOptional: false;
90
90
  };
91
91
  productId: {
92
- type: _lssm_lib_schema805.FieldType<string, string>;
92
+ type: _lssm_lib_schema957.FieldType<string, string>;
93
93
  isOptional: true;
94
94
  };
95
95
  storeId: {
96
- type: _lssm_lib_schema805.FieldType<string, string>;
96
+ type: _lssm_lib_schema957.FieldType<string, string>;
97
97
  isOptional: true;
98
98
  };
99
99
  authorId: {
100
- type: _lssm_lib_schema805.FieldType<string, string>;
100
+ type: _lssm_lib_schema957.FieldType<string, string>;
101
101
  isOptional: false;
102
102
  };
103
103
  rating: {
104
- type: _lssm_lib_schema805.FieldType<number, number>;
104
+ type: _lssm_lib_schema957.FieldType<number, number>;
105
105
  isOptional: false;
106
106
  };
107
107
  title: {
108
- type: _lssm_lib_schema805.FieldType<string, string>;
108
+ type: _lssm_lib_schema957.FieldType<string, string>;
109
109
  isOptional: true;
110
110
  };
111
111
  content: {
112
- type: _lssm_lib_schema805.FieldType<string, string>;
112
+ type: _lssm_lib_schema957.FieldType<string, string>;
113
113
  isOptional: true;
114
114
  };
115
115
  status: {
116
- type: _lssm_lib_schema805.EnumType<[string, string, string, string]>;
116
+ type: _lssm_lib_schema957.EnumType<[string, string, string, string]>;
117
117
  isOptional: false;
118
118
  };
119
119
  isVerifiedPurchase: {
120
- type: _lssm_lib_schema805.FieldType<boolean, boolean>;
120
+ type: _lssm_lib_schema957.FieldType<boolean, boolean>;
121
121
  isOptional: false;
122
122
  };
123
123
  helpfulCount: {
124
- type: _lssm_lib_schema805.FieldType<number, number>;
124
+ type: _lssm_lib_schema957.FieldType<number, number>;
125
125
  isOptional: false;
126
126
  };
127
127
  hasResponse: {
128
- type: _lssm_lib_schema805.FieldType<boolean, boolean>;
128
+ type: _lssm_lib_schema957.FieldType<boolean, boolean>;
129
129
  isOptional: false;
130
130
  };
131
131
  createdAt: {
132
- type: _lssm_lib_schema805.FieldType<Date, string>;
132
+ type: _lssm_lib_schema957.FieldType<Date, string>;
133
133
  isOptional: false;
134
134
  };
135
135
  }>;
@@ -137,82 +137,82 @@ declare const CreateReviewContract: _lssm_lib_contracts5.ContractSpec<_lssm_lib_
137
137
  /**
138
138
  * List reviews with filters.
139
139
  */
140
- declare const ListReviewsContract: _lssm_lib_contracts5.ContractSpec<_lssm_lib_schema805.SchemaModel<{
140
+ declare const ListReviewsContract: _lssm_lib_contracts12.ContractSpec<_lssm_lib_schema957.SchemaModel<{
141
141
  productId: {
142
- type: _lssm_lib_schema805.FieldType<string, string>;
142
+ type: _lssm_lib_schema957.FieldType<string, string>;
143
143
  isOptional: true;
144
144
  };
145
145
  storeId: {
146
- type: _lssm_lib_schema805.FieldType<string, string>;
146
+ type: _lssm_lib_schema957.FieldType<string, string>;
147
147
  isOptional: true;
148
148
  };
149
149
  status: {
150
- type: _lssm_lib_schema805.EnumType<[string, string, string, string]>;
150
+ type: _lssm_lib_schema957.EnumType<[string, string, string, string]>;
151
151
  isOptional: true;
152
152
  };
153
153
  minRating: {
154
- type: _lssm_lib_schema805.FieldType<number, number>;
154
+ type: _lssm_lib_schema957.FieldType<number, number>;
155
155
  isOptional: true;
156
156
  };
157
157
  limit: {
158
- type: _lssm_lib_schema805.FieldType<number, number>;
158
+ type: _lssm_lib_schema957.FieldType<number, number>;
159
159
  isOptional: true;
160
160
  defaultValue: number;
161
161
  };
162
162
  offset: {
163
- type: _lssm_lib_schema805.FieldType<number, number>;
163
+ type: _lssm_lib_schema957.FieldType<number, number>;
164
164
  isOptional: true;
165
165
  defaultValue: number;
166
166
  };
167
- }>, _lssm_lib_schema805.SchemaModel<{
167
+ }>, _lssm_lib_schema957.SchemaModel<{
168
168
  reviews: {
169
- type: _lssm_lib_schema805.SchemaModel<{
169
+ type: _lssm_lib_schema957.SchemaModel<{
170
170
  id: {
171
- type: _lssm_lib_schema805.FieldType<string, string>;
171
+ type: _lssm_lib_schema957.FieldType<string, string>;
172
172
  isOptional: false;
173
173
  };
174
174
  productId: {
175
- type: _lssm_lib_schema805.FieldType<string, string>;
175
+ type: _lssm_lib_schema957.FieldType<string, string>;
176
176
  isOptional: true;
177
177
  };
178
178
  storeId: {
179
- type: _lssm_lib_schema805.FieldType<string, string>;
179
+ type: _lssm_lib_schema957.FieldType<string, string>;
180
180
  isOptional: true;
181
181
  };
182
182
  authorId: {
183
- type: _lssm_lib_schema805.FieldType<string, string>;
183
+ type: _lssm_lib_schema957.FieldType<string, string>;
184
184
  isOptional: false;
185
185
  };
186
186
  rating: {
187
- type: _lssm_lib_schema805.FieldType<number, number>;
187
+ type: _lssm_lib_schema957.FieldType<number, number>;
188
188
  isOptional: false;
189
189
  };
190
190
  title: {
191
- type: _lssm_lib_schema805.FieldType<string, string>;
191
+ type: _lssm_lib_schema957.FieldType<string, string>;
192
192
  isOptional: true;
193
193
  };
194
194
  content: {
195
- type: _lssm_lib_schema805.FieldType<string, string>;
195
+ type: _lssm_lib_schema957.FieldType<string, string>;
196
196
  isOptional: true;
197
197
  };
198
198
  status: {
199
- type: _lssm_lib_schema805.EnumType<[string, string, string, string]>;
199
+ type: _lssm_lib_schema957.EnumType<[string, string, string, string]>;
200
200
  isOptional: false;
201
201
  };
202
202
  isVerifiedPurchase: {
203
- type: _lssm_lib_schema805.FieldType<boolean, boolean>;
203
+ type: _lssm_lib_schema957.FieldType<boolean, boolean>;
204
204
  isOptional: false;
205
205
  };
206
206
  helpfulCount: {
207
- type: _lssm_lib_schema805.FieldType<number, number>;
207
+ type: _lssm_lib_schema957.FieldType<number, number>;
208
208
  isOptional: false;
209
209
  };
210
210
  hasResponse: {
211
- type: _lssm_lib_schema805.FieldType<boolean, boolean>;
211
+ type: _lssm_lib_schema957.FieldType<boolean, boolean>;
212
212
  isOptional: false;
213
213
  };
214
214
  createdAt: {
215
- type: _lssm_lib_schema805.FieldType<Date, string>;
215
+ type: _lssm_lib_schema957.FieldType<Date, string>;
216
216
  isOptional: false;
217
217
  };
218
218
  }>;
@@ -220,15 +220,15 @@ declare const ListReviewsContract: _lssm_lib_contracts5.ContractSpec<_lssm_lib_s
220
220
  isOptional: false;
221
221
  };
222
222
  total: {
223
- type: _lssm_lib_schema805.FieldType<number, number>;
223
+ type: _lssm_lib_schema957.FieldType<number, number>;
224
224
  isOptional: false;
225
225
  };
226
226
  averageRating: {
227
- type: _lssm_lib_schema805.FieldType<number, number>;
227
+ type: _lssm_lib_schema957.FieldType<number, number>;
228
228
  isOptional: false;
229
229
  };
230
230
  ratingDistribution: {
231
- type: _lssm_lib_schema805.FieldType<unknown, unknown>;
231
+ type: _lssm_lib_schema957.FieldType<unknown, unknown>;
232
232
  isOptional: false;
233
233
  };
234
234
  }>, undefined>;
@@ -1 +1,65 @@
1
- import{n as e,t}from"../libs/contracts/dist/spec.js";import{CreateReviewInputModel as n,ListReviewsInputModel as r,ListReviewsOutputModel as i,ReviewModel as a}from"./review.schema.js";const o=[`@example.marketplace`],s=t({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:n,output:a},policy:{auth:`user`},sideEffects:{emits:[{name:`marketplace.review.created`,version:1,when:`Review is created`,payload:a}],audit:[`marketplace.review.created`]}}),c=e({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:r,output:i},policy:{auth:`anonymous`}});export{s as CreateReviewContract,c as ListReviewsContract};
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,9 +1,9 @@
1
- import * as _lssm_lib_schema1100 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema1014 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/review/review.enum.d.ts
4
4
  /**
5
5
  * Review status enum.
6
6
  */
7
- declare const ReviewStatusEnum: _lssm_lib_schema1100.EnumType<[string, string, string, string]>;
7
+ declare const ReviewStatusEnum: _lssm_lib_schema1014.EnumType<[string, string, string, string]>;
8
8
  //#endregion
9
9
  export { ReviewStatusEnum };
@@ -1 +1,16 @@
1
- import{r as e}from"../libs/schema/dist/EnumType.js";import"../libs/schema/dist/index.js";const t=e(`ReviewStatus`,[`PENDING`,`APPROVED`,`REJECTED`,`FLAGGED`]);export{t as ReviewStatusEnum};
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,52 +1,52 @@
1
- import * as _lssm_lib_schema1037 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts16 from "@lssm/lib.contracts";
1
+ import * as _lssm_lib_schema18 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/review/review.event.d.ts
5
- declare const ReviewCreatedEvent: _lssm_lib_contracts16.EventSpec<_lssm_lib_schema1037.SchemaModel<{
5
+ declare const ReviewCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema18.SchemaModel<{
6
6
  reviewId: {
7
- type: _lssm_lib_schema1037.FieldType<string, string>;
7
+ type: _lssm_lib_schema18.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  productId: {
11
- type: _lssm_lib_schema1037.FieldType<string, string>;
11
+ type: _lssm_lib_schema18.FieldType<string, string>;
12
12
  isOptional: true;
13
13
  };
14
14
  storeId: {
15
- type: _lssm_lib_schema1037.FieldType<string, string>;
15
+ type: _lssm_lib_schema18.FieldType<string, string>;
16
16
  isOptional: true;
17
17
  };
18
18
  authorId: {
19
- type: _lssm_lib_schema1037.FieldType<string, string>;
19
+ type: _lssm_lib_schema18.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  rating: {
23
- type: _lssm_lib_schema1037.FieldType<number, number>;
23
+ type: _lssm_lib_schema18.FieldType<number, number>;
24
24
  isOptional: false;
25
25
  };
26
26
  isVerifiedPurchase: {
27
- type: _lssm_lib_schema1037.FieldType<boolean, boolean>;
27
+ type: _lssm_lib_schema18.FieldType<boolean, boolean>;
28
28
  isOptional: false;
29
29
  };
30
30
  timestamp: {
31
- type: _lssm_lib_schema1037.FieldType<Date, string>;
31
+ type: _lssm_lib_schema18.FieldType<Date, string>;
32
32
  isOptional: false;
33
33
  };
34
34
  }>>;
35
- declare const ReviewRespondedEvent: _lssm_lib_contracts16.EventSpec<_lssm_lib_schema1037.SchemaModel<{
35
+ declare const ReviewRespondedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema18.SchemaModel<{
36
36
  reviewId: {
37
- type: _lssm_lib_schema1037.FieldType<string, string>;
37
+ type: _lssm_lib_schema18.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  responseId: {
41
- type: _lssm_lib_schema1037.FieldType<string, string>;
41
+ type: _lssm_lib_schema18.FieldType<string, string>;
42
42
  isOptional: false;
43
43
  };
44
44
  authorId: {
45
- type: _lssm_lib_schema1037.FieldType<string, string>;
45
+ type: _lssm_lib_schema18.FieldType<string, string>;
46
46
  isOptional: false;
47
47
  };
48
48
  timestamp: {
49
- type: _lssm_lib_schema1037.FieldType<Date, string>;
49
+ type: _lssm_lib_schema18.FieldType<Date, string>;
50
50
  isOptional: false;
51
51
  };
52
52
  }>>;