@contractspec/lib.files 1.44.0

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.
@@ -0,0 +1,468 @@
1
+ import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
3
+
4
+ //#region src/events.d.ts
5
+ /**
6
+ * Emitted when a file is uploaded.
7
+ */
8
+ declare const FileUploadedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
9
+ fileId: {
10
+ type: _contractspec_lib_schema0.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ name: {
14
+ type: _contractspec_lib_schema0.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ mimeType: {
18
+ type: _contractspec_lib_schema0.FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ size: {
22
+ type: _contractspec_lib_schema0.FieldType<number, number>;
23
+ isOptional: false;
24
+ };
25
+ storageProvider: {
26
+ type: _contractspec_lib_schema0.FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ ownerId: {
30
+ type: _contractspec_lib_schema0.FieldType<string, string>;
31
+ isOptional: false;
32
+ };
33
+ orgId: {
34
+ type: _contractspec_lib_schema0.FieldType<string, string>;
35
+ isOptional: true;
36
+ };
37
+ uploadedAt: {
38
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
39
+ isOptional: false;
40
+ };
41
+ }>>;
42
+ /**
43
+ * Emitted when a file is updated.
44
+ */
45
+ declare const FileUpdatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
46
+ fileId: {
47
+ type: _contractspec_lib_schema0.FieldType<string, string>;
48
+ isOptional: false;
49
+ };
50
+ name: {
51
+ type: _contractspec_lib_schema0.FieldType<string, string>;
52
+ isOptional: false;
53
+ };
54
+ changes: {
55
+ type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
56
+ isOptional: false;
57
+ };
58
+ updatedBy: {
59
+ type: _contractspec_lib_schema0.FieldType<string, string>;
60
+ isOptional: true;
61
+ };
62
+ updatedAt: {
63
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
64
+ isOptional: false;
65
+ };
66
+ }>>;
67
+ /**
68
+ * Emitted when a file is deleted.
69
+ */
70
+ declare const FileDeletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
71
+ fileId: {
72
+ type: _contractspec_lib_schema0.FieldType<string, string>;
73
+ isOptional: false;
74
+ };
75
+ name: {
76
+ type: _contractspec_lib_schema0.FieldType<string, string>;
77
+ isOptional: false;
78
+ };
79
+ storageProvider: {
80
+ type: _contractspec_lib_schema0.FieldType<string, string>;
81
+ isOptional: false;
82
+ };
83
+ storagePath: {
84
+ type: _contractspec_lib_schema0.FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ deletedBy: {
88
+ type: _contractspec_lib_schema0.FieldType<string, string>;
89
+ isOptional: true;
90
+ };
91
+ deletedAt: {
92
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
93
+ isOptional: false;
94
+ };
95
+ }>>;
96
+ /**
97
+ * Emitted when a file version is created.
98
+ */
99
+ declare const FileVersionCreatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
100
+ fileId: {
101
+ type: _contractspec_lib_schema0.FieldType<string, string>;
102
+ isOptional: false;
103
+ };
104
+ versionId: {
105
+ type: _contractspec_lib_schema0.FieldType<string, string>;
106
+ isOptional: false;
107
+ };
108
+ version: {
109
+ type: _contractspec_lib_schema0.FieldType<number, number>;
110
+ isOptional: false;
111
+ };
112
+ size: {
113
+ type: _contractspec_lib_schema0.FieldType<number, number>;
114
+ isOptional: false;
115
+ };
116
+ createdBy: {
117
+ type: _contractspec_lib_schema0.FieldType<string, string>;
118
+ isOptional: false;
119
+ };
120
+ comment: {
121
+ type: _contractspec_lib_schema0.FieldType<string, string>;
122
+ isOptional: true;
123
+ };
124
+ createdAt: {
125
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
126
+ isOptional: false;
127
+ };
128
+ }>>;
129
+ /**
130
+ * Emitted when a file is attached to an entity.
131
+ */
132
+ declare const AttachmentAttachedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
133
+ attachmentId: {
134
+ type: _contractspec_lib_schema0.FieldType<string, string>;
135
+ isOptional: false;
136
+ };
137
+ fileId: {
138
+ type: _contractspec_lib_schema0.FieldType<string, string>;
139
+ isOptional: false;
140
+ };
141
+ entityType: {
142
+ type: _contractspec_lib_schema0.FieldType<string, string>;
143
+ isOptional: false;
144
+ };
145
+ entityId: {
146
+ type: _contractspec_lib_schema0.FieldType<string, string>;
147
+ isOptional: false;
148
+ };
149
+ attachmentType: {
150
+ type: _contractspec_lib_schema0.FieldType<string, string>;
151
+ isOptional: true;
152
+ };
153
+ attachedBy: {
154
+ type: _contractspec_lib_schema0.FieldType<string, string>;
155
+ isOptional: false;
156
+ };
157
+ attachedAt: {
158
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
159
+ isOptional: false;
160
+ };
161
+ }>>;
162
+ /**
163
+ * Emitted when a file is detached from an entity.
164
+ */
165
+ declare const AttachmentDetachedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
166
+ attachmentId: {
167
+ type: _contractspec_lib_schema0.FieldType<string, string>;
168
+ isOptional: false;
169
+ };
170
+ fileId: {
171
+ type: _contractspec_lib_schema0.FieldType<string, string>;
172
+ isOptional: false;
173
+ };
174
+ entityType: {
175
+ type: _contractspec_lib_schema0.FieldType<string, string>;
176
+ isOptional: false;
177
+ };
178
+ entityId: {
179
+ type: _contractspec_lib_schema0.FieldType<string, string>;
180
+ isOptional: false;
181
+ };
182
+ detachedBy: {
183
+ type: _contractspec_lib_schema0.FieldType<string, string>;
184
+ isOptional: true;
185
+ };
186
+ detachedAt: {
187
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
188
+ isOptional: false;
189
+ };
190
+ }>>;
191
+ /**
192
+ * Emitted when an upload session starts.
193
+ */
194
+ declare const UploadSessionStartedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
195
+ sessionId: {
196
+ type: _contractspec_lib_schema0.FieldType<string, string>;
197
+ isOptional: false;
198
+ };
199
+ fileName: {
200
+ type: _contractspec_lib_schema0.FieldType<string, string>;
201
+ isOptional: false;
202
+ };
203
+ mimeType: {
204
+ type: _contractspec_lib_schema0.FieldType<string, string>;
205
+ isOptional: false;
206
+ };
207
+ totalSize: {
208
+ type: _contractspec_lib_schema0.FieldType<number, number>;
209
+ isOptional: false;
210
+ };
211
+ ownerId: {
212
+ type: _contractspec_lib_schema0.FieldType<string, string>;
213
+ isOptional: false;
214
+ };
215
+ startedAt: {
216
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
217
+ isOptional: false;
218
+ };
219
+ }>>;
220
+ /**
221
+ * Emitted when an upload session completes.
222
+ */
223
+ declare const UploadSessionCompletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
224
+ sessionId: {
225
+ type: _contractspec_lib_schema0.FieldType<string, string>;
226
+ isOptional: false;
227
+ };
228
+ fileId: {
229
+ type: _contractspec_lib_schema0.FieldType<string, string>;
230
+ isOptional: false;
231
+ };
232
+ fileName: {
233
+ type: _contractspec_lib_schema0.FieldType<string, string>;
234
+ isOptional: false;
235
+ };
236
+ size: {
237
+ type: _contractspec_lib_schema0.FieldType<number, number>;
238
+ isOptional: false;
239
+ };
240
+ completedAt: {
241
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
242
+ isOptional: false;
243
+ };
244
+ }>>;
245
+ /**
246
+ * All file events.
247
+ */
248
+ declare const FileEvents: {
249
+ FileUploadedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
250
+ fileId: {
251
+ type: _contractspec_lib_schema0.FieldType<string, string>;
252
+ isOptional: false;
253
+ };
254
+ name: {
255
+ type: _contractspec_lib_schema0.FieldType<string, string>;
256
+ isOptional: false;
257
+ };
258
+ mimeType: {
259
+ type: _contractspec_lib_schema0.FieldType<string, string>;
260
+ isOptional: false;
261
+ };
262
+ size: {
263
+ type: _contractspec_lib_schema0.FieldType<number, number>;
264
+ isOptional: false;
265
+ };
266
+ storageProvider: {
267
+ type: _contractspec_lib_schema0.FieldType<string, string>;
268
+ isOptional: false;
269
+ };
270
+ ownerId: {
271
+ type: _contractspec_lib_schema0.FieldType<string, string>;
272
+ isOptional: false;
273
+ };
274
+ orgId: {
275
+ type: _contractspec_lib_schema0.FieldType<string, string>;
276
+ isOptional: true;
277
+ };
278
+ uploadedAt: {
279
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
280
+ isOptional: false;
281
+ };
282
+ }>>;
283
+ FileUpdatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
284
+ fileId: {
285
+ type: _contractspec_lib_schema0.FieldType<string, string>;
286
+ isOptional: false;
287
+ };
288
+ name: {
289
+ type: _contractspec_lib_schema0.FieldType<string, string>;
290
+ isOptional: false;
291
+ };
292
+ changes: {
293
+ type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
294
+ isOptional: false;
295
+ };
296
+ updatedBy: {
297
+ type: _contractspec_lib_schema0.FieldType<string, string>;
298
+ isOptional: true;
299
+ };
300
+ updatedAt: {
301
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
302
+ isOptional: false;
303
+ };
304
+ }>>;
305
+ FileDeletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
306
+ fileId: {
307
+ type: _contractspec_lib_schema0.FieldType<string, string>;
308
+ isOptional: false;
309
+ };
310
+ name: {
311
+ type: _contractspec_lib_schema0.FieldType<string, string>;
312
+ isOptional: false;
313
+ };
314
+ storageProvider: {
315
+ type: _contractspec_lib_schema0.FieldType<string, string>;
316
+ isOptional: false;
317
+ };
318
+ storagePath: {
319
+ type: _contractspec_lib_schema0.FieldType<string, string>;
320
+ isOptional: false;
321
+ };
322
+ deletedBy: {
323
+ type: _contractspec_lib_schema0.FieldType<string, string>;
324
+ isOptional: true;
325
+ };
326
+ deletedAt: {
327
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
328
+ isOptional: false;
329
+ };
330
+ }>>;
331
+ FileVersionCreatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
332
+ fileId: {
333
+ type: _contractspec_lib_schema0.FieldType<string, string>;
334
+ isOptional: false;
335
+ };
336
+ versionId: {
337
+ type: _contractspec_lib_schema0.FieldType<string, string>;
338
+ isOptional: false;
339
+ };
340
+ version: {
341
+ type: _contractspec_lib_schema0.FieldType<number, number>;
342
+ isOptional: false;
343
+ };
344
+ size: {
345
+ type: _contractspec_lib_schema0.FieldType<number, number>;
346
+ isOptional: false;
347
+ };
348
+ createdBy: {
349
+ type: _contractspec_lib_schema0.FieldType<string, string>;
350
+ isOptional: false;
351
+ };
352
+ comment: {
353
+ type: _contractspec_lib_schema0.FieldType<string, string>;
354
+ isOptional: true;
355
+ };
356
+ createdAt: {
357
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
358
+ isOptional: false;
359
+ };
360
+ }>>;
361
+ AttachmentAttachedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
362
+ attachmentId: {
363
+ type: _contractspec_lib_schema0.FieldType<string, string>;
364
+ isOptional: false;
365
+ };
366
+ fileId: {
367
+ type: _contractspec_lib_schema0.FieldType<string, string>;
368
+ isOptional: false;
369
+ };
370
+ entityType: {
371
+ type: _contractspec_lib_schema0.FieldType<string, string>;
372
+ isOptional: false;
373
+ };
374
+ entityId: {
375
+ type: _contractspec_lib_schema0.FieldType<string, string>;
376
+ isOptional: false;
377
+ };
378
+ attachmentType: {
379
+ type: _contractspec_lib_schema0.FieldType<string, string>;
380
+ isOptional: true;
381
+ };
382
+ attachedBy: {
383
+ type: _contractspec_lib_schema0.FieldType<string, string>;
384
+ isOptional: false;
385
+ };
386
+ attachedAt: {
387
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
388
+ isOptional: false;
389
+ };
390
+ }>>;
391
+ AttachmentDetachedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
392
+ attachmentId: {
393
+ type: _contractspec_lib_schema0.FieldType<string, string>;
394
+ isOptional: false;
395
+ };
396
+ fileId: {
397
+ type: _contractspec_lib_schema0.FieldType<string, string>;
398
+ isOptional: false;
399
+ };
400
+ entityType: {
401
+ type: _contractspec_lib_schema0.FieldType<string, string>;
402
+ isOptional: false;
403
+ };
404
+ entityId: {
405
+ type: _contractspec_lib_schema0.FieldType<string, string>;
406
+ isOptional: false;
407
+ };
408
+ detachedBy: {
409
+ type: _contractspec_lib_schema0.FieldType<string, string>;
410
+ isOptional: true;
411
+ };
412
+ detachedAt: {
413
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
414
+ isOptional: false;
415
+ };
416
+ }>>;
417
+ UploadSessionStartedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
418
+ sessionId: {
419
+ type: _contractspec_lib_schema0.FieldType<string, string>;
420
+ isOptional: false;
421
+ };
422
+ fileName: {
423
+ type: _contractspec_lib_schema0.FieldType<string, string>;
424
+ isOptional: false;
425
+ };
426
+ mimeType: {
427
+ type: _contractspec_lib_schema0.FieldType<string, string>;
428
+ isOptional: false;
429
+ };
430
+ totalSize: {
431
+ type: _contractspec_lib_schema0.FieldType<number, number>;
432
+ isOptional: false;
433
+ };
434
+ ownerId: {
435
+ type: _contractspec_lib_schema0.FieldType<string, string>;
436
+ isOptional: false;
437
+ };
438
+ startedAt: {
439
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
440
+ isOptional: false;
441
+ };
442
+ }>>;
443
+ UploadSessionCompletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
444
+ sessionId: {
445
+ type: _contractspec_lib_schema0.FieldType<string, string>;
446
+ isOptional: false;
447
+ };
448
+ fileId: {
449
+ type: _contractspec_lib_schema0.FieldType<string, string>;
450
+ isOptional: false;
451
+ };
452
+ fileName: {
453
+ type: _contractspec_lib_schema0.FieldType<string, string>;
454
+ isOptional: false;
455
+ };
456
+ size: {
457
+ type: _contractspec_lib_schema0.FieldType<number, number>;
458
+ isOptional: false;
459
+ };
460
+ completedAt: {
461
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
462
+ isOptional: false;
463
+ };
464
+ }>>;
465
+ };
466
+ //#endregion
467
+ export { AttachmentAttachedEvent, AttachmentDetachedEvent, FileDeletedEvent, FileEvents, FileUpdatedEvent, FileUploadedEvent, FileVersionCreatedEvent, UploadSessionCompletedEvent, UploadSessionStartedEvent };
468
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"sourcesContent":[],"mappings":";;;;;;;cA6Ha,mBAAiB,4BAAA,CAAA,oCAAA;EAAjB,MAAA,EAAA;IAUX,IAAA,EAAA,yBAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;EAV4B,CAAA;EAAA,IAAA,EAAA;IAejB,IAAA,qCAUX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;IAV2B,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAehB,CAAA;EAUX,KAAA,EAAA;;;;;;;;CAV2B,CAAA,CAAA;;AAe7B;;cA9Ba,kBAAgB,4BAAA,CAAA,oCAAA;;UAU3B,yBAAA,CAAA;;;;;;EAoBkC,CAAA;EAAA,OAAA,EAAA;IAevB,IAAA,qCAUX,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;EAVkC,CAAA;CAAA,CAAA,CAAA;AAepC;;;cA7Ca,kBAAgB,4BAAA,CAAA,oCAAA;;UAU3B,yBAAA,CAAA;;;;IAmCkC,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAevB,CAAA;EAUX,eAAA,EAAA;;;;;;;;EAVoC,SAAA,EAAA;IAAA,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAezB,UAAA,EAAA,IAAA;EAUX,CAAA;;;;;;;;;AAKW,cA3EA,uBAoFZ,EApFmC,4BAAA,CAAA,SAoFnC,2BApFmC,WAoFnC,CAAA;EAAA,MAAA,EAAA;UA1EC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,yBAAuB,4BAAA,CAAA,oCAAA;;UAUlC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,yBAAuB,4BAAA,CAAA,oCAAA;;UAUlC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,2BAAyB,4BAAA,CAAA,oCAAA;;UAUpC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,6BAA2B,4BAAA,CAAA,oCAAA;;UAUtC,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;cAKW;;;YASZ,yBAAA,CAAA"}