@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.
Files changed (133) hide show
  1. package/dist/contracts/dist/capabilities/openbanking.js +88 -1
  2. package/dist/contracts/dist/client/index.js +5 -1
  3. package/dist/contracts/dist/client/react/feature-render.js +2 -1
  4. package/dist/contracts/dist/client/react/form-render.js +4 -1
  5. package/dist/contracts/dist/client/react/index.js +4 -1
  6. package/dist/contracts/dist/contract-registry/index.js +1 -1
  7. package/dist/contracts/dist/contract-registry/schemas.js +60 -1
  8. package/dist/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  9. package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  10. package/dist/contracts/dist/docs/index.js +29 -1
  11. package/dist/contracts/dist/docs/presentations.js +71 -1
  12. package/dist/contracts/dist/docs/registry.js +44 -1
  13. package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  14. package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  15. package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  16. package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  17. package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  18. package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  19. package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  20. package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  21. package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  22. package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  23. package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  24. package/dist/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  25. package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  26. package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  27. package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  28. package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  29. package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  30. package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  31. package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  32. package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  33. package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  34. package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  35. package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  36. package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  37. package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  38. package/dist/contracts/dist/events.js +10 -1
  39. package/dist/contracts/dist/experiments/evaluator.js +1 -1
  40. package/dist/contracts/dist/index.js +71 -1
  41. package/dist/contracts/dist/install.js +2 -1
  42. package/dist/contracts/dist/integrations/contracts.js +377 -1
  43. package/dist/contracts/dist/integrations/index.js +18 -1
  44. package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  45. package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  46. package/dist/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  47. package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  48. package/dist/contracts/dist/integrations/openbanking/models.js +242 -1
  49. package/dist/contracts/dist/integrations/openbanking/telemetry.js +13 -1
  50. package/dist/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  51. package/dist/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  52. package/dist/contracts/dist/integrations/providers/gmail.js +87 -1
  53. package/dist/contracts/dist/integrations/providers/google-calendar.js +66 -1
  54. package/dist/contracts/dist/integrations/providers/index.js +11 -1
  55. package/dist/contracts/dist/integrations/providers/mistral.js +68 -1
  56. package/dist/contracts/dist/integrations/providers/postmark.js +68 -1
  57. package/dist/contracts/dist/integrations/providers/powens.js +116 -1
  58. package/dist/contracts/dist/integrations/providers/qdrant.js +73 -1
  59. package/dist/contracts/dist/integrations/providers/registry.js +10 -1
  60. package/dist/contracts/dist/integrations/providers/stripe.js +83 -1
  61. package/dist/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  62. package/dist/contracts/dist/jsonschema.js +1 -1
  63. package/dist/contracts/dist/knowledge/contracts.js +306 -1
  64. package/dist/contracts/dist/knowledge/index.js +7 -1
  65. package/dist/contracts/dist/knowledge/spaces/email-threads.js +34 -1
  66. package/dist/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
  67. package/dist/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
  68. package/dist/contracts/dist/knowledge/spaces/index.js +6 -1
  69. package/dist/contracts/dist/knowledge/spaces/product-canon.js +34 -1
  70. package/dist/contracts/dist/knowledge/spaces/support-faq.js +37 -1
  71. package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
  72. package/dist/contracts/dist/llm/exporters.js +19 -1
  73. package/dist/contracts/dist/llm/index.js +2 -1
  74. package/dist/contracts/dist/llm/prompts.js +1 -1
  75. package/dist/contracts/dist/onboarding-base.js +196 -1
  76. package/dist/contracts/dist/openapi.js +1 -1
  77. package/dist/contracts/dist/ownership.js +21 -1
  78. package/dist/contracts/dist/presentations.js +1 -1
  79. package/dist/contracts/dist/presentations.v2.js +11 -1
  80. package/dist/contracts/dist/prompt.js +1 -1
  81. package/dist/contracts/dist/promptRegistry.js +1 -1
  82. package/dist/contracts/dist/regenerator/index.js +1 -1
  83. package/dist/contracts/dist/regenerator/service.js +6 -1
  84. package/dist/contracts/dist/registry.js +2 -1
  85. package/dist/contracts/dist/resources.js +1 -1
  86. package/dist/contracts/dist/schema/dist/EnumType.js +2 -1
  87. package/dist/contracts/dist/schema/dist/FieldType.js +49 -1
  88. package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  89. package/dist/contracts/dist/schema/dist/SchemaModel.js +34 -1
  90. package/dist/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  91. package/dist/contracts/dist/schema/dist/entity/index.js +2 -1
  92. package/dist/contracts/dist/schema/dist/entity/types.js +1 -1
  93. package/dist/contracts/dist/schema/dist/index.js +6 -1
  94. package/dist/contracts/dist/server/graphql-pothos.js +6 -1
  95. package/dist/contracts/dist/server/index.js +8 -1
  96. package/dist/contracts/dist/server/mcp/createMcpServer.js +4 -1
  97. package/dist/contracts/dist/server/mcp/registerPresentations.js +2 -1
  98. package/dist/contracts/dist/server/mcp/registerPrompts.js +1 -1
  99. package/dist/contracts/dist/server/mcp/registerResources.js +2 -1
  100. package/dist/contracts/dist/server/mcp/registerTools.js +1 -1
  101. package/dist/contracts/dist/server/provider-mcp.js +1 -1
  102. package/dist/contracts/dist/server/rest-elysia.js +1 -1
  103. package/dist/contracts/dist/server/rest-express.js +1 -1
  104. package/dist/contracts/dist/server/rest-generic.js +1 -1
  105. package/dist/contracts/dist/server/rest-next-app.js +1 -1
  106. package/dist/contracts/dist/server/rest-next-pages.js +1 -1
  107. package/dist/contracts/dist/spec.js +34 -1
  108. package/dist/contracts/dist/telemetry/index.js +1 -1
  109. package/dist/contracts/dist/telemetry/tracker.js +1 -1
  110. package/dist/contracts/dist/tests/index.js +1 -1
  111. package/dist/contracts/dist/tests/runner.js +2 -1
  112. package/dist/contracts/dist/workflow/index.js +1 -1
  113. package/dist/contracts/dist/workflow/runner.js +1 -1
  114. package/dist/contracts/index.d.ts +291 -291
  115. package/dist/contracts/index.js +858 -1
  116. package/dist/docs/files.docblock.js +22 -2
  117. package/dist/docs/index.js +1 -1
  118. package/dist/entities/index.d.ts +133 -133
  119. package/dist/entities/index.js +265 -1
  120. package/dist/events.d.ts +118 -118
  121. package/dist/events.js +343 -1
  122. package/dist/files.feature.js +124 -1
  123. package/dist/index.js +8 -1
  124. package/dist/schema/dist/EnumType.js +2 -1
  125. package/dist/schema/dist/FieldType.js +49 -1
  126. package/dist/schema/dist/ScalarTypeEnum.js +236 -1
  127. package/dist/schema/dist/SchemaModel.js +39 -1
  128. package/dist/schema/dist/entity/defineEntity.js +236 -1
  129. package/dist/schema/dist/entity/index.js +2 -1
  130. package/dist/schema/dist/entity/types.js +1 -1
  131. package/dist/schema/dist/index.js +6 -1
  132. package/dist/storage/index.js +268 -1
  133. package/package.json +5 -5
package/dist/events.js CHANGED
@@ -1 +1,343 @@
1
- import{l as e}from"./schema/dist/ScalarTypeEnum.js";import{n as t}from"./schema/dist/SchemaModel.js";import"./schema/dist/index.js";import{e as n}from"./contracts/dist/events.js";import"./contracts/dist/index.js";const r=t({name:`FileUploadedEventPayload`,description:`Payload when a file is uploaded`,fields:{fileId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},mimeType:{type:e.String_unsecure(),isOptional:!1},size:{type:e.Int_unsecure(),isOptional:!1},storageProvider:{type:e.String_unsecure(),isOptional:!1},ownerId:{type:e.String_unsecure(),isOptional:!1},orgId:{type:e.String_unsecure(),isOptional:!0},uploadedAt:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`FileUpdatedEventPayload`,description:`Payload when a file is updated`,fields:{fileId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},changes:{type:e.JSON(),isOptional:!1},updatedBy:{type:e.String_unsecure(),isOptional:!0},updatedAt:{type:e.DateTime(),isOptional:!1}}}),a=t({name:`FileDeletedEventPayload`,description:`Payload when a file is deleted`,fields:{fileId:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},storageProvider:{type:e.String_unsecure(),isOptional:!1},storagePath:{type:e.String_unsecure(),isOptional:!1},deletedBy:{type:e.String_unsecure(),isOptional:!0},deletedAt:{type:e.DateTime(),isOptional:!1}}}),o=t({name:`FileVersionCreatedEventPayload`,description:`Payload when a file version is created`,fields:{fileId:{type:e.String_unsecure(),isOptional:!1},versionId:{type:e.String_unsecure(),isOptional:!1},version:{type:e.Int_unsecure(),isOptional:!1},size:{type:e.Int_unsecure(),isOptional:!1},createdBy:{type:e.String_unsecure(),isOptional:!1},comment:{type:e.String_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),s=t({name:`AttachmentAttachedEventPayload`,description:`Payload when a file is attached to an entity`,fields:{attachmentId:{type:e.String_unsecure(),isOptional:!1},fileId:{type:e.String_unsecure(),isOptional:!1},entityType:{type:e.String_unsecure(),isOptional:!1},entityId:{type:e.String_unsecure(),isOptional:!1},attachmentType:{type:e.String_unsecure(),isOptional:!0},attachedBy:{type:e.String_unsecure(),isOptional:!1},attachedAt:{type:e.DateTime(),isOptional:!1}}}),c=t({name:`AttachmentDetachedEventPayload`,description:`Payload when a file is detached from an entity`,fields:{attachmentId:{type:e.String_unsecure(),isOptional:!1},fileId:{type:e.String_unsecure(),isOptional:!1},entityType:{type:e.String_unsecure(),isOptional:!1},entityId:{type:e.String_unsecure(),isOptional:!1},detachedBy:{type:e.String_unsecure(),isOptional:!0},detachedAt:{type:e.DateTime(),isOptional:!1}}}),l=t({name:`UploadSessionStartedEventPayload`,description:`Payload when an upload session starts`,fields:{sessionId:{type:e.String_unsecure(),isOptional:!1},fileName:{type:e.String_unsecure(),isOptional:!1},mimeType:{type:e.String_unsecure(),isOptional:!1},totalSize:{type:e.Int_unsecure(),isOptional:!1},ownerId:{type:e.String_unsecure(),isOptional:!1},startedAt:{type:e.DateTime(),isOptional:!1}}}),u=t({name:`UploadSessionCompletedEventPayload`,description:`Payload when an upload session completes`,fields:{sessionId:{type:e.String_unsecure(),isOptional:!1},fileId:{type:e.String_unsecure(),isOptional:!1},fileName:{type:e.String_unsecure(),isOptional:!1},size:{type:e.Int_unsecure(),isOptional:!1},completedAt:{type:e.DateTime(),isOptional:!1}}}),d=n({name:`file.uploaded`,version:1,description:`A file has been uploaded.`,payload:r}),f=n({name:`file.updated`,version:1,description:`A file has been updated.`,payload:i}),p=n({name:`file.deleted`,version:1,description:`A file has been deleted.`,payload:a}),m=n({name:`file.version_created`,version:1,description:`A new file version has been created.`,payload:o}),h=n({name:`attachment.attached`,version:1,description:`A file has been attached to an entity.`,payload:s}),g=n({name:`attachment.detached`,version:1,description:`A file has been detached from an entity.`,payload:c}),_=n({name:`upload.session_started`,version:1,description:`An upload session has started.`,payload:l}),v=n({name:`upload.session_completed`,version:1,description:`An upload session has completed.`,payload:u}),y={FileUploadedEvent:d,FileUpdatedEvent:f,FileDeletedEvent:p,FileVersionCreatedEvent:m,AttachmentAttachedEvent:h,AttachmentDetachedEvent:g,UploadSessionStartedEvent:_,UploadSessionCompletedEvent:v};export{h as AttachmentAttachedEvent,g as AttachmentDetachedEvent,p as FileDeletedEvent,y as FileEvents,f as FileUpdatedEvent,d as FileUploadedEvent,m as FileVersionCreatedEvent,v as UploadSessionCompletedEvent,_ as UploadSessionStartedEvent};
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 };
@@ -1 +1,124 @@
1
- const e={meta:{key:`files`,title:`File Management`,description:`File upload, versioning, and attachment management with presigned URLs`,domain:`platform`,owners:[`@platform.files`],tags:[`files`,`upload`,`attachments`,`storage`],stability:`stable`},operations:[{name:`file.upload`,version:1},{name:`file.update`,version:1},{name:`file.delete`,version:1},{name:`file.get`,version:1},{name:`file.list`,version:1},{name:`file.downloadUrl`,version:1},{name:`file.presignedUrl.create`,version:1},{name:`file.version.create`,version:1},{name:`file.version.list`,version:1},{name:`attachment.attach`,version:1},{name:`attachment.detach`,version:1},{name:`attachment.list`,version:1}],events:[{name:`file.uploaded`,version:1},{name:`file.updated`,version:1},{name:`file.deleted`,version:1},{name:`file.version_created`,version:1},{name:`attachment.attached`,version:1},{name:`attachment.detached`,version:1},{name:`upload.session_started`,version:1},{name:`upload.session_completed`,version:1}],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{provides:[{key:`files`,version:1},{key:`attachments`,version:1}],requires:[{key:`identity`,version:1}]}};export{e as FilesFeature};
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{AttachmentAttachedEvent as e,AttachmentDetachedEvent as t,FileDeletedEvent as n,FileEvents as r,FileUpdatedEvent as i,FileUploadedEvent as a,FileVersionCreatedEvent as o,UploadSessionCompletedEvent as s,UploadSessionStartedEvent as c}from"./events.js";import{FilesFeature as l}from"./files.feature.js";import{AttachmentEntity as u,FileEntity as d,FileStatusEnum as f,FileVersionEntity as p,StorageProviderEnum as m,UploadSessionEntity as h,fileEntities as g,filesSchemaContribution as _}from"./entities/index.js";import{AttachFileContract as v,AttachmentModel as y,CreatePresignedUrlContract as b,CreateVersionContract as x,DeleteFileContract as S,DetachFileContract as C,FileModel as w,FileVersionModel as T,GetDownloadUrlContract as E,GetFileContract as D,GetVersionsContract as O,ListAttachmentsContract as k,ListFilesContract as A,PresignedUrlModel as j,UpdateFileContract as M,UploadFileContract as N}from"./contracts/index.js";import{InMemoryStorageAdapter as P,LocalStorageAdapter as F,S3StorageAdapter as I,createStorageAdapter as L}from"./storage/index.js";import"./docs/index.js";export{v as AttachFileContract,e as AttachmentAttachedEvent,t as AttachmentDetachedEvent,u as AttachmentEntity,y as AttachmentModel,b as CreatePresignedUrlContract,x as CreateVersionContract,S as DeleteFileContract,C as DetachFileContract,n as FileDeletedEvent,d as FileEntity,r as FileEvents,w as FileModel,f as FileStatusEnum,i as FileUpdatedEvent,a as FileUploadedEvent,o as FileVersionCreatedEvent,p as FileVersionEntity,T as FileVersionModel,l as FilesFeature,E as GetDownloadUrlContract,D as GetFileContract,O as GetVersionsContract,P as InMemoryStorageAdapter,k as ListAttachmentsContract,A as ListFilesContract,F as LocalStorageAdapter,j as PresignedUrlModel,I as S3StorageAdapter,m as StorageProviderEnum,M as UpdateFileContract,N as UploadFileContract,s as UploadSessionCompletedEvent,h as UploadSessionEntity,c as UploadSessionStartedEvent,L as createStorageAdapter,g as fileEntities,_ as filesSchemaContribution};
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";import"graphql";
1
+ import "zod";
2
+ import "graphql";
@@ -1 +1,49 @@
1
- import"zod";import{GraphQLScalarType as e}from"graphql";var t=class extends e{zodSchema;jsonSchemaDef;constructor(e){super(e),this.zodSchema=e.zod,this.jsonSchemaDef=e.jsonSchema}getZod(){return this.zodSchema}getPothos(){return this}getJson(){return typeof this.jsonSchemaDef==`function`?this.jsonSchemaDef():this.jsonSchemaDef}getJsonSchemaDef(){return this.jsonSchemaDef}getJsonSchema(){let e=t=>{let n=typeof t==`function`?t():t;if(Array.isArray(n))return n.map(t=>e(t));if(n&&typeof n==`object`){let t={};for(let[r,i]of Object.entries(n))t[r]=e(i);return t}return n};return e(this.getJson())}};export{t};
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 };