@lssm/lib.files 0.0.0-canary-20251217052941 → 0.0.0-canary-20251217060433
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/index.d.ts +1139 -0
- package/dist/docs/files.docblock.d.ts +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/entities/index.d.ts +168 -0
- package/dist/events.d.ts +467 -0
- package/dist/files.feature.d.ts +11 -0
- package/dist/index.d.ts +6 -0
- package/dist/storage/index.d.ts +200 -0
- package/package.json +13 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as _lssm_lib_schema404 from "@lssm/lib.schema";
|
|
2
|
+
import { ModuleSchemaContribution } from "@lssm/lib.schema";
|
|
3
|
+
|
|
4
|
+
//#region src/entities/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Storage provider enum.
|
|
7
|
+
*/
|
|
8
|
+
declare const StorageProviderEnum: _lssm_lib_schema404.EntityEnumDef;
|
|
9
|
+
/**
|
|
10
|
+
* File status enum.
|
|
11
|
+
*/
|
|
12
|
+
declare const FileStatusEnum: _lssm_lib_schema404.EntityEnumDef;
|
|
13
|
+
/**
|
|
14
|
+
* File entity - represents an uploaded file.
|
|
15
|
+
*/
|
|
16
|
+
declare const FileEntity: _lssm_lib_schema404.EntitySpec<{
|
|
17
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
18
|
+
name: _lssm_lib_schema404.EntityScalarField;
|
|
19
|
+
mimeType: _lssm_lib_schema404.EntityScalarField;
|
|
20
|
+
size: _lssm_lib_schema404.EntityScalarField;
|
|
21
|
+
storageProvider: _lssm_lib_schema404.EntityEnumField;
|
|
22
|
+
storagePath: _lssm_lib_schema404.EntityScalarField;
|
|
23
|
+
storageKey: _lssm_lib_schema404.EntityScalarField;
|
|
24
|
+
checksum: _lssm_lib_schema404.EntityScalarField;
|
|
25
|
+
etag: _lssm_lib_schema404.EntityScalarField;
|
|
26
|
+
status: _lssm_lib_schema404.EntityEnumField;
|
|
27
|
+
isPublic: _lssm_lib_schema404.EntityScalarField;
|
|
28
|
+
expiresAt: _lssm_lib_schema404.EntityScalarField;
|
|
29
|
+
ownerId: _lssm_lib_schema404.EntityScalarField;
|
|
30
|
+
orgId: _lssm_lib_schema404.EntityScalarField;
|
|
31
|
+
metadata: _lssm_lib_schema404.EntityScalarField;
|
|
32
|
+
tags: _lssm_lib_schema404.EntityScalarField;
|
|
33
|
+
width: _lssm_lib_schema404.EntityScalarField;
|
|
34
|
+
height: _lssm_lib_schema404.EntityScalarField;
|
|
35
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
36
|
+
updatedAt: _lssm_lib_schema404.EntityScalarField;
|
|
37
|
+
versions: _lssm_lib_schema404.EntityRelationField;
|
|
38
|
+
attachments: _lssm_lib_schema404.EntityRelationField;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* FileVersion entity - version history for files.
|
|
42
|
+
*/
|
|
43
|
+
declare const FileVersionEntity: _lssm_lib_schema404.EntitySpec<{
|
|
44
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
45
|
+
fileId: _lssm_lib_schema404.EntityScalarField;
|
|
46
|
+
version: _lssm_lib_schema404.EntityScalarField;
|
|
47
|
+
size: _lssm_lib_schema404.EntityScalarField;
|
|
48
|
+
storagePath: _lssm_lib_schema404.EntityScalarField;
|
|
49
|
+
checksum: _lssm_lib_schema404.EntityScalarField;
|
|
50
|
+
comment: _lssm_lib_schema404.EntityScalarField;
|
|
51
|
+
changes: _lssm_lib_schema404.EntityScalarField;
|
|
52
|
+
createdBy: _lssm_lib_schema404.EntityScalarField;
|
|
53
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
54
|
+
file: _lssm_lib_schema404.EntityRelationField;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Attachment entity - polymorphic link between files and entities.
|
|
58
|
+
*/
|
|
59
|
+
declare const AttachmentEntity: _lssm_lib_schema404.EntitySpec<{
|
|
60
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
61
|
+
fileId: _lssm_lib_schema404.EntityScalarField;
|
|
62
|
+
entityType: _lssm_lib_schema404.EntityScalarField;
|
|
63
|
+
entityId: _lssm_lib_schema404.EntityScalarField;
|
|
64
|
+
attachmentType: _lssm_lib_schema404.EntityScalarField;
|
|
65
|
+
name: _lssm_lib_schema404.EntityScalarField;
|
|
66
|
+
description: _lssm_lib_schema404.EntityScalarField;
|
|
67
|
+
order: _lssm_lib_schema404.EntityScalarField;
|
|
68
|
+
metadata: _lssm_lib_schema404.EntityScalarField;
|
|
69
|
+
createdBy: _lssm_lib_schema404.EntityScalarField;
|
|
70
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
71
|
+
updatedAt: _lssm_lib_schema404.EntityScalarField;
|
|
72
|
+
file: _lssm_lib_schema404.EntityRelationField;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* UploadSession entity - tracks multipart uploads.
|
|
76
|
+
*/
|
|
77
|
+
declare const UploadSessionEntity: _lssm_lib_schema404.EntitySpec<{
|
|
78
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
79
|
+
fileName: _lssm_lib_schema404.EntityScalarField;
|
|
80
|
+
mimeType: _lssm_lib_schema404.EntityScalarField;
|
|
81
|
+
totalSize: _lssm_lib_schema404.EntityScalarField;
|
|
82
|
+
uploadId: _lssm_lib_schema404.EntityScalarField;
|
|
83
|
+
uploadedBytes: _lssm_lib_schema404.EntityScalarField;
|
|
84
|
+
uploadedParts: _lssm_lib_schema404.EntityScalarField;
|
|
85
|
+
status: _lssm_lib_schema404.EntityScalarField;
|
|
86
|
+
error: _lssm_lib_schema404.EntityScalarField;
|
|
87
|
+
fileId: _lssm_lib_schema404.EntityScalarField;
|
|
88
|
+
ownerId: _lssm_lib_schema404.EntityScalarField;
|
|
89
|
+
orgId: _lssm_lib_schema404.EntityScalarField;
|
|
90
|
+
expiresAt: _lssm_lib_schema404.EntityScalarField;
|
|
91
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
92
|
+
updatedAt: _lssm_lib_schema404.EntityScalarField;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* All file entities for schema composition.
|
|
96
|
+
*/
|
|
97
|
+
declare const fileEntities: (_lssm_lib_schema404.EntitySpec<{
|
|
98
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
99
|
+
name: _lssm_lib_schema404.EntityScalarField;
|
|
100
|
+
mimeType: _lssm_lib_schema404.EntityScalarField;
|
|
101
|
+
size: _lssm_lib_schema404.EntityScalarField;
|
|
102
|
+
storageProvider: _lssm_lib_schema404.EntityEnumField;
|
|
103
|
+
storagePath: _lssm_lib_schema404.EntityScalarField;
|
|
104
|
+
storageKey: _lssm_lib_schema404.EntityScalarField;
|
|
105
|
+
checksum: _lssm_lib_schema404.EntityScalarField;
|
|
106
|
+
etag: _lssm_lib_schema404.EntityScalarField;
|
|
107
|
+
status: _lssm_lib_schema404.EntityEnumField;
|
|
108
|
+
isPublic: _lssm_lib_schema404.EntityScalarField;
|
|
109
|
+
expiresAt: _lssm_lib_schema404.EntityScalarField;
|
|
110
|
+
ownerId: _lssm_lib_schema404.EntityScalarField;
|
|
111
|
+
orgId: _lssm_lib_schema404.EntityScalarField;
|
|
112
|
+
metadata: _lssm_lib_schema404.EntityScalarField;
|
|
113
|
+
tags: _lssm_lib_schema404.EntityScalarField;
|
|
114
|
+
width: _lssm_lib_schema404.EntityScalarField;
|
|
115
|
+
height: _lssm_lib_schema404.EntityScalarField;
|
|
116
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
117
|
+
updatedAt: _lssm_lib_schema404.EntityScalarField;
|
|
118
|
+
versions: _lssm_lib_schema404.EntityRelationField;
|
|
119
|
+
attachments: _lssm_lib_schema404.EntityRelationField;
|
|
120
|
+
}> | _lssm_lib_schema404.EntitySpec<{
|
|
121
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
122
|
+
fileId: _lssm_lib_schema404.EntityScalarField;
|
|
123
|
+
version: _lssm_lib_schema404.EntityScalarField;
|
|
124
|
+
size: _lssm_lib_schema404.EntityScalarField;
|
|
125
|
+
storagePath: _lssm_lib_schema404.EntityScalarField;
|
|
126
|
+
checksum: _lssm_lib_schema404.EntityScalarField;
|
|
127
|
+
comment: _lssm_lib_schema404.EntityScalarField;
|
|
128
|
+
changes: _lssm_lib_schema404.EntityScalarField;
|
|
129
|
+
createdBy: _lssm_lib_schema404.EntityScalarField;
|
|
130
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
131
|
+
file: _lssm_lib_schema404.EntityRelationField;
|
|
132
|
+
}> | _lssm_lib_schema404.EntitySpec<{
|
|
133
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
134
|
+
fileId: _lssm_lib_schema404.EntityScalarField;
|
|
135
|
+
entityType: _lssm_lib_schema404.EntityScalarField;
|
|
136
|
+
entityId: _lssm_lib_schema404.EntityScalarField;
|
|
137
|
+
attachmentType: _lssm_lib_schema404.EntityScalarField;
|
|
138
|
+
name: _lssm_lib_schema404.EntityScalarField;
|
|
139
|
+
description: _lssm_lib_schema404.EntityScalarField;
|
|
140
|
+
order: _lssm_lib_schema404.EntityScalarField;
|
|
141
|
+
metadata: _lssm_lib_schema404.EntityScalarField;
|
|
142
|
+
createdBy: _lssm_lib_schema404.EntityScalarField;
|
|
143
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
144
|
+
updatedAt: _lssm_lib_schema404.EntityScalarField;
|
|
145
|
+
file: _lssm_lib_schema404.EntityRelationField;
|
|
146
|
+
}> | _lssm_lib_schema404.EntitySpec<{
|
|
147
|
+
id: _lssm_lib_schema404.EntityScalarField;
|
|
148
|
+
fileName: _lssm_lib_schema404.EntityScalarField;
|
|
149
|
+
mimeType: _lssm_lib_schema404.EntityScalarField;
|
|
150
|
+
totalSize: _lssm_lib_schema404.EntityScalarField;
|
|
151
|
+
uploadId: _lssm_lib_schema404.EntityScalarField;
|
|
152
|
+
uploadedBytes: _lssm_lib_schema404.EntityScalarField;
|
|
153
|
+
uploadedParts: _lssm_lib_schema404.EntityScalarField;
|
|
154
|
+
status: _lssm_lib_schema404.EntityScalarField;
|
|
155
|
+
error: _lssm_lib_schema404.EntityScalarField;
|
|
156
|
+
fileId: _lssm_lib_schema404.EntityScalarField;
|
|
157
|
+
ownerId: _lssm_lib_schema404.EntityScalarField;
|
|
158
|
+
orgId: _lssm_lib_schema404.EntityScalarField;
|
|
159
|
+
expiresAt: _lssm_lib_schema404.EntityScalarField;
|
|
160
|
+
createdAt: _lssm_lib_schema404.EntityScalarField;
|
|
161
|
+
updatedAt: _lssm_lib_schema404.EntityScalarField;
|
|
162
|
+
}>)[];
|
|
163
|
+
/**
|
|
164
|
+
* Module schema contribution for files.
|
|
165
|
+
*/
|
|
166
|
+
declare const filesSchemaContribution: ModuleSchemaContribution;
|
|
167
|
+
//#endregion
|
|
168
|
+
export { AttachmentEntity, FileEntity, FileStatusEnum, FileVersionEntity, StorageProviderEnum, UploadSessionEntity, fileEntities, filesSchemaContribution };
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import * as _lssm_lib_schema0 from "@lssm/lib.schema";
|
|
2
|
+
import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/events.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Emitted when a file is uploaded.
|
|
7
|
+
*/
|
|
8
|
+
declare const FileUploadedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
9
|
+
fileId: {
|
|
10
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
mimeType: {
|
|
18
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
storageProvider: {
|
|
26
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
27
|
+
isOptional: false;
|
|
28
|
+
};
|
|
29
|
+
ownerId: {
|
|
30
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
orgId: {
|
|
34
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
35
|
+
isOptional: true;
|
|
36
|
+
};
|
|
37
|
+
uploadedAt: {
|
|
38
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
41
|
+
}>>;
|
|
42
|
+
/**
|
|
43
|
+
* Emitted when a file is updated.
|
|
44
|
+
*/
|
|
45
|
+
declare const FileUpdatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
46
|
+
fileId: {
|
|
47
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
name: {
|
|
51
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
changes: {
|
|
55
|
+
type: _lssm_lib_schema0.FieldType<unknown, unknown>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
updatedBy: {
|
|
59
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
60
|
+
isOptional: true;
|
|
61
|
+
};
|
|
62
|
+
updatedAt: {
|
|
63
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
64
|
+
isOptional: false;
|
|
65
|
+
};
|
|
66
|
+
}>>;
|
|
67
|
+
/**
|
|
68
|
+
* Emitted when a file is deleted.
|
|
69
|
+
*/
|
|
70
|
+
declare const FileDeletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
71
|
+
fileId: {
|
|
72
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
73
|
+
isOptional: false;
|
|
74
|
+
};
|
|
75
|
+
name: {
|
|
76
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
77
|
+
isOptional: false;
|
|
78
|
+
};
|
|
79
|
+
storageProvider: {
|
|
80
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
81
|
+
isOptional: false;
|
|
82
|
+
};
|
|
83
|
+
storagePath: {
|
|
84
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
85
|
+
isOptional: false;
|
|
86
|
+
};
|
|
87
|
+
deletedBy: {
|
|
88
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
89
|
+
isOptional: true;
|
|
90
|
+
};
|
|
91
|
+
deletedAt: {
|
|
92
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
93
|
+
isOptional: false;
|
|
94
|
+
};
|
|
95
|
+
}>>;
|
|
96
|
+
/**
|
|
97
|
+
* Emitted when a file version is created.
|
|
98
|
+
*/
|
|
99
|
+
declare const FileVersionCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
100
|
+
fileId: {
|
|
101
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
104
|
+
versionId: {
|
|
105
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
106
|
+
isOptional: false;
|
|
107
|
+
};
|
|
108
|
+
version: {
|
|
109
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
110
|
+
isOptional: false;
|
|
111
|
+
};
|
|
112
|
+
size: {
|
|
113
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
114
|
+
isOptional: false;
|
|
115
|
+
};
|
|
116
|
+
createdBy: {
|
|
117
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
118
|
+
isOptional: false;
|
|
119
|
+
};
|
|
120
|
+
comment: {
|
|
121
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
122
|
+
isOptional: true;
|
|
123
|
+
};
|
|
124
|
+
createdAt: {
|
|
125
|
+
type: _lssm_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: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
133
|
+
attachmentId: {
|
|
134
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
135
|
+
isOptional: false;
|
|
136
|
+
};
|
|
137
|
+
fileId: {
|
|
138
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
139
|
+
isOptional: false;
|
|
140
|
+
};
|
|
141
|
+
entityType: {
|
|
142
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
143
|
+
isOptional: false;
|
|
144
|
+
};
|
|
145
|
+
entityId: {
|
|
146
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
147
|
+
isOptional: false;
|
|
148
|
+
};
|
|
149
|
+
attachmentType: {
|
|
150
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
151
|
+
isOptional: true;
|
|
152
|
+
};
|
|
153
|
+
attachedBy: {
|
|
154
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
155
|
+
isOptional: false;
|
|
156
|
+
};
|
|
157
|
+
attachedAt: {
|
|
158
|
+
type: _lssm_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: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
166
|
+
attachmentId: {
|
|
167
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
168
|
+
isOptional: false;
|
|
169
|
+
};
|
|
170
|
+
fileId: {
|
|
171
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
172
|
+
isOptional: false;
|
|
173
|
+
};
|
|
174
|
+
entityType: {
|
|
175
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
176
|
+
isOptional: false;
|
|
177
|
+
};
|
|
178
|
+
entityId: {
|
|
179
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
180
|
+
isOptional: false;
|
|
181
|
+
};
|
|
182
|
+
detachedBy: {
|
|
183
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
184
|
+
isOptional: true;
|
|
185
|
+
};
|
|
186
|
+
detachedAt: {
|
|
187
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
188
|
+
isOptional: false;
|
|
189
|
+
};
|
|
190
|
+
}>>;
|
|
191
|
+
/**
|
|
192
|
+
* Emitted when an upload session starts.
|
|
193
|
+
*/
|
|
194
|
+
declare const UploadSessionStartedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
195
|
+
sessionId: {
|
|
196
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
197
|
+
isOptional: false;
|
|
198
|
+
};
|
|
199
|
+
fileName: {
|
|
200
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
201
|
+
isOptional: false;
|
|
202
|
+
};
|
|
203
|
+
mimeType: {
|
|
204
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
205
|
+
isOptional: false;
|
|
206
|
+
};
|
|
207
|
+
totalSize: {
|
|
208
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
209
|
+
isOptional: false;
|
|
210
|
+
};
|
|
211
|
+
ownerId: {
|
|
212
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
213
|
+
isOptional: false;
|
|
214
|
+
};
|
|
215
|
+
startedAt: {
|
|
216
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
217
|
+
isOptional: false;
|
|
218
|
+
};
|
|
219
|
+
}>>;
|
|
220
|
+
/**
|
|
221
|
+
* Emitted when an upload session completes.
|
|
222
|
+
*/
|
|
223
|
+
declare const UploadSessionCompletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
224
|
+
sessionId: {
|
|
225
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
226
|
+
isOptional: false;
|
|
227
|
+
};
|
|
228
|
+
fileId: {
|
|
229
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
230
|
+
isOptional: false;
|
|
231
|
+
};
|
|
232
|
+
fileName: {
|
|
233
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
234
|
+
isOptional: false;
|
|
235
|
+
};
|
|
236
|
+
size: {
|
|
237
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
238
|
+
isOptional: false;
|
|
239
|
+
};
|
|
240
|
+
completedAt: {
|
|
241
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
242
|
+
isOptional: false;
|
|
243
|
+
};
|
|
244
|
+
}>>;
|
|
245
|
+
/**
|
|
246
|
+
* All file events.
|
|
247
|
+
*/
|
|
248
|
+
declare const FileEvents: {
|
|
249
|
+
FileUploadedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
250
|
+
fileId: {
|
|
251
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
252
|
+
isOptional: false;
|
|
253
|
+
};
|
|
254
|
+
name: {
|
|
255
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
256
|
+
isOptional: false;
|
|
257
|
+
};
|
|
258
|
+
mimeType: {
|
|
259
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
260
|
+
isOptional: false;
|
|
261
|
+
};
|
|
262
|
+
size: {
|
|
263
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
264
|
+
isOptional: false;
|
|
265
|
+
};
|
|
266
|
+
storageProvider: {
|
|
267
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
268
|
+
isOptional: false;
|
|
269
|
+
};
|
|
270
|
+
ownerId: {
|
|
271
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
272
|
+
isOptional: false;
|
|
273
|
+
};
|
|
274
|
+
orgId: {
|
|
275
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
276
|
+
isOptional: true;
|
|
277
|
+
};
|
|
278
|
+
uploadedAt: {
|
|
279
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
280
|
+
isOptional: false;
|
|
281
|
+
};
|
|
282
|
+
}>>;
|
|
283
|
+
FileUpdatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
284
|
+
fileId: {
|
|
285
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
286
|
+
isOptional: false;
|
|
287
|
+
};
|
|
288
|
+
name: {
|
|
289
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
290
|
+
isOptional: false;
|
|
291
|
+
};
|
|
292
|
+
changes: {
|
|
293
|
+
type: _lssm_lib_schema0.FieldType<unknown, unknown>;
|
|
294
|
+
isOptional: false;
|
|
295
|
+
};
|
|
296
|
+
updatedBy: {
|
|
297
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
298
|
+
isOptional: true;
|
|
299
|
+
};
|
|
300
|
+
updatedAt: {
|
|
301
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
302
|
+
isOptional: false;
|
|
303
|
+
};
|
|
304
|
+
}>>;
|
|
305
|
+
FileDeletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
306
|
+
fileId: {
|
|
307
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
308
|
+
isOptional: false;
|
|
309
|
+
};
|
|
310
|
+
name: {
|
|
311
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
312
|
+
isOptional: false;
|
|
313
|
+
};
|
|
314
|
+
storageProvider: {
|
|
315
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
316
|
+
isOptional: false;
|
|
317
|
+
};
|
|
318
|
+
storagePath: {
|
|
319
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
320
|
+
isOptional: false;
|
|
321
|
+
};
|
|
322
|
+
deletedBy: {
|
|
323
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
324
|
+
isOptional: true;
|
|
325
|
+
};
|
|
326
|
+
deletedAt: {
|
|
327
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
328
|
+
isOptional: false;
|
|
329
|
+
};
|
|
330
|
+
}>>;
|
|
331
|
+
FileVersionCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
332
|
+
fileId: {
|
|
333
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
334
|
+
isOptional: false;
|
|
335
|
+
};
|
|
336
|
+
versionId: {
|
|
337
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
338
|
+
isOptional: false;
|
|
339
|
+
};
|
|
340
|
+
version: {
|
|
341
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
342
|
+
isOptional: false;
|
|
343
|
+
};
|
|
344
|
+
size: {
|
|
345
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
346
|
+
isOptional: false;
|
|
347
|
+
};
|
|
348
|
+
createdBy: {
|
|
349
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
350
|
+
isOptional: false;
|
|
351
|
+
};
|
|
352
|
+
comment: {
|
|
353
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
354
|
+
isOptional: true;
|
|
355
|
+
};
|
|
356
|
+
createdAt: {
|
|
357
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
358
|
+
isOptional: false;
|
|
359
|
+
};
|
|
360
|
+
}>>;
|
|
361
|
+
AttachmentAttachedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
362
|
+
attachmentId: {
|
|
363
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
364
|
+
isOptional: false;
|
|
365
|
+
};
|
|
366
|
+
fileId: {
|
|
367
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
368
|
+
isOptional: false;
|
|
369
|
+
};
|
|
370
|
+
entityType: {
|
|
371
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
372
|
+
isOptional: false;
|
|
373
|
+
};
|
|
374
|
+
entityId: {
|
|
375
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
376
|
+
isOptional: false;
|
|
377
|
+
};
|
|
378
|
+
attachmentType: {
|
|
379
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
380
|
+
isOptional: true;
|
|
381
|
+
};
|
|
382
|
+
attachedBy: {
|
|
383
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
384
|
+
isOptional: false;
|
|
385
|
+
};
|
|
386
|
+
attachedAt: {
|
|
387
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
388
|
+
isOptional: false;
|
|
389
|
+
};
|
|
390
|
+
}>>;
|
|
391
|
+
AttachmentDetachedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
392
|
+
attachmentId: {
|
|
393
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
394
|
+
isOptional: false;
|
|
395
|
+
};
|
|
396
|
+
fileId: {
|
|
397
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
398
|
+
isOptional: false;
|
|
399
|
+
};
|
|
400
|
+
entityType: {
|
|
401
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
402
|
+
isOptional: false;
|
|
403
|
+
};
|
|
404
|
+
entityId: {
|
|
405
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
406
|
+
isOptional: false;
|
|
407
|
+
};
|
|
408
|
+
detachedBy: {
|
|
409
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
410
|
+
isOptional: true;
|
|
411
|
+
};
|
|
412
|
+
detachedAt: {
|
|
413
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
414
|
+
isOptional: false;
|
|
415
|
+
};
|
|
416
|
+
}>>;
|
|
417
|
+
UploadSessionStartedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
418
|
+
sessionId: {
|
|
419
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
420
|
+
isOptional: false;
|
|
421
|
+
};
|
|
422
|
+
fileName: {
|
|
423
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
424
|
+
isOptional: false;
|
|
425
|
+
};
|
|
426
|
+
mimeType: {
|
|
427
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
428
|
+
isOptional: false;
|
|
429
|
+
};
|
|
430
|
+
totalSize: {
|
|
431
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
432
|
+
isOptional: false;
|
|
433
|
+
};
|
|
434
|
+
ownerId: {
|
|
435
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
436
|
+
isOptional: false;
|
|
437
|
+
};
|
|
438
|
+
startedAt: {
|
|
439
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
440
|
+
isOptional: false;
|
|
441
|
+
};
|
|
442
|
+
}>>;
|
|
443
|
+
UploadSessionCompletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
|
444
|
+
sessionId: {
|
|
445
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
446
|
+
isOptional: false;
|
|
447
|
+
};
|
|
448
|
+
fileId: {
|
|
449
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
450
|
+
isOptional: false;
|
|
451
|
+
};
|
|
452
|
+
fileName: {
|
|
453
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
454
|
+
isOptional: false;
|
|
455
|
+
};
|
|
456
|
+
size: {
|
|
457
|
+
type: _lssm_lib_schema0.FieldType<number, number>;
|
|
458
|
+
isOptional: false;
|
|
459
|
+
};
|
|
460
|
+
completedAt: {
|
|
461
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
462
|
+
isOptional: false;
|
|
463
|
+
};
|
|
464
|
+
}>>;
|
|
465
|
+
};
|
|
466
|
+
//#endregion
|
|
467
|
+
export { AttachmentAttachedEvent, AttachmentDetachedEvent, FileDeletedEvent, FileEvents, FileUpdatedEvent, FileUploadedEvent, FileVersionCreatedEvent, UploadSessionCompletedEvent, UploadSessionStartedEvent };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeatureModuleSpec } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/files.feature.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Files feature module that bundles file upload, versioning,
|
|
7
|
+
* and attachment management capabilities.
|
|
8
|
+
*/
|
|
9
|
+
declare const FilesFeature: FeatureModuleSpec;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FilesFeature };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AttachFileContract, AttachmentModel, CreatePresignedUrlContract, CreateVersionContract, DeleteFileContract, DetachFileContract, FileModel, FileVersionModel, GetDownloadUrlContract, GetFileContract, GetVersionsContract, ListAttachmentsContract, ListFilesContract, PresignedUrlModel, UpdateFileContract, UploadFileContract } from "./contracts/index.js";
|
|
2
|
+
import { AttachmentEntity, FileEntity, FileStatusEnum, FileVersionEntity, StorageProviderEnum, UploadSessionEntity, fileEntities, filesSchemaContribution } from "./entities/index.js";
|
|
3
|
+
import { AttachmentAttachedEvent, AttachmentDetachedEvent, FileDeletedEvent, FileEvents, FileUpdatedEvent, FileUploadedEvent, FileVersionCreatedEvent, UploadSessionCompletedEvent, UploadSessionStartedEvent } from "./events.js";
|
|
4
|
+
import { FilesFeature } from "./files.feature.js";
|
|
5
|
+
import { InMemoryStorageAdapter, ListOptions, ListResult, LocalStorageAdapter, LocalStorageOptions, PresignedDownloadOptions, PresignedUploadOptions, PresignedUrl, S3StorageAdapter, S3StorageOptions, StorageAdapter, StorageConfig, StorageFile, StorageProvider, UploadOptions, createStorageAdapter } from "./storage/index.js";
|
|
6
|
+
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, ListOptions, ListResult, LocalStorageAdapter, LocalStorageOptions, PresignedDownloadOptions, PresignedUploadOptions, PresignedUrl, PresignedUrlModel, S3StorageAdapter, S3StorageOptions, StorageAdapter, StorageConfig, StorageFile, StorageProvider, StorageProviderEnum, UpdateFileContract, UploadFileContract, UploadOptions, UploadSessionCompletedEvent, UploadSessionEntity, UploadSessionStartedEvent, createStorageAdapter, fileEntities, filesSchemaContribution };
|