@arbidocs/sdk 0.4.18 → 0.4.25
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-DY8mQOdF.d.cts → browser-C9-wve7D.d.cts} +55 -0
- package/dist/{browser-DY8mQOdF.d.ts → browser-C9-wve7D.d.ts} +55 -0
- package/dist/browser.cjs +51 -3
- 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 +51 -3
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +51 -3
- 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 +51 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1923,6 +1923,7 @@ interface RetrieveResult {
|
|
|
1923
1923
|
*/
|
|
1924
1924
|
declare function retrieve(options: RetrieveOptions): Promise<RetrieveResult>;
|
|
1925
1925
|
interface AssistantQueryOptions extends AuthHeaders {
|
|
1926
|
+
activeArtifactExtId?: string;
|
|
1926
1927
|
workspaceId: string;
|
|
1927
1928
|
question: string;
|
|
1928
1929
|
docIds: string[];
|
|
@@ -2215,6 +2216,7 @@ declare function listDMs(arbi: ArbiClient): Promise<{
|
|
|
2215
2216
|
is_sso: boolean;
|
|
2216
2217
|
};
|
|
2217
2218
|
workspace_ext_id?: string | null | undefined;
|
|
2219
|
+
dm_context_only: boolean;
|
|
2218
2220
|
content?: string | null | undefined;
|
|
2219
2221
|
conversation_ext_id?: string | null | undefined;
|
|
2220
2222
|
message_ext_id?: string | null | undefined;
|
|
@@ -2231,6 +2233,7 @@ declare function listDecryptedDMs(arbi: ArbiClient, crypto: DmCryptoContext): Pr
|
|
|
2231
2233
|
sender: components["schemas"]["UserResponse"];
|
|
2232
2234
|
recipient: components["schemas"]["UserResponse"];
|
|
2233
2235
|
workspace_ext_id?: string | null;
|
|
2236
|
+
dm_context_only: boolean;
|
|
2234
2237
|
content?: string | null;
|
|
2235
2238
|
conversation_ext_id?: string | null;
|
|
2236
2239
|
message_ext_id?: string | null;
|
|
@@ -2273,6 +2276,7 @@ declare function listActivity(arbi: ArbiClient, options?: {
|
|
|
2273
2276
|
is_sso: boolean;
|
|
2274
2277
|
};
|
|
2275
2278
|
workspace_ext_id?: string | null | undefined;
|
|
2279
|
+
dm_context_only: boolean;
|
|
2276
2280
|
content?: string | null | undefined;
|
|
2277
2281
|
conversation_ext_id?: string | null | undefined;
|
|
2278
2282
|
message_ext_id?: string | null | undefined;
|
|
@@ -2354,6 +2358,7 @@ declare function requestWorkspaceAccess(arbi: ArbiClient, params: {
|
|
|
2354
2358
|
is_sso: boolean;
|
|
2355
2359
|
};
|
|
2356
2360
|
workspace_ext_id?: string | null | undefined;
|
|
2361
|
+
dm_context_only: boolean;
|
|
2357
2362
|
content?: string | null | undefined;
|
|
2358
2363
|
conversation_ext_id?: string | null | undefined;
|
|
2359
2364
|
message_ext_id?: string | null | undefined;
|
|
@@ -2392,6 +2397,7 @@ declare function sendDM(arbi: ArbiClient, messages: Array<{
|
|
|
2392
2397
|
is_sso: boolean;
|
|
2393
2398
|
};
|
|
2394
2399
|
workspace_ext_id?: string | null | undefined;
|
|
2400
|
+
dm_context_only: boolean;
|
|
2395
2401
|
content?: string | null | undefined;
|
|
2396
2402
|
conversation_ext_id?: string | null | undefined;
|
|
2397
2403
|
message_ext_id?: string | null | undefined;
|
|
@@ -2423,6 +2429,7 @@ declare function markRead(arbi: ArbiClient, messageIds: string[]): Promise<{
|
|
|
2423
2429
|
is_sso: boolean;
|
|
2424
2430
|
};
|
|
2425
2431
|
workspace_ext_id?: string | null | undefined;
|
|
2432
|
+
dm_context_only: boolean;
|
|
2426
2433
|
content?: string | null | undefined;
|
|
2427
2434
|
conversation_ext_id?: string | null | undefined;
|
|
2428
2435
|
message_ext_id?: string | null | undefined;
|
|
@@ -2746,6 +2753,8 @@ interface ArbiOptions {
|
|
|
2746
2753
|
credentials?: 'include' | 'omit' | 'same-origin';
|
|
2747
2754
|
}
|
|
2748
2755
|
interface QueryOptions {
|
|
2756
|
+
/** Existing Word document to edit through tracked native operations. */
|
|
2757
|
+
activeArtifactExtId?: string;
|
|
2749
2758
|
/** Document IDs to search against */
|
|
2750
2759
|
docIds: string[];
|
|
2751
2760
|
/** Previous response ID for follow-up questions */
|
|
@@ -3317,6 +3326,7 @@ declare class Arbi {
|
|
|
3317
3326
|
is_sso: boolean;
|
|
3318
3327
|
};
|
|
3319
3328
|
workspace_ext_id?: string | null | undefined;
|
|
3329
|
+
dm_context_only: boolean;
|
|
3320
3330
|
content?: string | null | undefined;
|
|
3321
3331
|
conversation_ext_id?: string | null | undefined;
|
|
3322
3332
|
message_ext_id?: string | null | undefined;
|
|
@@ -4420,6 +4430,46 @@ declare class Arbi {
|
|
|
4420
4430
|
assistant_mode: components["schemas"]["AssistantMode"];
|
|
4421
4431
|
}>;
|
|
4422
4432
|
};
|
|
4433
|
+
/** Persisted notifications also arrive on the normal workspace WebSocket. */
|
|
4434
|
+
readonly notifications: {
|
|
4435
|
+
list: (type?: components["schemas"]["NotificationType"]) => Promise<{
|
|
4436
|
+
type: components["schemas"]["NotificationType"];
|
|
4437
|
+
external_id: string;
|
|
4438
|
+
sender: {
|
|
4439
|
+
external_id: string;
|
|
4440
|
+
parent_ext_id?: string | null | undefined;
|
|
4441
|
+
email: string;
|
|
4442
|
+
given_name: string;
|
|
4443
|
+
family_name?: string | null | undefined;
|
|
4444
|
+
picture?: string | null | undefined;
|
|
4445
|
+
encryption_public_key: string;
|
|
4446
|
+
is_sso: boolean;
|
|
4447
|
+
};
|
|
4448
|
+
recipient: {
|
|
4449
|
+
external_id: string;
|
|
4450
|
+
parent_ext_id?: string | null | undefined;
|
|
4451
|
+
email: string;
|
|
4452
|
+
given_name: string;
|
|
4453
|
+
family_name?: string | null | undefined;
|
|
4454
|
+
picture?: string | null | undefined;
|
|
4455
|
+
encryption_public_key: string;
|
|
4456
|
+
is_sso: boolean;
|
|
4457
|
+
};
|
|
4458
|
+
workspace_ext_id?: string | null | undefined;
|
|
4459
|
+
dm_context_only: boolean;
|
|
4460
|
+
content?: string | null | undefined;
|
|
4461
|
+
conversation_ext_id?: string | null | undefined;
|
|
4462
|
+
message_ext_id?: string | null | undefined;
|
|
4463
|
+
read: boolean;
|
|
4464
|
+
created_at: string;
|
|
4465
|
+
updated_at: string;
|
|
4466
|
+
}[]>;
|
|
4467
|
+
markRead: (ids: string[]) => Promise<void>;
|
|
4468
|
+
};
|
|
4469
|
+
/** Authenticated native Word transport, with normal session recovery. */
|
|
4470
|
+
readonly editor: {
|
|
4471
|
+
request: (path: string, options?: RequestInit) => Promise<Response>;
|
|
4472
|
+
};
|
|
4423
4473
|
readonly assistant: {
|
|
4424
4474
|
/**
|
|
4425
4475
|
* Send a question to the RAG assistant with streaming support.
|
|
@@ -4635,6 +4685,7 @@ declare class Arbi {
|
|
|
4635
4685
|
sender: components["schemas"]["UserResponse"];
|
|
4636
4686
|
recipient: components["schemas"]["UserResponse"];
|
|
4637
4687
|
workspace_ext_id?: string | null;
|
|
4688
|
+
dm_context_only: boolean;
|
|
4638
4689
|
content?: string | null;
|
|
4639
4690
|
conversation_ext_id?: string | null;
|
|
4640
4691
|
message_ext_id?: string | null;
|
|
@@ -4653,6 +4704,7 @@ declare class Arbi {
|
|
|
4653
4704
|
sender: components["schemas"]["UserResponse"];
|
|
4654
4705
|
recipient: components["schemas"]["UserResponse"];
|
|
4655
4706
|
workspace_ext_id?: string | null;
|
|
4707
|
+
dm_context_only: boolean;
|
|
4656
4708
|
content?: string | null;
|
|
4657
4709
|
conversation_ext_id?: string | null;
|
|
4658
4710
|
message_ext_id?: string | null;
|
|
@@ -4670,6 +4722,7 @@ declare class Arbi {
|
|
|
4670
4722
|
sender: components["schemas"]["UserResponse"];
|
|
4671
4723
|
recipient: components["schemas"]["UserResponse"];
|
|
4672
4724
|
workspace_ext_id?: string | null;
|
|
4725
|
+
dm_context_only: boolean;
|
|
4673
4726
|
content?: string | null;
|
|
4674
4727
|
conversation_ext_id?: string | null;
|
|
4675
4728
|
message_ext_id?: string | null;
|
|
@@ -4703,6 +4756,7 @@ declare class Arbi {
|
|
|
4703
4756
|
is_sso: boolean;
|
|
4704
4757
|
};
|
|
4705
4758
|
workspace_ext_id?: string | null | undefined;
|
|
4759
|
+
dm_context_only: boolean;
|
|
4706
4760
|
content?: string | null | undefined;
|
|
4707
4761
|
conversation_ext_id?: string | null | undefined;
|
|
4708
4762
|
message_ext_id?: string | null | undefined;
|
|
@@ -4739,6 +4793,7 @@ declare class Arbi {
|
|
|
4739
4793
|
is_sso: boolean;
|
|
4740
4794
|
};
|
|
4741
4795
|
workspace_ext_id?: string | null | undefined;
|
|
4796
|
+
dm_context_only: boolean;
|
|
4742
4797
|
content?: string | null | undefined;
|
|
4743
4798
|
conversation_ext_id?: string | null | undefined;
|
|
4744
4799
|
message_ext_id?: string | null | undefined;
|
|
@@ -1923,6 +1923,7 @@ interface RetrieveResult {
|
|
|
1923
1923
|
*/
|
|
1924
1924
|
declare function retrieve(options: RetrieveOptions): Promise<RetrieveResult>;
|
|
1925
1925
|
interface AssistantQueryOptions extends AuthHeaders {
|
|
1926
|
+
activeArtifactExtId?: string;
|
|
1926
1927
|
workspaceId: string;
|
|
1927
1928
|
question: string;
|
|
1928
1929
|
docIds: string[];
|
|
@@ -2215,6 +2216,7 @@ declare function listDMs(arbi: ArbiClient): Promise<{
|
|
|
2215
2216
|
is_sso: boolean;
|
|
2216
2217
|
};
|
|
2217
2218
|
workspace_ext_id?: string | null | undefined;
|
|
2219
|
+
dm_context_only: boolean;
|
|
2218
2220
|
content?: string | null | undefined;
|
|
2219
2221
|
conversation_ext_id?: string | null | undefined;
|
|
2220
2222
|
message_ext_id?: string | null | undefined;
|
|
@@ -2231,6 +2233,7 @@ declare function listDecryptedDMs(arbi: ArbiClient, crypto: DmCryptoContext): Pr
|
|
|
2231
2233
|
sender: components["schemas"]["UserResponse"];
|
|
2232
2234
|
recipient: components["schemas"]["UserResponse"];
|
|
2233
2235
|
workspace_ext_id?: string | null;
|
|
2236
|
+
dm_context_only: boolean;
|
|
2234
2237
|
content?: string | null;
|
|
2235
2238
|
conversation_ext_id?: string | null;
|
|
2236
2239
|
message_ext_id?: string | null;
|
|
@@ -2273,6 +2276,7 @@ declare function listActivity(arbi: ArbiClient, options?: {
|
|
|
2273
2276
|
is_sso: boolean;
|
|
2274
2277
|
};
|
|
2275
2278
|
workspace_ext_id?: string | null | undefined;
|
|
2279
|
+
dm_context_only: boolean;
|
|
2276
2280
|
content?: string | null | undefined;
|
|
2277
2281
|
conversation_ext_id?: string | null | undefined;
|
|
2278
2282
|
message_ext_id?: string | null | undefined;
|
|
@@ -2354,6 +2358,7 @@ declare function requestWorkspaceAccess(arbi: ArbiClient, params: {
|
|
|
2354
2358
|
is_sso: boolean;
|
|
2355
2359
|
};
|
|
2356
2360
|
workspace_ext_id?: string | null | undefined;
|
|
2361
|
+
dm_context_only: boolean;
|
|
2357
2362
|
content?: string | null | undefined;
|
|
2358
2363
|
conversation_ext_id?: string | null | undefined;
|
|
2359
2364
|
message_ext_id?: string | null | undefined;
|
|
@@ -2392,6 +2397,7 @@ declare function sendDM(arbi: ArbiClient, messages: Array<{
|
|
|
2392
2397
|
is_sso: boolean;
|
|
2393
2398
|
};
|
|
2394
2399
|
workspace_ext_id?: string | null | undefined;
|
|
2400
|
+
dm_context_only: boolean;
|
|
2395
2401
|
content?: string | null | undefined;
|
|
2396
2402
|
conversation_ext_id?: string | null | undefined;
|
|
2397
2403
|
message_ext_id?: string | null | undefined;
|
|
@@ -2423,6 +2429,7 @@ declare function markRead(arbi: ArbiClient, messageIds: string[]): Promise<{
|
|
|
2423
2429
|
is_sso: boolean;
|
|
2424
2430
|
};
|
|
2425
2431
|
workspace_ext_id?: string | null | undefined;
|
|
2432
|
+
dm_context_only: boolean;
|
|
2426
2433
|
content?: string | null | undefined;
|
|
2427
2434
|
conversation_ext_id?: string | null | undefined;
|
|
2428
2435
|
message_ext_id?: string | null | undefined;
|
|
@@ -2746,6 +2753,8 @@ interface ArbiOptions {
|
|
|
2746
2753
|
credentials?: 'include' | 'omit' | 'same-origin';
|
|
2747
2754
|
}
|
|
2748
2755
|
interface QueryOptions {
|
|
2756
|
+
/** Existing Word document to edit through tracked native operations. */
|
|
2757
|
+
activeArtifactExtId?: string;
|
|
2749
2758
|
/** Document IDs to search against */
|
|
2750
2759
|
docIds: string[];
|
|
2751
2760
|
/** Previous response ID for follow-up questions */
|
|
@@ -3317,6 +3326,7 @@ declare class Arbi {
|
|
|
3317
3326
|
is_sso: boolean;
|
|
3318
3327
|
};
|
|
3319
3328
|
workspace_ext_id?: string | null | undefined;
|
|
3329
|
+
dm_context_only: boolean;
|
|
3320
3330
|
content?: string | null | undefined;
|
|
3321
3331
|
conversation_ext_id?: string | null | undefined;
|
|
3322
3332
|
message_ext_id?: string | null | undefined;
|
|
@@ -4420,6 +4430,46 @@ declare class Arbi {
|
|
|
4420
4430
|
assistant_mode: components["schemas"]["AssistantMode"];
|
|
4421
4431
|
}>;
|
|
4422
4432
|
};
|
|
4433
|
+
/** Persisted notifications also arrive on the normal workspace WebSocket. */
|
|
4434
|
+
readonly notifications: {
|
|
4435
|
+
list: (type?: components["schemas"]["NotificationType"]) => Promise<{
|
|
4436
|
+
type: components["schemas"]["NotificationType"];
|
|
4437
|
+
external_id: string;
|
|
4438
|
+
sender: {
|
|
4439
|
+
external_id: string;
|
|
4440
|
+
parent_ext_id?: string | null | undefined;
|
|
4441
|
+
email: string;
|
|
4442
|
+
given_name: string;
|
|
4443
|
+
family_name?: string | null | undefined;
|
|
4444
|
+
picture?: string | null | undefined;
|
|
4445
|
+
encryption_public_key: string;
|
|
4446
|
+
is_sso: boolean;
|
|
4447
|
+
};
|
|
4448
|
+
recipient: {
|
|
4449
|
+
external_id: string;
|
|
4450
|
+
parent_ext_id?: string | null | undefined;
|
|
4451
|
+
email: string;
|
|
4452
|
+
given_name: string;
|
|
4453
|
+
family_name?: string | null | undefined;
|
|
4454
|
+
picture?: string | null | undefined;
|
|
4455
|
+
encryption_public_key: string;
|
|
4456
|
+
is_sso: boolean;
|
|
4457
|
+
};
|
|
4458
|
+
workspace_ext_id?: string | null | undefined;
|
|
4459
|
+
dm_context_only: boolean;
|
|
4460
|
+
content?: string | null | undefined;
|
|
4461
|
+
conversation_ext_id?: string | null | undefined;
|
|
4462
|
+
message_ext_id?: string | null | undefined;
|
|
4463
|
+
read: boolean;
|
|
4464
|
+
created_at: string;
|
|
4465
|
+
updated_at: string;
|
|
4466
|
+
}[]>;
|
|
4467
|
+
markRead: (ids: string[]) => Promise<void>;
|
|
4468
|
+
};
|
|
4469
|
+
/** Authenticated native Word transport, with normal session recovery. */
|
|
4470
|
+
readonly editor: {
|
|
4471
|
+
request: (path: string, options?: RequestInit) => Promise<Response>;
|
|
4472
|
+
};
|
|
4423
4473
|
readonly assistant: {
|
|
4424
4474
|
/**
|
|
4425
4475
|
* Send a question to the RAG assistant with streaming support.
|
|
@@ -4635,6 +4685,7 @@ declare class Arbi {
|
|
|
4635
4685
|
sender: components["schemas"]["UserResponse"];
|
|
4636
4686
|
recipient: components["schemas"]["UserResponse"];
|
|
4637
4687
|
workspace_ext_id?: string | null;
|
|
4688
|
+
dm_context_only: boolean;
|
|
4638
4689
|
content?: string | null;
|
|
4639
4690
|
conversation_ext_id?: string | null;
|
|
4640
4691
|
message_ext_id?: string | null;
|
|
@@ -4653,6 +4704,7 @@ declare class Arbi {
|
|
|
4653
4704
|
sender: components["schemas"]["UserResponse"];
|
|
4654
4705
|
recipient: components["schemas"]["UserResponse"];
|
|
4655
4706
|
workspace_ext_id?: string | null;
|
|
4707
|
+
dm_context_only: boolean;
|
|
4656
4708
|
content?: string | null;
|
|
4657
4709
|
conversation_ext_id?: string | null;
|
|
4658
4710
|
message_ext_id?: string | null;
|
|
@@ -4670,6 +4722,7 @@ declare class Arbi {
|
|
|
4670
4722
|
sender: components["schemas"]["UserResponse"];
|
|
4671
4723
|
recipient: components["schemas"]["UserResponse"];
|
|
4672
4724
|
workspace_ext_id?: string | null;
|
|
4725
|
+
dm_context_only: boolean;
|
|
4673
4726
|
content?: string | null;
|
|
4674
4727
|
conversation_ext_id?: string | null;
|
|
4675
4728
|
message_ext_id?: string | null;
|
|
@@ -4703,6 +4756,7 @@ declare class Arbi {
|
|
|
4703
4756
|
is_sso: boolean;
|
|
4704
4757
|
};
|
|
4705
4758
|
workspace_ext_id?: string | null | undefined;
|
|
4759
|
+
dm_context_only: boolean;
|
|
4706
4760
|
content?: string | null | undefined;
|
|
4707
4761
|
conversation_ext_id?: string | null | undefined;
|
|
4708
4762
|
message_ext_id?: string | null | undefined;
|
|
@@ -4739,6 +4793,7 @@ declare class Arbi {
|
|
|
4739
4793
|
is_sso: boolean;
|
|
4740
4794
|
};
|
|
4741
4795
|
workspace_ext_id?: string | null | undefined;
|
|
4796
|
+
dm_context_only: boolean;
|
|
4742
4797
|
content?: string | null | undefined;
|
|
4743
4798
|
conversation_ext_id?: string | null | undefined;
|
|
4744
4799
|
message_ext_id?: string | null | undefined;
|
package/dist/browser.cjs
CHANGED
|
@@ -4943,9 +4943,20 @@ async function retrieve(options) {
|
|
|
4943
4943
|
return data;
|
|
4944
4944
|
}
|
|
4945
4945
|
async function queryAssistant(options) {
|
|
4946
|
-
const {
|
|
4946
|
+
const {
|
|
4947
|
+
workspaceId,
|
|
4948
|
+
question,
|
|
4949
|
+
docIds,
|
|
4950
|
+
previousResponseId,
|
|
4951
|
+
model,
|
|
4952
|
+
mentions,
|
|
4953
|
+
signal,
|
|
4954
|
+
activeArtifactExtId,
|
|
4955
|
+
...auth
|
|
4956
|
+
} = options;
|
|
4947
4957
|
const body = {
|
|
4948
4958
|
input: question,
|
|
4959
|
+
...activeArtifactExtId ? { active_artifact_ext_id: activeArtifactExtId } : {},
|
|
4949
4960
|
workspace_ext_id: workspaceId,
|
|
4950
4961
|
stream: true,
|
|
4951
4962
|
background: false,
|
|
@@ -5312,7 +5323,9 @@ async function sendEncryptedDM(arbi, messages, crypto) {
|
|
|
5312
5323
|
}))
|
|
5313
5324
|
);
|
|
5314
5325
|
const created = requireData(
|
|
5315
|
-
await arbi.fetch.POST("/v1/notifications/", {
|
|
5326
|
+
await arbi.fetch.POST("/v1/notifications/", {
|
|
5327
|
+
body: { messages: encrypted, context_only: false }
|
|
5328
|
+
}),
|
|
5316
5329
|
"Failed to send message"
|
|
5317
5330
|
);
|
|
5318
5331
|
return created.map((n2) => ({
|
|
@@ -5345,7 +5358,7 @@ async function requestWorkspaceAccess(arbi, params, crypto) {
|
|
|
5345
5358
|
async function sendDM(arbi, messages) {
|
|
5346
5359
|
return requireData(
|
|
5347
5360
|
await arbi.fetch.POST("/v1/notifications/", {
|
|
5348
|
-
body: { messages }
|
|
5361
|
+
body: { messages, context_only: false }
|
|
5349
5362
|
}),
|
|
5350
5363
|
"Failed to send message"
|
|
5351
5364
|
);
|
|
@@ -6321,6 +6334,40 @@ var Arbi = class {
|
|
|
6321
6334
|
assistantMode
|
|
6322
6335
|
)
|
|
6323
6336
|
};
|
|
6337
|
+
/** Persisted notifications also arrive on the normal workspace WebSocket. */
|
|
6338
|
+
notifications = {
|
|
6339
|
+
list: async (type) => {
|
|
6340
|
+
const { data, error } = await this.requireClient().fetch.GET("/v1/notifications/", {
|
|
6341
|
+
params: { query: { ...type ? { type } : {}, limit: 100 } }
|
|
6342
|
+
});
|
|
6343
|
+
if (error) throw new ArbiError("Could not load notifications");
|
|
6344
|
+
return data || [];
|
|
6345
|
+
},
|
|
6346
|
+
markRead: async (ids) => {
|
|
6347
|
+
if (!ids.length) return;
|
|
6348
|
+
const { error } = await this.requireClient().fetch.PATCH("/v1/notifications/", {
|
|
6349
|
+
body: { updates: ids.map((external_id) => ({ external_id, read: true })) }
|
|
6350
|
+
});
|
|
6351
|
+
if (error) throw new ArbiError("Could not mark notifications read");
|
|
6352
|
+
}
|
|
6353
|
+
};
|
|
6354
|
+
/** Authenticated native Word transport, with normal session recovery. */
|
|
6355
|
+
editor = {
|
|
6356
|
+
request: (path, options = {}) => this.recovering(async () => {
|
|
6357
|
+
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
6358
|
+
const headers = new Headers(options.headers);
|
|
6359
|
+
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
6360
|
+
const response = await fetch(`${baseUrl}/v1/editor${path}`, { ...options, headers });
|
|
6361
|
+
if (!response.ok) {
|
|
6362
|
+
const body = await response.json().catch(() => null);
|
|
6363
|
+
throw new ArbiApiError(body?.detail || `Document request failed (${response.status})`, {
|
|
6364
|
+
status: response.status,
|
|
6365
|
+
statusText: response.statusText
|
|
6366
|
+
});
|
|
6367
|
+
}
|
|
6368
|
+
return response;
|
|
6369
|
+
})
|
|
6370
|
+
};
|
|
6324
6371
|
// ── Assistant ─────────────────────────────────────────────────────────
|
|
6325
6372
|
assistant = {
|
|
6326
6373
|
/**
|
|
@@ -6337,6 +6384,7 @@ var Arbi = class {
|
|
|
6337
6384
|
docIds: options.docIds,
|
|
6338
6385
|
previousResponseId: options.previousResponseId,
|
|
6339
6386
|
model: options.model,
|
|
6387
|
+
activeArtifactExtId: options.activeArtifactExtId,
|
|
6340
6388
|
signal: options.signal
|
|
6341
6389
|
})
|
|
6342
6390
|
);
|