@aphexcms/cms-core 2.0.9 → 2.0.10
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/LICENSE +21 -0
- package/dist/api/api-keys.d.ts +4 -7
- package/dist/api/api-keys.d.ts.map +1 -1
- package/dist/api/assets.d.ts +7 -22
- package/dist/api/assets.d.ts.map +1 -1
- package/dist/api/assets.js +1 -10
- package/dist/api/documents.d.ts +17 -16
- package/dist/api/documents.d.ts.map +1 -1
- package/dist/api/documents.js +2 -2
- package/dist/api/organizations.d.ts +15 -35
- package/dist/api/organizations.d.ts.map +1 -1
- package/dist/api/schemas/api-keys.d.ts +16 -0
- package/dist/api/schemas/api-keys.d.ts.map +1 -0
- package/dist/api/schemas/api-keys.js +9 -0
- package/dist/api/schemas/assets.d.ts +174 -0
- package/dist/api/schemas/assets.d.ts.map +1 -0
- package/dist/api/schemas/assets.js +99 -0
- package/dist/api/schemas/documents.d.ts +325 -0
- package/dist/api/schemas/documents.d.ts.map +1 -0
- package/dist/api/schemas/documents.js +161 -0
- package/dist/api/schemas/organizations.d.ts +59 -0
- package/dist/api/schemas/organizations.d.ts.map +1 -0
- package/dist/api/schemas/organizations.js +45 -0
- package/dist/api/schemas/user.d.ts +10 -0
- package/dist/api/schemas/user.d.ts.map +1 -0
- package/dist/api/schemas/user.js +11 -0
- package/dist/api/user.d.ts +4 -6
- package/dist/api/user.d.ts.map +1 -1
- package/dist/auth/provider.d.ts +5 -0
- package/dist/auth/provider.d.ts.map +1 -1
- package/dist/cli/index.js +0 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -0
- package/dist/components/AdminApp.svelte +8 -4
- package/dist/components/AdminApp.svelte.d.ts.map +1 -1
- package/dist/components/admin/DocumentEditor.svelte +23 -18
- package/dist/components/admin/DocumentEditor.svelte.d.ts.map +1 -1
- package/dist/components/admin/DocumentVersionPanel.svelte +18 -31
- package/dist/components/admin/DocumentVersionPanel.svelte.d.ts.map +1 -1
- package/dist/components/admin/confirm-dialog/ConfirmDialogHost.svelte +37 -0
- package/dist/components/admin/confirm-dialog/ConfirmDialogHost.svelte.d.ts +19 -0
- package/dist/components/admin/confirm-dialog/ConfirmDialogHost.svelte.d.ts.map +1 -0
- package/dist/components/admin/confirm-dialog/confirm-dialog.svelte.d.ts +16 -0
- package/dist/components/admin/confirm-dialog/confirm-dialog.svelte.d.ts.map +1 -0
- package/dist/components/admin/confirm-dialog/confirm-dialog.svelte.js +29 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +4 -0
- package/dist/lib/api/api-keys.d.ts +4 -7
- package/dist/lib/api/api-keys.d.ts.map +1 -1
- package/dist/lib/api/api-keys.js.map +1 -1
- package/dist/lib/api/assets.d.ts +7 -22
- package/dist/lib/api/assets.d.ts.map +1 -1
- package/dist/lib/api/assets.js +1 -10
- package/dist/lib/api/assets.js.map +1 -1
- package/dist/lib/api/documents.d.ts +17 -16
- package/dist/lib/api/documents.d.ts.map +1 -1
- package/dist/lib/api/documents.js +2 -2
- package/dist/lib/api/documents.js.map +1 -1
- package/dist/lib/api/organizations.d.ts +15 -35
- package/dist/lib/api/organizations.d.ts.map +1 -1
- package/dist/lib/api/organizations.js.map +1 -1
- package/dist/lib/api/schemas/api-keys.d.ts +16 -0
- package/dist/lib/api/schemas/api-keys.d.ts.map +1 -0
- package/dist/lib/api/schemas/api-keys.js +10 -0
- package/dist/lib/api/schemas/api-keys.js.map +1 -0
- package/dist/lib/api/schemas/assets.d.ts +174 -0
- package/dist/lib/api/schemas/assets.d.ts.map +1 -0
- package/dist/lib/api/schemas/assets.js +100 -0
- package/dist/lib/api/schemas/assets.js.map +1 -0
- package/dist/lib/api/schemas/documents.d.ts +325 -0
- package/dist/lib/api/schemas/documents.d.ts.map +1 -0
- package/dist/lib/api/schemas/documents.js +162 -0
- package/dist/lib/api/schemas/documents.js.map +1 -0
- package/dist/lib/api/schemas/organizations.d.ts +59 -0
- package/dist/lib/api/schemas/organizations.d.ts.map +1 -0
- package/dist/lib/api/schemas/organizations.js +46 -0
- package/dist/lib/api/schemas/organizations.js.map +1 -0
- package/dist/lib/api/schemas/user.d.ts +10 -0
- package/dist/lib/api/schemas/user.d.ts.map +1 -0
- package/dist/lib/api/schemas/user.js +12 -0
- package/dist/lib/api/schemas/user.js.map +1 -0
- package/dist/lib/api/user.d.ts +4 -6
- package/dist/lib/api/user.d.ts.map +1 -1
- package/dist/lib/api/user.js.map +1 -1
- package/dist/lib/auth/provider.d.ts +5 -0
- package/dist/lib/auth/provider.d.ts.map +1 -1
- package/dist/lib/client/index.d.ts +2 -0
- package/dist/lib/client/index.d.ts.map +1 -1
- package/dist/lib/client/index.js +3 -0
- package/dist/lib/client/index.js.map +1 -1
- package/dist/lib/components/admin/confirm-dialog/confirm-dialog.svelte.d.ts +16 -0
- package/dist/lib/components/admin/confirm-dialog/confirm-dialog.svelte.d.ts.map +1 -0
- package/dist/lib/components/admin/confirm-dialog/confirm-dialog.svelte.js +30 -0
- package/dist/lib/components/admin/confirm-dialog/confirm-dialog.svelte.js.map +1 -0
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +4 -0
- package/dist/lib/hooks.js.map +1 -1
- package/dist/lib/routes/assets-bulk.d.ts.map +1 -1
- package/dist/lib/routes/assets-bulk.js +10 -3
- package/dist/lib/routes/assets-bulk.js.map +1 -1
- package/dist/lib/routes/assets-by-id.d.ts.map +1 -1
- package/dist/lib/routes/assets-by-id.js +11 -1
- package/dist/lib/routes/assets-by-id.js.map +1 -1
- package/dist/lib/routes/assets-references-counts.d.ts.map +1 -1
- package/dist/lib/routes/assets-references-counts.js +12 -2
- package/dist/lib/routes/assets-references-counts.js.map +1 -1
- package/dist/lib/routes/assets.d.ts.map +1 -1
- package/dist/lib/routes/assets.js +14 -13
- package/dist/lib/routes/assets.js.map +1 -1
- package/dist/lib/routes/document-versions.d.ts.map +1 -1
- package/dist/lib/routes/document-versions.js +16 -2
- package/dist/lib/routes/document-versions.js.map +1 -1
- package/dist/lib/routes/documents-by-id.d.ts.map +1 -1
- package/dist/lib/routes/documents-by-id.js +15 -3
- package/dist/lib/routes/documents-by-id.js.map +1 -1
- package/dist/lib/routes/documents-query.d.ts.map +1 -1
- package/dist/lib/routes/documents-query.js +13 -10
- package/dist/lib/routes/documents-query.js.map +1 -1
- package/dist/lib/routes/documents.d.ts.map +1 -1
- package/dist/lib/routes/documents.js +29 -26
- package/dist/lib/routes/documents.js.map +1 -1
- package/dist/lib/routes/organizations-by-id.d.ts.map +1 -1
- package/dist/lib/routes/organizations-by-id.js +11 -1
- package/dist/lib/routes/organizations-by-id.js.map +1 -1
- package/dist/lib/routes/organizations-invitations.d.ts.map +1 -1
- package/dist/lib/routes/organizations-invitations.js +32 -12
- package/dist/lib/routes/organizations-invitations.js.map +1 -1
- package/dist/lib/routes/organizations-members.d.ts.map +1 -1
- package/dist/lib/routes/organizations-members.js +14 -16
- package/dist/lib/routes/organizations-members.js.map +1 -1
- package/dist/lib/routes/organizations-switch.d.ts.map +1 -1
- package/dist/lib/routes/organizations-switch.js +7 -3
- package/dist/lib/routes/organizations-switch.js.map +1 -1
- package/dist/lib/routes/organizations.d.ts.map +1 -1
- package/dist/lib/routes/organizations.js +8 -5
- package/dist/lib/routes/organizations.js.map +1 -1
- package/dist/lib/routes/user-preferences.d.ts.map +1 -1
- package/dist/lib/routes/user-preferences.js +7 -13
- package/dist/lib/routes/user-preferences.js.map +1 -1
- package/dist/routes/assets-bulk.d.ts.map +1 -1
- package/dist/routes/assets-bulk.js +10 -3
- package/dist/routes/assets-by-id.d.ts.map +1 -1
- package/dist/routes/assets-by-id.js +11 -1
- package/dist/routes/assets-references-counts.d.ts.map +1 -1
- package/dist/routes/assets-references-counts.js +12 -2
- package/dist/routes/assets.d.ts.map +1 -1
- package/dist/routes/assets.js +14 -13
- package/dist/routes/document-versions.d.ts.map +1 -1
- package/dist/routes/document-versions.js +16 -2
- package/dist/routes/documents-by-id.d.ts.map +1 -1
- package/dist/routes/documents-by-id.js +15 -3
- package/dist/routes/documents-query.d.ts.map +1 -1
- package/dist/routes/documents-query.js +13 -10
- package/dist/routes/documents.d.ts.map +1 -1
- package/dist/routes/documents.js +29 -26
- package/dist/routes/organizations-by-id.d.ts.map +1 -1
- package/dist/routes/organizations-by-id.js +11 -1
- package/dist/routes/organizations-invitations.d.ts.map +1 -1
- package/dist/routes/organizations-invitations.js +32 -12
- package/dist/routes/organizations-members.d.ts.map +1 -1
- package/dist/routes/organizations-members.js +14 -16
- package/dist/routes/organizations-switch.d.ts.map +1 -1
- package/dist/routes/organizations-switch.js +7 -3
- package/dist/routes/organizations.d.ts.map +1 -1
- package/dist/routes/organizations.js +8 -5
- package/dist/routes/user-preferences.d.ts.map +1 -1
- package/dist/routes/user-preferences.js +7 -13
- package/package.json +138 -138
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Benjamin Sinidol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/api/api-keys.d.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import type { ApiResponse } from './types.js';
|
|
2
|
+
import type { ApiKeyPermission, CreateApiKeyRequest } from './schemas/api-keys.js';
|
|
2
3
|
export interface ApiKey {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string | null;
|
|
5
6
|
key?: string;
|
|
6
|
-
permissions:
|
|
7
|
+
permissions: ApiKeyPermission[];
|
|
7
8
|
createdAt: Date | null;
|
|
8
9
|
lastRequest: Date | null;
|
|
9
10
|
expiresAt: Date | null;
|
|
10
11
|
}
|
|
11
|
-
export
|
|
12
|
-
name: string;
|
|
13
|
-
permissions: ('read' | 'write')[];
|
|
14
|
-
expiresInDays?: number;
|
|
15
|
-
}
|
|
12
|
+
export type CreateApiKeyData = CreateApiKeyRequest;
|
|
16
13
|
export interface CreateApiKeyResponse {
|
|
17
14
|
apiKey: ApiKey & {
|
|
18
15
|
key: string;
|
|
@@ -22,7 +19,7 @@ export declare class ApiKeysApi {
|
|
|
22
19
|
/**
|
|
23
20
|
* Create a new API key
|
|
24
21
|
*/
|
|
25
|
-
static create(data:
|
|
22
|
+
static create(data: CreateApiKeyRequest): Promise<ApiResponse<CreateApiKeyResponse>>;
|
|
26
23
|
/**
|
|
27
24
|
* Delete an API key
|
|
28
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/lib/api/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/lib/api/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,WAAW,MAAM;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACvB;AAID,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEnD,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACjC;AAED,qBAAa,UAAU;IACtB;;OAEG;WACU,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAI1F;;OAEG;WACU,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAG3E;AAED,eAAO,MAAM,OAAO;;;CAGnB,CAAC"}
|
package/dist/api/assets.d.ts
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
import type { Asset } from '../types/asset.js';
|
|
2
1
|
import type { ApiResponse } from './types.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
offset?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface AssetReference {
|
|
11
|
-
documentId: string;
|
|
12
|
-
type: string;
|
|
13
|
-
title: string;
|
|
14
|
-
status: string | null;
|
|
15
|
-
}
|
|
16
|
-
export interface UpdateAssetData {
|
|
17
|
-
title?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
alt?: string;
|
|
20
|
-
creditLine?: string;
|
|
21
|
-
}
|
|
2
|
+
import type { Asset } from '../types/asset.js';
|
|
3
|
+
import type { AssetReference, ListAssetsQuery, UpdateAssetRequest } from './schemas/assets.js';
|
|
4
|
+
export type AssetFilters = ListAssetsQuery;
|
|
5
|
+
export type UpdateAssetData = UpdateAssetRequest;
|
|
6
|
+
export type { AssetReference };
|
|
22
7
|
export declare class AssetsApi {
|
|
23
8
|
/**
|
|
24
9
|
* List assets with optional filters
|
|
25
10
|
*/
|
|
26
|
-
static list(filters?:
|
|
11
|
+
static list(filters?: ListAssetsQuery): Promise<ApiResponse<Asset[]>>;
|
|
27
12
|
/**
|
|
28
13
|
* Get asset by ID
|
|
29
14
|
*/
|
|
@@ -36,7 +21,7 @@ export declare class AssetsApi {
|
|
|
36
21
|
/**
|
|
37
22
|
* Update asset metadata
|
|
38
23
|
*/
|
|
39
|
-
static update(id: string, data:
|
|
24
|
+
static update(id: string, data: UpdateAssetRequest): Promise<ApiResponse<Asset>>;
|
|
40
25
|
/**
|
|
41
26
|
* Delete an asset
|
|
42
27
|
*/
|
package/dist/api/assets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/lib/api/assets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/lib/api/assets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,MAAM,kBAAkB,CAAC;AAI1B,M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ED
|
@@ -5,16 +5,7 @@ export class AssetsApi {
|
|
|
5
5
|
* List assets with optional filters
|
|
6
6
|
*/
|
|
7
7
|
static async list(filters) {
|
|
8
|
-
|
|
9
|
-
if (filters) {
|
|
10
|
-
Object.entries(filters).forEach(([key, value]) => {
|
|
11
|
-
if (value !== undefined) {
|
|
12
|
-
params.append(key, String(value));
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
const query = params.toString();
|
|
17
|
-
return apiClient.get(`/assets${query ? `?${query}` : ''}`);
|
|
8
|
+
return apiClient.get('/assets', filters);
|
|
18
9
|
}
|
|
19
10
|
/**
|
|
20
11
|
* Get asset by ID
|
package/dist/api/documents.d.ts
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiResponse } from './types.js';
|
|
2
|
+
import type { DocumentDTO, ListDocumentsQuery, CreateDocumentRequest, UpdateDocumentRequest, DocumentVersion, ListVersionsQuery } from './schemas/documents.js';
|
|
3
|
+
export type DocumentListParams = ListDocumentsQuery;
|
|
2
4
|
export declare class DocumentsApi {
|
|
3
5
|
/**
|
|
4
6
|
* List documents with optional filtering
|
|
5
7
|
* NOTE: Requires 'type' parameter - use getByType() for convenience
|
|
6
8
|
*/
|
|
7
|
-
static list(params?:
|
|
9
|
+
static list(params?: ListDocumentsQuery): Promise<ApiResponse<DocumentDTO[]>>;
|
|
8
10
|
/**
|
|
9
11
|
* Get document by ID
|
|
10
12
|
*/
|
|
11
|
-
static getById(id: string): Promise<ApiResponse<
|
|
13
|
+
static getById(id: string): Promise<ApiResponse<DocumentDTO>>;
|
|
12
14
|
/**
|
|
13
15
|
* Create new document
|
|
14
16
|
*/
|
|
15
|
-
static create(data:
|
|
17
|
+
static create(data: CreateDocumentRequest): Promise<ApiResponse<DocumentDTO>>;
|
|
16
18
|
/**
|
|
17
19
|
* Update document draft by ID (auto-save)
|
|
20
|
+
* Request/response shapes come from the zod schema in ./schemas/documents.ts —
|
|
21
|
+
* single source of truth shared with the server handler.
|
|
18
22
|
*/
|
|
19
|
-
static updateById(id: string, data:
|
|
23
|
+
static updateById(id: string, data: UpdateDocumentRequest): Promise<ApiResponse<DocumentDTO>>;
|
|
20
24
|
/**
|
|
21
25
|
* Publish document (copy draft -> published)
|
|
22
26
|
*/
|
|
23
|
-
static publish(id: string): Promise<ApiResponse<
|
|
27
|
+
static publish(id: string): Promise<ApiResponse<DocumentDTO>>;
|
|
24
28
|
/**
|
|
25
29
|
* Unpublish document (revert to draft only)
|
|
26
30
|
*/
|
|
27
|
-
static unpublish(id: string): Promise<ApiResponse<
|
|
31
|
+
static unpublish(id: string): Promise<ApiResponse<DocumentDTO>>;
|
|
28
32
|
/**
|
|
29
33
|
* Delete document by ID
|
|
30
34
|
*/
|
|
@@ -32,30 +36,27 @@ export declare class DocumentsApi {
|
|
|
32
36
|
/**
|
|
33
37
|
* Get documents by type (convenience method)
|
|
34
38
|
*/
|
|
35
|
-
static getByType(docType: string, params?: Omit<
|
|
39
|
+
static getByType(docType: string, params?: Omit<ListDocumentsQuery, 'docType'>): Promise<ApiResponse<DocumentDTO[]>>;
|
|
36
40
|
/**
|
|
37
41
|
* Get published documents only (convenience method)
|
|
38
42
|
*/
|
|
39
|
-
static getPublished(params?: Omit<
|
|
43
|
+
static getPublished(params?: Omit<ListDocumentsQuery, 'status'>): Promise<ApiResponse<DocumentDTO[]>>;
|
|
40
44
|
/**
|
|
41
45
|
* Get draft documents only (convenience method)
|
|
42
46
|
*/
|
|
43
|
-
static getDrafts(params?: Omit<
|
|
47
|
+
static getDrafts(params?: Omit<ListDocumentsQuery, 'status'>): Promise<ApiResponse<DocumentDTO[]>>;
|
|
44
48
|
/**
|
|
45
49
|
* List document version history
|
|
46
50
|
*/
|
|
47
|
-
static listVersions(id: string, params?:
|
|
48
|
-
limit?: number;
|
|
49
|
-
offset?: number;
|
|
50
|
-
}): Promise<ApiResponse<any[]>>;
|
|
51
|
+
static listVersions(id: string, params?: ListVersionsQuery): Promise<ApiResponse<DocumentVersion[]>>;
|
|
51
52
|
/**
|
|
52
53
|
* Get a specific version
|
|
53
54
|
*/
|
|
54
|
-
static getVersion(id: string, versionNumber: number): Promise<ApiResponse<
|
|
55
|
+
static getVersion(id: string, versionNumber: number): Promise<ApiResponse<DocumentVersion>>;
|
|
55
56
|
/**
|
|
56
57
|
* Restore a version to draft
|
|
57
58
|
*/
|
|
58
|
-
static restoreVersion(id: string, versionNumber: number): Promise<ApiResponse<
|
|
59
|
+
static restoreVersion(id: string, versionNumber: number): Promise<ApiResponse<DocumentDTO>>;
|
|
59
60
|
}
|
|
60
61
|
export declare const documents: {
|
|
61
62
|
list: typeof DocumentsApi.list;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/lib/api/documents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/lib/api/documents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACX,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,MAAM,qBAAqB,CAAC;AAI7B,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAEpD,qBAAa,YAAY;IACxB;;;OAGG;WACU,IAAI,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;IAUvF;;OAEG;WACU,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAInE;;OAEG;WACU,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAInF;;;;OAIG;WACU,UAAU,CACtB,EAAE,E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CAcrB,CAAC"}
|
package/dist/api/documents.js
CHANGED
|
@@ -6,12 +6,10 @@ export class DocumentsApi {
|
|
|
6
6
|
* NOTE: Requires 'type' parameter - use getByType() for convenience
|
|
7
7
|
*/
|
|
8
8
|
static async list(params = {}) {
|
|
9
|
-
// Support both 'type' and legacy 'docType' parameter
|
|
10
9
|
const queryParams = {
|
|
11
10
|
...params,
|
|
12
11
|
type: params.type || params.docType
|
|
13
12
|
};
|
|
14
|
-
// Remove docType to avoid confusion
|
|
15
13
|
delete queryParams.docType;
|
|
16
14
|
return apiClient.get('/documents', queryParams);
|
|
17
15
|
}
|
|
@@ -29,6 +27,8 @@ export class DocumentsApi {
|
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
29
|
* Update document draft by ID (auto-save)
|
|
30
|
+
* Request/response shapes come from the zod schema in ./schemas/documents.ts —
|
|
31
|
+
* single source of truth shared with the server handler.
|
|
32
32
|
*/
|
|
33
33
|
static async updateById(id, data) {
|
|
34
34
|
return apiClient.put(`/documents/${id}`, data);
|
|
@@ -1,38 +1,18 @@
|
|
|
1
1
|
import type { Organization, OrganizationMember, OrganizationRole } from '../types/organization.js';
|
|
2
2
|
import type { ApiResponse } from './types.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import type { CreateOrganizationRequest, UpdateOrganizationRequest, SwitchOrganizationRequest, InviteMemberRequest, UpdateMemberRoleRequest, RemoveMemberRequest, CancelInvitationRequest } from './schemas/organizations.js';
|
|
4
|
+
export type CreateOrganizationData = CreateOrganizationRequest;
|
|
5
|
+
export type UpdateOrganizationData = UpdateOrganizationRequest;
|
|
6
|
+
export type SwitchOrganizationData = SwitchOrganizationRequest;
|
|
7
|
+
export type InviteMemberData = InviteMemberRequest;
|
|
8
|
+
export type UpdateMemberRoleData = UpdateMemberRoleRequest;
|
|
9
|
+
export type RemoveMemberData = RemoveMemberRequest;
|
|
10
|
+
export type CancelInvitationData = CancelInvitationRequest;
|
|
9
11
|
export interface OrganizationListItem extends Organization {
|
|
10
12
|
role: OrganizationRole;
|
|
11
13
|
joinedAt: Date;
|
|
12
14
|
isActive: boolean;
|
|
13
15
|
}
|
|
14
|
-
export interface SwitchOrganizationData {
|
|
15
|
-
organizationId: string;
|
|
16
|
-
}
|
|
17
|
-
export interface InviteMemberData {
|
|
18
|
-
email: string;
|
|
19
|
-
role: OrganizationRole;
|
|
20
|
-
}
|
|
21
|
-
export interface UpdateMemberRoleData {
|
|
22
|
-
userId: string;
|
|
23
|
-
role: OrganizationRole;
|
|
24
|
-
}
|
|
25
|
-
export interface RemoveMemberData {
|
|
26
|
-
userId: string;
|
|
27
|
-
}
|
|
28
|
-
export interface CancelInvitationData {
|
|
29
|
-
invitationId: string;
|
|
30
|
-
}
|
|
31
|
-
export interface UpdateOrganizationData {
|
|
32
|
-
name?: string;
|
|
33
|
-
slug?: string;
|
|
34
|
-
metadata?: any;
|
|
35
|
-
}
|
|
36
16
|
export declare class OrganizationsApi {
|
|
37
17
|
/**
|
|
38
18
|
* List user's organizations
|
|
@@ -41,11 +21,11 @@ export declare class OrganizationsApi {
|
|
|
41
21
|
/**
|
|
42
22
|
* Create new organization (super_admin only)
|
|
43
23
|
*/
|
|
44
|
-
static create(data:
|
|
24
|
+
static create(data: CreateOrganizationRequest): Promise<ApiResponse<Organization>>;
|
|
45
25
|
/**
|
|
46
26
|
* Switch to a different organization
|
|
47
27
|
*/
|
|
48
|
-
static switch(data:
|
|
28
|
+
static switch(data: SwitchOrganizationRequest): Promise<ApiResponse<{
|
|
49
29
|
success: boolean;
|
|
50
30
|
}>>;
|
|
51
31
|
/**
|
|
@@ -63,25 +43,25 @@ export declare class OrganizationsApi {
|
|
|
63
43
|
/**
|
|
64
44
|
* Invite a member to the organization
|
|
65
45
|
*/
|
|
66
|
-
static inviteMember(data:
|
|
46
|
+
static inviteMember(data: InviteMemberRequest): Promise<ApiResponse<OrganizationMember>>;
|
|
67
47
|
/**
|
|
68
48
|
* Remove a member from the organization
|
|
69
49
|
*/
|
|
70
|
-
static removeMember(data:
|
|
50
|
+
static removeMember(data: RemoveMemberRequest): Promise<ApiResponse<{
|
|
71
51
|
success: boolean;
|
|
72
52
|
}>>;
|
|
73
53
|
/**
|
|
74
54
|
* Update a member's role
|
|
75
55
|
*/
|
|
76
|
-
static updateMemberRole(data:
|
|
56
|
+
static updateMemberRole(data: UpdateMemberRoleRequest): Promise<ApiResponse<OrganizationMember>>;
|
|
77
57
|
/**
|
|
78
58
|
* Update organization settings
|
|
79
59
|
*/
|
|
80
|
-
static update(id: string, data:
|
|
60
|
+
static update(id: string, data: UpdateOrganizationRequest): Promise<ApiResponse<Organization>>;
|
|
81
61
|
/**
|
|
82
62
|
* Cancel a pending invitation
|
|
83
63
|
*/
|
|
84
|
-
static cancelInvitation(data:
|
|
64
|
+
static cancelInvitation(data: CancelInvitationRequest): Promise<ApiResponse<{
|
|
85
65
|
success: boolean;
|
|
86
66
|
}>>;
|
|
87
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/lib/api/organizations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/lib/api/organizations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,MAAM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AG,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAIhG;;OAEG;WACU,gBAAgB,CAC5B,IAAI,EAAE,uBAAuB,GAC3B,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAI3C;;OAEG;WACU,MAAM,CAClB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,yBAAyB,GAC7B,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAIrC;;OAEG;WACU,gBAAgB,CAC5B,IAAI,EAAE,uBAAuB,GAC3B,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAI7C;;OAEG;WACU,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAG3E;AAGD,eAAO,MAAM,aAAa;;;;;;;;;;;;;CAazB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const apiKeyPermissionSchema: z.ZodEnum<{
|
|
3
|
+
read: "read";
|
|
4
|
+
write: "write";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const createApiKeyRequest: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
permissions: z.ZodArray<z.ZodEnum<{
|
|
9
|
+
read: "read";
|
|
10
|
+
write: "write";
|
|
11
|
+
}>>;
|
|
12
|
+
expiresInDays: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type ApiKeyPermission = z.infer<typeof apiKeyPermissionSchema>;
|
|
15
|
+
export type CreateApiKeyRequest = z.infer<typeof createApiKeyRequest>;
|
|
16
|
+
//# sourceMappingURL=api-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../src/lib/api/schemas/api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;EAA4B,CAAC;AAIhE,eAAO,MAAM,mBAAmB;;;;;;;iBAI9B,CAAC;AAIH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// ---------- Shared ----------
|
|
3
|
+
export const apiKeyPermissionSchema = z.enum(['read', 'write']);
|
|
4
|
+
// ---------- POST /settings/api-keys ----------
|
|
5
|
+
export const createApiKeyRequest = z.object({
|
|
6
|
+
name: z.string().min(1),
|
|
7
|
+
permissions: z.array(apiKeyPermissionSchema).min(1),
|
|
8
|
+
expiresInDays: z.number().int().positive().optional()
|
|
9
|
+
});
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const assetSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
organizationId: z.ZodString;
|
|
5
|
+
assetType: z.ZodString;
|
|
6
|
+
filename: z.ZodString;
|
|
7
|
+
originalFilename: z.ZodString;
|
|
8
|
+
mimeType: z.ZodString;
|
|
9
|
+
size: z.ZodNumber;
|
|
10
|
+
url: z.ZodString;
|
|
11
|
+
path: z.ZodString;
|
|
12
|
+
storageAdapter: z.ZodString;
|
|
13
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
16
|
+
title: z.ZodNullable<z.ZodString>;
|
|
17
|
+
description: z.ZodNullable<z.ZodString>;
|
|
18
|
+
alt: z.ZodNullable<z.ZodString>;
|
|
19
|
+
creditLine: z.ZodNullable<z.ZodString>;
|
|
20
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
21
|
+
createdAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
22
|
+
updatedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
export declare const assetReferenceSchema: z.ZodObject<{
|
|
25
|
+
documentId: z.ZodString;
|
|
26
|
+
type: z.ZodString;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
status: z.ZodNullable<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export declare const listAssetsQuery: z.ZodObject<{
|
|
31
|
+
assetType: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
image: "image";
|
|
33
|
+
file: "file";
|
|
34
|
+
}>>;
|
|
35
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
36
|
+
search: z.ZodOptional<z.ZodString>;
|
|
37
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
38
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export declare const listAssetsResponse: z.ZodObject<{
|
|
41
|
+
success: z.ZodLiteral<true>;
|
|
42
|
+
data: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
organizationId: z.ZodString;
|
|
45
|
+
assetType: z.ZodString;
|
|
46
|
+
filename: z.ZodString;
|
|
47
|
+
originalFilename: z.ZodString;
|
|
48
|
+
mimeType: z.ZodString;
|
|
49
|
+
size: z.ZodNumber;
|
|
50
|
+
url: z.ZodString;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
storageAdapter: z.ZodString;
|
|
53
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
56
|
+
title: z.ZodNullable<z.ZodString>;
|
|
57
|
+
description: z.ZodNullable<z.ZodString>;
|
|
58
|
+
alt: z.ZodNullable<z.ZodString>;
|
|
59
|
+
creditLine: z.ZodNullable<z.ZodString>;
|
|
60
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
61
|
+
createdAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
62
|
+
updatedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
63
|
+
}, z.core.$loose>>;
|
|
64
|
+
pagination: z.ZodObject<{
|
|
65
|
+
total: z.ZodNumber;
|
|
66
|
+
page: z.ZodNumber;
|
|
67
|
+
pageSize: z.ZodNumber;
|
|
68
|
+
totalPages: z.ZodNumber;
|
|
69
|
+
hasNextPage: z.ZodBoolean;
|
|
70
|
+
hasPrevPage: z.ZodBoolean;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export declare const getAssetResponse: z.ZodObject<{
|
|
74
|
+
success: z.ZodLiteral<true>;
|
|
75
|
+
data: z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
organizationId: z.ZodString;
|
|
78
|
+
assetType: z.ZodString;
|
|
79
|
+
filename: z.ZodString;
|
|
80
|
+
originalFilename: z.ZodString;
|
|
81
|
+
mimeType: z.ZodString;
|
|
82
|
+
size: z.ZodNumber;
|
|
83
|
+
url: z.ZodString;
|
|
84
|
+
path: z.ZodString;
|
|
85
|
+
storageAdapter: z.ZodString;
|
|
86
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
88
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
89
|
+
title: z.ZodNullable<z.ZodString>;
|
|
90
|
+
description: z.ZodNullable<z.ZodString>;
|
|
91
|
+
alt: z.ZodNullable<z.ZodString>;
|
|
92
|
+
creditLine: z.ZodNullable<z.ZodString>;
|
|
93
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
94
|
+
createdAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
95
|
+
updatedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
96
|
+
}, z.core.$loose>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export declare const updateAssetRequest: z.ZodObject<{
|
|
99
|
+
title: z.ZodOptional<z.ZodString>;
|
|
100
|
+
description: z.ZodOptional<z.ZodString>;
|
|
101
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
102
|
+
creditLine: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export declare const updateAssetResponse: z.ZodObject<{
|
|
105
|
+
success: z.ZodLiteral<true>;
|
|
106
|
+
data: z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
organizationId: z.ZodString;
|
|
109
|
+
assetType: z.ZodString;
|
|
110
|
+
filename: z.ZodString;
|
|
111
|
+
originalFilename: z.ZodString;
|
|
112
|
+
mimeType: z.ZodString;
|
|
113
|
+
size: z.ZodNumber;
|
|
114
|
+
url: z.ZodString;
|
|
115
|
+
path: z.ZodString;
|
|
116
|
+
storageAdapter: z.ZodString;
|
|
117
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
119
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
120
|
+
title: z.ZodNullable<z.ZodString>;
|
|
121
|
+
description: z.ZodNullable<z.ZodString>;
|
|
122
|
+
alt: z.ZodNullable<z.ZodString>;
|
|
123
|
+
creditLine: z.ZodNullable<z.ZodString>;
|
|
124
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
125
|
+
createdAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
126
|
+
updatedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
|
|
127
|
+
}, z.core.$loose>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export declare const deleteAssetResponse: z.ZodObject<{
|
|
130
|
+
success: z.ZodLiteral<true>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export declare const bulkDeleteAssetsRequest: z.ZodObject<{
|
|
133
|
+
ids: z.ZodArray<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export declare const bulkDeleteAssetsResponse: z.ZodObject<{
|
|
136
|
+
success: z.ZodLiteral<true>;
|
|
137
|
+
data: z.ZodObject<{
|
|
138
|
+
deleted: z.ZodNumber;
|
|
139
|
+
failed: z.ZodNumber;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export declare const getAssetReferencesResponse: z.ZodObject<{
|
|
143
|
+
success: z.ZodLiteral<true>;
|
|
144
|
+
data: z.ZodObject<{
|
|
145
|
+
references: z.ZodArray<z.ZodObject<{
|
|
146
|
+
documentId: z.ZodString;
|
|
147
|
+
type: z.ZodString;
|
|
148
|
+
title: z.ZodString;
|
|
149
|
+
status: z.ZodNullable<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
total: z.ZodNumber;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
export declare const assetReferenceCountsRequest: z.ZodObject<{
|
|
155
|
+
ids: z.ZodArray<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export declare const assetReferenceCountsResponse: z.ZodObject<{
|
|
158
|
+
success: z.ZodLiteral<true>;
|
|
159
|
+
data: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
export type AssetDTO = z.infer<typeof assetSchema>;
|
|
162
|
+
export type AssetReference = z.infer<typeof assetReferenceSchema>;
|
|
163
|
+
export type ListAssetsQuery = z.input<typeof listAssetsQuery>;
|
|
164
|
+
export type ListAssetsResponse = z.infer<typeof listAssetsResponse>;
|
|
165
|
+
export type GetAssetResponse = z.infer<typeof getAssetResponse>;
|
|
166
|
+
export type UpdateAssetRequest = z.infer<typeof updateAssetRequest>;
|
|
167
|
+
export type UpdateAssetResponse = z.infer<typeof updateAssetResponse>;
|
|
168
|
+
export type DeleteAssetResponse = z.infer<typeof deleteAssetResponse>;
|
|
169
|
+
export type BulkDeleteAssetsRequest = z.infer<typeof bulkDeleteAssetsRequest>;
|
|
170
|
+
export type BulkDeleteAssetsResponse = z.infer<typeof bulkDeleteAssetsResponse>;
|
|
171
|
+
export type GetAssetReferencesResponse = z.infer<typeof getAssetReferencesResponse>;
|
|
172
|
+
export type AssetReferenceCountsRequest = z.infer<typeof assetReferenceCountsRequest>;
|
|
173
|
+
export type AssetReferenceCountsResponse = z.infer<typeof assetReferenceCountsResponse>;
|
|
174
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../src/lib/api/schemas/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;iBAuBT,CAAC;AAEhB,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAIH,eAAO,MAAM,eAAe;;;;;;;;;iBAM1B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW7B,CAAC;AAIH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;iBAG3B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;;;;iBAK7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;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