codai-sdk 0.63.0 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2405,6 +2405,29 @@ type paths$1 = {
2405
2405
  readonly patch?: never;
2406
2406
  readonly trace?: never;
2407
2407
  };
2408
+ readonly '/v1/os-gate/events': {
2409
+ readonly parameters: {
2410
+ readonly query?: never;
2411
+ readonly header?: never;
2412
+ readonly path?: never;
2413
+ readonly cookie?: never;
2414
+ };
2415
+ readonly get?: never;
2416
+ readonly put?: never;
2417
+ /**
2418
+ * Record an OS protection gate override
2419
+ * @description Writes an `os_gate.override` entry to the account audit log when the user grants or revokes an override
2420
+ * of failing OS protection checks on a device. The body carries only the check ids, the surface, the app
2421
+ * version and the time; detection details never leave the device. The body is strict: an unknown key, an
2422
+ * unknown check id or an empty `checks` list is a 400. Answers 202 once the event is accepted.
2423
+ */
2424
+ readonly post: operations$1['recordOsGateEvent'];
2425
+ readonly delete?: never;
2426
+ readonly options?: never;
2427
+ readonly head?: never;
2428
+ readonly patch?: never;
2429
+ readonly trace?: never;
2430
+ };
2408
2431
  readonly '/v1/phone/models': {
2409
2432
  readonly parameters: {
2410
2433
  readonly query?: never;
@@ -2430,6 +2453,30 @@ type paths$1 = {
2430
2453
  readonly patch?: never;
2431
2454
  readonly trace?: never;
2432
2455
  };
2456
+ readonly '/v1/policy': {
2457
+ readonly parameters: {
2458
+ readonly query?: never;
2459
+ readonly header?: never;
2460
+ readonly path?: never;
2461
+ readonly cookie?: never;
2462
+ };
2463
+ /**
2464
+ * Read the effective client policy
2465
+ * @description Client policy folded over every organization the caller belongs to. Today it carries the OS protection
2466
+ * gate: `os_gate.allow_override` is false when ANY of the caller's organizations forbids overriding a failing
2467
+ * BLOCK check (strictest wins; org admins set it in the hub under Team > Security). A caller in no organization
2468
+ * gets true. Clients cache the value (the response is `Cache-Control: private, max-age=300`) and keep using
2469
+ * the cached value offline. A database error is a 503 (`policy_unavailable`), never a permissive default.
2470
+ */
2471
+ readonly get: operations$1['getPolicy'];
2472
+ readonly put?: never;
2473
+ readonly post?: never;
2474
+ readonly delete?: never;
2475
+ readonly options?: never;
2476
+ readonly head?: never;
2477
+ readonly patch?: never;
2478
+ readonly trace?: never;
2479
+ };
2433
2480
  readonly '/v1/projects': {
2434
2481
  readonly parameters: {
2435
2482
  readonly query?: never;
@@ -12735,6 +12782,31 @@ type components$1 = {
12735
12782
  readonly ownerUserId: string;
12736
12783
  readonly role: components$1['schemas']['OrgRole'];
12737
12784
  };
12785
+ readonly OsGateEvent: {
12786
+ /**
12787
+ * @description Whether the user granted or revoked the override.
12788
+ * @enum {string}
12789
+ */
12790
+ readonly action: 'granted' | 'revoked';
12791
+ /** @description Version of the app that recorded the event. */
12792
+ readonly app_version: string;
12793
+ /**
12794
+ * Format: date-time
12795
+ * @description When the user granted or revoked the override (ISO 8601).
12796
+ */
12797
+ readonly at: string;
12798
+ /** @description Ids of the checks the override covers (spec packages/agent-core/spec/os-gate.json). */
12799
+ readonly checks: readonly ('win.uac_off' | 'win.uac_no_prompt' | 'win.elevated' | 'win.defender_rtp_off' | 'mac.sip_off' | 'mac.gatekeeper_off' | 'mac.filevault_off' | 'linux.root' | 'linux.root_container' | 'linux.sudo_nopasswd' | 'linux.no_screen_lock' | 'android.no_secure_lock' | 'android.lock_unknown' | 'android.adb_enabled' | 'android.rooted' | 'wear.no_secure_lock')[];
12800
+ /**
12801
+ * @description The codai app on which the override was granted or revoked.
12802
+ * @enum {string}
12803
+ */
12804
+ readonly surface: 'desktop' | 'headless' | 'codaid' | 'phone' | 'mobile_agent' | 'wear' | 'vscode';
12805
+ };
12806
+ readonly OsGateEventAccepted: {
12807
+ /** @constant */
12808
+ readonly ok: true;
12809
+ };
12738
12810
  /** Panel control */
12739
12811
  readonly PanelControl: {
12740
12812
  readonly control: components$1['schemas']['Control'];
@@ -12752,6 +12824,12 @@ type components$1 = {
12752
12824
  * @enum {string}
12753
12825
  */
12754
12826
  readonly PlatformId: 'tiktok' | 'reels' | 'shorts' | 'feed-square' | 'feed-portrait' | 'youtube';
12827
+ readonly PolicyResponse: {
12828
+ readonly os_gate: {
12829
+ /** @description False when any organization of the caller forbids OS protection gate overrides. */
12830
+ readonly allow_override: boolean;
12831
+ };
12832
+ };
12755
12833
  /** @enum {string} */
12756
12834
  readonly PortProtocol: 'http' | 'https' | 'tcp';
12757
12835
  /**
@@ -22140,6 +22218,47 @@ interface operations$1 {
22140
22218
  readonly 404: components$1['responses']['NotFound'];
22141
22219
  };
22142
22220
  };
22221
+ readonly recordOsGateEvent: {
22222
+ readonly parameters: {
22223
+ readonly query?: never;
22224
+ readonly header?: {
22225
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
22226
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
22227
+ };
22228
+ readonly path?: never;
22229
+ readonly cookie?: never;
22230
+ };
22231
+ /** @description The override event as recorded on the device. */
22232
+ readonly requestBody: {
22233
+ readonly content: {
22234
+ /**
22235
+ * @example {
22236
+ * "action": "granted",
22237
+ * "checks": [
22238
+ * "win.uac_off"
22239
+ * ],
22240
+ * "surface": "desktop",
22241
+ * "app_version": "0.9.4",
22242
+ * "at": "2026-10-19T21:00:00Z"
22243
+ * }
22244
+ */
22245
+ readonly 'application/json': components$1['schemas']['OsGateEvent'];
22246
+ };
22247
+ };
22248
+ readonly responses: {
22249
+ /** @description The event was accepted into the audit log. */
22250
+ readonly 202: {
22251
+ headers: {
22252
+ readonly [name: string]: unknown;
22253
+ };
22254
+ content: {
22255
+ readonly 'application/json': components$1['schemas']['OsGateEventAccepted'];
22256
+ };
22257
+ };
22258
+ readonly 400: components$1['responses']['BadRequest'];
22259
+ readonly 401: components$1['responses']['Unauthorized'];
22260
+ };
22261
+ };
22143
22262
  readonly listPhoneModels: {
22144
22263
  readonly parameters: {
22145
22264
  readonly query?: never;
@@ -22167,6 +22286,48 @@ interface operations$1 {
22167
22286
  readonly 404: components$1['responses']['NotFound'];
22168
22287
  };
22169
22288
  };
22289
+ readonly getPolicy: {
22290
+ readonly parameters: {
22291
+ readonly query?: never;
22292
+ readonly header?: {
22293
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
22294
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
22295
+ };
22296
+ readonly path?: never;
22297
+ readonly cookie?: never;
22298
+ };
22299
+ readonly requestBody?: never;
22300
+ readonly responses: {
22301
+ /** @description The effective policy for the caller. */
22302
+ readonly 200: {
22303
+ headers: {
22304
+ /** @description Always `private, max-age=300`. */
22305
+ readonly 'Cache-Control'?: string;
22306
+ readonly [name: string]: unknown;
22307
+ };
22308
+ content: {
22309
+ /**
22310
+ * @example {
22311
+ * "os_gate": {
22312
+ * "allow_override": true
22313
+ * }
22314
+ * }
22315
+ */
22316
+ readonly 'application/json': components$1['schemas']['PolicyResponse'];
22317
+ };
22318
+ };
22319
+ readonly 401: components$1['responses']['Unauthorized'];
22320
+ /** @description The policy store is unreachable (`code: policy_unavailable`); keep the cached value. */
22321
+ readonly 503: {
22322
+ headers: {
22323
+ readonly [name: string]: unknown;
22324
+ };
22325
+ content: {
22326
+ readonly 'application/json': components$1['schemas']['Error'];
22327
+ };
22328
+ };
22329
+ };
22330
+ };
22170
22331
  readonly listProjects: {
22171
22332
  readonly parameters: {
22172
22333
  readonly query?: never;
@@ -32702,7 +32863,7 @@ export type Receipt = Reply<'getReceipt'>;
32702
32863
  export type FeedbackRequest = Mutable<Body<'submitFeedback'>>;
32703
32864
  export type FeedbackResponse = Reply<'submitFeedback'>;
32704
32865
  export type PhoneModel = Schema<'AccountPhoneModel'>;
32705
- type CallOpts$36 = {
32866
+ type CallOpts$37 = {
32706
32867
  ext?: CodaiRequestExtensions;
32707
32868
  signal?: AbortSignal;
32708
32869
  };
@@ -32710,9 +32871,9 @@ export declare class Account {
32710
32871
  private readonly http;
32711
32872
  constructor(http: HttpClient);
32712
32873
  /** `GET /v1/account` — the full account card. */
32713
- get(opts?: CallOpts$36): Promise<AccountView>;
32874
+ get(opts?: CallOpts$37): Promise<AccountView>;
32714
32875
  /** `PATCH /v1/account` — consents, username, referral (at least one field). */
32715
- update(body: AccountPatchRequest, opts?: CallOpts$36): Promise<AccountPatchResponse>;
32876
+ update(body: AccountPatchRequest, opts?: CallOpts$37): Promise<AccountPatchResponse>;
32716
32877
  }
32717
32878
  export declare class Receipts {
32718
32879
  private readonly http;
@@ -32724,7 +32885,7 @@ export declare class Receipts {
32724
32885
  get(query?: {
32725
32886
  sessionId?: string;
32726
32887
  since?: string | Date;
32727
- }, opts?: CallOpts$36): Promise<Receipt>;
32888
+ }, opts?: CallOpts$37): Promise<Receipt>;
32728
32889
  }
32729
32890
  export declare class Feedback {
32730
32891
  private readonly http;
@@ -32733,13 +32894,13 @@ export declare class Feedback {
32733
32894
  * `POST /v1/feedback` — rate one turn. Exactly one of `event_id`,
32734
32895
  * `session_id`, `client_request_id` must be present.
32735
32896
  */
32736
- submit(body: FeedbackRequest, opts?: CallOpts$36): Promise<FeedbackResponse>;
32897
+ submit(body: FeedbackRequest, opts?: CallOpts$37): Promise<FeedbackResponse>;
32737
32898
  }
32738
32899
  export declare class PhoneModels {
32739
32900
  private readonly http;
32740
32901
  constructor(http: HttpClient);
32741
32902
  /** `GET /v1/phone/models` — on-device model catalog with signed URLs. */
32742
- list(opts?: CallOpts$36): Promise<PhoneModel[]>;
32903
+ list(opts?: CallOpts$37): Promise<PhoneModel[]>;
32743
32904
  }
32744
32905
  //#endregion
32745
32906
  //#region src/resources/agents.d.ts
@@ -32751,7 +32912,7 @@ export type AgentRun = Reply<'getAgentRun'>;
32751
32912
  export type AgentRunStep = Schema<'AgentRunStep'>;
32752
32913
  export type AgentRunStats = Reply<'getAgentRunStats'>;
32753
32914
  export type AgentRunStatus = Schema<'AgentRunStatus'>;
32754
- type CallOpts$35 = {
32915
+ type CallOpts$36 = {
32755
32916
  ext?: CodaiRequestExtensions;
32756
32917
  signal?: AbortSignal;
32757
32918
  };
@@ -32788,28 +32949,28 @@ export declare class AgentRuns {
32788
32949
  private readonly http;
32789
32950
  constructor(http: HttpClient);
32790
32951
  /** `POST /v1/agents/runs` — returns 202 with the run id. */
32791
- create(body: AgentRunCreateRequest, opts?: CallOpts$35): Promise<AgentRunAccepted>;
32952
+ create(body: AgentRunCreateRequest, opts?: CallOpts$36): Promise<AgentRunAccepted>;
32792
32953
  /** `GET /v1/agents/runs/{id}` */
32793
- get(id: string, opts?: CallOpts$35): Promise<AgentRun>;
32954
+ get(id: string, opts?: CallOpts$36): Promise<AgentRun>;
32794
32955
  /** `GET /v1/agents/runs/{id}/steps` — newest first. */
32795
- steps(id: string, opts?: CallOpts$35): Promise<AgentRunStep[]>;
32956
+ steps(id: string, opts?: CallOpts$36): Promise<AgentRunStep[]>;
32796
32957
  /** `GET /v1/agents/runs/stats?days=` */
32797
- stats(days?: number, opts?: CallOpts$35): Promise<AgentRunStats>;
32958
+ stats(days?: number, opts?: CallOpts$36): Promise<AgentRunStats>;
32798
32959
  /** `POST /v1/agents/runs/{id}/cancel` */
32799
- cancel(id: string, opts?: CallOpts$35): Promise<Reply<'cancelAgentRun'>>;
32960
+ cancel(id: string, opts?: CallOpts$36): Promise<Reply<'cancelAgentRun'>>;
32800
32961
  /**
32801
32962
  * `GET /v1/agents/runs/{id}/stream` — async iterator over `step` / `done` /
32802
32963
  * `timeout` events. The iterator ends after `done`; on `timeout` (30 min)
32803
32964
  * it also ends and you may reconnect (full replay from seq 0).
32804
32965
  */
32805
- stream(id: string, opts?: CallOpts$35): AsyncGenerator<AgentRunStreamEvent, void, undefined>;
32966
+ stream(id: string, opts?: CallOpts$36): AsyncGenerator<AgentRunStreamEvent, void, undefined>;
32806
32967
  }
32807
32968
  export declare class Agents {
32808
32969
  private readonly http;
32809
32970
  readonly runs: AgentRuns;
32810
32971
  constructor(http: HttpClient);
32811
32972
  /** `POST /v1/agents/run` — blocks until the agent loop finishes. */
32812
- run(body: AgentRunRequest, opts?: CallOpts$35): Promise<AgentRunResult>;
32973
+ run(body: AgentRunRequest, opts?: CallOpts$36): Promise<AgentRunResult>;
32813
32974
  }
32814
32975
  //#endregion
32815
32976
  //#region src/resources/audio.d.ts
@@ -32974,7 +33135,7 @@ export interface StudioQuoteQuery {
32974
33135
  model?: string;
32975
33136
  n?: number;
32976
33137
  }
32977
- type CallOpts$34 = {
33138
+ type CallOpts$35 = {
32978
33139
  ext?: CodaiRequestExtensions;
32979
33140
  signal?: AbortSignal;
32980
33141
  };
@@ -32998,16 +33159,16 @@ export declare class Billing {
32998
33159
  private readonly http;
32999
33160
  constructor(http: HttpClient);
33000
33161
  /** `GET /v1/billing` — plan, wallet, auto top-up, cards and pay links (read-only). */
33001
- get(opts?: CallOpts$34): Promise<BillingOverview>;
33162
+ get(opts?: CallOpts$35): Promise<BillingOverview>;
33002
33163
  /** `GET /v1/billing/invoices` — fiscal invoices and credit notes, newest first. */
33003
33164
  invoices(query?: {
33004
33165
  limit?: number;
33005
- }, opts?: CallOpts$34): Promise<BillingInvoice[]>;
33166
+ }, opts?: CallOpts$35): Promise<BillingInvoice[]>;
33006
33167
  /**
33007
33168
  * `GET /v1/studio/quote` — what a Studio action costs (USD and wallet EUR micros) and your spendable balance,
33008
33169
  * before you run it. Paid Studio calls answer 402 `insufficient_funds` when `sufficient` is false. Free.
33009
33170
  */
33010
- studioQuote(query: StudioQuoteQuery, opts?: CallOpts$34): Promise<StudioQuote>;
33171
+ studioQuote(query: StudioQuoteQuery, opts?: CallOpts$35): Promise<StudioQuote>;
33011
33172
  /**
33012
33173
  * Poll `get()` every `intervalMs` and call `onLow` once each time the wallet
33013
33174
  * balance crosses below `thresholdEur`. Read-only: never creates a checkout.
@@ -33052,7 +33213,7 @@ export interface CardsRendered {
33052
33213
  width: number | null;
33053
33214
  height: number | null;
33054
33215
  }
33055
- type CallOpts$33 = {
33216
+ type CallOpts$34 = {
33056
33217
  ext?: CodaiRequestExtensions;
33057
33218
  signal?: AbortSignal;
33058
33219
  };
@@ -33061,59 +33222,59 @@ export declare class Cards {
33061
33222
  constructor(http: HttpClient);
33062
33223
  private get;
33063
33224
  /** `GET /v1/cards/weather` — `weather` block from MET Norway (cached 30–60 min per 0.01°, free). */
33064
- weather(params: CardsWeatherParams, opts?: CallOpts$33): Promise<CardsWeatherResponse>;
33225
+ weather(params: CardsWeatherParams, opts?: CallOpts$34): Promise<CardsWeatherResponse>;
33065
33226
  /**
33066
33227
  * `GET /v1/cards/places` — `places` block from Google Places: Text Search with `q` (biased to `lat`/`lng`/`radius`),
33067
33228
  * Nearby Search without it. Billed per call; `block` is null when nothing matched.
33068
33229
  */
33069
- places(params: CardsPlacesParams, opts?: CallOpts$33): Promise<CardsPlacesResponse>;
33230
+ places(params: CardsPlacesParams, opts?: CallOpts$34): Promise<CardsPlacesResponse>;
33070
33231
  /** `GET /v1/cards/geocode` — `map` block (≤ 5 markers) plus raw `results` (Google Geocoding, billed). */
33071
- geocode(params: CardsGeocodeParams, opts?: CallOpts$33): Promise<CardsGeocodeResponse>;
33232
+ geocode(params: CardsGeocodeParams, opts?: CallOpts$34): Promise<CardsGeocodeResponse>;
33072
33233
  /**
33073
33234
  * `GET /v1/cards/static-map` — PNG from Google Maps Static proxied through the gateway (no maps key on the client).
33074
33235
  * Needs `center` or `markers` (`lat,lng[,L]` joined by `|`); ≤ 640×400 points. Billed per call.
33075
33236
  */
33076
- staticMap(params: CardsStaticMapParams, opts?: CallOpts$33): Promise<CardsStaticMap>;
33237
+ staticMap(params: CardsStaticMapParams, opts?: CallOpts$34): Promise<CardsStaticMap>;
33077
33238
  /**
33078
33239
  * `GET /v1/cards/fx` — BNR (default) or ECB reference rates: a `metric` block with `from`+`to`, otherwise a `table`
33079
33240
  * block against `quote`, optionally limited to `symbols` (comma-separated). Free.
33080
33241
  */
33081
- fx(params?: CardsFxParams, opts?: CallOpts$33): Promise<CardsFxResponse>;
33242
+ fx(params?: CardsFxParams, opts?: CallOpts$34): Promise<CardsFxResponse>;
33082
33243
  /**
33083
33244
  * `GET /v1/cards/route` — travel time from Google Routes: `route` { mode, durationS, staticDurationS, distanceM,
33084
33245
  * polyline } and a `map` block. `origin`/`destination` as "lat,lng" or `from`/`to` as addresses; `mode` drive
33085
33246
  * (traffic-aware, default), walk, bicycle, transit, two_wheeler. Billed per call; both null when no route exists.
33086
33247
  */
33087
- route(params: CardsRouteParams, opts?: CallOpts$33): Promise<CardsRouteResponse>;
33248
+ route(params: CardsRouteParams, opts?: CallOpts$34): Promise<CardsRouteResponse>;
33088
33249
  /**
33089
33250
  * `GET /v1/cards/track` — parcel history as a `timeline` block plus `result` (carrier, configured, found,
33090
33251
  * delivered, events, trackingUrl). `carrier` (sameday | fan | cargus | dpd) is guessed from the AWB when omitted;
33091
33252
  * carriers without gateway credentials answer `configured: false` with only the tracking link. Free.
33092
33253
  */
33093
- track(params: CardsTrackParams, opts?: CallOpts$33): Promise<CardsTrackResponse>;
33254
+ track(params: CardsTrackParams, opts?: CallOpts$34): Promise<CardsTrackResponse>;
33094
33255
  /**
33095
33256
  * `GET /v1/cards/efactura` — your fiscal documents issued through Brivio with their ANAF e-Factura status
33096
33257
  * (`documents[]` + a `table` block, null when there are none). Free.
33097
33258
  */
33098
- efactura(params?: CardsEfacturaParams, opts?: CallOpts$33): Promise<CardsEfacturaResponse>;
33259
+ efactura(params?: CardsEfacturaParams, opts?: CallOpts$34): Promise<CardsEfacturaResponse>;
33099
33260
  /**
33100
33261
  * `POST /v1/cards/unfurl` — `links` block (variant `preview`) for a public https page; SSRF-guarded, cached 24 h.
33101
33262
  * Private targets throw 400 `unfurl_blocked`, non-https pages 422 `unfurl_not_https`.
33102
33263
  */
33103
- unfurl(url: string, opts?: CallOpts$33): Promise<CardsUnfurlResponse>;
33264
+ unfurl(url: string, opts?: CallOpts$34): Promise<CardsUnfurlResponse>;
33104
33265
  /**
33105
33266
  * `POST /v1/cards/product` — `products` block with one item from a public https product page's schema.org
33106
33267
  * `Product` JSON-LD (or OpenGraph product tags): name, image, price + currency (lowest offer), old price, rating
33107
33268
  * (0–5), reviews, seller, availability badge in `lang` (en default). Only what the page states; never sponsored.
33108
33269
  * SSRF-guarded like `unfurl`, cached 6 h. No product data throws 422 `product_not_found`.
33109
33270
  */
33110
- product(url: string, lang?: 'en' | 'ro', opts?: CallOpts$33): Promise<CardsProductResponse>;
33271
+ product(url: string, lang?: 'en' | 'ro', opts?: CallOpts$34): Promise<CardsProductResponse>;
33111
33272
  /**
33112
33273
  * `POST /v1/cards/render` — renders a `chart` or `qr` block to `format` (`png` default, or `svg`) at
33113
33274
  * `width` x `height` CSS px (64–1200, defaults 480 x 300; QR is square) times `scale` (1–3, PNG only).
33114
33275
  * Other block types (Mermaid `diagram`, `math`, …) throw 422 `render_unsupported`. Free; 2000 renders per day.
33115
33276
  */
33116
- render(body: CardsRenderBody, opts?: CallOpts$33): Promise<CardsRendered>;
33277
+ render(body: CardsRenderBody, opts?: CallOpts$34): Promise<CardsRendered>;
33117
33278
  }
33118
33279
  //#endregion
33119
33280
  //#region src/resources/chat.d.ts
@@ -33229,7 +33390,7 @@ export type Device = Schema<'DeviceListItem'>;
33229
33390
  export type DevicePatch = Mutable<Body<'updateDevice'>>;
33230
33391
  export type DevicePatched = Reply<'updateDevice'>;
33231
33392
  export type DispatchInbox = Reply<'getMyDispatchInbox'>;
33232
- type CallOpts$32 = {
33393
+ type CallOpts$33 = {
33233
33394
  ext?: CodaiRequestExtensions;
33234
33395
  signal?: AbortSignal;
33235
33396
  };
@@ -33237,23 +33398,23 @@ export declare class Devices {
33237
33398
  private readonly http;
33238
33399
  constructor(http: HttpClient);
33239
33400
  /** `GET /v1/devices` — most recently seen first. */
33240
- list(opts?: CallOpts$32): Promise<Device[]>;
33401
+ list(opts?: CallOpts$33): Promise<Device[]>;
33241
33402
  /** `PATCH /v1/devices/{id}` — push token and/or capabilities. */
33242
- update(id: string, body: DevicePatch, opts?: CallOpts$32): Promise<DevicePatched>;
33403
+ update(id: string, body: DevicePatch, opts?: CallOpts$33): Promise<DevicePatched>;
33243
33404
  /** `DELETE /v1/devices/{id}` */
33244
- delete(id: string, opts?: CallOpts$32): Promise<Reply<'deleteDevice'>>;
33405
+ delete(id: string, opts?: CallOpts$33): Promise<Reply<'deleteDevice'>>;
33245
33406
  /**
33246
33407
  * `POST /v1/keys/self/revoke` — the API key this client uses revokes ITSELF (sign out).
33247
33408
  * Every later call with it fails with 401.
33248
33409
  */
33249
- revokeSelfKey(opts?: CallOpts$32): Promise<Reply<'revokeSelfKey'>>;
33410
+ revokeSelfKey(opts?: CallOpts$33): Promise<Reply<'revokeSelfKey'>>;
33250
33411
  /**
33251
33412
  * `GET /v1/devices/me/dispatch?limit=` — pending controls dispatched at the
33252
33413
  * calling device (`x-codai-device` required) across all owned sessions.
33253
33414
  */
33254
33415
  dispatchInbox(query?: {
33255
33416
  limit?: number;
33256
- }, opts?: CallOpts$32): Promise<DispatchInbox>;
33417
+ }, opts?: CallOpts$33): Promise<DispatchInbox>;
33257
33418
  }
33258
33419
  //#endregion
33259
33420
  //#region src/resources/embeddings.d.ts
@@ -33316,7 +33477,7 @@ export type EnvironmentJobStartBody = Mutable<Body<'startEnvironmentJob'>>;
33316
33477
  export type EnvironmentJobStarted = Schema<'EnvironmentJobStarted'>;
33317
33478
  export type EnvironmentJob = Schema<'EnvironmentJob'>;
33318
33479
  export type GetEnvironmentJobQuery = Mutable<QueryOf<'getEnvironmentJob'>>;
33319
- type CallOpts$31 = {
33480
+ type CallOpts$32 = {
33320
33481
  ext?: CodaiRequestExtensions;
33321
33482
  signal?: AbortSignal;
33322
33483
  };
@@ -33324,70 +33485,70 @@ export declare class EnvironmentMembers {
33324
33485
  private readonly http;
33325
33486
  constructor(http: HttpClient);
33326
33487
  /** `GET /v1/environments/{id}/members` — any role. */
33327
- list(envId: string, opts?: CallOpts$31): Promise<EnvironmentMember[]>;
33488
+ list(envId: string, opts?: CallOpts$32): Promise<EnvironmentMember[]>;
33328
33489
  /** `POST /v1/environments/{id}/members` — exactly one of `user_id` / `email`. */
33329
- add(envId: string, body: EnvironmentAddMemberBody, opts?: CallOpts$31): Promise<EnvironmentMemberCreated>;
33490
+ add(envId: string, body: EnvironmentAddMemberBody, opts?: CallOpts$32): Promise<EnvironmentMemberCreated>;
33330
33491
  /** `PUT /v1/environments/{id}/members/me/ssh-key` — one `authorized_keys` line. */
33331
- setSshKey(envId: string, publicKey: string, opts?: CallOpts$31): Promise<Reply<'setMyEnvironmentSshKey'>>;
33492
+ setSshKey(envId: string, publicKey: string, opts?: CallOpts$32): Promise<Reply<'setMyEnvironmentSshKey'>>;
33332
33493
  /** `PATCH /v1/environments/{id}/members/{userId}` — 409 `last_owner` on demoting the last owner. */
33333
- setRole(envId: string, userId: string, role: EnvironmentRole, opts?: CallOpts$31): Promise<Reply<'setEnvironmentMemberRole'>['member']>;
33494
+ setRole(envId: string, userId: string, role: EnvironmentRole, opts?: CallOpts$32): Promise<Reply<'setEnvironmentMemberRole'>['member']>;
33334
33495
  /** `DELETE /v1/environments/{id}/members/{userId}` — pass your own id to leave. */
33335
- remove(envId: string, userId: string, opts?: CallOpts$31): Promise<Reply<'removeEnvironmentMember'>>;
33496
+ remove(envId: string, userId: string, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentMember'>>;
33336
33497
  /** `POST /v1/environments/{id}/members/me/ssh-cert` — 12 h OpenSSH user certificate for your key. */
33337
- sshCert(envId: string, body: EnvironmentSshCertBody, opts?: CallOpts$31): Promise<EnvironmentSshCert>;
33498
+ sshCert(envId: string, body: EnvironmentSshCertBody, opts?: CallOpts$32): Promise<EnvironmentSshCert>;
33338
33499
  }
33339
33500
  /** `/v1/environments/{id}/tasks` — fire-and-forget agent tasks run in the environment. */
33340
33501
  export declare class EnvironmentTasks {
33341
33502
  private readonly http;
33342
33503
  constructor(http: HttpClient);
33343
33504
  /** `GET /v1/environments/{id}/tasks` */
33344
- list(envId: string, opts?: CallOpts$31): Promise<EnvironmentTaskList>;
33505
+ list(envId: string, opts?: CallOpts$32): Promise<EnvironmentTaskList>;
33345
33506
  /** `POST /v1/environments/{id}/tasks` — queued; you get a notification when it finishes. */
33346
- create(envId: string, body: EnvironmentTaskCreateBody, opts?: CallOpts$31): Promise<EnvironmentTaskCreated>;
33507
+ create(envId: string, body: EnvironmentTaskCreateBody, opts?: CallOpts$32): Promise<EnvironmentTaskCreated>;
33347
33508
  /** `GET /v1/environments/{id}/tasks/{taskId}` */
33348
- get(envId: string, taskId: string, opts?: CallOpts$31): Promise<EnvironmentTaskDetail>;
33509
+ get(envId: string, taskId: string, opts?: CallOpts$32): Promise<EnvironmentTaskDetail>;
33349
33510
  }
33350
33511
  /** `/v1/environments/{id}/files` — read/write/list over the relay (developer role or higher). */
33351
33512
  export declare class EnvironmentFiles {
33352
33513
  private readonly http;
33353
33514
  constructor(http: HttpClient);
33354
33515
  /** `GET /v1/environments/{id}/files?path=` — directory entries; no path → your workspace. */
33355
- list(envId: string, path?: string, opts?: CallOpts$31): Promise<EnvironmentFileList>;
33516
+ list(envId: string, path?: string, opts?: CallOpts$32): Promise<EnvironmentFileList>;
33356
33517
  /** `GET /v1/environments/{id}/files/{path}` — UTF-8 text (64 KB default, `maxBytes` ≤ 512 KB). */
33357
33518
  get(envId: string, path: string, options?: {
33358
33519
  maxBytes?: number;
33359
- } & CallOpts$31): Promise<EnvironmentFile>;
33520
+ } & CallOpts$32): Promise<EnvironmentFile>;
33360
33521
  /** `PUT /v1/environments/{id}/files/{path}` — replace with UTF-8 text (≤ 2 MB). */
33361
- put(envId: string, path: string, content: string, opts?: CallOpts$31): Promise<EnvironmentFileWritten>;
33522
+ put(envId: string, path: string, content: string, opts?: CallOpts$32): Promise<EnvironmentFileWritten>;
33362
33523
  }
33363
33524
  /** `/v1/environments/{id}/jobs` — background jobs on the environment daemon. */
33364
33525
  export declare class EnvironmentJobs {
33365
33526
  private readonly http;
33366
33527
  constructor(http: HttpClient);
33367
33528
  /** `POST /v1/environments/{id}/jobs` — returns at once with `job_id`. */
33368
- start(envId: string, body: EnvironmentJobStartBody, opts?: CallOpts$31): Promise<EnvironmentJobStarted>;
33529
+ start(envId: string, body: EnvironmentJobStartBody, opts?: CallOpts$32): Promise<EnvironmentJobStarted>;
33369
33530
  /** `GET /v1/environments/{id}/jobs/{jobId}` — status + output (`since` = previous `next_offset`). */
33370
- get(envId: string, jobId: string | number, query?: GetEnvironmentJobQuery, opts?: CallOpts$31): Promise<EnvironmentJob>;
33531
+ get(envId: string, jobId: string | number, query?: GetEnvironmentJobQuery, opts?: CallOpts$32): Promise<EnvironmentJob>;
33371
33532
  }
33372
33533
  export declare class EnvironmentPorts {
33373
33534
  private readonly http;
33374
33535
  constructor(http: HttpClient);
33375
33536
  /** `GET /v1/environments/{id}/ports` — published (forwarded) ports. */
33376
- list(envId: string, opts?: CallOpts$31): Promise<EnvironmentPort[]>;
33537
+ list(envId: string, opts?: CallOpts$32): Promise<EnvironmentPort[]>;
33377
33538
  /** `PUT /v1/environments/{id}/ports/{port}` — publish or change visibility (upsert). */
33378
- set(envId: string, port: number, body: EnvironmentPortBody, opts?: CallOpts$31): Promise<EnvironmentPort>;
33539
+ set(envId: string, port: number, body: EnvironmentPortBody, opts?: CallOpts$32): Promise<EnvironmentPort>;
33379
33540
  /** `DELETE /v1/environments/{id}/ports/{port}` — unpublish. */
33380
- remove(envId: string, port: number, opts?: CallOpts$31): Promise<Reply<'removeEnvironmentPort'>>;
33541
+ remove(envId: string, port: number, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentPort'>>;
33381
33542
  }
33382
33543
  export declare class EnvironmentSecrets {
33383
33544
  private readonly http;
33384
33545
  constructor(http: HttpClient);
33385
33546
  /** `GET /v1/environments/{id}/secrets` — names and timestamps only, never values. */
33386
- list(envId: string, opts?: CallOpts$31): Promise<EnvironmentSecret[]>;
33547
+ list(envId: string, opts?: CallOpts$32): Promise<EnvironmentSecret[]>;
33387
33548
  /** `PUT /v1/environments/{id}/secrets/{name}` — upsert; `name` is `ENV_STYLE`. */
33388
- set(envId: string, name: string, value: string, opts?: CallOpts$31): Promise<EnvironmentSecretSet>;
33549
+ set(envId: string, name: string, value: string, opts?: CallOpts$32): Promise<EnvironmentSecretSet>;
33389
33550
  /** `DELETE /v1/environments/{id}/secrets/{name}` */
33390
- remove(envId: string, name: string, opts?: CallOpts$31): Promise<Reply<'removeEnvironmentSecret'>>;
33551
+ remove(envId: string, name: string, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentSecret'>>;
33391
33552
  }
33392
33553
  export declare class Environments {
33393
33554
  private readonly http;
@@ -33402,41 +33563,41 @@ export declare class Environments {
33402
33563
  * `POST /v1/environments/{id}/exec` — run one relay op and wait (developer+). `op` defaults to
33403
33564
  * `shell` with `command`; 409 `environment_offline`, 504 `host_timeout`.
33404
33565
  */
33405
- exec(envId: string, body: EnvironmentExecBody, opts?: CallOpts$31): Promise<EnvironmentExecResult>;
33566
+ exec(envId: string, body: EnvironmentExecBody, opts?: CallOpts$32): Promise<EnvironmentExecResult>;
33406
33567
  /** `GET /v1/environments/{id}/ssh-ca` — CA public keys to trust (`@cert-authority` lines). */
33407
- sshCa(envId: string, opts?: CallOpts$31): Promise<EnvironmentSshCa>;
33568
+ sshCa(envId: string, opts?: CallOpts$32): Promise<EnvironmentSshCa>;
33408
33569
  /** `GET /v1/environments?project_id=&for_user_id=me` — newest first, every state. */
33409
- list(query?: ListEnvironmentsQuery, opts?: CallOpts$31): Promise<Environment[]>;
33570
+ list(query?: ListEnvironmentsQuery, opts?: CallOpts$32): Promise<Environment[]>;
33410
33571
  /**
33411
33572
  * `POST /v1/environments` — `byo` starts `pending`; managed providers start
33412
33573
  * `creating`. 409 `already_has_env` in a `vm_per_dev` project (the error
33413
33574
  * body carries the `environment_id` to reuse).
33414
33575
  */
33415
- create(body: EnvironmentCreateBody, opts?: CallOpts$31): Promise<Environment>;
33576
+ create(body: EnvironmentCreateBody, opts?: CallOpts$32): Promise<Environment>;
33416
33577
  /**
33417
33578
  * `POST /v1/environments/enroll` — daemon side. The one-time `codai_env_…`
33418
33579
  * token in the body is the only credential; the client's API key header is
33419
33580
  * ignored by this route. Managed environments additionally receive a
33420
33581
  * freshly minted `api_key`, returned exactly once.
33421
33582
  */
33422
- enroll(body: EnvironmentEnrollBody, opts?: CallOpts$31): Promise<EnvironmentEnrolled>;
33583
+ enroll(body: EnvironmentEnrollBody, opts?: CallOpts$32): Promise<EnvironmentEnrolled>;
33423
33584
  /** `GET /v1/environments/{id}` — environment, your role, members, ports, recent events. */
33424
- get(envId: string, opts?: CallOpts$31): Promise<EnvironmentDetail>;
33585
+ get(envId: string, opts?: CallOpts$32): Promise<EnvironmentDetail>;
33425
33586
  /** `PATCH /v1/environments/{id}` — `name` and/or `idle_timeout_minutes` (5..1440). */
33426
- update(envId: string, body: EnvironmentPatchBody, opts?: CallOpts$31): Promise<Environment>;
33587
+ update(envId: string, body: EnvironmentPatchBody, opts?: CallOpts$32): Promise<Environment>;
33427
33588
  /** `POST /v1/environments/{id}/start` — managed providers only (`stopped` → `starting`). */
33428
- start(envId: string, opts?: CallOpts$31): Promise<EnvironmentTransition>;
33589
+ start(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
33429
33590
  /** `POST /v1/environments/{id}/stop` — managed providers only (`running` → `stopping`). */
33430
- stop(envId: string, opts?: CallOpts$31): Promise<EnvironmentTransition>;
33591
+ stop(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
33431
33592
  /** `POST /v1/environments/{id}/archive` — keeps history, releases the machine. */
33432
- archive(envId: string, opts?: CallOpts$31): Promise<EnvironmentTransition>;
33593
+ archive(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
33433
33594
  /** `POST /v1/environments/{id}/destroy` — owner only; terminal. */
33434
- destroy(envId: string, opts?: CallOpts$31): Promise<EnvironmentTransition>;
33595
+ destroy(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
33435
33596
  /**
33436
33597
  * `POST /v1/environments/{id}/enroll-token` — `byo` only; a 30-minute
33437
33598
  * one-time token for `enroll()`. Minting again replaces the previous one.
33438
33599
  */
33439
- enrollToken(envId: string, opts?: CallOpts$31): Promise<EnvironmentEnrollToken>;
33600
+ enrollToken(envId: string, opts?: CallOpts$32): Promise<EnvironmentEnrollToken>;
33440
33601
  private transition;
33441
33602
  }
33442
33603
  //#endregion
@@ -33473,7 +33634,7 @@ export type HostExecBody = Mutable<Body<'execOnHost'>>;
33473
33634
  export type HostExecResponse = Reply<'execOnHost'>;
33474
33635
  export type HostExecRequest = Schema<'HostExecRequest'>;
33475
33636
  export type HostExecResultBody = Mutable<Body<'postHostExecResult'>>;
33476
- type CallOpts$30 = {
33637
+ type CallOpts$31 = {
33477
33638
  ext?: CodaiRequestExtensions;
33478
33639
  signal?: AbortSignal;
33479
33640
  };
@@ -33500,7 +33661,7 @@ export declare class Hosts {
33500
33661
  private readonly http;
33501
33662
  constructor(http: HttpClient);
33502
33663
  /** `GET /v1/hosts` — your devices currently connected as hosts. */
33503
- list(opts?: CallOpts$30): Promise<HostPresence[]>;
33664
+ list(opts?: CallOpts$31): Promise<HostPresence[]>;
33504
33665
  /**
33505
33666
  * `POST /v1/hosts/{deviceId}/exec` — run one op on a connected host and
33506
33667
  * block until it answers (or `timeout_ms`, default 60 s).
@@ -33508,9 +33669,9 @@ export declare class Hosts {
33508
33669
  exec(deviceId: string, op: HostOp, args?: Record<string, unknown>, extra?: {
33509
33670
  timeoutMs?: number;
33510
33671
  label?: string;
33511
- } & CallOpts$30): Promise<HostExecResponse>;
33672
+ } & CallOpts$31): Promise<HostExecResponse>;
33512
33673
  /** `POST /v1/hosts/exec/{reqId}/result` — host side: deliver an exec result. */
33513
- postResult(reqId: string, body: HostExecResultBody, opts?: CallOpts$30): Promise<Reply<'postHostExecResult'>>;
33674
+ postResult(reqId: string, body: HostExecResultBody, opts?: CallOpts$31): Promise<Reply<'postHostExecResult'>>;
33514
33675
  /**
33515
33676
  * `GET /v1/hosts/stream?os=&hostname=&roots=` — host side: announce this
33516
33677
  * device and receive `hello` / `ping` / `exec` events. Closed by the server
@@ -33520,7 +33681,7 @@ export declare class Hosts {
33520
33681
  os?: string;
33521
33682
  hostname?: string;
33522
33683
  roots?: string[];
33523
- }, opts?: CallOpts$30): AsyncGenerator<HostStreamEvent, void, undefined>;
33684
+ }, opts?: CallOpts$31): AsyncGenerator<HostStreamEvent, void, undefined>;
33524
33685
  }
33525
33686
  //#endregion
33526
33687
  //#region src/resources/assets.d.ts
@@ -33532,7 +33693,7 @@ export type AssetDeleted = Reply<'deleteAsset'>;
33532
33693
  export type AssetListQuery = QueryOf<'listAssets'>;
33533
33694
  /** `b64_json` (default, inline bytes) or `url` (stored asset + 1 h signed URL; 503 `assets_unavailable` without storage). */
33534
33695
  export type MediaResponseFormat = Schema<'MediaResponseFormat'>;
33535
- type CallOpts$29 = {
33696
+ type CallOpts$30 = {
33536
33697
  ext?: CodaiRequestExtensions;
33537
33698
  signal?: AbortSignal;
33538
33699
  };
@@ -33542,25 +33703,25 @@ export declare class Assets {
33542
33703
  private readonly http;
33543
33704
  constructor(http: HttpClient);
33544
33705
  /** `GET /v1/assets` — newest first, `limit` ≤ 100 (default 30). Paginate by passing `next_before` as `before`. */
33545
- list(query?: AssetListQuery, opts?: CallOpts$29): Promise<AssetList>;
33706
+ list(query?: AssetListQuery, opts?: CallOpts$30): Promise<AssetList>;
33546
33707
  /** Iterate every asset across pages (`list` with `before` = previous `next_before`). */
33547
- iterate(query?: Omit<AssetListQuery, 'before'>, opts?: CallOpts$29): AsyncGenerator<AssetDto, void, undefined>;
33708
+ iterate(query?: Omit<AssetListQuery, 'before'>, opts?: CallOpts$30): AsyncGenerator<AssetDto, void, undefined>;
33548
33709
  /** `GET /v1/assets/{id}` — one asset with a fresh 1 h signed `url` (`null` while not `ready`). */
33549
- retrieve(id: string, opts?: CallOpts$29): Promise<AssetDto>;
33710
+ retrieve(id: string, opts?: CallOpts$30): Promise<AssetDto>;
33550
33711
  /**
33551
33712
  * A fresh signed URL of the asset's bytes (valid 1 h), from `GET /v1/assets/{id}`. Throws when the asset has no
33552
33713
  * content yet. Use it in `<audio>`/`<video>`/`fetch` — it needs no Authorization header.
33553
33714
  */
33554
- contentUrl(id: string, opts?: CallOpts$29): Promise<string>;
33715
+ contentUrl(id: string, opts?: CallOpts$30): Promise<string>;
33555
33716
  /**
33556
33717
  * The authenticated redirect endpoint `GET /v1/assets/{id}/content` (302 to the signed URL). Useful for tools that
33557
33718
  * follow redirects with the API key (`curl -L -H 'Authorization: Bearer …'`); browsers should use `contentUrl()`.
33558
33719
  */
33559
33720
  contentPath(id: string): string;
33560
33721
  /** Download the asset's bytes (fetches the signed URL, no API key sent to storage). */
33561
- content(id: string, opts?: CallOpts$29): Promise<Uint8Array>;
33722
+ content(id: string, opts?: CallOpts$30): Promise<Uint8Array>;
33562
33723
  /** `DELETE /v1/assets/{id}` — deletes the object; signed URLs already handed out stop working. */
33563
- delete(id: string, opts?: CallOpts$29): Promise<AssetDeleted>;
33724
+ delete(id: string, opts?: CallOpts$30): Promise<AssetDeleted>;
33564
33725
  }
33565
33726
  //#endregion
33566
33727
  //#region src/resources/images.d.ts
@@ -34063,11 +34224,11 @@ export type DocumentPreview = Reply<'retrievePreview'>;
34063
34224
  export type DocumentPreviewStatus = DocumentPreview['status'];
34064
34225
  export type DocumentVideoRequest = Mutable<Body<'createDocumentVideo'>>;
34065
34226
  export type DocumentVideoAccepted = Reply<'createDocumentVideo', 202>;
34066
- type CallOpts$28 = {
34227
+ type CallOpts$29 = {
34067
34228
  ext?: CodaiRequestExtensions;
34068
34229
  signal?: AbortSignal;
34069
34230
  };
34070
- export interface DocumentPollOptions extends CallOpts$28 {
34231
+ export interface DocumentPollOptions extends CallOpts$29 {
34071
34232
  /** Delay between polls (default 3000 ms for previews, 5000 ms for videos). */
34072
34233
  pollIntervalMs?: number;
34073
34234
  /** Give up after this long (default 300 000 ms for previews, 900 000 ms for videos). */
@@ -34082,21 +34243,21 @@ export declare class Documents {
34082
34243
  * `sheet` -> `SheetSpec`); invalid specs are 400 `invalid_spec`. Files are free. `based_on` creates the next version
34083
34244
  * of one of your documents; `preview: true` also queues a (billed) preview, returned as `preview`.
34084
34245
  */
34085
- create(body: DocumentCreateRequest, opts?: CallOpts$28): Promise<StudioDocument>;
34246
+ create(body: DocumentCreateRequest, opts?: CallOpts$29): Promise<StudioDocument>;
34086
34247
  /** `GET /v1/studio/documents/{id}` — fresh 1 h signed `file.url`, the stored `spec` and `latest_preview_id`. */
34087
- retrieve(id: string, opts?: CallOpts$28): Promise<StudioDocument>;
34248
+ retrieve(id: string, opts?: CallOpts$29): Promise<StudioDocument>;
34088
34249
  /**
34089
34250
  * Queue a preview (`POST /v1/studio/documents/{id}/previews`, HTTP 202): tagged PDF, page PNGs (1280 px) and a
34090
34251
  * contact sheet. Billed once on the first poll that sees the result; at most 3 active previews per user (429).
34091
34252
  */
34092
- preview(id: string, body?: DocumentPreviewRequest, opts?: CallOpts$28): Promise<DocumentPreviewAccepted>;
34253
+ preview(id: string, body?: DocumentPreviewRequest, opts?: CallOpts$29): Promise<DocumentPreviewAccepted>;
34093
34254
  /** Poll a preview (`GET /v1/studio/previews/{id}`): `queued` | `rendering` | `succeeded` | `failed`. */
34094
- retrievePreview(previewId: string, opts?: CallOpts$28): Promise<DocumentPreview>;
34255
+ retrievePreview(previewId: string, opts?: CallOpts$29): Promise<DocumentPreview>;
34095
34256
  /**
34096
34257
  * Turn a deck into an MP4 (`POST /v1/studio/documents/{id}/video`, HTTP 202). Returns a render: poll it with
34097
34258
  * `renders.retrieve(id)` or use `videoAndWait`. Narration (`narrate`) is synthesized and billed now.
34098
34259
  */
34099
- video(id: string, body?: DocumentVideoRequest, opts?: CallOpts$28): Promise<DocumentVideoAccepted>;
34260
+ video(id: string, body?: DocumentVideoRequest, opts?: CallOpts$29): Promise<DocumentVideoAccepted>;
34100
34261
  /** Queue a preview and poll until it succeeds. Throws on `failed` or timeout. */
34101
34262
  createPreviewAndWait(id: string, opts?: DocumentPollOptions & {
34102
34263
  body?: DocumentPreviewRequest;
@@ -34118,11 +34279,11 @@ export interface LottieDownload {
34118
34279
  filename: string | null;
34119
34280
  contentType: string | null;
34120
34281
  }
34121
- type CallOpts$27 = {
34282
+ type CallOpts$28 = {
34122
34283
  ext?: CodaiRequestExtensions;
34123
34284
  signal?: AbortSignal;
34124
34285
  };
34125
- export interface ExportWaitOptions extends CallOpts$27 {
34286
+ export interface ExportWaitOptions extends CallOpts$28 {
34126
34287
  /** Delay between polls (default 3000 ms). */
34127
34288
  intervalMs?: number;
34128
34289
  /** Give up after this long (default 900 000 ms = 15 min). */
@@ -34132,7 +34293,7 @@ export declare class Exports {
34132
34293
  private readonly http;
34133
34294
  constructor(http: HttpClient);
34134
34295
  /** The export: `queued` / `running`, then `succeeded` (signed `url`, valid 1 h) or `failed` (`error`). Free. */
34135
- retrieve(id: string, opts?: CallOpts$27): Promise<StudioExport>;
34296
+ retrieve(id: string, opts?: CallOpts$28): Promise<StudioExport>;
34136
34297
  /**
34137
34298
  * Poll `retrieve` every `intervalMs` (default 3 s) until the export is `succeeded` or `failed` and resolve with it
34138
34299
  * (a `failed` export resolves too — check `status` / `error`). Throws when it is not done within `timeoutMs`
@@ -34265,7 +34426,7 @@ export interface CreativeEditRequest {
34265
34426
  /** Bypass locked nodes and variables. */
34266
34427
  force?: boolean;
34267
34428
  }
34268
- type CallOpts$26 = {
34429
+ type CallOpts$27 = {
34269
34430
  ext?: CodaiRequestExtensions;
34270
34431
  signal?: AbortSignal;
34271
34432
  };
@@ -34273,49 +34434,49 @@ export declare class Creatives {
34273
34434
  private readonly http;
34274
34435
  constructor(http: HttpClient);
34275
34436
  /** List your creatives, most recently updated first (`next_before` pages). */
34276
- list(query?: CreativeListQuery, opts?: CallOpts$26): Promise<CreativeList>;
34437
+ list(query?: CreativeListQuery, opts?: CallOpts$27): Promise<CreativeList>;
34277
34438
  /**
34278
34439
  * Create a creative (`kind` + optional `title` / `doc`); without `doc` you get an empty document for the kind.
34279
34440
  * `brand_kit_id` applies one of your brand kits (`brandKits`) to version 1: `brand = { kitId, tokens }` + its logo.
34280
34441
  * `template` (+ `vars`, values by var key) starts from one of your templates (`templates`) instead of `doc`.
34281
34442
  */
34282
- create(body: CreativeCreateRequest, opts?: CallOpts$26): Promise<Creative>;
34443
+ create(body: CreativeCreateRequest, opts?: CallOpts$27): Promise<Creative>;
34283
34444
  /** The document at the head (or `seq`) with signed `assets` (1 h URLs). */
34284
34445
  retrieve(id: string, query?: {
34285
34446
  seq?: number;
34286
- }, opts?: CallOpts$26): Promise<CreativeDetail>;
34447
+ }, opts?: CallOpts$27): Promise<CreativeDetail>;
34287
34448
  /** Compact text outline (+ formats and vars) — the cheapest structure for a prompt. */
34288
- outline(id: string, opts?: CallOpts$26): Promise<CreativeOutline>;
34449
+ outline(id: string, opts?: CallOpts$27): Promise<CreativeOutline>;
34289
34450
  /** Node ids matching `query` (a string = text/name/id substring, or `{ text, type, sceneId, assetId, locked }`). */
34290
- find(id: string, query: CreativeFindRequest['query'], opts?: CallOpts$26): Promise<CreativeFindResult>;
34451
+ find(id: string, query: CreativeFindRequest['query'], opts?: CallOpts$27): Promise<CreativeFindResult>;
34291
34452
  /** Full JSON of `ids` (scene ids return whole scenes) or of one `sceneId`. */
34292
- subtree(id: string, body: CreativeSubtreeRequest, opts?: CallOpts$26): Promise<CreativeSubtree>;
34453
+ subtree(id: string, body: CreativeSubtreeRequest, opts?: CallOpts$27): Promise<CreativeSubtree>;
34293
34454
  /**
34294
34455
  * Apply an op batch (all or nothing) authored against `baseSeq`. A stale base is rebased when the touched
34295
34456
  * targets did not change meanwhile; otherwise the call throws `CodaiError` 409 `stale` (reload and retry). Rejected
34296
34457
  * ops throw 400 with `code` (`invalid`, `not_found`, `locked`, `duplicate_id`).
34297
34458
  */
34298
- edit(id: string, body: CreativeEditRequest, opts?: CallOpts$26): Promise<CreativeOpsResult>;
34459
+ edit(id: string, body: CreativeEditRequest, opts?: CallOpts$27): Promise<CreativeOpsResult>;
34299
34460
  /** Version history, newest first (`beforeSeq` pages). */
34300
34461
  versions(id: string, query?: {
34301
34462
  beforeSeq?: number;
34302
34463
  limit?: number;
34303
- }, opts?: CallOpts$26): Promise<CreativeVersionList>;
34464
+ }, opts?: CallOpts$27): Promise<CreativeVersionList>;
34304
34465
  /** New head whose document is version `seq`'s (undo / redo). */
34305
- revert(id: string, seq: number, opts?: CallOpts$26): Promise<CreativeRevertResult>;
34466
+ revert(id: string, seq: number, opts?: CallOpts$27): Promise<CreativeRevertResult>;
34306
34467
  /** New creative from version `seq` (default the head). */
34307
- fork(id: string, body?: CreativeForkRequest, opts?: CallOpts$26): Promise<Creative>;
34468
+ fork(id: string, body?: CreativeForkRequest, opts?: CallOpts$27): Promise<Creative>;
34308
34469
  /** Soft-delete the creative. */
34309
- delete(id: string, opts?: CallOpts$26): Promise<CreativeDeleted>;
34470
+ delete(id: string, opts?: CallOpts$27): Promise<CreativeDeleted>;
34310
34471
  /**
34311
34472
  * Contrast, safe area, empty text, missing assets, brand colours, platform safe zones and text floors, alt text,
34312
34473
  * missing captions, reading speed, flashing, missing / stale translations. Issues carry `format` / `fixable` /
34313
34474
  * `locale`; `fixable` counts them (`lintFix`). `locale` lints the translated document (adds
34314
34475
  * `text_overflow_locale`); 404 `Locale not found.` for an unknown locale.
34315
34476
  */
34316
- lint(id: string, body?: CreativeLintRequest, opts?: CallOpts$26): Promise<CreativeLintResult>;
34477
+ lint(id: string, body?: CreativeLintRequest, opts?: CallOpts$27): Promise<CreativeLintResult>;
34317
34478
  /** Preview HTML (signed asset URLs) for `format` / one `scene` / a translation (`locale`). */
34318
- compiled(id: string, query?: CreativeCompiledQuery, opts?: CallOpts$26): Promise<CreativeCompiled>;
34479
+ compiled(id: string, query?: CreativeCompiledQuery, opts?: CallOpts$27): Promise<CreativeCompiled>;
34319
34480
  /**
34320
34481
  * Queue an MP4 render of the head (`codai-render`, HTTP 202, `cached: false`); poll `renders.retrieve(render_id)`.
34321
34482
  * When the same render already exists for this version / format / quality / fps you get it back at once
@@ -34324,48 +34485,48 @@ export declare class Creatives {
34324
34485
  * `ai_label` (`none` | `corner` | `end_card`, EU AI Act art. 50(4)) burns a visible AI label into the video; omitted =
34325
34486
  * `corner` when the creative uses TTS narration or AI images, else `none` (`none` with narration: 400 `ai_label_required`).
34326
34487
  */
34327
- render(id: string, body?: CreativeRenderRequest, opts?: CallOpts$26): Promise<CreativeRenderResult>;
34488
+ render(id: string, body?: CreativeRenderRequest, opts?: CallOpts$27): Promise<CreativeRenderResult>;
34328
34489
  /**
34329
34490
  * PNG still frames at up to 6 times (`t_ms`). `exact: false` (default) screenshots the compiled HTML; `exact: true`
34330
34491
  * cuts them from a draft render of the covering scenes. Waits up to ~90 s: frames (`status: 'succeeded'`) or a
34331
34492
  * running job (`status: 'running'`) to poll with `frameJob(id, frame_job_id)`. Cached frames are free; 60 frame
34332
34493
  * jobs per UTC day are free, then billed (`billed_micro_usd`).
34333
34494
  */
34334
- frame(id: string, body: CreativeFrameRequest, opts?: CallOpts$26): Promise<CreativeFrameResult>;
34495
+ frame(id: string, body: CreativeFrameRequest, opts?: CallOpts$27): Promise<CreativeFrameResult>;
34335
34496
  /**
34336
34497
  * Turn a comment pinned on a frame (`t_ms`, optional `node_id` / `scene_id`) into an edit: one bounded `codai`
34337
34498
  * model turn proposes ops, applied like `edit` against `base_seq` (rebased when possible, 409 `stale` else).
34338
34499
  * 422 `no_edit` when the model made no edit (its answer in `error.text`); `apply: false` only proposes the ops.
34339
34500
  * Token-metered like any `codai` text call.
34340
34501
  */
34341
- comment(id: string, body: CreativeCommentRequest, opts?: CallOpts$26): Promise<CreativeCommentResult>;
34502
+ comment(id: string, body: CreativeCommentRequest, opts?: CallOpts$27): Promise<CreativeCommentResult>;
34342
34503
  /**
34343
34504
  * Generate A/B variants: one bounded `codai` model turn proposes `count` (default 3) variants changing only
34344
34505
  * `focus` (default hook / title / cta); each becomes a fork of the creative at `base_seq` with the ops applied, plus
34345
34506
  * a queued draft render (`render: false` to skip; poll `renders.retrieve(render_id)`). The original is unchanged
34346
34507
  * until `pickVariant`. 422 `no_edit` when no valid variant came back, 504 `timeout` after 90 s. Token-metered.
34347
34508
  */
34348
- variants(id: string, body: CreativeVariantsRequest, opts?: CallOpts$26): Promise<CreativeVariantsResult>;
34509
+ variants(id: string, body: CreativeVariantsRequest, opts?: CallOpts$27): Promise<CreativeVariantsResult>;
34349
34510
  /** The latest variant group of a creative (`group_id: null` when none) with statuses and stored render state. */
34350
- listVariants(id: string, opts?: CallOpts$26): Promise<CreativeVariantList>;
34511
+ listVariants(id: string, opts?: CallOpts$27): Promise<CreativeVariantList>;
34351
34512
  /**
34352
34513
  * Pick the winner: its ops are applied to the original against `base_seq` (rebased when possible, 409 `stale`
34353
34514
  * else); the winner is marked `winner`, the rest of its group `rejected`.
34354
34515
  */
34355
- pickVariant(id: string, variantId: string, body: CreativeVariantPickRequest, opts?: CallOpts$26): Promise<CreativeVariantPickResult>;
34516
+ pickVariant(id: string, variantId: string, body: CreativeVariantPickRequest, opts?: CallOpts$27): Promise<CreativeVariantPickResult>;
34356
34517
  /**
34357
34518
  * Save the creative (at `seq`, default the head) as a private template: each `vars` entry turns a text node's text
34358
34519
  * (`prop: 'text'`) or an image node's asset (`prop: 'image'`) into a variable whose default is the current value.
34359
34520
  * 400 `node_not_found` / `invalid_pick` / `duplicate_key`. Free.
34360
34521
  */
34361
- saveTemplate(id: string, body: SaveTemplateRequest, opts?: CallOpts$26): Promise<CreativeTemplate>;
34522
+ saveTemplate(id: string, body: SaveTemplateRequest, opts?: CallOpts$27): Promise<CreativeTemplate>;
34362
34523
  /**
34363
34524
  * Queue an FCPXML export of a video creative (`seq`, default the head; `format`, default the first 1920×1080 /
34364
34525
  * 1080×1920 / 1080×1080 format): a zip with `project.fcpxml` + per-scene MP4 segments + audio, for Final Cut Pro,
34365
34526
  * DaVinci Resolve or Premiere. Resolves to the queued export; poll it with `exports.wait(e.id)`. Only newly
34366
34527
  * rendered seconds are billed (final render price). 400 `unsupported_kind` / `unsupported_format` / `too_long`.
34367
34528
  */
34368
- exportFcpxml(id: string, query?: ExportFcpxmlQuery, opts?: CallOpts$26): Promise<StudioExport>;
34529
+ exportFcpxml(id: string, query?: ExportFcpxmlQuery, opts?: CallOpts$27): Promise<StudioExport>;
34369
34530
  /**
34370
34531
  * Export a video creative as a Lottie animation (`seq`, default the head; `format`, default the document's default
34371
34532
  * format, or `formats: 'all'`; `container: 'json'` (default, Bodymovin JSON with embedded images) or `'dotlottie'`).
@@ -34373,33 +34534,33 @@ export declare class Creatives {
34373
34534
  * fidelity report in `warnings` (video, chart, HTML block, table, cell grid and audio nodes are not exported).
34374
34535
  * 400 `unsupported_kind` / `invalid_request`, 413 `too_large` (over 20 MB).
34375
34536
  */
34376
- exportLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$26): Promise<StudioExport>;
34537
+ exportLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$27): Promise<StudioExport>;
34377
34538
  /**
34378
34539
  * The Lottie file itself (`download=1`, nothing stored): `application/json` for one Bodymovin JSON, `application/zip`
34379
34540
  * for a dotLottie archive or a zip of JSON files (`formats: 'all'`). Same options and errors as `exportLottie`. Free.
34380
34541
  */
34381
- downloadLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$26): Promise<LottieDownload>;
34542
+ downloadLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$27): Promise<LottieDownload>;
34382
34543
  /**
34383
34544
  * Turn one of your Studio documents (deck, doc, sheet) into an editable creative — slides become scenes with a
34384
34545
  * `layout` and speaker `notes`, doc pages a `flow` group, sheets a `cell_grid`; nodes carry semantic `role`s.
34385
34546
  * Idempotent: a document that already has a creative resolves to it (`existing: true`). Free. 404 unknown document,
34386
34547
  * 409 `document_spec_missing`, 400 `invalid_spec`, 413 `too_large`.
34387
34548
  */
34388
- fromDocument(documentId: string, opts?: CallOpts$26): Promise<StudioCreativeFromDocument>;
34549
+ fromDocument(documentId: string, opts?: CallOpts$27): Promise<StudioCreativeFromDocument>;
34389
34550
  /**
34390
34551
  * Build a deck / doc / sheet creative (at `seq`, default the head) into a PPTX / DOCX / XLSX — a new version of its
34391
34552
  * Studio document (`document`, exactly the `POST /v1/studio/documents` body). Converter notes come back in
34392
34553
  * `warnings`. The file is free; `preview: true` also queues a billed preview (poll it with
34393
34554
  * `documents.waitForPreview`). 400 `not_supported_for_kind` (video / image) or `invalid_spec`.
34394
34555
  */
34395
- build(id: string, body?: CreativeBuildRequest, opts?: CallOpts$26): Promise<StudioCreativeBuild>;
34556
+ build(id: string, body?: CreativeBuildRequest, opts?: CallOpts$27): Promise<StudioCreativeBuild>;
34396
34557
  /**
34397
34558
  * Re-apply a brand kit (`brand_kit_id`) or a flat token map (`tokens`) to the creative as one new version: literal
34398
34559
  * colours equal to the old brand become token refs, `snap: true` maps every other colour to the nearest kit colour,
34399
34560
  * `fonts` (default true) sets heading / body font refs by role, locked nodes are skipped unless `force`. The kit
34400
34561
  * logo is registered too. `base_seq` defaults to the head (rebased like `edit`, 409 `stale` else). Free.
34401
34562
  */
34402
- restyle(id: string, body: CreativeRestyleRequest, opts?: CallOpts$26): Promise<CreativeRestyleResult>;
34563
+ restyle(id: string, body: CreativeRestyleRequest, opts?: CallOpts$27): Promise<CreativeRestyleResult>;
34403
34564
  /**
34404
34565
  * Auto-captions: transcribe a voice clip (`clip_id`, default the first voice clip) word by word and add or update a
34405
34566
  * captions node (`preset`, default `bold-pill`) as one new version. Words are cached on the asset (free next time
@@ -34407,83 +34568,83 @@ export declare class Creatives {
34407
34568
  * transcription is billed at the speech-to-text rate (`cost_micro_usd`). Video creatives only (400
34408
34569
  * `unsupported_kind`); 403 `residency_unavailable`, 503 `transcription_unavailable`.
34409
34570
  */
34410
- captions(id: string, body?: CreativeCaptionsRequest, opts?: CallOpts$26): Promise<CreativeCaptionsResult>;
34571
+ captions(id: string, body?: CreativeCaptionsRequest, opts?: CallOpts$27): Promise<CreativeCaptionsResult>;
34411
34572
  /** The captions as SubRip text on the document timeline (`node_id`, `seq` optional); 404 without captions. Free. */
34412
- captionsSrt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$26): Promise<string>;
34573
+ captionsSrt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$27): Promise<string>;
34413
34574
  /** The captions as WebVTT text on the document timeline (`node_id`, `seq` optional); 404 without captions. Free. */
34414
- captionsVtt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$26): Promise<string>;
34575
+ captionsVtt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$27): Promise<string>;
34415
34576
  /**
34416
34577
  * Adapt to platforms (`tiktok`, `reels`, `shorts`, `feed-square`, `feed-portrait`, `youtube`): one format per
34417
34578
  * platform in one new version, text kept inside each platform's safe zone and above its legible size.
34418
34579
  * `focal: 'vision'` (token-metered) finds the focal point of full-bleed images; it fails open. Free otherwise.
34419
34580
  */
34420
- adapt(id: string, body: CreativeAdaptRequest, opts?: CallOpts$26): Promise<CreativeAdaptResult>;
34581
+ adapt(id: string, body: CreativeAdaptRequest, opts?: CallOpts$27): Promise<CreativeAdaptResult>;
34421
34582
  /**
34422
34583
  * Fix lint issues as one new version: deterministic fixes (free) for `off_brand_color`, `text_too_small`,
34423
34584
  * `outside_platform_safe_zone` and `flashing` (`codes` limits them); `agent: true` (token-metered) gives the rest
34424
34585
  * to one `codai` turn. Nothing to fix: the current `seq`, empty `fixed`, no new version.
34425
34586
  */
34426
- lintFix(id: string, body?: CreativeLintFixRequest, opts?: CallOpts$26): Promise<CreativeLintFixResult>;
34587
+ lintFix(id: string, body?: CreativeLintFixRequest, opts?: CallOpts$27): Promise<CreativeLintFixResult>;
34427
34588
  /**
34428
34589
  * The tweak panel model: one control per variable (stored `meta.controls` entry or derived from the type). Change
34429
34590
  * values with a `setVar` op and controls with a `setControl` op (`edit`). Free.
34430
34591
  */
34431
- controls(id: string, opts?: CallOpts$26): Promise<CreativeControls>;
34592
+ controls(id: string, opts?: CallOpts$27): Promise<CreativeControls>;
34432
34593
  /**
34433
34594
  * Localisation state: source locale, glossary, unit count and per locale translated / missing / stale / voice.
34434
34595
  * With `locale` (+ `units`, default 1) also the units of that locale (paged with `offset` / `limit` ≤ 500). Free.
34435
34596
  */
34436
- locales(id: string, query?: CreativeLocalesQuery, opts?: CallOpts$26): Promise<CreativeLocaleStatus>;
34597
+ locales(id: string, query?: CreativeLocalesQuery, opts?: CallOpts$27): Promise<CreativeLocaleStatus>;
34437
34598
  /**
34438
34599
  * Translate every text into up to 10 BCP-47 `locales` as per-locale overrides (one new version, author `agent`).
34439
34600
  * Token-metered `codai` turns; `glossary` terms and the brand kit name stay verbatim, `tone` picks the address,
34440
34601
  * `only_missing` (default true) skips fresh translations, `voice: true` (video, billed) narrates voice clips again.
34441
34602
  * 400 `nothing_to_translate`; 503 `localize_unavailable` when every locale failed.
34442
34603
  */
34443
- localize(id: string, body: CreativeLocalizeRequest, opts?: CallOpts$26): Promise<CreativeLocalizeResult>;
34604
+ localize(id: string, body: CreativeLocalizeRequest, opts?: CallOpts$27): Promise<CreativeLocalizeResult>;
34444
34605
  /**
34445
34606
  * Save `locale` as a new standalone creative (translations applied, overrides dropped, `fork_of` recorded; default
34446
34607
  * title `<title> (<locale>)`). 404 `Locale not found.`. Free (HTTP 201).
34447
34608
  */
34448
- forkLocale(id: string, locale: string, body?: CreativeLocaleForkRequest, opts?: CallOpts$26): Promise<CreativeLocaleForkResult>;
34609
+ forkLocale(id: string, locale: string, body?: CreativeLocaleForkRequest, opts?: CallOpts$27): Promise<CreativeLocaleForkResult>;
34449
34610
  /**
34450
34611
  * Create a public link: `view` (read-only preview of version `seq` or the head; `allow_remix` default false) or
34451
34612
  * `review` (comments by name, no account; `can_approve` lets the holder approve). The `token` and `url` are shown
34452
34613
  * only in this answer (HTTP 201). 400 `unknown_seq`; 409 `too_many_shares` (20 active links). Free.
34453
34614
  */
34454
- createShare(id: string, body: StudioShareCreateRequest, opts?: CallOpts$26): Promise<StudioShareCreated>;
34615
+ createShare(id: string, body: StudioShareCreateRequest, opts?: CallOpts$27): Promise<StudioShareCreated>;
34455
34616
  /** The active links (not revoked, not expired), newest first; `url` is always null. Free. */
34456
- listShares(id: string, opts?: CallOpts$26): Promise<StudioShareList>;
34617
+ listShares(id: string, opts?: CallOpts$27): Promise<StudioShareList>;
34457
34618
  /** Revoke a link: it answers 404 from now on. 404 when unknown or already revoked. Free. */
34458
- revokeShare(id: string, shareId: string, opts?: CallOpts$26): Promise<void>;
34619
+ revokeShare(id: string, shareId: string, opts?: CallOpts$27): Promise<void>;
34459
34620
  /**
34460
34621
  * The review state: `status` (`draft` → `in_review` → `approved` | `changes_requested`), requested / approved
34461
34622
  * version (`approved_is_head` false once the creative changed), decider and thread counts. Free.
34462
34623
  */
34463
- review(id: string, opts?: CallOpts$26): Promise<StudioReview>;
34624
+ review(id: string, opts?: CallOpts$27): Promise<StudioReview>;
34464
34625
  /** Send the head to review (`in_review`, earlier decision cleared) so approver links can decide. Free. */
34465
- requestReview(id: string, opts?: CallOpts$26): Promise<StudioReview>;
34626
+ requestReview(id: string, opts?: CallOpts$27): Promise<StudioReview>;
34466
34627
  /** Back to `draft` (decision cleared, comments kept). Free. */
34467
- resetReview(id: string, opts?: CallOpts$26): Promise<StudioReview>;
34628
+ resetReview(id: string, opts?: CallOpts$27): Promise<StudioReview>;
34468
34629
  /** Comment threads, newest first (≤ 200), replies oldest first; `status` `open` | `resolved` | `all`. Free. */
34469
- reviewThreads(id: string, query?: StudioReviewThreadsQuery, opts?: CallOpts$26): Promise<StudioReviewThreadList>;
34630
+ reviewThreads(id: string, query?: StudioReviewThreadsQuery, opts?: CallOpts$27): Promise<StudioReviewThreadList>;
34470
34631
  /**
34471
34632
  * Start a thread as the owner, optionally anchored to `node_id` / `scene_id` / `t_ms` (checked against the head:
34472
34633
  * 400 `unknown_node` / `unknown_scene`; HTTP 201). 409 `too_many_comments`. Free.
34473
34634
  */
34474
- createReviewThread(id: string, body: StudioReviewThreadCreateRequest, opts?: CallOpts$26): Promise<StudioReviewThread>;
34635
+ createReviewThread(id: string, body: StudioReviewThreadCreateRequest, opts?: CallOpts$27): Promise<StudioReviewThread>;
34475
34636
  /** Reply in a thread as the owner (HTTP 201) — returns the whole thread. Free. */
34476
34637
  replyReviewThread(id: string, threadId: string, body: {
34477
34638
  body: string;
34478
- }, opts?: CallOpts$26): Promise<StudioReviewThread>;
34639
+ }, opts?: CallOpts$27): Promise<StudioReviewThread>;
34479
34640
  /** Resolve a thread. Free. */
34480
- resolveReviewThread(id: string, threadId: string, opts?: CallOpts$26): Promise<StudioReviewThread>;
34641
+ resolveReviewThread(id: string, threadId: string, opts?: CallOpts$27): Promise<StudioReviewThread>;
34481
34642
  /** Reopen a resolved thread. Free. */
34482
- reopenReviewThread(id: string, threadId: string, opts?: CallOpts$26): Promise<StudioReviewThread>;
34643
+ reopenReviewThread(id: string, threadId: string, opts?: CallOpts$27): Promise<StudioReviewThread>;
34483
34644
  /** Delete any comment (owner moderation; deleting a root hides the thread). 404 when unknown. Free. */
34484
- deleteReviewComment(id: string, commentId: string, opts?: CallOpts$26): Promise<void>;
34645
+ deleteReviewComment(id: string, commentId: string, opts?: CallOpts$27): Promise<void>;
34485
34646
  /** Poll a frame job: frames when done (`status: 'succeeded'`), `status: 'running'` meanwhile; 404 unknown job. */
34486
- frameJob(id: string, jobId: string, opts?: CallOpts$26): Promise<CreativeFrameResult>;
34647
+ frameJob(id: string, jobId: string, opts?: CallOpts$27): Promise<CreativeFrameResult>;
34487
34648
  }
34488
34649
  //#endregion
34489
34650
  //#region src/resources/brand-kits.d.ts
@@ -34499,7 +34660,7 @@ export type BrandKitCreateRequest = Mutable<Body<'createBrandKit'>>;
34499
34660
  export type BrandKitUpdateRequest = Mutable<Body<'updateBrandKit'>>;
34500
34661
  export type BrandKitList = Reply<'listBrandKits'>;
34501
34662
  export type BrandKitDeleted = Reply<'deleteBrandKit'>;
34502
- type CallOpts$25 = {
34663
+ type CallOpts$26 = {
34503
34664
  ext?: CodaiRequestExtensions;
34504
34665
  signal?: AbortSignal;
34505
34666
  };
@@ -34511,29 +34672,29 @@ export declare class BrandKits {
34511
34672
  * (import) — exactly one. 400 `invalid_tokens` (with `details.issues`) for an invalid DTCG document, 404 when
34512
34673
  * `logo_asset_id` is not one of your ready image assets. Free.
34513
34674
  */
34514
- create(body: BrandKitCreateRequest, opts?: CallOpts$25): Promise<BrandKit>;
34675
+ create(body: BrandKitCreateRequest, opts?: CallOpts$26): Promise<BrandKit>;
34515
34676
  /**
34516
34677
  * Edit a kit: `tokens` is merged onto the current kit, `dtcg` replaces the whole document (not both),
34517
34678
  * `logo_asset_id: null` removes the logo. Creatives keep their tokens until `creatives.restyle`. Free.
34518
34679
  */
34519
- update(id: string, body: BrandKitUpdateRequest, opts?: CallOpts$25): Promise<BrandKit>;
34680
+ update(id: string, body: BrandKitUpdateRequest, opts?: CallOpts$26): Promise<BrandKit>;
34520
34681
  /** The kit as a DTCG 2025.10 JSON document (`$extensions['ro.codai']` = kit id, name, logo asset id). Free. */
34521
- exportDtcg(id: string, opts?: CallOpts$25): Promise<BrandKitDtcg>;
34682
+ exportDtcg(id: string, opts?: CallOpts$26): Promise<BrandKitDtcg>;
34522
34683
  /**
34523
34684
  * Extract a brand kit from a public `https` page (`{ url }`) or from one of your logo images
34524
34685
  * (`{ logo_asset_id }`, PNG / JPEG / WebP up to 5 MB; it becomes the kit logo): palette (primary, secondary, accent,
34525
34686
  * background, text) and heading / body fonts. One bounded `codai` model call (token-metered); 400 `url_blocked` for
34526
34687
  * private hosts, 400 `unsupported_media` for a bad logo, 422 `fetch_failed` / `extract_failed`, 504 `timeout`.
34527
34688
  */
34528
- extract(body: BrandKitExtractRequest, opts?: CallOpts$25): Promise<BrandKit>;
34689
+ extract(body: BrandKitExtractRequest, opts?: CallOpts$26): Promise<BrandKit>;
34529
34690
  /** Your brand kits, newest first (`limit` 1–100, default 50). Free. */
34530
34691
  list(query?: {
34531
34692
  limit?: number;
34532
- }, opts?: CallOpts$25): Promise<BrandKitList>;
34693
+ }, opts?: CallOpts$26): Promise<BrandKitList>;
34533
34694
  /** One kit with a signed logo URL (1 h), its `dtcg` and the WCAG `contrast` pairs. Free. */
34534
- retrieve(id: string, opts?: CallOpts$25): Promise<BrandKit>;
34695
+ retrieve(id: string, opts?: CallOpts$26): Promise<BrandKit>;
34535
34696
  /** Delete a kit (creatives keep their tokens; the logo asset stays). Free. */
34536
- delete(id: string, opts?: CallOpts$25): Promise<BrandKitDeleted>;
34697
+ delete(id: string, opts?: CallOpts$26): Promise<BrandKitDeleted>;
34537
34698
  }
34538
34699
  //#endregion
34539
34700
  //#region src/resources/templates.d.ts
@@ -34541,7 +34702,7 @@ export type CreativeTemplateVar = Schema<'CreativeTemplateVar'>;
34541
34702
  export type CreativeTemplateList = Reply<'listCreativeTemplates'>;
34542
34703
  export type CreativeTemplateListQuery = QueryOf<'listCreativeTemplates'>;
34543
34704
  export type CreativeTemplateDeleted = Reply<'deleteCreativeTemplate'>;
34544
- type CallOpts$24 = {
34705
+ type CallOpts$25 = {
34545
34706
  ext?: CodaiRequestExtensions;
34546
34707
  signal?: AbortSignal;
34547
34708
  };
@@ -34554,25 +34715,25 @@ export declare class Templates {
34554
34715
  * (default). `kind` filters both. Without `doc`. Free. A starter id works anywhere a template id does
34555
34716
  * (`retrieve`, `creatives.create({ template })`, batches); starters cannot be deleted.
34556
34717
  */
34557
- list(query?: CreativeTemplateListQuery, opts?: CallOpts$24): Promise<CreativeTemplateList>;
34718
+ list(query?: CreativeTemplateListQuery, opts?: CallOpts$25): Promise<CreativeTemplateList>;
34558
34719
  /** One template with its variables and `doc`. Free. */
34559
- retrieve(id: string, opts?: CallOpts$24): Promise<Schema<'CreativeTemplate'>>;
34720
+ retrieve(id: string, opts?: CallOpts$25): Promise<Schema<'CreativeTemplate'>>;
34560
34721
  /** Delete a template (creatives made from it are not affected). Free. */
34561
- delete(id: string, opts?: CallOpts$24): Promise<CreativeTemplateDeleted>;
34722
+ delete(id: string, opts?: CallOpts$25): Promise<CreativeTemplateDeleted>;
34562
34723
  }
34563
34724
  //#endregion
34564
34725
  //#region src/resources/productions.d.ts
34565
34726
  export type StudioProductionCreate = Mutable<Body<'createStudioProduction'>>;
34566
34727
  export type StudioProduction = Schema<'StudioProduction'>;
34567
- type CallOpts$23 = {
34728
+ type CallOpts$24 = {
34568
34729
  ext?: CodaiRequestExtensions;
34569
34730
  signal?: AbortSignal;
34570
34731
  };
34571
- export interface ProductionCreateOptions extends CallOpts$23 {
34732
+ export interface ProductionCreateOptions extends CallOpts$24 {
34572
34733
  /** `Idempotency-Key`: a retry with the same key replays the first production instead of starting another one. */
34573
34734
  idempotencyKey?: string;
34574
34735
  }
34575
- export interface ProductionWaitOptions extends CallOpts$23 {
34736
+ export interface ProductionWaitOptions extends CallOpts$24 {
34576
34737
  /** Delay between polls (default 5000 ms). */
34577
34738
  intervalMs?: number;
34578
34739
  /** Give up after this long (default 600 000 ms = 10 min). */
@@ -34585,7 +34746,7 @@ export declare class Productions {
34585
34746
  /** `POST /v1/studio/productions` — brief → storyboard → assets → creative → queued draft render (202). */
34586
34747
  create(body: StudioProductionCreate, opts?: ProductionCreateOptions): Promise<StudioProduction>;
34587
34748
  /** `GET /v1/studio/productions/{id}` — advances the production and returns it (another account's id is a 404). */
34588
- retrieve(id: string, opts?: CallOpts$23): Promise<StudioProduction>;
34749
+ retrieve(id: string, opts?: CallOpts$24): Promise<StudioProduction>;
34589
34750
  /**
34590
34751
  * Poll `retrieve` every `intervalMs` (default 5 s) until the production `succeeded` or `failed` (a failed one
34591
34752
  * resolves too — check `status` / `error`). Throws after `timeoutMs` (default 10 min) or when `signal` aborts.
@@ -34612,11 +34773,11 @@ export type StudioBatchDryRun = Schema<'StudioBatchDryRun'>;
34612
34773
  export type StudioBatchCreateRequest = Mutable<Schema<'StudioBatchCreateRequest'>>;
34613
34774
  export type StudioBatchListQuery = QueryOf<'listStudioBatches'>;
34614
34775
  export type StudioBatchGetQuery = QueryOf<'getStudioBatch'>;
34615
- type CallOpts$22 = {
34776
+ type CallOpts$23 = {
34616
34777
  ext?: CodaiRequestExtensions;
34617
34778
  signal?: AbortSignal;
34618
34779
  };
34619
- export interface BatchWaitOptions extends CallOpts$22 {
34780
+ export interface BatchWaitOptions extends CallOpts$23 {
34620
34781
  /** Delay between polls (default 3000 ms). */
34621
34782
  intervalMs?: number;
34622
34783
  /** Give up after this long (default 600 000 ms = 10 min). */
@@ -34629,24 +34790,24 @@ export declare class Batches {
34629
34790
  * Create a batch: rows are validated (invalid rows are stored as `failed`) and run in the background; poll `get`
34630
34791
  * or `wait`. 400 `invalid_rows` when every row is invalid. Free (translations and renders are billed as usual).
34631
34792
  */
34632
- create(body: StudioBatchCreateRequest, opts?: CallOpts$22): Promise<StudioBatchDetail>;
34793
+ create(body: StudioBatchCreateRequest, opts?: CallOpts$23): Promise<StudioBatchDetail>;
34633
34794
  /** Validate only (`dry_run: true`): the mapping, row errors, a 3-row preview and an estimate; nothing stored. Free. */
34634
- dryRun(body: StudioBatchCreateRequest, opts?: CallOpts$22): Promise<StudioBatchDryRun>;
34795
+ dryRun(body: StudioBatchCreateRequest, opts?: CallOpts$23): Promise<StudioBatchDryRun>;
34635
34796
  /** Your batches, newest first (`limit` 1–50, `before` = the previous `next_before`). Free. */
34636
- list(query?: StudioBatchListQuery, opts?: CallOpts$22): Promise<StudioBatchList>;
34797
+ list(query?: StudioBatchListQuery, opts?: CallOpts$23): Promise<StudioBatchList>;
34637
34798
  /** The batch (`rows: 1` adds rows; `status`, `offset`, `limit` ≤ 100). Each poll advances it a little. Free. */
34638
- get(id: string, query?: StudioBatchGetQuery, opts?: CallOpts$22): Promise<StudioBatchDetail>;
34799
+ get(id: string, query?: StudioBatchGetQuery, opts?: CallOpts$23): Promise<StudioBatchDetail>;
34639
34800
  /** Stop the batch; rows not started become `skipped`. 409 `not_cancellable` when already finished. Free. */
34640
- cancel(id: string, opts?: CallOpts$22): Promise<StudioBatch>;
34801
+ cancel(id: string, opts?: CallOpts$23): Promise<StudioBatch>;
34641
34802
  /** Queue the failed rows again (≤ 3 attempts each). 409 `nothing_to_retry`. Free. */
34642
- retry(id: string, opts?: CallOpts$22): Promise<StudioBatch>;
34803
+ retry(id: string, opts?: CallOpts$23): Promise<StudioBatch>;
34643
34804
  /** The original CSV plus `creative_id`, `status`, `error`, `render_url` per row (formula-safe). Free. */
34644
- exportCsv(id: string, opts?: CallOpts$22): Promise<string>;
34805
+ exportCsv(id: string, opts?: CallOpts$23): Promise<string>;
34645
34806
  /**
34646
34807
  * Start building a ZIP of the finished renders (202, `zip.status: 'building'`; unchanged when already building or
34647
34808
  * ready). Poll `get` until `zip.status` is `ready` (signed `zip.url`). 409 `no_renders`. Free.
34648
34809
  */
34649
- zip(id: string, opts?: CallOpts$22): Promise<StudioBatch>;
34810
+ zip(id: string, opts?: CallOpts$23): Promise<StudioBatch>;
34650
34811
  /**
34651
34812
  * Poll `get` every `intervalMs` (default 3 s) until the batch is `completed`, `failed` or `cancelled` and resolve
34652
34813
  * with it. Throws when it is not done within `timeoutMs` (default 10 min) or when `signal` aborts.
@@ -34674,7 +34835,7 @@ export type StudioPublicShareQuery = {
34674
34835
  format?: string;
34675
34836
  locale?: string;
34676
34837
  };
34677
- type CallOpts$21 = {
34838
+ type CallOpts$22 = {
34678
34839
  ext?: CodaiRequestExtensions;
34679
34840
  signal?: AbortSignal;
34680
34841
  };
@@ -34691,25 +34852,25 @@ export declare class Shares {
34691
34852
  * `locale` (null for images); review links add the review state and every thread. 404 for unknown, revoked or
34692
34853
  * expired links. No key needed.
34693
34854
  */
34694
- get(tokenOrUrl: string, query?: StudioPublicShareQuery, opts?: CallOpts$21): Promise<StudioPublicShare>;
34855
+ get(tokenOrUrl: string, query?: StudioPublicShareQuery, opts?: CallOpts$22): Promise<StudioPublicShare>;
34695
34856
  /**
34696
34857
  * Copy the version a `view` link shows into a new creative of yours (the owner's ready assets are copied, the
34697
34858
  * foreign brand kit dropped; HTTP 201). 404 for review links or links without remix; 413 `remix_too_large`. Free.
34698
34859
  */
34699
- remix(tokenOrUrl: string, body?: StudioRemixRequest, opts?: CallOpts$21): Promise<StudioRemixResult>;
34860
+ remix(tokenOrUrl: string, body?: StudioRemixRequest, opts?: CallOpts$22): Promise<StudioRemixResult>;
34700
34861
  /** Start a thread through a review link (`name`, `body`, optional anchor; HTTP 201). 400 `invalid_name`. */
34701
- comment(tokenOrUrl: string, body: StudioPublicThreadCreateRequest, opts?: CallOpts$21): Promise<StudioReviewThread>;
34862
+ comment(tokenOrUrl: string, body: StudioPublicThreadCreateRequest, opts?: CallOpts$22): Promise<StudioReviewThread>;
34702
34863
  /** Reply in a thread through a review link (`name`, `body`; HTTP 201) — returns the whole thread. */
34703
- reply(tokenOrUrl: string, threadId: string, body: StudioPublicReplyRequest, opts?: CallOpts$21): Promise<StudioReviewThread>;
34864
+ reply(tokenOrUrl: string, threadId: string, body: StudioPublicReplyRequest, opts?: CallOpts$22): Promise<StudioReviewThread>;
34704
34865
  /** Resolve a thread through a review link (`resolved_by` = `name`). */
34705
- resolve(tokenOrUrl: string, threadId: string, body: StudioPublicNameRequest, opts?: CallOpts$21): Promise<StudioReviewThread>;
34866
+ resolve(tokenOrUrl: string, threadId: string, body: StudioPublicNameRequest, opts?: CallOpts$22): Promise<StudioReviewThread>;
34706
34867
  /** Reopen a resolved thread through a review link. */
34707
- reopen(tokenOrUrl: string, threadId: string, body: StudioPublicNameRequest, opts?: CallOpts$21): Promise<StudioReviewThread>;
34868
+ reopen(tokenOrUrl: string, threadId: string, body: StudioPublicNameRequest, opts?: CallOpts$22): Promise<StudioReviewThread>;
34708
34869
  /**
34709
34870
  * Approve or request changes (approver review links only). 403 `not_an_approver`, 409 `review_not_open`, 409
34710
34871
  * `stale` (with `head_seq`) when `seq` is not the head. Returns the new review state.
34711
34872
  */
34712
- decide(tokenOrUrl: string, body: StudioPublicDecisionRequest, opts?: CallOpts$21): Promise<StudioPublicReview>;
34873
+ decide(tokenOrUrl: string, body: StudioPublicDecisionRequest, opts?: CallOpts$22): Promise<StudioPublicReview>;
34713
34874
  }
34714
34875
  //#endregion
34715
34876
  //#region src/resources/voice-revocations.d.ts
@@ -34747,7 +34908,7 @@ export type VaultResolveRequest = Mutable<Body<'vaultResolve'>>;
34747
34908
  export type VaultTier = VaultAccount['default_tier'];
34748
34909
  /** Loose JSON object answers (lists, acks) as documented in the OpenAPI spec. */
34749
34910
  export type VaultObject = Record<string, unknown>;
34750
- type CallOpts$20 = {
34911
+ type CallOpts$21 = {
34751
34912
  ext?: CodaiRequestExtensions;
34752
34913
  signal?: AbortSignal;
34753
34914
  };
@@ -34756,15 +34917,15 @@ export declare class VaultDevices {
34756
34917
  private readonly http;
34757
34918
  constructor(http: HttpClient);
34758
34919
  /** `POST /v1/vault/devices/challenge` — single-use enrolment nonce, valid 5 minutes. */
34759
- challenge(opts?: CallOpts$20): Promise<VaultDeviceChallenge>;
34920
+ challenge(opts?: CallOpts$21): Promise<VaultDeviceChallenge>;
34760
34921
  /** `POST /v1/vault/devices` — enrol (or re-enrol) a device key; vault-signed, possession-proven, attested (201). */
34761
- enroll(body: VaultDeviceEnroll, opts?: CallOpts$20): Promise<VaultDeviceKey>;
34922
+ enroll(body: VaultDeviceEnroll, opts?: CallOpts$21): Promise<VaultDeviceKey>;
34762
34923
  /** `GET /v1/vault/devices` — your device keys, revoked ones included, newest first. */
34763
- list(opts?: CallOpts$20): Promise<VaultDeviceKey[]>;
34924
+ list(opts?: CallOpts$21): Promise<VaultDeviceKey[]>;
34764
34925
  /** `PATCH /v1/vault/devices/{id}` — change the display name (1-80 characters). */
34765
- rename(id: string, name: string, opts?: CallOpts$20): Promise<VaultDeviceKey>;
34926
+ rename(id: string, name: string, opts?: CallOpts$21): Promise<VaultDeviceKey>;
34766
34927
  /** `DELETE /v1/vault/devices/{id}` — revoke at once; later proofs answer 403 `device_revoked`. */
34767
- revoke(id: string, opts?: CallOpts$20): Promise<Reply<'revokeVaultDevice'>>;
34928
+ revoke(id: string, opts?: CallOpts$21): Promise<Reply<'revokeVaultDevice'>>;
34768
34929
  }
34769
34930
  export declare class Vault {
34770
34931
  private readonly http;
@@ -34773,52 +34934,52 @@ export declare class Vault {
34773
34934
  private get;
34774
34935
  private send;
34775
34936
  /** `GET /v1/vault/account` — bundle, fingerprint, default tier, revision (404 `vault_not_setup` before setup). */
34776
- account(opts?: CallOpts$20): Promise<VaultAccount>;
34937
+ account(opts?: CallOpts$21): Promise<VaultAccount>;
34777
34938
  /** `PUT /v1/vault/account` — upload the client-built bundle; updates send the current `revision` (409 otherwise). */
34778
- putAccount(body: VaultAccountPut, opts?: CallOpts$20): Promise<VaultObject>;
34939
+ putAccount(body: VaultAccountPut, opts?: CallOpts$21): Promise<VaultObject>;
34779
34940
  /** `PATCH /v1/vault/settings` — default approval tier for items without a matching rule. */
34780
- setDefaultTier(defaultTier: VaultTier, opts?: CallOpts$20): Promise<VaultObject>;
34941
+ setDefaultTier(defaultTier: VaultTier, opts?: CallOpts$21): Promise<VaultObject>;
34781
34942
  /** `GET /v1/vault/vaults` — vaults you belong to, with your role and sealed vault key. */
34782
- vaults(opts?: CallOpts$20): Promise<VaultObject>;
34943
+ vaults(opts?: CallOpts$21): Promise<VaultObject>;
34783
34944
  /** `POST /v1/vault/vaults` — register a vault created client-side (HTTP 201). */
34784
- createVault(body: VaultCreate, opts?: CallOpts$20): Promise<VaultObject>;
34945
+ createVault(body: VaultCreate, opts?: CallOpts$21): Promise<VaultObject>;
34785
34946
  /** `GET /v1/vault/items` — envelopes you can read; with `since` (ISO) only changes after it, tombstones included. */
34786
- items(params?: QueryOf<'listVaultItems'>, opts?: CallOpts$20): Promise<VaultObject>;
34947
+ items(params?: QueryOf<'listVaultItems'>, opts?: CallOpts$21): Promise<VaultObject>;
34787
34948
  /** `PUT /v1/vault/items/{id}` — store an envelope (new = revision 1, update = revision + 1, 409 otherwise). */
34788
- putItem(id: string, envelope: VaultItemEnvelope, opts?: CallOpts$20): Promise<VaultObject>;
34949
+ putItem(id: string, envelope: VaultItemEnvelope, opts?: CallOpts$21): Promise<VaultObject>;
34789
34950
  /** `DELETE /v1/vault/items/{id}` — tombstone; revokes every grant on the item and drops its cloud copy. */
34790
- deleteItem(id: string, opts?: CallOpts$20): Promise<VaultObject>;
34951
+ deleteItem(id: string, opts?: CallOpts$21): Promise<VaultObject>;
34791
34952
  /** `PUT /v1/vault/items/{id}/cloud` — owner only: the decrypted item to seal with KMS for cloud agents, or null. */
34792
- setItemCloud(id: string, item: Record<string, unknown> | null, opts?: CallOpts$20): Promise<VaultObject>;
34953
+ setItemCloud(id: string, item: Record<string, unknown> | null, opts?: CallOpts$21): Promise<VaultObject>;
34793
34954
  /** `GET /v1/vault/rules` — policy rules (item, agent glob, mode → tier). */
34794
- rules(opts?: CallOpts$20): Promise<VaultObject>;
34955
+ rules(opts?: CallOpts$21): Promise<VaultObject>;
34795
34956
  /** `POST /v1/vault/rules` — add a rule (HTTP 201). Host binding and honeytokens cannot be overridden. */
34796
- createRule(body: VaultRuleCreate, opts?: CallOpts$20): Promise<VaultObject>;
34957
+ createRule(body: VaultRuleCreate, opts?: CallOpts$21): Promise<VaultObject>;
34797
34958
  /** `DELETE /v1/vault/rules/{id}`. */
34798
- deleteRule(id: string, opts?: CallOpts$20): Promise<VaultObject>;
34959
+ deleteRule(id: string, opts?: CallOpts$21): Promise<VaultObject>;
34799
34960
  /** `GET /v1/vault/grants` — standing grants created by your approvals. */
34800
- grants(opts?: CallOpts$20): Promise<VaultObject>;
34961
+ grants(opts?: CallOpts$21): Promise<VaultObject>;
34801
34962
  /** `DELETE /v1/vault/grants/{id}` — revoke a grant immediately. */
34802
- revokeGrant(id: string, opts?: CallOpts$20): Promise<VaultObject>;
34963
+ revokeGrant(id: string, opts?: CallOpts$21): Promise<VaultObject>;
34803
34964
  /** `GET /v1/vault/events` — append-only audit log (never contains secret values). */
34804
- events(params?: QueryOf<'listVaultEvents'>, opts?: CallOpts$20): Promise<VaultObject>;
34965
+ events(params?: QueryOf<'listVaultEvents'>, opts?: CallOpts$21): Promise<VaultObject>;
34805
34966
  /** `GET /v1/vault/approvals` — agent requests waiting for your decision. */
34806
- approvals(opts?: CallOpts$20): Promise<VaultObject>;
34967
+ approvals(opts?: CallOpts$21): Promise<VaultObject>;
34807
34968
  /** `GET /v1/vault/approvals/{id}` — pending, approved, denied or expired. */
34808
- approval(id: string, opts?: CallOpts$20): Promise<VaultObject>;
34969
+ approval(id: string, opts?: CallOpts$21): Promise<VaultObject>;
34809
34970
  /**
34810
34971
  * `POST /v1/vault/approvals/{id}/decide` — send `signature` (v1 vault key) or `proof` (v2 device key / passkey),
34811
34972
  * never both. Deny needs no proof; a t4 approve needs a device or passkey proof (Wear: t3 only).
34812
34973
  */
34813
- decide(id: string, body: VaultDecision, opts?: CallOpts$20): Promise<VaultObject>;
34974
+ decide(id: string, body: VaultDecision, opts?: CallOpts$21): Promise<VaultObject>;
34814
34975
  /** `GET /v1/vault/catalog` — items exposed to agents (handle, title, kind, hosts, env name); no values. */
34815
- catalog(opts?: CallOpts$20): Promise<VaultObject>;
34976
+ catalog(opts?: CallOpts$21): Promise<VaultObject>;
34816
34977
  /** `POST /v1/vault/use` — a policy decision for one use; t3/t4 return a pending approval id. */
34817
- use(body: VaultUseRequest, opts?: CallOpts$20): Promise<VaultUseDecision>;
34978
+ use(body: VaultUseRequest, opts?: CallOpts$21): Promise<VaultUseDecision>;
34818
34979
  /** `POST /v1/vault/http` — brokered HTTPS call with `{{vault:<slug>}}` handles; 202 = approval required. */
34819
- httpCall(body: VaultHttpRequest, opts?: CallOpts$20): Promise<VaultObject>;
34980
+ httpCall(body: VaultHttpRequest, opts?: CallOpts$21): Promise<VaultObject>;
34820
34981
  /** `POST /v1/vault/resolve` — codai local brokers only (cloud fallback of `codaid vault run`); 202 = approval. */
34821
- resolve(body: VaultResolveRequest, opts?: CallOpts$20): Promise<VaultObject>;
34982
+ resolve(body: VaultResolveRequest, opts?: CallOpts$21): Promise<VaultObject>;
34822
34983
  }
34823
34984
  //#endregion
34824
34985
  //#region src/resources/abuse-reports.d.ts
@@ -34925,7 +35086,7 @@ export type Org = Schema<'OrgWithRole'>;
34925
35086
  export type OrgMember = Schema<'OrgMember'>;
34926
35087
  export type OrgRole = Schema<'OrgRole'>;
34927
35088
  export type OrgAddMemberBody = Mutable<Body<'addOrgMember'>>;
34928
- type CallOpts$19 = {
35089
+ type CallOpts$20 = {
34929
35090
  ext?: CodaiRequestExtensions;
34930
35091
  signal?: AbortSignal;
34931
35092
  };
@@ -34933,20 +35094,20 @@ export declare class OrgMembers {
34933
35094
  private readonly http;
34934
35095
  constructor(http: HttpClient);
34935
35096
  /** `GET /v1/orgs/{id}/members` */
34936
- list(orgId: string, opts?: CallOpts$19): Promise<OrgMember[]>;
35097
+ list(orgId: string, opts?: CallOpts$20): Promise<OrgMember[]>;
34937
35098
  /** `POST /v1/orgs/{id}/members` — add or re-role (owner/admin). */
34938
- add(orgId: string, body: OrgAddMemberBody, opts?: CallOpts$19): Promise<Reply<'addOrgMember', 201>>;
35099
+ add(orgId: string, body: OrgAddMemberBody, opts?: CallOpts$20): Promise<Reply<'addOrgMember', 201>>;
34939
35100
  /** `DELETE /v1/orgs/{id}/members/{userId}` */
34940
- remove(orgId: string, userId: string, opts?: CallOpts$19): Promise<Reply<'removeOrgMember'>>;
35101
+ remove(orgId: string, userId: string, opts?: CallOpts$20): Promise<Reply<'removeOrgMember'>>;
34941
35102
  }
34942
35103
  export declare class Orgs {
34943
35104
  private readonly http;
34944
35105
  readonly members: OrgMembers;
34945
35106
  constructor(http: HttpClient);
34946
35107
  /** `POST /v1/orgs` */
34947
- create(name: string, opts?: CallOpts$19): Promise<Org>;
35108
+ create(name: string, opts?: CallOpts$20): Promise<Org>;
34948
35109
  /** `GET /v1/orgs` */
34949
- list(opts?: CallOpts$19): Promise<Org[]>;
35110
+ list(opts?: CallOpts$20): Promise<Org[]>;
34950
35111
  }
34951
35112
  //#endregion
34952
35113
  //#region src/resources/projects.d.ts
@@ -34955,7 +35116,7 @@ export type ProjectIsolation = Schema<'ProjectIsolation'>;
34955
35116
  export type ProjectCreateBody = Mutable<Body<'createProject'>>;
34956
35117
  export type ProjectPatchBody = Mutable<Body<'updateProject'>>;
34957
35118
  export type ProjectDetail = Reply<'getProject'>;
34958
- type CallOpts$18 = {
35119
+ type CallOpts$19 = {
34959
35120
  ext?: CodaiRequestExtensions;
34960
35121
  signal?: AbortSignal;
34961
35122
  };
@@ -34963,15 +35124,15 @@ export declare class Projects {
34963
35124
  private readonly http;
34964
35125
  constructor(http: HttpClient);
34965
35126
  /** `GET /v1/projects` — projects you own plus those of your orgs, newest first. */
34966
- list(opts?: CallOpts$18): Promise<Project[]>;
35127
+ list(opts?: CallOpts$19): Promise<Project[]>;
34967
35128
  /** `POST /v1/projects` — 409 `slug_taken` when the slug is already yours. */
34968
- create(body: ProjectCreateBody, opts?: CallOpts$18): Promise<Project>;
35129
+ create(body: ProjectCreateBody, opts?: CallOpts$19): Promise<Project>;
34969
35130
  /** `GET /v1/projects/{id}` — the project plus every environment in it. */
34970
- get(projectId: string, opts?: CallOpts$18): Promise<ProjectDetail>;
35131
+ get(projectId: string, opts?: CallOpts$19): Promise<ProjectDetail>;
34971
35132
  /** `PATCH /v1/projects/{id}` — owner or org owner/admin; the slug cannot change. */
34972
- update(projectId: string, body: ProjectPatchBody, opts?: CallOpts$18): Promise<Project>;
35133
+ update(projectId: string, body: ProjectPatchBody, opts?: CallOpts$19): Promise<Project>;
34973
35134
  /** `DELETE /v1/projects/{id}` — 409 `project_has_environments` until all are destroyed. */
34974
- delete(projectId: string, opts?: CallOpts$18): Promise<Reply<'deleteProject'>>;
35135
+ delete(projectId: string, opts?: CallOpts$19): Promise<Reply<'deleteProject'>>;
34975
35136
  }
34976
35137
  //#endregion
34977
35138
  //#region src/resources/realtime.d.ts
@@ -35118,7 +35279,7 @@ export declare class Realtime {
35118
35279
  export type ReferralsView = Reply<'getReferrals'>;
35119
35280
  export type ReferralRow = Schema<'ReferralRow'>;
35120
35281
  export type ReferralStats = Schema<'AccountReferral'>;
35121
- type CallOpts$17 = {
35282
+ type CallOpts$18 = {
35122
35283
  ext?: CodaiRequestExtensions;
35123
35284
  signal?: AbortSignal;
35124
35285
  };
@@ -35126,15 +35287,15 @@ export declare class Referrals {
35126
35287
  private readonly http;
35127
35288
  constructor(http: HttpClient);
35128
35289
  /** `GET /v1/referrals` — stats, redeem deadline and invitees (masked, no PII). */
35129
- get(opts?: CallOpts$17): Promise<ReferralsView>;
35290
+ get(opts?: CallOpts$18): Promise<ReferralsView>;
35130
35291
  /**
35131
35292
  * Redeem a referrer's code (their username) — `PATCH /v1/account
35132
35293
  * { referral_code }`. Allowed within 7 days of signup; the outcome is in
35133
35294
  * `referral_result` of the response.
35134
35295
  */
35135
- redeem(code: string, opts?: CallOpts$17): Promise<AccountPatchResponse>;
35296
+ redeem(code: string, opts?: CallOpts$18): Promise<AccountPatchResponse>;
35136
35297
  /** Opt in/out of the referral programme — `PATCH /v1/account { referral_consent }`. */
35137
- setConsent(consent: boolean, opts?: CallOpts$17): Promise<AccountPatchResponse>;
35298
+ setConsent(consent: boolean, opts?: CallOpts$18): Promise<AccountPatchResponse>;
35138
35299
  private patch;
35139
35300
  }
35140
35301
  //#endregion
@@ -36179,7 +36340,7 @@ export interface ResolveWaitOptions {
36179
36340
  /** Called with every polled job (progress UIs). */
36180
36341
  onPoll?: (job: ResolveJob) => void;
36181
36342
  }
36182
- type CallOpts$16 = {
36343
+ type CallOpts$17 = {
36183
36344
  signal?: AbortSignal;
36184
36345
  };
36185
36346
  /** Query of `resolve.list()` / `resolve.iterate()`. */
@@ -36200,20 +36361,20 @@ export declare class Resolve {
36200
36361
  * (`status: 'accepted'`) or a decline (`status: 'declined'`). Never retried:
36201
36362
  * a retry could create a second job.
36202
36363
  */
36203
- submit(body: ResolveIntake, opts?: CallOpts$16): Promise<ResolveSubmitResult>;
36364
+ submit(body: ResolveIntake, opts?: CallOpts$17): Promise<ResolveSubmitResult>;
36204
36365
  /** `GET /v1/resolve/jobs/{id}` — status, quote, reasons, cost and attestation pointer. */
36205
- get(id: string, opts?: CallOpts$16): Promise<ResolveJob>;
36366
+ get(id: string, opts?: CallOpts$17): Promise<ResolveJob>;
36206
36367
  /**
36207
36368
  * `GET /v1/resolve/jobs` — one page of your jobs, newest first. Pass the
36208
36369
  * page's `next_cursor` back as `cursor` for the next page (`null` = last).
36209
36370
  * `status` filters by one or more statuses.
36210
36371
  */
36211
- list(query?: ResolveListQuery, opts?: CallOpts$16): Promise<ResolveJobList>;
36372
+ list(query?: ResolveListQuery, opts?: CallOpts$17): Promise<ResolveJobList>;
36212
36373
  /**
36213
36374
  * Every job matching `query`, newest first, following `next_cursor` page by
36214
36375
  * page (`limit` = page size). Stop early with `break`.
36215
36376
  */
36216
- iterate(query?: Omit<ResolveListQuery, 'cursor'>, opts?: CallOpts$16): AsyncGenerator<ResolveJob, void, undefined>;
36377
+ iterate(query?: Omit<ResolveListQuery, 'cursor'>, opts?: CallOpts$17): AsyncGenerator<ResolveJob, void, undefined>;
36217
36378
  /**
36218
36379
  * `POST /v1/resolve/jobs/{id}/accept` — accept a paid quote and start the job.
36219
36380
  * The result's `paid_with` says how it was paid (`intro` €1 hold, `credit`
@@ -36221,18 +36382,18 @@ export declare class Resolve {
36221
36382
  * carries `topupUrl`, plus `bundleUrl` for t7) when the wallet is short,
36222
36383
  * `ResolveError` 409 when the job is not `quoted`.
36223
36384
  */
36224
- accept(id: string, opts?: CallOpts$16): Promise<ResolveAccepted>;
36385
+ accept(id: string, opts?: CallOpts$17): Promise<ResolveAccepted>;
36225
36386
  /**
36226
36387
  * `GET /v1/resolve/attestations/{id}` — public execution proof (no auth needed
36227
36388
  * server-side). Accepts the attestation id or the job's `attestation_url`.
36228
36389
  */
36229
- attestation(idOrUrl: string, opts?: CallOpts$16): Promise<ResolveAttestation>;
36390
+ attestation(idOrUrl: string, opts?: CallOpts$17): Promise<ResolveAttestation>;
36230
36391
  /** `GET /health` — liveness of the Resolve service. */
36231
- health(opts?: CallOpts$16): Promise<ResolveHealth>;
36392
+ health(opts?: CallOpts$17): Promise<ResolveHealth>;
36232
36393
  /** `GET /v1/resolve/balance` — fix credits (t7 only), intro availability and wallet balance. */
36233
- balance(opts?: CallOpts$16): Promise<ResolveBalance>;
36394
+ balance(opts?: CallOpts$17): Promise<ResolveBalance>;
36234
36395
  /** `GET /v1/resolve/keys` — public keys that sign attestations (no auth needed server-side). */
36235
- keys(opts?: CallOpts$16): Promise<ResolveKeys>;
36396
+ keys(opts?: CallOpts$17): Promise<ResolveKeys>;
36236
36397
  /**
36237
36398
  * Verify an attestation's signature and that the signed statement matches
36238
36399
  * its fields. Fetches `keys()` unless `opts.keys` is given (pin them to
@@ -36333,7 +36494,7 @@ export type SessionShare = Schema<'OrgSessionShare'>;
36333
36494
  export type SessionShareCreateRequest = Mutable<Body<'createSessionShare'>>;
36334
36495
  export type SessionShareCreated = Reply<'createSessionShare', 201>;
36335
36496
  export type SharedSession = Schema<'OrgSharedSession'>;
36336
- type CallOpts$15 = {
36497
+ type CallOpts$16 = {
36337
36498
  ext?: CodaiRequestExtensions;
36338
36499
  signal?: AbortSignal;
36339
36500
  };
@@ -36380,19 +36541,19 @@ export declare class SessionLease {
36380
36541
  private readonly http;
36381
36542
  constructor(http: HttpClient);
36382
36543
  /** `POST /v1/sessions/{id}/lease` — CAS claim; `force: true` takes over a live lease. */
36383
- acquire(sessionId: string, body?: SessionLeaseClaimRequest, opts?: CallOpts$15): Promise<SessionLeaseResponse>;
36544
+ acquire(sessionId: string, body?: SessionLeaseClaimRequest, opts?: CallOpts$16): Promise<SessionLeaseResponse>;
36384
36545
  /** `PUT /v1/sessions/{id}/lease` — heartbeat every 10 s (TTL 30 s). */
36385
- renew(sessionId: string, opts?: CallOpts$15): Promise<SessionLeaseResponse>;
36546
+ renew(sessionId: string, opts?: CallOpts$16): Promise<SessionLeaseResponse>;
36386
36547
  /** `DELETE /v1/sessions/{id}/lease` */
36387
- release(sessionId: string, opts?: CallOpts$15): Promise<Reply<'releaseSessionLease'>>;
36548
+ release(sessionId: string, opts?: CallOpts$16): Promise<Reply<'releaseSessionLease'>>;
36388
36549
  }
36389
36550
  export declare class SessionEvents {
36390
36551
  private readonly http;
36391
36552
  constructor(http: HttpClient);
36392
36553
  /** `GET /v1/sessions/{id}/events?after=&limit=` */
36393
- list(sessionId: string, query?: Mutable<QueryOf<'listSessionEvents'>>, opts?: CallOpts$15): Promise<SessionEventsPage>;
36554
+ list(sessionId: string, query?: Mutable<QueryOf<'listSessionEvents'>>, opts?: CallOpts$16): Promise<SessionEventsPage>;
36394
36555
  /** `POST /v1/sessions/{id}/events` — executor only (needs the live lease). */
36395
- append(sessionId: string, body: SessionEventsAppendRequest, opts?: CallOpts$15): Promise<SessionEventsAppendResponse>;
36556
+ append(sessionId: string, body: SessionEventsAppendRequest, opts?: CallOpts$16): Promise<SessionEventsAppendResponse>;
36396
36557
  }
36397
36558
  export declare class SessionControls {
36398
36559
  private readonly http;
@@ -36401,25 +36562,25 @@ export declare class SessionControls {
36401
36562
  list(sessionId: string, query?: {
36402
36563
  applied?: boolean;
36403
36564
  target?: 'me' | string;
36404
- }, opts?: CallOpts$15): Promise<SessionControl[]>;
36565
+ }, opts?: CallOpts$16): Promise<SessionControl[]>;
36405
36566
  /** `POST /v1/sessions/{id}/control` — send a control to the executor (editor+). */
36406
- submit(sessionId: string, body: SessionControlRequest, opts?: CallOpts$15): Promise<SessionControlAccepted>;
36567
+ submit(sessionId: string, body: SessionControlRequest, opts?: CallOpts$16): Promise<SessionControlAccepted>;
36407
36568
  /** `POST /v1/sessions/{id}/control/{cid}/applied` — executor only. */
36408
- markApplied(sessionId: string, controlId: string, opts?: CallOpts$15): Promise<Reply<'markSessionControlApplied'>>;
36569
+ markApplied(sessionId: string, controlId: string, opts?: CallOpts$16): Promise<Reply<'markSessionControlApplied'>>;
36409
36570
  }
36410
36571
  export declare class SessionShares {
36411
36572
  private readonly http;
36412
36573
  constructor(http: HttpClient);
36413
36574
  /** `GET /v1/sessions/{id}/shares` — owner only. */
36414
- list(sessionId: string, opts?: CallOpts$15): Promise<SessionShare[]>;
36575
+ list(sessionId: string, opts?: CallOpts$16): Promise<SessionShare[]>;
36415
36576
  /** `POST /v1/sessions/{id}/shares` — `token` is returned once for link shares. */
36416
- create(sessionId: string, body: SessionShareCreateRequest, opts?: CallOpts$15): Promise<SessionShareCreated>;
36577
+ create(sessionId: string, body: SessionShareCreateRequest, opts?: CallOpts$16): Promise<SessionShareCreated>;
36417
36578
  /** `DELETE /v1/sessions/{id}/shares/{shareId}` */
36418
- delete(sessionId: string, shareId: string, opts?: CallOpts$15): Promise<Reply<'deleteSessionShare'>>;
36579
+ delete(sessionId: string, shareId: string, opts?: CallOpts$16): Promise<Reply<'deleteSessionShare'>>;
36419
36580
  /** `GET /v1/sessions/shared-with-me` */
36420
36581
  sharedWithMe(query?: {
36421
36582
  archived?: boolean;
36422
- }, opts?: CallOpts$15): Promise<SharedSession[]>;
36583
+ }, opts?: CallOpts$16): Promise<SharedSession[]>;
36423
36584
  }
36424
36585
  export declare class Sessions {
36425
36586
  private readonly http;
@@ -36429,27 +36590,27 @@ export declare class Sessions {
36429
36590
  readonly shares: SessionShares;
36430
36591
  constructor(http: HttpClient);
36431
36592
  /** `POST /v1/sessions` — idempotent on `session_key` (200 existing / 201 created). */
36432
- create(body?: SessionCreateRequest, opts?: CallOpts$15): Promise<Session & {
36593
+ create(body?: SessionCreateRequest, opts?: CallOpts$16): Promise<Session & {
36433
36594
  created: boolean;
36434
36595
  }>;
36435
36596
  /** `GET /v1/sessions?limit=&archived=` — own sessions first, then shared. */
36436
36597
  list(query?: {
36437
36598
  limit?: number;
36438
36599
  archived?: boolean;
36439
- }, opts?: CallOpts$15): Promise<SessionListItem[]>;
36600
+ }, opts?: CallOpts$16): Promise<SessionListItem[]>;
36440
36601
  /** `GET /v1/sessions/{id}` — detail with members, lease and presence. */
36441
36602
  get(sessionId: string, query?: {
36442
36603
  share?: string;
36443
- }, opts?: CallOpts$15): Promise<SessionDetail>;
36604
+ }, opts?: CallOpts$16): Promise<SessionDetail>;
36444
36605
  /** `PATCH /v1/sessions/{id}` — rename / archive (owner). */
36445
- update(sessionId: string, body: SessionPatchRequest, opts?: CallOpts$15): Promise<Session>;
36606
+ update(sessionId: string, body: SessionPatchRequest, opts?: CallOpts$16): Promise<Session>;
36446
36607
  /** `DELETE /v1/sessions/{id}` — irreversible (owner). */
36447
- delete(sessionId: string, opts?: CallOpts$15): Promise<Reply<'deleteSession'>>;
36608
+ delete(sessionId: string, opts?: CallOpts$16): Promise<Reply<'deleteSession'>>;
36448
36609
  /**
36449
36610
  * `POST /v1/sessions/{id}/dispatch` — queue a `send` for one device and wake it over FCM.
36450
36611
  * `{ mode: 'open' }` hands the session off instead: the target just opens it (no user turn).
36451
36612
  */
36452
- dispatch(sessionId: string, body: SessionDispatchRequest, opts?: CallOpts$15): Promise<SessionDispatchResponse>;
36613
+ dispatch(sessionId: string, body: SessionDispatchRequest, opts?: CallOpts$16): Promise<SessionDispatchResponse>;
36453
36614
  /**
36454
36615
  * `GET /v1/sessions/{id}/stream?after=` — live SSE of `event` / `control` /
36455
36616
  * `lease` / `presence` frames. `: ping` heartbeats are skipped. The server
@@ -36458,7 +36619,7 @@ export declare class Sessions {
36458
36619
  stream(sessionId: string, query?: {
36459
36620
  after?: number;
36460
36621
  share?: string;
36461
- }, opts?: CallOpts$15): AsyncGenerator<SessionStreamEvent, void, undefined>;
36622
+ }, opts?: CallOpts$16): AsyncGenerator<SessionStreamEvent, void, undefined>;
36462
36623
  }
36463
36624
  //#endregion
36464
36625
  //#region src/resources/settings.d.ts
@@ -36470,11 +36631,11 @@ export type SettingsConflict = Schema<'SettingsConflict'>;
36470
36631
  export type SettingsPatch = {
36471
36632
  transcripts?: { -readonly [K in keyof TranscriptsSettings]?: TranscriptsSettings[K]; };
36472
36633
  };
36473
- type CallOpts$14 = {
36634
+ type CallOpts$15 = {
36474
36635
  ext?: CodaiRequestExtensions;
36475
36636
  signal?: AbortSignal;
36476
36637
  };
36477
- type UpdateOpts = CallOpts$14 & {
36638
+ type UpdateOpts = CallOpts$15 & {
36478
36639
  version?: number;
36479
36640
  };
36480
36641
  /** The `current` state of a 409 `version_conflict` thrown by `settings.update`, else null. */
@@ -36483,7 +36644,7 @@ export declare class Settings {
36483
36644
  private readonly http;
36484
36645
  constructor(http: HttpClient);
36485
36646
  /** `GET /v1/settings` — full settings with defaults; `version` 0 / `updatedAt` null until the first write. */
36486
- get(opts?: CallOpts$14): Promise<SettingsResponse>;
36647
+ get(opts?: CallOpts$15): Promise<SettingsResponse>;
36487
36648
  /**
36488
36649
  * `PATCH /v1/settings` — deep-merge `partial` into the stored settings. With `opts.version` the write is
36489
36650
  * conditional (409 `version_conflict` on a mismatch). Unknown keys / invalid values throw a 400 `CodaiError`.
@@ -36491,6 +36652,28 @@ export declare class Settings {
36491
36652
  update(partial: SettingsPatch, opts?: UpdateOpts): Promise<SettingsResponse>;
36492
36653
  }
36493
36654
  //#endregion
36655
+ //#region src/resources/os-gate.d.ts
36656
+ export type PolicyResponse = Reply<'getPolicy'>;
36657
+ export type OsGateEvent = Schema<'OsGateEvent'>;
36658
+ export type OsGateCheckId = OsGateEvent['checks'][number];
36659
+ export type OsGateSurface = OsGateEvent['surface'];
36660
+ export type OsGateEventAccepted = Schema<'OsGateEventAccepted'>;
36661
+ type CallOpts$14 = {
36662
+ ext?: CodaiRequestExtensions;
36663
+ signal?: AbortSignal;
36664
+ };
36665
+ export declare class OsGate {
36666
+ private readonly http;
36667
+ constructor(http: HttpClient);
36668
+ /** `GET /v1/policy` — `{ os_gate: { allow_override } }` folded over every org of the caller (strictest wins). */
36669
+ policy(opts?: CallOpts$14): Promise<PolicyResponse>;
36670
+ /**
36671
+ * `POST /v1/os-gate/events` — record that the user granted or revoked an override of `checks` on `surface`.
36672
+ * The body is strict: unknown keys, unknown check ids or an empty `checks` list throw a 400 `CodaiError`.
36673
+ */
36674
+ recordEvent(event: OsGateEvent, opts?: CallOpts$14): Promise<OsGateEventAccepted>;
36675
+ }
36676
+ //#endregion
36494
36677
  //#region src/resources/sfx.d.ts
36495
36678
  /** One sound (always `license: 'CC0-1.0'`). */
36496
36679
  export type SfxDto = Schema<'SfxDto'>;
@@ -37010,9 +37193,12 @@ export declare class Sandboxes {
37010
37193
  readonly files: SandboxFiles;
37011
37194
  constructor(http: HttpClient);
37012
37195
  /**
37013
- * `POST /v1/sandboxes` — start a sandbox (`ttl_seconds` 60–86400, default 3600; `egress` none by default).
37014
- * `backend: 'v2'` (closed canary) starts a long-lived pod with memory snapshots and accepts `template`
37015
- * `codai-base` | `brivio-acte` | `desktop`; its reply may carry `restored`.
37196
+ * `POST /v1/sandboxes` — start a sandbox (`ttl_seconds` default 3600, max 86400 on v1 / 604800 on v2;
37197
+ * `egress` none by default, or a `pypi`/`npm` preset / allowlist on both backends).
37198
+ * `backend` defaults to `'v2'`: a long-lived pod with memory snapshots, Node 24 + npm, `template`
37199
+ * `codai-base` | `brivio-acte` | `desktop`; its reply may carry `restored`. When `backend` is omitted and v2
37200
+ * is unavailable for the key the gateway falls back to `'v1'` (check `backend` on the reply).
37201
+ * Errors: 429 `sandbox_concurrency_limit` (3 per key, 5 running v2 per user), 503 `sandbox_capacity` (retry).
37016
37202
  */
37017
37203
  create(input?: SandboxCreateInput, opts?: CallOpts$6): Promise<Sandbox>;
37018
37204
  /** `GET /v1/sandboxes` — your sandboxes, newest first, optionally one `status`. */
@@ -37033,7 +37219,7 @@ export declare class Sandboxes {
37033
37219
  execStream(id: string, input: SandboxExecInput, opts?: IdemOpts): AsyncGenerator<SandboxExecEvent, void, undefined>;
37034
37220
  /** `GET /v1/sandboxes/{id}/artifacts` — collect `/workspace/out` (scanned, signed 1 h links). */
37035
37221
  artifacts(id: string, opts?: CallOpts$6): Promise<SandboxArtifactList>;
37036
- /** `POST /v1/sandboxes/{id}/snapshot` — store a compressed copy of the workspace. */
37222
+ /** `POST /v1/sandboxes/{id}/snapshot` (v1 only; v2 answers 409 `not_supported_on_v2`) — store a compressed copy of the workspace. */
37037
37223
  snapshot(id: string, input?: SandboxSnapshotInput, opts?: CallOpts$6): Promise<SandboxSnapshot>;
37038
37224
  /**
37039
37225
  * `POST /v1/sandboxes/{id}/run_code` (v2) — run Python in the persistent kernel; globals survive between
@@ -37042,7 +37228,10 @@ export declare class Sandboxes {
37042
37228
  runCode(id: string, input: SandboxRunCodeInput, opts?: CallOpts$6): Promise<SandboxRunCodeResult>;
37043
37229
  /** `POST /v1/sandboxes/{id}/kernel/reset` (v2) — restart the kernel; globals are lost, files kept. */
37044
37230
  resetKernel(id: string, opts?: CallOpts$6): Promise<void>;
37045
- /** `POST /v1/sandboxes/{id}/pause` (v2) — memory snapshot, then stop the pod (status `paused`). */
37231
+ /**
37232
+ * `POST /v1/sandboxes/{id}/pause` (v2) — memory snapshot, then stop the pod (status `paused`).
37233
+ * At most 10 paused v2 sandboxes per user (429 `sandbox_paused_limit`).
37234
+ */
37046
37235
  pause(id: string, opts?: CallOpts$6): Promise<Sandbox>;
37047
37236
  /** `POST /v1/sandboxes/{id}/resume` (v2) — restore a paused sandbox; `restored: false` = cold start. */
37048
37237
  resume(id: string, opts?: CallOpts$6): Promise<SandboxResumed>;
@@ -37820,13 +38009,15 @@ export declare class Codai {
37820
38009
  readonly orgs: Orgs;
37821
38010
  readonly projects: Projects;
37822
38011
  readonly environments: Environments;
37823
- /** Agent sandboxes (beta) — isolated gVisor workspaces: `sandboxes.create/exec/execStream/files/artifacts/run`. */
38012
+ /** Agent sandboxes (backend v2 by default) — isolated gVisor workspaces: `sandboxes.create/exec/execStream/files/artifacts/run`. */
37824
38013
  readonly sandboxes: Sandboxes;
37825
38014
  /** EXPERIMENTAL (HIDE, unaudited): verify signed agent outputs. Provenance only. */
37826
38015
  readonly verify: Verify;
37827
38016
  readonly account: Account;
37828
38017
  /** Account-level settings shared by every device (`settings.get()`, `settings.update(partial, { version })`). */
37829
38018
  readonly settings: Settings;
38019
+ /** OS protection gate: `osGate.policy()` (org override policy) and `osGate.recordEvent(event)` (audit). */
38020
+ readonly osGate: OsGate;
37830
38021
  /** READ-ONLY billing: plan, wallet, invoices, `watchBalance` (pay via the returned links, never via the SDK). */
37831
38022
  readonly billing: Billing;
37832
38023
  /** Referral stats and invitees; `redeem(code)` / `setConsent(bool)` go through `PATCH /v1/account`. */