@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.
- package/dist/docs/index.js +1 -1
- package/dist/docs/marketplace.docblock.js +61 -5
- package/dist/entities/index.d.ts +296 -296
- package/dist/entities/index.js +45 -1
- package/dist/entities/order.d.ts +78 -78
- package/dist/entities/order.js +173 -1
- package/dist/entities/payout.d.ts +65 -65
- package/dist/entities/payout.js +162 -1
- package/dist/entities/product.d.ts +70 -70
- package/dist/entities/product.js +161 -1
- package/dist/entities/review.d.ts +56 -56
- package/dist/entities/review.js +152 -1
- package/dist/entities/store.d.ts +41 -41
- package/dist/entities/store.js +110 -1
- package/dist/example.js +50 -1
- package/dist/index.js +27 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +10 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +71 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +19 -1
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +1 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +1 -1
- package/dist/libs/contracts/dist/regenerator/service.js +6 -1
- package/dist/libs/contracts/dist/registry.js +2 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +34 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +2 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/schema/dist/EnumType.js +56 -1
- package/dist/libs/schema/dist/FieldType.js +49 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
- package/dist/libs/schema/dist/entity/index.js +2 -1
- package/dist/libs/schema/dist/entity/types.js +1 -1
- package/dist/libs/schema/dist/index.js +6 -1
- package/dist/marketplace.feature.js +308 -1
- package/dist/order/index.js +6 -1
- package/dist/order/order.contracts.d.ts +90 -90
- package/dist/order/order.contracts.js +74 -1
- package/dist/order/order.enum.d.ts +2 -2
- package/dist/order/order.enum.js +22 -1
- package/dist/order/order.event.d.ts +39 -39
- package/dist/order/order.event.js +193 -1
- package/dist/order/order.presentation.js +72 -1
- package/dist/order/order.schema.d.ts +39 -39
- package/dist/order/order.schema.js +156 -1
- package/dist/payout/index.js +6 -1
- package/dist/payout/payout.contracts.d.ts +24 -24
- package/dist/payout/payout.contracts.js +32 -1
- package/dist/payout/payout.enum.d.ts +2 -2
- package/dist/payout/payout.enum.js +17 -1
- package/dist/payout/payout.event.d.ts +17 -17
- package/dist/payout/payout.event.js +84 -1
- package/dist/payout/payout.presentation.js +50 -1
- package/dist/payout/payout.schema.d.ts +37 -37
- package/dist/payout/payout.schema.js +117 -1
- package/dist/product/index.js +6 -1
- package/dist/product/product.contracts.d.ts +68 -68
- package/dist/product/product.contracts.js +65 -1
- package/dist/product/product.enum.d.ts +2 -2
- package/dist/product/product.enum.js +18 -1
- package/dist/product/product.event.d.ts +20 -20
- package/dist/product/product.event.js +103 -1
- package/dist/product/product.presentation.js +72 -1
- package/dist/product/product.schema.d.ts +52 -52
- package/dist/product/product.schema.js +177 -1
- package/dist/review/index.js +6 -1
- package/dist/review/review.contracts.d.ts +59 -59
- package/dist/review/review.contracts.js +65 -1
- package/dist/review/review.enum.d.ts +2 -2
- package/dist/review/review.enum.js +16 -1
- package/dist/review/review.event.d.ts +15 -15
- package/dist/review/review.event.js +76 -1
- package/dist/review/review.presentation.js +50 -1
- package/dist/review/review.schema.d.ts +45 -45
- package/dist/review/review.schema.js +157 -1
- package/dist/store/index.js +6 -1
- package/dist/store/store.contracts.d.ts +33 -33
- package/dist/store/store.contracts.js +41 -1
- package/dist/store/store.enum.d.ts +2 -2
- package/dist/store/store.enum.js +16 -1
- package/dist/store/store.event.d.ts +14 -14
- package/dist/store/store.event.js +72 -1
- package/dist/store/store.presentation.js +50 -1
- package/dist/store/store.schema.d.ts +20 -20
- package/dist/store/store.schema.js +94 -1
- package/package.json +12 -12
package/dist/entities/review.js
CHANGED
|
@@ -1 +1,152 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineEntity, defineEntityEnum, field, index } from "../libs/schema/dist/entity/defineEntity.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/entities/review.ts
|
|
5
|
+
/**
|
|
6
|
+
* Review status enum.
|
|
7
|
+
*/
|
|
8
|
+
const ReviewStatusEnum = defineEntityEnum({
|
|
9
|
+
name: "ReviewStatus",
|
|
10
|
+
values: [
|
|
11
|
+
"PENDING",
|
|
12
|
+
"APPROVED",
|
|
13
|
+
"REJECTED",
|
|
14
|
+
"FLAGGED"
|
|
15
|
+
],
|
|
16
|
+
schema: "marketplace",
|
|
17
|
+
description: "Status of a review."
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Review type enum.
|
|
21
|
+
*/
|
|
22
|
+
const ReviewTypeEnum = defineEntityEnum({
|
|
23
|
+
name: "ReviewType",
|
|
24
|
+
values: [
|
|
25
|
+
"PRODUCT",
|
|
26
|
+
"STORE",
|
|
27
|
+
"ORDER"
|
|
28
|
+
],
|
|
29
|
+
schema: "marketplace",
|
|
30
|
+
description: "Type of review."
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Review entity - customer reviews and ratings.
|
|
34
|
+
*/
|
|
35
|
+
const ReviewEntity = defineEntity({
|
|
36
|
+
name: "Review",
|
|
37
|
+
description: "A customer review on the marketplace.",
|
|
38
|
+
schema: "marketplace",
|
|
39
|
+
map: "review",
|
|
40
|
+
fields: {
|
|
41
|
+
id: field.id({ description: "Unique review ID" }),
|
|
42
|
+
type: field.enum("ReviewType", { default: "PRODUCT" }),
|
|
43
|
+
productId: field.string({ isOptional: true }),
|
|
44
|
+
storeId: field.string({ isOptional: true }),
|
|
45
|
+
orderId: field.string({ isOptional: true }),
|
|
46
|
+
orderItemId: field.string({ isOptional: true }),
|
|
47
|
+
authorId: field.foreignKey({ description: "Reviewer user ID" }),
|
|
48
|
+
rating: field.int({ description: "Rating 1-5" }),
|
|
49
|
+
title: field.string({ isOptional: true }),
|
|
50
|
+
content: field.string({ isOptional: true }),
|
|
51
|
+
isVerifiedPurchase: field.boolean({ default: false }),
|
|
52
|
+
status: field.enum("ReviewStatus", { default: "PENDING" }),
|
|
53
|
+
hasMedia: field.boolean({ default: false }),
|
|
54
|
+
helpfulCount: field.int({ default: 0 }),
|
|
55
|
+
notHelpfulCount: field.int({ default: 0 }),
|
|
56
|
+
moderatedBy: field.string({ isOptional: true }),
|
|
57
|
+
moderatedAt: field.dateTime({ isOptional: true }),
|
|
58
|
+
moderationNote: field.string({ isOptional: true }),
|
|
59
|
+
hasResponse: field.boolean({ default: false }),
|
|
60
|
+
createdAt: field.createdAt(),
|
|
61
|
+
updatedAt: field.updatedAt(),
|
|
62
|
+
product: field.belongsTo("Product", ["productId"], ["id"]),
|
|
63
|
+
store: field.belongsTo("Store", ["storeId"], ["id"]),
|
|
64
|
+
responses: field.hasMany("ReviewResponse"),
|
|
65
|
+
votes: field.hasMany("ReviewVote")
|
|
66
|
+
},
|
|
67
|
+
indexes: [
|
|
68
|
+
index.on([
|
|
69
|
+
"productId",
|
|
70
|
+
"status",
|
|
71
|
+
"createdAt"
|
|
72
|
+
]),
|
|
73
|
+
index.on([
|
|
74
|
+
"storeId",
|
|
75
|
+
"status",
|
|
76
|
+
"createdAt"
|
|
77
|
+
]),
|
|
78
|
+
index.on(["authorId"]),
|
|
79
|
+
index.on(["orderId"]),
|
|
80
|
+
index.on(["status"]),
|
|
81
|
+
index.on(["rating"]),
|
|
82
|
+
index.on(["isVerifiedPurchase", "status"])
|
|
83
|
+
],
|
|
84
|
+
enums: [ReviewStatusEnum, ReviewTypeEnum]
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* Review response entity - seller responses to reviews.
|
|
88
|
+
*/
|
|
89
|
+
const ReviewResponseEntity = defineEntity({
|
|
90
|
+
name: "ReviewResponse",
|
|
91
|
+
description: "A seller response to a review.",
|
|
92
|
+
schema: "marketplace",
|
|
93
|
+
map: "review_response",
|
|
94
|
+
fields: {
|
|
95
|
+
id: field.id(),
|
|
96
|
+
reviewId: field.foreignKey(),
|
|
97
|
+
authorId: field.foreignKey(),
|
|
98
|
+
content: field.string(),
|
|
99
|
+
createdAt: field.createdAt(),
|
|
100
|
+
updatedAt: field.updatedAt(),
|
|
101
|
+
review: field.belongsTo("Review", ["reviewId"], ["id"], { onDelete: "Cascade" })
|
|
102
|
+
},
|
|
103
|
+
indexes: [index.on(["reviewId"]), index.on(["authorId"])]
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* Review vote entity - helpfulness votes.
|
|
107
|
+
*/
|
|
108
|
+
const ReviewVoteEntity = defineEntity({
|
|
109
|
+
name: "ReviewVote",
|
|
110
|
+
description: "A helpfulness vote on a review.",
|
|
111
|
+
schema: "marketplace",
|
|
112
|
+
map: "review_vote",
|
|
113
|
+
fields: {
|
|
114
|
+
id: field.id(),
|
|
115
|
+
reviewId: field.foreignKey(),
|
|
116
|
+
userId: field.foreignKey(),
|
|
117
|
+
isHelpful: field.boolean(),
|
|
118
|
+
createdAt: field.createdAt(),
|
|
119
|
+
review: field.belongsTo("Review", ["reviewId"], ["id"], { onDelete: "Cascade" })
|
|
120
|
+
},
|
|
121
|
+
indexes: [index.unique(["reviewId", "userId"]), index.on(["userId"])]
|
|
122
|
+
});
|
|
123
|
+
/**
|
|
124
|
+
* Review report entity - flagged reviews.
|
|
125
|
+
*/
|
|
126
|
+
const ReviewReportEntity = defineEntity({
|
|
127
|
+
name: "ReviewReport",
|
|
128
|
+
description: "A report/flag on a review.",
|
|
129
|
+
schema: "marketplace",
|
|
130
|
+
map: "review_report",
|
|
131
|
+
fields: {
|
|
132
|
+
id: field.id(),
|
|
133
|
+
reviewId: field.foreignKey(),
|
|
134
|
+
reporterId: field.foreignKey(),
|
|
135
|
+
reason: field.string({ description: "Report reason category" }),
|
|
136
|
+
details: field.string({ isOptional: true }),
|
|
137
|
+
status: field.string({ default: "\"PENDING\"" }),
|
|
138
|
+
resolvedBy: field.string({ isOptional: true }),
|
|
139
|
+
resolvedAt: field.dateTime({ isOptional: true }),
|
|
140
|
+
resolution: field.string({ isOptional: true }),
|
|
141
|
+
createdAt: field.createdAt(),
|
|
142
|
+
review: field.belongsTo("Review", ["reviewId"], ["id"])
|
|
143
|
+
},
|
|
144
|
+
indexes: [
|
|
145
|
+
index.on(["reviewId"]),
|
|
146
|
+
index.on(["status"]),
|
|
147
|
+
index.on(["reporterId"])
|
|
148
|
+
]
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
//#endregion
|
|
152
|
+
export { ReviewEntity, ReviewReportEntity, ReviewResponseEntity, ReviewStatusEnum, ReviewTypeEnum, ReviewVoteEntity };
|
package/dist/entities/store.d.ts
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema717 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/store.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Store status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const StoreStatusEnum:
|
|
7
|
+
declare const StoreStatusEnum: _lssm_lib_schema717.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Store type enum.
|
|
10
10
|
*/
|
|
11
|
-
declare const StoreTypeEnum:
|
|
11
|
+
declare const StoreTypeEnum: _lssm_lib_schema717.EntityEnumDef;
|
|
12
12
|
/**
|
|
13
13
|
* Store entity - a seller's storefront on the marketplace.
|
|
14
14
|
*/
|
|
15
|
-
declare const StoreEntity:
|
|
16
|
-
id:
|
|
17
|
-
name:
|
|
18
|
-
slug:
|
|
19
|
-
description:
|
|
20
|
-
status:
|
|
21
|
-
type:
|
|
22
|
-
ownerId:
|
|
23
|
-
organizationId:
|
|
24
|
-
logoFileId:
|
|
25
|
-
bannerFileId:
|
|
26
|
-
email:
|
|
27
|
-
phone:
|
|
28
|
-
website:
|
|
29
|
-
country:
|
|
30
|
-
currency:
|
|
31
|
-
timezone:
|
|
32
|
-
commissionRate:
|
|
33
|
-
isVerified:
|
|
34
|
-
verifiedAt:
|
|
35
|
-
settings:
|
|
36
|
-
metadata:
|
|
37
|
-
totalProducts:
|
|
38
|
-
totalOrders:
|
|
39
|
-
totalRevenue:
|
|
40
|
-
averageRating:
|
|
41
|
-
createdAt:
|
|
42
|
-
updatedAt:
|
|
43
|
-
products:
|
|
44
|
-
orders:
|
|
45
|
-
payouts:
|
|
15
|
+
declare const StoreEntity: _lssm_lib_schema717.EntitySpec<{
|
|
16
|
+
id: _lssm_lib_schema717.EntityScalarField;
|
|
17
|
+
name: _lssm_lib_schema717.EntityScalarField;
|
|
18
|
+
slug: _lssm_lib_schema717.EntityScalarField;
|
|
19
|
+
description: _lssm_lib_schema717.EntityScalarField;
|
|
20
|
+
status: _lssm_lib_schema717.EntityEnumField;
|
|
21
|
+
type: _lssm_lib_schema717.EntityEnumField;
|
|
22
|
+
ownerId: _lssm_lib_schema717.EntityScalarField;
|
|
23
|
+
organizationId: _lssm_lib_schema717.EntityScalarField;
|
|
24
|
+
logoFileId: _lssm_lib_schema717.EntityScalarField;
|
|
25
|
+
bannerFileId: _lssm_lib_schema717.EntityScalarField;
|
|
26
|
+
email: _lssm_lib_schema717.EntityScalarField;
|
|
27
|
+
phone: _lssm_lib_schema717.EntityScalarField;
|
|
28
|
+
website: _lssm_lib_schema717.EntityScalarField;
|
|
29
|
+
country: _lssm_lib_schema717.EntityScalarField;
|
|
30
|
+
currency: _lssm_lib_schema717.EntityScalarField;
|
|
31
|
+
timezone: _lssm_lib_schema717.EntityScalarField;
|
|
32
|
+
commissionRate: _lssm_lib_schema717.EntityScalarField;
|
|
33
|
+
isVerified: _lssm_lib_schema717.EntityScalarField;
|
|
34
|
+
verifiedAt: _lssm_lib_schema717.EntityScalarField;
|
|
35
|
+
settings: _lssm_lib_schema717.EntityScalarField;
|
|
36
|
+
metadata: _lssm_lib_schema717.EntityScalarField;
|
|
37
|
+
totalProducts: _lssm_lib_schema717.EntityScalarField;
|
|
38
|
+
totalOrders: _lssm_lib_schema717.EntityScalarField;
|
|
39
|
+
totalRevenue: _lssm_lib_schema717.EntityScalarField;
|
|
40
|
+
averageRating: _lssm_lib_schema717.EntityScalarField;
|
|
41
|
+
createdAt: _lssm_lib_schema717.EntityScalarField;
|
|
42
|
+
updatedAt: _lssm_lib_schema717.EntityScalarField;
|
|
43
|
+
products: _lssm_lib_schema717.EntityRelationField;
|
|
44
|
+
orders: _lssm_lib_schema717.EntityRelationField;
|
|
45
|
+
payouts: _lssm_lib_schema717.EntityRelationField;
|
|
46
46
|
}>;
|
|
47
47
|
/**
|
|
48
48
|
* Store category entity - categorization for stores.
|
|
49
49
|
*/
|
|
50
|
-
declare const StoreCategoryEntity:
|
|
51
|
-
id:
|
|
52
|
-
storeId:
|
|
53
|
-
categoryId:
|
|
54
|
-
isPrimary:
|
|
55
|
-
createdAt:
|
|
56
|
-
store:
|
|
50
|
+
declare const StoreCategoryEntity: _lssm_lib_schema717.EntitySpec<{
|
|
51
|
+
id: _lssm_lib_schema717.EntityScalarField;
|
|
52
|
+
storeId: _lssm_lib_schema717.EntityScalarField;
|
|
53
|
+
categoryId: _lssm_lib_schema717.EntityScalarField;
|
|
54
|
+
isPrimary: _lssm_lib_schema717.EntityScalarField;
|
|
55
|
+
createdAt: _lssm_lib_schema717.EntityScalarField;
|
|
56
|
+
store: _lssm_lib_schema717.EntityRelationField;
|
|
57
57
|
}>;
|
|
58
58
|
//#endregion
|
|
59
59
|
export { StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum };
|
package/dist/entities/store.js
CHANGED
|
@@ -1 +1,110 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineEntity, defineEntityEnum, field, index } from "../libs/schema/dist/entity/defineEntity.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/entities/store.ts
|
|
5
|
+
/**
|
|
6
|
+
* Store status enum.
|
|
7
|
+
*/
|
|
8
|
+
const StoreStatusEnum = defineEntityEnum({
|
|
9
|
+
name: "StoreStatus",
|
|
10
|
+
values: [
|
|
11
|
+
"PENDING",
|
|
12
|
+
"ACTIVE",
|
|
13
|
+
"SUSPENDED",
|
|
14
|
+
"CLOSED"
|
|
15
|
+
],
|
|
16
|
+
schema: "marketplace",
|
|
17
|
+
description: "Status of a store."
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Store type enum.
|
|
21
|
+
*/
|
|
22
|
+
const StoreTypeEnum = defineEntityEnum({
|
|
23
|
+
name: "StoreType",
|
|
24
|
+
values: [
|
|
25
|
+
"INDIVIDUAL",
|
|
26
|
+
"BUSINESS",
|
|
27
|
+
"ENTERPRISE"
|
|
28
|
+
],
|
|
29
|
+
schema: "marketplace",
|
|
30
|
+
description: "Type of store account."
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Store entity - a seller's storefront on the marketplace.
|
|
34
|
+
*/
|
|
35
|
+
const StoreEntity = defineEntity({
|
|
36
|
+
name: "Store",
|
|
37
|
+
description: "A seller storefront on the marketplace.",
|
|
38
|
+
schema: "marketplace",
|
|
39
|
+
map: "store",
|
|
40
|
+
fields: {
|
|
41
|
+
id: field.id({ description: "Unique store ID" }),
|
|
42
|
+
name: field.string({ description: "Store display name" }),
|
|
43
|
+
slug: field.string({ description: "URL-friendly identifier" }),
|
|
44
|
+
description: field.string({ isOptional: true }),
|
|
45
|
+
status: field.enum("StoreStatus", { default: "PENDING" }),
|
|
46
|
+
type: field.enum("StoreType", { default: "INDIVIDUAL" }),
|
|
47
|
+
ownerId: field.foreignKey({ description: "Store owner user ID" }),
|
|
48
|
+
organizationId: field.foreignKey({ isOptional: true }),
|
|
49
|
+
logoFileId: field.string({
|
|
50
|
+
isOptional: true,
|
|
51
|
+
description: "Logo file reference"
|
|
52
|
+
}),
|
|
53
|
+
bannerFileId: field.string({
|
|
54
|
+
isOptional: true,
|
|
55
|
+
description: "Banner file reference"
|
|
56
|
+
}),
|
|
57
|
+
email: field.string({ isOptional: true }),
|
|
58
|
+
phone: field.string({ isOptional: true }),
|
|
59
|
+
website: field.string({ isOptional: true }),
|
|
60
|
+
country: field.string({ isOptional: true }),
|
|
61
|
+
currency: field.string({ default: "\"USD\"" }),
|
|
62
|
+
timezone: field.string({ isOptional: true }),
|
|
63
|
+
commissionRate: field.decimal({
|
|
64
|
+
default: .1,
|
|
65
|
+
description: "Platform commission rate (e.g., 0.1 = 10%)"
|
|
66
|
+
}),
|
|
67
|
+
isVerified: field.boolean({ default: false }),
|
|
68
|
+
verifiedAt: field.dateTime({ isOptional: true }),
|
|
69
|
+
settings: field.json({ isOptional: true }),
|
|
70
|
+
metadata: field.json({ isOptional: true }),
|
|
71
|
+
totalProducts: field.int({ default: 0 }),
|
|
72
|
+
totalOrders: field.int({ default: 0 }),
|
|
73
|
+
totalRevenue: field.decimal({ default: 0 }),
|
|
74
|
+
averageRating: field.decimal({ default: 0 }),
|
|
75
|
+
createdAt: field.createdAt(),
|
|
76
|
+
updatedAt: field.updatedAt(),
|
|
77
|
+
products: field.hasMany("Product"),
|
|
78
|
+
orders: field.hasMany("Order"),
|
|
79
|
+
payouts: field.hasMany("Payout")
|
|
80
|
+
},
|
|
81
|
+
indexes: [
|
|
82
|
+
index.unique(["slug"]),
|
|
83
|
+
index.on(["ownerId"]),
|
|
84
|
+
index.on(["status"]),
|
|
85
|
+
index.on(["country", "status"]),
|
|
86
|
+
index.on(["averageRating"])
|
|
87
|
+
],
|
|
88
|
+
enums: [StoreStatusEnum, StoreTypeEnum]
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Store category entity - categorization for stores.
|
|
92
|
+
*/
|
|
93
|
+
const StoreCategoryEntity = defineEntity({
|
|
94
|
+
name: "StoreCategory",
|
|
95
|
+
description: "Category assignment for stores.",
|
|
96
|
+
schema: "marketplace",
|
|
97
|
+
map: "store_category",
|
|
98
|
+
fields: {
|
|
99
|
+
id: field.id(),
|
|
100
|
+
storeId: field.foreignKey(),
|
|
101
|
+
categoryId: field.foreignKey(),
|
|
102
|
+
isPrimary: field.boolean({ default: false }),
|
|
103
|
+
createdAt: field.createdAt(),
|
|
104
|
+
store: field.belongsTo("Store", ["storeId"], ["id"], { onDelete: "Cascade" })
|
|
105
|
+
},
|
|
106
|
+
indexes: [index.unique(["storeId", "categoryId"]), index.on(["categoryId"])]
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
export { StoreCategoryEntity, StoreEntity, StoreStatusEnum, StoreTypeEnum };
|
package/dist/example.js
CHANGED
|
@@ -1 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/example.ts
|
|
2
|
+
const example = {
|
|
3
|
+
id: "marketplace",
|
|
4
|
+
title: "Marketplace (2-sided)",
|
|
5
|
+
summary: "Two-sided marketplace with stores, products, orders, payouts, and reviews (multi-actor flows).",
|
|
6
|
+
tags: [
|
|
7
|
+
"marketplace",
|
|
8
|
+
"orders",
|
|
9
|
+
"payouts",
|
|
10
|
+
"reviews"
|
|
11
|
+
],
|
|
12
|
+
kind: "template",
|
|
13
|
+
visibility: "public",
|
|
14
|
+
docs: {
|
|
15
|
+
rootDocId: "docs.examples.marketplace",
|
|
16
|
+
goalDocId: "docs.examples.marketplace.goal",
|
|
17
|
+
usageDocId: "docs.examples.marketplace.usage",
|
|
18
|
+
constraintsDocId: "docs.examples.marketplace.constraints"
|
|
19
|
+
},
|
|
20
|
+
entrypoints: {
|
|
21
|
+
packageName: "@lssm/example.marketplace",
|
|
22
|
+
feature: "./feature",
|
|
23
|
+
contracts: "./contracts",
|
|
24
|
+
presentations: "./presentations",
|
|
25
|
+
handlers: "./handlers",
|
|
26
|
+
docs: "./docs"
|
|
27
|
+
},
|
|
28
|
+
surfaces: {
|
|
29
|
+
templates: true,
|
|
30
|
+
sandbox: {
|
|
31
|
+
enabled: true,
|
|
32
|
+
modes: [
|
|
33
|
+
"playground",
|
|
34
|
+
"specs",
|
|
35
|
+
"builder",
|
|
36
|
+
"markdown",
|
|
37
|
+
"evolution"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
studio: {
|
|
41
|
+
enabled: true,
|
|
42
|
+
installable: true
|
|
43
|
+
},
|
|
44
|
+
mcp: { enabled: true }
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var example_default = example;
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { example_default as default };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StoreStatusEnum } from "./store/store.enum.js";
|
|
2
|
+
import { CreateStoreInputModel, StoreModel } from "./store/store.schema.js";
|
|
3
|
+
import { CreateStoreContract } from "./store/store.contracts.js";
|
|
4
|
+
import { StoreCreatedEvent, StoreStatusChangedEvent } from "./store/store.event.js";
|
|
5
|
+
import "./store/index.js";
|
|
6
|
+
import { ProductStatusEnum } from "./product/product.enum.js";
|
|
7
|
+
import { CreateProductInputModel, ListProductsInputModel, ListProductsOutputModel, ProductModel } from "./product/product.schema.js";
|
|
8
|
+
import { CreateProductContract, ListProductsContract } from "./product/product.contracts.js";
|
|
9
|
+
import { InventoryUpdatedEvent, ProductCreatedEvent, ProductPublishedEvent } from "./product/product.event.js";
|
|
10
|
+
import "./product/index.js";
|
|
11
|
+
import { OrderStatusEnum } from "./order/order.enum.js";
|
|
12
|
+
import { CreateOrderInputModel, OrderItemModel, OrderModel, UpdateOrderStatusInputModel } from "./order/order.schema.js";
|
|
13
|
+
import { CreateOrderContract, UpdateOrderStatusContract } from "./order/order.contracts.js";
|
|
14
|
+
import { OrderCompletedEvent, OrderCreatedEvent, OrderPaidEvent, OrderShippedEvent, OrderStatusUpdatedEvent } from "./order/order.event.js";
|
|
15
|
+
import "./order/index.js";
|
|
16
|
+
import { PayoutStatusEnum } from "./payout/payout.enum.js";
|
|
17
|
+
import { ListPayoutsInputModel, ListPayoutsOutputModel, PayoutModel } from "./payout/payout.schema.js";
|
|
18
|
+
import { ListPayoutsContract } from "./payout/payout.contracts.js";
|
|
19
|
+
import { PayoutCreatedEvent, PayoutPaidEvent } from "./payout/payout.event.js";
|
|
20
|
+
import "./payout/index.js";
|
|
21
|
+
import { ReviewStatusEnum } from "./review/review.enum.js";
|
|
22
|
+
import { CreateReviewInputModel, ListReviewsInputModel, ListReviewsOutputModel, ReviewModel } from "./review/review.schema.js";
|
|
23
|
+
import { CreateReviewContract, ListReviewsContract } from "./review/review.contracts.js";
|
|
24
|
+
import { ReviewCreatedEvent, ReviewRespondedEvent } from "./review/review.event.js";
|
|
25
|
+
import "./review/index.js";
|
|
26
|
+
|
|
27
|
+
export { CreateOrderContract, CreateOrderInputModel, CreateProductContract, CreateProductInputModel, CreateReviewContract, CreateReviewInputModel, CreateStoreContract, CreateStoreInputModel, InventoryUpdatedEvent, ListPayoutsContract, ListPayoutsInputModel, ListPayoutsOutputModel, ListProductsContract, ListProductsInputModel, ListProductsOutputModel, ListReviewsContract, ListReviewsInputModel, ListReviewsOutputModel, OrderCompletedEvent, OrderCreatedEvent, OrderItemModel, OrderModel, OrderPaidEvent, OrderShippedEvent, OrderStatusEnum, OrderStatusUpdatedEvent, PayoutCreatedEvent, PayoutModel, PayoutPaidEvent, PayoutStatusEnum, ProductCreatedEvent, ProductModel, ProductPublishedEvent, ProductStatusEnum, ReviewCreatedEvent, ReviewModel, ReviewRespondedEvent, ReviewStatusEnum, StoreCreatedEvent, StoreModel, StoreStatusChangedEvent, StoreStatusEnum, UpdateOrderStatusContract, UpdateOrderStatusInputModel };
|
|
@@ -1 +1,88 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { StabilityEnum } from "../ownership.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../libs/contracts/dist/capabilities/openbanking.js
|
|
4
|
+
const OWNERS = ["platform.finance"];
|
|
5
|
+
const TAGS = ["open-banking", "finance"];
|
|
6
|
+
const openBankingAccountsReadCapability = {
|
|
7
|
+
meta: {
|
|
8
|
+
key: "openbanking.accounts.read",
|
|
9
|
+
version: 1,
|
|
10
|
+
kind: "integration",
|
|
11
|
+
title: "Open Banking Accounts (Read)",
|
|
12
|
+
description: "Provides read-only access to linked bank accounts, including account summaries and metadata.",
|
|
13
|
+
domain: "finance",
|
|
14
|
+
owners: [...OWNERS],
|
|
15
|
+
tags: [...TAGS],
|
|
16
|
+
stability: StabilityEnum.Experimental
|
|
17
|
+
},
|
|
18
|
+
provides: [
|
|
19
|
+
{
|
|
20
|
+
surface: "operation",
|
|
21
|
+
name: "openbanking.accounts.list",
|
|
22
|
+
version: 1,
|
|
23
|
+
description: "List bank accounts linked to a Powens open banking connection."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
surface: "operation",
|
|
27
|
+
name: "openbanking.accounts.get",
|
|
28
|
+
version: 1,
|
|
29
|
+
description: "Retrieve the canonical bank account record for a specific account."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
surface: "operation",
|
|
33
|
+
name: "openbanking.accounts.sync",
|
|
34
|
+
version: 1,
|
|
35
|
+
description: "Trigger a refresh of bank account metadata from the open banking provider."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
const openBankingTransactionsReadCapability = {
|
|
40
|
+
meta: {
|
|
41
|
+
key: "openbanking.transactions.read",
|
|
42
|
+
version: 1,
|
|
43
|
+
kind: "integration",
|
|
44
|
+
title: "Open Banking Transactions (Read)",
|
|
45
|
+
description: "Enables retrieval of transaction history for linked bank accounts via open banking providers.",
|
|
46
|
+
domain: "finance",
|
|
47
|
+
owners: [...OWNERS],
|
|
48
|
+
tags: [...TAGS, "transactions"],
|
|
49
|
+
stability: StabilityEnum.Experimental
|
|
50
|
+
},
|
|
51
|
+
provides: [{
|
|
52
|
+
surface: "operation",
|
|
53
|
+
name: "openbanking.transactions.list",
|
|
54
|
+
version: 1,
|
|
55
|
+
description: "List transactions for a given bank account with optional date filtering."
|
|
56
|
+
}, {
|
|
57
|
+
surface: "operation",
|
|
58
|
+
name: "openbanking.transactions.sync",
|
|
59
|
+
version: 1,
|
|
60
|
+
description: "Synchronise transactions from the open banking provider into the canonical ledger."
|
|
61
|
+
}]
|
|
62
|
+
};
|
|
63
|
+
const openBankingBalancesReadCapability = {
|
|
64
|
+
meta: {
|
|
65
|
+
key: "openbanking.balances.read",
|
|
66
|
+
version: 1,
|
|
67
|
+
kind: "integration",
|
|
68
|
+
title: "Open Banking Balances (Read)",
|
|
69
|
+
description: "Allows querying of current and available balances for linked bank accounts via open banking providers.",
|
|
70
|
+
domain: "finance",
|
|
71
|
+
owners: [...OWNERS],
|
|
72
|
+
tags: [...TAGS, "balances"],
|
|
73
|
+
stability: StabilityEnum.Experimental
|
|
74
|
+
},
|
|
75
|
+
provides: [{
|
|
76
|
+
surface: "operation",
|
|
77
|
+
name: "openbanking.balances.get",
|
|
78
|
+
version: 1,
|
|
79
|
+
description: "Retrieve the latest known balances for a specified bank account."
|
|
80
|
+
}, {
|
|
81
|
+
surface: "operation",
|
|
82
|
+
name: "openbanking.balances.refresh",
|
|
83
|
+
version: 1,
|
|
84
|
+
description: "Force a balance refresh from the open banking provider."
|
|
85
|
+
}]
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"../../presentations.v2.js";
|
|
1
|
+
import "../../presentations.v2.js";
|
|
2
|
+
import "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema } from "./schemas.js";
|
|
@@ -1 +1,60 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { StabilityEnum } from "../ownership.js";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
//#region ../../libs/contracts/dist/contract-registry/schemas.js
|
|
5
|
+
const ContractRegistryItemTypeSchema = z.enum([
|
|
6
|
+
"contractspec:operation",
|
|
7
|
+
"contractspec:event",
|
|
8
|
+
"contractspec:presentation",
|
|
9
|
+
"contractspec:form",
|
|
10
|
+
"contractspec:feature",
|
|
11
|
+
"contractspec:workflow",
|
|
12
|
+
"contractspec:template",
|
|
13
|
+
"contractspec:integration",
|
|
14
|
+
"contractspec:data-view",
|
|
15
|
+
"contractspec:migration",
|
|
16
|
+
"contractspec:telemetry",
|
|
17
|
+
"contractspec:experiment",
|
|
18
|
+
"contractspec:app-config",
|
|
19
|
+
"contractspec:knowledge"
|
|
20
|
+
]);
|
|
21
|
+
const ContractRegistryFileSchema = z.object({
|
|
22
|
+
path: z.string().min(1),
|
|
23
|
+
type: z.string().min(1),
|
|
24
|
+
content: z.string().optional()
|
|
25
|
+
});
|
|
26
|
+
const ContractRegistryItemSchema = z.object({
|
|
27
|
+
name: z.string().min(1),
|
|
28
|
+
type: ContractRegistryItemTypeSchema,
|
|
29
|
+
version: z.number().int().nonnegative(),
|
|
30
|
+
title: z.string().min(1),
|
|
31
|
+
description: z.string().min(1),
|
|
32
|
+
meta: z.object({
|
|
33
|
+
stability: z.enum([
|
|
34
|
+
StabilityEnum.Idea,
|
|
35
|
+
StabilityEnum.InCreation,
|
|
36
|
+
StabilityEnum.Experimental,
|
|
37
|
+
StabilityEnum.Beta,
|
|
38
|
+
StabilityEnum.Stable,
|
|
39
|
+
StabilityEnum.Deprecated
|
|
40
|
+
]),
|
|
41
|
+
owners: z.array(z.string().min(1)).default([]),
|
|
42
|
+
tags: z.array(z.string().min(1)).default([])
|
|
43
|
+
}),
|
|
44
|
+
dependencies: z.array(z.string().min(1)).optional(),
|
|
45
|
+
registryDependencies: z.array(z.string().min(1)).optional(),
|
|
46
|
+
files: z.array(ContractRegistryFileSchema).min(1),
|
|
47
|
+
schema: z.object({
|
|
48
|
+
input: z.unknown().optional(),
|
|
49
|
+
output: z.unknown().optional()
|
|
50
|
+
}).optional()
|
|
51
|
+
});
|
|
52
|
+
const ContractRegistryManifestSchema = z.object({
|
|
53
|
+
$schema: z.string().min(1).optional(),
|
|
54
|
+
name: z.string().min(1),
|
|
55
|
+
homepage: z.string().min(1).optional(),
|
|
56
|
+
items: z.array(ContractRegistryItemSchema)
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema };
|