@arbidocs/client 0.4.75 → 0.4.76

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/index.d.ts CHANGED
@@ -14,7 +14,7 @@ interface paths {
14
14
  };
15
15
  /**
16
16
  * List Projects
17
- * @description List all projects visible to the caller.
17
+ * @description List all projects visible to the caller, optionally only those at ``stage`` and/or led by ``lead_user``.
18
18
  *
19
19
  * Agents are allowed (read-only): ``projects_select_policy`` grants owner-group
20
20
  * visibility, so an agent sees its parent's projects and uses one as its own —
@@ -63,11 +63,34 @@ interface paths {
63
63
  head?: never;
64
64
  /**
65
65
  * Update Project
66
- * @description Update project name.
66
+ * @description Update a project (owner only): name, daily cap and host-defined fields, with PATCH semantics.
67
+ *
68
+ * A field left out is unchanged and an explicit null clears it; ``fields`` merges key by key (null removes a
69
+ * key). Stage and budget changes are recorded as project events.
67
70
  */
68
71
  patch: operations['update_project'];
69
72
  trace?: never;
70
73
  };
74
+ '/v1/user/projects/{project_ext_id}/events': {
75
+ parameters: {
76
+ query?: never;
77
+ header?: never;
78
+ path?: never;
79
+ cookie?: never;
80
+ };
81
+ /**
82
+ * Get Project Events
83
+ * @description A project's stage and budget changes, newest first (anyone who can see the project).
84
+ */
85
+ get: operations['list_project_events'];
86
+ put?: never;
87
+ post?: never;
88
+ delete?: never;
89
+ options?: never;
90
+ head?: never;
91
+ patch?: never;
92
+ trace?: never;
93
+ };
71
94
  '/v1/user/projects/quote': {
72
95
  parameters: {
73
96
  query?: never;
@@ -201,6 +224,29 @@ interface paths {
201
224
  patch?: never;
202
225
  trace?: never;
203
226
  };
227
+ '/v1/user/projects/{project_ext_id}/usage/conversations': {
228
+ parameters: {
229
+ query?: never;
230
+ header?: never;
231
+ path?: never;
232
+ cookie?: never;
233
+ };
234
+ /**
235
+ * Get Project Conversation Usage Endpoint
236
+ * @description AI usage of a project's billing period by conversation (thread / work item), in credits.
237
+ *
238
+ * Each model call is tagged with the conversation it serves; spend that served none is ``unattributed``.
239
+ * Per-step detail of one conversation: ``GET /v1/conversation/{conversation_ext_id}/usage``.
240
+ */
241
+ get: operations['get_project_conversation_usage'];
242
+ put?: never;
243
+ post?: never;
244
+ delete?: never;
245
+ options?: never;
246
+ head?: never;
247
+ patch?: never;
248
+ trace?: never;
249
+ };
204
250
  '/v1/user/projects/{project_ext_id}/invoices': {
205
251
  parameters: {
206
252
  query?: never;
@@ -2377,6 +2423,30 @@ interface paths {
2377
2423
  patch?: never;
2378
2424
  trace?: never;
2379
2425
  };
2426
+ '/v1/conversation/{conversation_ext_id}/usage': {
2427
+ parameters: {
2428
+ query?: never;
2429
+ header?: never;
2430
+ path?: never;
2431
+ cookie?: never;
2432
+ };
2433
+ /**
2434
+ * Get Conversation Usage Endpoint
2435
+ * @description AI usage of a conversation since it was created: total, by workflow step, run, model and agent.
2436
+ *
2437
+ * In credits, like project usage. Every model call is tagged with the conversation it serves and, for a
2438
+ * work run, the run and workflow step (a stage is a set of steps: sum ``by_step``). Read from the spend
2439
+ * logs of the project the conversation's workspace bills to; anyone who can read the conversation may.
2440
+ */
2441
+ get: operations['get_conversation_usage'];
2442
+ put?: never;
2443
+ post?: never;
2444
+ delete?: never;
2445
+ options?: never;
2446
+ head?: never;
2447
+ patch?: never;
2448
+ trace?: never;
2449
+ };
2380
2450
  '/v1/conversation/search': {
2381
2451
  parameters: {
2382
2452
  query?: never;
@@ -2578,12 +2648,20 @@ interface paths {
2578
2648
  /**
2579
2649
  * Act On Step
2580
2650
  * @description A person finishes a step of a workflow run: fills in a form (its ``inputs`` join the run's inputs), adds
2581
- * the files, approves a review, or skips a step. The run then goes on to its next agent step, under the
2582
- * caller's session (they are present: no access question).
2651
+ * the files, approves a review, skips a step, or sends the work back to an earlier step. The run then goes on to
2652
+ * its next agent step, under the caller's session (they are present: no access question), and the person steps
2653
+ * that are now ready tell their assignees.
2583
2654
  *
2584
- * Any unfinished step can be skipped at any time (ahead of the plan too): the plan guides the thread, it
2585
- * does not hold it. Completing needs the step to be ready. 400 when the step is not this run's, or a step
2586
- * completed out of order or an agent step completed by hand; 409 while the step's own turn is running.
2655
+ * Any unfinished step can be skipped at any time (ahead of the plan too), by any editor: the plan guides the
2656
+ * thread, it does not hold it. Completing needs the step to be ready; a step that declares ``fields`` checks its
2657
+ * ``inputs`` against them (422 with ``{field: problem}``); a review records what it approved (the answers and
2658
+ * document versions of the steps it waits for). ``send_back`` reopens ``to`` (default: the step this one waits
2659
+ * for) and every step after it; an agent step runs again with the ``note``. A step assigned to a user is
2660
+ * completed or sent back only by them, the run's owner or a workspace owner (403).
2661
+ *
2662
+ * 400 when the step is not this run's, a step completed out of order, an agent step completed by hand, or a
2663
+ * send-back to a step this one does not wait for; 409 while the step's own turn (or, for a send-back, any turn)
2664
+ * is running (a step whose run died is failed first, so it can be skipped or retried).
2587
2665
  */
2588
2666
  post: operations['act_on_step'];
2589
2667
  delete?: never;
@@ -3043,6 +3121,30 @@ interface paths {
3043
3121
  patch?: never;
3044
3122
  trace?: never;
3045
3123
  };
3124
+ '/v1/tag/matrix': {
3125
+ parameters: {
3126
+ query?: never;
3127
+ header?: never;
3128
+ path?: never;
3129
+ cookie?: never;
3130
+ };
3131
+ /**
3132
+ * Get Tag Matrix
3133
+ * @description A set of tags with their fields and values, plus the documents and facts linked to each.
3134
+ *
3135
+ * Select the rows with ``parent_ext_id`` (its children; the parent comes back too, its fields being the
3136
+ * shared columns) or with ``tag_ext_id``. Each row lists up to ``links_limit`` documents (with the doctag's
3137
+ * note and how many passages it cites) and facts, newest first; ``doc_count``/``fact_count`` are the totals.
3138
+ */
3139
+ get: operations['get_tag_matrix'];
3140
+ put?: never;
3141
+ post?: never;
3142
+ delete?: never;
3143
+ options?: never;
3144
+ head?: never;
3145
+ patch?: never;
3146
+ trace?: never;
3147
+ };
3046
3148
  '/v1/tag/': {
3047
3149
  parameters: {
3048
3150
  query?: never;
@@ -6234,7 +6336,7 @@ interface components {
6234
6336
  * @description What happened to a task, in the order a person reads its history.
6235
6337
  * @enum {string}
6236
6338
  */
6237
- ActivityKind: 'created' | 'run_started' | 'awaiting_access' | 'access_granted' | 'done' | 'reopened' | 'failed' | 'participant_joined' | 'assistant_responded' | 'assistant_stopped' | 'artifact_created' | 'artifact_edited' | 'document_added' | 'document_removed' | 'notified' | 'step_started' | 'step_done' | 'step_skipped' | 'step_failed';
6339
+ ActivityKind: 'created' | 'run_started' | 'awaiting_access' | 'access_granted' | 'done' | 'reopened' | 'failed' | 'participant_joined' | 'assistant_responded' | 'assistant_stopped' | 'artifact_created' | 'artifact_edited' | 'document_added' | 'document_removed' | 'notified' | 'step_started' | 'step_done' | 'step_skipped' | 'step_failed' | 'step_signal' | 'step_ready' | 'step_reminded' | 'step_sent_back' | 'linked_run';
6238
6340
  /**
6239
6341
  * ActivityResponse
6240
6342
  * @description One entry of ``GET /v1/conversation/{id}/activity``.
@@ -9996,6 +10098,74 @@ interface components {
9996
10098
  /** Parent Ext Id */
9997
10099
  parent_ext_id?: string | null;
9998
10100
  };
10101
+ /**
10102
+ * ConversationUsageResponse
10103
+ * @description AI usage of one conversation (a thread, or a work item / matter), in credits like project usage.
10104
+ *
10105
+ * Read from the project's LiteLLM spend logs: every model call is tagged with the conversation it
10106
+ * serves and, for a work run, the run and the workflow step. A breakdown holds only the calls that
10107
+ * carry its key (a chat turn has no step), so each one sums to at most the total.
10108
+ */
10109
+ ConversationUsageResponse: {
10110
+ /** Conversation Ext Id */
10111
+ conversation_ext_id: string;
10112
+ /** Project Ext Id */
10113
+ project_ext_id: string;
10114
+ /** Period Start */
10115
+ period_start: string;
10116
+ /** Period End */
10117
+ period_end: string;
10118
+ /**
10119
+ * Total Spend
10120
+ * @default 0
10121
+ */
10122
+ total_spend: number;
10123
+ /**
10124
+ * Total Tokens
10125
+ * @default 0
10126
+ */
10127
+ total_tokens: number;
10128
+ /**
10129
+ * Total Requests
10130
+ * @default 0
10131
+ */
10132
+ total_requests: number;
10133
+ /**
10134
+ * By Step
10135
+ * @default {}
10136
+ */
10137
+ by_step: {
10138
+ [key: string]: components['schemas']['TagBreakdown'];
10139
+ };
10140
+ /**
10141
+ * By Run
10142
+ * @default {}
10143
+ */
10144
+ by_run: {
10145
+ [key: string]: components['schemas']['TagBreakdown'];
10146
+ };
10147
+ /**
10148
+ * By Model
10149
+ * @default {}
10150
+ */
10151
+ by_model: {
10152
+ [key: string]: components['schemas']['TagBreakdown'];
10153
+ };
10154
+ /**
10155
+ * By Agent
10156
+ * @default {}
10157
+ */
10158
+ by_agent: {
10159
+ [key: string]: components['schemas']['TagBreakdown'];
10160
+ };
10161
+ /**
10162
+ * By Feature
10163
+ * @default {}
10164
+ */
10165
+ by_feature: {
10166
+ [key: string]: components['schemas']['TagBreakdown'];
10167
+ };
10168
+ };
9999
10169
  /**
10000
10170
  * CopyDocumentResult
10001
10171
  * @description Outcome of copying ONE selected item.
@@ -10268,6 +10438,12 @@ interface components {
10268
10438
  shared?: boolean | null;
10269
10439
  /** Parent Ext Id */
10270
10440
  parent_ext_id?: string | null;
10441
+ /** Fields */
10442
+ fields?: components['schemas']['FieldDefinitionWrite'][] | null;
10443
+ /** Field Values */
10444
+ field_values?: {
10445
+ [key: string]: unknown;
10446
+ } | null;
10271
10447
  };
10272
10448
  /**
10273
10449
  * CreateWorkRequest
@@ -11740,6 +11916,42 @@ interface components {
11740
11916
  */
11741
11917
  label: string;
11742
11918
  };
11919
+ /**
11920
+ * FieldDefinitionWrite
11921
+ * @description A field in a write. Give ``id`` to keep an existing field (its type cannot change); omit it to add one.
11922
+ */
11923
+ FieldDefinitionWrite: {
11924
+ /** Id */
11925
+ id?: string | null;
11926
+ /** Name */
11927
+ name: string;
11928
+ /**
11929
+ * Type
11930
+ * @default text
11931
+ * @enum {string}
11932
+ */
11933
+ type: 'text' | 'number' | 'date' | 'checkbox' | 'select' | 'person';
11934
+ /** Options */
11935
+ options?: string[] | null;
11936
+ };
11937
+ /**
11938
+ * FieldSchemaEntry
11939
+ * @description One field of a host-defined schema (a project's ``field_schema``), keyed by a host-chosen ``key``.
11940
+ */
11941
+ FieldSchemaEntry: {
11942
+ /** Key */
11943
+ key: string;
11944
+ /** Label */
11945
+ label?: string | null;
11946
+ /**
11947
+ * Type
11948
+ * @default text
11949
+ * @enum {string}
11950
+ */
11951
+ type: 'text' | 'number' | 'date' | 'checkbox' | 'select' | 'person';
11952
+ /** Options */
11953
+ options?: string[] | null;
11954
+ };
11743
11955
  /**
11744
11956
  * FileDeleteResponse
11745
11957
  * @description OpenAI-compatible file deletion response.
@@ -13102,7 +13314,7 @@ interface components {
13102
13314
  input: string;
13103
13315
  /** Tools */
13104
13316
  tools?: {
13105
- [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'];
13317
+ [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'] | components['schemas']['WorkflowStepTool'];
13106
13318
  };
13107
13319
  /**
13108
13320
  * Workspace Ext Id
@@ -13191,7 +13403,7 @@ interface components {
13191
13403
  content: string;
13192
13404
  /** Tools */
13193
13405
  tools?: {
13194
- [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'];
13406
+ [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'] | components['schemas']['WorkflowStepTool'];
13195
13407
  };
13196
13408
  /** Config Ext Id */
13197
13409
  config_ext_id?: string | null;
@@ -13301,7 +13513,7 @@ interface components {
13301
13513
  content: string;
13302
13514
  /** Tools */
13303
13515
  tools?: {
13304
- [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'];
13516
+ [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'] | components['schemas']['WorkflowStepTool'];
13305
13517
  };
13306
13518
  /** Config Ext Id */
13307
13519
  config_ext_id?: string | null;
@@ -13621,7 +13833,7 @@ interface components {
13621
13833
  * Type is self-descriptive, no need to parse content field.
13622
13834
  * @enum {string}
13623
13835
  */
13624
- NotificationType: 'user_message' | 'workspaceuser_added_owner' | 'workspaceuser_added_collaborator' | 'workspaceuser_added_guest' | 'workspaceuser_removed' | 'workspaceuser_updated_owner' | 'workspaceuser_updated_collaborator' | 'workspaceuser_updated_guest' | 'contact_accepted' | 'signup_reward' | 'referral_reward' | 'native_mail_received' | 'mail_draft_ready' | 'email_reply' | 'quota_threshold_50' | 'quota_threshold_90' | 'quota_threshold_100' | 'doc_shared' | 'docx_mention' | 'workspace_access_request' | 'conversation_ready' | 'conversation_done' | 'conversation_notified' | 'workflow_failed' | 'agent_input_requested' | 'workflow_completed' | 'task_started' | 'task_completed' | 'mailbox_sync_complete' | 'drive_sync_complete' | 'activity' | 'mention' | 'call_missed' | 'calendar_invite' | 'calendar_update' | 'calendar_cancel' | 'calendar_reply' | 'calendar_counter' | 'calendar_reminder' | 'calendar_share';
13836
+ NotificationType: 'user_message' | 'workspaceuser_added_owner' | 'workspaceuser_added_collaborator' | 'workspaceuser_added_guest' | 'workspaceuser_removed' | 'workspaceuser_updated_owner' | 'workspaceuser_updated_collaborator' | 'workspaceuser_updated_guest' | 'contact_accepted' | 'signup_reward' | 'referral_reward' | 'native_mail_received' | 'mail_draft_ready' | 'email_reply' | 'quota_threshold_50' | 'quota_threshold_90' | 'quota_threshold_100' | 'doc_shared' | 'docx_mention' | 'workspace_access_request' | 'conversation_ready' | 'conversation_done' | 'conversation_notified' | 'workflow_failed' | 'agent_input_requested' | 'workflow_completed' | 'workflow_signal' | 'step_ready' | 'task_started' | 'task_completed' | 'mailbox_sync_complete' | 'drive_sync_complete' | 'activity' | 'mention' | 'call_missed' | 'calendar_invite' | 'calendar_update' | 'calendar_cancel' | 'calendar_reply' | 'calendar_counter' | 'calendar_reminder' | 'calendar_share';
13625
13837
  /**
13626
13838
  * NotificationUpdate
13627
13839
  * @description Single notification update for bulk PATCH.
@@ -14487,6 +14699,19 @@ interface components {
14487
14699
  upsell?: components['schemas']['ProPlusUpsell'] | null;
14488
14700
  payment?: components['schemas']['AddonPaymentState'] | null;
14489
14701
  };
14702
+ /**
14703
+ * ProjectBudget
14704
+ * @description An amount in minor units (pence, cents) of an ISO 4217 currency.
14705
+ */
14706
+ ProjectBudget: {
14707
+ /** Amount */
14708
+ amount: number;
14709
+ /**
14710
+ * Currency
14711
+ * @description ISO 4217 code, e.g. GBP
14712
+ */
14713
+ currency: string;
14714
+ };
14490
14715
  /**
14491
14716
  * ProjectCheckoutRequest
14492
14717
  * @description Create a Stripe checkout session for this project's Pro plan (Pro = 1 pack, Pro Plus = 10).
@@ -14523,11 +14748,68 @@ interface components {
14523
14748
  /** Client Secret */
14524
14749
  client_secret: string;
14525
14750
  };
14751
+ /**
14752
+ * ProjectConversationUsageResponse
14753
+ * @description A project's AI usage by conversation for a billing period, in credits like project usage.
14754
+ */
14755
+ ProjectConversationUsageResponse: {
14756
+ /** Project Ext Id */
14757
+ project_ext_id: string;
14758
+ /** Period Start */
14759
+ period_start: string;
14760
+ /** Period End */
14761
+ period_end: string;
14762
+ /**
14763
+ * Total Spend
14764
+ * @default 0
14765
+ */
14766
+ total_spend: number;
14767
+ /**
14768
+ * Total Tokens
14769
+ * @default 0
14770
+ */
14771
+ total_tokens: number;
14772
+ /**
14773
+ * Total Requests
14774
+ * @default 0
14775
+ */
14776
+ total_requests: number;
14777
+ /**
14778
+ * By Conversation
14779
+ * @default {}
14780
+ */
14781
+ by_conversation: {
14782
+ [key: string]: components['schemas']['TagBreakdown'];
14783
+ };
14784
+ /**
14785
+ * @default {
14786
+ * "spend": 0,
14787
+ * "total_tokens": 0,
14788
+ * "requests": 0
14789
+ * }
14790
+ */
14791
+ unattributed: components['schemas']['TagBreakdown'];
14792
+ };
14526
14793
  /**
14527
14794
  * ProjectCreateRequest
14528
- * @description Create a new project.
14795
+ * @description Create a new project, optionally with its host-defined fields.
14529
14796
  */
14530
14797
  ProjectCreateRequest: {
14798
+ budget?: components['schemas']['ProjectBudget'] | null;
14799
+ /** Client */
14800
+ client?: string | null;
14801
+ /** Client Ref */
14802
+ client_ref?: string | null;
14803
+ /** Stage */
14804
+ stage?: string | null;
14805
+ /** Lead User */
14806
+ lead_user?: string | null;
14807
+ /** Fields */
14808
+ fields?: {
14809
+ [key: string]: unknown;
14810
+ } | null;
14811
+ /** Field Schema */
14812
+ field_schema?: components['schemas']['FieldSchemaEntry'][] | null;
14531
14813
  /** Name */
14532
14814
  name: string;
14533
14815
  /**
@@ -14539,6 +14821,30 @@ interface components {
14539
14821
  /** Daily Cap Per User */
14540
14822
  daily_cap_per_user?: number | null;
14541
14823
  };
14824
+ /**
14825
+ * ProjectEventResponse
14826
+ * @description One entry of ``GET /v1/project/{id}/events``: ``detail`` is ``{"from": …, "to": …}`` (null = unset).
14827
+ */
14828
+ ProjectEventResponse: {
14829
+ /** External Id */
14830
+ external_id: string;
14831
+ /**
14832
+ * Kind
14833
+ * @enum {string}
14834
+ */
14835
+ kind: 'stage_changed' | 'budget_changed';
14836
+ /** Actor */
14837
+ actor?: string | null;
14838
+ /** Detail */
14839
+ detail: {
14840
+ [key: string]: unknown;
14841
+ };
14842
+ /**
14843
+ * Created At
14844
+ * Format: date-time
14845
+ */
14846
+ created_at: string;
14847
+ };
14542
14848
  /**
14543
14849
  * ProjectInvoice
14544
14850
  * @description Single Stripe invoice/receipt for a project: the plan, prorations and add-on charges.
@@ -14667,9 +14973,10 @@ interface components {
14667
14973
  * Listed for both project owners and workspace members of the project. For
14668
14974
  * non-owner viewers, ``subscription``, ``plan_interval``, ``addons``, ``quotas`` and the
14669
14975
  * Stripe billing fields are blanked out (zeros / "none" / null) — only
14670
- * ``name``, ``external_id``, ``created_by``, and ``daily_cap_per_user`` are
14671
- * meaningful. Frontend distinguishes the two modes by comparing
14672
- * ``created_by`` against the current user's external_id.
14976
+ * ``name``, ``external_id``, ``created_by``, ``daily_cap_per_user`` and the
14977
+ * host-defined fields (``budget`` … ``field_schema``) are meaningful. Frontend
14978
+ * distinguishes the two modes by comparing ``created_by`` against the current
14979
+ * user's external_id.
14673
14980
  */
14674
14981
  ProjectResponse: {
14675
14982
  /** External Id */
@@ -14688,6 +14995,23 @@ interface components {
14688
14995
  quotas: components['schemas']['ProjectQuotas'];
14689
14996
  /** Daily Cap Per User */
14690
14997
  daily_cap_per_user?: number | null;
14998
+ budget?: components['schemas']['ProjectBudget'] | null;
14999
+ /** Client */
15000
+ client?: string | null;
15001
+ /** Client Ref */
15002
+ client_ref?: string | null;
15003
+ /** Stage */
15004
+ stage?: string | null;
15005
+ /** Stage Changed At */
15006
+ stage_changed_at?: string | null;
15007
+ /** Lead User */
15008
+ lead_user?: string | null;
15009
+ /** Fields */
15010
+ fields?: {
15011
+ [key: string]: unknown;
15012
+ };
15013
+ /** Field Schema */
15014
+ field_schema?: components['schemas']['FieldSchemaEntry'][] | null;
14691
15015
  /** Plan Interval */
14692
15016
  plan_interval?: ('month' | 'year') | null;
14693
15017
  /**
@@ -14716,9 +15040,24 @@ interface components {
14716
15040
  };
14717
15041
  /**
14718
15042
  * ProjectUpdateRequest
14719
- * @description Update project name and/or daily per-user cap.
15043
+ * @description Update a project (PATCH): omitted fields are unchanged, null clears; ``fields`` merges key by key.
14720
15044
  */
14721
15045
  ProjectUpdateRequest: {
15046
+ budget?: components['schemas']['ProjectBudget'] | null;
15047
+ /** Client */
15048
+ client?: string | null;
15049
+ /** Client Ref */
15050
+ client_ref?: string | null;
15051
+ /** Stage */
15052
+ stage?: string | null;
15053
+ /** Lead User */
15054
+ lead_user?: string | null;
15055
+ /** Fields */
15056
+ fields?: {
15057
+ [key: string]: unknown;
15058
+ } | null;
15059
+ /** Field Schema */
15060
+ field_schema?: components['schemas']['FieldSchemaEntry'][] | null;
14722
15061
  /** Name */
14723
15062
  name?: string | null;
14724
15063
  /** Daily Cap Per User */
@@ -16923,7 +17262,10 @@ interface components {
16923
17262
  * @description A person finishes a step of a workflow run (``POST /v1/conversation/{id}/step``).
16924
17263
  *
16925
17264
  * ``complete`` finishes a form (``inputs`` merge into the run's inputs), an upload, or a review (the
16926
- * approval: whoever completes it is recorded). ``skip`` passes over a step so what waits for it can go on.
17265
+ * approval: whoever completes it is recorded, with what it approved). A step that declares ``fields`` checks
17266
+ * ``inputs`` against them. ``skip`` passes over a step so what waits for it can go on. ``send_back`` returns the
17267
+ * work to an earlier step (``to``, default the one this step waits for) with an optional ``note``: that step
17268
+ * and everything after it are open again, and an agent step runs again with the note.
16927
17269
  */
16928
17270
  StepActionRequest: {
16929
17271
  /** Step */
@@ -16932,11 +17274,118 @@ interface components {
16932
17274
  * Action
16933
17275
  * @enum {string}
16934
17276
  */
16935
- action: 'complete' | 'skip';
17277
+ action: 'complete' | 'skip' | 'send_back';
16936
17278
  /** Inputs */
16937
17279
  inputs?: {
16938
17280
  [key: string]: unknown;
16939
17281
  } | null;
17282
+ /** To */
17283
+ to?: string | null;
17284
+ /** Note */
17285
+ note?: string | null;
17286
+ };
17287
+ /**
17288
+ * StepAssignee
17289
+ * @description Who a step is for: told when it is ready (and when it is sent back), and the only person besides the run's
17290
+ * owner and a workspace owner who may complete it or send it back. Exactly one shape is set:
17291
+ *
17292
+ * - ``user``: a person (``usr-``) or an agent (``agt-``), by external id;
17293
+ * - ``run_owner``: the run's owner (the conversation's creator);
17294
+ * - ``input``: the person named by one of the run's inputs (a form's person field), read when the step is ready;
17295
+ * - ``project_lead``: the lead (``lead_user``) of the project the run's workspace belongs to, read when the step
17296
+ * is ready. A project without a lead names no one.
17297
+ *
17298
+ * No assignee means the run's owner hears of it, and any editor may act on it (as before).
17299
+ */
17300
+ StepAssignee: {
17301
+ /** User */
17302
+ user?: string | null;
17303
+ /** Run Owner */
17304
+ run_owner?: true | null;
17305
+ /** Input */
17306
+ input?: string | null;
17307
+ /** Project Lead */
17308
+ project_lead?: true | null;
17309
+ };
17310
+ /**
17311
+ * StepField
17312
+ * @description One field a step asks for (the shape of a form step's fields): what ``complete`` checks its ``inputs``
17313
+ * against. Keys a client only shows (``description``, ``placeholder``, ``trueText``, ...) pass through.
17314
+ * A ``person`` field holds a person's external id (``usr-``/``agt-``), which an ``{input: name}`` assignee reads.
17315
+ */
17316
+ StepField: {
17317
+ /** Name */
17318
+ name: string;
17319
+ /**
17320
+ * Type
17321
+ * @default text
17322
+ * @enum {string}
17323
+ */
17324
+ type: 'text' | 'longtext' | 'boolean' | 'select' | 'number' | 'date' | 'scope' | 'documents' | 'person';
17325
+ /** Label */
17326
+ label?: string | null;
17327
+ /**
17328
+ * Required
17329
+ * @default false
17330
+ */
17331
+ required: boolean;
17332
+ /** Options */
17333
+ options?: components['schemas']['StepFieldOption'][] | null;
17334
+ /** Min */
17335
+ min?: number | null;
17336
+ /** Max */
17337
+ max?: number | null;
17338
+ } & {
17339
+ [key: string]: unknown;
17340
+ };
17341
+ /**
17342
+ * StepFieldOption
17343
+ * @description One choice of a ``select`` field. Other keys a client shows (``description``, ``icon``, ...) pass through.
17344
+ */
17345
+ StepFieldOption: {
17346
+ /** Value */
17347
+ value: string;
17348
+ /** Label */
17349
+ label?: string | null;
17350
+ } & {
17351
+ [key: string]: unknown;
17352
+ };
17353
+ /**
17354
+ * StepSignal
17355
+ * @description A named signal a step raises when it is done and its condition holds (``src/core/workflow_signals.py``).
17356
+ *
17357
+ * Raising it records a ``step_signal`` event on the thread and sends the run's owner a ``workflow_signal``
17358
+ * notification, which an event workflow (``event_kind="workflow_signal"``, ``event_filter={"signal": name}``)
17359
+ * starts on: the "then" of an if/then lives in that link, not in the workflow.
17360
+ */
17361
+ StepSignal: {
17362
+ /** Name */
17363
+ name: string;
17364
+ when?: components['schemas']['StepSignalWhen'] | null;
17365
+ };
17366
+ /**
17367
+ * StepSignalWhen
17368
+ * @description The condition a step's outcome must meet for its signal to be raised. Exactly one shape is set:
17369
+ *
17370
+ * - a **form** (or upload) step: ``field`` equals ``equals`` (case-insensitive text; a list field
17371
+ * contains it);
17372
+ * - an **agent** step: its answer ``contains`` a phrase (case-insensitive), or ``matches`` a regex;
17373
+ * - a **review** step: ``approved`` (completed, not skipped).
17374
+ *
17375
+ * No condition at all (``when`` omitted) raises the signal whenever the step is done. This is plaintext
17376
+ * configuration like the step's ``prompt``; the answer it is tested against is never stored.
17377
+ */
17378
+ StepSignalWhen: {
17379
+ /** Field */
17380
+ field?: string | null;
17381
+ /** Equals */
17382
+ equals?: string | number | boolean | null;
17383
+ /** Contains */
17384
+ contains?: string | null;
17385
+ /** Matches */
17386
+ matches?: string | null;
17387
+ /** Approved */
17388
+ approved?: boolean | null;
16940
17389
  };
16941
17390
  /**
16942
17391
  * StepUsage
@@ -17201,6 +17650,25 @@ interface components {
17201
17650
  */
17202
17651
  requests: number;
17203
17652
  };
17653
+ /**
17654
+ * TagField
17655
+ * @description A field a tag has — its own, or inherited from an ancestor (``tag_ext_id`` says which tag defines it).
17656
+ */
17657
+ TagField: {
17658
+ /** Id */
17659
+ id: string;
17660
+ /** Name */
17661
+ name: string;
17662
+ /**
17663
+ * Type
17664
+ * @enum {string}
17665
+ */
17666
+ type: 'text' | 'number' | 'date' | 'checkbox' | 'select' | 'person';
17667
+ /** Options */
17668
+ options?: string[] | null;
17669
+ /** Tag Ext Id */
17670
+ tag_ext_id: string;
17671
+ };
17204
17672
  /**
17205
17673
  * TagFormat
17206
17674
  * @description Tag format configuration stored as JSONB.
@@ -17223,6 +17691,74 @@ interface components {
17223
17691
  */
17224
17692
  options: string[];
17225
17693
  };
17694
+ /**
17695
+ * TagMatrixDocLink
17696
+ * @description A document a matrix tag is applied to: the doctag's note is the link's value.
17697
+ */
17698
+ TagMatrixDocLink: {
17699
+ /** Doc Ext Id */
17700
+ doc_ext_id: string;
17701
+ /** File Name */
17702
+ file_name: string;
17703
+ /** Note */
17704
+ note?: string | null;
17705
+ /**
17706
+ * Citations Count
17707
+ * @default 0
17708
+ */
17709
+ citations_count: number;
17710
+ /**
17711
+ * Updated At
17712
+ * Format: date-time
17713
+ */
17714
+ updated_at: string;
17715
+ };
17716
+ /**
17717
+ * TagMatrixFactLink
17718
+ * @description A fact carrying a matrix tag. A plain link: the fact is relevant to the tag's category.
17719
+ */
17720
+ TagMatrixFactLink: {
17721
+ /** Fact Ext Id */
17722
+ fact_ext_id: string;
17723
+ /** Text */
17724
+ text: string;
17725
+ /** Confirmed */
17726
+ confirmed: boolean;
17727
+ /**
17728
+ * Updated At
17729
+ * Format: date-time
17730
+ */
17731
+ updated_at: string;
17732
+ };
17733
+ /** TagMatrixResponse */
17734
+ TagMatrixResponse: {
17735
+ /** Rows */
17736
+ rows?: components['schemas']['TagMatrixRow'][];
17737
+ parent?: components['schemas']['TagResponse'] | null;
17738
+ /** Links Limit */
17739
+ links_limit: number;
17740
+ };
17741
+ /**
17742
+ * TagMatrixRow
17743
+ * @description One tag of the matrix with its evidence. ``docs``/``facts`` are capped; the counts are the totals.
17744
+ */
17745
+ TagMatrixRow: {
17746
+ tag: components['schemas']['TagResponse'];
17747
+ /** Docs */
17748
+ docs?: components['schemas']['TagMatrixDocLink'][];
17749
+ /** Facts */
17750
+ facts?: components['schemas']['TagMatrixFactLink'][];
17751
+ /**
17752
+ * Doc Count
17753
+ * @default 0
17754
+ */
17755
+ doc_count: number;
17756
+ /**
17757
+ * Fact Count
17758
+ * @default 0
17759
+ */
17760
+ fact_count: number;
17761
+ };
17226
17762
  /** TagResponse */
17227
17763
  TagResponse: {
17228
17764
  /** External Id */
@@ -17245,6 +17781,12 @@ interface components {
17245
17781
  * @default 0
17246
17782
  */
17247
17783
  facttag_count: number;
17784
+ /** Fields */
17785
+ fields?: components['schemas']['TagField'][];
17786
+ /** Field Values */
17787
+ field_values?: {
17788
+ [key: string]: unknown;
17789
+ };
17248
17790
  /** Created By Ext Id */
17249
17791
  created_by_ext_id: string;
17250
17792
  /** Updated By Ext Id */
@@ -17388,6 +17930,13 @@ interface components {
17388
17930
  ui?: {
17389
17931
  [key: string]: unknown;
17390
17932
  } | null;
17933
+ /** Signals */
17934
+ signals?: components['schemas']['StepSignal'][];
17935
+ assignee?: components['schemas']['StepAssignee'] | null;
17936
+ /** Remind After Hours */
17937
+ remind_after_hours?: number | null;
17938
+ /** Fields */
17939
+ fields?: components['schemas']['StepField'][] | null;
17391
17940
  };
17392
17941
  /**
17393
17942
  * TaskUpdateMessage
@@ -18032,6 +18581,18 @@ interface components {
18032
18581
  * @description Parent tag external ID. Send null to un-nest the tag; omit to leave the parent unchanged.
18033
18582
  */
18034
18583
  parent_ext_id?: string | null;
18584
+ /**
18585
+ * Fields
18586
+ * @description The tag's own fields, in full: give a field's id to keep it (its type cannot change), omit the id to add one; fields left out are dropped. Inherited fields are changed on the tag that defines them.
18587
+ */
18588
+ fields?: components['schemas']['FieldDefinitionWrite'][] | null;
18589
+ /**
18590
+ * Field Values
18591
+ * @description Merged into the current values, keyed by field id or name; null clears a field.
18592
+ */
18593
+ field_values?: {
18594
+ [key: string]: unknown;
18595
+ } | null;
18035
18596
  };
18036
18597
  /**
18037
18598
  * UpdateWorkflowRequest
@@ -18313,7 +18874,7 @@ interface components {
18313
18874
  content: string;
18314
18875
  /** Tools */
18315
18876
  tools?: {
18316
- [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'];
18877
+ [key: string]: components['schemas']['ModelCitationTool'] | components['schemas']['RetrievalChunkTool'] | components['schemas']['RetrievalFullContextTool'] | components['schemas']['RetrievalTOCTool'] | components['schemas']['TraceTool'] | components['schemas']['CompactionTool'] | components['schemas']['PersonalAgentTool'] | components['schemas']['StreamEventsTool'] | components['schemas']['MemoryTool'] | components['schemas']['GoalTool'] | components['schemas']['FactsContextTool'] | components['schemas']['ImageGenerationTool'] | components['schemas']['SubagentTool'] | components['schemas']['WorkflowStepTool'];
18317
18878
  };
18318
18879
  /** Config Ext Id */
18319
18880
  config_ext_id?: string | null;
@@ -18979,6 +19540,26 @@ interface components {
18979
19540
  /** Error */
18980
19541
  error?: string | null;
18981
19542
  };
19543
+ /**
19544
+ * WorkflowStepTool
19545
+ * @description Marks the user message the server sends to start a workflow's agent step (its wake instruction) with the
19546
+ * step it belongs to, so a client can show it as that step rather than as the raw instruction. Plaintext: the step
19547
+ * id only (the step's title stays encrypted in the conversation's plan).
19548
+ */
19549
+ WorkflowStepTool: {
19550
+ /**
19551
+ * @description discriminator enum property added by openapi-typescript
19552
+ * @enum {string}
19553
+ */
19554
+ name: 'workflow_step';
19555
+ /**
19556
+ * Description
19557
+ * @default workflow step
19558
+ */
19559
+ description: string;
19560
+ /** Workflow Step */
19561
+ workflow_step: string;
19562
+ };
18982
19563
  /**
18983
19564
  * WorkingHours
18984
19565
  * @description Working hours for one weekday (0 = Monday). Times are local ``HH:MM`` in the settings time zone.
@@ -19281,7 +19862,12 @@ type $defs = Record<string, never>;
19281
19862
  interface operations {
19282
19863
  list_projects: {
19283
19864
  parameters: {
19284
- query?: never;
19865
+ query?: {
19866
+ /** @description Only projects at this stage */
19867
+ stage?: string | null;
19868
+ /** @description Only projects led by this member */
19869
+ lead_user?: string | null;
19870
+ };
19285
19871
  header?: never;
19286
19872
  path?: never;
19287
19873
  cookie?: never;
@@ -19297,6 +19883,15 @@ interface operations {
19297
19883
  'application/json': components['schemas']['ProjectResponse'][];
19298
19884
  };
19299
19885
  };
19886
+ /** @description Validation Error */
19887
+ 422: {
19888
+ headers: {
19889
+ [name: string]: unknown;
19890
+ };
19891
+ content: {
19892
+ 'application/json': components['schemas']['HTTPValidationError'];
19893
+ };
19894
+ };
19300
19895
  };
19301
19896
  };
19302
19897
  create_project: {
@@ -19427,6 +20022,40 @@ interface operations {
19427
20022
  };
19428
20023
  };
19429
20024
  };
20025
+ list_project_events: {
20026
+ parameters: {
20027
+ query?: {
20028
+ kind?: ('stage_changed' | 'budget_changed') | null;
20029
+ limit?: number;
20030
+ };
20031
+ header?: never;
20032
+ path: {
20033
+ project_ext_id: string;
20034
+ };
20035
+ cookie?: never;
20036
+ };
20037
+ requestBody?: never;
20038
+ responses: {
20039
+ /** @description Successful Response */
20040
+ 200: {
20041
+ headers: {
20042
+ [name: string]: unknown;
20043
+ };
20044
+ content: {
20045
+ 'application/json': components['schemas']['ProjectEventResponse'][];
20046
+ };
20047
+ };
20048
+ /** @description Validation Error */
20049
+ 422: {
20050
+ headers: {
20051
+ [name: string]: unknown;
20052
+ };
20053
+ content: {
20054
+ 'application/json': components['schemas']['HTTPValidationError'];
20055
+ };
20056
+ };
20057
+ };
20058
+ };
19430
20059
  quote_project_plan: {
19431
20060
  parameters: {
19432
20061
  query?: never;
@@ -19634,6 +20263,40 @@ interface operations {
19634
20263
  };
19635
20264
  };
19636
20265
  };
20266
+ get_project_conversation_usage: {
20267
+ parameters: {
20268
+ query?: {
20269
+ /** @description 0 = current billing period, 1 = previous month, etc. */
20270
+ months_back?: number;
20271
+ };
20272
+ header?: never;
20273
+ path: {
20274
+ project_ext_id: string;
20275
+ };
20276
+ cookie?: never;
20277
+ };
20278
+ requestBody?: never;
20279
+ responses: {
20280
+ /** @description Successful Response */
20281
+ 200: {
20282
+ headers: {
20283
+ [name: string]: unknown;
20284
+ };
20285
+ content: {
20286
+ 'application/json': components['schemas']['ProjectConversationUsageResponse'];
20287
+ };
20288
+ };
20289
+ /** @description Validation Error */
20290
+ 422: {
20291
+ headers: {
20292
+ [name: string]: unknown;
20293
+ };
20294
+ content: {
20295
+ 'application/json': components['schemas']['HTTPValidationError'];
20296
+ };
20297
+ };
20298
+ };
20299
+ };
19637
20300
  get_project_invoices: {
19638
20301
  parameters: {
19639
20302
  query?: never;
@@ -22871,6 +23534,37 @@ interface operations {
22871
23534
  };
22872
23535
  };
22873
23536
  };
23537
+ get_conversation_usage: {
23538
+ parameters: {
23539
+ query?: never;
23540
+ header?: never;
23541
+ path: {
23542
+ conversation_ext_id: string;
23543
+ };
23544
+ cookie?: never;
23545
+ };
23546
+ requestBody?: never;
23547
+ responses: {
23548
+ /** @description Successful Response */
23549
+ 200: {
23550
+ headers: {
23551
+ [name: string]: unknown;
23552
+ };
23553
+ content: {
23554
+ 'application/json': components['schemas']['ConversationUsageResponse'];
23555
+ };
23556
+ };
23557
+ /** @description Validation Error */
23558
+ 422: {
23559
+ headers: {
23560
+ [name: string]: unknown;
23561
+ };
23562
+ content: {
23563
+ 'application/json': components['schemas']['HTTPValidationError'];
23564
+ };
23565
+ };
23566
+ };
23567
+ };
22874
23568
  search_conversations: {
22875
23569
  parameters: {
22876
23570
  query?: never;
@@ -23677,6 +24371,42 @@ interface operations {
23677
24371
  };
23678
24372
  };
23679
24373
  };
24374
+ get_tag_matrix: {
24375
+ parameters: {
24376
+ query?: {
24377
+ /** @description Rows are this tag's children, oldest first */
24378
+ parent_ext_id?: string | null;
24379
+ /** @description Rows are these tags, in this order (repeatable) */
24380
+ tag_ext_id?: string[] | null;
24381
+ /** @description Most documents and facts per row */
24382
+ links_limit?: number;
24383
+ };
24384
+ header?: never;
24385
+ path?: never;
24386
+ cookie?: never;
24387
+ };
24388
+ requestBody?: never;
24389
+ responses: {
24390
+ /** @description Successful Response */
24391
+ 200: {
24392
+ headers: {
24393
+ [name: string]: unknown;
24394
+ };
24395
+ content: {
24396
+ 'application/json': components['schemas']['TagMatrixResponse'];
24397
+ };
24398
+ };
24399
+ /** @description Validation Error */
24400
+ 422: {
24401
+ headers: {
24402
+ [name: string]: unknown;
24403
+ };
24404
+ content: {
24405
+ 'application/json': components['schemas']['HTTPValidationError'];
24406
+ };
24407
+ };
24408
+ };
24409
+ };
23680
24410
  create_tag: {
23681
24411
  parameters: {
23682
24412
  query?: never;