@xcitedbs/client 0.2.21 → 0.2.24
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/assetUri.d.ts +14 -0
- package/dist/assetUri.js +119 -0
- package/dist/assetUri.test.d.ts +1 -0
- package/dist/assetUri.test.js +20 -0
- package/dist/client.d.ts +94 -1
- package/dist/client.js +544 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -1
- package/dist/types.d.ts +161 -0
- package/llms-full.txt +94 -7
- package/llms.txt +64 -3
- package/package.json +1 -1
- package/unquery-ai-guide.md +2 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** URI prefix for asset identifiers embedded in documents (`xcitedb:asset:/path/...`). */
|
|
2
|
+
export declare const ASSET_URI_PREFIX: "xcitedb:asset:";
|
|
3
|
+
/**
|
|
4
|
+
* Parses `xcitedb:asset:<identifier>` where identifier must start with `/`.
|
|
5
|
+
* Percent-decodes the path portion then normalizes slashes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseAssetUri(s: string): string | null;
|
|
8
|
+
/** Build `xcitedb:asset:<identifier>`; identifier must begin with `/` after normalization. */
|
|
9
|
+
export declare function formatAssetUri(identifier: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Scan arbitrary text for `xcitedb:asset:` paths (GC / reference discovery).
|
|
12
|
+
* Paths are normalized the same way as {@link parseAssetUri} would accept.
|
|
13
|
+
*/
|
|
14
|
+
export declare function collectIdentifiersFromText(text: string, out: Set<string>): void;
|
package/dist/assetUri.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ASSET_URI_PREFIX = void 0;
|
|
4
|
+
exports.parseAssetUri = parseAssetUri;
|
|
5
|
+
exports.formatAssetUri = formatAssetUri;
|
|
6
|
+
exports.collectIdentifiersFromText = collectIdentifiersFromText;
|
|
7
|
+
/** URI prefix for asset identifiers embedded in documents (`xcitedb:asset:/path/...`). */
|
|
8
|
+
exports.ASSET_URI_PREFIX = 'xcitedb:asset:';
|
|
9
|
+
function isPchar(c) {
|
|
10
|
+
if ((c >= 0x41 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) || (c >= 0x30 && c <= 0x39)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
switch (c) {
|
|
14
|
+
case 0x2d: // -
|
|
15
|
+
case 0x2e: // .
|
|
16
|
+
case 0x5f: // _
|
|
17
|
+
case 0x7e: // ~
|
|
18
|
+
case 0x25: // %
|
|
19
|
+
case 0x3a: // :
|
|
20
|
+
case 0x40: // @
|
|
21
|
+
case 0x21: // !
|
|
22
|
+
case 0x24: // $
|
|
23
|
+
case 0x26: // &
|
|
24
|
+
case 0x27: // '
|
|
25
|
+
case 0x28: // (
|
|
26
|
+
case 0x29: // )
|
|
27
|
+
case 0x2a: // *
|
|
28
|
+
case 0x2b: // +
|
|
29
|
+
case 0x2c: // ,
|
|
30
|
+
case 0x3b: // ;
|
|
31
|
+
case 0x3d: // =
|
|
32
|
+
return true;
|
|
33
|
+
default:
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Normalize path: collapse slashes, ensure leading `/`. */
|
|
38
|
+
function normalizeIdentifierPath(p) {
|
|
39
|
+
let s = p.trim().replace(/\/+/g, '/');
|
|
40
|
+
if (!s.startsWith('/')) {
|
|
41
|
+
s = `/${s}`;
|
|
42
|
+
}
|
|
43
|
+
return s;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Parses `xcitedb:asset:<identifier>` where identifier must start with `/`.
|
|
47
|
+
* Percent-decodes the path portion then normalizes slashes.
|
|
48
|
+
*/
|
|
49
|
+
function parseAssetUri(s) {
|
|
50
|
+
const t = s.trim();
|
|
51
|
+
if (!t.startsWith(exports.ASSET_URI_PREFIX)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
let rest = t.slice(exports.ASSET_URI_PREFIX.length);
|
|
55
|
+
if (!rest.startsWith('/')) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
rest = decodeURIComponent(rest);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
const id = normalizeIdentifierPath(rest);
|
|
65
|
+
if (id === '/' || id.length < 2) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return id;
|
|
69
|
+
}
|
|
70
|
+
/** Build `xcitedb:asset:<identifier>`; identifier must begin with `/` after normalization. */
|
|
71
|
+
function formatAssetUri(identifier) {
|
|
72
|
+
const id = normalizeIdentifierPath(identifier);
|
|
73
|
+
if (id === '/' || !id.startsWith('/')) {
|
|
74
|
+
throw new Error('formatAssetUri: identifier must be a non-root absolute path');
|
|
75
|
+
}
|
|
76
|
+
return `${exports.ASSET_URI_PREFIX}${id}`;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Scan arbitrary text for `xcitedb:asset:` paths (GC / reference discovery).
|
|
80
|
+
* Paths are normalized the same way as {@link parseAssetUri} would accept.
|
|
81
|
+
*/
|
|
82
|
+
function collectIdentifiersFromText(text, out) {
|
|
83
|
+
const p = exports.ASSET_URI_PREFIX;
|
|
84
|
+
let pos = 0;
|
|
85
|
+
while (pos < text.length) {
|
|
86
|
+
const f = text.indexOf(p, pos);
|
|
87
|
+
if (f < 0) {
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
let i = f + p.length;
|
|
91
|
+
if (i >= text.length || text.charCodeAt(i) !== 0x2f) {
|
|
92
|
+
pos = f + 1;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
let j = i;
|
|
96
|
+
while (j < text.length) {
|
|
97
|
+
const c = text.charCodeAt(j);
|
|
98
|
+
if (c === 0x2f || isPchar(c)) {
|
|
99
|
+
j += 1;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
if (j > i) {
|
|
105
|
+
const raw = text.slice(i, j);
|
|
106
|
+
try {
|
|
107
|
+
const decoded = decodeURIComponent(raw);
|
|
108
|
+
const id = normalizeIdentifierPath(decoded);
|
|
109
|
+
if (id.length > 1) {
|
|
110
|
+
out.add(id);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// skip malformed percent-encoding
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
pos = j;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const node_test_1 = __importDefault(require("node:test"));
|
|
7
|
+
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
8
|
+
const assetUri_1 = require("./assetUri");
|
|
9
|
+
(0, node_test_1.default)('parseAssetUri accepts xcitedb:asset path', () => {
|
|
10
|
+
strict_1.default.equal((0, assetUri_1.parseAssetUri)(`${assetUri_1.ASSET_URI_PREFIX}/users/u1/assets/a.png`), '/users/u1/assets/a.png');
|
|
11
|
+
});
|
|
12
|
+
(0, node_test_1.default)('formatAssetUri round-trip', () => {
|
|
13
|
+
const id = '/assets/photos/x';
|
|
14
|
+
strict_1.default.equal((0, assetUri_1.parseAssetUri)((0, assetUri_1.formatAssetUri)(id)), id);
|
|
15
|
+
});
|
|
16
|
+
(0, node_test_1.default)('collectIdentifiersFromText', () => {
|
|
17
|
+
const s = new Set();
|
|
18
|
+
(0, assetUri_1.collectIdentifiersFromText)(`see ${assetUri_1.ASSET_URI_PREFIX}/a/b and done`, s);
|
|
19
|
+
strict_1.default.ok(s.has('/a/b'));
|
|
20
|
+
});
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessCheckResult, AppAuthConfig, AppEmailConfig, AppEmailTemplates, AppUser, AppUserTokenPair, EmailTestResponse, ForgotPasswordResponse, SendVerificationResponse, BranchInfo, BookmarkRecord, CheckpointRecord, CommitRecord, CompareRef, CompareResult, DatabaseContext, DiffRef, DiffResult, DocumentBatchResponse, Flags, JsonDocumentBatchItem, ListIdentifierChildrenResult, ListIdentifiersResult, LockInfo, AcquireLockOptions, LogEntry, MergeResult, PublishResult, WorkspaceInfo, MetaValue, PlatformRegisterResult, PolicySubjectInput, UnqueryResult, UnqueryTemplate, PolicyUpdateResponse, RealtimeEvent, SecurityConfig, SecurityPolicy, StoredTriggerResponse, TriggerDefinition, StoredPolicyResponse, SubscriptionOptions, TagRecord, TextSearchQuery, TextSearchResult, ProjectSearchSettings, ProjectSearchSettingsUpdate, ProjectDocConfResponse, PlatformDefaultDocConfResponse, VectorIndexEstimate, RagQueryOptions, RagQueryResult, RagStreamEvent, OAuthProvidersResponse, ProjectInfo, PlatformRegistrationConfig, PlatformWorkspacesResponse, TokenPair, UserInfo, ApiKeyInfo, WriteDocumentOptions, XmlDocumentBatchItem, CreateTestSessionOptions, XCiteDBClientOptions, XCiteDBJwtClaims, TestSessionBootstrapSummary, TestSessionInfo, XCiteQuery, UserIsolationConfig, UserIsolationCreateShareParams, UserIsolationShareResult } from './types';
|
|
1
|
+
import { AccessCheckResult, AppAuthConfig, AppEmailConfig, AppEmailTemplates, AppUser, AppUserTokenPair, EmailTestResponse, ForgotPasswordResponse, SendVerificationResponse, BranchInfo, BookmarkRecord, CheckpointRecord, CommitRecord, CompareRef, CompareResult, DatabaseContext, DiffRef, DiffResult, DocumentBatchResponse, DocumentExportFormat, ExportDocumentResult, Flags, JsonDocumentBatchItem, ImportDocumentOptions, ImportDocumentResult, ListIdentifierChildrenResult, ListIdentifiersResult, LockInfo, AcquireLockOptions, LogEntry, MergeResult, PublishResult, RebaseUserWorkspaceResult, WorkspaceInfo, MetaValue, PlatformRegisterResult, PolicySubjectInput, UnqueryResult, UnqueryTemplate, PolicyUpdateResponse, RealtimeEvent, SecurityConfig, SecurityPolicy, StoredTriggerResponse, TriggerDefinition, StoredPolicyResponse, SubscriptionOptions, TagRecord, TextSearchQuery, TextSearchResult, ProjectSearchSettings, ProjectSearchSettingsUpdate, ProjectDocConfResponse, AssetGcDryRunResult, AssetHeadResult, AssetMagicLinkListResponse, AssetMagicLinkResult, AssetShareListResponse, AssetShareRequest, AssetUnshareRequest, AssetUploadResult, CreateAssetMagicLinkRequest, ProjectAssetStorageConfig, UploadAssetOptions, PlatformDefaultDocConfResponse, VectorIndexEstimate, RagQueryOptions, RagQueryResult, RagStreamEvent, OAuthProvidersResponse, ProjectInfo, PlatformRegistrationConfig, PlatformWorkspacesResponse, TokenPair, UserInfo, ApiKeyInfo, WriteDocumentOptions, XmlDocumentBatchItem, CreateTestSessionOptions, XCiteDBClientOptions, XCiteDBJwtClaims, TestSessionBootstrapSummary, TestSessionInfo, XCiteQuery, UserIsolationConfig, UserIsolationCreateShareParams, UserIsolationShareResult } from './types';
|
|
2
2
|
import { WebSocketSubscription } from './websocket';
|
|
3
3
|
export declare class XCiteDBClient {
|
|
4
4
|
private baseUrl;
|
|
@@ -93,6 +93,12 @@ export declare class XCiteDBClient {
|
|
|
93
93
|
private testHeaders;
|
|
94
94
|
private requestHeaders;
|
|
95
95
|
private request;
|
|
96
|
+
/**
|
|
97
|
+
* POST `multipart/form-data` without forcing JSON `Content-Type` (boundary is set by the runtime).
|
|
98
|
+
*/
|
|
99
|
+
private requestFormPost;
|
|
100
|
+
/** GET binary response (e.g. document export); errors are parsed as JSON when possible. */
|
|
101
|
+
private requestBinaryGet;
|
|
96
102
|
/** Developer Bearer refresh first, then app-user refresh (no API key refresh). */
|
|
97
103
|
private tryRefreshSessionAfter401;
|
|
98
104
|
private refreshAppUserNoRetry;
|
|
@@ -321,6 +327,21 @@ export declare class XCiteDBClient {
|
|
|
321
327
|
* When {@link XCiteDBClient.enableUserIsolation} / `userIsolation` is active, `identifier` is prefixed like other document APIs.
|
|
322
328
|
*/
|
|
323
329
|
createUserIsolationShare(params: UserIsolationCreateShareParams): Promise<UserIsolationShareResult>;
|
|
330
|
+
/** Share an asset path via prefix alias (`POST /api/v1/security/user-isolation/asset-shares`). */
|
|
331
|
+
createAssetShare(params: AssetShareRequest): Promise<UserIsolationShareResult>;
|
|
332
|
+
/** Remove an asset share (`DELETE /api/v1/security/user-isolation/asset-shares`). */
|
|
333
|
+
deleteAssetShare(params: AssetUnshareRequest): Promise<void>;
|
|
334
|
+
/** List incoming/public asset share aliases (`GET /api/v1/security/user-isolation/asset-shares`). */
|
|
335
|
+
listAssetShares(opts?: {
|
|
336
|
+
direction?: 'incoming' | 'outgoing' | 'public';
|
|
337
|
+
scope?: string;
|
|
338
|
+
}): Promise<AssetShareListResponse>;
|
|
339
|
+
/** Issue a time-limited magic link for one asset identifier (`POST /api/v1/security/asset-magic-links`). */
|
|
340
|
+
createAssetMagicLink(body: CreateAssetMagicLinkRequest): Promise<AssetMagicLinkResult>;
|
|
341
|
+
/** List issued magic links (no secrets) (`GET /api/v1/security/asset-magic-links`). */
|
|
342
|
+
listAssetMagicLinks(): Promise<AssetMagicLinkListResponse>;
|
|
343
|
+
/** Revoke a magic link (`DELETE /api/v1/security/asset-magic-links/{token_id}`). */
|
|
344
|
+
revokeAssetMagicLink(tokenId: string): Promise<void>;
|
|
324
345
|
createWorkspace(name: string, fromBranch?: string, fromDate?: string): Promise<void>;
|
|
325
346
|
/** @deprecated Use {@link createWorkspace}. */
|
|
326
347
|
createBranch(name: string, fromBranch?: string, fromDate?: string): Promise<void>;
|
|
@@ -399,8 +420,16 @@ export declare class XCiteDBClient {
|
|
|
399
420
|
/** @deprecated Use {@link deleteBookmark}. */
|
|
400
421
|
deleteTag(name: string): Promise<void>;
|
|
401
422
|
compare(from: CompareRef, to: CompareRef, includeContent?: boolean): Promise<CompareResult>;
|
|
423
|
+
compare(from: CompareRef, to: CompareRef, options?: {
|
|
424
|
+
includeContent?: boolean;
|
|
425
|
+
matchStart?: string;
|
|
426
|
+
}): Promise<CompareResult>;
|
|
402
427
|
/** @deprecated Use {@link compare}. */
|
|
403
428
|
diff(from: DiffRef, to: DiffRef, includeContent?: boolean): Promise<DiffResult>;
|
|
429
|
+
diff(from: DiffRef, to: DiffRef, options?: {
|
|
430
|
+
includeContent?: boolean;
|
|
431
|
+
matchStart?: string;
|
|
432
|
+
}): Promise<DiffResult>;
|
|
404
433
|
publishWorkspace(targetWorkspace: string, sourceWorkspace: string, options?: {
|
|
405
434
|
message?: string;
|
|
406
435
|
autoResolve?: 'none' | 'source' | 'target';
|
|
@@ -440,6 +469,13 @@ export declare class XCiteDBClient {
|
|
|
440
469
|
message?: string;
|
|
441
470
|
autoResolve?: string;
|
|
442
471
|
}): Promise<Record<string, unknown>>;
|
|
472
|
+
/**
|
|
473
|
+
* Advance the user workspace fork to the current parent tip (`POST /api/v1/user-workspaces/{id}/rebase`).
|
|
474
|
+
* On overlap with local edits, returns **409** with `conflicts` (same shape as publish) unless `autoResolve` resolves it.
|
|
475
|
+
*/
|
|
476
|
+
rebaseUserWorkspace(id: string, options?: {
|
|
477
|
+
autoResolve?: 'none' | 'source' | 'target';
|
|
478
|
+
}): Promise<RebaseUserWorkspaceResult>;
|
|
443
479
|
/**
|
|
444
480
|
* Create `workspaceName` from {@link options.fromBranch} (or current context), run `fn` scoped to that workspace,
|
|
445
481
|
* create a checkpoint, then publish back unless {@link options.autoMerge} is `false`.
|
|
@@ -481,11 +517,36 @@ export declare class XCiteDBClient {
|
|
|
481
517
|
* Rows with `error === 'lock_conflict'` include `current_lock` (code **423** per row).
|
|
482
518
|
*/
|
|
483
519
|
writeXmlDocumentsBatch(items: XmlDocumentBatchItem[]): Promise<DocumentBatchResponse>;
|
|
520
|
+
/**
|
|
521
|
+
* Import a document (`POST /api/v1/documents/import`). Server converts DOCX, ODF, RTF, PDF, Markdown, AsciiDoc, or plain text
|
|
522
|
+
* to shredded XML. Field name must be `file` (multipart).
|
|
523
|
+
*/
|
|
524
|
+
importDocument(file: Blob | ArrayBuffer | Uint8Array, options?: ImportDocumentOptions): Promise<ImportDocumentResult>;
|
|
525
|
+
/**
|
|
526
|
+
* Export a document (`GET /api/v1/documents/export`). Returns binary bytes and response metadata.
|
|
527
|
+
*/
|
|
528
|
+
exportDocument(identifier: string, format?: DocumentExportFormat, options?: {
|
|
529
|
+
strict?: boolean;
|
|
530
|
+
}): Promise<ExportDocumentResult>;
|
|
484
531
|
/**
|
|
485
532
|
* @deprecated Use {@link writeXmlDocument}. This name was misleading: it writes **XML** via a JSON wrapper, not a JSON document.
|
|
486
533
|
*/
|
|
487
534
|
writeDocumentJson(xml: string, options?: WriteDocumentOptions): Promise<void>;
|
|
488
535
|
queryByIdentifier(identifier: string, flags?: Flags, filter?: string, pathFilter?: string): Promise<string[]>;
|
|
536
|
+
/**
|
|
537
|
+
* Shallow read: root element with inline leaves plus `db:N*` placeholders for shredded child slots
|
|
538
|
+
* (`flags=NoChildren,KeepIndexNodes,FirstMatch` on `GET /api/v1/documents/by-id`). For sidebar / AST
|
|
539
|
+
* navigation, pair with {@link listIdentifierChildren} (e.g. `Promise.all` of shallow + children).
|
|
540
|
+
*/
|
|
541
|
+
queryByIdentifierShallow(identifier: string, filter?: string, pathFilter?: string): Promise<string[]>;
|
|
542
|
+
/**
|
|
543
|
+
* Load a document with all shredded children inlined (`FirstMatch,IncludeChildren` on `GET /by-id`).
|
|
544
|
+
* Use this for editor round-trips. For navigation without loading the full subtree, use
|
|
545
|
+
* {@link queryByIdentifierShallow} plus {@link listIdentifierChildren}.
|
|
546
|
+
*/
|
|
547
|
+
queryByIdentifierFull(identifier: string, filter?: string, pathFilter?: string): Promise<string[]>;
|
|
548
|
+
/** Alias of {@link listIdentifierChildren} — immediate child segments under `parentPath` (identifier hierarchy). */
|
|
549
|
+
listChildIdentifiers(parentPath?: string): Promise<ListIdentifierChildrenResult>;
|
|
489
550
|
queryDocuments(query: XCiteQuery, flags?: Flags, filter?: string, pathFilter?: string): Promise<string[]>;
|
|
490
551
|
deleteDocument(identifier: string): Promise<void>;
|
|
491
552
|
addIdentifier(identifier: string): Promise<boolean>;
|
|
@@ -589,6 +650,38 @@ export declare class XCiteDBClient {
|
|
|
589
650
|
}): Promise<ProjectDocConfResponse>;
|
|
590
651
|
/** Remove project override; server uses platform default (`DELETE /api/v1/project/settings/doc-conf`). */
|
|
591
652
|
deleteProjectDocConf(): Promise<ProjectDocConfResponse>;
|
|
653
|
+
/** Admin: asset storage v2 (`GET /api/v1/project/settings/asset-storage`). */
|
|
654
|
+
getProjectAssetStorage(): Promise<ProjectAssetStorageConfig>;
|
|
655
|
+
/** Admin: save asset storage v2 (`PUT /api/v1/project/settings/asset-storage`). */
|
|
656
|
+
updateProjectAssetStorage(body: ProjectAssetStorageConfig): Promise<ProjectAssetStorageConfig>;
|
|
657
|
+
private resolveAssetIdentifier;
|
|
658
|
+
/** URL path under `/api/v1/assets/…` with per-segment encoding. */
|
|
659
|
+
private assetRequestPath;
|
|
660
|
+
private assetQuerySuffix;
|
|
661
|
+
/**
|
|
662
|
+
* Upload raw bytes (`POST /api/v1/assets`). Returns canonical `identifier` and `xcitedb:asset:…` `uri`.
|
|
663
|
+
*/
|
|
664
|
+
uploadAsset(bytes: Blob | ArrayBuffer | Uint8Array, opts: UploadAssetOptions): Promise<AssetUploadResult>;
|
|
665
|
+
/**
|
|
666
|
+
* Download asset bytes (`GET /api/v1/assets/…`). Follows `302` to presigned S3 URLs.
|
|
667
|
+
* Pass `ml` for magic-link access (same token as `Authorization: MagicLink …` when not using cookies).
|
|
668
|
+
*/
|
|
669
|
+
getAsset(uriOrIdentifier: string, opts?: {
|
|
670
|
+
ifNoneMatch?: string;
|
|
671
|
+
ml?: string;
|
|
672
|
+
}): Promise<Blob>;
|
|
673
|
+
/** Delete an asset (`DELETE /api/v1/assets/…`). */
|
|
674
|
+
deleteAsset(uriOrIdentifier: string, opts?: {
|
|
675
|
+
ml?: string;
|
|
676
|
+
}): Promise<void>;
|
|
677
|
+
/** `HEAD /api/v1/assets/…` — metadata only. */
|
|
678
|
+
headAsset(uriOrIdentifier: string, opts?: {
|
|
679
|
+
ml?: string;
|
|
680
|
+
}): Promise<AssetHeadResult>;
|
|
681
|
+
/** Admin: GC dry-run — manifest vs live meta references (`POST /api/v1/admin/assets/gc/dry-run`). */
|
|
682
|
+
adminAssetsGcDryRun(opts?: {
|
|
683
|
+
ownerUserId?: string;
|
|
684
|
+
}): Promise<AssetGcDryRunResult>;
|
|
592
685
|
/** Embedded platform default `document.conf` text (`GET /api/v1/platform/default-doc-conf`). */
|
|
593
686
|
getPlatformDefaultDocConf(): Promise<PlatformDefaultDocConfResponse>;
|
|
594
687
|
/** Blocking full DB scan (admin; no calls to embedding API). Prefer {@link postVectorIndexEstimateSession} for UI. */
|