@arbidocs/sdk 0.5.147 → 0.5.149

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.
@@ -1269,6 +1269,12 @@ declare function listDocuments(arbi: ArbiClient, workspaceExtId?: string | null)
1269
1269
  doc_subject?: string | null | undefined;
1270
1270
  doc_date?: string | null | undefined;
1271
1271
  title?: string | null | undefined;
1272
+ page_rotation_detected?: {
1273
+ [x: string]: number;
1274
+ } | null | undefined;
1275
+ page_rotation_applied?: {
1276
+ [x: string]: number;
1277
+ } | null | undefined;
1272
1278
  } | null | undefined;
1273
1279
  }[]>;
1274
1280
  /**
@@ -1399,6 +1405,12 @@ declare function getDocuments(arbi: ArbiClient, externalIds: string[]): Promise<
1399
1405
  doc_subject?: string | null | undefined;
1400
1406
  doc_date?: string | null | undefined;
1401
1407
  title?: string | null | undefined;
1408
+ page_rotation_detected?: {
1409
+ [x: string]: number;
1410
+ } | null | undefined;
1411
+ page_rotation_applied?: {
1412
+ [x: string]: number;
1413
+ } | null | undefined;
1402
1414
  } | null | undefined;
1403
1415
  }[]>;
1404
1416
  /**
@@ -1524,6 +1536,12 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
1524
1536
  doc_subject?: string | null | undefined;
1525
1537
  doc_date?: string | null | undefined;
1526
1538
  title?: string | null | undefined;
1539
+ page_rotation_detected?: {
1540
+ [x: string]: number;
1541
+ } | null | undefined;
1542
+ page_rotation_applied?: {
1543
+ [x: string]: number;
1544
+ } | null | undefined;
1527
1545
  } | null | undefined;
1528
1546
  }[]>;
1529
1547
  /** Where a URL ingestion goes and how. */
@@ -3226,6 +3244,7 @@ declare function listConversations(arbi: ArbiClient, workspaceExtId?: string | n
3226
3244
  }[] | null | undefined;
3227
3245
  min?: number | null | undefined;
3228
3246
  max?: number | null | undefined;
3247
+ by?: ("labels" | "folders")[] | null | undefined;
3229
3248
  }[] | null | undefined;
3230
3249
  action?: {
3231
3250
  type: "sign";
@@ -3270,12 +3289,43 @@ declare function listConversations(arbi: ArbiClient, workspaceExtId?: string | n
3270
3289
  send_back: string;
3271
3290
  reject: string;
3272
3291
  send_back_to?: string | null | undefined;
3292
+ } | {
3293
+ type: "create_project";
3294
+ name: string;
3295
+ client?: string | null | undefined;
3296
+ client_ref?: string | null | undefined;
3297
+ stage?: string | null | undefined;
3298
+ lead_user?: string | null | undefined;
3299
+ fields?: {
3300
+ [x: string]: string;
3301
+ } | undefined;
3302
+ budget?: {
3303
+ amount: string;
3304
+ currency: string;
3305
+ } | null | undefined;
3306
+ workspace: boolean;
3307
+ workspace_description?: string | null | undefined;
3273
3308
  } | null | undefined;
3274
3309
  edit_document?: string | {
3275
3310
  step?: string | null | undefined;
3276
3311
  input?: string | null | undefined;
3277
3312
  } | null | undefined;
3278
3313
  }[];
3314
+ inputs?: {
3315
+ [x: string]: unknown;
3316
+ name: string;
3317
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
3318
+ label?: string | null | undefined;
3319
+ required: boolean;
3320
+ options?: {
3321
+ [x: string]: unknown;
3322
+ value: string;
3323
+ label?: string | null | undefined;
3324
+ }[] | null | undefined;
3325
+ min?: number | null | undefined;
3326
+ max?: number | null | undefined;
3327
+ by?: ("labels" | "folders")[] | null | undefined;
3328
+ }[] | undefined;
3279
3329
  } | null | undefined;
3280
3330
  goal_state?: {
3281
3331
  [x: string]: unknown;
@@ -12010,6 +12060,12 @@ declare class Arbi {
12010
12060
  doc_subject?: string | null | undefined;
12011
12061
  doc_date?: string | null | undefined;
12012
12062
  title?: string | null | undefined;
12063
+ page_rotation_detected?: {
12064
+ [x: string]: number;
12065
+ } | null | undefined;
12066
+ page_rotation_applied?: {
12067
+ [x: string]: number;
12068
+ } | null | undefined;
12013
12069
  } | null | undefined;
12014
12070
  }[]>;
12015
12071
  /**
@@ -12187,6 +12243,12 @@ declare class Arbi {
12187
12243
  doc_subject?: string | null | undefined;
12188
12244
  doc_date?: string | null | undefined;
12189
12245
  title?: string | null | undefined;
12246
+ page_rotation_detected?: {
12247
+ [x: string]: number;
12248
+ } | null | undefined;
12249
+ page_rotation_applied?: {
12250
+ [x: string]: number;
12251
+ } | null | undefined;
12190
12252
  } | null | undefined;
12191
12253
  }[]>;
12192
12254
  /** Every version of a document, oldest first; `is_current` marks the current one. */
@@ -12304,6 +12366,12 @@ declare class Arbi {
12304
12366
  doc_subject?: string | null | undefined;
12305
12367
  doc_date?: string | null | undefined;
12306
12368
  title?: string | null | undefined;
12369
+ page_rotation_detected?: {
12370
+ [x: string]: number;
12371
+ } | null | undefined;
12372
+ page_rotation_applied?: {
12373
+ [x: string]: number;
12374
+ } | null | undefined;
12307
12375
  } | null | undefined;
12308
12376
  }[]>;
12309
12377
  /** Make documents from web addresses in the current workspace, or `options.workspaceId`. */
@@ -12460,6 +12528,7 @@ declare class Arbi {
12460
12528
  }[] | null | undefined;
12461
12529
  min?: number | null | undefined;
12462
12530
  max?: number | null | undefined;
12531
+ by?: ("labels" | "folders")[] | null | undefined;
12463
12532
  }[] | null | undefined;
12464
12533
  action?: {
12465
12534
  type: "sign";
@@ -12504,12 +12573,43 @@ declare class Arbi {
12504
12573
  send_back: string;
12505
12574
  reject: string;
12506
12575
  send_back_to?: string | null | undefined;
12576
+ } | {
12577
+ type: "create_project";
12578
+ name: string;
12579
+ client?: string | null | undefined;
12580
+ client_ref?: string | null | undefined;
12581
+ stage?: string | null | undefined;
12582
+ lead_user?: string | null | undefined;
12583
+ fields?: {
12584
+ [x: string]: string;
12585
+ } | undefined;
12586
+ budget?: {
12587
+ amount: string;
12588
+ currency: string;
12589
+ } | null | undefined;
12590
+ workspace: boolean;
12591
+ workspace_description?: string | null | undefined;
12507
12592
  } | null | undefined;
12508
12593
  edit_document?: string | {
12509
12594
  step?: string | null | undefined;
12510
12595
  input?: string | null | undefined;
12511
12596
  } | null | undefined;
12512
12597
  }[];
12598
+ inputs?: {
12599
+ [x: string]: unknown;
12600
+ name: string;
12601
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
12602
+ label?: string | null | undefined;
12603
+ required: boolean;
12604
+ options?: {
12605
+ [x: string]: unknown;
12606
+ value: string;
12607
+ label?: string | null | undefined;
12608
+ }[] | null | undefined;
12609
+ min?: number | null | undefined;
12610
+ max?: number | null | undefined;
12611
+ by?: ("labels" | "folders")[] | null | undefined;
12612
+ }[] | undefined;
12513
12613
  } | null | undefined;
12514
12614
  goal_state?: {
12515
12615
  [x: string]: unknown;
@@ -13141,6 +13241,7 @@ declare class Arbi {
13141
13241
  max_passes: number;
13142
13242
  documents: string[];
13143
13243
  steps: components["schemas"]["TaskPlanStep"][];
13244
+ inputs?: components["schemas"]["StepField"][];
13144
13245
  }>;
13145
13246
  /**
13146
13247
  * Run a work item and, when the run is parked waiting for workspace access, grant the agent's
@@ -16951,6 +17052,7 @@ declare class Arbi {
16951
17052
  agent_ext_id?: string | null;
16952
17053
  auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
16953
17054
  fact_ext_id?: string | null;
17055
+ source_workflow_ext_id?: string | null;
16954
17056
  last_fired_at?: string | null;
16955
17057
  last_error?: string | null;
16956
17058
  last_run_status?: string | null;
@@ -16986,6 +17088,7 @@ declare class Arbi {
16986
17088
  agent_ext_id?: string | null;
16987
17089
  auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
16988
17090
  fact_ext_id?: string | null;
17091
+ source_workflow_ext_id?: string | null;
16989
17092
  last_fired_at?: string | null;
16990
17093
  last_error?: string | null;
16991
17094
  last_run_status?: string | null;
@@ -17021,6 +17124,7 @@ declare class Arbi {
17021
17124
  agent_ext_id?: string | null;
17022
17125
  auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
17023
17126
  fact_ext_id?: string | null;
17127
+ source_workflow_ext_id?: string | null;
17024
17128
  last_fired_at?: string | null;
17025
17129
  last_error?: string | null;
17026
17130
  last_run_status?: string | null;
@@ -17030,6 +17134,102 @@ declare class Arbi {
17030
17134
  updated_at: string;
17031
17135
  }>;
17032
17136
  delete: (workflowId: string) => Promise<void>;
17137
+ /**
17138
+ * A saved workflow with its steps: its own workspace's key is deposited on this session first
17139
+ * (without switching), so the plan, stored encrypted under that key, is readable.
17140
+ */
17141
+ get: (workflowId: string) => Promise<{
17142
+ external_id: string;
17143
+ name: string;
17144
+ description: string;
17145
+ active: boolean;
17146
+ shared: boolean;
17147
+ workspace_ext_id?: string | null;
17148
+ rrule?: string | null;
17149
+ timezone: string;
17150
+ run_at?: string | null;
17151
+ next_fire_at?: string | null;
17152
+ event_kind?: string | null;
17153
+ event_filter?: {
17154
+ [key: string]: unknown;
17155
+ } | null;
17156
+ after_conversation_ext_id?: string | null;
17157
+ on_demand: boolean;
17158
+ action?: components["schemas"]["DocumentAutomationAction"] | null;
17159
+ prompt: string;
17160
+ skill_ref?: string | null;
17161
+ skill_inputs?: {
17162
+ [key: string]: unknown;
17163
+ } | null;
17164
+ plan?: components["schemas"]["TaskPlan"] | null;
17165
+ agent_ext_id?: string | null;
17166
+ auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
17167
+ fact_ext_id?: string | null;
17168
+ source_workflow_ext_id?: string | null;
17169
+ last_fired_at?: string | null;
17170
+ last_error?: string | null;
17171
+ last_run_status?: string | null;
17172
+ owner_ext_id?: string | null;
17173
+ is_owner: boolean;
17174
+ created_at: string;
17175
+ updated_at: string;
17176
+ }>;
17177
+ /**
17178
+ * Start a saved workflow in `options.workspaceId` (absent: the current workspace): the run is a
17179
+ * thread there with a copy of the workflow's steps, and records the workflow it came from. The
17180
+ * workflow may live in another workspace (the skills workspace): the caller must be a member of
17181
+ * both, and both keys are deposited on this session first. `inputs` are the run's inputs,
17182
+ * checked against the workflow's declared ones (a 422 names each that does not fit).
17183
+ */
17184
+ start: (workflowId: string, options?: {
17185
+ workspaceId?: string;
17186
+ inputs?: Record<string, unknown>;
17187
+ title?: string;
17188
+ }) => Promise<{
17189
+ label_ext_ids?: string[];
17190
+ external_id: string;
17191
+ title: string | null;
17192
+ created_by_ext_id: string;
17193
+ updated_by_ext_id?: string | null;
17194
+ created_at: string;
17195
+ updated_at: string;
17196
+ is_shared: boolean;
17197
+ message_count: number;
17198
+ last_message_actor?: components["schemas"]["ConversationTurnActor"] | null;
17199
+ last_message_ext_id?: string | null;
17200
+ last_message_role?: string | null;
17201
+ last_message_updated_at?: string | null;
17202
+ last_message_status?: string | null;
17203
+ assistant_mode: components["schemas"]["AssistantMode"];
17204
+ meeting_call_ext_id?: string | null;
17205
+ bound_document_ext_id?: string | null;
17206
+ bound_document_unavailable: boolean;
17207
+ status?: components["schemas"]["WorkStatus"] | null;
17208
+ description?: string | null;
17209
+ due_at?: string | null;
17210
+ completed_at?: string | null;
17211
+ completed_by_ext_id?: string | null;
17212
+ parent_conversation_ext_id?: string | null;
17213
+ workflow_ext_id?: string | null;
17214
+ agent_ext_id?: string | null;
17215
+ skill_ref?: string | null;
17216
+ skill_inputs?: {
17217
+ [key: string]: unknown;
17218
+ } | null;
17219
+ has_agent_action: boolean;
17220
+ auth_mode?: components["schemas"]["src__models__work__AuthMode"] | null;
17221
+ plan?: components["schemas"]["TaskPlan"] | null;
17222
+ goal_state?: {
17223
+ [key: string]: unknown;
17224
+ } | null;
17225
+ last_error?: string | null;
17226
+ pending_auth_request_id?: string | null;
17227
+ in_progress: boolean;
17228
+ active_response_id?: string | null;
17229
+ run_started_at?: string | null;
17230
+ owner_ext_id?: string | null;
17231
+ is_owner: boolean;
17232
+ }>;
17033
17233
  /** Fire a workflow now, as a test run. Resolves with the conversation it created and whether it started. */
17034
17234
  run: (workflowId: string) => Promise<{
17035
17235
  execution_id?: number | null;
@@ -1269,6 +1269,12 @@ declare function listDocuments(arbi: ArbiClient, workspaceExtId?: string | null)
1269
1269
  doc_subject?: string | null | undefined;
1270
1270
  doc_date?: string | null | undefined;
1271
1271
  title?: string | null | undefined;
1272
+ page_rotation_detected?: {
1273
+ [x: string]: number;
1274
+ } | null | undefined;
1275
+ page_rotation_applied?: {
1276
+ [x: string]: number;
1277
+ } | null | undefined;
1272
1278
  } | null | undefined;
1273
1279
  }[]>;
1274
1280
  /**
@@ -1399,6 +1405,12 @@ declare function getDocuments(arbi: ArbiClient, externalIds: string[]): Promise<
1399
1405
  doc_subject?: string | null | undefined;
1400
1406
  doc_date?: string | null | undefined;
1401
1407
  title?: string | null | undefined;
1408
+ page_rotation_detected?: {
1409
+ [x: string]: number;
1410
+ } | null | undefined;
1411
+ page_rotation_applied?: {
1412
+ [x: string]: number;
1413
+ } | null | undefined;
1402
1414
  } | null | undefined;
1403
1415
  }[]>;
1404
1416
  /**
@@ -1524,6 +1536,12 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
1524
1536
  doc_subject?: string | null | undefined;
1525
1537
  doc_date?: string | null | undefined;
1526
1538
  title?: string | null | undefined;
1539
+ page_rotation_detected?: {
1540
+ [x: string]: number;
1541
+ } | null | undefined;
1542
+ page_rotation_applied?: {
1543
+ [x: string]: number;
1544
+ } | null | undefined;
1527
1545
  } | null | undefined;
1528
1546
  }[]>;
1529
1547
  /** Where a URL ingestion goes and how. */
@@ -3226,6 +3244,7 @@ declare function listConversations(arbi: ArbiClient, workspaceExtId?: string | n
3226
3244
  }[] | null | undefined;
3227
3245
  min?: number | null | undefined;
3228
3246
  max?: number | null | undefined;
3247
+ by?: ("labels" | "folders")[] | null | undefined;
3229
3248
  }[] | null | undefined;
3230
3249
  action?: {
3231
3250
  type: "sign";
@@ -3270,12 +3289,43 @@ declare function listConversations(arbi: ArbiClient, workspaceExtId?: string | n
3270
3289
  send_back: string;
3271
3290
  reject: string;
3272
3291
  send_back_to?: string | null | undefined;
3292
+ } | {
3293
+ type: "create_project";
3294
+ name: string;
3295
+ client?: string | null | undefined;
3296
+ client_ref?: string | null | undefined;
3297
+ stage?: string | null | undefined;
3298
+ lead_user?: string | null | undefined;
3299
+ fields?: {
3300
+ [x: string]: string;
3301
+ } | undefined;
3302
+ budget?: {
3303
+ amount: string;
3304
+ currency: string;
3305
+ } | null | undefined;
3306
+ workspace: boolean;
3307
+ workspace_description?: string | null | undefined;
3273
3308
  } | null | undefined;
3274
3309
  edit_document?: string | {
3275
3310
  step?: string | null | undefined;
3276
3311
  input?: string | null | undefined;
3277
3312
  } | null | undefined;
3278
3313
  }[];
3314
+ inputs?: {
3315
+ [x: string]: unknown;
3316
+ name: string;
3317
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
3318
+ label?: string | null | undefined;
3319
+ required: boolean;
3320
+ options?: {
3321
+ [x: string]: unknown;
3322
+ value: string;
3323
+ label?: string | null | undefined;
3324
+ }[] | null | undefined;
3325
+ min?: number | null | undefined;
3326
+ max?: number | null | undefined;
3327
+ by?: ("labels" | "folders")[] | null | undefined;
3328
+ }[] | undefined;
3279
3329
  } | null | undefined;
3280
3330
  goal_state?: {
3281
3331
  [x: string]: unknown;
@@ -12010,6 +12060,12 @@ declare class Arbi {
12010
12060
  doc_subject?: string | null | undefined;
12011
12061
  doc_date?: string | null | undefined;
12012
12062
  title?: string | null | undefined;
12063
+ page_rotation_detected?: {
12064
+ [x: string]: number;
12065
+ } | null | undefined;
12066
+ page_rotation_applied?: {
12067
+ [x: string]: number;
12068
+ } | null | undefined;
12013
12069
  } | null | undefined;
12014
12070
  }[]>;
12015
12071
  /**
@@ -12187,6 +12243,12 @@ declare class Arbi {
12187
12243
  doc_subject?: string | null | undefined;
12188
12244
  doc_date?: string | null | undefined;
12189
12245
  title?: string | null | undefined;
12246
+ page_rotation_detected?: {
12247
+ [x: string]: number;
12248
+ } | null | undefined;
12249
+ page_rotation_applied?: {
12250
+ [x: string]: number;
12251
+ } | null | undefined;
12190
12252
  } | null | undefined;
12191
12253
  }[]>;
12192
12254
  /** Every version of a document, oldest first; `is_current` marks the current one. */
@@ -12304,6 +12366,12 @@ declare class Arbi {
12304
12366
  doc_subject?: string | null | undefined;
12305
12367
  doc_date?: string | null | undefined;
12306
12368
  title?: string | null | undefined;
12369
+ page_rotation_detected?: {
12370
+ [x: string]: number;
12371
+ } | null | undefined;
12372
+ page_rotation_applied?: {
12373
+ [x: string]: number;
12374
+ } | null | undefined;
12307
12375
  } | null | undefined;
12308
12376
  }[]>;
12309
12377
  /** Make documents from web addresses in the current workspace, or `options.workspaceId`. */
@@ -12460,6 +12528,7 @@ declare class Arbi {
12460
12528
  }[] | null | undefined;
12461
12529
  min?: number | null | undefined;
12462
12530
  max?: number | null | undefined;
12531
+ by?: ("labels" | "folders")[] | null | undefined;
12463
12532
  }[] | null | undefined;
12464
12533
  action?: {
12465
12534
  type: "sign";
@@ -12504,12 +12573,43 @@ declare class Arbi {
12504
12573
  send_back: string;
12505
12574
  reject: string;
12506
12575
  send_back_to?: string | null | undefined;
12576
+ } | {
12577
+ type: "create_project";
12578
+ name: string;
12579
+ client?: string | null | undefined;
12580
+ client_ref?: string | null | undefined;
12581
+ stage?: string | null | undefined;
12582
+ lead_user?: string | null | undefined;
12583
+ fields?: {
12584
+ [x: string]: string;
12585
+ } | undefined;
12586
+ budget?: {
12587
+ amount: string;
12588
+ currency: string;
12589
+ } | null | undefined;
12590
+ workspace: boolean;
12591
+ workspace_description?: string | null | undefined;
12507
12592
  } | null | undefined;
12508
12593
  edit_document?: string | {
12509
12594
  step?: string | null | undefined;
12510
12595
  input?: string | null | undefined;
12511
12596
  } | null | undefined;
12512
12597
  }[];
12598
+ inputs?: {
12599
+ [x: string]: unknown;
12600
+ name: string;
12601
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
12602
+ label?: string | null | undefined;
12603
+ required: boolean;
12604
+ options?: {
12605
+ [x: string]: unknown;
12606
+ value: string;
12607
+ label?: string | null | undefined;
12608
+ }[] | null | undefined;
12609
+ min?: number | null | undefined;
12610
+ max?: number | null | undefined;
12611
+ by?: ("labels" | "folders")[] | null | undefined;
12612
+ }[] | undefined;
12513
12613
  } | null | undefined;
12514
12614
  goal_state?: {
12515
12615
  [x: string]: unknown;
@@ -13141,6 +13241,7 @@ declare class Arbi {
13141
13241
  max_passes: number;
13142
13242
  documents: string[];
13143
13243
  steps: components["schemas"]["TaskPlanStep"][];
13244
+ inputs?: components["schemas"]["StepField"][];
13144
13245
  }>;
13145
13246
  /**
13146
13247
  * Run a work item and, when the run is parked waiting for workspace access, grant the agent's
@@ -16951,6 +17052,7 @@ declare class Arbi {
16951
17052
  agent_ext_id?: string | null;
16952
17053
  auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
16953
17054
  fact_ext_id?: string | null;
17055
+ source_workflow_ext_id?: string | null;
16954
17056
  last_fired_at?: string | null;
16955
17057
  last_error?: string | null;
16956
17058
  last_run_status?: string | null;
@@ -16986,6 +17088,7 @@ declare class Arbi {
16986
17088
  agent_ext_id?: string | null;
16987
17089
  auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
16988
17090
  fact_ext_id?: string | null;
17091
+ source_workflow_ext_id?: string | null;
16989
17092
  last_fired_at?: string | null;
16990
17093
  last_error?: string | null;
16991
17094
  last_run_status?: string | null;
@@ -17021,6 +17124,7 @@ declare class Arbi {
17021
17124
  agent_ext_id?: string | null;
17022
17125
  auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
17023
17126
  fact_ext_id?: string | null;
17127
+ source_workflow_ext_id?: string | null;
17024
17128
  last_fired_at?: string | null;
17025
17129
  last_error?: string | null;
17026
17130
  last_run_status?: string | null;
@@ -17030,6 +17134,102 @@ declare class Arbi {
17030
17134
  updated_at: string;
17031
17135
  }>;
17032
17136
  delete: (workflowId: string) => Promise<void>;
17137
+ /**
17138
+ * A saved workflow with its steps: its own workspace's key is deposited on this session first
17139
+ * (without switching), so the plan, stored encrypted under that key, is readable.
17140
+ */
17141
+ get: (workflowId: string) => Promise<{
17142
+ external_id: string;
17143
+ name: string;
17144
+ description: string;
17145
+ active: boolean;
17146
+ shared: boolean;
17147
+ workspace_ext_id?: string | null;
17148
+ rrule?: string | null;
17149
+ timezone: string;
17150
+ run_at?: string | null;
17151
+ next_fire_at?: string | null;
17152
+ event_kind?: string | null;
17153
+ event_filter?: {
17154
+ [key: string]: unknown;
17155
+ } | null;
17156
+ after_conversation_ext_id?: string | null;
17157
+ on_demand: boolean;
17158
+ action?: components["schemas"]["DocumentAutomationAction"] | null;
17159
+ prompt: string;
17160
+ skill_ref?: string | null;
17161
+ skill_inputs?: {
17162
+ [key: string]: unknown;
17163
+ } | null;
17164
+ plan?: components["schemas"]["TaskPlan"] | null;
17165
+ agent_ext_id?: string | null;
17166
+ auth_mode: components["schemas"]["src__models__workflow__AuthMode"];
17167
+ fact_ext_id?: string | null;
17168
+ source_workflow_ext_id?: string | null;
17169
+ last_fired_at?: string | null;
17170
+ last_error?: string | null;
17171
+ last_run_status?: string | null;
17172
+ owner_ext_id?: string | null;
17173
+ is_owner: boolean;
17174
+ created_at: string;
17175
+ updated_at: string;
17176
+ }>;
17177
+ /**
17178
+ * Start a saved workflow in `options.workspaceId` (absent: the current workspace): the run is a
17179
+ * thread there with a copy of the workflow's steps, and records the workflow it came from. The
17180
+ * workflow may live in another workspace (the skills workspace): the caller must be a member of
17181
+ * both, and both keys are deposited on this session first. `inputs` are the run's inputs,
17182
+ * checked against the workflow's declared ones (a 422 names each that does not fit).
17183
+ */
17184
+ start: (workflowId: string, options?: {
17185
+ workspaceId?: string;
17186
+ inputs?: Record<string, unknown>;
17187
+ title?: string;
17188
+ }) => Promise<{
17189
+ label_ext_ids?: string[];
17190
+ external_id: string;
17191
+ title: string | null;
17192
+ created_by_ext_id: string;
17193
+ updated_by_ext_id?: string | null;
17194
+ created_at: string;
17195
+ updated_at: string;
17196
+ is_shared: boolean;
17197
+ message_count: number;
17198
+ last_message_actor?: components["schemas"]["ConversationTurnActor"] | null;
17199
+ last_message_ext_id?: string | null;
17200
+ last_message_role?: string | null;
17201
+ last_message_updated_at?: string | null;
17202
+ last_message_status?: string | null;
17203
+ assistant_mode: components["schemas"]["AssistantMode"];
17204
+ meeting_call_ext_id?: string | null;
17205
+ bound_document_ext_id?: string | null;
17206
+ bound_document_unavailable: boolean;
17207
+ status?: components["schemas"]["WorkStatus"] | null;
17208
+ description?: string | null;
17209
+ due_at?: string | null;
17210
+ completed_at?: string | null;
17211
+ completed_by_ext_id?: string | null;
17212
+ parent_conversation_ext_id?: string | null;
17213
+ workflow_ext_id?: string | null;
17214
+ agent_ext_id?: string | null;
17215
+ skill_ref?: string | null;
17216
+ skill_inputs?: {
17217
+ [key: string]: unknown;
17218
+ } | null;
17219
+ has_agent_action: boolean;
17220
+ auth_mode?: components["schemas"]["src__models__work__AuthMode"] | null;
17221
+ plan?: components["schemas"]["TaskPlan"] | null;
17222
+ goal_state?: {
17223
+ [key: string]: unknown;
17224
+ } | null;
17225
+ last_error?: string | null;
17226
+ pending_auth_request_id?: string | null;
17227
+ in_progress: boolean;
17228
+ active_response_id?: string | null;
17229
+ run_started_at?: string | null;
17230
+ owner_ext_id?: string | null;
17231
+ is_owner: boolean;
17232
+ }>;
17033
17233
  /** Fire a workflow now, as a test run. Resolves with the conversation it created and whether it started. */
17034
17234
  run: (workflowId: string) => Promise<{
17035
17235
  execution_id?: number | null;
package/dist/browser.cjs CHANGED
@@ -14101,6 +14101,42 @@ var Arbi = class {
14101
14101
  create: (body) => createWorkflow(this.requireClient(), body),
14102
14102
  update: (workflowId, body) => updateWorkflow(this.requireClient(), workflowId, body),
14103
14103
  delete: (workflowId) => deleteWorkflow(this.requireClient(), workflowId),
14104
+ /**
14105
+ * A saved workflow with its steps: its own workspace's key is deposited on this session first
14106
+ * (without switching), so the plan, stored encrypted under that key, is readable.
14107
+ */
14108
+ get: async (workflowId) => {
14109
+ const client = this.requireClient();
14110
+ const record = await getWorkflow(client, workflowId);
14111
+ if (!record.workspace_ext_id || record.plan || record.source_workflow_ext_id) return record;
14112
+ await this.primeOrFail(record.workspace_ext_id);
14113
+ return getWorkflow(client, workflowId);
14114
+ },
14115
+ /**
14116
+ * Start a saved workflow in `options.workspaceId` (absent: the current workspace): the run is a
14117
+ * thread there with a copy of the workflow's steps, and records the workflow it came from. The
14118
+ * workflow may live in another workspace (the skills workspace): the caller must be a member of
14119
+ * both, and both keys are deposited on this session first. `inputs` are the run's inputs,
14120
+ * checked against the workflow's declared ones (a 422 names each that does not fit).
14121
+ */
14122
+ start: async (workflowId, options = {}) => {
14123
+ const client = this.requireClient();
14124
+ const record = await getWorkflow(client, workflowId);
14125
+ if (record.workspace_ext_id) await this.primeOrFail(record.workspace_ext_id);
14126
+ const target = await this.requireTargetWorkspace(options.workspaceId);
14127
+ return this.recovering(
14128
+ () => createWork(
14129
+ client,
14130
+ {
14131
+ workflow_ext_id: workflowId,
14132
+ skill_inputs: options.inputs ?? null,
14133
+ auth_mode: "run_now_temp",
14134
+ ...options.title ? { title: options.title.slice(0, 60) } : {}
14135
+ },
14136
+ target
14137
+ )
14138
+ );
14139
+ },
14104
14140
  /** Fire a workflow now, as a test run. Resolves with the conversation it created and whether it started. */
14105
14141
  run: (workflowId) => runWorkflow(this.requireClient(), workflowId),
14106
14142
  /** A workflow's runs, newest first: what fired it, the task it created and how it went. */