@23blocks/block-files 3.4.3 → 3.5.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.
- package/dist/index.esm.js +9 -1
- package/dist/src/lib/files.block.d.ts +26 -0
- package/dist/src/lib/files.block.d.ts.map +1 -1
- package/dist/src/lib/services/delegations.service.d.ts +36 -0
- package/dist/src/lib/services/delegations.service.d.ts.map +1 -1
- package/dist/src/lib/services/entity-files.service.d.ts +40 -0
- package/dist/src/lib/services/entity-files.service.d.ts.map +1 -1
- package/dist/src/lib/services/file-access-requests.service.d.ts +19 -0
- package/dist/src/lib/services/file-access-requests.service.d.ts.map +1 -1
- package/dist/src/lib/services/file-access.service.d.ts +46 -0
- package/dist/src/lib/services/file-access.service.d.ts.map +1 -1
- package/dist/src/lib/services/file-categories.service.d.ts +31 -0
- package/dist/src/lib/services/file-categories.service.d.ts.map +1 -1
- package/dist/src/lib/services/file-schemas.service.d.ts +31 -0
- package/dist/src/lib/services/file-schemas.service.d.ts.map +1 -1
- package/dist/src/lib/services/file-tags.service.d.ts +40 -0
- package/dist/src/lib/services/file-tags.service.d.ts.map +1 -1
- package/dist/src/lib/services/storage-files.service.d.ts +45 -0
- package/dist/src/lib/services/storage-files.service.d.ts.map +1 -1
- package/dist/src/lib/services/user-files.service.d.ts +194 -0
- package/dist/src/lib/services/user-files.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1156,7 +1156,15 @@ const fileAccessRequestMapper = {
|
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
1158
1158
|
|
|
1159
|
-
|
|
1159
|
+
/**
|
|
1160
|
+
* Create the Files block.
|
|
1161
|
+
*
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```typescript
|
|
1164
|
+
* const block = createFilesBlock(transport, { appId: 'xxx' });
|
|
1165
|
+
* const files = await block.storageFiles.list({ page: 1 });
|
|
1166
|
+
* ```
|
|
1167
|
+
*/ function createFilesBlock(transport, config) {
|
|
1160
1168
|
return {
|
|
1161
1169
|
storageFiles: createStorageFilesService(transport),
|
|
1162
1170
|
entityFiles: createEntityFilesService(transport),
|
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
import type { Transport, BlockConfig, BlockMetadata } from '@23blocks/contracts';
|
|
2
2
|
import { type StorageFilesService, type EntityFilesService, type FileSchemasService, type UserFilesService, type FileCategoriesService, type FileTagsService, type DelegationsService, type FileAccessService, type FileAccessRequestsService } from './services/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the Files block.
|
|
5
|
+
*/
|
|
3
6
|
export interface FilesBlockConfig extends BlockConfig {
|
|
7
|
+
/** Application ID */
|
|
4
8
|
appId: string;
|
|
9
|
+
/** Tenant ID (optional, for multi-tenant setups) */
|
|
5
10
|
tenantId?: string;
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* File storage and management block interface.
|
|
14
|
+
*/
|
|
7
15
|
export interface FilesBlock {
|
|
16
|
+
/** Storage file upload and download operations */
|
|
8
17
|
storageFiles: StorageFilesService;
|
|
18
|
+
/** Entity-associated file management */
|
|
9
19
|
entityFiles: EntityFilesService;
|
|
20
|
+
/** File schema definition management */
|
|
10
21
|
fileSchemas: FileSchemasService;
|
|
22
|
+
/** User-associated file management */
|
|
11
23
|
userFiles: UserFilesService;
|
|
24
|
+
/** File category management */
|
|
12
25
|
fileCategories: FileCategoriesService;
|
|
26
|
+
/** File tag management */
|
|
13
27
|
fileTags: FileTagsService;
|
|
28
|
+
/** File delegation management */
|
|
14
29
|
delegations: DelegationsService;
|
|
30
|
+
/** File access control management */
|
|
15
31
|
fileAccess: FileAccessService;
|
|
32
|
+
/** File access request management */
|
|
16
33
|
fileAccessRequests: FileAccessRequestsService;
|
|
17
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Create the Files block.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const block = createFilesBlock(transport, { appId: 'xxx' });
|
|
41
|
+
* const files = await block.storageFiles.list({ page: 1 });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
18
44
|
export declare function createFilesBlock(transport: Transport, config: FilesBlockConfig): FilesBlock;
|
|
19
45
|
export declare const filesBlockMetadata: BlockMetadata;
|
|
20
46
|
//# sourceMappingURL=files.block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.block.d.ts","sourceRoot":"","sources":["../../../src/lib/files.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAUL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,mBAAmB,CAAC;IAClC,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,cAAc,EAAE,qBAAqB,CAAC;IACtC,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC;IAChC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,GACvB,UAAU,CAYZ;AAED,eAAO,MAAM,kBAAkB,EAAE,aAehC,CAAC"}
|
|
1
|
+
{"version":3,"file":"files.block.d.ts","sourceRoot":"","sources":["../../../src/lib/files.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAUL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,YAAY,EAAE,mBAAmB,CAAC;IAClC,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAC;IAChC,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAC;IAChC,sCAAsC;IACtC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,+BAA+B;IAC/B,cAAc,EAAE,qBAAqB,CAAC;IACtC,0BAA0B;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,iCAAiC;IACjC,WAAW,EAAE,kBAAkB,CAAC;IAChC,qCAAqC;IACrC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,qCAAqC;IACrC,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,GACvB,UAAU,CAYZ;AAED,eAAO,MAAM,kBAAkB,EAAE,aAehC,CAAC"}
|
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FileDelegation, CreateFileDelegationRequest, UpdateFileDelegationRequest, ListFileDelegationsParams } from '../types/delegation.js';
|
|
3
3
|
export interface DelegationsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all file delegations for a user
|
|
6
|
+
* @param userUniqueId - The unique identifier of the delegating user
|
|
7
|
+
* @param params - Optional filtering and pagination parameters
|
|
8
|
+
* @returns Paginated result containing FileDelegation items and metadata
|
|
9
|
+
*/
|
|
4
10
|
list(userUniqueId: string, params?: ListFileDelegationsParams): Promise<PageResult<FileDelegation>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a specific file delegation
|
|
13
|
+
* @param userUniqueId - The unique identifier of the delegating user
|
|
14
|
+
* @param uniqueId - The unique identifier of the delegation
|
|
15
|
+
* @returns The matching FileDelegation record
|
|
16
|
+
*/
|
|
5
17
|
get(userUniqueId: string, uniqueId: string): Promise<FileDelegation>;
|
|
18
|
+
/**
|
|
19
|
+
* Create a new file delegation
|
|
20
|
+
* @param userUniqueId - The unique identifier of the delegating user
|
|
21
|
+
* @param data - Delegation details including delegatee, file/folder, and permissions
|
|
22
|
+
* @returns The newly created FileDelegation record
|
|
23
|
+
*/
|
|
6
24
|
create(userUniqueId: string, data: CreateFileDelegationRequest): Promise<FileDelegation>;
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing file delegation
|
|
27
|
+
* @param userUniqueId - The unique identifier of the delegating user
|
|
28
|
+
* @param uniqueId - The unique identifier of the delegation to update
|
|
29
|
+
* @param data - Fields to update such as permissions, expiration, or status
|
|
30
|
+
* @returns The updated FileDelegation record
|
|
31
|
+
*/
|
|
7
32
|
update(userUniqueId: string, uniqueId: string, data: UpdateFileDelegationRequest): Promise<FileDelegation>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete a file delegation
|
|
35
|
+
* @param userUniqueId - The unique identifier of the delegating user
|
|
36
|
+
* @param uniqueId - The unique identifier of the delegation to delete
|
|
37
|
+
* @returns Resolves when the delegation has been deleted
|
|
38
|
+
*/
|
|
8
39
|
delete(userUniqueId: string, uniqueId: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* List delegations received by a user from other users
|
|
42
|
+
* @param userUniqueId - The unique identifier of the receiving user
|
|
43
|
+
* @returns Array of FileDelegation records where this user is the delegatee
|
|
44
|
+
*/
|
|
9
45
|
listReceivedDelegations(userUniqueId: string): Promise<FileDelegation[]>;
|
|
10
46
|
}
|
|
11
47
|
export declare function createDelegationsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegations.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/delegations.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,cAAc,EACd,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"delegations.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/delegations.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,cAAc,EACd,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;IAEpG;;;;;OAKG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAErE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEzF;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3G;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;;;OAIG;IACH,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;CAC1E;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAwD7G"}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { EntityFile, AttachFileRequest, UpdateEntityFileRequest, ListEntityFilesParams, ReorderFilesRequest } from '../types/entity-file.js';
|
|
3
3
|
export interface EntityFilesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all entity-file associations
|
|
6
|
+
* @param params - Optional filtering by entity, file type, status, and pagination
|
|
7
|
+
* @returns Paginated result containing EntityFile items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListEntityFilesParams): Promise<PageResult<EntityFile>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific entity-file association
|
|
12
|
+
* @param uniqueId - The unique identifier of the entity-file record
|
|
13
|
+
* @returns The matching EntityFile record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<EntityFile>;
|
|
16
|
+
/**
|
|
17
|
+
* Attach a file to an entity
|
|
18
|
+
* @param data - Association details including entity and file identifiers
|
|
19
|
+
* @returns The newly created EntityFile association
|
|
20
|
+
*/
|
|
6
21
|
attach(data: AttachFileRequest): Promise<EntityFile>;
|
|
22
|
+
/**
|
|
23
|
+
* Detach a file from an entity
|
|
24
|
+
* @param uniqueId - The unique identifier of the entity-file record to remove
|
|
25
|
+
* @returns Resolves when the association has been removed
|
|
26
|
+
*/
|
|
7
27
|
detach(uniqueId: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Update an entity-file association
|
|
30
|
+
* @param uniqueId - The unique identifier of the entity-file record
|
|
31
|
+
* @param data - Fields to update such as display order or status
|
|
32
|
+
* @returns The updated EntityFile record
|
|
33
|
+
*/
|
|
8
34
|
update(uniqueId: string, data: UpdateEntityFileRequest): Promise<EntityFile>;
|
|
35
|
+
/**
|
|
36
|
+
* Reorder files attached to an entity
|
|
37
|
+
* @param entityUniqueId - The unique identifier of the parent entity
|
|
38
|
+
* @param entityType - The type of the parent entity
|
|
39
|
+
* @param data - The new ordering specification for attached files
|
|
40
|
+
* @returns Array of EntityFile records reflecting the new order
|
|
41
|
+
*/
|
|
9
42
|
reorder(entityUniqueId: string, entityType: string, data: ReorderFilesRequest): Promise<EntityFile[]>;
|
|
43
|
+
/**
|
|
44
|
+
* List files attached to a specific entity
|
|
45
|
+
* @param entityUniqueId - The unique identifier of the parent entity
|
|
46
|
+
* @param entityType - The type of the parent entity
|
|
47
|
+
* @param params - Optional filtering and pagination parameters
|
|
48
|
+
* @returns Paginated result of EntityFile records for the given entity
|
|
49
|
+
*/
|
|
10
50
|
listByEntity(entityUniqueId: string, entityType: string, params?: ListEntityFilesParams): Promise<PageResult<EntityFile>>;
|
|
11
51
|
}
|
|
12
52
|
export declare function createEntityFilesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/entity-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"entity-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/entity-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAEtE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAErD;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7E;;;;;;OAMG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEtG;;;;;;OAMG;IACH,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;CAC3H;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CA4E7G"}
|
|
@@ -6,34 +6,53 @@ import type { FileAccessRequest, CreateFileAccessRequestInput, ReviewFileAccessR
|
|
|
6
6
|
export interface FileAccessRequestsService {
|
|
7
7
|
/**
|
|
8
8
|
* List all access requests
|
|
9
|
+
* @param params - Optional filtering by file, requester, status, date range, and pagination
|
|
10
|
+
* @returns Paginated result containing FileAccessRequest items and metadata
|
|
9
11
|
*/
|
|
10
12
|
list(params?: ListFileAccessRequestsParams): Promise<PageResult<FileAccessRequest>>;
|
|
11
13
|
/**
|
|
12
14
|
* Get a specific access request
|
|
15
|
+
* @param uniqueId - The unique identifier of the access request
|
|
16
|
+
* @returns The matching FileAccessRequest record
|
|
13
17
|
*/
|
|
14
18
|
get(uniqueId: string): Promise<FileAccessRequest>;
|
|
15
19
|
/**
|
|
16
20
|
* Create a new access request
|
|
21
|
+
* @param data - Request details including file, access level, and optional message
|
|
22
|
+
* @returns The newly created FileAccessRequest record
|
|
17
23
|
*/
|
|
18
24
|
create(data: CreateFileAccessRequestInput): Promise<FileAccessRequest>;
|
|
19
25
|
/**
|
|
20
26
|
* Review (approve/reject) an access request
|
|
27
|
+
* @param uniqueId - The unique identifier of the access request to review
|
|
28
|
+
* @param decision - The review decision including approval/rejection and optional note
|
|
29
|
+
* @returns The updated FileAccessRequest record reflecting the review outcome
|
|
21
30
|
*/
|
|
22
31
|
review(uniqueId: string, decision: ReviewFileAccessRequestInput): Promise<FileAccessRequest>;
|
|
23
32
|
/**
|
|
24
33
|
* Cancel a pending access request
|
|
34
|
+
* @param uniqueId - The unique identifier of the access request to cancel
|
|
35
|
+
* @returns Resolves when the request has been cancelled
|
|
36
|
+
* @note Uses PUT instead of DELETE to transition request status
|
|
25
37
|
*/
|
|
26
38
|
cancel(uniqueId: string): Promise<void>;
|
|
27
39
|
/**
|
|
28
40
|
* List requests for a specific file (for file owners)
|
|
41
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
42
|
+
* @param params - Optional filtering and pagination parameters
|
|
43
|
+
* @returns Paginated result of FileAccessRequest records for the given file
|
|
29
44
|
*/
|
|
30
45
|
listByFile(fileUniqueId: string, params?: ListFileAccessRequestsParams): Promise<PageResult<FileAccessRequest>>;
|
|
31
46
|
/**
|
|
32
47
|
* List requests made by a specific user
|
|
48
|
+
* @param requesterUniqueId - The unique identifier of the requester
|
|
49
|
+
* @param params - Optional filtering and pagination parameters
|
|
50
|
+
* @returns Paginated result of FileAccessRequest records by the given requester
|
|
33
51
|
*/
|
|
34
52
|
listByRequester(requesterUniqueId: string, params?: ListFileAccessRequestsParams): Promise<PageResult<FileAccessRequest>>;
|
|
35
53
|
/**
|
|
36
54
|
* Get pending requests count for a file owner
|
|
55
|
+
* @returns The number of pending access requests
|
|
37
56
|
*/
|
|
38
57
|
getPendingCount(): Promise<number>;
|
|
39
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-access-requests.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-access-requests.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AAGzC;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC
|
|
1
|
+
{"version":3,"file":"file-access-requests.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-access-requests.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FileAccess, CreateFileAccessRequest, UpdateFileAccessRequest, ListFileAccessParams } from '../types/file-access.js';
|
|
3
3
|
export interface FileAccessService {
|
|
4
|
+
/**
|
|
5
|
+
* List all file access grants
|
|
6
|
+
* @param params - Optional filtering by file, grantee, access level, status, and pagination
|
|
7
|
+
* @returns Paginated result containing FileAccess items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListFileAccessParams): Promise<PageResult<FileAccess>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific file access grant
|
|
12
|
+
* @param uniqueId - The unique identifier of the access grant
|
|
13
|
+
* @returns The matching FileAccess record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<FileAccess>;
|
|
16
|
+
/**
|
|
17
|
+
* Grant file access to a grantee
|
|
18
|
+
* @param data - Access grant details including file, grantee, access level, and optional expiry
|
|
19
|
+
* @returns The newly created FileAccess record
|
|
20
|
+
*/
|
|
6
21
|
grant(data: CreateFileAccessRequest): Promise<FileAccess>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing file access grant
|
|
24
|
+
* @param uniqueId - The unique identifier of the access grant to update
|
|
25
|
+
* @param data - Fields to update such as access level, expiration, or status
|
|
26
|
+
* @returns The updated FileAccess record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateFileAccessRequest): Promise<FileAccess>;
|
|
29
|
+
/**
|
|
30
|
+
* Revoke a file access grant
|
|
31
|
+
* @param uniqueId - The unique identifier of the access grant to revoke
|
|
32
|
+
* @returns Resolves when the access grant has been revoked
|
|
33
|
+
*/
|
|
8
34
|
revoke(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* List all access grants for a specific file
|
|
37
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
38
|
+
* @param params - Optional filtering and pagination parameters
|
|
39
|
+
* @returns Paginated result of FileAccess records for the given file
|
|
40
|
+
*/
|
|
9
41
|
listByFile(fileUniqueId: string, params?: ListFileAccessParams): Promise<PageResult<FileAccess>>;
|
|
42
|
+
/**
|
|
43
|
+
* List all access grants for a specific grantee
|
|
44
|
+
* @param granteeUniqueId - The unique identifier of the grantee
|
|
45
|
+
* @param granteeType - The type of grantee (e.g., user, group)
|
|
46
|
+
* @param params - Optional filtering and pagination parameters
|
|
47
|
+
* @returns Paginated result of FileAccess records for the given grantee
|
|
48
|
+
*/
|
|
10
49
|
listByGrantee(granteeUniqueId: string, granteeType: string, params?: ListFileAccessParams): Promise<PageResult<FileAccess>>;
|
|
50
|
+
/**
|
|
51
|
+
* Check whether a grantee has access to a specific file
|
|
52
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
53
|
+
* @param granteeUniqueId - The unique identifier of the grantee
|
|
54
|
+
* @returns The FileAccess record if access exists, or null if no access is granted
|
|
55
|
+
* @note Returns null instead of throwing when no access record is found
|
|
56
|
+
*/
|
|
11
57
|
checkAccess(fileUniqueId: string, granteeUniqueId: string): Promise<FileAccess | null>;
|
|
12
58
|
}
|
|
13
59
|
export declare function createFileAccessService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-access.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-access.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"file-access.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-access.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU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@@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FileCategory, CreateFileCategoryRequest, UpdateFileCategoryRequest, ListFileCategoriesParams } from '../types/file-category.js';
|
|
3
3
|
export interface FileCategoriesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all file categories
|
|
6
|
+
* @param params - Optional filtering by parent, status, search term, and pagination
|
|
7
|
+
* @returns Paginated result containing FileCategory items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListFileCategoriesParams): Promise<PageResult<FileCategory>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific file category
|
|
12
|
+
* @param uniqueId - The unique identifier of the category
|
|
13
|
+
* @returns The matching FileCategory record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<FileCategory>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new file category
|
|
18
|
+
* @param data - Category details including code, name, and optional parent
|
|
19
|
+
* @returns The newly created FileCategory record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateFileCategoryRequest): Promise<FileCategory>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing file category
|
|
24
|
+
* @param uniqueId - The unique identifier of the category to update
|
|
25
|
+
* @param data - Fields to update such as name, description, or parent
|
|
26
|
+
* @returns The updated FileCategory record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateFileCategoryRequest): Promise<FileCategory>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a file category
|
|
31
|
+
* @param uniqueId - The unique identifier of the category to delete
|
|
32
|
+
* @returns Resolves when the category has been deleted
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* List child categories of a parent category
|
|
37
|
+
* @param parentUniqueId - The unique identifier of the parent category
|
|
38
|
+
* @returns Array of FileCategory records that are children of the given parent
|
|
39
|
+
*/
|
|
9
40
|
listChildren(parentUniqueId: string): Promise<FileCategory[]>;
|
|
10
41
|
}
|
|
11
42
|
export declare function createFileCategoriesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-categories.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-categories.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,MAAM,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"file-categories.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-categories.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE3E;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEjF;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC/D;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,CA8DnH"}
|
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FileSchema, CreateFileSchemaRequest, UpdateFileSchemaRequest, ListFileSchemasParams } from '../types/file-schema.js';
|
|
3
3
|
export interface FileSchemasService {
|
|
4
|
+
/**
|
|
5
|
+
* List all file schemas
|
|
6
|
+
* @param params - Optional filtering by status, search term, and pagination
|
|
7
|
+
* @returns Paginated result containing FileSchema items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListFileSchemasParams): Promise<PageResult<FileSchema>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific file schema by unique identifier
|
|
12
|
+
* @param uniqueId - The unique identifier of the file schema
|
|
13
|
+
* @returns The matching FileSchema record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<FileSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* Get a file schema by its code
|
|
18
|
+
* @param code - The unique code identifying the file schema
|
|
19
|
+
* @returns The matching FileSchema record
|
|
20
|
+
*/
|
|
6
21
|
getByCode(code: string): Promise<FileSchema>;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new file schema
|
|
24
|
+
* @param data - Schema details including code, name, MIME types, and file size constraints
|
|
25
|
+
* @returns The newly created FileSchema record
|
|
26
|
+
*/
|
|
7
27
|
create(data: CreateFileSchemaRequest): Promise<FileSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Update an existing file schema
|
|
30
|
+
* @param uniqueId - The unique identifier of the schema to update
|
|
31
|
+
* @param data - Fields to update such as name, allowed MIME types, or constraints
|
|
32
|
+
* @returns The updated FileSchema record
|
|
33
|
+
*/
|
|
8
34
|
update(uniqueId: string, data: UpdateFileSchemaRequest): Promise<FileSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete a file schema
|
|
37
|
+
* @param uniqueId - The unique identifier of the schema to delete
|
|
38
|
+
* @returns Resolves when the schema has been deleted
|
|
39
|
+
*/
|
|
9
40
|
delete(uniqueId: string): Promise<void>;
|
|
10
41
|
}
|
|
11
42
|
export declare function createFileSchemasService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-schemas.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-schemas.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"file-schemas.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-schemas.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAEtE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3C;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7E;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CA6D7G"}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FileTag, CreateFileTagRequest, UpdateFileTagRequest, ListFileTagsParams } from '../types/file-tag.js';
|
|
3
3
|
export interface FileTagsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all file tags
|
|
6
|
+
* @param params - Optional filtering by status, search term, and pagination
|
|
7
|
+
* @returns Paginated result containing FileTag items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListFileTagsParams): Promise<PageResult<FileTag>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific file tag
|
|
12
|
+
* @param uniqueId - The unique identifier of the tag
|
|
13
|
+
* @returns The matching FileTag record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<FileTag>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new file tag
|
|
18
|
+
* @param data - Tag details including code, name, and optional color/icon
|
|
19
|
+
* @returns The newly created FileTag record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateFileTagRequest): Promise<FileTag>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing file tag
|
|
24
|
+
* @param uniqueId - The unique identifier of the tag to update
|
|
25
|
+
* @param data - Fields to update such as name, color, or icon
|
|
26
|
+
* @returns The updated FileTag record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateFileTagRequest): Promise<FileTag>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a file tag
|
|
31
|
+
* @param uniqueId - The unique identifier of the tag to delete
|
|
32
|
+
* @returns Resolves when the tag has been deleted
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Add a tag to a user's file
|
|
37
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
38
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
39
|
+
* @param tagUniqueId - The unique identifier of the tag to add
|
|
40
|
+
* @returns Resolves when the tag has been added to the file
|
|
41
|
+
*/
|
|
9
42
|
addToFile(userUniqueId: string, fileUniqueId: string, tagUniqueId: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Remove a tag from a user's file
|
|
45
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
46
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
47
|
+
* @param tagUniqueId - The unique identifier of the tag to remove
|
|
48
|
+
* @returns Resolves when the tag has been removed from the file
|
|
49
|
+
*/
|
|
10
50
|
removeFromFile(userUniqueId: string, fileUniqueId: string, tagUniqueId: string): Promise<void>;
|
|
11
51
|
}
|
|
12
52
|
export declare function createFileTagsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-tags.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/file-tags.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,eAAe;IAC9B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AK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CA8DvG"}
|
|
@@ -1,13 +1,58 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { StorageFile, CreateStorageFileRequest, UpdateStorageFileRequest, ListStorageFilesParams, UploadFileRequest } from '../types/storage-file.js';
|
|
3
3
|
export interface StorageFilesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all storage files
|
|
6
|
+
* @param params - Optional filtering by owner, file/MIME type, status, and pagination
|
|
7
|
+
* @returns Paginated result containing StorageFile items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListStorageFilesParams): Promise<PageResult<StorageFile>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific storage file
|
|
12
|
+
* @param uniqueId - The unique identifier of the storage file
|
|
13
|
+
* @returns The matching StorageFile record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<StorageFile>;
|
|
16
|
+
/**
|
|
17
|
+
* Upload a file using multipart form data
|
|
18
|
+
* @param data - Upload payload including the File object, owner info, and optional processing flags
|
|
19
|
+
* @returns The newly created StorageFile record
|
|
20
|
+
* @note Sends the request as multipart/form-data with the file binary
|
|
21
|
+
*/
|
|
6
22
|
upload(data: UploadFileRequest): Promise<StorageFile>;
|
|
23
|
+
/**
|
|
24
|
+
* Create a storage file record from metadata (without binary upload)
|
|
25
|
+
* @param data - File metadata including owner, name, type, size, and content URL
|
|
26
|
+
* @returns The newly created StorageFile record
|
|
27
|
+
* @note Use this when the file binary is already hosted externally
|
|
28
|
+
*/
|
|
7
29
|
create(data: CreateStorageFileRequest): Promise<StorageFile>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an existing storage file record
|
|
32
|
+
* @param uniqueId - The unique identifier of the storage file to update
|
|
33
|
+
* @param data - Fields to update such as file name, URLs, or status
|
|
34
|
+
* @returns The updated StorageFile record
|
|
35
|
+
*/
|
|
8
36
|
update(uniqueId: string, data: UpdateStorageFileRequest): Promise<StorageFile>;
|
|
37
|
+
/**
|
|
38
|
+
* Delete a storage file
|
|
39
|
+
* @param uniqueId - The unique identifier of the storage file to delete
|
|
40
|
+
* @returns Resolves when the file has been deleted
|
|
41
|
+
*/
|
|
9
42
|
delete(uniqueId: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Download a storage file as a binary Blob
|
|
45
|
+
* @param uniqueId - The unique identifier of the storage file to download
|
|
46
|
+
* @returns The file contents as a Blob
|
|
47
|
+
*/
|
|
10
48
|
download(uniqueId: string): Promise<Blob>;
|
|
49
|
+
/**
|
|
50
|
+
* List storage files belonging to a specific owner
|
|
51
|
+
* @param ownerUniqueId - The unique identifier of the owner
|
|
52
|
+
* @param ownerType - The type of owner entity
|
|
53
|
+
* @param params - Optional filtering and pagination parameters
|
|
54
|
+
* @returns Paginated result of StorageFile records for the given owner
|
|
55
|
+
*/
|
|
11
56
|
listByOwner(ownerUniqueId: string, ownerType: string, params?: ListStorageFilesParams): Promise<PageResult<StorageFile>>;
|
|
12
57
|
}
|
|
13
58
|
export declare function createStorageFilesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/storage-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"storage-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/storage-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EA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
import type { UserFile, ListUserFilesParams, AddUserFileRequest, UpdateUserFileRequest, PresignUploadRequest, PresignUploadResponse, MultipartPresignRequest, MultipartPresignResponse, MultipartCompleteRequest, FileAccess, FileAccessRequest, FileDelegation, CreateDelegationRequest } from '../types/user-file.js';
|
|
3
3
|
export interface UserFilesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all files for a user
|
|
6
|
+
* @param userUniqueId - The unique identifier of the user
|
|
7
|
+
* @param params - Optional filtering by status, file type, schema, and pagination
|
|
8
|
+
* @returns Paginated result containing UserFile items and metadata
|
|
9
|
+
*/
|
|
4
10
|
list(userUniqueId: string, params?: ListUserFilesParams): Promise<PageResult<UserFile>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a specific user file
|
|
13
|
+
* @param userUniqueId - The unique identifier of the user
|
|
14
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
15
|
+
* @returns The matching UserFile record
|
|
16
|
+
*/
|
|
5
17
|
get(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
18
|
+
/**
|
|
19
|
+
* Add a new file record to a user
|
|
20
|
+
* @param userUniqueId - The unique identifier of the user
|
|
21
|
+
* @param data - File details including name, type, size, and URL
|
|
22
|
+
* @returns The newly created UserFile record
|
|
23
|
+
*/
|
|
6
24
|
add(userUniqueId: string, data: AddUserFileRequest): Promise<UserFile>;
|
|
25
|
+
/**
|
|
26
|
+
* Update a user file record
|
|
27
|
+
* @param userUniqueId - The unique identifier of the user
|
|
28
|
+
* @param fileUniqueId - The unique identifier of the file to update
|
|
29
|
+
* @param data - Fields to update such as file name, type, or thumbnail
|
|
30
|
+
* @returns The updated UserFile record
|
|
31
|
+
*/
|
|
7
32
|
update(userUniqueId: string, fileUniqueId: string, data: UpdateUserFileRequest): Promise<UserFile>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete a user file
|
|
35
|
+
* @param userUniqueId - The unique identifier of the user
|
|
36
|
+
* @param fileUniqueId - The unique identifier of the file to delete
|
|
37
|
+
* @returns Resolves when the file has been deleted
|
|
38
|
+
*/
|
|
8
39
|
delete(userUniqueId: string, fileUniqueId: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Get a presigned URL for single-part file upload
|
|
42
|
+
* @param userUniqueId - The unique identifier of the user
|
|
43
|
+
* @param data - Upload metadata including file name, type, and MIME type
|
|
44
|
+
* @returns Presigned upload URL, file key, optional form fields, and expiration
|
|
45
|
+
*/
|
|
9
46
|
presignUpload(userUniqueId: string, data: PresignUploadRequest): Promise<PresignUploadResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Get presigned URLs for multipart file upload
|
|
49
|
+
* @param userUniqueId - The unique identifier of the user
|
|
50
|
+
* @param data - Upload metadata including file name, size, and part size
|
|
51
|
+
* @returns Upload ID, file key, and array of part-level presigned URLs
|
|
52
|
+
* @note Use this for large files that need to be uploaded in chunks
|
|
53
|
+
*/
|
|
10
54
|
multipartPresign(userUniqueId: string, data: MultipartPresignRequest): Promise<MultipartPresignResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Complete a multipart upload after all parts have been uploaded
|
|
57
|
+
* @param userUniqueId - The unique identifier of the user
|
|
58
|
+
* @param data - Completion data including upload ID, file key, and part ETags
|
|
59
|
+
* @returns The finalized UserFile record
|
|
60
|
+
*/
|
|
11
61
|
multipartComplete(userUniqueId: string, data: MultipartCompleteRequest): Promise<UserFile>;
|
|
62
|
+
/**
|
|
63
|
+
* Approve a user file
|
|
64
|
+
* @param userUniqueId - The unique identifier of the user
|
|
65
|
+
* @param fileUniqueId - The unique identifier of the file to approve
|
|
66
|
+
* @returns The updated UserFile record with approved status
|
|
67
|
+
*/
|
|
12
68
|
approve(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
69
|
+
/**
|
|
70
|
+
* Reject a user file
|
|
71
|
+
* @param userUniqueId - The unique identifier of the user
|
|
72
|
+
* @param fileUniqueId - The unique identifier of the file to reject
|
|
73
|
+
* @returns The updated UserFile record with rejected status
|
|
74
|
+
*/
|
|
13
75
|
reject(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
76
|
+
/**
|
|
77
|
+
* Publish a user file
|
|
78
|
+
* @param userUniqueId - The unique identifier of the user
|
|
79
|
+
* @param fileUniqueId - The unique identifier of the file to publish
|
|
80
|
+
* @returns The updated UserFile record with published status
|
|
81
|
+
*/
|
|
14
82
|
publish(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
83
|
+
/**
|
|
84
|
+
* Unpublish a user file
|
|
85
|
+
* @param userUniqueId - The unique identifier of the user
|
|
86
|
+
* @param fileUniqueId - The unique identifier of the file to unpublish
|
|
87
|
+
* @returns The updated UserFile record with unpublished status
|
|
88
|
+
*/
|
|
15
89
|
unpublish(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
90
|
+
/**
|
|
91
|
+
* Add a tag to a user file
|
|
92
|
+
* @param userUniqueId - The unique identifier of the user
|
|
93
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
94
|
+
* @param tagUniqueId - The unique identifier of the tag to add
|
|
95
|
+
* @returns The updated UserFile record with the tag applied
|
|
96
|
+
*/
|
|
16
97
|
addTag(userUniqueId: string, fileUniqueId: string, tagUniqueId: string): Promise<UserFile>;
|
|
98
|
+
/**
|
|
99
|
+
* Remove a tag from a user file
|
|
100
|
+
* @param userUniqueId - The unique identifier of the user
|
|
101
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
102
|
+
* @param tagUniqueId - The unique identifier of the tag to remove
|
|
103
|
+
* @returns Resolves when the tag has been removed
|
|
104
|
+
*/
|
|
17
105
|
removeTag(userUniqueId: string, fileUniqueId: string, tagUniqueId: string): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Bulk update tags for a user
|
|
108
|
+
* @param userUniqueId - The unique identifier of the user
|
|
109
|
+
* @param tagUniqueIds - Array of tag unique identifiers to set
|
|
110
|
+
* @returns Resolves when tags have been updated
|
|
111
|
+
*/
|
|
18
112
|
bulkUpdateTags(userUniqueId: string, tagUniqueIds: string[]): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Request access to a file
|
|
115
|
+
* @param userUniqueId - The unique identifier of the requesting user
|
|
116
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
117
|
+
* @returns Resolves when the access request has been submitted
|
|
118
|
+
*/
|
|
19
119
|
requestAccess(userUniqueId: string, fileUniqueId: string): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Get all access grants for a file
|
|
122
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
123
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
124
|
+
* @returns Array of FileAccess records for the given file
|
|
125
|
+
*/
|
|
20
126
|
getAccess(userUniqueId: string, fileUniqueId: string): Promise<FileAccess[]>;
|
|
127
|
+
/**
|
|
128
|
+
* Grant access to a file for a specific grantee
|
|
129
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
130
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
131
|
+
* @param data - Access details including grantee, access type, and optional expiry
|
|
132
|
+
* @returns The newly created FileAccess record
|
|
133
|
+
*/
|
|
21
134
|
grantAccess(userUniqueId: string, fileUniqueId: string, data: FileAccessRequest): Promise<FileAccess>;
|
|
135
|
+
/**
|
|
136
|
+
* Revoke a specific access grant on a file
|
|
137
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
138
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
139
|
+
* @param accessUniqueId - The unique identifier of the access grant to revoke
|
|
140
|
+
* @returns Resolves when the access grant has been revoked
|
|
141
|
+
*/
|
|
22
142
|
revokeAccess(userUniqueId: string, fileUniqueId: string, accessUniqueId: string): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Make a file publicly accessible
|
|
145
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
146
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
147
|
+
* @returns The updated UserFile record with public access
|
|
148
|
+
*/
|
|
23
149
|
makePublic(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
150
|
+
/**
|
|
151
|
+
* Make a file private (remove public access)
|
|
152
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
153
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
154
|
+
* @returns The updated UserFile record with private access
|
|
155
|
+
*/
|
|
24
156
|
makePrivate(userUniqueId: string, fileUniqueId: string): Promise<UserFile>;
|
|
157
|
+
/**
|
|
158
|
+
* Grant access to multiple files for multiple grantees in one operation
|
|
159
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
160
|
+
* @param fileUniqueIds - Array of file unique identifiers
|
|
161
|
+
* @param granteeUniqueIds - Array of grantee unique identifiers
|
|
162
|
+
* @returns Resolves when all access grants have been created
|
|
163
|
+
*/
|
|
25
164
|
bulkGrantAccess(userUniqueId: string, fileUniqueIds: string[], granteeUniqueIds: string[]): Promise<void>;
|
|
165
|
+
/**
|
|
166
|
+
* Revoke access to multiple files for multiple grantees in one operation
|
|
167
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
168
|
+
* @param fileUniqueIds - Array of file unique identifiers
|
|
169
|
+
* @param granteeUniqueIds - Array of grantee unique identifiers
|
|
170
|
+
* @returns Resolves when all access grants have been revoked
|
|
171
|
+
*/
|
|
26
172
|
bulkRevokeAccess(userUniqueId: string, fileUniqueIds: string[], granteeUniqueIds: string[]): Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* List pending access requests for a file
|
|
175
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
176
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
177
|
+
* @returns Array of FileAccess records representing pending requests
|
|
178
|
+
*/
|
|
27
179
|
listAccessRequests(userUniqueId: string, fileUniqueId: string): Promise<FileAccess[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Approve an access request for a file
|
|
182
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
183
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
184
|
+
* @param requestUniqueId - The unique identifier of the request to approve
|
|
185
|
+
* @returns The resulting FileAccess record after approval
|
|
186
|
+
*/
|
|
28
187
|
approveAccessRequest(userUniqueId: string, fileUniqueId: string, requestUniqueId: string): Promise<FileAccess>;
|
|
188
|
+
/**
|
|
189
|
+
* Deny an access request for a file
|
|
190
|
+
* @param userUniqueId - The unique identifier of the file owner
|
|
191
|
+
* @param fileUniqueId - The unique identifier of the file
|
|
192
|
+
* @param requestUniqueId - The unique identifier of the request to deny
|
|
193
|
+
* @returns Resolves when the request has been denied
|
|
194
|
+
*/
|
|
29
195
|
denyAccessRequest(userUniqueId: string, fileUniqueId: string, requestUniqueId: string): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* List delegations granted by a user to others
|
|
198
|
+
* @param userUniqueId - The unique identifier of the granting user
|
|
199
|
+
* @returns Array of FileDelegation records granted by this user
|
|
200
|
+
*/
|
|
30
201
|
listGrantedDelegations(userUniqueId: string): Promise<FileDelegation[]>;
|
|
202
|
+
/**
|
|
203
|
+
* List delegations received by a user from others
|
|
204
|
+
* @param userUniqueId - The unique identifier of the receiving user
|
|
205
|
+
* @returns Array of FileDelegation records received by this user
|
|
206
|
+
*/
|
|
31
207
|
listReceivedDelegations(userUniqueId: string): Promise<FileDelegation[]>;
|
|
208
|
+
/**
|
|
209
|
+
* Get a specific delegation
|
|
210
|
+
* @param userUniqueId - The unique identifier of the user
|
|
211
|
+
* @param delegationUniqueId - The unique identifier of the delegation
|
|
212
|
+
* @returns The matching FileDelegation record
|
|
213
|
+
*/
|
|
32
214
|
getDelegation(userUniqueId: string, delegationUniqueId: string): Promise<FileDelegation>;
|
|
215
|
+
/**
|
|
216
|
+
* Create a new delegation to another user
|
|
217
|
+
* @param userUniqueId - The unique identifier of the granting user
|
|
218
|
+
* @param data - Delegation details including grantee, access level, and optional expiry
|
|
219
|
+
* @returns The newly created FileDelegation record
|
|
220
|
+
*/
|
|
33
221
|
createDelegation(userUniqueId: string, data: CreateDelegationRequest): Promise<FileDelegation>;
|
|
222
|
+
/**
|
|
223
|
+
* Revoke a delegation
|
|
224
|
+
* @param userUniqueId - The unique identifier of the granting user
|
|
225
|
+
* @param delegationUniqueId - The unique identifier of the delegation to revoke
|
|
226
|
+
* @returns Resolves when the delegation has been revoked
|
|
227
|
+
*/
|
|
34
228
|
revokeDelegation(userUniqueId: string, delegationUniqueId: string): Promise<void>;
|
|
35
229
|
}
|
|
36
230
|
export declare function createUserFilesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/user-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,MAAM,WAAW,gBAAgB;
|
|
1
|
+
{"version":3,"file":"user-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/user-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,MAAM,WAAW,gBAAgB;IAG/B;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CA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