@arbidocs/sdk 0.5.4 → 0.5.6
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-D2XBFIcc.d.ts → browser-CvcDcKbH.d.ts} +76 -5
- package/dist/{browser-CuA9Q2NR.d.cts → browser-DMZ4mU6Z.d.cts} +76 -5
- package/dist/browser.cjs +60 -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 +61 -9
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +60 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +61 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2289,6 +2289,25 @@ declare function getWorkspaceTransfer(arbi: ArbiClient, transferId: string): Pro
|
|
|
2289
2289
|
declare function listWorkspaceTransfers(arbi: ArbiClient): Promise<TransferStatus[]>;
|
|
2290
2290
|
/** A scope's data for a download: its files (with versions and markup) and one JSON per kind. */
|
|
2291
2291
|
declare function exportWorkspaceData(arbi: ArbiClient, scope: TransferScope): Promise<WorkspaceExport>;
|
|
2292
|
+
/** Metadata for the caller’s own existing membership, including expired access. */
|
|
2293
|
+
declare function getWorkspaceAccessStatus(arbi: ArbiClient, workspaceId: string): Promise<{
|
|
2294
|
+
workspace_ext_id: string;
|
|
2295
|
+
workspace_name: string;
|
|
2296
|
+
access_expired: boolean;
|
|
2297
|
+
access_expires_at?: string | null | undefined;
|
|
2298
|
+
owner?: {
|
|
2299
|
+
external_id: string;
|
|
2300
|
+
parent_ext_id?: string | null | undefined;
|
|
2301
|
+
email: string;
|
|
2302
|
+
given_name: string;
|
|
2303
|
+
family_name?: string | null | undefined;
|
|
2304
|
+
picture?: string | null | undefined;
|
|
2305
|
+
encryption_public_key: string;
|
|
2306
|
+
is_sso: boolean;
|
|
2307
|
+
is_identity_verified: boolean;
|
|
2308
|
+
temporary_access_only: boolean;
|
|
2309
|
+
} | null | undefined;
|
|
2310
|
+
}>;
|
|
2292
2311
|
|
|
2293
2312
|
type workspaces_AddWorkspaceMembersRequest = AddWorkspaceMembersRequest;
|
|
2294
2313
|
declare const workspaces_EXTERNAL_ACCESS_SECONDS: typeof EXTERNAL_ACCESS_SECONDS;
|
|
@@ -2308,6 +2327,7 @@ declare const workspaces_copyDocuments: typeof copyDocuments;
|
|
|
2308
2327
|
declare const workspaces_createWorkspace: typeof createWorkspace;
|
|
2309
2328
|
declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
|
|
2310
2329
|
declare const workspaces_exportWorkspaceData: typeof exportWorkspaceData;
|
|
2330
|
+
declare const workspaces_getWorkspaceAccessStatus: typeof getWorkspaceAccessStatus;
|
|
2311
2331
|
declare const workspaces_getWorkspaceActivity: typeof getWorkspaceActivity;
|
|
2312
2332
|
declare const workspaces_getWorkspaceTransfer: typeof getWorkspaceTransfer;
|
|
2313
2333
|
declare const workspaces_grantTemporaryWorkspaceAccess: typeof grantTemporaryWorkspaceAccess;
|
|
@@ -2322,7 +2342,7 @@ declare const workspaces_setUserRole: typeof setUserRole;
|
|
|
2322
2342
|
declare const workspaces_startWorkspaceTransfer: typeof startWorkspaceTransfer;
|
|
2323
2343
|
declare const workspaces_updateWorkspace: typeof updateWorkspace;
|
|
2324
2344
|
declare namespace workspaces {
|
|
2325
|
-
export { type workspaces_AddWorkspaceMembersRequest as AddWorkspaceMembersRequest, workspaces_EXTERNAL_ACCESS_SECONDS as EXTERNAL_ACCESS_SECONDS, type workspaces_TransferConflictPolicy as TransferConflictPolicy, type workspaces_TransferKind as TransferKind, type workspaces_TransferMode as TransferMode, type workspaces_TransferPlan as TransferPlan, type workspaces_TransferScope as TransferScope, type workspaces_TransferStatus as TransferStatus, type workspaces_WorkspaceActivityOptions as WorkspaceActivityOptions, type workspaces_WorkspaceExport as WorkspaceExport, workspaces_addWorkspaceMembers as addWorkspaceMembers, workspaces_addWorkspaceMembersBody as addWorkspaceMembersBody, workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_cancelWorkspaceTransfer as cancelWorkspaceTransfer, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_exportWorkspaceData as exportWorkspaceData, workspaces_getWorkspaceActivity as getWorkspaceActivity, workspaces_getWorkspaceTransfer as getWorkspaceTransfer, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceTransfers as listWorkspaceTransfers, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_planWorkspaceTransfer as planWorkspaceTransfer, workspaces_primeWorkspaceKey as primeWorkspaceKey, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_resumeWorkspaceTransfer as resumeWorkspaceTransfer, workspaces_setUserRole as setUserRole, workspaces_startWorkspaceTransfer as startWorkspaceTransfer, workspaces_updateWorkspace as updateWorkspace };
|
|
2345
|
+
export { type workspaces_AddWorkspaceMembersRequest as AddWorkspaceMembersRequest, workspaces_EXTERNAL_ACCESS_SECONDS as EXTERNAL_ACCESS_SECONDS, type workspaces_TransferConflictPolicy as TransferConflictPolicy, type workspaces_TransferKind as TransferKind, type workspaces_TransferMode as TransferMode, type workspaces_TransferPlan as TransferPlan, type workspaces_TransferScope as TransferScope, type workspaces_TransferStatus as TransferStatus, type workspaces_WorkspaceActivityOptions as WorkspaceActivityOptions, type workspaces_WorkspaceExport as WorkspaceExport, workspaces_addWorkspaceMembers as addWorkspaceMembers, workspaces_addWorkspaceMembersBody as addWorkspaceMembersBody, workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_cancelWorkspaceTransfer as cancelWorkspaceTransfer, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_exportWorkspaceData as exportWorkspaceData, workspaces_getWorkspaceAccessStatus as getWorkspaceAccessStatus, workspaces_getWorkspaceActivity as getWorkspaceActivity, workspaces_getWorkspaceTransfer as getWorkspaceTransfer, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceTransfers as listWorkspaceTransfers, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_planWorkspaceTransfer as planWorkspaceTransfer, workspaces_primeWorkspaceKey as primeWorkspaceKey, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_resumeWorkspaceTransfer as resumeWorkspaceTransfer, workspaces_setUserRole as setUserRole, workspaces_startWorkspaceTransfer as startWorkspaceTransfer, workspaces_updateWorkspace as updateWorkspace };
|
|
2326
2346
|
}
|
|
2327
2347
|
|
|
2328
2348
|
/**
|
|
@@ -3808,7 +3828,7 @@ declare namespace tags {
|
|
|
3808
3828
|
/**
|
|
3809
3829
|
* Contact operations (`/v1/contacts`) — one address book: registered people, pending invitations and plain
|
|
3810
3830
|
* cards. A card's details are encrypted under its address book's key; a session without that key bridged
|
|
3811
|
-
* (`Arbi.contacts` bridges it first, through the
|
|
3831
|
+
* (`Arbi.contacts` bridges it first, through the contacts key endpoints) gets `card: null` for stored cards and
|
|
3812
3832
|
* cannot write them (423).
|
|
3813
3833
|
*/
|
|
3814
3834
|
|
|
@@ -3820,6 +3840,12 @@ type ContactCardWrite = S$1['ContactCardWrite'];
|
|
|
3820
3840
|
type ContactCreate = S$1['ContactCreate'];
|
|
3821
3841
|
type ContactImportResult = S$1['ContactImportResult'];
|
|
3822
3842
|
type PersonSuggestion = S$1['PersonSuggestion'];
|
|
3843
|
+
/** Address-book keys are separate from the paid calendar's key bridge. */
|
|
3844
|
+
interface ContactSessionKeys {
|
|
3845
|
+
signingPrivateKey: Uint8Array;
|
|
3846
|
+
serverSessionKey: Uint8Array;
|
|
3847
|
+
}
|
|
3848
|
+
declare function ensureContactsUnlocked(client: ArbiClient, keys: ContactSessionKeys | null): Promise<void>;
|
|
3823
3849
|
declare function listContacts(arbi: ArbiClient): Promise<Contact[]>;
|
|
3824
3850
|
/** Invite or link people by e-mail (max 100); one row per address with its `outcome`. */
|
|
3825
3851
|
declare function inviteContacts(arbi: ArbiClient, emails: string[]): Promise<Contact[]>;
|
|
@@ -3858,10 +3884,12 @@ type contacts_ContactCard = ContactCard;
|
|
|
3858
3884
|
type contacts_ContactCardWrite = ContactCardWrite;
|
|
3859
3885
|
type contacts_ContactCreate = ContactCreate;
|
|
3860
3886
|
type contacts_ContactImportResult = ContactImportResult;
|
|
3887
|
+
type contacts_ContactSessionKeys = ContactSessionKeys;
|
|
3861
3888
|
type contacts_ContactStatus = ContactStatus;
|
|
3862
3889
|
type contacts_PersonSuggestion = PersonSuggestion;
|
|
3863
3890
|
declare const contacts_createContact: typeof createContact;
|
|
3864
3891
|
declare const contacts_deleteContact: typeof deleteContact;
|
|
3892
|
+
declare const contacts_ensureContactsUnlocked: typeof ensureContactsUnlocked;
|
|
3865
3893
|
declare const contacts_groupContactsByStatus: typeof groupContactsByStatus;
|
|
3866
3894
|
declare const contacts_importContacts: typeof importContacts;
|
|
3867
3895
|
declare const contacts_inviteContacts: typeof inviteContacts;
|
|
@@ -3870,7 +3898,7 @@ declare const contacts_listContacts: typeof listContacts;
|
|
|
3870
3898
|
declare const contacts_searchContacts: typeof searchContacts;
|
|
3871
3899
|
declare const contacts_updateContact: typeof updateContact;
|
|
3872
3900
|
declare namespace contacts {
|
|
3873
|
-
export { type contacts_Contact as Contact, type contacts_ContactCard as ContactCard, type contacts_ContactCardWrite as ContactCardWrite, type contacts_ContactCreate as ContactCreate, type contacts_ContactImportResult as ContactImportResult, type contacts_ContactStatus as ContactStatus, type contacts_PersonSuggestion as PersonSuggestion, contacts_createContact as createContact, contacts_deleteContact as deleteContact, contacts_groupContactsByStatus as groupContactsByStatus, contacts_importContacts as importContacts, contacts_inviteContacts as inviteContacts, contacts_linkContact as linkContact, contacts_listContacts as listContacts, contacts_searchContacts as searchContacts, contacts_updateContact as updateContact };
|
|
3901
|
+
export { type contacts_Contact as Contact, type contacts_ContactCard as ContactCard, type contacts_ContactCardWrite as ContactCardWrite, type contacts_ContactCreate as ContactCreate, type contacts_ContactImportResult as ContactImportResult, type contacts_ContactSessionKeys as ContactSessionKeys, type contacts_ContactStatus as ContactStatus, type contacts_PersonSuggestion as PersonSuggestion, contacts_createContact as createContact, contacts_deleteContact as deleteContact, contacts_ensureContactsUnlocked as ensureContactsUnlocked, contacts_groupContactsByStatus as groupContactsByStatus, contacts_importContacts as importContacts, contacts_inviteContacts as inviteContacts, contacts_linkContact as linkContact, contacts_listContacts as listContacts, contacts_searchContacts as searchContacts, contacts_updateContact as updateContact };
|
|
3874
3902
|
}
|
|
3875
3903
|
|
|
3876
3904
|
/**
|
|
@@ -4759,6 +4787,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
4759
4787
|
MODEL_NAME: string;
|
|
4760
4788
|
SYSTEM_INSTRUCTION: string;
|
|
4761
4789
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
4790
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
4762
4791
|
TEMPERATURE: number;
|
|
4763
4792
|
MAX_TOKENS: number;
|
|
4764
4793
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -7033,8 +7062,7 @@ declare namespace facts {
|
|
|
7033
7062
|
* session reads it only once those keys are bridged to it ({@link unlockCalendarKeys}:
|
|
7034
7063
|
* GET /keys → unseal with the user's key → reseal to the session → POST /session-keys).
|
|
7035
7064
|
* {@link ensureCalendarUnlocked} does that once per server session; `Arbi.calendar` calls it
|
|
7036
|
-
* before every content request.
|
|
7037
|
-
* bridge carries, so the contacts operations need it too.
|
|
7065
|
+
* before every calendar content request. Contacts use their own address-book key bridge.
|
|
7038
7066
|
*
|
|
7039
7067
|
* `/v1/calendar` is user-global (not workspace-scoped); only `/overlays` reads the open workspace.
|
|
7040
7068
|
*/
|
|
@@ -8350,6 +8378,9 @@ declare class Arbi {
|
|
|
8350
8378
|
[key: string]: components["schemas"]["TagBreakdown"];
|
|
8351
8379
|
};
|
|
8352
8380
|
unattributed: components["schemas"]["TagBreakdown"];
|
|
8381
|
+
external_usage?: {
|
|
8382
|
+
[key: string]: unknown;
|
|
8383
|
+
} | null;
|
|
8353
8384
|
}>;
|
|
8354
8385
|
refresh: (projectExtId: string) => Promise<{
|
|
8355
8386
|
external_id: string;
|
|
@@ -8491,6 +8522,9 @@ declare class Arbi {
|
|
|
8491
8522
|
[key: string]: components["schemas"]["TagBreakdown"];
|
|
8492
8523
|
};
|
|
8493
8524
|
invoice_pdf?: string | null;
|
|
8525
|
+
external_usage?: {
|
|
8526
|
+
[key: string]: unknown;
|
|
8527
|
+
} | null;
|
|
8494
8528
|
}>;
|
|
8495
8529
|
/** Stripe invoices for a project's subscription. */
|
|
8496
8530
|
invoices: (projectExtId: string) => Promise<{
|
|
@@ -9441,6 +9475,24 @@ declare class Arbi {
|
|
|
9441
9475
|
};
|
|
9442
9476
|
private syncIdentity;
|
|
9443
9477
|
readonly workspaces: {
|
|
9478
|
+
accessStatus: (workspaceId: string) => Promise<{
|
|
9479
|
+
workspace_ext_id: string;
|
|
9480
|
+
workspace_name: string;
|
|
9481
|
+
access_expired: boolean;
|
|
9482
|
+
access_expires_at?: string | null | undefined;
|
|
9483
|
+
owner?: {
|
|
9484
|
+
external_id: string;
|
|
9485
|
+
parent_ext_id?: string | null | undefined;
|
|
9486
|
+
email: string;
|
|
9487
|
+
given_name: string;
|
|
9488
|
+
family_name?: string | null | undefined;
|
|
9489
|
+
picture?: string | null | undefined;
|
|
9490
|
+
encryption_public_key: string;
|
|
9491
|
+
is_sso: boolean;
|
|
9492
|
+
is_identity_verified: boolean;
|
|
9493
|
+
temporary_access_only: boolean;
|
|
9494
|
+
} | null | undefined;
|
|
9495
|
+
}>;
|
|
9444
9496
|
/**
|
|
9445
9497
|
* Make a workspace usable for requests that name it, WITHOUT changing the current workspace
|
|
9446
9498
|
* (on the server or in the host). `removeUsers` and `documents.list` open the workspace they
|
|
@@ -11105,6 +11157,9 @@ declare class Arbi {
|
|
|
11105
11157
|
by_feature: {
|
|
11106
11158
|
[key: string]: components["schemas"]["TagBreakdown"];
|
|
11107
11159
|
};
|
|
11160
|
+
external_usage?: {
|
|
11161
|
+
[key: string]: unknown;
|
|
11162
|
+
} | null;
|
|
11108
11163
|
}>;
|
|
11109
11164
|
/** Notify people about a conversation (each gets a notification); resolves with who was. */
|
|
11110
11165
|
notify: (conversationId: string, userIds: string[]) => Promise<string[]>;
|
|
@@ -12065,6 +12120,7 @@ declare class Arbi {
|
|
|
12065
12120
|
}[]>;
|
|
12066
12121
|
groupByStatus: typeof groupContactsByStatus;
|
|
12067
12122
|
};
|
|
12123
|
+
private withContactKeys;
|
|
12068
12124
|
/** The keys the calendar unlock needs; `null` before login (calendars then read as locked). */
|
|
12069
12125
|
private calendarKeys;
|
|
12070
12126
|
/** Run `op` once this server session holds the calendar keys (unlocked once per session). */
|
|
@@ -13960,6 +14016,7 @@ declare class Arbi {
|
|
|
13960
14016
|
MODEL_NAME: string;
|
|
13961
14017
|
SYSTEM_INSTRUCTION: string;
|
|
13962
14018
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
14019
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
13963
14020
|
TEMPERATURE: number;
|
|
13964
14021
|
MAX_TOKENS: number;
|
|
13965
14022
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -14182,6 +14239,9 @@ declare class Arbi {
|
|
|
14182
14239
|
supports_reasoning?: boolean | null | undefined;
|
|
14183
14240
|
supports_function_calling?: boolean | null | undefined;
|
|
14184
14241
|
supports_response_schema?: boolean | null | undefined;
|
|
14242
|
+
display_name?: string | null | undefined;
|
|
14243
|
+
connection_scope?: string | null | undefined;
|
|
14244
|
+
externally_billed: boolean;
|
|
14185
14245
|
}[];
|
|
14186
14246
|
premium_default?: string | null | undefined;
|
|
14187
14247
|
}>;
|
|
@@ -14224,6 +14284,9 @@ declare class Arbi {
|
|
|
14224
14284
|
supports_reasoning?: boolean | null | undefined;
|
|
14225
14285
|
supports_function_calling?: boolean | null | undefined;
|
|
14226
14286
|
supports_response_schema?: boolean | null | undefined;
|
|
14287
|
+
display_name?: string | null | undefined;
|
|
14288
|
+
connection_scope?: string | null | undefined;
|
|
14289
|
+
externally_billed: boolean;
|
|
14227
14290
|
}[];
|
|
14228
14291
|
premium_default?: string | null | undefined;
|
|
14229
14292
|
}>;
|
|
@@ -14437,6 +14500,7 @@ declare class Arbi {
|
|
|
14437
14500
|
MODEL_NAME: string;
|
|
14438
14501
|
SYSTEM_INSTRUCTION: string;
|
|
14439
14502
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
14503
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
14440
14504
|
TEMPERATURE: number;
|
|
14441
14505
|
MAX_TOKENS: number;
|
|
14442
14506
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -15566,6 +15630,7 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
|
|
|
15566
15630
|
MODEL_NAME: string;
|
|
15567
15631
|
SYSTEM_INSTRUCTION: string;
|
|
15568
15632
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
15633
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
15569
15634
|
TEMPERATURE: number;
|
|
15570
15635
|
MAX_TOKENS: number;
|
|
15571
15636
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -15788,6 +15853,9 @@ declare function getModels(arbi: ArbiClient): Promise<{
|
|
|
15788
15853
|
supports_reasoning?: boolean | null | undefined;
|
|
15789
15854
|
supports_function_calling?: boolean | null | undefined;
|
|
15790
15855
|
supports_response_schema?: boolean | null | undefined;
|
|
15856
|
+
display_name?: string | null | undefined;
|
|
15857
|
+
connection_scope?: string | null | undefined;
|
|
15858
|
+
externally_billed: boolean;
|
|
15791
15859
|
}[];
|
|
15792
15860
|
premium_default?: string | null | undefined;
|
|
15793
15861
|
}>;
|
|
@@ -15843,6 +15911,9 @@ declare function getHealthModels(arbi: ArbiClient): Promise<{
|
|
|
15843
15911
|
supports_reasoning?: boolean | null | undefined;
|
|
15844
15912
|
supports_function_calling?: boolean | null | undefined;
|
|
15845
15913
|
supports_response_schema?: boolean | null | undefined;
|
|
15914
|
+
display_name?: string | null | undefined;
|
|
15915
|
+
connection_scope?: string | null | undefined;
|
|
15916
|
+
externally_billed: boolean;
|
|
15846
15917
|
}[];
|
|
15847
15918
|
premium_default?: string | null | undefined;
|
|
15848
15919
|
}>;
|
|
@@ -2289,6 +2289,25 @@ declare function getWorkspaceTransfer(arbi: ArbiClient, transferId: string): Pro
|
|
|
2289
2289
|
declare function listWorkspaceTransfers(arbi: ArbiClient): Promise<TransferStatus[]>;
|
|
2290
2290
|
/** A scope's data for a download: its files (with versions and markup) and one JSON per kind. */
|
|
2291
2291
|
declare function exportWorkspaceData(arbi: ArbiClient, scope: TransferScope): Promise<WorkspaceExport>;
|
|
2292
|
+
/** Metadata for the caller’s own existing membership, including expired access. */
|
|
2293
|
+
declare function getWorkspaceAccessStatus(arbi: ArbiClient, workspaceId: string): Promise<{
|
|
2294
|
+
workspace_ext_id: string;
|
|
2295
|
+
workspace_name: string;
|
|
2296
|
+
access_expired: boolean;
|
|
2297
|
+
access_expires_at?: string | null | undefined;
|
|
2298
|
+
owner?: {
|
|
2299
|
+
external_id: string;
|
|
2300
|
+
parent_ext_id?: string | null | undefined;
|
|
2301
|
+
email: string;
|
|
2302
|
+
given_name: string;
|
|
2303
|
+
family_name?: string | null | undefined;
|
|
2304
|
+
picture?: string | null | undefined;
|
|
2305
|
+
encryption_public_key: string;
|
|
2306
|
+
is_sso: boolean;
|
|
2307
|
+
is_identity_verified: boolean;
|
|
2308
|
+
temporary_access_only: boolean;
|
|
2309
|
+
} | null | undefined;
|
|
2310
|
+
}>;
|
|
2292
2311
|
|
|
2293
2312
|
type workspaces_AddWorkspaceMembersRequest = AddWorkspaceMembersRequest;
|
|
2294
2313
|
declare const workspaces_EXTERNAL_ACCESS_SECONDS: typeof EXTERNAL_ACCESS_SECONDS;
|
|
@@ -2308,6 +2327,7 @@ declare const workspaces_copyDocuments: typeof copyDocuments;
|
|
|
2308
2327
|
declare const workspaces_createWorkspace: typeof createWorkspace;
|
|
2309
2328
|
declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
|
|
2310
2329
|
declare const workspaces_exportWorkspaceData: typeof exportWorkspaceData;
|
|
2330
|
+
declare const workspaces_getWorkspaceAccessStatus: typeof getWorkspaceAccessStatus;
|
|
2311
2331
|
declare const workspaces_getWorkspaceActivity: typeof getWorkspaceActivity;
|
|
2312
2332
|
declare const workspaces_getWorkspaceTransfer: typeof getWorkspaceTransfer;
|
|
2313
2333
|
declare const workspaces_grantTemporaryWorkspaceAccess: typeof grantTemporaryWorkspaceAccess;
|
|
@@ -2322,7 +2342,7 @@ declare const workspaces_setUserRole: typeof setUserRole;
|
|
|
2322
2342
|
declare const workspaces_startWorkspaceTransfer: typeof startWorkspaceTransfer;
|
|
2323
2343
|
declare const workspaces_updateWorkspace: typeof updateWorkspace;
|
|
2324
2344
|
declare namespace workspaces {
|
|
2325
|
-
export { type workspaces_AddWorkspaceMembersRequest as AddWorkspaceMembersRequest, workspaces_EXTERNAL_ACCESS_SECONDS as EXTERNAL_ACCESS_SECONDS, type workspaces_TransferConflictPolicy as TransferConflictPolicy, type workspaces_TransferKind as TransferKind, type workspaces_TransferMode as TransferMode, type workspaces_TransferPlan as TransferPlan, type workspaces_TransferScope as TransferScope, type workspaces_TransferStatus as TransferStatus, type workspaces_WorkspaceActivityOptions as WorkspaceActivityOptions, type workspaces_WorkspaceExport as WorkspaceExport, workspaces_addWorkspaceMembers as addWorkspaceMembers, workspaces_addWorkspaceMembersBody as addWorkspaceMembersBody, workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_cancelWorkspaceTransfer as cancelWorkspaceTransfer, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_exportWorkspaceData as exportWorkspaceData, workspaces_getWorkspaceActivity as getWorkspaceActivity, workspaces_getWorkspaceTransfer as getWorkspaceTransfer, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceTransfers as listWorkspaceTransfers, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_planWorkspaceTransfer as planWorkspaceTransfer, workspaces_primeWorkspaceKey as primeWorkspaceKey, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_resumeWorkspaceTransfer as resumeWorkspaceTransfer, workspaces_setUserRole as setUserRole, workspaces_startWorkspaceTransfer as startWorkspaceTransfer, workspaces_updateWorkspace as updateWorkspace };
|
|
2345
|
+
export { type workspaces_AddWorkspaceMembersRequest as AddWorkspaceMembersRequest, workspaces_EXTERNAL_ACCESS_SECONDS as EXTERNAL_ACCESS_SECONDS, type workspaces_TransferConflictPolicy as TransferConflictPolicy, type workspaces_TransferKind as TransferKind, type workspaces_TransferMode as TransferMode, type workspaces_TransferPlan as TransferPlan, type workspaces_TransferScope as TransferScope, type workspaces_TransferStatus as TransferStatus, type workspaces_WorkspaceActivityOptions as WorkspaceActivityOptions, type workspaces_WorkspaceExport as WorkspaceExport, workspaces_addWorkspaceMembers as addWorkspaceMembers, workspaces_addWorkspaceMembersBody as addWorkspaceMembersBody, workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_cancelWorkspaceTransfer as cancelWorkspaceTransfer, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_exportWorkspaceData as exportWorkspaceData, workspaces_getWorkspaceAccessStatus as getWorkspaceAccessStatus, workspaces_getWorkspaceActivity as getWorkspaceActivity, workspaces_getWorkspaceTransfer as getWorkspaceTransfer, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceTransfers as listWorkspaceTransfers, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_planWorkspaceTransfer as planWorkspaceTransfer, workspaces_primeWorkspaceKey as primeWorkspaceKey, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_resumeWorkspaceTransfer as resumeWorkspaceTransfer, workspaces_setUserRole as setUserRole, workspaces_startWorkspaceTransfer as startWorkspaceTransfer, workspaces_updateWorkspace as updateWorkspace };
|
|
2326
2346
|
}
|
|
2327
2347
|
|
|
2328
2348
|
/**
|
|
@@ -3808,7 +3828,7 @@ declare namespace tags {
|
|
|
3808
3828
|
/**
|
|
3809
3829
|
* Contact operations (`/v1/contacts`) — one address book: registered people, pending invitations and plain
|
|
3810
3830
|
* cards. A card's details are encrypted under its address book's key; a session without that key bridged
|
|
3811
|
-
* (`Arbi.contacts` bridges it first, through the
|
|
3831
|
+
* (`Arbi.contacts` bridges it first, through the contacts key endpoints) gets `card: null` for stored cards and
|
|
3812
3832
|
* cannot write them (423).
|
|
3813
3833
|
*/
|
|
3814
3834
|
|
|
@@ -3820,6 +3840,12 @@ type ContactCardWrite = S$1['ContactCardWrite'];
|
|
|
3820
3840
|
type ContactCreate = S$1['ContactCreate'];
|
|
3821
3841
|
type ContactImportResult = S$1['ContactImportResult'];
|
|
3822
3842
|
type PersonSuggestion = S$1['PersonSuggestion'];
|
|
3843
|
+
/** Address-book keys are separate from the paid calendar's key bridge. */
|
|
3844
|
+
interface ContactSessionKeys {
|
|
3845
|
+
signingPrivateKey: Uint8Array;
|
|
3846
|
+
serverSessionKey: Uint8Array;
|
|
3847
|
+
}
|
|
3848
|
+
declare function ensureContactsUnlocked(client: ArbiClient, keys: ContactSessionKeys | null): Promise<void>;
|
|
3823
3849
|
declare function listContacts(arbi: ArbiClient): Promise<Contact[]>;
|
|
3824
3850
|
/** Invite or link people by e-mail (max 100); one row per address with its `outcome`. */
|
|
3825
3851
|
declare function inviteContacts(arbi: ArbiClient, emails: string[]): Promise<Contact[]>;
|
|
@@ -3858,10 +3884,12 @@ type contacts_ContactCard = ContactCard;
|
|
|
3858
3884
|
type contacts_ContactCardWrite = ContactCardWrite;
|
|
3859
3885
|
type contacts_ContactCreate = ContactCreate;
|
|
3860
3886
|
type contacts_ContactImportResult = ContactImportResult;
|
|
3887
|
+
type contacts_ContactSessionKeys = ContactSessionKeys;
|
|
3861
3888
|
type contacts_ContactStatus = ContactStatus;
|
|
3862
3889
|
type contacts_PersonSuggestion = PersonSuggestion;
|
|
3863
3890
|
declare const contacts_createContact: typeof createContact;
|
|
3864
3891
|
declare const contacts_deleteContact: typeof deleteContact;
|
|
3892
|
+
declare const contacts_ensureContactsUnlocked: typeof ensureContactsUnlocked;
|
|
3865
3893
|
declare const contacts_groupContactsByStatus: typeof groupContactsByStatus;
|
|
3866
3894
|
declare const contacts_importContacts: typeof importContacts;
|
|
3867
3895
|
declare const contacts_inviteContacts: typeof inviteContacts;
|
|
@@ -3870,7 +3898,7 @@ declare const contacts_listContacts: typeof listContacts;
|
|
|
3870
3898
|
declare const contacts_searchContacts: typeof searchContacts;
|
|
3871
3899
|
declare const contacts_updateContact: typeof updateContact;
|
|
3872
3900
|
declare namespace contacts {
|
|
3873
|
-
export { type contacts_Contact as Contact, type contacts_ContactCard as ContactCard, type contacts_ContactCardWrite as ContactCardWrite, type contacts_ContactCreate as ContactCreate, type contacts_ContactImportResult as ContactImportResult, type contacts_ContactStatus as ContactStatus, type contacts_PersonSuggestion as PersonSuggestion, contacts_createContact as createContact, contacts_deleteContact as deleteContact, contacts_groupContactsByStatus as groupContactsByStatus, contacts_importContacts as importContacts, contacts_inviteContacts as inviteContacts, contacts_linkContact as linkContact, contacts_listContacts as listContacts, contacts_searchContacts as searchContacts, contacts_updateContact as updateContact };
|
|
3901
|
+
export { type contacts_Contact as Contact, type contacts_ContactCard as ContactCard, type contacts_ContactCardWrite as ContactCardWrite, type contacts_ContactCreate as ContactCreate, type contacts_ContactImportResult as ContactImportResult, type contacts_ContactSessionKeys as ContactSessionKeys, type contacts_ContactStatus as ContactStatus, type contacts_PersonSuggestion as PersonSuggestion, contacts_createContact as createContact, contacts_deleteContact as deleteContact, contacts_ensureContactsUnlocked as ensureContactsUnlocked, contacts_groupContactsByStatus as groupContactsByStatus, contacts_importContacts as importContacts, contacts_inviteContacts as inviteContacts, contacts_linkContact as linkContact, contacts_listContacts as listContacts, contacts_searchContacts as searchContacts, contacts_updateContact as updateContact };
|
|
3874
3902
|
}
|
|
3875
3903
|
|
|
3876
3904
|
/**
|
|
@@ -4759,6 +4787,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
4759
4787
|
MODEL_NAME: string;
|
|
4760
4788
|
SYSTEM_INSTRUCTION: string;
|
|
4761
4789
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
4790
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
4762
4791
|
TEMPERATURE: number;
|
|
4763
4792
|
MAX_TOKENS: number;
|
|
4764
4793
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -7033,8 +7062,7 @@ declare namespace facts {
|
|
|
7033
7062
|
* session reads it only once those keys are bridged to it ({@link unlockCalendarKeys}:
|
|
7034
7063
|
* GET /keys → unseal with the user's key → reseal to the session → POST /session-keys).
|
|
7035
7064
|
* {@link ensureCalendarUnlocked} does that once per server session; `Arbi.calendar` calls it
|
|
7036
|
-
* before every content request.
|
|
7037
|
-
* bridge carries, so the contacts operations need it too.
|
|
7065
|
+
* before every calendar content request. Contacts use their own address-book key bridge.
|
|
7038
7066
|
*
|
|
7039
7067
|
* `/v1/calendar` is user-global (not workspace-scoped); only `/overlays` reads the open workspace.
|
|
7040
7068
|
*/
|
|
@@ -8350,6 +8378,9 @@ declare class Arbi {
|
|
|
8350
8378
|
[key: string]: components["schemas"]["TagBreakdown"];
|
|
8351
8379
|
};
|
|
8352
8380
|
unattributed: components["schemas"]["TagBreakdown"];
|
|
8381
|
+
external_usage?: {
|
|
8382
|
+
[key: string]: unknown;
|
|
8383
|
+
} | null;
|
|
8353
8384
|
}>;
|
|
8354
8385
|
refresh: (projectExtId: string) => Promise<{
|
|
8355
8386
|
external_id: string;
|
|
@@ -8491,6 +8522,9 @@ declare class Arbi {
|
|
|
8491
8522
|
[key: string]: components["schemas"]["TagBreakdown"];
|
|
8492
8523
|
};
|
|
8493
8524
|
invoice_pdf?: string | null;
|
|
8525
|
+
external_usage?: {
|
|
8526
|
+
[key: string]: unknown;
|
|
8527
|
+
} | null;
|
|
8494
8528
|
}>;
|
|
8495
8529
|
/** Stripe invoices for a project's subscription. */
|
|
8496
8530
|
invoices: (projectExtId: string) => Promise<{
|
|
@@ -9441,6 +9475,24 @@ declare class Arbi {
|
|
|
9441
9475
|
};
|
|
9442
9476
|
private syncIdentity;
|
|
9443
9477
|
readonly workspaces: {
|
|
9478
|
+
accessStatus: (workspaceId: string) => Promise<{
|
|
9479
|
+
workspace_ext_id: string;
|
|
9480
|
+
workspace_name: string;
|
|
9481
|
+
access_expired: boolean;
|
|
9482
|
+
access_expires_at?: string | null | undefined;
|
|
9483
|
+
owner?: {
|
|
9484
|
+
external_id: string;
|
|
9485
|
+
parent_ext_id?: string | null | undefined;
|
|
9486
|
+
email: string;
|
|
9487
|
+
given_name: string;
|
|
9488
|
+
family_name?: string | null | undefined;
|
|
9489
|
+
picture?: string | null | undefined;
|
|
9490
|
+
encryption_public_key: string;
|
|
9491
|
+
is_sso: boolean;
|
|
9492
|
+
is_identity_verified: boolean;
|
|
9493
|
+
temporary_access_only: boolean;
|
|
9494
|
+
} | null | undefined;
|
|
9495
|
+
}>;
|
|
9444
9496
|
/**
|
|
9445
9497
|
* Make a workspace usable for requests that name it, WITHOUT changing the current workspace
|
|
9446
9498
|
* (on the server or in the host). `removeUsers` and `documents.list` open the workspace they
|
|
@@ -11105,6 +11157,9 @@ declare class Arbi {
|
|
|
11105
11157
|
by_feature: {
|
|
11106
11158
|
[key: string]: components["schemas"]["TagBreakdown"];
|
|
11107
11159
|
};
|
|
11160
|
+
external_usage?: {
|
|
11161
|
+
[key: string]: unknown;
|
|
11162
|
+
} | null;
|
|
11108
11163
|
}>;
|
|
11109
11164
|
/** Notify people about a conversation (each gets a notification); resolves with who was. */
|
|
11110
11165
|
notify: (conversationId: string, userIds: string[]) => Promise<string[]>;
|
|
@@ -12065,6 +12120,7 @@ declare class Arbi {
|
|
|
12065
12120
|
}[]>;
|
|
12066
12121
|
groupByStatus: typeof groupContactsByStatus;
|
|
12067
12122
|
};
|
|
12123
|
+
private withContactKeys;
|
|
12068
12124
|
/** The keys the calendar unlock needs; `null` before login (calendars then read as locked). */
|
|
12069
12125
|
private calendarKeys;
|
|
12070
12126
|
/** Run `op` once this server session holds the calendar keys (unlocked once per session). */
|
|
@@ -13960,6 +14016,7 @@ declare class Arbi {
|
|
|
13960
14016
|
MODEL_NAME: string;
|
|
13961
14017
|
SYSTEM_INSTRUCTION: string;
|
|
13962
14018
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
14019
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
13963
14020
|
TEMPERATURE: number;
|
|
13964
14021
|
MAX_TOKENS: number;
|
|
13965
14022
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -14182,6 +14239,9 @@ declare class Arbi {
|
|
|
14182
14239
|
supports_reasoning?: boolean | null | undefined;
|
|
14183
14240
|
supports_function_calling?: boolean | null | undefined;
|
|
14184
14241
|
supports_response_schema?: boolean | null | undefined;
|
|
14242
|
+
display_name?: string | null | undefined;
|
|
14243
|
+
connection_scope?: string | null | undefined;
|
|
14244
|
+
externally_billed: boolean;
|
|
14185
14245
|
}[];
|
|
14186
14246
|
premium_default?: string | null | undefined;
|
|
14187
14247
|
}>;
|
|
@@ -14224,6 +14284,9 @@ declare class Arbi {
|
|
|
14224
14284
|
supports_reasoning?: boolean | null | undefined;
|
|
14225
14285
|
supports_function_calling?: boolean | null | undefined;
|
|
14226
14286
|
supports_response_schema?: boolean | null | undefined;
|
|
14287
|
+
display_name?: string | null | undefined;
|
|
14288
|
+
connection_scope?: string | null | undefined;
|
|
14289
|
+
externally_billed: boolean;
|
|
14227
14290
|
}[];
|
|
14228
14291
|
premium_default?: string | null | undefined;
|
|
14229
14292
|
}>;
|
|
@@ -14437,6 +14500,7 @@ declare class Arbi {
|
|
|
14437
14500
|
MODEL_NAME: string;
|
|
14438
14501
|
SYSTEM_INSTRUCTION: string;
|
|
14439
14502
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
14503
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
14440
14504
|
TEMPERATURE: number;
|
|
14441
14505
|
MAX_TOKENS: number;
|
|
14442
14506
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -15566,6 +15630,7 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
|
|
|
15566
15630
|
MODEL_NAME: string;
|
|
15567
15631
|
SYSTEM_INSTRUCTION: string;
|
|
15568
15632
|
MAX_TOKEN_CONTEXT_TO_ANSWER: number;
|
|
15633
|
+
METADATA_CONTEXT_TOKENS: number;
|
|
15569
15634
|
TEMPERATURE: number;
|
|
15570
15635
|
MAX_TOKENS: number;
|
|
15571
15636
|
MAX_CONCURRENT_DOCS: number;
|
|
@@ -15788,6 +15853,9 @@ declare function getModels(arbi: ArbiClient): Promise<{
|
|
|
15788
15853
|
supports_reasoning?: boolean | null | undefined;
|
|
15789
15854
|
supports_function_calling?: boolean | null | undefined;
|
|
15790
15855
|
supports_response_schema?: boolean | null | undefined;
|
|
15856
|
+
display_name?: string | null | undefined;
|
|
15857
|
+
connection_scope?: string | null | undefined;
|
|
15858
|
+
externally_billed: boolean;
|
|
15791
15859
|
}[];
|
|
15792
15860
|
premium_default?: string | null | undefined;
|
|
15793
15861
|
}>;
|
|
@@ -15843,6 +15911,9 @@ declare function getHealthModels(arbi: ArbiClient): Promise<{
|
|
|
15843
15911
|
supports_reasoning?: boolean | null | undefined;
|
|
15844
15912
|
supports_function_calling?: boolean | null | undefined;
|
|
15845
15913
|
supports_response_schema?: boolean | null | undefined;
|
|
15914
|
+
display_name?: string | null | undefined;
|
|
15915
|
+
connection_scope?: string | null | undefined;
|
|
15916
|
+
externally_billed: boolean;
|
|
15846
15917
|
}[];
|
|
15847
15918
|
premium_default?: string | null | undefined;
|
|
15848
15919
|
}>;
|
package/dist/browser.cjs
CHANGED
|
@@ -5068,6 +5068,7 @@ __export(workspaces_exports, {
|
|
|
5068
5068
|
createWorkspace: () => createWorkspace,
|
|
5069
5069
|
deleteWorkspaces: () => deleteWorkspaces,
|
|
5070
5070
|
exportWorkspaceData: () => exportWorkspaceData,
|
|
5071
|
+
getWorkspaceAccessStatus: () => getWorkspaceAccessStatus,
|
|
5071
5072
|
getWorkspaceActivity: () => getWorkspaceActivity,
|
|
5072
5073
|
getWorkspaceTransfer: () => getWorkspaceTransfer,
|
|
5073
5074
|
grantTemporaryWorkspaceAccess: () => grantTemporaryWorkspaceAccess,
|
|
@@ -5268,6 +5269,14 @@ async function exportWorkspaceData(arbi, scope) {
|
|
|
5268
5269
|
"Failed to export the workspace"
|
|
5269
5270
|
);
|
|
5270
5271
|
}
|
|
5272
|
+
async function getWorkspaceAccessStatus(arbi, workspaceId) {
|
|
5273
|
+
return requireData(
|
|
5274
|
+
await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/access-status", {
|
|
5275
|
+
params: { path: { workspace_ext_id: workspaceId } }
|
|
5276
|
+
}),
|
|
5277
|
+
"Could not read workspace access"
|
|
5278
|
+
);
|
|
5279
|
+
}
|
|
5271
5280
|
|
|
5272
5281
|
// src/operations/conversations.ts
|
|
5273
5282
|
var conversations_exports = {};
|
|
@@ -5954,6 +5963,7 @@ var contacts_exports = {};
|
|
|
5954
5963
|
__export(contacts_exports, {
|
|
5955
5964
|
createContact: () => createContact,
|
|
5956
5965
|
deleteContact: () => deleteContact,
|
|
5966
|
+
ensureContactsUnlocked: () => ensureContactsUnlocked,
|
|
5957
5967
|
groupContactsByStatus: () => groupContactsByStatus,
|
|
5958
5968
|
importContacts: () => importContacts,
|
|
5959
5969
|
inviteContacts: () => inviteContacts,
|
|
@@ -5962,6 +5972,42 @@ __export(contacts_exports, {
|
|
|
5962
5972
|
searchContacts: () => searchContacts,
|
|
5963
5973
|
updateContact: () => updateContact
|
|
5964
5974
|
});
|
|
5975
|
+
var contactUnlocks = /* @__PURE__ */ new WeakMap();
|
|
5976
|
+
async function ensureContactsUnlocked(client, keys) {
|
|
5977
|
+
if (!keys) return;
|
|
5978
|
+
let pending = contactUnlocks.get(keys.serverSessionKey);
|
|
5979
|
+
if (!pending) {
|
|
5980
|
+
pending = unlockContacts(client, keys).catch((error) => {
|
|
5981
|
+
contactUnlocks.delete(keys.serverSessionKey);
|
|
5982
|
+
throw error;
|
|
5983
|
+
});
|
|
5984
|
+
contactUnlocks.set(keys.serverSessionKey, pending);
|
|
5985
|
+
}
|
|
5986
|
+
await pending;
|
|
5987
|
+
}
|
|
5988
|
+
async function unlockContacts(client$1, keys) {
|
|
5989
|
+
await client.initSodium();
|
|
5990
|
+
const keypair = client.encryptionKeypairFromSigningKey(keys.signingPrivateKey);
|
|
5991
|
+
try {
|
|
5992
|
+
const page = requireData(await client$1.fetch.GET("/v1/contacts/keys"), "Reading contact keys");
|
|
5993
|
+
const sealed = {};
|
|
5994
|
+
for (const [id, wrapped] of Object.entries(page.keys)) {
|
|
5995
|
+
const key = client.sealedBoxDecrypt(wrapped, keypair.secretKey);
|
|
5996
|
+
try {
|
|
5997
|
+
sealed[id] = await client.sealKeyForSession(key, keys.serverSessionKey);
|
|
5998
|
+
} finally {
|
|
5999
|
+
key.fill(0);
|
|
6000
|
+
}
|
|
6001
|
+
}
|
|
6002
|
+
if (Object.keys(sealed).length)
|
|
6003
|
+
requireOk(
|
|
6004
|
+
await client$1.fetch.POST("/v1/contacts/session-keys", { body: { keys: sealed } }),
|
|
6005
|
+
"Unlocking contacts"
|
|
6006
|
+
);
|
|
6007
|
+
} finally {
|
|
6008
|
+
keypair.secretKey.fill(0);
|
|
6009
|
+
}
|
|
6010
|
+
}
|
|
5965
6011
|
function requireContact(result, message) {
|
|
5966
6012
|
const error = result.error;
|
|
5967
6013
|
if (result.response?.status === 409 && error && typeof error === "object" && "contact_id" in error)
|
|
@@ -10453,6 +10499,7 @@ var Arbi = class {
|
|
|
10453
10499
|
}
|
|
10454
10500
|
// ── Workspaces ────────────────────────────────────────────────────────
|
|
10455
10501
|
workspaces = {
|
|
10502
|
+
accessStatus: (workspaceId) => getWorkspaceAccessStatus(this.requireClient(), workspaceId),
|
|
10456
10503
|
/**
|
|
10457
10504
|
* Make a workspace usable for requests that name it, WITHOUT changing the current workspace
|
|
10458
10505
|
* (on the server or in the host). `removeUsers` and `documents.list` open the workspace they
|
|
@@ -10960,22 +11007,27 @@ var Arbi = class {
|
|
|
10960
11007
|
generate: (tagIds, docIds, options) => generateDocTags(this.requireClient(), tagIds, docIds, options)
|
|
10961
11008
|
};
|
|
10962
11009
|
// ── Contacts ──────────────────────────────────────────────────────────
|
|
10963
|
-
// A card is sealed under its address book's key, which the
|
|
11010
|
+
// A card is sealed under its address book's key, which the contacts key bridge carries: without
|
|
10964
11011
|
// it the server returns `card: null` and refuses card writes.
|
|
10965
11012
|
contacts = {
|
|
10966
|
-
list: () => this.
|
|
11013
|
+
list: () => this.withContactKeys((c2) => listContacts(c2)),
|
|
10967
11014
|
invite: (emails) => inviteContacts(this.requireClient(), emails),
|
|
10968
|
-
create: (body) => this.
|
|
10969
|
-
update: (contactId, card) => this.
|
|
11015
|
+
create: (body) => this.withContactKeys((c2) => createContact(c2, body)),
|
|
11016
|
+
update: (contactId, card) => this.withContactKeys((c2) => updateContact(c2, contactId, card)),
|
|
10970
11017
|
/** Link a card-only contact to `email` (invites it, or links the account at once). */
|
|
10971
|
-
link: (contactId, email, card) => this.
|
|
10972
|
-
delete: (contactId) => this.
|
|
11018
|
+
link: (contactId, email, card) => this.withContactKeys((c2) => linkContact(c2, contactId, email, card)),
|
|
11019
|
+
delete: (contactId) => this.withContactKeys((c2) => deleteContact(c2, contactId)),
|
|
10973
11020
|
/** Import one .vcf file (Pro). */
|
|
10974
|
-
import: (file) => this.
|
|
10975
|
-
search: (q2) => this.
|
|
11021
|
+
import: (file) => this.withContactKeys((c2) => importContacts(c2, file)),
|
|
11022
|
+
search: (q2) => this.withContactKeys((c2) => searchContacts(c2, q2)),
|
|
10976
11023
|
groupByStatus: groupContactsByStatus
|
|
10977
11024
|
};
|
|
10978
11025
|
// ── Calendar ──────────────────────────────────────────────────────────
|
|
11026
|
+
async withContactKeys(op) {
|
|
11027
|
+
const client = this.requireClient();
|
|
11028
|
+
await ensureContactsUnlocked(client, this.calendarKeys());
|
|
11029
|
+
return op(client);
|
|
11030
|
+
}
|
|
10979
11031
|
/** The keys the calendar unlock needs; `null` before login (calendars then read as locked). */
|
|
10980
11032
|
calendarKeys() {
|
|
10981
11033
|
const login = this.loginResult;
|