@arbidocs/sdk 0.4.147 → 0.4.148

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.
@@ -1860,6 +1860,12 @@ declare function listWorkspaces(arbi: ArbiClient): Promise<{
1860
1860
  project_subscription?: string | null | undefined;
1861
1861
  project_owner_ext_id?: string | null | undefined;
1862
1862
  house_template_ext_id?: string | null | undefined;
1863
+ archive?: {
1864
+ status: "archiving" | "archived" | "restoring";
1865
+ archived_at: string;
1866
+ documents_done: number;
1867
+ documents_total: number;
1868
+ } | null | undefined;
1863
1869
  }[]>;
1864
1870
  /**
1865
1871
  * Create a workspace with a pre-encrypted workspace key.
@@ -1910,6 +1916,12 @@ declare function createWorkspace(arbi: ArbiClient, name: string, encryptedWorksp
1910
1916
  project_subscription?: string | null | undefined;
1911
1917
  project_owner_ext_id?: string | null | undefined;
1912
1918
  house_template_ext_id?: string | null | undefined;
1919
+ archive?: {
1920
+ status: "archiving" | "archived" | "restoring";
1921
+ archived_at: string;
1922
+ documents_done: number;
1923
+ documents_total: number;
1924
+ } | null | undefined;
1913
1925
  }>;
1914
1926
  declare function deleteWorkspaces(arbi: ArbiClient, workspaceIds: string[]): Promise<void>;
1915
1927
  declare function updateWorkspace(arbi: ArbiClient, body: WorkspaceUpdateRequest$1): Promise<{
@@ -1954,6 +1966,12 @@ declare function updateWorkspace(arbi: ArbiClient, body: WorkspaceUpdateRequest$
1954
1966
  project_subscription?: string | null | undefined;
1955
1967
  project_owner_ext_id?: string | null | undefined;
1956
1968
  house_template_ext_id?: string | null | undefined;
1969
+ archive?: {
1970
+ status: "archiving" | "archived" | "restoring";
1971
+ archived_at: string;
1972
+ documents_done: number;
1973
+ documents_total: number;
1974
+ } | null | undefined;
1957
1975
  }>;
1958
1976
  declare function listWorkspaceUsers(arbi: ArbiClient): Promise<{
1959
1977
  user: {
@@ -2944,6 +2962,12 @@ declare function buildRetrievalFullContextTool(docIds: string[]): components['sc
2944
2962
  */
2945
2963
  declare function buildFactsContextTool(factIds: string[]): components['schemas']['FactsContextTool'];
2946
2964
  declare function buildRetrievalTocTool(docIds: string[]): components['schemas']['RetrievalTOCTool'];
2965
+ /**
2966
+ * The most document ids one retrieve sends. An empty list searches the whole workspace (the
2967
+ * server resolves it), so a caller sends ids only for a narrowed scope, and a scope above this
2968
+ * should be narrowed further or cleared.
2969
+ */
2970
+ declare const MAX_RETRIEVE_DOC_IDS = 5000;
2947
2971
  interface RetrieveOptions {
2948
2972
  arbi: ArbiClient;
2949
2973
  workspaceId: string;
@@ -2953,6 +2977,8 @@ interface RetrieveOptions {
2953
2977
  fullContextDocIds?: string[];
2954
2978
  tocDocIds?: string[];
2955
2979
  model?: string;
2980
+ /** Keep the response server-side (default true); a plain search keeps nothing. */
2981
+ store?: boolean;
2956
2982
  }
2957
2983
  interface ChunkMetadata {
2958
2984
  doc_ext_id?: string | null;
@@ -2987,6 +3013,29 @@ interface RetrieveResult {
2987
3013
  * Uses the typed SDK route POST /v1/assistant/retrieve.
2988
3014
  */
2989
3015
  declare function retrieve(options: RetrieveOptions): Promise<RetrieveResult>;
3016
+ /** One passage a search found, ranked by {@link searchChunks}. */
3017
+ interface SearchChunk {
3018
+ /** Stable key: the chunk id, else the document and the passage's position in its results. */
3019
+ id: string;
3020
+ /**
3021
+ * The chunk id: the join key to the passage's place in the document viewer
3022
+ * (`data-chunk-id`). Absent on legacy chunks.
3023
+ */
3024
+ chunkExtId?: string;
3025
+ docId: string;
3026
+ docTitle: string;
3027
+ page?: number;
3028
+ /** The rerank score when there is one, else the retrieval score. */
3029
+ score: number;
3030
+ /** Position among its document's results. */
3031
+ index: number;
3032
+ content: string;
3033
+ }
3034
+ /**
3035
+ * A retrieve's passages, best first: unreadable fragments dropped, one per chunk, each with its
3036
+ * best score (a rerank score that is not positive does not count).
3037
+ */
3038
+ declare function searchChunks(result: RetrieveResult | null | undefined): SearchChunk[];
2990
3039
  interface AssistantQueryOptions extends AuthHeaders {
2991
3040
  agentId?: string;
2992
3041
  activeArtifactExtId?: string;
@@ -3131,9 +3180,11 @@ type assistant_AssistantQueryOptions = AssistantQueryOptions;
3131
3180
  type assistant_Chunk = Chunk;
3132
3181
  type assistant_ChunkMetadata = ChunkMetadata;
3133
3182
  type assistant_CommandDescriptor = CommandDescriptor;
3183
+ declare const assistant_MAX_RETRIEVE_DOC_IDS: typeof MAX_RETRIEVE_DOC_IDS;
3134
3184
  type assistant_ParsedSlashCommand = ParsedSlashCommand;
3135
3185
  type assistant_RetrieveOptions = RetrieveOptions;
3136
3186
  type assistant_RetrieveResult = RetrieveResult;
3187
+ type assistant_SearchChunk = SearchChunk;
3137
3188
  type assistant_SkillSummary = SkillSummary;
3138
3189
  declare const assistant_buildFactsContextTool: typeof buildFactsContextTool;
3139
3190
  declare const assistant_buildRetrievalChunkTool: typeof buildRetrievalChunkTool;
@@ -3149,9 +3200,10 @@ declare const assistant_parseSlashTokenInProgress: typeof parseSlashTokenInProgr
3149
3200
  declare const assistant_queryAssistant: typeof queryAssistant;
3150
3201
  declare const assistant_respondToAgent: typeof respondToAgent;
3151
3202
  declare const assistant_retrieve: typeof retrieve;
3203
+ declare const assistant_searchChunks: typeof searchChunks;
3152
3204
  declare const assistant_uploadSkill: typeof uploadSkill;
3153
3205
  declare namespace assistant {
3154
- export { type assistant_AssistantQueryOptions as AssistantQueryOptions, type assistant_Chunk as Chunk, type assistant_ChunkMetadata as ChunkMetadata, type assistant_CommandDescriptor as CommandDescriptor, type assistant_ParsedSlashCommand as ParsedSlashCommand, type assistant_RetrieveOptions as RetrieveOptions, type assistant_RetrieveResult as RetrieveResult, type assistant_SkillSummary as SkillSummary, assistant_buildFactsContextTool as buildFactsContextTool, assistant_buildRetrievalChunkTool as buildRetrievalChunkTool, assistant_buildRetrievalFullContextTool as buildRetrievalFullContextTool, assistant_buildRetrievalTocTool as buildRetrievalTocTool, assistant_cancelAssistantRun as cancelAssistantRun, assistant_filterSkills as filterSkills, assistant_isSharedSkill as isSharedSkill, assistant_listCommands as listCommands, assistant_listSkills as listSkills, assistant_parseSlashCommand as parseSlashCommand, assistant_parseSlashTokenInProgress as parseSlashTokenInProgress, assistant_queryAssistant as queryAssistant, assistant_respondToAgent as respondToAgent, assistant_retrieve as retrieve, assistant_uploadSkill as uploadSkill };
3206
+ export { type assistant_AssistantQueryOptions as AssistantQueryOptions, type assistant_Chunk as Chunk, type assistant_ChunkMetadata as ChunkMetadata, type assistant_CommandDescriptor as CommandDescriptor, assistant_MAX_RETRIEVE_DOC_IDS as MAX_RETRIEVE_DOC_IDS, type assistant_ParsedSlashCommand as ParsedSlashCommand, type assistant_RetrieveOptions as RetrieveOptions, type assistant_RetrieveResult as RetrieveResult, type assistant_SearchChunk as SearchChunk, type assistant_SkillSummary as SkillSummary, assistant_buildFactsContextTool as buildFactsContextTool, assistant_buildRetrievalChunkTool as buildRetrievalChunkTool, assistant_buildRetrievalFullContextTool as buildRetrievalFullContextTool, assistant_buildRetrievalTocTool as buildRetrievalTocTool, assistant_cancelAssistantRun as cancelAssistantRun, assistant_filterSkills as filterSkills, assistant_isSharedSkill as isSharedSkill, assistant_listCommands as listCommands, assistant_listSkills as listSkills, assistant_parseSlashCommand as parseSlashCommand, assistant_parseSlashTokenInProgress as parseSlashTokenInProgress, assistant_queryAssistant as queryAssistant, assistant_respondToAgent as respondToAgent, assistant_retrieve as retrieve, assistant_searchChunks as searchChunks, assistant_uploadSkill as uploadSkill };
3155
3207
  }
3156
3208
 
3157
3209
  /**
@@ -4674,6 +4726,8 @@ type ProjectEventKind = ProjectEventResponse['kind'];
4674
4726
  type ProjectConversationUsageResponse = components['schemas']['ProjectConversationUsageResponse'];
4675
4727
  /** The project details a host sets on create and update (budget, client, stage, lead, fields). */
4676
4728
  type ProjectDetails = Pick<ProjectUpdateRequest, 'budget' | 'client' | 'client_ref' | 'stage' | 'lead_user' | 'fields' | 'field_schema'>;
4729
+ /** What a new project starts with besides its name and plan (details, a per-collaborator cap). */
4730
+ type ProjectCreateOptions = Omit<components['schemas']['ProjectCreateRequest'], 'name' | 'plan'>;
4677
4731
  /** The caller's projects; only those at `stage` and/or led by `leadUser` (`usr-…`) when given. */
4678
4732
  declare function listProjects(arbi: ArbiClient, filters?: {
4679
4733
  stage?: string;
@@ -4801,7 +4855,7 @@ declare function listProjects(arbi: ArbiClient, filters?: {
4801
4855
  * is created pending and only becomes usable after Stripe checkout (done in the web app).
4802
4856
  * `details` sets its budget, client, stage, lead and fields from the start.
4803
4857
  */
4804
- declare function createProject(arbi: ArbiClient, name: string, plan?: 'free' | 'pro', details?: ProjectDetails): Promise<{
4858
+ declare function createProject(arbi: ArbiClient, name: string, plan?: 'free' | 'pro', details?: ProjectCreateOptions): Promise<{
4805
4859
  external_id: string;
4806
4860
  name: string;
4807
4861
  created_by: string;
@@ -5306,118 +5360,857 @@ declare function getProjectInvoices(arbi: ArbiClient, projectExtId: string): Pro
5306
5360
  * `daily_cap_per_user` to render a "£ used today" indicator.
5307
5361
  */
5308
5362
  declare function getUserUsageToday(arbi: ArbiClient): Promise<UserDailyUsageResponse>;
5309
-
5310
- type projects_ProjectBudget = ProjectBudget;
5311
- type projects_ProjectConversationUsageResponse = ProjectConversationUsageResponse;
5312
- type projects_ProjectDetails = ProjectDetails;
5313
- type projects_ProjectEventKind = ProjectEventKind;
5314
- type projects_ProjectEventResponse = ProjectEventResponse;
5315
- type projects_ProjectInvoicesResponse = ProjectInvoicesResponse;
5316
- type projects_ProjectResponse = ProjectResponse;
5317
- type projects_ProjectUpdateRequest = ProjectUpdateRequest;
5318
- type projects_ProjectUsageResponse = ProjectUsageResponse;
5319
- type projects_UserDailyUsageResponse = UserDailyUsageResponse;
5320
- declare const projects_createProject: typeof createProject;
5321
- declare const projects_deleteProject: typeof deleteProject;
5322
- declare const projects_formatBudget: typeof formatBudget;
5323
- declare const projects_getProjectConversationUsage: typeof getProjectConversationUsage;
5324
- declare const projects_getProjectInvoices: typeof getProjectInvoices;
5325
- declare const projects_getProjectUsage: typeof getProjectUsage;
5326
- declare const projects_getUserUsageToday: typeof getUserUsageToday;
5327
- declare const projects_listProjectEvents: typeof listProjectEvents;
5328
- declare const projects_listProjects: typeof listProjects;
5329
- declare const projects_parseBudget: typeof parseBudget;
5330
- declare const projects_refreshProject: typeof refreshProject;
5331
- declare const projects_renameProject: typeof renameProject;
5332
- declare const projects_updateProject: typeof updateProject;
5333
- declare namespace projects {
5334
- export { type projects_ProjectBudget as ProjectBudget, type projects_ProjectConversationUsageResponse as ProjectConversationUsageResponse, type projects_ProjectDetails as ProjectDetails, type projects_ProjectEventKind as ProjectEventKind, type projects_ProjectEventResponse as ProjectEventResponse, type projects_ProjectInvoicesResponse as ProjectInvoicesResponse, type projects_ProjectResponse as ProjectResponse, type projects_ProjectUpdateRequest as ProjectUpdateRequest, type projects_ProjectUsageResponse as ProjectUsageResponse, type projects_UserDailyUsageResponse as UserDailyUsageResponse, projects_createProject as createProject, projects_deleteProject as deleteProject, projects_formatBudget as formatBudget, projects_getProjectConversationUsage as getProjectConversationUsage, projects_getProjectInvoices as getProjectInvoices, projects_getProjectUsage as getProjectUsage, projects_getUserUsageToday as getUserUsageToday, projects_listProjectEvents as listProjectEvents, projects_listProjects as listProjects, projects_parseBudget as parseBudget, projects_refreshProject as refreshProject, projects_renameProject as renameProject, projects_updateProject as updateProject };
5335
- }
5336
-
5363
+ type ProductResponse = components['schemas']['ProductResponse'];
5364
+ type ProjectQuoteRequest = components['schemas']['ProjectQuoteRequest'];
5365
+ type ProjectCheckoutRequest = components['schemas']['ProjectCheckoutRequest'];
5366
+ type ProjectPlanChangeRequest = components['schemas']['ProjectPlanChangeRequest'];
5367
+ type ProjectNextPeriodAddonsRequest = components['schemas']['ProjectNextPeriodAddonsRequest'];
5368
+ type ProjectAddonSettingsRequest = components['schemas']['ProjectAddonSettingsRequest'];
5369
+ type TaxQuoteResponse = components['schemas']['TaxQuoteResponse'];
5370
+ /** A purchasable add-on block. */
5371
+ type ProjectAddonKind = 'ai_usage' | 'storage';
5372
+ /** The plans and add-ons on sale, with their prices. */
5373
+ declare function listProducts(arbi: ArbiClient): Promise<{
5374
+ product_id: string;
5375
+ name: string;
5376
+ description?: string | null | undefined;
5377
+ prices: {
5378
+ price_id: string;
5379
+ amount?: number | null | undefined;
5380
+ amount_ex_vat?: number | null | undefined;
5381
+ currency: string;
5382
+ interval: string;
5383
+ interval_count: number;
5384
+ default_price: boolean;
5385
+ pack_prices: {
5386
+ packs: number;
5387
+ amount: number;
5388
+ amount_ex_vat: number;
5389
+ }[];
5390
+ addon_prices: {
5391
+ kind: "ai_usage" | "storage";
5392
+ ai_gbp: number;
5393
+ storage_gb: number;
5394
+ amount_ex_vat: number;
5395
+ amount: number;
5396
+ monthly_ex_vat: number;
5397
+ monthly: number;
5398
+ }[];
5399
+ }[];
5400
+ }[]>;
5337
5401
  /**
5338
- * Stepped workflows: a run is a work conversation whose plan has named steps (`TaskPlan.steps`).
5339
- * Form, upload and review steps wait for a person (`work.actOnStep`); an agent step is a turn the
5340
- * assistant takes in the thread. Where a run is lives in the conversation's activity log: each
5341
- * step's `step_started` / `step_done` / `step_skipped` / `step_failed` event, the latest winning. A
5342
- * `step_sent_back` reopens the step it names and every step after it (pending again); `step_ready`
5343
- * records that a ready person step's assignee was told; `step_signal` is a signal a done step raised,
5344
- * and `linked_run` the thread a linked workflow started on it. An agent step whose `step_waiting`
5345
- * (then `step_progress`, as the set shrinks) carries `waiting.documents` waits for those documents
5346
- * to finish processing before its turn starts.
5347
- *
5348
- * Pure functions over the API's own types (`TaskPlanStep`, `ActivityResponse`), for any client: the
5349
- * CLI's `arbi run steps`, scripts and agents. They mirror the server (`src/core/workflow_steps.py`).
5350
- *
5351
- * NOTE: `@arbidocs/blocks` has the same model over its UI step type (`agents/workflows/run.ts`:
5352
- * `stepDependencies`, `stepStatesFromActivity`, `stepPhase`, `validateWorkflowGraph`). Blocks is
5353
- * deliberately SDK-free (it depends on `@arbidocs/client` only), so it cannot import this module;
5354
- * the few lines both need are duplicated. Change them together.
5355
- */
5356
-
5357
- type TaskPlanStep = components['schemas']['TaskPlanStep'];
5358
- type StepKind = TaskPlanStep['kind'];
5359
- /** A signal a step raises when it is done and its condition holds. */
5360
- type StepSignal = components['schemas']['StepSignal'];
5361
- type StepSignalWhen = components['schemas']['StepSignalWhen'];
5362
- /** Who a step is for: one of `user`, `run_owner`, `input` or `project_lead`. */
5363
- type StepAssignee = components['schemas']['StepAssignee'];
5364
- /** What the activity log says about a step: nothing yet (`pending`), or its latest event. */
5365
- type StepStatus = 'pending' | 'running' | 'done' | 'skipped' | 'failed';
5402
+ * The tax-inclusive total of a Pro purchase for a billing address (Stripe Tax; nothing is
5403
+ * created): for a new project when `projectExtId` is null, else for that (Free) project. A 422
5404
+ * `TAX_LOCATION_INVALID` asks for a ZIP / postcode.
5405
+ */
5406
+ declare function quotePlan(arbi: ArbiClient, projectExtId: string | null, body: ProjectQuoteRequest): Promise<{
5407
+ subtotal_pence: number;
5408
+ tax_pence: number;
5409
+ total_pence: number;
5410
+ tax_label?: string | null | undefined;
5411
+ reverse_charge: boolean;
5412
+ country?: string | null | undefined;
5413
+ taxability_reason?: string | null | undefined;
5414
+ lines: {
5415
+ reference: string;
5416
+ subtotal_pence: number;
5417
+ tax_pence: number;
5418
+ }[];
5419
+ }>;
5420
+ /** Start an embedded Stripe checkout for a project; returns its `client_secret`. */
5421
+ declare function createCheckout(arbi: ArbiClient, projectExtId: string, body: ProjectCheckoutRequest): Promise<{
5422
+ client_secret: string;
5423
+ }>;
5366
5424
  /**
5367
- * Where a step stands in a run: `pending` while something it waits for is unfinished, `ready`
5368
- * once everything it waits for is done or skipped, then its own status.
5425
+ * Switch a Pro project between monthly and annual billing at the end of the period (the current
5426
+ * interval clears a pending switch, and resumes a project set to cancel). Returns the project.
5369
5427
  */
5370
- /** `waiting`: an action step started and now waits for people (signers to sign, a draft to be sent). */
5371
- type StepPhase = 'pending' | 'ready' | 'running' | 'waiting' | 'done' | 'skipped' | 'failed';
5372
- interface StepState {
5373
- status: StepStatus;
5374
- /** The step's answer in the thread (an agent step: a message id), or what a branch delivered. */
5375
- responseId: string | null;
5376
- error: string | null;
5377
- /** Reopened by a send-back to this very step, and not touched since. */
5378
- sentBack: boolean;
5379
- /** The send-back came with a note (encrypted in the log; an agent step runs again with it). */
5380
- hasNote: boolean;
5381
- /** Who was told the step is ready (`usr-` / `agt-`), since it last changed. */
5382
- announcedTo: string | null;
5383
- /**
5384
- * The documents (ids) an agent step waits on to finish processing before its turn starts, as
5385
- * its latest `step_waiting` / `step_progress` says; empty once it starts (or never waited).
5386
- */
5387
- waitingDocuments: string[];
5388
- /**
5389
- * What a started action step waits for (`sign`, `email_draft`), as its latest `step_waiting` says,
5390
- * and the document it is about (a signature request's document); null when it waits on nothing.
5391
- */
5392
- waitingAction: string | null;
5393
- waitingDocument: string | null;
5394
- }
5395
- /** One entry of a conversation's activity log, as far as steps are concerned. */
5396
- interface StepActivityEvent {
5397
- kind: string;
5398
- detail?: Record<string, unknown> | null;
5399
- actor_ext_id?: string | null;
5400
- created_at?: string;
5401
- }
5402
- declare const STEP_KINDS: readonly StepKind[];
5403
- /** What an `action` step does with a platform feature (`src/core/workflow_actions.py`). */
5404
- declare const STEP_ACTION_TYPES: readonly ["sign", "email_draft", "tabular_review"];
5405
- declare const PERSON_STEP_KINDS: readonly StepKind[];
5406
- /** The server's step id rule. */
5407
- declare const STEP_ID_PATTERN: RegExp;
5408
- declare const isPersonStep: (step: Pick<TaskPlanStep, "kind">) => boolean;
5409
- /** What a step waits for: its `after`, else the step before it in the list (a sequence). */
5410
- declare function stepDependencies(steps: Pick<TaskPlanStep, 'id' | 'after'>[], id: string): string[];
5411
- /** "Waiting for 3 documents to finish processing" (one: "1 document"). */
5412
- declare function waitingForDocumentsText(count: number): string;
5428
+ declare function changePlan(arbi: ArbiClient, projectExtId: string, body: ProjectPlanChangeRequest): Promise<{
5429
+ external_id: string;
5430
+ name: string;
5431
+ created_by: string;
5432
+ subscription: string;
5433
+ created_at: string;
5434
+ quotas: {
5435
+ storage_gb: {
5436
+ used: number;
5437
+ limit: number;
5438
+ };
5439
+ ai_usage: {
5440
+ used: number;
5441
+ limit: number;
5442
+ };
5443
+ collaborators: {
5444
+ used: number;
5445
+ limit: number;
5446
+ };
5447
+ budget_reset_at?: number | null | undefined;
5448
+ };
5449
+ daily_cap_per_user?: number | null | undefined;
5450
+ budget?: {
5451
+ amount: number;
5452
+ currency: string;
5453
+ } | null | undefined;
5454
+ client?: string | null | undefined;
5455
+ client_ref?: string | null | undefined;
5456
+ stage?: string | null | undefined;
5457
+ stage_changed_at?: string | null | undefined;
5458
+ lead_user?: string | null | undefined;
5459
+ fields?: {
5460
+ [x: string]: unknown;
5461
+ } | undefined;
5462
+ field_schema?: {
5463
+ key: string;
5464
+ label?: string | null | undefined;
5465
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5466
+ options?: string[] | null | undefined;
5467
+ }[] | null | undefined;
5468
+ plan_interval?: ("month" | "year") | null | undefined;
5469
+ packs: number;
5470
+ plan_change?: {
5471
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
5472
+ charged_pence: number;
5473
+ charged_ex_vat_pence: number;
5474
+ confirm_url?: string | null | undefined;
5475
+ } | null | undefined;
5476
+ addons?: {
5477
+ packs: number;
5478
+ packs_next?: number | null | undefined;
5479
+ plan_name: string;
5480
+ plan_ai_gbp: number;
5481
+ plan_storage_gb: number;
5482
+ block_ai_gbp: number;
5483
+ block_storage_gb: number;
5484
+ ai_blocks: number;
5485
+ storage_blocks: number;
5486
+ legacy_ai_blocks: number;
5487
+ legacy_storage_blocks: number;
5488
+ legacy_block_ai_gbp: number;
5489
+ legacy_block_storage_gb: number;
5490
+ blocks_ai_gbp: number;
5491
+ blocks_storage_gb: number;
5492
+ ai_blocks_next?: number | null | undefined;
5493
+ storage_blocks_next?: number | null | undefined;
5494
+ storage_blocks_min: number;
5495
+ auto_topup_threshold_gbp: number;
5496
+ min_auto_topup_threshold_gbp: number;
5497
+ spend_cap_pence?: number | null | undefined;
5498
+ addon_spend_pence: number;
5499
+ auto_spent_pence: number;
5500
+ addon_spend_window_end?: number | null | undefined;
5501
+ manual_spent_pence: number;
5502
+ cap_left_pence?: number | null | undefined;
5503
+ ai_used_gbp: number;
5504
+ ai_allowance_gbp: number;
5505
+ ai_allowance_next_gbp: number;
5506
+ storage_used_gb: number;
5507
+ storage_allowance_gb: number;
5508
+ storage_allowance_next_gb: number;
5509
+ ai_block_monthly_pence: number;
5510
+ ai_block_monthly_ex_vat_pence: number;
5511
+ storage_block_monthly_pence: number;
5512
+ storage_block_monthly_ex_vat_pence: number;
5513
+ ai_block_period_pence: number;
5514
+ ai_block_period_ex_vat_pence: number;
5515
+ storage_block_period_pence: number;
5516
+ storage_block_period_ex_vat_pence: number;
5517
+ ai_block_price_pence: number;
5518
+ ai_block_price_ex_vat_pence: number;
5519
+ storage_block_price_pence: number;
5520
+ storage_block_price_ex_vat_pence: number;
5521
+ cap_reached: boolean;
5522
+ period_end?: number | null | undefined;
5523
+ ai_usage_reset_at?: number | null | undefined;
5524
+ pending_interval?: ("month" | "year") | null | undefined;
5525
+ billing_error?: string | null | undefined;
5526
+ confirm_url?: string | null | undefined;
5527
+ payment?: {
5528
+ status: "pending" | "paid";
5529
+ kind?: ("ai_usage" | "storage") | null | undefined;
5530
+ amount_pence?: number | null | undefined;
5531
+ amount_ex_vat_pence?: number | null | undefined;
5532
+ tax_pence?: number | null | undefined;
5533
+ at?: number | null | undefined;
5534
+ confirm_url?: string | null | undefined;
5535
+ } | null | undefined;
5536
+ } | null | undefined;
5537
+ price_id?: string | null | undefined;
5538
+ plan?: string | null | undefined;
5539
+ amount?: number | null | undefined;
5540
+ amount_ex_vat?: number | null | undefined;
5541
+ currency?: string | null | undefined;
5542
+ current_period_end?: number | null | undefined;
5543
+ cancel_at_period_end?: boolean | null | undefined;
5544
+ portal_url?: string | null | undefined;
5545
+ }>;
5546
+ /** What a plan change would charge now and at the first renewal; nothing changes. */
5547
+ declare function previewPlanChange(arbi: ArbiClient, projectExtId: string, body: ProjectPlanChangeRequest): Promise<{
5548
+ packs: number;
5549
+ plan_name: string;
5550
+ interval: "month" | "year";
5551
+ effective_now: boolean;
5552
+ unchanged: boolean;
5553
+ awaiting_confirmation: boolean;
5554
+ due_now_pence: number;
5555
+ due_now_ex_vat_pence: number;
5556
+ due_now_tax_pence: number;
5557
+ next_renewal_pence: number;
5558
+ next_renewal_ex_vat_pence: number;
5559
+ next_renewal_tax_pence: number;
5560
+ tax_label?: string | null | undefined;
5561
+ next_renewal_at?: number | null | undefined;
5562
+ }>;
5563
+ /** What one more add-on block costs now and at renewal, taxed for the saved address. */
5564
+ declare function quoteAddon(arbi: ArbiClient, projectExtId: string, kind: ProjectAddonKind): Promise<{
5565
+ kind: "ai_usage" | "storage";
5566
+ now: {
5567
+ subtotal_pence: number;
5568
+ tax_pence: number;
5569
+ total_pence: number;
5570
+ tax_label?: string | null | undefined;
5571
+ reverse_charge: boolean;
5572
+ country?: string | null | undefined;
5573
+ taxability_reason?: string | null | undefined;
5574
+ lines: {
5575
+ reference: string;
5576
+ subtotal_pence: number;
5577
+ tax_pence: number;
5578
+ }[];
5579
+ };
5580
+ renewal: {
5581
+ subtotal_pence: number;
5582
+ tax_pence: number;
5583
+ total_pence: number;
5584
+ tax_label?: string | null | undefined;
5585
+ reverse_charge: boolean;
5586
+ country?: string | null | undefined;
5587
+ taxability_reason?: string | null | undefined;
5588
+ lines: {
5589
+ reference: string;
5590
+ subtotal_pence: number;
5591
+ tax_pence: number;
5592
+ }[];
5593
+ };
5594
+ }>;
5595
+ /** A fresh, short-lived Stripe customer-portal link (card, address, receipts). */
5596
+ declare function billingPortal(arbi: ArbiClient, projectExtId: string): Promise<{
5597
+ url: string;
5598
+ }>;
5413
5599
  /**
5414
- * Each step's state from the activity log (oldest first): its latest step event wins. A send-back
5415
- * reopens the steps it lists as pending (only the one it went `to` is `sentBack`); a `step_ready`
5416
- * records who was told, and a `step_waiting` / `step_progress` the documents an agent step waits
5417
- * on, until the step's next change.
5600
+ * Buy one add-on block, charged now and renewed every period until reduced. `requires_action`
5601
+ * comes with a `confirm_url` when the bank wants 3-D Secure; 402 `{code, message}` is a refusal.
5418
5602
  */
5419
- declare function stepStatesFromActivity(events: StepActivityEvent[]): Record<string, StepState>;
5420
- /** A signal a done step raised (`step_signal`). */
5603
+ declare function addAddonBlock(arbi: ArbiClient, projectExtId: string, kind: ProjectAddonKind): Promise<{
5604
+ status: "paid" | "requires_action";
5605
+ confirm_url?: string | null | undefined;
5606
+ project: {
5607
+ external_id: string;
5608
+ name: string;
5609
+ created_by: string;
5610
+ subscription: string;
5611
+ created_at: string;
5612
+ quotas: {
5613
+ storage_gb: {
5614
+ used: number;
5615
+ limit: number;
5616
+ };
5617
+ ai_usage: {
5618
+ used: number;
5619
+ limit: number;
5620
+ };
5621
+ collaborators: {
5622
+ used: number;
5623
+ limit: number;
5624
+ };
5625
+ budget_reset_at?: number | null | undefined;
5626
+ };
5627
+ daily_cap_per_user?: number | null | undefined;
5628
+ budget?: {
5629
+ amount: number;
5630
+ currency: string;
5631
+ } | null | undefined;
5632
+ client?: string | null | undefined;
5633
+ client_ref?: string | null | undefined;
5634
+ stage?: string | null | undefined;
5635
+ stage_changed_at?: string | null | undefined;
5636
+ lead_user?: string | null | undefined;
5637
+ fields?: {
5638
+ [x: string]: unknown;
5639
+ } | undefined;
5640
+ field_schema?: {
5641
+ key: string;
5642
+ label?: string | null | undefined;
5643
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5644
+ options?: string[] | null | undefined;
5645
+ }[] | null | undefined;
5646
+ plan_interval?: ("month" | "year") | null | undefined;
5647
+ packs: number;
5648
+ plan_change?: {
5649
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
5650
+ charged_pence: number;
5651
+ charged_ex_vat_pence: number;
5652
+ confirm_url?: string | null | undefined;
5653
+ } | null | undefined;
5654
+ addons?: {
5655
+ packs: number;
5656
+ packs_next?: number | null | undefined;
5657
+ plan_name: string;
5658
+ plan_ai_gbp: number;
5659
+ plan_storage_gb: number;
5660
+ block_ai_gbp: number;
5661
+ block_storage_gb: number;
5662
+ ai_blocks: number;
5663
+ storage_blocks: number;
5664
+ legacy_ai_blocks: number;
5665
+ legacy_storage_blocks: number;
5666
+ legacy_block_ai_gbp: number;
5667
+ legacy_block_storage_gb: number;
5668
+ blocks_ai_gbp: number;
5669
+ blocks_storage_gb: number;
5670
+ ai_blocks_next?: number | null | undefined;
5671
+ storage_blocks_next?: number | null | undefined;
5672
+ storage_blocks_min: number;
5673
+ auto_topup_threshold_gbp: number;
5674
+ min_auto_topup_threshold_gbp: number;
5675
+ spend_cap_pence?: number | null | undefined;
5676
+ addon_spend_pence: number;
5677
+ auto_spent_pence: number;
5678
+ addon_spend_window_end?: number | null | undefined;
5679
+ manual_spent_pence: number;
5680
+ cap_left_pence?: number | null | undefined;
5681
+ ai_used_gbp: number;
5682
+ ai_allowance_gbp: number;
5683
+ ai_allowance_next_gbp: number;
5684
+ storage_used_gb: number;
5685
+ storage_allowance_gb: number;
5686
+ storage_allowance_next_gb: number;
5687
+ ai_block_monthly_pence: number;
5688
+ ai_block_monthly_ex_vat_pence: number;
5689
+ storage_block_monthly_pence: number;
5690
+ storage_block_monthly_ex_vat_pence: number;
5691
+ ai_block_period_pence: number;
5692
+ ai_block_period_ex_vat_pence: number;
5693
+ storage_block_period_pence: number;
5694
+ storage_block_period_ex_vat_pence: number;
5695
+ ai_block_price_pence: number;
5696
+ ai_block_price_ex_vat_pence: number;
5697
+ storage_block_price_pence: number;
5698
+ storage_block_price_ex_vat_pence: number;
5699
+ cap_reached: boolean;
5700
+ period_end?: number | null | undefined;
5701
+ ai_usage_reset_at?: number | null | undefined;
5702
+ pending_interval?: ("month" | "year") | null | undefined;
5703
+ billing_error?: string | null | undefined;
5704
+ confirm_url?: string | null | undefined;
5705
+ payment?: {
5706
+ status: "pending" | "paid";
5707
+ kind?: ("ai_usage" | "storage") | null | undefined;
5708
+ amount_pence?: number | null | undefined;
5709
+ amount_ex_vat_pence?: number | null | undefined;
5710
+ tax_pence?: number | null | undefined;
5711
+ at?: number | null | undefined;
5712
+ confirm_url?: string | null | undefined;
5713
+ } | null | undefined;
5714
+ } | null | undefined;
5715
+ price_id?: string | null | undefined;
5716
+ plan?: string | null | undefined;
5717
+ amount?: number | null | undefined;
5718
+ amount_ex_vat?: number | null | undefined;
5719
+ currency?: string | null | undefined;
5720
+ current_period_end?: number | null | undefined;
5721
+ cancel_at_period_end?: boolean | null | undefined;
5722
+ portal_url?: string | null | undefined;
5723
+ };
5724
+ }>;
5725
+ /** How many add-on blocks to keep from the next period (reductions only; no refunds). */
5726
+ declare function setNextPeriodAddons(arbi: ArbiClient, projectExtId: string, body: ProjectNextPeriodAddonsRequest): Promise<{
5727
+ external_id: string;
5728
+ name: string;
5729
+ created_by: string;
5730
+ subscription: string;
5731
+ created_at: string;
5732
+ quotas: {
5733
+ storage_gb: {
5734
+ used: number;
5735
+ limit: number;
5736
+ };
5737
+ ai_usage: {
5738
+ used: number;
5739
+ limit: number;
5740
+ };
5741
+ collaborators: {
5742
+ used: number;
5743
+ limit: number;
5744
+ };
5745
+ budget_reset_at?: number | null | undefined;
5746
+ };
5747
+ daily_cap_per_user?: number | null | undefined;
5748
+ budget?: {
5749
+ amount: number;
5750
+ currency: string;
5751
+ } | null | undefined;
5752
+ client?: string | null | undefined;
5753
+ client_ref?: string | null | undefined;
5754
+ stage?: string | null | undefined;
5755
+ stage_changed_at?: string | null | undefined;
5756
+ lead_user?: string | null | undefined;
5757
+ fields?: {
5758
+ [x: string]: unknown;
5759
+ } | undefined;
5760
+ field_schema?: {
5761
+ key: string;
5762
+ label?: string | null | undefined;
5763
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5764
+ options?: string[] | null | undefined;
5765
+ }[] | null | undefined;
5766
+ plan_interval?: ("month" | "year") | null | undefined;
5767
+ packs: number;
5768
+ plan_change?: {
5769
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
5770
+ charged_pence: number;
5771
+ charged_ex_vat_pence: number;
5772
+ confirm_url?: string | null | undefined;
5773
+ } | null | undefined;
5774
+ addons?: {
5775
+ packs: number;
5776
+ packs_next?: number | null | undefined;
5777
+ plan_name: string;
5778
+ plan_ai_gbp: number;
5779
+ plan_storage_gb: number;
5780
+ block_ai_gbp: number;
5781
+ block_storage_gb: number;
5782
+ ai_blocks: number;
5783
+ storage_blocks: number;
5784
+ legacy_ai_blocks: number;
5785
+ legacy_storage_blocks: number;
5786
+ legacy_block_ai_gbp: number;
5787
+ legacy_block_storage_gb: number;
5788
+ blocks_ai_gbp: number;
5789
+ blocks_storage_gb: number;
5790
+ ai_blocks_next?: number | null | undefined;
5791
+ storage_blocks_next?: number | null | undefined;
5792
+ storage_blocks_min: number;
5793
+ auto_topup_threshold_gbp: number;
5794
+ min_auto_topup_threshold_gbp: number;
5795
+ spend_cap_pence?: number | null | undefined;
5796
+ addon_spend_pence: number;
5797
+ auto_spent_pence: number;
5798
+ addon_spend_window_end?: number | null | undefined;
5799
+ manual_spent_pence: number;
5800
+ cap_left_pence?: number | null | undefined;
5801
+ ai_used_gbp: number;
5802
+ ai_allowance_gbp: number;
5803
+ ai_allowance_next_gbp: number;
5804
+ storage_used_gb: number;
5805
+ storage_allowance_gb: number;
5806
+ storage_allowance_next_gb: number;
5807
+ ai_block_monthly_pence: number;
5808
+ ai_block_monthly_ex_vat_pence: number;
5809
+ storage_block_monthly_pence: number;
5810
+ storage_block_monthly_ex_vat_pence: number;
5811
+ ai_block_period_pence: number;
5812
+ ai_block_period_ex_vat_pence: number;
5813
+ storage_block_period_pence: number;
5814
+ storage_block_period_ex_vat_pence: number;
5815
+ ai_block_price_pence: number;
5816
+ ai_block_price_ex_vat_pence: number;
5817
+ storage_block_price_pence: number;
5818
+ storage_block_price_ex_vat_pence: number;
5819
+ cap_reached: boolean;
5820
+ period_end?: number | null | undefined;
5821
+ ai_usage_reset_at?: number | null | undefined;
5822
+ pending_interval?: ("month" | "year") | null | undefined;
5823
+ billing_error?: string | null | undefined;
5824
+ confirm_url?: string | null | undefined;
5825
+ payment?: {
5826
+ status: "pending" | "paid";
5827
+ kind?: ("ai_usage" | "storage") | null | undefined;
5828
+ amount_pence?: number | null | undefined;
5829
+ amount_ex_vat_pence?: number | null | undefined;
5830
+ tax_pence?: number | null | undefined;
5831
+ at?: number | null | undefined;
5832
+ confirm_url?: string | null | undefined;
5833
+ } | null | undefined;
5834
+ } | null | undefined;
5835
+ price_id?: string | null | undefined;
5836
+ plan?: string | null | undefined;
5837
+ amount?: number | null | undefined;
5838
+ amount_ex_vat?: number | null | undefined;
5839
+ currency?: string | null | undefined;
5840
+ current_period_end?: number | null | undefined;
5841
+ cancel_at_period_end?: boolean | null | undefined;
5842
+ portal_url?: string | null | undefined;
5843
+ }>;
5844
+ /** A Pro project's add-on settings: the auto top-up threshold and the monthly usage cap. */
5845
+ declare function updateAddonSettings(arbi: ArbiClient, projectExtId: string, body: ProjectAddonSettingsRequest): Promise<{
5846
+ external_id: string;
5847
+ name: string;
5848
+ created_by: string;
5849
+ subscription: string;
5850
+ created_at: string;
5851
+ quotas: {
5852
+ storage_gb: {
5853
+ used: number;
5854
+ limit: number;
5855
+ };
5856
+ ai_usage: {
5857
+ used: number;
5858
+ limit: number;
5859
+ };
5860
+ collaborators: {
5861
+ used: number;
5862
+ limit: number;
5863
+ };
5864
+ budget_reset_at?: number | null | undefined;
5865
+ };
5866
+ daily_cap_per_user?: number | null | undefined;
5867
+ budget?: {
5868
+ amount: number;
5869
+ currency: string;
5870
+ } | null | undefined;
5871
+ client?: string | null | undefined;
5872
+ client_ref?: string | null | undefined;
5873
+ stage?: string | null | undefined;
5874
+ stage_changed_at?: string | null | undefined;
5875
+ lead_user?: string | null | undefined;
5876
+ fields?: {
5877
+ [x: string]: unknown;
5878
+ } | undefined;
5879
+ field_schema?: {
5880
+ key: string;
5881
+ label?: string | null | undefined;
5882
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5883
+ options?: string[] | null | undefined;
5884
+ }[] | null | undefined;
5885
+ plan_interval?: ("month" | "year") | null | undefined;
5886
+ packs: number;
5887
+ plan_change?: {
5888
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
5889
+ charged_pence: number;
5890
+ charged_ex_vat_pence: number;
5891
+ confirm_url?: string | null | undefined;
5892
+ } | null | undefined;
5893
+ addons?: {
5894
+ packs: number;
5895
+ packs_next?: number | null | undefined;
5896
+ plan_name: string;
5897
+ plan_ai_gbp: number;
5898
+ plan_storage_gb: number;
5899
+ block_ai_gbp: number;
5900
+ block_storage_gb: number;
5901
+ ai_blocks: number;
5902
+ storage_blocks: number;
5903
+ legacy_ai_blocks: number;
5904
+ legacy_storage_blocks: number;
5905
+ legacy_block_ai_gbp: number;
5906
+ legacy_block_storage_gb: number;
5907
+ blocks_ai_gbp: number;
5908
+ blocks_storage_gb: number;
5909
+ ai_blocks_next?: number | null | undefined;
5910
+ storage_blocks_next?: number | null | undefined;
5911
+ storage_blocks_min: number;
5912
+ auto_topup_threshold_gbp: number;
5913
+ min_auto_topup_threshold_gbp: number;
5914
+ spend_cap_pence?: number | null | undefined;
5915
+ addon_spend_pence: number;
5916
+ auto_spent_pence: number;
5917
+ addon_spend_window_end?: number | null | undefined;
5918
+ manual_spent_pence: number;
5919
+ cap_left_pence?: number | null | undefined;
5920
+ ai_used_gbp: number;
5921
+ ai_allowance_gbp: number;
5922
+ ai_allowance_next_gbp: number;
5923
+ storage_used_gb: number;
5924
+ storage_allowance_gb: number;
5925
+ storage_allowance_next_gb: number;
5926
+ ai_block_monthly_pence: number;
5927
+ ai_block_monthly_ex_vat_pence: number;
5928
+ storage_block_monthly_pence: number;
5929
+ storage_block_monthly_ex_vat_pence: number;
5930
+ ai_block_period_pence: number;
5931
+ ai_block_period_ex_vat_pence: number;
5932
+ storage_block_period_pence: number;
5933
+ storage_block_period_ex_vat_pence: number;
5934
+ ai_block_price_pence: number;
5935
+ ai_block_price_ex_vat_pence: number;
5936
+ storage_block_price_pence: number;
5937
+ storage_block_price_ex_vat_pence: number;
5938
+ cap_reached: boolean;
5939
+ period_end?: number | null | undefined;
5940
+ ai_usage_reset_at?: number | null | undefined;
5941
+ pending_interval?: ("month" | "year") | null | undefined;
5942
+ billing_error?: string | null | undefined;
5943
+ confirm_url?: string | null | undefined;
5944
+ payment?: {
5945
+ status: "pending" | "paid";
5946
+ kind?: ("ai_usage" | "storage") | null | undefined;
5947
+ amount_pence?: number | null | undefined;
5948
+ amount_ex_vat_pence?: number | null | undefined;
5949
+ tax_pence?: number | null | undefined;
5950
+ at?: number | null | undefined;
5951
+ confirm_url?: string | null | undefined;
5952
+ } | null | undefined;
5953
+ } | null | undefined;
5954
+ price_id?: string | null | undefined;
5955
+ plan?: string | null | undefined;
5956
+ amount?: number | null | undefined;
5957
+ amount_ex_vat?: number | null | undefined;
5958
+ currency?: string | null | undefined;
5959
+ current_period_end?: number | null | undefined;
5960
+ cancel_at_period_end?: boolean | null | undefined;
5961
+ portal_url?: string | null | undefined;
5962
+ }>;
5963
+ /** Move a Pro project to Free at the end of the period (no refunds). */
5964
+ declare function cancelSubscription(arbi: ArbiClient, projectExtId: string): Promise<{
5965
+ external_id: string;
5966
+ name: string;
5967
+ created_by: string;
5968
+ subscription: string;
5969
+ created_at: string;
5970
+ quotas: {
5971
+ storage_gb: {
5972
+ used: number;
5973
+ limit: number;
5974
+ };
5975
+ ai_usage: {
5976
+ used: number;
5977
+ limit: number;
5978
+ };
5979
+ collaborators: {
5980
+ used: number;
5981
+ limit: number;
5982
+ };
5983
+ budget_reset_at?: number | null | undefined;
5984
+ };
5985
+ daily_cap_per_user?: number | null | undefined;
5986
+ budget?: {
5987
+ amount: number;
5988
+ currency: string;
5989
+ } | null | undefined;
5990
+ client?: string | null | undefined;
5991
+ client_ref?: string | null | undefined;
5992
+ stage?: string | null | undefined;
5993
+ stage_changed_at?: string | null | undefined;
5994
+ lead_user?: string | null | undefined;
5995
+ fields?: {
5996
+ [x: string]: unknown;
5997
+ } | undefined;
5998
+ field_schema?: {
5999
+ key: string;
6000
+ label?: string | null | undefined;
6001
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
6002
+ options?: string[] | null | undefined;
6003
+ }[] | null | undefined;
6004
+ plan_interval?: ("month" | "year") | null | undefined;
6005
+ packs: number;
6006
+ plan_change?: {
6007
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
6008
+ charged_pence: number;
6009
+ charged_ex_vat_pence: number;
6010
+ confirm_url?: string | null | undefined;
6011
+ } | null | undefined;
6012
+ addons?: {
6013
+ packs: number;
6014
+ packs_next?: number | null | undefined;
6015
+ plan_name: string;
6016
+ plan_ai_gbp: number;
6017
+ plan_storage_gb: number;
6018
+ block_ai_gbp: number;
6019
+ block_storage_gb: number;
6020
+ ai_blocks: number;
6021
+ storage_blocks: number;
6022
+ legacy_ai_blocks: number;
6023
+ legacy_storage_blocks: number;
6024
+ legacy_block_ai_gbp: number;
6025
+ legacy_block_storage_gb: number;
6026
+ blocks_ai_gbp: number;
6027
+ blocks_storage_gb: number;
6028
+ ai_blocks_next?: number | null | undefined;
6029
+ storage_blocks_next?: number | null | undefined;
6030
+ storage_blocks_min: number;
6031
+ auto_topup_threshold_gbp: number;
6032
+ min_auto_topup_threshold_gbp: number;
6033
+ spend_cap_pence?: number | null | undefined;
6034
+ addon_spend_pence: number;
6035
+ auto_spent_pence: number;
6036
+ addon_spend_window_end?: number | null | undefined;
6037
+ manual_spent_pence: number;
6038
+ cap_left_pence?: number | null | undefined;
6039
+ ai_used_gbp: number;
6040
+ ai_allowance_gbp: number;
6041
+ ai_allowance_next_gbp: number;
6042
+ storage_used_gb: number;
6043
+ storage_allowance_gb: number;
6044
+ storage_allowance_next_gb: number;
6045
+ ai_block_monthly_pence: number;
6046
+ ai_block_monthly_ex_vat_pence: number;
6047
+ storage_block_monthly_pence: number;
6048
+ storage_block_monthly_ex_vat_pence: number;
6049
+ ai_block_period_pence: number;
6050
+ ai_block_period_ex_vat_pence: number;
6051
+ storage_block_period_pence: number;
6052
+ storage_block_period_ex_vat_pence: number;
6053
+ ai_block_price_pence: number;
6054
+ ai_block_price_ex_vat_pence: number;
6055
+ storage_block_price_pence: number;
6056
+ storage_block_price_ex_vat_pence: number;
6057
+ cap_reached: boolean;
6058
+ period_end?: number | null | undefined;
6059
+ ai_usage_reset_at?: number | null | undefined;
6060
+ pending_interval?: ("month" | "year") | null | undefined;
6061
+ billing_error?: string | null | undefined;
6062
+ confirm_url?: string | null | undefined;
6063
+ payment?: {
6064
+ status: "pending" | "paid";
6065
+ kind?: ("ai_usage" | "storage") | null | undefined;
6066
+ amount_pence?: number | null | undefined;
6067
+ amount_ex_vat_pence?: number | null | undefined;
6068
+ tax_pence?: number | null | undefined;
6069
+ at?: number | null | undefined;
6070
+ confirm_url?: string | null | undefined;
6071
+ } | null | undefined;
6072
+ } | null | undefined;
6073
+ price_id?: string | null | undefined;
6074
+ plan?: string | null | undefined;
6075
+ amount?: number | null | undefined;
6076
+ amount_ex_vat?: number | null | undefined;
6077
+ currency?: string | null | undefined;
6078
+ current_period_end?: number | null | undefined;
6079
+ cancel_at_period_end?: boolean | null | undefined;
6080
+ portal_url?: string | null | undefined;
6081
+ }>;
6082
+
6083
+ type projects_ProductResponse = ProductResponse;
6084
+ type projects_ProjectAddonKind = ProjectAddonKind;
6085
+ type projects_ProjectAddonSettingsRequest = ProjectAddonSettingsRequest;
6086
+ type projects_ProjectBudget = ProjectBudget;
6087
+ type projects_ProjectCheckoutRequest = ProjectCheckoutRequest;
6088
+ type projects_ProjectConversationUsageResponse = ProjectConversationUsageResponse;
6089
+ type projects_ProjectCreateOptions = ProjectCreateOptions;
6090
+ type projects_ProjectDetails = ProjectDetails;
6091
+ type projects_ProjectEventKind = ProjectEventKind;
6092
+ type projects_ProjectEventResponse = ProjectEventResponse;
6093
+ type projects_ProjectInvoicesResponse = ProjectInvoicesResponse;
6094
+ type projects_ProjectNextPeriodAddonsRequest = ProjectNextPeriodAddonsRequest;
6095
+ type projects_ProjectPlanChangeRequest = ProjectPlanChangeRequest;
6096
+ type projects_ProjectQuoteRequest = ProjectQuoteRequest;
6097
+ type projects_ProjectResponse = ProjectResponse;
6098
+ type projects_ProjectUpdateRequest = ProjectUpdateRequest;
6099
+ type projects_ProjectUsageResponse = ProjectUsageResponse;
6100
+ type projects_TaxQuoteResponse = TaxQuoteResponse;
6101
+ type projects_UserDailyUsageResponse = UserDailyUsageResponse;
6102
+ declare const projects_addAddonBlock: typeof addAddonBlock;
6103
+ declare const projects_billingPortal: typeof billingPortal;
6104
+ declare const projects_cancelSubscription: typeof cancelSubscription;
6105
+ declare const projects_changePlan: typeof changePlan;
6106
+ declare const projects_createCheckout: typeof createCheckout;
6107
+ declare const projects_createProject: typeof createProject;
6108
+ declare const projects_deleteProject: typeof deleteProject;
6109
+ declare const projects_formatBudget: typeof formatBudget;
6110
+ declare const projects_getProjectConversationUsage: typeof getProjectConversationUsage;
6111
+ declare const projects_getProjectInvoices: typeof getProjectInvoices;
6112
+ declare const projects_getProjectUsage: typeof getProjectUsage;
6113
+ declare const projects_getUserUsageToday: typeof getUserUsageToday;
6114
+ declare const projects_listProducts: typeof listProducts;
6115
+ declare const projects_listProjectEvents: typeof listProjectEvents;
6116
+ declare const projects_listProjects: typeof listProjects;
6117
+ declare const projects_parseBudget: typeof parseBudget;
6118
+ declare const projects_previewPlanChange: typeof previewPlanChange;
6119
+ declare const projects_quoteAddon: typeof quoteAddon;
6120
+ declare const projects_quotePlan: typeof quotePlan;
6121
+ declare const projects_refreshProject: typeof refreshProject;
6122
+ declare const projects_renameProject: typeof renameProject;
6123
+ declare const projects_setNextPeriodAddons: typeof setNextPeriodAddons;
6124
+ declare const projects_updateAddonSettings: typeof updateAddonSettings;
6125
+ declare const projects_updateProject: typeof updateProject;
6126
+ declare namespace projects {
6127
+ export { type projects_ProductResponse as ProductResponse, type projects_ProjectAddonKind as ProjectAddonKind, type projects_ProjectAddonSettingsRequest as ProjectAddonSettingsRequest, type projects_ProjectBudget as ProjectBudget, type projects_ProjectCheckoutRequest as ProjectCheckoutRequest, type projects_ProjectConversationUsageResponse as ProjectConversationUsageResponse, type projects_ProjectCreateOptions as ProjectCreateOptions, type projects_ProjectDetails as ProjectDetails, type projects_ProjectEventKind as ProjectEventKind, type projects_ProjectEventResponse as ProjectEventResponse, type projects_ProjectInvoicesResponse as ProjectInvoicesResponse, type projects_ProjectNextPeriodAddonsRequest as ProjectNextPeriodAddonsRequest, type projects_ProjectPlanChangeRequest as ProjectPlanChangeRequest, type projects_ProjectQuoteRequest as ProjectQuoteRequest, type projects_ProjectResponse as ProjectResponse, type projects_ProjectUpdateRequest as ProjectUpdateRequest, type projects_ProjectUsageResponse as ProjectUsageResponse, type projects_TaxQuoteResponse as TaxQuoteResponse, type projects_UserDailyUsageResponse as UserDailyUsageResponse, projects_addAddonBlock as addAddonBlock, projects_billingPortal as billingPortal, projects_cancelSubscription as cancelSubscription, projects_changePlan as changePlan, projects_createCheckout as createCheckout, projects_createProject as createProject, projects_deleteProject as deleteProject, projects_formatBudget as formatBudget, projects_getProjectConversationUsage as getProjectConversationUsage, projects_getProjectInvoices as getProjectInvoices, projects_getProjectUsage as getProjectUsage, projects_getUserUsageToday as getUserUsageToday, projects_listProducts as listProducts, projects_listProjectEvents as listProjectEvents, projects_listProjects as listProjects, projects_parseBudget as parseBudget, projects_previewPlanChange as previewPlanChange, projects_quoteAddon as quoteAddon, projects_quotePlan as quotePlan, projects_refreshProject as refreshProject, projects_renameProject as renameProject, projects_setNextPeriodAddons as setNextPeriodAddons, projects_updateAddonSettings as updateAddonSettings, projects_updateProject as updateProject };
6128
+ }
6129
+
6130
+ /**
6131
+ * Stepped workflows: a run is a work conversation whose plan has named steps (`TaskPlan.steps`).
6132
+ * Form, upload and review steps wait for a person (`work.actOnStep`); an agent step is a turn the
6133
+ * assistant takes in the thread. Where a run is lives in the conversation's activity log: each
6134
+ * step's `step_started` / `step_done` / `step_skipped` / `step_failed` event, the latest winning. A
6135
+ * `step_sent_back` reopens the step it names and every step after it (pending again); `step_ready`
6136
+ * records that a ready person step's assignee was told; `step_signal` is a signal a done step raised,
6137
+ * and `linked_run` the thread a linked workflow started on it. An agent step whose `step_waiting`
6138
+ * (then `step_progress`, as the set shrinks) carries `waiting.documents` waits for those documents
6139
+ * to finish processing before its turn starts.
6140
+ *
6141
+ * Pure functions over the API's own types (`TaskPlanStep`, `ActivityResponse`), for any client: the
6142
+ * CLI's `arbi run steps`, scripts and agents. They mirror the server (`src/core/workflow_steps.py`).
6143
+ *
6144
+ * NOTE: `@arbidocs/blocks` has the same model over its UI step type (`agents/workflows/run.ts`:
6145
+ * `stepDependencies`, `stepStatesFromActivity`, `stepPhase`, `validateWorkflowGraph`). Blocks is
6146
+ * deliberately SDK-free (it depends on `@arbidocs/client` only), so it cannot import this module;
6147
+ * the few lines both need are duplicated. Change them together.
6148
+ */
6149
+
6150
+ type TaskPlanStep = components['schemas']['TaskPlanStep'];
6151
+ type StepKind = TaskPlanStep['kind'];
6152
+ /** A signal a step raises when it is done and its condition holds. */
6153
+ type StepSignal = components['schemas']['StepSignal'];
6154
+ type StepSignalWhen = components['schemas']['StepSignalWhen'];
6155
+ /** Who a step is for: one of `user`, `run_owner`, `input` or `project_lead`. */
6156
+ type StepAssignee = components['schemas']['StepAssignee'];
6157
+ /** What the activity log says about a step: nothing yet (`pending`), or its latest event. */
6158
+ type StepStatus = 'pending' | 'running' | 'done' | 'skipped' | 'failed';
6159
+ /**
6160
+ * Where a step stands in a run: `pending` while something it waits for is unfinished, `ready`
6161
+ * once everything it waits for is done or skipped, then its own status.
6162
+ */
6163
+ /** `waiting`: an action step started and now waits for people (signers to sign, a draft to be sent). */
6164
+ type StepPhase = 'pending' | 'ready' | 'running' | 'waiting' | 'done' | 'skipped' | 'failed';
6165
+ interface StepState {
6166
+ status: StepStatus;
6167
+ /** The step's answer in the thread (an agent step: a message id), or what a branch delivered. */
6168
+ responseId: string | null;
6169
+ error: string | null;
6170
+ /** Reopened by a send-back to this very step, and not touched since. */
6171
+ sentBack: boolean;
6172
+ /** The send-back came with a note (encrypted in the log; an agent step runs again with it). */
6173
+ hasNote: boolean;
6174
+ /** Who was told the step is ready (`usr-` / `agt-`), since it last changed. */
6175
+ announcedTo: string | null;
6176
+ /**
6177
+ * The documents (ids) an agent step waits on to finish processing before its turn starts, as
6178
+ * its latest `step_waiting` / `step_progress` says; empty once it starts (or never waited).
6179
+ */
6180
+ waitingDocuments: string[];
6181
+ /**
6182
+ * What a started action step waits for (`sign`, `email_draft`), as its latest `step_waiting` says,
6183
+ * and the document it is about (a signature request's document); null when it waits on nothing.
6184
+ */
6185
+ waitingAction: string | null;
6186
+ waitingDocument: string | null;
6187
+ }
6188
+ /** One entry of a conversation's activity log, as far as steps are concerned. */
6189
+ interface StepActivityEvent {
6190
+ kind: string;
6191
+ detail?: Record<string, unknown> | null;
6192
+ actor_ext_id?: string | null;
6193
+ created_at?: string;
6194
+ }
6195
+ declare const STEP_KINDS: readonly StepKind[];
6196
+ /** What an `action` step does with a platform feature (`src/core/workflow_actions.py`). */
6197
+ declare const STEP_ACTION_TYPES: readonly ["sign", "email_draft", "tabular_review"];
6198
+ declare const PERSON_STEP_KINDS: readonly StepKind[];
6199
+ /** The server's step id rule. */
6200
+ declare const STEP_ID_PATTERN: RegExp;
6201
+ declare const isPersonStep: (step: Pick<TaskPlanStep, "kind">) => boolean;
6202
+ /** What a step waits for: its `after`, else the step before it in the list (a sequence). */
6203
+ declare function stepDependencies(steps: Pick<TaskPlanStep, 'id' | 'after'>[], id: string): string[];
6204
+ /** "Waiting for 3 documents to finish processing" (one: "1 document"). */
6205
+ declare function waitingForDocumentsText(count: number): string;
6206
+ /**
6207
+ * Each step's state from the activity log (oldest first): its latest step event wins. A send-back
6208
+ * reopens the steps it lists as pending (only the one it went `to` is `sentBack`); a `step_ready`
6209
+ * records who was told, and a `step_waiting` / `step_progress` the documents an agent step waits
6210
+ * on, until the step's next change.
6211
+ */
6212
+ declare function stepStatesFromActivity(events: StepActivityEvent[]): Record<string, StepState>;
6213
+ /** A signal a done step raised (`step_signal`). */
5421
6214
  interface RaisedSignal {
5422
6215
  step: string;
5423
6216
  signal: string;
@@ -5885,8 +6678,8 @@ declare namespace facts {
5885
6678
 
5886
6679
  /**
5887
6680
  * Native calendar operations over `/v1/calendar`: settings, calendars, events, invitations,
5888
- * sharing, subscriptions, holidays, rooms, scheduling, connected accounts, app passwords and feeds,
5889
- * booking pages, and the public booking endpoints.
6681
+ * sharing, subscriptions, holidays, rooms, scheduling, connected accounts, booking pages,
6682
+ * and the public booking endpoints.
5890
6683
  *
5891
6684
  * Calendar content is sealed under per-calendar keys, themselves sealed to the user. A server
5892
6685
  * session reads it only once those keys are bridged to it ({@link unlockCalendarKeys}:
@@ -5925,8 +6718,6 @@ type PersonKey = S['PersonKey'];
5925
6718
  type CalendarAccount = S['AccountRead'];
5926
6719
  type CalendarAccountKind = CalendarAccount['kind'];
5927
6720
  type CalDavProfile = S['CalDavProfileRead'];
5928
- type AppPassword = S['AppPasswordRead'];
5929
- type AppPasswordCreated = S['AppPasswordCreated'];
5930
6721
  type BookingPage = S['BookingPageRead'];
5931
6722
  type WeeklyHoursSpec = S['WeeklyHours'];
5932
6723
  type PublicBookingPage = S['PublicBookingPage'];
@@ -5943,11 +6734,6 @@ type RoomCreateBody = Partial<ResourceCreate> & Pick<ResourceCreate, 'name'>;
5943
6734
  type CalDavConnectBody = Omit<S['CalDavConnect'], 'background_sync'> & {
5944
6735
  background_sync?: boolean;
5945
6736
  };
5946
- type AppPasswordCreateBody = S['AppPasswordCreate'];
5947
- type FeedLevel = S['FeedCreate']['level'];
5948
- type FeedCreateBody = Omit<S['FeedCreate'], 'label'> & {
5949
- label?: string;
5950
- };
5951
6737
  type BookingPageWriteBody = S['BookingPageWrite'];
5952
6738
  type BookingRequestBody = S['BookingRequest'];
5953
6739
  /** A time window for list queries: ISO instants with an offset. */
@@ -6093,15 +6879,6 @@ declare function syncAccount(client: ArbiClient, accId: string): Promise<Account
6093
6879
  declare function disconnectAccount(client: ArbiClient, accId: string): Promise<void>;
6094
6880
  /** Publish an own calendar into a connected account; it then mirrors both ways. */
6095
6881
  declare function publishCalendarToAccount(client: ArbiClient, accId: string, calendarId: string): Promise<CalendarRead>;
6096
- declare function listAppPasswords(client: ArbiClient): Promise<AppPassword[]>;
6097
- declare function createAppPassword(client: ArbiClient, body: AppPasswordCreateBody): Promise<AppPasswordCreated>;
6098
- declare function createFeed(client: ArbiClient, body: FeedCreateBody): Promise<AppPasswordCreated>;
6099
- declare function revokeAppPassword(client: ArbiClient, apwId: string): Promise<void>;
6100
- /** Split the app-password list into device passwords and feed URLs. */
6101
- declare function splitAppPasswords(rows: AppPassword[]): {
6102
- devices: AppPassword[];
6103
- feeds: AppPassword[];
6104
- };
6105
6882
  declare function listBookingPages(client: ArbiClient): Promise<BookingPage[]>;
6106
6883
  declare function putBookingPage(client: ArbiClient, body: BookingPageWriteBody): Promise<BookingPage>;
6107
6884
  declare function deleteBookingPage(client: ArbiClient, slug: string): Promise<void>;
@@ -6123,9 +6900,6 @@ declare function cancelPublicBooking(baseUrl: string, slug: string, token: strin
6123
6900
 
6124
6901
  declare const calendar_ACCOUNT_VENDOR: typeof ACCOUNT_VENDOR;
6125
6902
  type calendar_AccountSyncResult = AccountSyncResult;
6126
- type calendar_AppPassword = AppPassword;
6127
- type calendar_AppPasswordCreateBody = AppPasswordCreateBody;
6128
- type calendar_AppPasswordCreated = AppPasswordCreated;
6129
6903
  type calendar_AttendeeRead = AttendeeRead;
6130
6904
  type calendar_BookingConfirmation = BookingConfirmation;
6131
6905
  type calendar_BookingPage = BookingPage;
@@ -6150,8 +6924,6 @@ type calendar_EventCreate = EventCreate;
6150
6924
  type calendar_EventCreateBody = EventCreateBody;
6151
6925
  type calendar_EventPatchBody = EventPatchBody;
6152
6926
  type calendar_EventWrite = EventWrite;
6153
- type calendar_FeedCreateBody = FeedCreateBody;
6154
- type calendar_FeedLevel = FeedLevel;
6155
6927
  type calendar_FindTimeParams = FindTimeParams;
6156
6928
  type calendar_FreeBusyEntry = FreeBusyEntry;
6157
6929
  type calendar_HolidayCountry = HolidayCountry;
@@ -6182,10 +6954,8 @@ declare const calendar_bookPublicSlot: typeof bookPublicSlot;
6182
6954
  declare const calendar_cancelPublicBooking: typeof cancelPublicBooking;
6183
6955
  declare const calendar_connectCalDavAccount: typeof connectCalDavAccount;
6184
6956
  declare const calendar_connectOAuthAccount: typeof connectOAuthAccount;
6185
- declare const calendar_createAppPassword: typeof createAppPassword;
6186
6957
  declare const calendar_createCalendar: typeof createCalendar;
6187
6958
  declare const calendar_createEvent: typeof createEvent;
6188
- declare const calendar_createFeed: typeof createFeed;
6189
6959
  declare const calendar_createRoom: typeof createRoom;
6190
6960
  declare const calendar_decideCounter: typeof decideCounter;
6191
6961
  declare const calendar_deleteBookingPage: typeof deleteBookingPage;
@@ -6202,7 +6972,6 @@ declare const calendar_getFreeBusy: typeof getFreeBusy;
6202
6972
  declare const calendar_getPublicBookingPage: typeof getPublicBookingPage;
6203
6973
  declare const calendar_importCalendarIcs: typeof importCalendarIcs;
6204
6974
  declare const calendar_listAccounts: typeof listAccounts;
6205
- declare const calendar_listAppPasswords: typeof listAppPasswords;
6206
6975
  declare const calendar_listBookingPages: typeof listBookingPages;
6207
6976
  declare const calendar_listCalDavProfiles: typeof listCalDavProfiles;
6208
6977
  declare const calendar_listCalendars: typeof listCalendars;
@@ -6220,9 +6989,7 @@ declare const calendar_putBookingPage: typeof putBookingPage;
6220
6989
  declare const calendar_putCalendarSettings: typeof putCalendarSettings;
6221
6990
  declare const calendar_refreshCalendar: typeof refreshCalendar;
6222
6991
  declare const calendar_respondToEvent: typeof respondToEvent;
6223
- declare const calendar_revokeAppPassword: typeof revokeAppPassword;
6224
6992
  declare const calendar_shareCalendar: typeof shareCalendar;
6225
- declare const calendar_splitAppPasswords: typeof splitAppPasswords;
6226
6993
  declare const calendar_subscribeCalendar: typeof subscribeCalendar;
6227
6994
  declare const calendar_syncAccount: typeof syncAccount;
6228
6995
  declare const calendar_unlockCalendarKeys: typeof unlockCalendarKeys;
@@ -6231,7 +6998,7 @@ declare const calendar_updateAccount: typeof updateAccount;
6231
6998
  declare const calendar_updateCalendar: typeof updateCalendar;
6232
6999
  declare const calendar_updateEvent: typeof updateEvent;
6233
7000
  declare namespace calendar {
6234
- export { calendar_ACCOUNT_VENDOR as ACCOUNT_VENDOR, type calendar_AccountSyncResult as AccountSyncResult, type calendar_AppPassword as AppPassword, type calendar_AppPasswordCreateBody as AppPasswordCreateBody, type calendar_AppPasswordCreated as AppPasswordCreated, type calendar_AttendeeRead as AttendeeRead, type calendar_BookingConfirmation as BookingConfirmation, type calendar_BookingPage as BookingPage, type calendar_BookingPageWriteBody as BookingPageWriteBody, type calendar_BookingRequestBody as BookingRequestBody, type calendar_CalDavConnectBody as CalDavConnectBody, type calendar_CalDavProfile as CalDavProfile, type calendar_CalendarAccount as CalendarAccount, type calendar_CalendarAccountKind as CalendarAccountKind, type calendar_CalendarCreate as CalendarCreate, type calendar_CalendarCreateBody as CalendarCreateBody, type calendar_CalendarEvent as CalendarEvent, type calendar_CalendarKeys as CalendarKeys, type calendar_CalendarRead as CalendarRead, type calendar_CalendarSettings as CalendarSettings, type calendar_CalendarSettingsBody as CalendarSettingsBody, type calendar_CalendarUpdate as CalendarUpdate, type calendar_CalendarWindow as CalendarWindow, type calendar_DateTimeSpec as DateTimeSpec, type calendar_EditScope as EditScope, type calendar_EventCreate as EventCreate, type calendar_EventCreateBody as EventCreateBody, type calendar_EventPatchBody as EventPatchBody, type calendar_EventWrite as EventWrite, type calendar_FeedCreateBody as FeedCreateBody, type calendar_FeedLevel as FeedLevel, type calendar_FindTimeParams as FindTimeParams, type calendar_FreeBusyEntry as FreeBusyEntry, type calendar_HolidayCountry as HolidayCountry, type calendar_ImportResult as ImportResult, type calendar_InvitationRead as InvitationRead, type calendar_ListEventsParams as ListEventsParams, type calendar_OAuthAccountKind as OAuthAccountKind, type calendar_OverlayItem as OverlayItem, type calendar_OverlayLayerName as OverlayLayerName, type calendar_PersonKey as PersonKey, calendar_PublicBookingError as PublicBookingError, type calendar_PublicBookingPage as PublicBookingPage, type calendar_ResourceCreate as ResourceCreate, type calendar_RespondParams as RespondParams, type calendar_RespondPartstat as RespondPartstat, type calendar_RoomCreateBody as RoomCreateBody, type calendar_RoomQuery as RoomQuery, type calendar_RoomRead as RoomRead, type calendar_ScopedTarget as ScopedTarget, type calendar_ShareRead as ShareRead, type calendar_ShareRole as ShareRole, type calendar_SubscribeParams as SubscribeParams, type calendar_TimeSuggestion as TimeSuggestion, type calendar_WeeklyHoursSpec as WeeklyHoursSpec, calendar_addHolidayCalendar as addHolidayCalendar, calendar_bookPublicSlot as bookPublicSlot, calendar_cancelPublicBooking as cancelPublicBooking, calendar_connectCalDavAccount as connectCalDavAccount, calendar_connectOAuthAccount as connectOAuthAccount, calendar_createAppPassword as createAppPassword, calendar_createCalendar as createCalendar, calendar_createEvent as createEvent, calendar_createFeed as createFeed, calendar_createRoom as createRoom, calendar_decideCounter as decideCounter, calendar_deleteBookingPage as deleteBookingPage, calendar_deleteCalendar as deleteCalendar, calendar_deleteEvent as deleteEvent, calendar_disconnectAccount as disconnectAccount, calendar_ensureCalendarUnlocked as ensureCalendarUnlocked, calendar_eventIcs as eventIcs, calendar_exportCalendarIcs as exportCalendarIcs, calendar_findTime as findTime, calendar_getCalendarSettings as getCalendarSettings, calendar_getEvent as getEvent, calendar_getFreeBusy as getFreeBusy, calendar_getPublicBookingPage as getPublicBookingPage, calendar_importCalendarIcs as importCalendarIcs, calendar_listAccounts as listAccounts, calendar_listAppPasswords as listAppPasswords, calendar_listBookingPages as listBookingPages, calendar_listCalDavProfiles as listCalDavProfiles, calendar_listCalendars as listCalendars, calendar_listEvents as listEvents, calendar_listHolidayCountries as listHolidayCountries, calendar_listInvitations as listInvitations, calendar_listOverlays as listOverlays, calendar_listRooms as listRooms, calendar_listShares as listShares, calendar_lookupEventByUid as lookupEventByUid, calendar_lookupPeopleKeys as lookupPeopleKeys, calendar_moveEvent as moveEvent, calendar_publishCalendarToAccount as publishCalendarToAccount, calendar_putBookingPage as putBookingPage, calendar_putCalendarSettings as putCalendarSettings, calendar_refreshCalendar as refreshCalendar, calendar_respondToEvent as respondToEvent, calendar_revokeAppPassword as revokeAppPassword, calendar_shareCalendar as shareCalendar, calendar_splitAppPasswords as splitAppPasswords, calendar_subscribeCalendar as subscribeCalendar, calendar_syncAccount as syncAccount, calendar_unlockCalendarKeys as unlockCalendarKeys, calendar_unshareCalendar as unshareCalendar, calendar_updateAccount as updateAccount, calendar_updateCalendar as updateCalendar, calendar_updateEvent as updateEvent };
7001
+ export { calendar_ACCOUNT_VENDOR as ACCOUNT_VENDOR, type calendar_AccountSyncResult as AccountSyncResult, type calendar_AttendeeRead as AttendeeRead, type calendar_BookingConfirmation as BookingConfirmation, type calendar_BookingPage as BookingPage, type calendar_BookingPageWriteBody as BookingPageWriteBody, type calendar_BookingRequestBody as BookingRequestBody, type calendar_CalDavConnectBody as CalDavConnectBody, type calendar_CalDavProfile as CalDavProfile, type calendar_CalendarAccount as CalendarAccount, type calendar_CalendarAccountKind as CalendarAccountKind, type calendar_CalendarCreate as CalendarCreate, type calendar_CalendarCreateBody as CalendarCreateBody, type calendar_CalendarEvent as CalendarEvent, type calendar_CalendarKeys as CalendarKeys, type calendar_CalendarRead as CalendarRead, type calendar_CalendarSettings as CalendarSettings, type calendar_CalendarSettingsBody as CalendarSettingsBody, type calendar_CalendarUpdate as CalendarUpdate, type calendar_CalendarWindow as CalendarWindow, type calendar_DateTimeSpec as DateTimeSpec, type calendar_EditScope as EditScope, type calendar_EventCreate as EventCreate, type calendar_EventCreateBody as EventCreateBody, type calendar_EventPatchBody as EventPatchBody, type calendar_EventWrite as EventWrite, type calendar_FindTimeParams as FindTimeParams, type calendar_FreeBusyEntry as FreeBusyEntry, type calendar_HolidayCountry as HolidayCountry, type calendar_ImportResult as ImportResult, type calendar_InvitationRead as InvitationRead, type calendar_ListEventsParams as ListEventsParams, type calendar_OAuthAccountKind as OAuthAccountKind, type calendar_OverlayItem as OverlayItem, type calendar_OverlayLayerName as OverlayLayerName, type calendar_PersonKey as PersonKey, calendar_PublicBookingError as PublicBookingError, type calendar_PublicBookingPage as PublicBookingPage, type calendar_ResourceCreate as ResourceCreate, type calendar_RespondParams as RespondParams, type calendar_RespondPartstat as RespondPartstat, type calendar_RoomCreateBody as RoomCreateBody, type calendar_RoomQuery as RoomQuery, type calendar_RoomRead as RoomRead, type calendar_ScopedTarget as ScopedTarget, type calendar_ShareRead as ShareRead, type calendar_ShareRole as ShareRole, type calendar_SubscribeParams as SubscribeParams, type calendar_TimeSuggestion as TimeSuggestion, type calendar_WeeklyHoursSpec as WeeklyHoursSpec, calendar_addHolidayCalendar as addHolidayCalendar, calendar_bookPublicSlot as bookPublicSlot, calendar_cancelPublicBooking as cancelPublicBooking, calendar_connectCalDavAccount as connectCalDavAccount, calendar_connectOAuthAccount as connectOAuthAccount, calendar_createCalendar as createCalendar, calendar_createEvent as createEvent, calendar_createRoom as createRoom, calendar_decideCounter as decideCounter, calendar_deleteBookingPage as deleteBookingPage, calendar_deleteCalendar as deleteCalendar, calendar_deleteEvent as deleteEvent, calendar_disconnectAccount as disconnectAccount, calendar_ensureCalendarUnlocked as ensureCalendarUnlocked, calendar_eventIcs as eventIcs, calendar_exportCalendarIcs as exportCalendarIcs, calendar_findTime as findTime, calendar_getCalendarSettings as getCalendarSettings, calendar_getEvent as getEvent, calendar_getFreeBusy as getFreeBusy, calendar_getPublicBookingPage as getPublicBookingPage, calendar_importCalendarIcs as importCalendarIcs, calendar_listAccounts as listAccounts, calendar_listBookingPages as listBookingPages, calendar_listCalDavProfiles as listCalDavProfiles, calendar_listCalendars as listCalendars, calendar_listEvents as listEvents, calendar_listHolidayCountries as listHolidayCountries, calendar_listInvitations as listInvitations, calendar_listOverlays as listOverlays, calendar_listRooms as listRooms, calendar_listShares as listShares, calendar_lookupEventByUid as lookupEventByUid, calendar_lookupPeopleKeys as lookupPeopleKeys, calendar_moveEvent as moveEvent, calendar_publishCalendarToAccount as publishCalendarToAccount, calendar_putBookingPage as putBookingPage, calendar_putCalendarSettings as putCalendarSettings, calendar_refreshCalendar as refreshCalendar, calendar_respondToEvent as respondToEvent, calendar_shareCalendar as shareCalendar, calendar_subscribeCalendar as subscribeCalendar, calendar_syncAccount as syncAccount, calendar_unlockCalendarKeys as unlockCalendarKeys, calendar_unshareCalendar as unshareCalendar, calendar_updateAccount as updateAccount, calendar_updateCalendar as updateCalendar, calendar_updateEvent as updateEvent };
6235
7002
  }
6236
7003
 
6237
7004
  type DocUpdateRequest = components['schemas']['DocUpdateRequest'];
@@ -6536,7 +7303,466 @@ declare class Arbi {
6536
7303
  cancel_at_period_end?: boolean | null | undefined;
6537
7304
  portal_url?: string | null | undefined;
6538
7305
  }[]>;
6539
- create: (name: string, plan?: "free" | "pro", details?: ProjectDetails) => Promise<{
7306
+ create: (name: string, plan?: "free" | "pro", details?: ProjectCreateOptions) => Promise<{
7307
+ external_id: string;
7308
+ name: string;
7309
+ created_by: string;
7310
+ subscription: string;
7311
+ created_at: string;
7312
+ quotas: {
7313
+ storage_gb: {
7314
+ used: number;
7315
+ limit: number;
7316
+ };
7317
+ ai_usage: {
7318
+ used: number;
7319
+ limit: number;
7320
+ };
7321
+ collaborators: {
7322
+ used: number;
7323
+ limit: number;
7324
+ };
7325
+ budget_reset_at?: number | null | undefined;
7326
+ };
7327
+ daily_cap_per_user?: number | null | undefined;
7328
+ budget?: {
7329
+ amount: number;
7330
+ currency: string;
7331
+ } | null | undefined;
7332
+ client?: string | null | undefined;
7333
+ client_ref?: string | null | undefined;
7334
+ stage?: string | null | undefined;
7335
+ stage_changed_at?: string | null | undefined;
7336
+ lead_user?: string | null | undefined;
7337
+ fields?: {
7338
+ [x: string]: unknown;
7339
+ } | undefined;
7340
+ field_schema?: {
7341
+ key: string;
7342
+ label?: string | null | undefined;
7343
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
7344
+ options?: string[] | null | undefined;
7345
+ }[] | null | undefined;
7346
+ plan_interval?: ("month" | "year") | null | undefined;
7347
+ packs: number;
7348
+ plan_change?: {
7349
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
7350
+ charged_pence: number;
7351
+ charged_ex_vat_pence: number;
7352
+ confirm_url?: string | null | undefined;
7353
+ } | null | undefined;
7354
+ addons?: {
7355
+ packs: number;
7356
+ packs_next?: number | null | undefined;
7357
+ plan_name: string;
7358
+ plan_ai_gbp: number;
7359
+ plan_storage_gb: number;
7360
+ block_ai_gbp: number;
7361
+ block_storage_gb: number;
7362
+ ai_blocks: number;
7363
+ storage_blocks: number;
7364
+ legacy_ai_blocks: number;
7365
+ legacy_storage_blocks: number;
7366
+ legacy_block_ai_gbp: number;
7367
+ legacy_block_storage_gb: number;
7368
+ blocks_ai_gbp: number;
7369
+ blocks_storage_gb: number;
7370
+ ai_blocks_next?: number | null | undefined;
7371
+ storage_blocks_next?: number | null | undefined;
7372
+ storage_blocks_min: number;
7373
+ auto_topup_threshold_gbp: number;
7374
+ min_auto_topup_threshold_gbp: number;
7375
+ spend_cap_pence?: number | null | undefined;
7376
+ addon_spend_pence: number;
7377
+ auto_spent_pence: number;
7378
+ addon_spend_window_end?: number | null | undefined;
7379
+ manual_spent_pence: number;
7380
+ cap_left_pence?: number | null | undefined;
7381
+ ai_used_gbp: number;
7382
+ ai_allowance_gbp: number;
7383
+ ai_allowance_next_gbp: number;
7384
+ storage_used_gb: number;
7385
+ storage_allowance_gb: number;
7386
+ storage_allowance_next_gb: number;
7387
+ ai_block_monthly_pence: number;
7388
+ ai_block_monthly_ex_vat_pence: number;
7389
+ storage_block_monthly_pence: number;
7390
+ storage_block_monthly_ex_vat_pence: number;
7391
+ ai_block_period_pence: number;
7392
+ ai_block_period_ex_vat_pence: number;
7393
+ storage_block_period_pence: number;
7394
+ storage_block_period_ex_vat_pence: number;
7395
+ ai_block_price_pence: number;
7396
+ ai_block_price_ex_vat_pence: number;
7397
+ storage_block_price_pence: number;
7398
+ storage_block_price_ex_vat_pence: number;
7399
+ cap_reached: boolean;
7400
+ period_end?: number | null | undefined;
7401
+ ai_usage_reset_at?: number | null | undefined;
7402
+ pending_interval?: ("month" | "year") | null | undefined;
7403
+ billing_error?: string | null | undefined;
7404
+ confirm_url?: string | null | undefined;
7405
+ payment?: {
7406
+ status: "pending" | "paid";
7407
+ kind?: ("ai_usage" | "storage") | null | undefined;
7408
+ amount_pence?: number | null | undefined;
7409
+ amount_ex_vat_pence?: number | null | undefined;
7410
+ tax_pence?: number | null | undefined;
7411
+ at?: number | null | undefined;
7412
+ confirm_url?: string | null | undefined;
7413
+ } | null | undefined;
7414
+ } | null | undefined;
7415
+ price_id?: string | null | undefined;
7416
+ plan?: string | null | undefined;
7417
+ amount?: number | null | undefined;
7418
+ amount_ex_vat?: number | null | undefined;
7419
+ currency?: string | null | undefined;
7420
+ current_period_end?: number | null | undefined;
7421
+ cancel_at_period_end?: boolean | null | undefined;
7422
+ portal_url?: string | null | undefined;
7423
+ }>;
7424
+ /** Patch a project: name, daily cap, budget, client, stage, lead, fields (merged key by key). */
7425
+ update: (projectExtId: string, body: ProjectUpdateRequest) => Promise<{
7426
+ external_id: string;
7427
+ name: string;
7428
+ created_by: string;
7429
+ subscription: string;
7430
+ created_at: string;
7431
+ quotas: {
7432
+ storage_gb: {
7433
+ used: number;
7434
+ limit: number;
7435
+ };
7436
+ ai_usage: {
7437
+ used: number;
7438
+ limit: number;
7439
+ };
7440
+ collaborators: {
7441
+ used: number;
7442
+ limit: number;
7443
+ };
7444
+ budget_reset_at?: number | null | undefined;
7445
+ };
7446
+ daily_cap_per_user?: number | null | undefined;
7447
+ budget?: {
7448
+ amount: number;
7449
+ currency: string;
7450
+ } | null | undefined;
7451
+ client?: string | null | undefined;
7452
+ client_ref?: string | null | undefined;
7453
+ stage?: string | null | undefined;
7454
+ stage_changed_at?: string | null | undefined;
7455
+ lead_user?: string | null | undefined;
7456
+ fields?: {
7457
+ [x: string]: unknown;
7458
+ } | undefined;
7459
+ field_schema?: {
7460
+ key: string;
7461
+ label?: string | null | undefined;
7462
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
7463
+ options?: string[] | null | undefined;
7464
+ }[] | null | undefined;
7465
+ plan_interval?: ("month" | "year") | null | undefined;
7466
+ packs: number;
7467
+ plan_change?: {
7468
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
7469
+ charged_pence: number;
7470
+ charged_ex_vat_pence: number;
7471
+ confirm_url?: string | null | undefined;
7472
+ } | null | undefined;
7473
+ addons?: {
7474
+ packs: number;
7475
+ packs_next?: number | null | undefined;
7476
+ plan_name: string;
7477
+ plan_ai_gbp: number;
7478
+ plan_storage_gb: number;
7479
+ block_ai_gbp: number;
7480
+ block_storage_gb: number;
7481
+ ai_blocks: number;
7482
+ storage_blocks: number;
7483
+ legacy_ai_blocks: number;
7484
+ legacy_storage_blocks: number;
7485
+ legacy_block_ai_gbp: number;
7486
+ legacy_block_storage_gb: number;
7487
+ blocks_ai_gbp: number;
7488
+ blocks_storage_gb: number;
7489
+ ai_blocks_next?: number | null | undefined;
7490
+ storage_blocks_next?: number | null | undefined;
7491
+ storage_blocks_min: number;
7492
+ auto_topup_threshold_gbp: number;
7493
+ min_auto_topup_threshold_gbp: number;
7494
+ spend_cap_pence?: number | null | undefined;
7495
+ addon_spend_pence: number;
7496
+ auto_spent_pence: number;
7497
+ addon_spend_window_end?: number | null | undefined;
7498
+ manual_spent_pence: number;
7499
+ cap_left_pence?: number | null | undefined;
7500
+ ai_used_gbp: number;
7501
+ ai_allowance_gbp: number;
7502
+ ai_allowance_next_gbp: number;
7503
+ storage_used_gb: number;
7504
+ storage_allowance_gb: number;
7505
+ storage_allowance_next_gb: number;
7506
+ ai_block_monthly_pence: number;
7507
+ ai_block_monthly_ex_vat_pence: number;
7508
+ storage_block_monthly_pence: number;
7509
+ storage_block_monthly_ex_vat_pence: number;
7510
+ ai_block_period_pence: number;
7511
+ ai_block_period_ex_vat_pence: number;
7512
+ storage_block_period_pence: number;
7513
+ storage_block_period_ex_vat_pence: number;
7514
+ ai_block_price_pence: number;
7515
+ ai_block_price_ex_vat_pence: number;
7516
+ storage_block_price_pence: number;
7517
+ storage_block_price_ex_vat_pence: number;
7518
+ cap_reached: boolean;
7519
+ period_end?: number | null | undefined;
7520
+ ai_usage_reset_at?: number | null | undefined;
7521
+ pending_interval?: ("month" | "year") | null | undefined;
7522
+ billing_error?: string | null | undefined;
7523
+ confirm_url?: string | null | undefined;
7524
+ payment?: {
7525
+ status: "pending" | "paid";
7526
+ kind?: ("ai_usage" | "storage") | null | undefined;
7527
+ amount_pence?: number | null | undefined;
7528
+ amount_ex_vat_pence?: number | null | undefined;
7529
+ tax_pence?: number | null | undefined;
7530
+ at?: number | null | undefined;
7531
+ confirm_url?: string | null | undefined;
7532
+ } | null | undefined;
7533
+ } | null | undefined;
7534
+ price_id?: string | null | undefined;
7535
+ plan?: string | null | undefined;
7536
+ amount?: number | null | undefined;
7537
+ amount_ex_vat?: number | null | undefined;
7538
+ currency?: string | null | undefined;
7539
+ current_period_end?: number | null | undefined;
7540
+ cancel_at_period_end?: boolean | null | undefined;
7541
+ portal_url?: string | null | undefined;
7542
+ }>;
7543
+ /** The project's stage and budget changes, newest first. */
7544
+ events: (projectExtId: string, options?: {
7545
+ kind?: ProjectEventKind;
7546
+ limit?: number;
7547
+ }) => Promise<{
7548
+ external_id: string;
7549
+ kind: "stage_changed" | "budget_changed";
7550
+ actor?: string | null;
7551
+ detail: {
7552
+ [key: string]: unknown;
7553
+ };
7554
+ created_at: string;
7555
+ }[]>;
7556
+ /** The project's spend by conversation in a billing period (£). */
7557
+ usageByConversation: (projectExtId: string, monthsBack?: number) => Promise<{
7558
+ project_ext_id: string;
7559
+ period_start: string;
7560
+ period_end: string;
7561
+ total_spend: number;
7562
+ total_tokens: number;
7563
+ total_requests: number;
7564
+ by_conversation: {
7565
+ [key: string]: components["schemas"]["TagBreakdown"];
7566
+ };
7567
+ unattributed: components["schemas"]["TagBreakdown"];
7568
+ }>;
7569
+ refresh: (projectExtId: string) => Promise<{
7570
+ external_id: string;
7571
+ name: string;
7572
+ created_by: string;
7573
+ subscription: string;
7574
+ created_at: string;
7575
+ quotas: {
7576
+ storage_gb: {
7577
+ used: number;
7578
+ limit: number;
7579
+ };
7580
+ ai_usage: {
7581
+ used: number;
7582
+ limit: number;
7583
+ };
7584
+ collaborators: {
7585
+ used: number;
7586
+ limit: number;
7587
+ };
7588
+ budget_reset_at?: number | null | undefined;
7589
+ };
7590
+ daily_cap_per_user?: number | null | undefined;
7591
+ budget?: {
7592
+ amount: number;
7593
+ currency: string;
7594
+ } | null | undefined;
7595
+ client?: string | null | undefined;
7596
+ client_ref?: string | null | undefined;
7597
+ stage?: string | null | undefined;
7598
+ stage_changed_at?: string | null | undefined;
7599
+ lead_user?: string | null | undefined;
7600
+ fields?: {
7601
+ [x: string]: unknown;
7602
+ } | undefined;
7603
+ field_schema?: {
7604
+ key: string;
7605
+ label?: string | null | undefined;
7606
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
7607
+ options?: string[] | null | undefined;
7608
+ }[] | null | undefined;
7609
+ plan_interval?: ("month" | "year") | null | undefined;
7610
+ packs: number;
7611
+ plan_change?: {
7612
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
7613
+ charged_pence: number;
7614
+ charged_ex_vat_pence: number;
7615
+ confirm_url?: string | null | undefined;
7616
+ } | null | undefined;
7617
+ addons?: {
7618
+ packs: number;
7619
+ packs_next?: number | null | undefined;
7620
+ plan_name: string;
7621
+ plan_ai_gbp: number;
7622
+ plan_storage_gb: number;
7623
+ block_ai_gbp: number;
7624
+ block_storage_gb: number;
7625
+ ai_blocks: number;
7626
+ storage_blocks: number;
7627
+ legacy_ai_blocks: number;
7628
+ legacy_storage_blocks: number;
7629
+ legacy_block_ai_gbp: number;
7630
+ legacy_block_storage_gb: number;
7631
+ blocks_ai_gbp: number;
7632
+ blocks_storage_gb: number;
7633
+ ai_blocks_next?: number | null | undefined;
7634
+ storage_blocks_next?: number | null | undefined;
7635
+ storage_blocks_min: number;
7636
+ auto_topup_threshold_gbp: number;
7637
+ min_auto_topup_threshold_gbp: number;
7638
+ spend_cap_pence?: number | null | undefined;
7639
+ addon_spend_pence: number;
7640
+ auto_spent_pence: number;
7641
+ addon_spend_window_end?: number | null | undefined;
7642
+ manual_spent_pence: number;
7643
+ cap_left_pence?: number | null | undefined;
7644
+ ai_used_gbp: number;
7645
+ ai_allowance_gbp: number;
7646
+ ai_allowance_next_gbp: number;
7647
+ storage_used_gb: number;
7648
+ storage_allowance_gb: number;
7649
+ storage_allowance_next_gb: number;
7650
+ ai_block_monthly_pence: number;
7651
+ ai_block_monthly_ex_vat_pence: number;
7652
+ storage_block_monthly_pence: number;
7653
+ storage_block_monthly_ex_vat_pence: number;
7654
+ ai_block_period_pence: number;
7655
+ ai_block_period_ex_vat_pence: number;
7656
+ storage_block_period_pence: number;
7657
+ storage_block_period_ex_vat_pence: number;
7658
+ ai_block_price_pence: number;
7659
+ ai_block_price_ex_vat_pence: number;
7660
+ storage_block_price_pence: number;
7661
+ storage_block_price_ex_vat_pence: number;
7662
+ cap_reached: boolean;
7663
+ period_end?: number | null | undefined;
7664
+ ai_usage_reset_at?: number | null | undefined;
7665
+ pending_interval?: ("month" | "year") | null | undefined;
7666
+ billing_error?: string | null | undefined;
7667
+ confirm_url?: string | null | undefined;
7668
+ payment?: {
7669
+ status: "pending" | "paid";
7670
+ kind?: ("ai_usage" | "storage") | null | undefined;
7671
+ amount_pence?: number | null | undefined;
7672
+ amount_ex_vat_pence?: number | null | undefined;
7673
+ tax_pence?: number | null | undefined;
7674
+ at?: number | null | undefined;
7675
+ confirm_url?: string | null | undefined;
7676
+ } | null | undefined;
7677
+ } | null | undefined;
7678
+ price_id?: string | null | undefined;
7679
+ plan?: string | null | undefined;
7680
+ amount?: number | null | undefined;
7681
+ amount_ex_vat?: number | null | undefined;
7682
+ currency?: string | null | undefined;
7683
+ current_period_end?: number | null | undefined;
7684
+ cancel_at_period_end?: boolean | null | undefined;
7685
+ portal_url?: string | null | undefined;
7686
+ }>;
7687
+ /** AI usage + spend breakdown for a project's billing period. */
7688
+ usage: (projectExtId: string, monthsBack?: number) => Promise<{
7689
+ project_ext_id: string;
7690
+ period_start: string;
7691
+ period_end: string;
7692
+ total_spend: number;
7693
+ total_tokens: number;
7694
+ total_requests: number;
7695
+ daily: components["schemas"]["DailyUsage"][];
7696
+ model_groups: {
7697
+ [key: string]: components["schemas"]["ModelGroupUsage"];
7698
+ };
7699
+ by_workspace: {
7700
+ [key: string]: components["schemas"]["TagBreakdown"];
7701
+ };
7702
+ by_user: {
7703
+ [key: string]: components["schemas"]["TagBreakdown"];
7704
+ };
7705
+ by_feature: {
7706
+ [key: string]: components["schemas"]["TagBreakdown"];
7707
+ };
7708
+ invoice_pdf?: string | null;
7709
+ }>;
7710
+ /** Stripe invoices for a project's subscription. */
7711
+ invoices: (projectExtId: string) => Promise<{
7712
+ project_ext_id: string;
7713
+ invoices: components["schemas"]["ProjectInvoice"][];
7714
+ }>;
7715
+ /** Delete a project (only when empty: no workspaces, no subscription). */
7716
+ delete: (projectExtId: string) => Promise<void>;
7717
+ /** The plans and add-ons on sale. */
7718
+ products: () => Promise<{
7719
+ product_id: string;
7720
+ name: string;
7721
+ description?: string | null | undefined;
7722
+ prices: {
7723
+ price_id: string;
7724
+ amount?: number | null | undefined;
7725
+ amount_ex_vat?: number | null | undefined;
7726
+ currency: string;
7727
+ interval: string;
7728
+ interval_count: number;
7729
+ default_price: boolean;
7730
+ pack_prices: {
7731
+ packs: number;
7732
+ amount: number;
7733
+ amount_ex_vat: number;
7734
+ }[];
7735
+ addon_prices: {
7736
+ kind: "ai_usage" | "storage";
7737
+ ai_gbp: number;
7738
+ storage_gb: number;
7739
+ amount_ex_vat: number;
7740
+ amount: number;
7741
+ monthly_ex_vat: number;
7742
+ monthly: number;
7743
+ }[];
7744
+ }[];
7745
+ }[]>;
7746
+ /** The taxed total of a Pro purchase (a new project when `projectExtId` is null). */
7747
+ quotePlan: (projectExtId: string | null, body: ProjectQuoteRequest) => Promise<{
7748
+ subtotal_pence: number;
7749
+ tax_pence: number;
7750
+ total_pence: number;
7751
+ tax_label?: string | null | undefined;
7752
+ reverse_charge: boolean;
7753
+ country?: string | null | undefined;
7754
+ taxability_reason?: string | null | undefined;
7755
+ lines: {
7756
+ reference: string;
7757
+ subtotal_pence: number;
7758
+ tax_pence: number;
7759
+ }[];
7760
+ }>;
7761
+ /** Start an embedded Stripe checkout; returns its `client_secret`. */
7762
+ checkout: (projectExtId: string, body: ProjectCheckoutRequest) => Promise<{
7763
+ client_secret: string;
7764
+ }>;
7765
+ changePlan: (projectExtId: string, body: ProjectPlanChangeRequest) => Promise<{
6540
7766
  external_id: string;
6541
7767
  name: string;
6542
7768
  created_by: string;
@@ -6654,8 +7880,179 @@ declare class Arbi {
6654
7880
  cancel_at_period_end?: boolean | null | undefined;
6655
7881
  portal_url?: string | null | undefined;
6656
7882
  }>;
6657
- /** Patch a project: name, daily cap, budget, client, stage, lead, fields (merged key by key). */
6658
- update: (projectExtId: string, body: ProjectUpdateRequest) => Promise<{
7883
+ previewPlanChange: (projectExtId: string, body: ProjectPlanChangeRequest) => Promise<{
7884
+ packs: number;
7885
+ plan_name: string;
7886
+ interval: "month" | "year";
7887
+ effective_now: boolean;
7888
+ unchanged: boolean;
7889
+ awaiting_confirmation: boolean;
7890
+ due_now_pence: number;
7891
+ due_now_ex_vat_pence: number;
7892
+ due_now_tax_pence: number;
7893
+ next_renewal_pence: number;
7894
+ next_renewal_ex_vat_pence: number;
7895
+ next_renewal_tax_pence: number;
7896
+ tax_label?: string | null | undefined;
7897
+ next_renewal_at?: number | null | undefined;
7898
+ }>;
7899
+ quoteAddon: (projectExtId: string, kind: ProjectAddonKind) => Promise<{
7900
+ kind: "ai_usage" | "storage";
7901
+ now: {
7902
+ subtotal_pence: number;
7903
+ tax_pence: number;
7904
+ total_pence: number;
7905
+ tax_label?: string | null | undefined;
7906
+ reverse_charge: boolean;
7907
+ country?: string | null | undefined;
7908
+ taxability_reason?: string | null | undefined;
7909
+ lines: {
7910
+ reference: string;
7911
+ subtotal_pence: number;
7912
+ tax_pence: number;
7913
+ }[];
7914
+ };
7915
+ renewal: {
7916
+ subtotal_pence: number;
7917
+ tax_pence: number;
7918
+ total_pence: number;
7919
+ tax_label?: string | null | undefined;
7920
+ reverse_charge: boolean;
7921
+ country?: string | null | undefined;
7922
+ taxability_reason?: string | null | undefined;
7923
+ lines: {
7924
+ reference: string;
7925
+ subtotal_pence: number;
7926
+ tax_pence: number;
7927
+ }[];
7928
+ };
7929
+ }>;
7930
+ billingPortal: (projectExtId: string) => Promise<{
7931
+ url: string;
7932
+ }>;
7933
+ addAddonBlock: (projectExtId: string, kind: ProjectAddonKind) => Promise<{
7934
+ status: "paid" | "requires_action";
7935
+ confirm_url?: string | null | undefined;
7936
+ project: {
7937
+ external_id: string;
7938
+ name: string;
7939
+ created_by: string;
7940
+ subscription: string;
7941
+ created_at: string;
7942
+ quotas: {
7943
+ storage_gb: {
7944
+ used: number;
7945
+ limit: number;
7946
+ };
7947
+ ai_usage: {
7948
+ used: number;
7949
+ limit: number;
7950
+ };
7951
+ collaborators: {
7952
+ used: number;
7953
+ limit: number;
7954
+ };
7955
+ budget_reset_at?: number | null | undefined;
7956
+ };
7957
+ daily_cap_per_user?: number | null | undefined;
7958
+ budget?: {
7959
+ amount: number;
7960
+ currency: string;
7961
+ } | null | undefined;
7962
+ client?: string | null | undefined;
7963
+ client_ref?: string | null | undefined;
7964
+ stage?: string | null | undefined;
7965
+ stage_changed_at?: string | null | undefined;
7966
+ lead_user?: string | null | undefined;
7967
+ fields?: {
7968
+ [x: string]: unknown;
7969
+ } | undefined;
7970
+ field_schema?: {
7971
+ key: string;
7972
+ label?: string | null | undefined;
7973
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
7974
+ options?: string[] | null | undefined;
7975
+ }[] | null | undefined;
7976
+ plan_interval?: ("month" | "year") | null | undefined;
7977
+ packs: number;
7978
+ plan_change?: {
7979
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
7980
+ charged_pence: number;
7981
+ charged_ex_vat_pence: number;
7982
+ confirm_url?: string | null | undefined;
7983
+ } | null | undefined;
7984
+ addons?: {
7985
+ packs: number;
7986
+ packs_next?: number | null | undefined;
7987
+ plan_name: string;
7988
+ plan_ai_gbp: number;
7989
+ plan_storage_gb: number;
7990
+ block_ai_gbp: number;
7991
+ block_storage_gb: number;
7992
+ ai_blocks: number;
7993
+ storage_blocks: number;
7994
+ legacy_ai_blocks: number;
7995
+ legacy_storage_blocks: number;
7996
+ legacy_block_ai_gbp: number;
7997
+ legacy_block_storage_gb: number;
7998
+ blocks_ai_gbp: number;
7999
+ blocks_storage_gb: number;
8000
+ ai_blocks_next?: number | null | undefined;
8001
+ storage_blocks_next?: number | null | undefined;
8002
+ storage_blocks_min: number;
8003
+ auto_topup_threshold_gbp: number;
8004
+ min_auto_topup_threshold_gbp: number;
8005
+ spend_cap_pence?: number | null | undefined;
8006
+ addon_spend_pence: number;
8007
+ auto_spent_pence: number;
8008
+ addon_spend_window_end?: number | null | undefined;
8009
+ manual_spent_pence: number;
8010
+ cap_left_pence?: number | null | undefined;
8011
+ ai_used_gbp: number;
8012
+ ai_allowance_gbp: number;
8013
+ ai_allowance_next_gbp: number;
8014
+ storage_used_gb: number;
8015
+ storage_allowance_gb: number;
8016
+ storage_allowance_next_gb: number;
8017
+ ai_block_monthly_pence: number;
8018
+ ai_block_monthly_ex_vat_pence: number;
8019
+ storage_block_monthly_pence: number;
8020
+ storage_block_monthly_ex_vat_pence: number;
8021
+ ai_block_period_pence: number;
8022
+ ai_block_period_ex_vat_pence: number;
8023
+ storage_block_period_pence: number;
8024
+ storage_block_period_ex_vat_pence: number;
8025
+ ai_block_price_pence: number;
8026
+ ai_block_price_ex_vat_pence: number;
8027
+ storage_block_price_pence: number;
8028
+ storage_block_price_ex_vat_pence: number;
8029
+ cap_reached: boolean;
8030
+ period_end?: number | null | undefined;
8031
+ ai_usage_reset_at?: number | null | undefined;
8032
+ pending_interval?: ("month" | "year") | null | undefined;
8033
+ billing_error?: string | null | undefined;
8034
+ confirm_url?: string | null | undefined;
8035
+ payment?: {
8036
+ status: "pending" | "paid";
8037
+ kind?: ("ai_usage" | "storage") | null | undefined;
8038
+ amount_pence?: number | null | undefined;
8039
+ amount_ex_vat_pence?: number | null | undefined;
8040
+ tax_pence?: number | null | undefined;
8041
+ at?: number | null | undefined;
8042
+ confirm_url?: string | null | undefined;
8043
+ } | null | undefined;
8044
+ } | null | undefined;
8045
+ price_id?: string | null | undefined;
8046
+ plan?: string | null | undefined;
8047
+ amount?: number | null | undefined;
8048
+ amount_ex_vat?: number | null | undefined;
8049
+ currency?: string | null | undefined;
8050
+ current_period_end?: number | null | undefined;
8051
+ cancel_at_period_end?: boolean | null | undefined;
8052
+ portal_url?: string | null | undefined;
8053
+ };
8054
+ }>;
8055
+ setNextPeriodAddons: (projectExtId: string, body: ProjectNextPeriodAddonsRequest) => Promise<{
6659
8056
  external_id: string;
6660
8057
  name: string;
6661
8058
  created_by: string;
@@ -6773,33 +8170,125 @@ declare class Arbi {
6773
8170
  cancel_at_period_end?: boolean | null | undefined;
6774
8171
  portal_url?: string | null | undefined;
6775
8172
  }>;
6776
- /** The project's stage and budget changes, newest first. */
6777
- events: (projectExtId: string, options?: {
6778
- kind?: ProjectEventKind;
6779
- limit?: number;
6780
- }) => Promise<{
8173
+ updateAddonSettings: (projectExtId: string, body: ProjectAddonSettingsRequest) => Promise<{
6781
8174
  external_id: string;
6782
- kind: "stage_changed" | "budget_changed";
6783
- actor?: string | null;
6784
- detail: {
6785
- [key: string]: unknown;
6786
- };
8175
+ name: string;
8176
+ created_by: string;
8177
+ subscription: string;
6787
8178
  created_at: string;
6788
- }[]>;
6789
- /** The project's spend by conversation in a billing period (£). */
6790
- usageByConversation: (projectExtId: string, monthsBack?: number) => Promise<{
6791
- project_ext_id: string;
6792
- period_start: string;
6793
- period_end: string;
6794
- total_spend: number;
6795
- total_tokens: number;
6796
- total_requests: number;
6797
- by_conversation: {
6798
- [key: string]: components["schemas"]["TagBreakdown"];
8179
+ quotas: {
8180
+ storage_gb: {
8181
+ used: number;
8182
+ limit: number;
8183
+ };
8184
+ ai_usage: {
8185
+ used: number;
8186
+ limit: number;
8187
+ };
8188
+ collaborators: {
8189
+ used: number;
8190
+ limit: number;
8191
+ };
8192
+ budget_reset_at?: number | null | undefined;
6799
8193
  };
6800
- unattributed: components["schemas"]["TagBreakdown"];
8194
+ daily_cap_per_user?: number | null | undefined;
8195
+ budget?: {
8196
+ amount: number;
8197
+ currency: string;
8198
+ } | null | undefined;
8199
+ client?: string | null | undefined;
8200
+ client_ref?: string | null | undefined;
8201
+ stage?: string | null | undefined;
8202
+ stage_changed_at?: string | null | undefined;
8203
+ lead_user?: string | null | undefined;
8204
+ fields?: {
8205
+ [x: string]: unknown;
8206
+ } | undefined;
8207
+ field_schema?: {
8208
+ key: string;
8209
+ label?: string | null | undefined;
8210
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
8211
+ options?: string[] | null | undefined;
8212
+ }[] | null | undefined;
8213
+ plan_interval?: ("month" | "year") | null | undefined;
8214
+ packs: number;
8215
+ plan_change?: {
8216
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
8217
+ charged_pence: number;
8218
+ charged_ex_vat_pence: number;
8219
+ confirm_url?: string | null | undefined;
8220
+ } | null | undefined;
8221
+ addons?: {
8222
+ packs: number;
8223
+ packs_next?: number | null | undefined;
8224
+ plan_name: string;
8225
+ plan_ai_gbp: number;
8226
+ plan_storage_gb: number;
8227
+ block_ai_gbp: number;
8228
+ block_storage_gb: number;
8229
+ ai_blocks: number;
8230
+ storage_blocks: number;
8231
+ legacy_ai_blocks: number;
8232
+ legacy_storage_blocks: number;
8233
+ legacy_block_ai_gbp: number;
8234
+ legacy_block_storage_gb: number;
8235
+ blocks_ai_gbp: number;
8236
+ blocks_storage_gb: number;
8237
+ ai_blocks_next?: number | null | undefined;
8238
+ storage_blocks_next?: number | null | undefined;
8239
+ storage_blocks_min: number;
8240
+ auto_topup_threshold_gbp: number;
8241
+ min_auto_topup_threshold_gbp: number;
8242
+ spend_cap_pence?: number | null | undefined;
8243
+ addon_spend_pence: number;
8244
+ auto_spent_pence: number;
8245
+ addon_spend_window_end?: number | null | undefined;
8246
+ manual_spent_pence: number;
8247
+ cap_left_pence?: number | null | undefined;
8248
+ ai_used_gbp: number;
8249
+ ai_allowance_gbp: number;
8250
+ ai_allowance_next_gbp: number;
8251
+ storage_used_gb: number;
8252
+ storage_allowance_gb: number;
8253
+ storage_allowance_next_gb: number;
8254
+ ai_block_monthly_pence: number;
8255
+ ai_block_monthly_ex_vat_pence: number;
8256
+ storage_block_monthly_pence: number;
8257
+ storage_block_monthly_ex_vat_pence: number;
8258
+ ai_block_period_pence: number;
8259
+ ai_block_period_ex_vat_pence: number;
8260
+ storage_block_period_pence: number;
8261
+ storage_block_period_ex_vat_pence: number;
8262
+ ai_block_price_pence: number;
8263
+ ai_block_price_ex_vat_pence: number;
8264
+ storage_block_price_pence: number;
8265
+ storage_block_price_ex_vat_pence: number;
8266
+ cap_reached: boolean;
8267
+ period_end?: number | null | undefined;
8268
+ ai_usage_reset_at?: number | null | undefined;
8269
+ pending_interval?: ("month" | "year") | null | undefined;
8270
+ billing_error?: string | null | undefined;
8271
+ confirm_url?: string | null | undefined;
8272
+ payment?: {
8273
+ status: "pending" | "paid";
8274
+ kind?: ("ai_usage" | "storage") | null | undefined;
8275
+ amount_pence?: number | null | undefined;
8276
+ amount_ex_vat_pence?: number | null | undefined;
8277
+ tax_pence?: number | null | undefined;
8278
+ at?: number | null | undefined;
8279
+ confirm_url?: string | null | undefined;
8280
+ } | null | undefined;
8281
+ } | null | undefined;
8282
+ price_id?: string | null | undefined;
8283
+ plan?: string | null | undefined;
8284
+ amount?: number | null | undefined;
8285
+ amount_ex_vat?: number | null | undefined;
8286
+ currency?: string | null | undefined;
8287
+ current_period_end?: number | null | undefined;
8288
+ cancel_at_period_end?: boolean | null | undefined;
8289
+ portal_url?: string | null | undefined;
6801
8290
  }>;
6802
- refresh: (projectExtId: string) => Promise<{
8291
+ cancelSubscription: (projectExtId: string) => Promise<{
6803
8292
  external_id: string;
6804
8293
  name: string;
6805
8294
  created_by: string;
@@ -6917,34 +8406,6 @@ declare class Arbi {
6917
8406
  cancel_at_period_end?: boolean | null | undefined;
6918
8407
  portal_url?: string | null | undefined;
6919
8408
  }>;
6920
- /** AI usage + spend breakdown for a project's billing period. */
6921
- usage: (projectExtId: string, monthsBack?: number) => Promise<{
6922
- project_ext_id: string;
6923
- period_start: string;
6924
- period_end: string;
6925
- total_spend: number;
6926
- total_tokens: number;
6927
- total_requests: number;
6928
- daily: components["schemas"]["DailyUsage"][];
6929
- model_groups: {
6930
- [key: string]: components["schemas"]["ModelGroupUsage"];
6931
- };
6932
- by_workspace: {
6933
- [key: string]: components["schemas"]["TagBreakdown"];
6934
- };
6935
- by_user: {
6936
- [key: string]: components["schemas"]["TagBreakdown"];
6937
- };
6938
- by_feature: {
6939
- [key: string]: components["schemas"]["TagBreakdown"];
6940
- };
6941
- invoice_pdf?: string | null;
6942
- }>;
6943
- /** Stripe invoices for a project's subscription. */
6944
- invoices: (projectExtId: string) => Promise<{
6945
- project_ext_id: string;
6946
- invoices: components["schemas"]["ProjectInvoice"][];
6947
- }>;
6948
8409
  };
6949
8410
  readonly user: {
6950
8411
  /**
@@ -7231,6 +8692,12 @@ declare class Arbi {
7231
8692
  project_subscription?: string | null | undefined;
7232
8693
  project_owner_ext_id?: string | null | undefined;
7233
8694
  house_template_ext_id?: string | null | undefined;
8695
+ archive?: {
8696
+ status: "archiving" | "archived" | "restoring";
8697
+ archived_at: string;
8698
+ documents_done: number;
8699
+ documents_total: number;
8700
+ } | null | undefined;
7234
8701
  }[]>;
7235
8702
  create: (name: string, projectExtId: string, description?: string | null, isPublic?: boolean) => Promise<{
7236
8703
  external_id: string;
@@ -7274,6 +8741,12 @@ declare class Arbi {
7274
8741
  project_subscription?: string | null | undefined;
7275
8742
  project_owner_ext_id?: string | null | undefined;
7276
8743
  house_template_ext_id?: string | null | undefined;
8744
+ archive?: {
8745
+ status: "archiving" | "archived" | "restoring";
8746
+ archived_at: string;
8747
+ documents_done: number;
8748
+ documents_total: number;
8749
+ } | null | undefined;
7277
8750
  }>;
7278
8751
  delete: (workspaceIds: string[]) => Promise<void>;
7279
8752
  update: (body: WorkspaceUpdateRequest) => Promise<{
@@ -7318,6 +8791,12 @@ declare class Arbi {
7318
8791
  project_subscription?: string | null | undefined;
7319
8792
  project_owner_ext_id?: string | null | undefined;
7320
8793
  house_template_ext_id?: string | null | undefined;
8794
+ archive?: {
8795
+ status: "archiving" | "archived" | "restoring";
8796
+ archived_at: string;
8797
+ documents_done: number;
8798
+ documents_total: number;
8799
+ } | null | undefined;
7321
8800
  }>;
7322
8801
  listUsers: () => Promise<{
7323
8802
  user: {
@@ -9214,13 +10693,16 @@ declare class Arbi {
9214
10693
  content?: string | null;
9215
10694
  }[]>;
9216
10695
  /**
9217
- * Search documents without LLM generation (retrieval only).
10696
+ * Search documents without LLM generation (retrieval only). No `docIds` searches the whole
10697
+ * workspace; `searchChunks(result)` ranks the passages found.
9218
10698
  */
9219
10699
  retrieve: (query: string, docIds: string[], options?: {
9220
10700
  searchMode?: "semantic" | "keyword" | "hybrid";
9221
10701
  fullContextDocIds?: string[];
9222
10702
  tocDocIds?: string[];
9223
10703
  model?: string;
10704
+ /** Keep the response server-side (default true). */
10705
+ store?: boolean;
9224
10706
  }) => Promise<RetrieveResult>;
9225
10707
  };
9226
10708
  readonly tags: {
@@ -9525,6 +11007,8 @@ declare class Arbi {
9525
11007
  name?: string | null;
9526
11008
  user_id?: string | null;
9527
11009
  contact_id?: string | null;
11010
+ address_book_ext_id?: string | null;
11011
+ registered: boolean;
9528
11012
  source: "contacts" | "arbi";
9529
11013
  }[]>;
9530
11014
  groupByStatus: typeof groupContactsByStatus;
@@ -9574,7 +11058,7 @@ declare class Arbi {
9574
11058
  description?: string | null;
9575
11059
  color: string;
9576
11060
  timezone: string;
9577
- kind: "calendar" | "resource" | "subscription" | "holidays" | "birthdays" | "addressbook";
11061
+ kind: "calendar" | "resource" | "subscription" | "holidays" | "addressbook";
9578
11062
  role: "owner" | "delegate" | "write" | "read" | "read_basic" | "freebusy";
9579
11063
  is_default: boolean;
9580
11064
  hidden: boolean;
@@ -9599,7 +11083,7 @@ declare class Arbi {
9599
11083
  description?: string | null;
9600
11084
  color: string;
9601
11085
  timezone: string;
9602
- kind: "calendar" | "resource" | "subscription" | "holidays" | "birthdays" | "addressbook";
11086
+ kind: "calendar" | "resource" | "subscription" | "holidays" | "addressbook";
9603
11087
  role: "owner" | "delegate" | "write" | "read" | "read_basic" | "freebusy";
9604
11088
  is_default: boolean;
9605
11089
  hidden: boolean;
@@ -9624,7 +11108,7 @@ declare class Arbi {
9624
11108
  description?: string | null;
9625
11109
  color: string;
9626
11110
  timezone: string;
9627
- kind: "calendar" | "resource" | "subscription" | "holidays" | "birthdays" | "addressbook";
11111
+ kind: "calendar" | "resource" | "subscription" | "holidays" | "addressbook";
9628
11112
  role: "owner" | "delegate" | "write" | "read" | "read_basic" | "freebusy";
9629
11113
  is_default: boolean;
9630
11114
  hidden: boolean;
@@ -9991,7 +11475,7 @@ declare class Arbi {
9991
11475
  description?: string | null;
9992
11476
  color: string;
9993
11477
  timezone: string;
9994
- kind: "calendar" | "resource" | "subscription" | "holidays" | "birthdays" | "addressbook";
11478
+ kind: "calendar" | "resource" | "subscription" | "holidays" | "addressbook";
9995
11479
  role: "owner" | "delegate" | "write" | "read" | "read_basic" | "freebusy";
9996
11480
  is_default: boolean;
9997
11481
  hidden: boolean;
@@ -10026,7 +11510,7 @@ declare class Arbi {
10026
11510
  description?: string | null;
10027
11511
  color: string;
10028
11512
  timezone: string;
10029
- kind: "calendar" | "resource" | "subscription" | "holidays" | "birthdays" | "addressbook";
11513
+ kind: "calendar" | "resource" | "subscription" | "holidays" | "addressbook";
10030
11514
  role: "owner" | "delegate" | "write" | "read" | "read_basic" | "freebusy";
10031
11515
  is_default: boolean;
10032
11516
  hidden: boolean;
@@ -10218,7 +11702,7 @@ declare class Arbi {
10218
11702
  description?: string | null;
10219
11703
  color: string;
10220
11704
  timezone: string;
10221
- kind: "calendar" | "resource" | "subscription" | "holidays" | "birthdays" | "addressbook";
11705
+ kind: "calendar" | "resource" | "subscription" | "holidays" | "addressbook";
10222
11706
  role: "owner" | "delegate" | "write" | "read" | "read_basic" | "freebusy";
10223
11707
  is_default: boolean;
10224
11708
  hidden: boolean;
@@ -10237,42 +11721,6 @@ declare class Arbi {
10237
11721
  can_write: boolean;
10238
11722
  ctag: string;
10239
11723
  }>;
10240
- listAppPasswords: () => Promise<{
10241
- id: string;
10242
- kind: "dav" | "feed" | "freebusy";
10243
- label: string;
10244
- calendar_ids?: string[];
10245
- feed_level?: string | null;
10246
- created_at: string;
10247
- last_used_at?: string | null;
10248
- }[]>;
10249
- createAppPassword: (body: AppPasswordCreateBody) => Promise<{
10250
- id: string;
10251
- kind: "dav" | "feed" | "freebusy";
10252
- label: string;
10253
- calendar_ids?: string[];
10254
- feed_level?: string | null;
10255
- created_at: string;
10256
- last_used_at?: string | null;
10257
- password?: string | null;
10258
- username?: string | null;
10259
- server_url?: string | null;
10260
- feed_url?: string | null;
10261
- }>;
10262
- createFeed: (body: FeedCreateBody) => Promise<{
10263
- id: string;
10264
- kind: "dav" | "feed" | "freebusy";
10265
- label: string;
10266
- calendar_ids?: string[];
10267
- feed_level?: string | null;
10268
- created_at: string;
10269
- last_used_at?: string | null;
10270
- password?: string | null;
10271
- username?: string | null;
10272
- server_url?: string | null;
10273
- feed_url?: string | null;
10274
- }>;
10275
- revokeAppPassword: (apwId: string) => Promise<void>;
10276
11724
  listBookingPages: () => Promise<{
10277
11725
  id: string;
10278
11726
  slug: string;
@@ -12911,4 +14359,4 @@ declare namespace identity {
12911
14359
  export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
12912
14360
  }
12913
14361
 
12914
- export { type CliCredentials as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalDavProfile as D, type CalendarAccount as E, type CalendarAccountKind as F, type CalendarCreateBody as G, type CalendarEvent as H, type CalendarKeys as I, type CalendarRead as J, type CalendarSettings as K, type CalendarSettingsBody as L, type CalendarUpdate as M, type CalendarWindow as N, type ChatAttachmentFile as O, type ChatAttachmentInput as P, type ChatCryptoContext as Q, type ChatKeyRing as R, type ChatKind as S, type ChatMemberKey as T, type ChatMemberResponse as U, type ChatMessageResponse as V, type ChatResponse as W, type ChatSession as X, type CitationSummary as Y, type CitationToolSources as Z, type CliConfig as _, type AccountSyncResult as a, type MessageLevel as a$, type CommandDescriptor as a0, type ConfigStore as a1, type ConnectOptions as a2, type ConnectorCatalogEntry as a3, type ConnectorFolder as a4, type ConnectorSyncProgress as a5, type ConnectorSyncStatus as a6, type ConnectorVendorKey as a7, type ConnectorVisibilitySettings as a8, type ConversationResponse as a9, type FactResponse as aA, type FactSearchRequest as aB, type FactSearchResponse as aC, type FeedCreateBody as aD, type FeedLevel as aE, type FindTimeParams as aF, type FormattedWsMessage as aG, type FreeBusyEntry as aH, GOOGLE_VENDORS as aI, type HolidayCountry as aJ, type HouseTemplateCandidate as aK, IMANAGE_VENDORS as aL, type IdentityErrorCode as aM, type IdentityPurchase as aN, type IdentityState as aO, type IdentityStatus as aP, type ImportResult as aQ, type InvitationRead as aR, type LinkedRun as aS, type ListAllOptions as aT, type ListEventsParams as aU, type ListFactsOptions as aV, type ListPaginatedOptions as aW, MAILBOX_SYNC_VENDORS as aX, MICROSOFT_VENDORS as aY, type MailAttachment as aZ, type MailDraftSSEEvent as a_, type ConversationUsageResponse as aa, type CreateFactRequest as ab, type CreateFactsRequest as ac, type CreateWorkRequest as ad, type CreateWorkflowRequest as ae, DEFAULT_AI_USD_PER_GBP as af, DOC_TERMINAL_STATUSES as ag, DRIVE_SYNC_VENDORS as ah, type DateTimeSpec as ai, type DecryptedChat as aj, type DecryptedChatMessage as ak, type DeferredInterjectionEvent as al, type DeploymentHouseTemplate as am, type DocNameMap as an, type DocumentAutomationAction as ao, type DocumentListFields as ap, type DocumentListOrder as aq, type DocumentSelector as ar, type DocumentWaiter as as, type DocumentWaiterOptions as at, type DriveSyncProgress as au, type DriveSyncSummary as av, type EditScope as aw, type EventCreateBody as ax, type EventPatchBody as ay, FLAT_TAG_KINDS as az, type ActivityKind as b, type StepField as b$, type MessageMetadataPayload$1 as b0, type MessageQueuedEvent as b1, type OAuthAccountKind as b2, type OutputTokensDetails as b3, type OverlayItem as b4, type OverlayLayerName as b5, type ParsedSlashCommand as b6, type PendingAuthResponse as b7, type PersonKey as b8, PlanStepsError as b9, type ResponseOutputItemDoneEvent as bA, type ResponseOutputTextDeltaEvent as bB, type ResponseOutputTextDoneEvent as bC, type ResponseUsage as bD, type RoomCreateBody as bE, type RoomQuery as bF, type RoomRead as bG, type RunProgress as bH, type RunStep as bI, type RunWaitingOn as bJ, SHAREPOINT_VENDORS as bK, type SSEEvent as bL, type SSEStreamCallbacks as bM, type SSEStreamResult as bN, type SSEStreamStartData as bO, STEP_FIELD_OPTION_TONES as bP, SUPPORTED_EXTENSIONS as bQ, type ScopedTarget as bR, type SendBack as bS, type ShareRead as bT, type ShareRole as bU, type SkillSummary as bV, type SkippedFile as bW, type SlackConnectionStatus as bX, type StepActionRequest as bY, type StepActivityEvent as bZ, type StepAssignee as b_, type PlanWorkRequest as ba, type ProbeAnswerEvent as bb, type ProjectBudget as bc, type ProjectConversationUsageResponse as bd, type ProjectDetails as be, type ProjectEventKind as bf, type ProjectEventResponse as bg, type ProjectInvoicesResponse as bh, type ProjectResponse as bi, type ProjectUpdateRequest as bj, type ProjectUsageResponse as bk, PublicBookingError as bl, type PublicBookingPage as bm, type QueryOptions as bn, type RaisedSignal as bo, type ReconnectOptions as bp, type ReconnectableWsConnection as bq, type ResolvedCitation as br, type ResolvedRecipient as bs, type RespondParams as bt, type RespondPartstat as bu, type ResponseCompletedEvent as bv, type ResponseContentPartAddedEvent as bw, type ResponseCreatedEvent as bx, type ResponseFailedEvent as by, type ResponseOutputItemAddedEvent as bz, type ActivityResponse as c, connectErrorMessage as c$, type StepFieldOption as c0, type StepFieldOptionTone as c1, type StepKind as c2, type StepPhase as c3, type StepSignal as c4, type StepSignalWhen as c5, type StepState as c6, type StepStatus as c7, type SubmitBackgroundQueryOptions as c8, type SubscribeParams as c9, type UserInfo as cA, type UserInputRequestEvent as cB, type UserMessageEvent as cC, WebSocketAuthError as cD, type WeeklyHoursSpec as cE, type WorkStatus as cF, type WorkflowAuthMode as cG, type WorkflowResponse as cH, type WorkflowRunHistoryResponse as cI, type WorkflowRunResponse as cJ, type WorkspaceContext as cK, type WsConnection as cL, account as cM, agentconfig as cN, agents as cO, assistant as cP, authenticatedFetch as cQ, bookPublicSlot as cR, buildCitationChunkData as cS, buildDocNameMap as cT, buildFactsContextTool as cU, buildRetrievalChunkTool as cV, buildRetrievalFullContextTool as cW, buildRetrievalTocTool as cX, calendar as cY, cancelPublicBooking as cZ, chats as c_, type SyncTriggerResult as ca, TAG_KINDS as cb, type TagChange as cc, type TagFieldDefinition as cd, type TagKind as ce, type TagKindField as cf, type TagKindSchema as cg, type TagLinks as ch, type TagListQuery as ci, type TagResponse as cj, type TaskPlan as ck, type TaskPlanStep as cl, type TimeSuggestion as cm, type TokenBudgetContext as cn, type UpdateConversationRequest as co, type UpdateFactRequest as cp, type UpdateWorkflowRequest as cq, type UploadBatchResult as cr, type UploadDirectOptions as cs, type UploadDirectResult as ct, type UploadDocumentsOptions as cu, type UploadOptions as cv, type UploadResult as cw, type UsageBreakdown as cx, type UserConnectorEntry as cy, type UserDailyUsageResponse as cz, type AgentControlStateEvent as d, summarizeCitations as d$, connectWebSocket as d0, connectWithReconnect as d1, connectors as d2, consumeSSEStream as d3, contacts as d4, conversations as d5, countCitations as d6, createAuthenticatedClient as d7, createDocumentWaiter as d8, doctags as d9, isMailboxSyncVendor as dA, isSharePointVendor as dB, isSharedSkill as dC, mail as dD, notifications as dE, parseSSEEvents as dF, parseSlashCommand as dG, parseSlashTokenInProgress as dH, performPasswordLogin as dI, performSigningKeyLogin as dJ, performSsoDeviceFlowLogin as dK, profile as dL, projects as dM, requireData as dN, requireOk as dO, resolveAuth as dP, resolveCitations as dQ, resolveWorkspace as dR, responses as dS, selectWorkspace as dT, selectWorkspaceById as dU, sessions as dV, settings as dW, signatureRequests as dX, splitAppPasswords as dY, streamSSE as dZ, stripCitationMarkdown as d_, documents as da, facts as db, files as dc, filterSkills as dd, formatAgentStepLabel as de, formatFileSize as df, formatGbp as dg, formatGbpPerMillionTokens as dh, formatItemLabel as di, formatStreamSummary as dj, formatUserName as dk, formatWorkspaceChoices as dl, formatWsMessage as dm, generateEncryptedWorkspaceKey as dn, generateNewWorkspaceKey as dp, getErrorCode as dq, getErrorMessage as dr, getPublicBookingPage as ds, getRawWorkspaceKey as dt, health as du, houseTemplate as dv, identity as dw, identityErrorCode as dx, isConnectorVendorVisible as dy, isDriveSyncVendor as dz, type AgentStepDeltaEvent as e, tags as e0, uploadSkill as e1, usdToGbp as e2, work as e3, workflowSteps as e4, workflows as e5, workspaces as e6, type AgentStepEvent as f, type AppPassword as g, type AppPasswordCreateBody as h, type AppPasswordCreated as i, Arbi as j, ArbiApiError as k, ArbiError as l, type ArbiErrorEvent as m, type ArbiHostSession as n, type ArbiOptions as o, ArbiSessionExpiredError as p, type ArtifactEvent as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type BridgeTokensOptions as z };
14362
+ export { type ConnectOptions as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarCreateBody as D, type CalendarEvent as E, type CalendarKeys as F, type CalendarRead as G, type CalendarSettings as H, type CalendarSettingsBody as I, type CalendarUpdate as J, type CalendarWindow as K, type ChatAttachmentFile as L, type ChatAttachmentInput as M, type ChatCryptoContext as N, type ChatKeyRing as O, type ChatKind as P, type ChatMemberKey as Q, type ChatMemberResponse as R, type ChatMessageResponse as S, type ChatResponse as T, type ChatSession as U, type CitationSummary as V, type CitationToolSources as W, type CliConfig as X, type CliCredentials as Y, type CommandDescriptor as Z, type ConfigStore as _, type AccountSyncResult as a, type OutputTokensDetails as a$, type ConnectorCatalogEntry as a0, type ConnectorFolder as a1, type ConnectorSyncProgress as a2, type ConnectorSyncStatus as a3, type ConnectorVendorKey as a4, type ConnectorVisibilitySettings as a5, type ConversationResponse as a6, type ConversationUsageResponse as a7, type CreateFactRequest as a8, type CreateFactsRequest as a9, type FindTimeParams as aA, type FormattedWsMessage as aB, type FreeBusyEntry as aC, GOOGLE_VENDORS as aD, type HolidayCountry as aE, type HouseTemplateCandidate as aF, IMANAGE_VENDORS as aG, type IdentityErrorCode as aH, type IdentityPurchase as aI, type IdentityState as aJ, type IdentityStatus as aK, type ImportResult as aL, type InvitationRead as aM, type LinkedRun as aN, type ListAllOptions as aO, type ListEventsParams as aP, type ListFactsOptions as aQ, type ListPaginatedOptions as aR, MAILBOX_SYNC_VENDORS as aS, MAX_RETRIEVE_DOC_IDS as aT, MICROSOFT_VENDORS as aU, type MailAttachment as aV, type MailDraftSSEEvent as aW, type MessageLevel as aX, type MessageMetadataPayload$1 as aY, type MessageQueuedEvent as aZ, type OAuthAccountKind as a_, type CreateWorkRequest as aa, type CreateWorkflowRequest as ab, DEFAULT_AI_USD_PER_GBP as ac, DOC_TERMINAL_STATUSES as ad, DRIVE_SYNC_VENDORS as ae, type DateTimeSpec as af, type DecryptedChat as ag, type DecryptedChatMessage as ah, type DeferredInterjectionEvent as ai, type DeploymentHouseTemplate as aj, type DocNameMap as ak, type DocumentAutomationAction as al, type DocumentListFields as am, type DocumentListOrder as an, type DocumentSelector as ao, type DocumentWaiter as ap, type DocumentWaiterOptions as aq, type DriveSyncProgress as ar, type DriveSyncSummary as as, type EditScope as at, type EventCreateBody as au, type EventPatchBody as av, FLAT_TAG_KINDS as aw, type FactResponse as ax, type FactSearchRequest as ay, type FactSearchResponse as az, type ActivityKind as b, type SkippedFile as b$, type OverlayItem as b0, type OverlayLayerName as b1, type ParsedSlashCommand as b2, type PendingAuthResponse as b3, type PersonKey as b4, PlanStepsError as b5, type PlanWorkRequest as b6, type ProbeAnswerEvent as b7, type ProductResponse as b8, type ProjectAddonKind as b9, type ResponseContentPartAddedEvent as bA, type ResponseCreatedEvent as bB, type ResponseFailedEvent as bC, type ResponseOutputItemAddedEvent as bD, type ResponseOutputItemDoneEvent as bE, type ResponseOutputTextDeltaEvent as bF, type ResponseOutputTextDoneEvent as bG, type ResponseUsage as bH, type RoomCreateBody as bI, type RoomQuery as bJ, type RoomRead as bK, type RunProgress as bL, type RunStep as bM, type RunWaitingOn as bN, SHAREPOINT_VENDORS as bO, type SSEEvent as bP, type SSEStreamCallbacks as bQ, type SSEStreamResult as bR, type SSEStreamStartData as bS, STEP_FIELD_OPTION_TONES as bT, SUPPORTED_EXTENSIONS as bU, type ScopedTarget as bV, type SearchChunk as bW, type SendBack as bX, type ShareRead as bY, type ShareRole as bZ, type SkillSummary as b_, type ProjectAddonSettingsRequest as ba, type ProjectBudget as bb, type ProjectCheckoutRequest as bc, type ProjectConversationUsageResponse as bd, type ProjectCreateOptions as be, type ProjectDetails as bf, type ProjectEventKind as bg, type ProjectEventResponse as bh, type ProjectInvoicesResponse as bi, type ProjectNextPeriodAddonsRequest as bj, type ProjectPlanChangeRequest as bk, type ProjectQuoteRequest as bl, type ProjectResponse as bm, type ProjectUpdateRequest as bn, type ProjectUsageResponse as bo, PublicBookingError as bp, type PublicBookingPage as bq, type QueryOptions as br, type RaisedSignal as bs, type ReconnectOptions as bt, type ReconnectableWsConnection as bu, type ResolvedCitation as bv, type ResolvedRecipient as bw, type RespondParams as bx, type RespondPartstat as by, type ResponseCompletedEvent as bz, type ActivityResponse as c, buildRetrievalChunkTool as c$, type SlackConnectionStatus as c0, type StepActionRequest as c1, type StepActivityEvent as c2, type StepAssignee as c3, type StepField as c4, type StepFieldOption as c5, type StepFieldOptionTone as c6, type StepKind as c7, type StepPhase as c8, type StepSignal as c9, type UploadDocumentsOptions as cA, type UploadOptions as cB, type UploadResult as cC, type UsageBreakdown as cD, type UserConnectorEntry as cE, type UserDailyUsageResponse as cF, type UserInfo as cG, type UserInputRequestEvent as cH, type UserMessageEvent as cI, WebSocketAuthError as cJ, type WeeklyHoursSpec as cK, type WorkStatus as cL, type WorkflowAuthMode as cM, type WorkflowResponse as cN, type WorkflowRunHistoryResponse as cO, type WorkflowRunResponse as cP, type WorkspaceContext as cQ, type WsConnection as cR, account as cS, agentconfig as cT, agents as cU, assistant as cV, authenticatedFetch as cW, bookPublicSlot as cX, buildCitationChunkData as cY, buildDocNameMap as cZ, buildFactsContextTool as c_, type StepSignalWhen as ca, type StepState as cb, type StepStatus as cc, type SubmitBackgroundQueryOptions as cd, type SubscribeParams as ce, type SyncTriggerResult as cf, TAG_KINDS as cg, type TagChange as ch, type TagFieldDefinition as ci, type TagKind as cj, type TagKindField as ck, type TagKindSchema as cl, type TagLinks as cm, type TagListQuery as cn, type TagResponse as co, type TaskPlan as cp, type TaskPlanStep as cq, type TaxQuoteResponse as cr, type TimeSuggestion as cs, type TokenBudgetContext as ct, type UpdateConversationRequest as cu, type UpdateFactRequest as cv, type UpdateWorkflowRequest as cw, type UploadBatchResult as cx, type UploadDirectOptions as cy, type UploadDirectResult as cz, type AgentControlStateEvent as d, selectWorkspaceById as d$, buildRetrievalFullContextTool as d0, buildRetrievalTocTool as d1, calendar as d2, cancelPublicBooking as d3, chats as d4, connectErrorMessage as d5, connectWebSocket as d6, connectWithReconnect as d7, connectors as d8, consumeSSEStream as d9, health as dA, houseTemplate as dB, identity as dC, identityErrorCode as dD, isConnectorVendorVisible as dE, isDriveSyncVendor as dF, isMailboxSyncVendor as dG, isSharePointVendor as dH, isSharedSkill as dI, mail as dJ, notifications as dK, parseSSEEvents as dL, parseSlashCommand as dM, parseSlashTokenInProgress as dN, performPasswordLogin as dO, performSigningKeyLogin as dP, performSsoDeviceFlowLogin as dQ, profile as dR, projects as dS, requireData as dT, requireOk as dU, resolveAuth as dV, resolveCitations as dW, resolveWorkspace as dX, responses as dY, searchChunks as dZ, selectWorkspace as d_, contacts as da, conversations as db, countCitations as dc, createAuthenticatedClient as dd, createDocumentWaiter as de, doctags as df, documents as dg, facts as dh, files as di, filterSkills as dj, formatAgentStepLabel as dk, formatFileSize as dl, formatGbp as dm, formatGbpPerMillionTokens as dn, formatItemLabel as dp, formatStreamSummary as dq, formatUserName as dr, formatWorkspaceChoices as ds, formatWsMessage as dt, generateEncryptedWorkspaceKey as du, generateNewWorkspaceKey as dv, getErrorCode as dw, getErrorMessage as dx, getPublicBookingPage as dy, getRawWorkspaceKey as dz, type AgentStepDeltaEvent as e, sessions as e0, settings as e1, signatureRequests as e2, streamSSE as e3, stripCitationMarkdown as e4, summarizeCitations as e5, tags as e6, uploadSkill as e7, usdToGbp as e8, work as e9, workflowSteps as ea, workflows as eb, workspaces as ec, type AgentStepEvent as f, Arbi as g, ArbiApiError as h, ArbiError as i, type ArbiErrorEvent as j, type ArbiHostSession as k, type ArbiOptions as l, ArbiSessionExpiredError as m, type ArtifactEvent as n, type AttendeeRead as o, type AuthContext as p, type AuthHeaders as q, type AuthMode as r, type AuthenticatedClient as s, type BookingPage as t, type BookingPageWriteBody as u, type BookingRequestBody as v, type BridgeTokensOptions as w, type CalDavProfile as x, type CalendarAccount as y, type CalendarAccountKind as z };