@lssm/lib.files 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
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/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/contracts/dist/client/index.js +5 -1
- package/dist/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/contracts/dist/client/react/form-render.js +4 -1
- package/dist/contracts/dist/client/react/index.js +4 -1
- package/dist/contracts/dist/contract-registry/index.js +1 -1
- package/dist/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/contracts/dist/docs/index.js +29 -1
- package/dist/contracts/dist/docs/presentations.js +71 -1
- package/dist/contracts/dist/docs/registry.js +44 -1
- package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/contracts/dist/events.js +10 -1
- package/dist/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/contracts/dist/index.js +71 -1
- package/dist/contracts/dist/install.js +2 -1
- package/dist/contracts/dist/integrations/contracts.js +377 -1
- package/dist/contracts/dist/integrations/index.js +18 -1
- package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/contracts/dist/jsonschema.js +1 -1
- package/dist/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/contracts/dist/knowledge/index.js +7 -1
- package/dist/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/contracts/dist/llm/exporters.js +19 -1
- package/dist/contracts/dist/llm/index.js +2 -1
- package/dist/contracts/dist/llm/prompts.js +1 -1
- package/dist/contracts/dist/onboarding-base.js +196 -1
- package/dist/contracts/dist/openapi.js +1 -1
- package/dist/contracts/dist/ownership.js +21 -1
- package/dist/contracts/dist/presentations.js +1 -1
- package/dist/contracts/dist/presentations.v2.js +11 -1
- package/dist/contracts/dist/prompt.js +1 -1
- package/dist/contracts/dist/promptRegistry.js +1 -1
- package/dist/contracts/dist/regenerator/index.js +1 -1
- package/dist/contracts/dist/regenerator/service.js +6 -1
- package/dist/contracts/dist/registry.js +2 -1
- package/dist/contracts/dist/resources.js +1 -1
- package/dist/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/contracts/dist/schema/dist/SchemaModel.js +34 -1
- package/dist/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/contracts/dist/schema/dist/index.js +6 -1
- package/dist/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/contracts/dist/server/index.js +8 -1
- package/dist/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/contracts/dist/server/rest-express.js +1 -1
- package/dist/contracts/dist/server/rest-generic.js +1 -1
- package/dist/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/contracts/dist/spec.js +34 -1
- package/dist/contracts/dist/telemetry/index.js +1 -1
- package/dist/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/contracts/dist/tests/index.js +1 -1
- package/dist/contracts/dist/tests/runner.js +2 -1
- package/dist/contracts/dist/workflow/index.js +1 -1
- package/dist/contracts/dist/workflow/runner.js +1 -1
- package/dist/contracts/index.d.ts +291 -291
- package/dist/contracts/index.js +858 -1
- package/dist/docs/files.docblock.js +22 -2
- package/dist/docs/index.js +1 -1
- package/dist/entities/index.d.ts +133 -133
- package/dist/entities/index.js +265 -1
- package/dist/events.d.ts +118 -118
- package/dist/events.js +343 -1
- package/dist/files.feature.js +124 -1
- package/dist/index.js +8 -1
- package/dist/schema/dist/EnumType.js +2 -1
- package/dist/schema/dist/FieldType.js +49 -1
- package/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/schema/dist/entity/defineEntity.js +236 -1
- package/dist/schema/dist/entity/index.js +2 -1
- package/dist/schema/dist/entity/types.js +1 -1
- package/dist/schema/dist/index.js +6 -1
- package/dist/storage/index.js +268 -1
- package/package.json +5 -5
package/dist/events.js
CHANGED
|
@@ -1 +1,343 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "./schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { defineSchemaModel } from "./schema/dist/SchemaModel.js";
|
|
3
|
+
import "./schema/dist/index.js";
|
|
4
|
+
import { defineEvent } from "./contracts/dist/events.js";
|
|
5
|
+
import "./contracts/dist/index.js";
|
|
6
|
+
|
|
7
|
+
//#region src/events.ts
|
|
8
|
+
const FileUploadedPayload = defineSchemaModel({
|
|
9
|
+
name: "FileUploadedEventPayload",
|
|
10
|
+
description: "Payload when a file is uploaded",
|
|
11
|
+
fields: {
|
|
12
|
+
fileId: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
name: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
mimeType: {
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
+
isOptional: false
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
26
|
+
isOptional: false
|
|
27
|
+
},
|
|
28
|
+
storageProvider: {
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
+
isOptional: false
|
|
31
|
+
},
|
|
32
|
+
ownerId: {
|
|
33
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
34
|
+
isOptional: false
|
|
35
|
+
},
|
|
36
|
+
orgId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: true
|
|
39
|
+
},
|
|
40
|
+
uploadedAt: {
|
|
41
|
+
type: ScalarTypeEnum.DateTime(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const FileUpdatedPayload = defineSchemaModel({
|
|
47
|
+
name: "FileUpdatedEventPayload",
|
|
48
|
+
description: "Payload when a file is updated",
|
|
49
|
+
fields: {
|
|
50
|
+
fileId: {
|
|
51
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
52
|
+
isOptional: false
|
|
53
|
+
},
|
|
54
|
+
name: {
|
|
55
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
56
|
+
isOptional: false
|
|
57
|
+
},
|
|
58
|
+
changes: {
|
|
59
|
+
type: ScalarTypeEnum.JSON(),
|
|
60
|
+
isOptional: false
|
|
61
|
+
},
|
|
62
|
+
updatedBy: {
|
|
63
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
64
|
+
isOptional: true
|
|
65
|
+
},
|
|
66
|
+
updatedAt: {
|
|
67
|
+
type: ScalarTypeEnum.DateTime(),
|
|
68
|
+
isOptional: false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const FileDeletedPayload = defineSchemaModel({
|
|
73
|
+
name: "FileDeletedEventPayload",
|
|
74
|
+
description: "Payload when a file is deleted",
|
|
75
|
+
fields: {
|
|
76
|
+
fileId: {
|
|
77
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
78
|
+
isOptional: false
|
|
79
|
+
},
|
|
80
|
+
name: {
|
|
81
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
82
|
+
isOptional: false
|
|
83
|
+
},
|
|
84
|
+
storageProvider: {
|
|
85
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
+
isOptional: false
|
|
87
|
+
},
|
|
88
|
+
storagePath: {
|
|
89
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
90
|
+
isOptional: false
|
|
91
|
+
},
|
|
92
|
+
deletedBy: {
|
|
93
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
94
|
+
isOptional: true
|
|
95
|
+
},
|
|
96
|
+
deletedAt: {
|
|
97
|
+
type: ScalarTypeEnum.DateTime(),
|
|
98
|
+
isOptional: false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const FileVersionCreatedPayload = defineSchemaModel({
|
|
103
|
+
name: "FileVersionCreatedEventPayload",
|
|
104
|
+
description: "Payload when a file version is created",
|
|
105
|
+
fields: {
|
|
106
|
+
fileId: {
|
|
107
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
108
|
+
isOptional: false
|
|
109
|
+
},
|
|
110
|
+
versionId: {
|
|
111
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
112
|
+
isOptional: false
|
|
113
|
+
},
|
|
114
|
+
version: {
|
|
115
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
116
|
+
isOptional: false
|
|
117
|
+
},
|
|
118
|
+
size: {
|
|
119
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
120
|
+
isOptional: false
|
|
121
|
+
},
|
|
122
|
+
createdBy: {
|
|
123
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
124
|
+
isOptional: false
|
|
125
|
+
},
|
|
126
|
+
comment: {
|
|
127
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
128
|
+
isOptional: true
|
|
129
|
+
},
|
|
130
|
+
createdAt: {
|
|
131
|
+
type: ScalarTypeEnum.DateTime(),
|
|
132
|
+
isOptional: false
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
const AttachmentAttachedPayload = defineSchemaModel({
|
|
137
|
+
name: "AttachmentAttachedEventPayload",
|
|
138
|
+
description: "Payload when a file is attached to an entity",
|
|
139
|
+
fields: {
|
|
140
|
+
attachmentId: {
|
|
141
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
142
|
+
isOptional: false
|
|
143
|
+
},
|
|
144
|
+
fileId: {
|
|
145
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
146
|
+
isOptional: false
|
|
147
|
+
},
|
|
148
|
+
entityType: {
|
|
149
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
150
|
+
isOptional: false
|
|
151
|
+
},
|
|
152
|
+
entityId: {
|
|
153
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
154
|
+
isOptional: false
|
|
155
|
+
},
|
|
156
|
+
attachmentType: {
|
|
157
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
158
|
+
isOptional: true
|
|
159
|
+
},
|
|
160
|
+
attachedBy: {
|
|
161
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
162
|
+
isOptional: false
|
|
163
|
+
},
|
|
164
|
+
attachedAt: {
|
|
165
|
+
type: ScalarTypeEnum.DateTime(),
|
|
166
|
+
isOptional: false
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const AttachmentDetachedPayload = defineSchemaModel({
|
|
171
|
+
name: "AttachmentDetachedEventPayload",
|
|
172
|
+
description: "Payload when a file is detached from an entity",
|
|
173
|
+
fields: {
|
|
174
|
+
attachmentId: {
|
|
175
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
176
|
+
isOptional: false
|
|
177
|
+
},
|
|
178
|
+
fileId: {
|
|
179
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
180
|
+
isOptional: false
|
|
181
|
+
},
|
|
182
|
+
entityType: {
|
|
183
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
184
|
+
isOptional: false
|
|
185
|
+
},
|
|
186
|
+
entityId: {
|
|
187
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
188
|
+
isOptional: false
|
|
189
|
+
},
|
|
190
|
+
detachedBy: {
|
|
191
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
192
|
+
isOptional: true
|
|
193
|
+
},
|
|
194
|
+
detachedAt: {
|
|
195
|
+
type: ScalarTypeEnum.DateTime(),
|
|
196
|
+
isOptional: false
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
const UploadSessionStartedPayload = defineSchemaModel({
|
|
201
|
+
name: "UploadSessionStartedEventPayload",
|
|
202
|
+
description: "Payload when an upload session starts",
|
|
203
|
+
fields: {
|
|
204
|
+
sessionId: {
|
|
205
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
206
|
+
isOptional: false
|
|
207
|
+
},
|
|
208
|
+
fileName: {
|
|
209
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
210
|
+
isOptional: false
|
|
211
|
+
},
|
|
212
|
+
mimeType: {
|
|
213
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
214
|
+
isOptional: false
|
|
215
|
+
},
|
|
216
|
+
totalSize: {
|
|
217
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
218
|
+
isOptional: false
|
|
219
|
+
},
|
|
220
|
+
ownerId: {
|
|
221
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
222
|
+
isOptional: false
|
|
223
|
+
},
|
|
224
|
+
startedAt: {
|
|
225
|
+
type: ScalarTypeEnum.DateTime(),
|
|
226
|
+
isOptional: false
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
const UploadSessionCompletedPayload = defineSchemaModel({
|
|
231
|
+
name: "UploadSessionCompletedEventPayload",
|
|
232
|
+
description: "Payload when an upload session completes",
|
|
233
|
+
fields: {
|
|
234
|
+
sessionId: {
|
|
235
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
236
|
+
isOptional: false
|
|
237
|
+
},
|
|
238
|
+
fileId: {
|
|
239
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
240
|
+
isOptional: false
|
|
241
|
+
},
|
|
242
|
+
fileName: {
|
|
243
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
244
|
+
isOptional: false
|
|
245
|
+
},
|
|
246
|
+
size: {
|
|
247
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
248
|
+
isOptional: false
|
|
249
|
+
},
|
|
250
|
+
completedAt: {
|
|
251
|
+
type: ScalarTypeEnum.DateTime(),
|
|
252
|
+
isOptional: false
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
/**
|
|
257
|
+
* Emitted when a file is uploaded.
|
|
258
|
+
*/
|
|
259
|
+
const FileUploadedEvent = defineEvent({
|
|
260
|
+
name: "file.uploaded",
|
|
261
|
+
version: 1,
|
|
262
|
+
description: "A file has been uploaded.",
|
|
263
|
+
payload: FileUploadedPayload
|
|
264
|
+
});
|
|
265
|
+
/**
|
|
266
|
+
* Emitted when a file is updated.
|
|
267
|
+
*/
|
|
268
|
+
const FileUpdatedEvent = defineEvent({
|
|
269
|
+
name: "file.updated",
|
|
270
|
+
version: 1,
|
|
271
|
+
description: "A file has been updated.",
|
|
272
|
+
payload: FileUpdatedPayload
|
|
273
|
+
});
|
|
274
|
+
/**
|
|
275
|
+
* Emitted when a file is deleted.
|
|
276
|
+
*/
|
|
277
|
+
const FileDeletedEvent = defineEvent({
|
|
278
|
+
name: "file.deleted",
|
|
279
|
+
version: 1,
|
|
280
|
+
description: "A file has been deleted.",
|
|
281
|
+
payload: FileDeletedPayload
|
|
282
|
+
});
|
|
283
|
+
/**
|
|
284
|
+
* Emitted when a file version is created.
|
|
285
|
+
*/
|
|
286
|
+
const FileVersionCreatedEvent = defineEvent({
|
|
287
|
+
name: "file.version_created",
|
|
288
|
+
version: 1,
|
|
289
|
+
description: "A new file version has been created.",
|
|
290
|
+
payload: FileVersionCreatedPayload
|
|
291
|
+
});
|
|
292
|
+
/**
|
|
293
|
+
* Emitted when a file is attached to an entity.
|
|
294
|
+
*/
|
|
295
|
+
const AttachmentAttachedEvent = defineEvent({
|
|
296
|
+
name: "attachment.attached",
|
|
297
|
+
version: 1,
|
|
298
|
+
description: "A file has been attached to an entity.",
|
|
299
|
+
payload: AttachmentAttachedPayload
|
|
300
|
+
});
|
|
301
|
+
/**
|
|
302
|
+
* Emitted when a file is detached from an entity.
|
|
303
|
+
*/
|
|
304
|
+
const AttachmentDetachedEvent = defineEvent({
|
|
305
|
+
name: "attachment.detached",
|
|
306
|
+
version: 1,
|
|
307
|
+
description: "A file has been detached from an entity.",
|
|
308
|
+
payload: AttachmentDetachedPayload
|
|
309
|
+
});
|
|
310
|
+
/**
|
|
311
|
+
* Emitted when an upload session starts.
|
|
312
|
+
*/
|
|
313
|
+
const UploadSessionStartedEvent = defineEvent({
|
|
314
|
+
name: "upload.session_started",
|
|
315
|
+
version: 1,
|
|
316
|
+
description: "An upload session has started.",
|
|
317
|
+
payload: UploadSessionStartedPayload
|
|
318
|
+
});
|
|
319
|
+
/**
|
|
320
|
+
* Emitted when an upload session completes.
|
|
321
|
+
*/
|
|
322
|
+
const UploadSessionCompletedEvent = defineEvent({
|
|
323
|
+
name: "upload.session_completed",
|
|
324
|
+
version: 1,
|
|
325
|
+
description: "An upload session has completed.",
|
|
326
|
+
payload: UploadSessionCompletedPayload
|
|
327
|
+
});
|
|
328
|
+
/**
|
|
329
|
+
* All file events.
|
|
330
|
+
*/
|
|
331
|
+
const FileEvents = {
|
|
332
|
+
FileUploadedEvent,
|
|
333
|
+
FileUpdatedEvent,
|
|
334
|
+
FileDeletedEvent,
|
|
335
|
+
FileVersionCreatedEvent,
|
|
336
|
+
AttachmentAttachedEvent,
|
|
337
|
+
AttachmentDetachedEvent,
|
|
338
|
+
UploadSessionStartedEvent,
|
|
339
|
+
UploadSessionCompletedEvent
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
//#endregion
|
|
343
|
+
export { AttachmentAttachedEvent, AttachmentDetachedEvent, FileDeletedEvent, FileEvents, FileUpdatedEvent, FileUploadedEvent, FileVersionCreatedEvent, UploadSessionCompletedEvent, UploadSessionStartedEvent };
|
package/dist/files.feature.js
CHANGED
|
@@ -1 +1,124 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/files.feature.ts
|
|
2
|
+
/**
|
|
3
|
+
* Files feature module that bundles file upload, versioning,
|
|
4
|
+
* and attachment management capabilities.
|
|
5
|
+
*/
|
|
6
|
+
const FilesFeature = {
|
|
7
|
+
meta: {
|
|
8
|
+
key: "files",
|
|
9
|
+
title: "File Management",
|
|
10
|
+
description: "File upload, versioning, and attachment management with presigned URLs",
|
|
11
|
+
domain: "platform",
|
|
12
|
+
owners: ["@platform.files"],
|
|
13
|
+
tags: [
|
|
14
|
+
"files",
|
|
15
|
+
"upload",
|
|
16
|
+
"attachments",
|
|
17
|
+
"storage"
|
|
18
|
+
],
|
|
19
|
+
stability: "stable"
|
|
20
|
+
},
|
|
21
|
+
operations: [
|
|
22
|
+
{
|
|
23
|
+
name: "file.upload",
|
|
24
|
+
version: 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "file.update",
|
|
28
|
+
version: 1
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "file.delete",
|
|
32
|
+
version: 1
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "file.get",
|
|
36
|
+
version: 1
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "file.list",
|
|
40
|
+
version: 1
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "file.downloadUrl",
|
|
44
|
+
version: 1
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "file.presignedUrl.create",
|
|
48
|
+
version: 1
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "file.version.create",
|
|
52
|
+
version: 1
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "file.version.list",
|
|
56
|
+
version: 1
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "attachment.attach",
|
|
60
|
+
version: 1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "attachment.detach",
|
|
64
|
+
version: 1
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "attachment.list",
|
|
68
|
+
version: 1
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
events: [
|
|
72
|
+
{
|
|
73
|
+
name: "file.uploaded",
|
|
74
|
+
version: 1
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "file.updated",
|
|
78
|
+
version: 1
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "file.deleted",
|
|
82
|
+
version: 1
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "file.version_created",
|
|
86
|
+
version: 1
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "attachment.attached",
|
|
90
|
+
version: 1
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "attachment.detached",
|
|
94
|
+
version: 1
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "upload.session_started",
|
|
98
|
+
version: 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "upload.session_completed",
|
|
102
|
+
version: 1
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
presentations: [],
|
|
106
|
+
opToPresentation: [],
|
|
107
|
+
presentationsTargets: [],
|
|
108
|
+
capabilities: {
|
|
109
|
+
provides: [{
|
|
110
|
+
key: "files",
|
|
111
|
+
version: 1
|
|
112
|
+
}, {
|
|
113
|
+
key: "attachments",
|
|
114
|
+
version: 1
|
|
115
|
+
}],
|
|
116
|
+
requires: [{
|
|
117
|
+
key: "identity",
|
|
118
|
+
version: 1
|
|
119
|
+
}]
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
export { FilesFeature };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AttachmentAttachedEvent, AttachmentDetachedEvent, FileDeletedEvent, FileEvents, FileUpdatedEvent, FileUploadedEvent, FileVersionCreatedEvent, UploadSessionCompletedEvent, UploadSessionStartedEvent } from "./events.js";
|
|
2
|
+
import { FilesFeature } from "./files.feature.js";
|
|
3
|
+
import { AttachmentEntity, FileEntity, FileStatusEnum, FileVersionEntity, StorageProviderEnum, UploadSessionEntity, fileEntities, filesSchemaContribution } from "./entities/index.js";
|
|
4
|
+
import { AttachFileContract, AttachmentModel, CreatePresignedUrlContract, CreateVersionContract, DeleteFileContract, DetachFileContract, FileModel, FileVersionModel, GetDownloadUrlContract, GetFileContract, GetVersionsContract, ListAttachmentsContract, ListFilesContract, PresignedUrlModel, UpdateFileContract, UploadFileContract } from "./contracts/index.js";
|
|
5
|
+
import { InMemoryStorageAdapter, LocalStorageAdapter, S3StorageAdapter, createStorageAdapter } from "./storage/index.js";
|
|
6
|
+
import "./docs/index.js";
|
|
7
|
+
|
|
8
|
+
export { AttachFileContract, AttachmentAttachedEvent, AttachmentDetachedEvent, AttachmentEntity, AttachmentModel, CreatePresignedUrlContract, CreateVersionContract, DeleteFileContract, DetachFileContract, FileDeletedEvent, FileEntity, FileEvents, FileModel, FileStatusEnum, FileUpdatedEvent, FileUploadedEvent, FileVersionCreatedEvent, FileVersionEntity, FileVersionModel, FilesFeature, GetDownloadUrlContract, GetFileContract, GetVersionsContract, InMemoryStorageAdapter, ListAttachmentsContract, ListFilesContract, LocalStorageAdapter, PresignedUrlModel, S3StorageAdapter, StorageProviderEnum, UpdateFileContract, UploadFileContract, UploadSessionCompletedEvent, UploadSessionEntity, UploadSessionStartedEvent, createStorageAdapter, fileEntities, filesSchemaContribution };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"zod";
|
|
1
|
+
import "zod";
|
|
2
|
+
import "graphql";
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
import"zod";
|
|
1
|
+
import "zod";
|
|
2
|
+
import { GraphQLScalarType } from "graphql";
|
|
3
|
+
|
|
4
|
+
//#region ../schema/dist/FieldType.js
|
|
5
|
+
/**
|
|
6
|
+
* GraphQL scalar wrapper that carries zod and JSON Schema metadata.
|
|
7
|
+
*
|
|
8
|
+
* TInternal is the runtime representation; TExternal is the GraphQL output.
|
|
9
|
+
*/
|
|
10
|
+
var FieldType = class extends GraphQLScalarType {
|
|
11
|
+
zodSchema;
|
|
12
|
+
jsonSchemaDef;
|
|
13
|
+
constructor(config) {
|
|
14
|
+
super(config);
|
|
15
|
+
this.zodSchema = config.zod;
|
|
16
|
+
this.jsonSchemaDef = config.jsonSchema;
|
|
17
|
+
}
|
|
18
|
+
/** Return the attached zod schema for validation. */
|
|
19
|
+
getZod() {
|
|
20
|
+
return this.zodSchema;
|
|
21
|
+
}
|
|
22
|
+
/** GraphQL scalar instance usable by Pothos or vanilla GraphQL. */
|
|
23
|
+
getPothos() {
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
/** Return the JSON Schema (evaluates factory if provided). */
|
|
27
|
+
getJson() {
|
|
28
|
+
return typeof this.jsonSchemaDef === "function" ? this.jsonSchemaDef() : this.jsonSchemaDef;
|
|
29
|
+
}
|
|
30
|
+
getJsonSchemaDef() {
|
|
31
|
+
return this.jsonSchemaDef;
|
|
32
|
+
}
|
|
33
|
+
getJsonSchema() {
|
|
34
|
+
const deepResolve = (v) => {
|
|
35
|
+
const value = typeof v === "function" ? v() : v;
|
|
36
|
+
if (Array.isArray(value)) return value.map((item) => deepResolve(item));
|
|
37
|
+
if (value && typeof value === "object") {
|
|
38
|
+
const obj = {};
|
|
39
|
+
for (const [k, val] of Object.entries(value)) obj[k] = deepResolve(val);
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
};
|
|
44
|
+
return deepResolve(this.getJson());
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { FieldType };
|