@arbidocs/sdk 0.4.143 → 0.4.145
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/{browser-C48W4Ivd.d.cts → browser-BUKI5Mtb.d.cts} +79 -7
- package/dist/{browser-C48W4Ivd.d.ts → browser-BUKI5Mtb.d.ts} +79 -7
- package/dist/browser.cjs +69 -8
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +69 -8
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +69 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +69 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1251,7 +1251,7 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
|
|
|
1251
1251
|
* server-side from the open session — there is no ``workspace_ext_id`` query
|
|
1252
1252
|
* param on this endpoint.
|
|
1253
1253
|
*/
|
|
1254
|
-
declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean): Promise<{
|
|
1254
|
+
declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean, configExtId?: string | null): Promise<{
|
|
1255
1255
|
doc_ext_ids?: string[] | undefined;
|
|
1256
1256
|
version?: number | null | undefined;
|
|
1257
1257
|
batch_id?: string | null | undefined;
|
|
@@ -1260,6 +1260,39 @@ declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean):
|
|
|
1260
1260
|
reason: string;
|
|
1261
1261
|
}[] | undefined;
|
|
1262
1262
|
}>;
|
|
1263
|
+
/** Where an upload goes and what it is: {@link UploadOptions}, plus a tag and a target workspace. */
|
|
1264
|
+
interface UploadDocumentsOptions extends UploadOptions {
|
|
1265
|
+
/** Apply this tag to the uploaded documents. */
|
|
1266
|
+
tagExtId?: string | null;
|
|
1267
|
+
/** Save into this workspace instead of the open one (its key must be on the session). */
|
|
1268
|
+
workspaceExtId?: string | null;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Upload files in one multipart request over the client's own fetch (its auth, re-login and
|
|
1272
|
+
* payment handling apply). The open workspace receives them unless `workspaceExtId` is given.
|
|
1273
|
+
*/
|
|
1274
|
+
declare function uploadDocuments(arbi: ArbiClient, files: Array<Blob | File>, options?: UploadDocumentsOptions): Promise<UploadResult>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Near-duplicate document pairs in the open workspace, at or above `threshold` (or the pairs of
|
|
1277
|
+
* one document, `docId`).
|
|
1278
|
+
*/
|
|
1279
|
+
declare function similarDocuments(arbi: ArbiClient, options?: {
|
|
1280
|
+
threshold?: number;
|
|
1281
|
+
docId?: string;
|
|
1282
|
+
}): Promise<{
|
|
1283
|
+
workspace_ext_id: string;
|
|
1284
|
+
pairs: {
|
|
1285
|
+
doc_a: {
|
|
1286
|
+
external_id: string;
|
|
1287
|
+
file_name?: string | null | undefined;
|
|
1288
|
+
};
|
|
1289
|
+
doc_b: {
|
|
1290
|
+
external_id: string;
|
|
1291
|
+
file_name?: string | null | undefined;
|
|
1292
|
+
};
|
|
1293
|
+
similarity: number;
|
|
1294
|
+
}[];
|
|
1295
|
+
}>;
|
|
1263
1296
|
/**
|
|
1264
1297
|
* Get parsed document content.
|
|
1265
1298
|
*/
|
|
@@ -1407,6 +1440,7 @@ type documents_SkippedFile = SkippedFile;
|
|
|
1407
1440
|
type documents_UploadBatchResult = UploadBatchResult;
|
|
1408
1441
|
type documents_UploadDirectOptions = UploadDirectOptions;
|
|
1409
1442
|
type documents_UploadDirectResult = UploadDirectResult;
|
|
1443
|
+
type documents_UploadDocumentsOptions = UploadDocumentsOptions;
|
|
1410
1444
|
type documents_UploadOptions = UploadOptions;
|
|
1411
1445
|
type documents_UploadResult = UploadResult;
|
|
1412
1446
|
declare const documents_deleteDocuments: typeof deleteDocuments;
|
|
@@ -1422,12 +1456,14 @@ declare const documents_listVersions: typeof listVersions;
|
|
|
1422
1456
|
declare const documents_mimeFromName: typeof mimeFromName;
|
|
1423
1457
|
declare const documents_presignedPut: typeof presignedPut;
|
|
1424
1458
|
declare const documents_sanitizeFolderPath: typeof sanitizeFolderPath;
|
|
1459
|
+
declare const documents_similarDocuments: typeof similarDocuments;
|
|
1425
1460
|
declare const documents_updateDocuments: typeof updateDocuments;
|
|
1461
|
+
declare const documents_uploadDocuments: typeof uploadDocuments;
|
|
1426
1462
|
declare const documents_uploadDocumentsDirect: typeof uploadDocumentsDirect;
|
|
1427
1463
|
declare const documents_uploadFiles: typeof uploadFiles;
|
|
1428
1464
|
declare const documents_uploadUrl: typeof uploadUrl;
|
|
1429
1465
|
declare namespace documents {
|
|
1430
|
-
export { type documents_DirectUploadClient as DirectUploadClient, type documents_DirectUploadFile as DirectUploadFile, type documents_DirectUploadProgress as DirectUploadProgress, type documents_DocumentListFields as DocumentListFields, type documents_DocumentListOrder as DocumentListOrder, type documents_ListAllOptions as ListAllOptions, type documents_ListPaginatedOptions as ListPaginatedOptions, documents_MAX_PAGES as MAX_PAGES, documents_SUPPORTED_EXTENSIONS as SUPPORTED_EXTENSIONS, type documents_SkippedFile as SkippedFile, type documents_UploadBatchResult as UploadBatchResult, type documents_UploadDirectOptions as UploadDirectOptions, type documents_UploadDirectResult as UploadDirectResult, type documents_UploadOptions as UploadOptions, type documents_UploadResult as UploadResult, documents_deleteDocuments as deleteDocuments, documents_downloadDocument as downloadDocument, documents_finaliseTranslation as finaliseTranslation, documents_getDocuments as getDocuments, documents_getParsedContent as getParsedContent, documents_getThumbnails as getThumbnails, documents_listAll as listAll, documents_listDocuments as listDocuments, documents_listPaginated as listPaginated, documents_listVersions as listVersions, documents_mimeFromName as mimeFromName, documents_presignedPut as presignedPut, documents_sanitizeFolderPath as sanitizeFolderPath, documents_updateDocuments as updateDocuments, documents_uploadDocumentsDirect as uploadDocumentsDirect, uploadFile$1 as uploadFile, documents_uploadFiles as uploadFiles, documents_uploadUrl as uploadUrl };
|
|
1466
|
+
export { type documents_DirectUploadClient as DirectUploadClient, type documents_DirectUploadFile as DirectUploadFile, type documents_DirectUploadProgress as DirectUploadProgress, type documents_DocumentListFields as DocumentListFields, type documents_DocumentListOrder as DocumentListOrder, type documents_ListAllOptions as ListAllOptions, type documents_ListPaginatedOptions as ListPaginatedOptions, documents_MAX_PAGES as MAX_PAGES, documents_SUPPORTED_EXTENSIONS as SUPPORTED_EXTENSIONS, type documents_SkippedFile as SkippedFile, type documents_UploadBatchResult as UploadBatchResult, type documents_UploadDirectOptions as UploadDirectOptions, type documents_UploadDirectResult as UploadDirectResult, type documents_UploadDocumentsOptions as UploadDocumentsOptions, type documents_UploadOptions as UploadOptions, type documents_UploadResult as UploadResult, documents_deleteDocuments as deleteDocuments, documents_downloadDocument as downloadDocument, documents_finaliseTranslation as finaliseTranslation, documents_getDocuments as getDocuments, documents_getParsedContent as getParsedContent, documents_getThumbnails as getThumbnails, documents_listAll as listAll, documents_listDocuments as listDocuments, documents_listPaginated as listPaginated, documents_listVersions as listVersions, documents_mimeFromName as mimeFromName, documents_presignedPut as presignedPut, documents_sanitizeFolderPath as sanitizeFolderPath, documents_similarDocuments as similarDocuments, documents_updateDocuments as updateDocuments, documents_uploadDocuments as uploadDocuments, documents_uploadDocumentsDirect as uploadDocumentsDirect, uploadFile$1 as uploadFile, documents_uploadFiles as uploadFiles, documents_uploadUrl as uploadUrl };
|
|
1431
1467
|
}
|
|
1432
1468
|
|
|
1433
1469
|
/**
|
|
@@ -7464,6 +7500,12 @@ declare class Arbi {
|
|
|
7464
7500
|
source_message_ext_id?: string | null | undefined;
|
|
7465
7501
|
conversation_ext_id?: string | null | undefined;
|
|
7466
7502
|
}[]>;
|
|
7503
|
+
/** Save a translation's current version as a new PDF document linked to its original. */
|
|
7504
|
+
finaliseTranslation: (docId: string) => Promise<{
|
|
7505
|
+
document_ext_id: string;
|
|
7506
|
+
translation_ref: string;
|
|
7507
|
+
source_ref?: string | null | undefined;
|
|
7508
|
+
}>;
|
|
7467
7509
|
delete: (externalIds: string[]) => Promise<void>;
|
|
7468
7510
|
update: (documents: DocUpdateRequest[]) => Promise<{
|
|
7469
7511
|
external_id: string;
|
|
@@ -7545,7 +7587,10 @@ declare class Arbi {
|
|
|
7545
7587
|
title?: string | null | undefined;
|
|
7546
7588
|
} | null | undefined;
|
|
7547
7589
|
}[]>;
|
|
7548
|
-
uploadUrl: (urls: string[],
|
|
7590
|
+
uploadUrl: (urls: string[], options?: {
|
|
7591
|
+
shared?: boolean;
|
|
7592
|
+
configExtId?: string | null;
|
|
7593
|
+
}) => Promise<{
|
|
7549
7594
|
doc_ext_ids?: string[] | undefined;
|
|
7550
7595
|
version?: number | null | undefined;
|
|
7551
7596
|
batch_id?: string | null | undefined;
|
|
@@ -7554,6 +7599,29 @@ declare class Arbi {
|
|
|
7554
7599
|
reason: string;
|
|
7555
7600
|
}[] | undefined;
|
|
7556
7601
|
}>;
|
|
7602
|
+
/**
|
|
7603
|
+
* Upload files in one request (the open workspace, or `options.workspaceExtId`): folder, tag,
|
|
7604
|
+
* sharing, config, a new version of a document.
|
|
7605
|
+
*/
|
|
7606
|
+
upload: (files: Array<Blob | File>, options?: UploadDocumentsOptions) => Promise<UploadResult>;
|
|
7607
|
+
/** Near-duplicate pairs at or above `threshold` (or one document's, `docId`). */
|
|
7608
|
+
similar: (options?: {
|
|
7609
|
+
threshold?: number;
|
|
7610
|
+
docId?: string;
|
|
7611
|
+
}) => Promise<{
|
|
7612
|
+
workspace_ext_id: string;
|
|
7613
|
+
pairs: {
|
|
7614
|
+
doc_a: {
|
|
7615
|
+
external_id: string;
|
|
7616
|
+
file_name?: string | null | undefined;
|
|
7617
|
+
};
|
|
7618
|
+
doc_b: {
|
|
7619
|
+
external_id: string;
|
|
7620
|
+
file_name?: string | null | undefined;
|
|
7621
|
+
};
|
|
7622
|
+
similarity: number;
|
|
7623
|
+
}[];
|
|
7624
|
+
}>;
|
|
7557
7625
|
uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
|
|
7558
7626
|
/** Download a document's original file — its current version, or `version`. */
|
|
7559
7627
|
download: (docId: string, version?: number) => Promise<Response>;
|
|
@@ -9057,7 +9125,8 @@ declare class Arbi {
|
|
|
9057
9125
|
update: (kind: TagKind, fields: TagFieldDefinition[]) => Promise<TagKindSchema>;
|
|
9058
9126
|
};
|
|
9059
9127
|
readonly doctags: {
|
|
9060
|
-
|
|
9128
|
+
/** Apply a tag to documents, with a note (a field's value) and the passages it cites. */
|
|
9129
|
+
assign: (tagId: string, docIds: string[], note?: string | null, citations?: CitationSources$1 | null) => Promise<{
|
|
9061
9130
|
note?: string | null | undefined;
|
|
9062
9131
|
citations?: {
|
|
9063
9132
|
doc_ext_id: string;
|
|
@@ -9097,7 +9166,10 @@ declare class Arbi {
|
|
|
9097
9166
|
created_at: string;
|
|
9098
9167
|
updated_at: string;
|
|
9099
9168
|
}>;
|
|
9100
|
-
|
|
9169
|
+
/** Fill the tags' values on the documents with AI (`overwrite`: also where already set). */
|
|
9170
|
+
generate: (tagIds: string[], docIds: string[], options?: {
|
|
9171
|
+
overwrite?: boolean;
|
|
9172
|
+
}) => Promise<{
|
|
9101
9173
|
doc_ext_ids: string[];
|
|
9102
9174
|
tag_ext_ids: string[];
|
|
9103
9175
|
}>;
|
|
@@ -11526,7 +11598,7 @@ declare class Arbi {
|
|
|
11526
11598
|
*/
|
|
11527
11599
|
|
|
11528
11600
|
type CitationSources = components['schemas']['CitationSources'];
|
|
11529
|
-
declare function assignDocTags(arbi: ArbiClient, tagId: string, docIds: string[], note?: string | null): Promise<{
|
|
11601
|
+
declare function assignDocTags(arbi: ArbiClient, tagId: string, docIds: string[], note?: string | null, citations?: CitationSources | null): Promise<{
|
|
11530
11602
|
note?: string | null | undefined;
|
|
11531
11603
|
citations?: {
|
|
11532
11604
|
doc_ext_id: string;
|
|
@@ -12402,4 +12474,4 @@ declare namespace identity {
|
|
|
12402
12474
|
export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
|
|
12403
12475
|
}
|
|
12404
12476
|
|
|
12405
|
-
export { type CommandDescriptor as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccount as D, type CalendarAccountKind as E, type CalendarCreateBody as F, type CalendarEvent as G, type CalendarKeys as H, type CalendarRead as I, type CalendarSettings as J, type CalendarSettingsBody as K, type CalendarUpdate as L, type CalendarWindow as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessageResponse as U, type ChatResponse as V, type ChatSession as W, type CitationSummary as X, type CitationToolSources as Y, type CliConfig as Z, type CliCredentials as _, type AccountSyncResult as a, type ProjectConversationUsageResponse as a$, type ConfigStore as a0, type ConnectOptions as a1, type ConversationResponse as a2, type ConversationUsageResponse as a3, type CreateFactRequest as a4, type CreateFactsRequest as a5, type CreateWorkRequest as a6, type CreateWorkflowRequest as a7, DEFAULT_AI_USD_PER_GBP as a8, DOC_TERMINAL_STATUSES as a9, type IdentityErrorCode as aA, type IdentityPurchase as aB, type IdentityState as aC, type IdentityStatus as aD, type ImportResult as aE, type InvitationRead as aF, type LinkedRun as aG, type ListAllOptions as aH, type ListEventsParams as aI, type ListFactsOptions as aJ, type ListPaginatedOptions as aK, type MailAttachment as aL, type MailDraftSSEEvent as aM, type MessageLevel as aN, type MessageMetadataPayload$1 as aO, type MessageQueuedEvent as aP, type OAuthAccountKind as aQ, type OutputTokensDetails as aR, type OverlayItem as aS, type OverlayLayerName as aT, type ParsedSlashCommand as aU, type PendingAuthResponse as aV, type PersonKey as aW, PlanStepsError as aX, type PlanWorkRequest as aY, type ProbeAnswerEvent as aZ, type ProjectBudget as a_, type DateTimeSpec as aa, type DecryptedChat as ab, type DecryptedChatMessage as ac, type DeferredInterjectionEvent as ad, type DeploymentHouseTemplate as ae, type DocNameMap as af, type DocumentAutomationAction as ag, type DocumentListFields as ah, type DocumentListOrder as ai, type DocumentSelector as aj, type DocumentWaiter as ak, type DocumentWaiterOptions as al, type EditScope as am, type EventCreateBody as an, type EventPatchBody as ao, FLAT_TAG_KINDS as ap, type FactResponse as aq, type FactSearchRequest as ar, type FactSearchResponse as as, type FeedCreateBody as at, type FeedLevel as au, type FindTimeParams as av, type FormattedWsMessage as aw, type FreeBusyEntry as ax, type HolidayCountry as ay, type HouseTemplateCandidate as az, type ActivityKind as b, type TagKindSchema as b$, type ProjectDetails as b0, type ProjectEventKind as b1, type ProjectEventResponse as b2, type ProjectInvoicesResponse as b3, type ProjectResponse as b4, type ProjectUpdateRequest as b5, type ProjectUsageResponse as b6, PublicBookingError as b7, type PublicBookingPage as b8, type QueryOptions as b9, STEP_FIELD_OPTION_TONES as bA, SUPPORTED_EXTENSIONS as bB, type ScopedTarget as bC, type SendBack as bD, type ShareRead as bE, type ShareRole as bF, type SkillSummary as bG, type SkippedFile as bH, type StepActionRequest as bI, type StepActivityEvent as bJ, type StepAssignee as bK, type StepField as bL, type StepFieldOption as bM, type StepFieldOptionTone as bN, type StepKind as bO, type StepPhase as bP, type StepSignal as bQ, type StepSignalWhen as bR, type StepState as bS, type StepStatus as bT, type SubmitBackgroundQueryOptions as bU, type SubscribeParams as bV, TAG_KINDS as bW, type TagChange as bX, type TagFieldDefinition as bY, type TagKind as bZ, type TagKindField as b_, type RaisedSignal as ba, type ReconnectOptions as bb, type ReconnectableWsConnection as bc, type ResolvedCitation as bd, type ResolvedRecipient as be, type RespondParams as bf, type RespondPartstat as bg, type ResponseCompletedEvent as bh, type ResponseContentPartAddedEvent as bi, type ResponseCreatedEvent as bj, type ResponseFailedEvent as bk, type ResponseOutputItemAddedEvent as bl, type ResponseOutputItemDoneEvent as bm, type ResponseOutputTextDeltaEvent as bn, type ResponseOutputTextDoneEvent as bo, type ResponseUsage as bp, type RoomCreateBody as bq, type RoomQuery as br, type RoomRead as bs, type RunProgress as bt, type RunStep as bu, type RunWaitingOn as bv, type SSEEvent as bw, type SSEStreamCallbacks as bx, type SSEStreamResult as by, type SSEStreamStartData as bz, type ActivityResponse as c,
|
|
12477
|
+
export { type CommandDescriptor as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccount as D, type CalendarAccountKind as E, type CalendarCreateBody as F, type CalendarEvent as G, type CalendarKeys as H, type CalendarRead as I, type CalendarSettings as J, type CalendarSettingsBody as K, type CalendarUpdate as L, type CalendarWindow as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessageResponse as U, type ChatResponse as V, type ChatSession as W, type CitationSummary as X, type CitationToolSources as Y, type CliConfig as Z, type CliCredentials as _, type AccountSyncResult as a, type ProjectConversationUsageResponse as a$, type ConfigStore as a0, type ConnectOptions as a1, type ConversationResponse as a2, type ConversationUsageResponse as a3, type CreateFactRequest as a4, type CreateFactsRequest as a5, type CreateWorkRequest as a6, type CreateWorkflowRequest as a7, DEFAULT_AI_USD_PER_GBP as a8, DOC_TERMINAL_STATUSES as a9, type IdentityErrorCode as aA, type IdentityPurchase as aB, type IdentityState as aC, type IdentityStatus as aD, type ImportResult as aE, type InvitationRead as aF, type LinkedRun as aG, type ListAllOptions as aH, type ListEventsParams as aI, type ListFactsOptions as aJ, type ListPaginatedOptions as aK, type MailAttachment as aL, type MailDraftSSEEvent as aM, type MessageLevel as aN, type MessageMetadataPayload$1 as aO, type MessageQueuedEvent as aP, type OAuthAccountKind as aQ, type OutputTokensDetails as aR, type OverlayItem as aS, type OverlayLayerName as aT, type ParsedSlashCommand as aU, type PendingAuthResponse as aV, type PersonKey as aW, PlanStepsError as aX, type PlanWorkRequest as aY, type ProbeAnswerEvent as aZ, type ProjectBudget as a_, type DateTimeSpec as aa, type DecryptedChat as ab, type DecryptedChatMessage as ac, type DeferredInterjectionEvent as ad, type DeploymentHouseTemplate as ae, type DocNameMap as af, type DocumentAutomationAction as ag, type DocumentListFields as ah, type DocumentListOrder as ai, type DocumentSelector as aj, type DocumentWaiter as ak, type DocumentWaiterOptions as al, type EditScope as am, type EventCreateBody as an, type EventPatchBody as ao, FLAT_TAG_KINDS as ap, type FactResponse as aq, type FactSearchRequest as ar, type FactSearchResponse as as, type FeedCreateBody as at, type FeedLevel as au, type FindTimeParams as av, type FormattedWsMessage as aw, type FreeBusyEntry as ax, type HolidayCountry as ay, type HouseTemplateCandidate as az, type ActivityKind as b, type TagKindSchema as b$, type ProjectDetails as b0, type ProjectEventKind as b1, type ProjectEventResponse as b2, type ProjectInvoicesResponse as b3, type ProjectResponse as b4, type ProjectUpdateRequest as b5, type ProjectUsageResponse as b6, PublicBookingError as b7, type PublicBookingPage as b8, type QueryOptions as b9, STEP_FIELD_OPTION_TONES as bA, SUPPORTED_EXTENSIONS as bB, type ScopedTarget as bC, type SendBack as bD, type ShareRead as bE, type ShareRole as bF, type SkillSummary as bG, type SkippedFile as bH, type StepActionRequest as bI, type StepActivityEvent as bJ, type StepAssignee as bK, type StepField as bL, type StepFieldOption as bM, type StepFieldOptionTone as bN, type StepKind as bO, type StepPhase as bP, type StepSignal as bQ, type StepSignalWhen as bR, type StepState as bS, type StepStatus as bT, type SubmitBackgroundQueryOptions as bU, type SubscribeParams as bV, TAG_KINDS as bW, type TagChange as bX, type TagFieldDefinition as bY, type TagKind as bZ, type TagKindField as b_, type RaisedSignal as ba, type ReconnectOptions as bb, type ReconnectableWsConnection as bc, type ResolvedCitation as bd, type ResolvedRecipient as be, type RespondParams as bf, type RespondPartstat as bg, type ResponseCompletedEvent as bh, type ResponseContentPartAddedEvent as bi, type ResponseCreatedEvent as bj, type ResponseFailedEvent as bk, type ResponseOutputItemAddedEvent as bl, type ResponseOutputItemDoneEvent as bm, type ResponseOutputTextDeltaEvent as bn, type ResponseOutputTextDoneEvent as bo, type ResponseUsage as bp, type RoomCreateBody as bq, type RoomQuery as br, type RoomRead as bs, type RunProgress as bt, type RunStep as bu, type RunWaitingOn as bv, type SSEEvent as bw, type SSEStreamCallbacks as bx, type SSEStreamResult as by, type SSEStreamStartData as bz, type ActivityResponse as c, formatStreamSummary as c$, type TagLinks as c0, type TagListQuery as c1, type TagResponse as c2, type TaskPlan as c3, type TaskPlanStep as c4, type TimeSuggestion as c5, type TokenBudgetContext as c6, type UpdateConversationRequest as c7, type UpdateFactRequest as c8, type UpdateWorkflowRequest as c9, buildCitationChunkData as cA, buildDocNameMap as cB, buildFactsContextTool as cC, buildRetrievalChunkTool as cD, buildRetrievalFullContextTool as cE, buildRetrievalTocTool as cF, calendar as cG, cancelPublicBooking as cH, chats as cI, connectWebSocket as cJ, connectWithReconnect as cK, consumeSSEStream as cL, contacts as cM, conversations as cN, countCitations as cO, createAuthenticatedClient as cP, createDocumentWaiter as cQ, doctags as cR, documents as cS, facts as cT, files as cU, filterSkills as cV, formatAgentStepLabel as cW, formatFileSize as cX, formatGbp as cY, formatGbpPerMillionTokens as cZ, formatItemLabel as c_, type UploadBatchResult as ca, type UploadDirectOptions as cb, type UploadDirectResult as cc, type UploadDocumentsOptions as cd, type UploadOptions as ce, type UploadResult as cf, type UsageBreakdown as cg, type UserDailyUsageResponse as ch, type UserInfo as ci, type UserInputRequestEvent as cj, type UserMessageEvent as ck, WebSocketAuthError as cl, type WeeklyHoursSpec as cm, type WorkStatus as cn, type WorkflowAuthMode as co, type WorkflowResponse as cp, type WorkflowRunHistoryResponse as cq, type WorkflowRunResponse as cr, type WorkspaceContext as cs, type WsConnection as ct, account as cu, agentconfig as cv, agents as cw, assistant as cx, authenticatedFetch as cy, bookPublicSlot as cz, type AgentControlStateEvent as d, formatUserName as d0, formatWorkspaceChoices as d1, formatWsMessage as d2, generateEncryptedWorkspaceKey as d3, generateNewWorkspaceKey as d4, getErrorCode as d5, getErrorMessage as d6, getPublicBookingPage as d7, getRawWorkspaceKey as d8, health as d9, splitAppPasswords as dA, streamSSE as dB, stripCitationMarkdown as dC, summarizeCitations as dD, tags as dE, uploadSkill as dF, usdToGbp as dG, work as dH, workflowSteps as dI, workflows as dJ, workspaces as dK, houseTemplate as da, identity as db, identityErrorCode as dc, isSharedSkill as dd, mail as de, notifications as df, parseSSEEvents as dg, parseSlashCommand as dh, parseSlashTokenInProgress as di, performPasswordLogin as dj, performSigningKeyLogin as dk, performSsoDeviceFlowLogin as dl, profile as dm, projects as dn, requireData as dp, requireOk as dq, resolveAuth as dr, resolveCitations as ds, resolveWorkspace as dt, responses as du, selectWorkspace as dv, selectWorkspaceById as dw, sessions as dx, settings as dy, signatureRequests as dz, type AgentStepDeltaEvent as e, type AgentStepEvent as f, type AppPassword as g, type AppPasswordCreateBody as h, type AppPasswordCreated as i, Arbi as j, ArbiApiError as k, ArbiError as l, type ArbiErrorEvent as m, type ArbiHostSession as n, type ArbiOptions as o, ArbiSessionExpiredError as p, type ArtifactEvent as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type CalDavProfile as z };
|
|
@@ -1251,7 +1251,7 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
|
|
|
1251
1251
|
* server-side from the open session — there is no ``workspace_ext_id`` query
|
|
1252
1252
|
* param on this endpoint.
|
|
1253
1253
|
*/
|
|
1254
|
-
declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean): Promise<{
|
|
1254
|
+
declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean, configExtId?: string | null): Promise<{
|
|
1255
1255
|
doc_ext_ids?: string[] | undefined;
|
|
1256
1256
|
version?: number | null | undefined;
|
|
1257
1257
|
batch_id?: string | null | undefined;
|
|
@@ -1260,6 +1260,39 @@ declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean):
|
|
|
1260
1260
|
reason: string;
|
|
1261
1261
|
}[] | undefined;
|
|
1262
1262
|
}>;
|
|
1263
|
+
/** Where an upload goes and what it is: {@link UploadOptions}, plus a tag and a target workspace. */
|
|
1264
|
+
interface UploadDocumentsOptions extends UploadOptions {
|
|
1265
|
+
/** Apply this tag to the uploaded documents. */
|
|
1266
|
+
tagExtId?: string | null;
|
|
1267
|
+
/** Save into this workspace instead of the open one (its key must be on the session). */
|
|
1268
|
+
workspaceExtId?: string | null;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Upload files in one multipart request over the client's own fetch (its auth, re-login and
|
|
1272
|
+
* payment handling apply). The open workspace receives them unless `workspaceExtId` is given.
|
|
1273
|
+
*/
|
|
1274
|
+
declare function uploadDocuments(arbi: ArbiClient, files: Array<Blob | File>, options?: UploadDocumentsOptions): Promise<UploadResult>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Near-duplicate document pairs in the open workspace, at or above `threshold` (or the pairs of
|
|
1277
|
+
* one document, `docId`).
|
|
1278
|
+
*/
|
|
1279
|
+
declare function similarDocuments(arbi: ArbiClient, options?: {
|
|
1280
|
+
threshold?: number;
|
|
1281
|
+
docId?: string;
|
|
1282
|
+
}): Promise<{
|
|
1283
|
+
workspace_ext_id: string;
|
|
1284
|
+
pairs: {
|
|
1285
|
+
doc_a: {
|
|
1286
|
+
external_id: string;
|
|
1287
|
+
file_name?: string | null | undefined;
|
|
1288
|
+
};
|
|
1289
|
+
doc_b: {
|
|
1290
|
+
external_id: string;
|
|
1291
|
+
file_name?: string | null | undefined;
|
|
1292
|
+
};
|
|
1293
|
+
similarity: number;
|
|
1294
|
+
}[];
|
|
1295
|
+
}>;
|
|
1263
1296
|
/**
|
|
1264
1297
|
* Get parsed document content.
|
|
1265
1298
|
*/
|
|
@@ -1407,6 +1440,7 @@ type documents_SkippedFile = SkippedFile;
|
|
|
1407
1440
|
type documents_UploadBatchResult = UploadBatchResult;
|
|
1408
1441
|
type documents_UploadDirectOptions = UploadDirectOptions;
|
|
1409
1442
|
type documents_UploadDirectResult = UploadDirectResult;
|
|
1443
|
+
type documents_UploadDocumentsOptions = UploadDocumentsOptions;
|
|
1410
1444
|
type documents_UploadOptions = UploadOptions;
|
|
1411
1445
|
type documents_UploadResult = UploadResult;
|
|
1412
1446
|
declare const documents_deleteDocuments: typeof deleteDocuments;
|
|
@@ -1422,12 +1456,14 @@ declare const documents_listVersions: typeof listVersions;
|
|
|
1422
1456
|
declare const documents_mimeFromName: typeof mimeFromName;
|
|
1423
1457
|
declare const documents_presignedPut: typeof presignedPut;
|
|
1424
1458
|
declare const documents_sanitizeFolderPath: typeof sanitizeFolderPath;
|
|
1459
|
+
declare const documents_similarDocuments: typeof similarDocuments;
|
|
1425
1460
|
declare const documents_updateDocuments: typeof updateDocuments;
|
|
1461
|
+
declare const documents_uploadDocuments: typeof uploadDocuments;
|
|
1426
1462
|
declare const documents_uploadDocumentsDirect: typeof uploadDocumentsDirect;
|
|
1427
1463
|
declare const documents_uploadFiles: typeof uploadFiles;
|
|
1428
1464
|
declare const documents_uploadUrl: typeof uploadUrl;
|
|
1429
1465
|
declare namespace documents {
|
|
1430
|
-
export { type documents_DirectUploadClient as DirectUploadClient, type documents_DirectUploadFile as DirectUploadFile, type documents_DirectUploadProgress as DirectUploadProgress, type documents_DocumentListFields as DocumentListFields, type documents_DocumentListOrder as DocumentListOrder, type documents_ListAllOptions as ListAllOptions, type documents_ListPaginatedOptions as ListPaginatedOptions, documents_MAX_PAGES as MAX_PAGES, documents_SUPPORTED_EXTENSIONS as SUPPORTED_EXTENSIONS, type documents_SkippedFile as SkippedFile, type documents_UploadBatchResult as UploadBatchResult, type documents_UploadDirectOptions as UploadDirectOptions, type documents_UploadDirectResult as UploadDirectResult, type documents_UploadOptions as UploadOptions, type documents_UploadResult as UploadResult, documents_deleteDocuments as deleteDocuments, documents_downloadDocument as downloadDocument, documents_finaliseTranslation as finaliseTranslation, documents_getDocuments as getDocuments, documents_getParsedContent as getParsedContent, documents_getThumbnails as getThumbnails, documents_listAll as listAll, documents_listDocuments as listDocuments, documents_listPaginated as listPaginated, documents_listVersions as listVersions, documents_mimeFromName as mimeFromName, documents_presignedPut as presignedPut, documents_sanitizeFolderPath as sanitizeFolderPath, documents_updateDocuments as updateDocuments, documents_uploadDocumentsDirect as uploadDocumentsDirect, uploadFile$1 as uploadFile, documents_uploadFiles as uploadFiles, documents_uploadUrl as uploadUrl };
|
|
1466
|
+
export { type documents_DirectUploadClient as DirectUploadClient, type documents_DirectUploadFile as DirectUploadFile, type documents_DirectUploadProgress as DirectUploadProgress, type documents_DocumentListFields as DocumentListFields, type documents_DocumentListOrder as DocumentListOrder, type documents_ListAllOptions as ListAllOptions, type documents_ListPaginatedOptions as ListPaginatedOptions, documents_MAX_PAGES as MAX_PAGES, documents_SUPPORTED_EXTENSIONS as SUPPORTED_EXTENSIONS, type documents_SkippedFile as SkippedFile, type documents_UploadBatchResult as UploadBatchResult, type documents_UploadDirectOptions as UploadDirectOptions, type documents_UploadDirectResult as UploadDirectResult, type documents_UploadDocumentsOptions as UploadDocumentsOptions, type documents_UploadOptions as UploadOptions, type documents_UploadResult as UploadResult, documents_deleteDocuments as deleteDocuments, documents_downloadDocument as downloadDocument, documents_finaliseTranslation as finaliseTranslation, documents_getDocuments as getDocuments, documents_getParsedContent as getParsedContent, documents_getThumbnails as getThumbnails, documents_listAll as listAll, documents_listDocuments as listDocuments, documents_listPaginated as listPaginated, documents_listVersions as listVersions, documents_mimeFromName as mimeFromName, documents_presignedPut as presignedPut, documents_sanitizeFolderPath as sanitizeFolderPath, documents_similarDocuments as similarDocuments, documents_updateDocuments as updateDocuments, documents_uploadDocuments as uploadDocuments, documents_uploadDocumentsDirect as uploadDocumentsDirect, uploadFile$1 as uploadFile, documents_uploadFiles as uploadFiles, documents_uploadUrl as uploadUrl };
|
|
1431
1467
|
}
|
|
1432
1468
|
|
|
1433
1469
|
/**
|
|
@@ -7464,6 +7500,12 @@ declare class Arbi {
|
|
|
7464
7500
|
source_message_ext_id?: string | null | undefined;
|
|
7465
7501
|
conversation_ext_id?: string | null | undefined;
|
|
7466
7502
|
}[]>;
|
|
7503
|
+
/** Save a translation's current version as a new PDF document linked to its original. */
|
|
7504
|
+
finaliseTranslation: (docId: string) => Promise<{
|
|
7505
|
+
document_ext_id: string;
|
|
7506
|
+
translation_ref: string;
|
|
7507
|
+
source_ref?: string | null | undefined;
|
|
7508
|
+
}>;
|
|
7467
7509
|
delete: (externalIds: string[]) => Promise<void>;
|
|
7468
7510
|
update: (documents: DocUpdateRequest[]) => Promise<{
|
|
7469
7511
|
external_id: string;
|
|
@@ -7545,7 +7587,10 @@ declare class Arbi {
|
|
|
7545
7587
|
title?: string | null | undefined;
|
|
7546
7588
|
} | null | undefined;
|
|
7547
7589
|
}[]>;
|
|
7548
|
-
uploadUrl: (urls: string[],
|
|
7590
|
+
uploadUrl: (urls: string[], options?: {
|
|
7591
|
+
shared?: boolean;
|
|
7592
|
+
configExtId?: string | null;
|
|
7593
|
+
}) => Promise<{
|
|
7549
7594
|
doc_ext_ids?: string[] | undefined;
|
|
7550
7595
|
version?: number | null | undefined;
|
|
7551
7596
|
batch_id?: string | null | undefined;
|
|
@@ -7554,6 +7599,29 @@ declare class Arbi {
|
|
|
7554
7599
|
reason: string;
|
|
7555
7600
|
}[] | undefined;
|
|
7556
7601
|
}>;
|
|
7602
|
+
/**
|
|
7603
|
+
* Upload files in one request (the open workspace, or `options.workspaceExtId`): folder, tag,
|
|
7604
|
+
* sharing, config, a new version of a document.
|
|
7605
|
+
*/
|
|
7606
|
+
upload: (files: Array<Blob | File>, options?: UploadDocumentsOptions) => Promise<UploadResult>;
|
|
7607
|
+
/** Near-duplicate pairs at or above `threshold` (or one document's, `docId`). */
|
|
7608
|
+
similar: (options?: {
|
|
7609
|
+
threshold?: number;
|
|
7610
|
+
docId?: string;
|
|
7611
|
+
}) => Promise<{
|
|
7612
|
+
workspace_ext_id: string;
|
|
7613
|
+
pairs: {
|
|
7614
|
+
doc_a: {
|
|
7615
|
+
external_id: string;
|
|
7616
|
+
file_name?: string | null | undefined;
|
|
7617
|
+
};
|
|
7618
|
+
doc_b: {
|
|
7619
|
+
external_id: string;
|
|
7620
|
+
file_name?: string | null | undefined;
|
|
7621
|
+
};
|
|
7622
|
+
similarity: number;
|
|
7623
|
+
}[];
|
|
7624
|
+
}>;
|
|
7557
7625
|
uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
|
|
7558
7626
|
/** Download a document's original file — its current version, or `version`. */
|
|
7559
7627
|
download: (docId: string, version?: number) => Promise<Response>;
|
|
@@ -9057,7 +9125,8 @@ declare class Arbi {
|
|
|
9057
9125
|
update: (kind: TagKind, fields: TagFieldDefinition[]) => Promise<TagKindSchema>;
|
|
9058
9126
|
};
|
|
9059
9127
|
readonly doctags: {
|
|
9060
|
-
|
|
9128
|
+
/** Apply a tag to documents, with a note (a field's value) and the passages it cites. */
|
|
9129
|
+
assign: (tagId: string, docIds: string[], note?: string | null, citations?: CitationSources$1 | null) => Promise<{
|
|
9061
9130
|
note?: string | null | undefined;
|
|
9062
9131
|
citations?: {
|
|
9063
9132
|
doc_ext_id: string;
|
|
@@ -9097,7 +9166,10 @@ declare class Arbi {
|
|
|
9097
9166
|
created_at: string;
|
|
9098
9167
|
updated_at: string;
|
|
9099
9168
|
}>;
|
|
9100
|
-
|
|
9169
|
+
/** Fill the tags' values on the documents with AI (`overwrite`: also where already set). */
|
|
9170
|
+
generate: (tagIds: string[], docIds: string[], options?: {
|
|
9171
|
+
overwrite?: boolean;
|
|
9172
|
+
}) => Promise<{
|
|
9101
9173
|
doc_ext_ids: string[];
|
|
9102
9174
|
tag_ext_ids: string[];
|
|
9103
9175
|
}>;
|
|
@@ -11526,7 +11598,7 @@ declare class Arbi {
|
|
|
11526
11598
|
*/
|
|
11527
11599
|
|
|
11528
11600
|
type CitationSources = components['schemas']['CitationSources'];
|
|
11529
|
-
declare function assignDocTags(arbi: ArbiClient, tagId: string, docIds: string[], note?: string | null): Promise<{
|
|
11601
|
+
declare function assignDocTags(arbi: ArbiClient, tagId: string, docIds: string[], note?: string | null, citations?: CitationSources | null): Promise<{
|
|
11530
11602
|
note?: string | null | undefined;
|
|
11531
11603
|
citations?: {
|
|
11532
11604
|
doc_ext_id: string;
|
|
@@ -12402,4 +12474,4 @@ declare namespace identity {
|
|
|
12402
12474
|
export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
|
|
12403
12475
|
}
|
|
12404
12476
|
|
|
12405
|
-
export { type CommandDescriptor as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccount as D, type CalendarAccountKind as E, type CalendarCreateBody as F, type CalendarEvent as G, type CalendarKeys as H, type CalendarRead as I, type CalendarSettings as J, type CalendarSettingsBody as K, type CalendarUpdate as L, type CalendarWindow as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessageResponse as U, type ChatResponse as V, type ChatSession as W, type CitationSummary as X, type CitationToolSources as Y, type CliConfig as Z, type CliCredentials as _, type AccountSyncResult as a, type ProjectConversationUsageResponse as a$, type ConfigStore as a0, type ConnectOptions as a1, type ConversationResponse as a2, type ConversationUsageResponse as a3, type CreateFactRequest as a4, type CreateFactsRequest as a5, type CreateWorkRequest as a6, type CreateWorkflowRequest as a7, DEFAULT_AI_USD_PER_GBP as a8, DOC_TERMINAL_STATUSES as a9, type IdentityErrorCode as aA, type IdentityPurchase as aB, type IdentityState as aC, type IdentityStatus as aD, type ImportResult as aE, type InvitationRead as aF, type LinkedRun as aG, type ListAllOptions as aH, type ListEventsParams as aI, type ListFactsOptions as aJ, type ListPaginatedOptions as aK, type MailAttachment as aL, type MailDraftSSEEvent as aM, type MessageLevel as aN, type MessageMetadataPayload$1 as aO, type MessageQueuedEvent as aP, type OAuthAccountKind as aQ, type OutputTokensDetails as aR, type OverlayItem as aS, type OverlayLayerName as aT, type ParsedSlashCommand as aU, type PendingAuthResponse as aV, type PersonKey as aW, PlanStepsError as aX, type PlanWorkRequest as aY, type ProbeAnswerEvent as aZ, type ProjectBudget as a_, type DateTimeSpec as aa, type DecryptedChat as ab, type DecryptedChatMessage as ac, type DeferredInterjectionEvent as ad, type DeploymentHouseTemplate as ae, type DocNameMap as af, type DocumentAutomationAction as ag, type DocumentListFields as ah, type DocumentListOrder as ai, type DocumentSelector as aj, type DocumentWaiter as ak, type DocumentWaiterOptions as al, type EditScope as am, type EventCreateBody as an, type EventPatchBody as ao, FLAT_TAG_KINDS as ap, type FactResponse as aq, type FactSearchRequest as ar, type FactSearchResponse as as, type FeedCreateBody as at, type FeedLevel as au, type FindTimeParams as av, type FormattedWsMessage as aw, type FreeBusyEntry as ax, type HolidayCountry as ay, type HouseTemplateCandidate as az, type ActivityKind as b, type TagKindSchema as b$, type ProjectDetails as b0, type ProjectEventKind as b1, type ProjectEventResponse as b2, type ProjectInvoicesResponse as b3, type ProjectResponse as b4, type ProjectUpdateRequest as b5, type ProjectUsageResponse as b6, PublicBookingError as b7, type PublicBookingPage as b8, type QueryOptions as b9, STEP_FIELD_OPTION_TONES as bA, SUPPORTED_EXTENSIONS as bB, type ScopedTarget as bC, type SendBack as bD, type ShareRead as bE, type ShareRole as bF, type SkillSummary as bG, type SkippedFile as bH, type StepActionRequest as bI, type StepActivityEvent as bJ, type StepAssignee as bK, type StepField as bL, type StepFieldOption as bM, type StepFieldOptionTone as bN, type StepKind as bO, type StepPhase as bP, type StepSignal as bQ, type StepSignalWhen as bR, type StepState as bS, type StepStatus as bT, type SubmitBackgroundQueryOptions as bU, type SubscribeParams as bV, TAG_KINDS as bW, type TagChange as bX, type TagFieldDefinition as bY, type TagKind as bZ, type TagKindField as b_, type RaisedSignal as ba, type ReconnectOptions as bb, type ReconnectableWsConnection as bc, type ResolvedCitation as bd, type ResolvedRecipient as be, type RespondParams as bf, type RespondPartstat as bg, type ResponseCompletedEvent as bh, type ResponseContentPartAddedEvent as bi, type ResponseCreatedEvent as bj, type ResponseFailedEvent as bk, type ResponseOutputItemAddedEvent as bl, type ResponseOutputItemDoneEvent as bm, type ResponseOutputTextDeltaEvent as bn, type ResponseOutputTextDoneEvent as bo, type ResponseUsage as bp, type RoomCreateBody as bq, type RoomQuery as br, type RoomRead as bs, type RunProgress as bt, type RunStep as bu, type RunWaitingOn as bv, type SSEEvent as bw, type SSEStreamCallbacks as bx, type SSEStreamResult as by, type SSEStreamStartData as bz, type ActivityResponse as c,
|
|
12477
|
+
export { type CommandDescriptor as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccount as D, type CalendarAccountKind as E, type CalendarCreateBody as F, type CalendarEvent as G, type CalendarKeys as H, type CalendarRead as I, type CalendarSettings as J, type CalendarSettingsBody as K, type CalendarUpdate as L, type CalendarWindow as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessageResponse as U, type ChatResponse as V, type ChatSession as W, type CitationSummary as X, type CitationToolSources as Y, type CliConfig as Z, type CliCredentials as _, type AccountSyncResult as a, type ProjectConversationUsageResponse as a$, type ConfigStore as a0, type ConnectOptions as a1, type ConversationResponse as a2, type ConversationUsageResponse as a3, type CreateFactRequest as a4, type CreateFactsRequest as a5, type CreateWorkRequest as a6, type CreateWorkflowRequest as a7, DEFAULT_AI_USD_PER_GBP as a8, DOC_TERMINAL_STATUSES as a9, type IdentityErrorCode as aA, type IdentityPurchase as aB, type IdentityState as aC, type IdentityStatus as aD, type ImportResult as aE, type InvitationRead as aF, type LinkedRun as aG, type ListAllOptions as aH, type ListEventsParams as aI, type ListFactsOptions as aJ, type ListPaginatedOptions as aK, type MailAttachment as aL, type MailDraftSSEEvent as aM, type MessageLevel as aN, type MessageMetadataPayload$1 as aO, type MessageQueuedEvent as aP, type OAuthAccountKind as aQ, type OutputTokensDetails as aR, type OverlayItem as aS, type OverlayLayerName as aT, type ParsedSlashCommand as aU, type PendingAuthResponse as aV, type PersonKey as aW, PlanStepsError as aX, type PlanWorkRequest as aY, type ProbeAnswerEvent as aZ, type ProjectBudget as a_, type DateTimeSpec as aa, type DecryptedChat as ab, type DecryptedChatMessage as ac, type DeferredInterjectionEvent as ad, type DeploymentHouseTemplate as ae, type DocNameMap as af, type DocumentAutomationAction as ag, type DocumentListFields as ah, type DocumentListOrder as ai, type DocumentSelector as aj, type DocumentWaiter as ak, type DocumentWaiterOptions as al, type EditScope as am, type EventCreateBody as an, type EventPatchBody as ao, FLAT_TAG_KINDS as ap, type FactResponse as aq, type FactSearchRequest as ar, type FactSearchResponse as as, type FeedCreateBody as at, type FeedLevel as au, type FindTimeParams as av, type FormattedWsMessage as aw, type FreeBusyEntry as ax, type HolidayCountry as ay, type HouseTemplateCandidate as az, type ActivityKind as b, type TagKindSchema as b$, type ProjectDetails as b0, type ProjectEventKind as b1, type ProjectEventResponse as b2, type ProjectInvoicesResponse as b3, type ProjectResponse as b4, type ProjectUpdateRequest as b5, type ProjectUsageResponse as b6, PublicBookingError as b7, type PublicBookingPage as b8, type QueryOptions as b9, STEP_FIELD_OPTION_TONES as bA, SUPPORTED_EXTENSIONS as bB, type ScopedTarget as bC, type SendBack as bD, type ShareRead as bE, type ShareRole as bF, type SkillSummary as bG, type SkippedFile as bH, type StepActionRequest as bI, type StepActivityEvent as bJ, type StepAssignee as bK, type StepField as bL, type StepFieldOption as bM, type StepFieldOptionTone as bN, type StepKind as bO, type StepPhase as bP, type StepSignal as bQ, type StepSignalWhen as bR, type StepState as bS, type StepStatus as bT, type SubmitBackgroundQueryOptions as bU, type SubscribeParams as bV, TAG_KINDS as bW, type TagChange as bX, type TagFieldDefinition as bY, type TagKind as bZ, type TagKindField as b_, type RaisedSignal as ba, type ReconnectOptions as bb, type ReconnectableWsConnection as bc, type ResolvedCitation as bd, type ResolvedRecipient as be, type RespondParams as bf, type RespondPartstat as bg, type ResponseCompletedEvent as bh, type ResponseContentPartAddedEvent as bi, type ResponseCreatedEvent as bj, type ResponseFailedEvent as bk, type ResponseOutputItemAddedEvent as bl, type ResponseOutputItemDoneEvent as bm, type ResponseOutputTextDeltaEvent as bn, type ResponseOutputTextDoneEvent as bo, type ResponseUsage as bp, type RoomCreateBody as bq, type RoomQuery as br, type RoomRead as bs, type RunProgress as bt, type RunStep as bu, type RunWaitingOn as bv, type SSEEvent as bw, type SSEStreamCallbacks as bx, type SSEStreamResult as by, type SSEStreamStartData as bz, type ActivityResponse as c, formatStreamSummary as c$, type TagLinks as c0, type TagListQuery as c1, type TagResponse as c2, type TaskPlan as c3, type TaskPlanStep as c4, type TimeSuggestion as c5, type TokenBudgetContext as c6, type UpdateConversationRequest as c7, type UpdateFactRequest as c8, type UpdateWorkflowRequest as c9, buildCitationChunkData as cA, buildDocNameMap as cB, buildFactsContextTool as cC, buildRetrievalChunkTool as cD, buildRetrievalFullContextTool as cE, buildRetrievalTocTool as cF, calendar as cG, cancelPublicBooking as cH, chats as cI, connectWebSocket as cJ, connectWithReconnect as cK, consumeSSEStream as cL, contacts as cM, conversations as cN, countCitations as cO, createAuthenticatedClient as cP, createDocumentWaiter as cQ, doctags as cR, documents as cS, facts as cT, files as cU, filterSkills as cV, formatAgentStepLabel as cW, formatFileSize as cX, formatGbp as cY, formatGbpPerMillionTokens as cZ, formatItemLabel as c_, type UploadBatchResult as ca, type UploadDirectOptions as cb, type UploadDirectResult as cc, type UploadDocumentsOptions as cd, type UploadOptions as ce, type UploadResult as cf, type UsageBreakdown as cg, type UserDailyUsageResponse as ch, type UserInfo as ci, type UserInputRequestEvent as cj, type UserMessageEvent as ck, WebSocketAuthError as cl, type WeeklyHoursSpec as cm, type WorkStatus as cn, type WorkflowAuthMode as co, type WorkflowResponse as cp, type WorkflowRunHistoryResponse as cq, type WorkflowRunResponse as cr, type WorkspaceContext as cs, type WsConnection as ct, account as cu, agentconfig as cv, agents as cw, assistant as cx, authenticatedFetch as cy, bookPublicSlot as cz, type AgentControlStateEvent as d, formatUserName as d0, formatWorkspaceChoices as d1, formatWsMessage as d2, generateEncryptedWorkspaceKey as d3, generateNewWorkspaceKey as d4, getErrorCode as d5, getErrorMessage as d6, getPublicBookingPage as d7, getRawWorkspaceKey as d8, health as d9, splitAppPasswords as dA, streamSSE as dB, stripCitationMarkdown as dC, summarizeCitations as dD, tags as dE, uploadSkill as dF, usdToGbp as dG, work as dH, workflowSteps as dI, workflows as dJ, workspaces as dK, houseTemplate as da, identity as db, identityErrorCode as dc, isSharedSkill as dd, mail as de, notifications as df, parseSSEEvents as dg, parseSlashCommand as dh, parseSlashTokenInProgress as di, performPasswordLogin as dj, performSigningKeyLogin as dk, performSsoDeviceFlowLogin as dl, profile as dm, projects as dn, requireData as dp, requireOk as dq, resolveAuth as dr, resolveCitations as ds, resolveWorkspace as dt, responses as du, selectWorkspace as dv, selectWorkspaceById as dw, sessions as dx, settings as dy, signatureRequests as dz, type AgentStepDeltaEvent as e, type AgentStepEvent as f, type AppPassword as g, type AppPasswordCreateBody as h, type AppPasswordCreated as i, Arbi as j, ArbiApiError as k, ArbiError as l, type ArbiErrorEvent as m, type ArbiHostSession as n, type ArbiOptions as o, ArbiSessionExpiredError as p, type ArtifactEvent as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type CalDavProfile as z };
|
package/dist/browser.cjs
CHANGED
|
@@ -4368,7 +4368,9 @@ __export(documents_exports, {
|
|
|
4368
4368
|
mimeFromName: () => mimeFromName,
|
|
4369
4369
|
presignedPut: () => presignedPut,
|
|
4370
4370
|
sanitizeFolderPath: () => sanitizeFolderPath,
|
|
4371
|
+
similarDocuments: () => similarDocuments,
|
|
4371
4372
|
updateDocuments: () => updateDocuments,
|
|
4373
|
+
uploadDocuments: () => uploadDocuments,
|
|
4372
4374
|
uploadDocumentsDirect: () => uploadDocumentsDirect,
|
|
4373
4375
|
uploadFile: () => uploadFile,
|
|
4374
4376
|
uploadFiles: () => uploadFiles,
|
|
@@ -4536,16 +4538,54 @@ async function updateDocuments(arbi, documents) {
|
|
|
4536
4538
|
"Failed to update documents"
|
|
4537
4539
|
);
|
|
4538
4540
|
}
|
|
4539
|
-
async function uploadUrl(arbi, urls, shared = false) {
|
|
4541
|
+
async function uploadUrl(arbi, urls, shared = false, configExtId) {
|
|
4540
4542
|
return requireData(
|
|
4541
4543
|
await arbi.fetch.POST("/v1/document/upload-url", {
|
|
4542
4544
|
params: {
|
|
4543
|
-
query: { urls, shared }
|
|
4545
|
+
query: { urls, shared, ...configExtId ? { config_ext_id: configExtId } : {} }
|
|
4544
4546
|
}
|
|
4545
4547
|
}),
|
|
4546
4548
|
"Failed to upload from URLs"
|
|
4547
4549
|
);
|
|
4548
4550
|
}
|
|
4551
|
+
async function uploadDocuments(arbi, files, options = {}) {
|
|
4552
|
+
const query = {};
|
|
4553
|
+
if (options.shared !== void 0) query.shared = options.shared;
|
|
4554
|
+
if (options.folder) query.folder = sanitizeFolderPath(options.folder);
|
|
4555
|
+
if (options.configExtId) query.config_ext_id = options.configExtId;
|
|
4556
|
+
if (options.wpType) query.wp_type = options.wpType;
|
|
4557
|
+
if (options.versionOf) query.version_of = options.versionOf;
|
|
4558
|
+
if (options.tagExtId) query.tag_ext_id = options.tagExtId;
|
|
4559
|
+
if (options.workspaceExtId) query.workspace_ext_id = options.workspaceExtId;
|
|
4560
|
+
if (options.derivedFrom) {
|
|
4561
|
+
query.derived_from = options.derivedFrom.docId;
|
|
4562
|
+
query.derived_role = options.derivedFrom.role;
|
|
4563
|
+
}
|
|
4564
|
+
const result = await arbi.fetch.POST("/v1/document/upload", {
|
|
4565
|
+
params: { query },
|
|
4566
|
+
// The schema types the files as strings; they go as multipart parts.
|
|
4567
|
+
body: { files },
|
|
4568
|
+
bodySerializer: () => {
|
|
4569
|
+
const form = new FormData();
|
|
4570
|
+
for (const file of files) form.append("files", file);
|
|
4571
|
+
return form;
|
|
4572
|
+
}
|
|
4573
|
+
});
|
|
4574
|
+
return requireData(result, "Failed to upload documents");
|
|
4575
|
+
}
|
|
4576
|
+
async function similarDocuments(arbi, options = {}) {
|
|
4577
|
+
return requireData(
|
|
4578
|
+
await arbi.fetch.GET("/v1/document/similar", {
|
|
4579
|
+
params: {
|
|
4580
|
+
query: {
|
|
4581
|
+
...options.threshold !== void 0 ? { threshold: options.threshold } : {},
|
|
4582
|
+
...options.docId ? { doc_ext_id: options.docId } : {}
|
|
4583
|
+
}
|
|
4584
|
+
}
|
|
4585
|
+
}),
|
|
4586
|
+
"Failed to fetch similar documents"
|
|
4587
|
+
);
|
|
4588
|
+
}
|
|
4549
4589
|
async function getParsedContent(auth, docId, stage, version) {
|
|
4550
4590
|
const res = await authenticatedFetch({
|
|
4551
4591
|
...auth,
|
|
@@ -5587,10 +5627,15 @@ __export(doctags_exports, {
|
|
|
5587
5627
|
removeDocTags: () => removeDocTags,
|
|
5588
5628
|
updateDocTag: () => updateDocTag
|
|
5589
5629
|
});
|
|
5590
|
-
async function assignDocTags(arbi, tagId, docIds, note) {
|
|
5630
|
+
async function assignDocTags(arbi, tagId, docIds, note, citations) {
|
|
5591
5631
|
return requireData(
|
|
5592
5632
|
await arbi.fetch.POST("/v1/document/doctag", {
|
|
5593
|
-
body: {
|
|
5633
|
+
body: {
|
|
5634
|
+
tag_ext_id: tagId,
|
|
5635
|
+
doc_ext_ids: docIds,
|
|
5636
|
+
note: note ?? null,
|
|
5637
|
+
...citations ? { citations } : {}
|
|
5638
|
+
}
|
|
5594
5639
|
}),
|
|
5595
5640
|
"Failed to create doctags"
|
|
5596
5641
|
);
|
|
@@ -8911,12 +8956,26 @@ var Arbi = class {
|
|
|
8911
8956
|
get: (externalIds) => getDocuments(this.requireClient(), externalIds),
|
|
8912
8957
|
/** Every version of a document, oldest first; `is_current` marks the current one. */
|
|
8913
8958
|
versions: (docId) => listVersions(this.requireClient(), docId),
|
|
8959
|
+
/** Save a translation's current version as a new PDF document linked to its original. */
|
|
8960
|
+
finaliseTranslation: (docId) => finaliseTranslation(this.requireClient(), docId),
|
|
8914
8961
|
delete: (externalIds) => deleteDocuments(this.requireClient(), externalIds),
|
|
8915
8962
|
update: (documents) => updateDocuments(this.requireClient(), documents),
|
|
8916
|
-
uploadUrl: (urls,
|
|
8963
|
+
uploadUrl: (urls, options) => {
|
|
8917
8964
|
this.requireWorkspace();
|
|
8918
|
-
return uploadUrl(
|
|
8965
|
+
return uploadUrl(
|
|
8966
|
+
this.requireClient(),
|
|
8967
|
+
urls,
|
|
8968
|
+
options?.shared,
|
|
8969
|
+
options?.configExtId
|
|
8970
|
+
);
|
|
8919
8971
|
},
|
|
8972
|
+
/**
|
|
8973
|
+
* Upload files in one request (the open workspace, or `options.workspaceExtId`): folder, tag,
|
|
8974
|
+
* sharing, config, a new version of a document.
|
|
8975
|
+
*/
|
|
8976
|
+
upload: (files, options) => uploadDocuments(this.requireClient(), files, options),
|
|
8977
|
+
/** Near-duplicate pairs at or above `threshold` (or one document's, `docId`). */
|
|
8978
|
+
similar: (options) => similarDocuments(this.requireClient(), options),
|
|
8920
8979
|
uploadFile: (fileData, fileName, options) => {
|
|
8921
8980
|
this.requireWorkspace();
|
|
8922
8981
|
return this.recovering(
|
|
@@ -9167,10 +9226,12 @@ var Arbi = class {
|
|
|
9167
9226
|
};
|
|
9168
9227
|
// ── Document Tags ─────────────────────────────────────────────────────
|
|
9169
9228
|
doctags = {
|
|
9170
|
-
|
|
9229
|
+
/** Apply a tag to documents, with a note (a field's value) and the passages it cites. */
|
|
9230
|
+
assign: (tagId, docIds, note, citations) => assignDocTags(this.requireClient(), tagId, docIds, note, citations),
|
|
9171
9231
|
remove: (tagId, docIds) => removeDocTags(this.requireClient(), tagId, docIds),
|
|
9172
9232
|
update: (tagId, docId, updates) => updateDocTag(this.requireClient(), tagId, docId, updates),
|
|
9173
|
-
|
|
9233
|
+
/** Fill the tags' values on the documents with AI (`overwrite`: also where already set). */
|
|
9234
|
+
generate: (tagIds, docIds, options) => generateDocTags(this.requireClient(), tagIds, docIds, options)
|
|
9174
9235
|
};
|
|
9175
9236
|
// ── Contacts ──────────────────────────────────────────────────────────
|
|
9176
9237
|
// A card is sealed under its address book's key, which the calendar key bridge carries: without
|