@deepraxis/sdk 0.1.1-dev.aa54c47 → 0.1.1-dev.aed5777

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.
@@ -513,6 +513,30 @@ export const computersFilesContent = (options) => (options.client ?? client).get
513
513
  url: '/agent/v1/computers/{computer_id}/files/content',
514
514
  ...options
515
515
  });
516
+ /**
517
+ * Convert a Computer Document to PDF
518
+ *
519
+ * Convert an Office document (docx, doc, ppt, pptx, rtf, odt; up to 16 MiB) to PDF inside a platform-owned ephemeral document sandbox, whatever machine family the computer itself runs on. Returns base64 PDF bytes.
520
+ *
521
+ * Praxis extension: the preview conversion endpoint. The browser never parses an untrusted document — LibreOffice runs only inside an ephemeral document-family sandbox and the converter instance is killed after use. The file stays tenant-owned; non-convertible types answer EXTENSION_NOT_CONVERTIBLE and a failed conversion answers CONVERSION_FAILED.
522
+ */
523
+ export const computersFilesConvert = (options) => (options.client ?? client).post({
524
+ security: [{
525
+ key: 'BearerAuth',
526
+ scheme: 'bearer',
527
+ type: 'http'
528
+ }, {
529
+ key: 'ApiKeyAuth',
530
+ name: 'X-API-Key',
531
+ type: 'apiKey'
532
+ }],
533
+ url: '/agent/v1/computers/{computer_id}/files/convert',
534
+ ...options,
535
+ headers: {
536
+ 'Content-Type': 'application/json',
537
+ ...options.headers
538
+ }
539
+ });
516
540
  /**
517
541
  * Connect computer
518
542
  *
@@ -879,6 +903,24 @@ export const browserListEvents = (options) => (options.client ?? client).get({
879
903
  url: '/browser/v1/sessions/{sessionId}/events',
880
904
  ...options
881
905
  });
906
+ /**
907
+ * 执行页面动作
908
+ *
909
+ * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。
910
+ */
911
+ export const browserRunPageAction = (options) => (options.client ?? client).post({
912
+ security: [{
913
+ key: 'BrowserBearer',
914
+ scheme: 'bearer',
915
+ type: 'http'
916
+ }],
917
+ url: '/browser/v1/sessions/{sessionId}/actions',
918
+ ...options,
919
+ headers: {
920
+ 'Content-Type': 'application/json',
921
+ ...options.headers
922
+ }
923
+ });
882
924
  /**
883
925
  * 请求人工接管
884
926
  *
@@ -932,7 +974,7 @@ export const browserViewerHeartbeat = (options) => (options.client ?? client).po
932
974
  /**
933
975
  * 列出浏览器上下文
934
976
  *
935
- * 分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。
977
+ * 分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。传 name 时只返回该名称的登录态;名称在当前账户内唯一,所以最多一条。
936
978
  */
937
979
  export const browserListContexts = (options) => (options?.client ?? client).get({
938
980
  security: [{
@@ -6385,138 +6427,157 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6385
6427
  *
6386
6428
  * Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`
6387
6429
  *
6388
- * ### Script function reference
6389
- *
6390
- * Functions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.
6391
- *
6392
- * ```ts
6393
- * GetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;
6394
- * GetItem(id: ClipId): ItemView;
6395
- * FindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];
6396
- * GetMedia(ref: MediaRef): MediaInfo;
6397
- * GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
6398
- * GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
6399
- * ListTransitions(): TransitionInfo[];
6400
- * ListEffects(): EffectInfo[];
6401
- * ListTextStyles(): TextStylePreset[];
6402
- * ListTextTemplates(): TextTemplate[];
6403
- * ListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];
6404
- * ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
6405
- * Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
6406
- * Update(id: ClipId, patch: ItemPatchView): void;
6407
- * SetSpeed(id: ClipId, rate: number | { curve: { at: number; rate: number; ease?: Ease }[]; audio?: "mute" | "resample" }, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
6408
- * Delete(id: ClipId, o?: { ripple?: boolean }): void;
6409
- * Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
6410
- * UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
6411
- * DeleteJoin(id: JoinId): void;
6412
- * Split(id: ClipId, at: number): ClipId;
6413
- * Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
6414
- * Move(id: ClipId, start: number, track?: TrackId): void;
6415
- * RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
6416
- * AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string; role?: "voice" | "music" | "sfx" }, index?: number): TrackId;
6417
- * UpdateTrack(id: TrackId, patch: TrackPatch): void;
6418
- * DeleteTrack(id: TrackId): void;
6419
- * SetSettings(patch: Partial<ProjectSettingsView>): void;
6420
- * AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle> & { preset?: string }; maxChars?: number }): ClipId[];
6421
- * InsertTemplate(track: TrackId, o: { template: string; start: number; slots?: Record<string, string> }): ClipId[];
6422
- * AlignCaptions(trackId: TrackId, script: string, options?: { resplit?: boolean; maxChars?: number }): { replaced: number; added: number; deleted: number };
6423
- * ImportCaptions(trackId: TrackId, text: string, o?: { format?: "srt" | "vtt"; offset?: number }): ClipId[];
6424
- * ExportCaptions(trackId: TrackId, o: { format: "srt" | "vtt" }): string;
6425
- * SetMarker(at: number, label: string): string;
6426
- * Print(...values: unknown[]): void;
6427
- * Preview(at: number[]): void;
6428
- * ```
6429
- *
6430
- * | Functions | Behavior and arguments |
6431
- * | --- | --- |
6432
- * | GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text, effects, blend and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |
6433
- * | ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |
6434
- * | ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |
6435
- * | ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |
6436
- * | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
6437
- * | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
6438
- * | GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |
6439
- * | Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |
6440
- * | SetSpeed | Change video/audio rate in 0.25–4; keep is required. A `{curve: [{at, rate, ease?}, ...], audio?: "mute" | "resample"}` rate is forward-only and holds output duration fixed; pitch preservation is unavailable. Scalar rates: source preserves consumed source and changes length; duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |
6441
- * | Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |
6442
- * | Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |
6443
- * | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
6444
- * | AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb, audio role (`voice`, `music`, `sfx`) and style as appropriate to track kind. |
6445
- * | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
6446
- * | AddCaptionsFromTranscript | Create captions from an audio/video clip's kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |
6447
- * | ImportCaptions, ExportCaptions | Import SRT or WebVTT text onto a caption track and export it back. format is inferred from a WEBVTT header when omitted. offset shifts imported cues in seconds. Import rejects more than 100000 bytes, more than 5000 cues, malformed or overlapping file cues with INVALID_CAPTION_FILE; overlap with existing timeline clips uses the normal OVERLAP rejection. Export sorts by timeline start and writes millisecond timecodes. |
6448
- * | SetMarker | Add a label at a timeline time and return its ID. |
6449
- * | Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result's frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |
6450
- *
6451
- * #### Joins between clips
6452
- *
6453
- * Endpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint's length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection's code and message, shorten or remove conflicting joins, and retry the saved edit.
6454
- *
6455
- * TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
6456
- *
6457
- * Minimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.
6458
- *
6459
- * #### Insert fields (ItemInit)
6460
- *
6461
- * Every item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.
6462
- *
6463
- * | type | Required fields beyond type/start | Optional fields |
6464
- * | --- | --- | --- |
6465
- * | video | media | length, sourceIn, playback, volumeDb, transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6466
- * | image | media, length | transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6467
- * | text | text, length | style, transform, blend, reveal, animate, animation, effects, mask, transitionIn, transitionOut |
6468
- * | color | color, length | transform, fill, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6469
- * | shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, mask, transitionIn, transitionOut |
6470
- * | audio | media | length, sourceIn, playback, volumeDb, gain, fadeIn, fadeOut, duck |
6471
- * | caption | text, length | — |
6472
- *
6473
- * Visual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
6474
- *
6475
- * | Field | Value |
6476
- * | --- | --- |
6477
- * | transform | Partial `{x, y, scale, rotation, opacity, crop, blur}`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is `{top,right,bottom,left}`. blur is 0–100 pixels at 1080-pixel frame height. |
6478
- * | style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |
6479
- * | animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of `{at: number, value: number, ease?: Ease}` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |
6480
- * | animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |
6481
- * | Ease | linear, in, out, inOut, `{bezier: [x1,y1,x2,y2]}` or `{spring: {stiffness, damping, mass?}}`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |
6482
- * | reveal | `{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |
6483
- * | fill | A color string (#RRGGBB or #RRGGBBAA), `{linear: {angle, stops: [{at,color}, ...]}}` or `{radial: {stops: [{at,color}, ...]}}`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |
6484
- * | shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |
6485
- * | transitionIn, transitionOut | `{kind, length: number}` at the clip's beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |
6486
- *
6487
- * #### Visual effects
6488
- *
6489
- * `effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Entries include blur, color adjustment, vignette, film grain, chromatic aberration, pixelate, glitch, shake, flash, light leak and built-in `lut` looks; user `.cube` LUTs are not supported. `speed` is cycles per second. Effects run on CPU during export and increase render time. Parameters are discovered with ListEffects(). Catalog entries expose their own parameters through ListEffects(), including `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.
6490
- *
6491
- * Numeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter's catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.
6492
- *
6493
- * `blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.
6430
+ * <!-- cut-reference:start -->
6431
+ * ### Script function, field and error reference
6494
6432
  *
6495
- * #### Update fields (ItemPatchView)
6433
+ * Every script function, clip field and error code has its own section, read one at a time:
6496
6434
  *
6497
- * All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, duck, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend, mask, gain. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.
6498
- *
6499
- * #### Animation presets
6500
- *
6501
- * Discover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.
6502
- *
6503
- * Presets replace the clip's existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.
6504
- *
6505
- * Errors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.
6506
- *
6507
- * #### Speed, reverse and freeze
6508
- *
6509
- * Video/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.
6510
- *
6511
- * Update of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.
6512
- *
6513
- * Example for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.
6514
- *
6515
- * #### Script names versus HTTP response names
6516
- *
6517
- * Use camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.
6435
+ * ```
6436
+ * codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
6437
+ * codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
6438
+ * codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
6439
+ * codemode.describe("praxis.cut.script") // names, one page at a time
6440
+ * ```
6518
6441
  *
6519
- * Unrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection's #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.
6442
+ * Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
6443
+ *
6444
+ * #### Script functions (script)
6445
+ *
6446
+ * - `GetTimeline` — Duration, tracks, joins; clips are under `items`.
6447
+ * - `GetItem` — One clip's compact view, by id.
6448
+ * - `FindItems` — Visit every clip with its track; collect results.
6449
+ * - `GetMedia` — Media metadata; `duration` is seconds.
6450
+ * - `GetTranscript` — Transcript words in source microseconds.
6451
+ * - `GetAnalysis` — Silence, filler, scene or beat segments.
6452
+ * - `ListTransitions` — Join transition kinds and parameters.
6453
+ * - `ListEffects` — Visual-effect catalog and parameters.
6454
+ * - `ListAnimations` — Animation presets by phase and target.
6455
+ * - `ListFonts` — Font families, weights and scripts.
6456
+ * - `ListTextStyles` — Text style presets for `style.preset`.
6457
+ * - `ListTextTemplates` — Multi-layer templates and their slots.
6458
+ * - `Insert` — Add a clip; a track never overlaps itself.
6459
+ * - `Append` — Add a clip at the end of a track.
6460
+ * - `Update` — Change named fields; the rest stay.
6461
+ * - `SetSpeed` — Change rate, keeping source or duration.
6462
+ * - `Delete` — Remove a clip. There is no `Remove`.
6463
+ * - `Join` — Overlap clips; followers shift, track shortens.
6464
+ * - `UpdateJoin` — Change a join's length or effect.
6465
+ * - `DeleteJoin` — Remove a join; restore the butt cut.
6466
+ * - `Split` — Cut a clip in two at a time.
6467
+ * - `Trim` — Move one clip edge by seconds.
6468
+ * - `Move` — Set a clip's start or track.
6469
+ * - `RippleDeleteRange` — Cut a time range and close the gap.
6470
+ * - `AddTrack` — Add a video, audio or caption track.
6471
+ * - `UpdateTrack` — Change a track's name, lock, gain or role.
6472
+ * - `DeleteTrack` — Remove a track and its clips.
6473
+ * - `SetSettings` — Change canvas, frame rate or background.
6474
+ * - `AddCaptionsFromTranscript` — Captions from a clip's kept words.
6475
+ * - `InsertTemplate` — Insert a template and fill its slots.
6476
+ * - `AlignCaptions` — Rebuild captions from text punctuation.
6477
+ * - `ImportCaptions` — Import SRT or WebVTT onto captions.
6478
+ * - `ExportCaptions` — Export captions as SRT or WebVTT.
6479
+ * - `SetMarker` — Label a timeline position.
6480
+ * - `Print` — Append values to the result's `prints`.
6481
+ * - `Preview` — Up to 8 frames as inline PNG data URLs.
6482
+ *
6483
+ * #### Fields (fields)
6484
+ *
6485
+ * - `type` — Clip kind; decides which fields apply.
6486
+ * - `start` — Clip start in seconds; snaps to frames.
6487
+ * - `length` — Duration; video and audio may omit it or write "auto".
6488
+ * - `media` — Source `{ libraryId, assetId }`.
6489
+ * - `sourceIn` — First source second kept; default 0.
6490
+ * - `sourceOut` — Exclusive source end; read-only.
6491
+ * - `text` — Text of a text or caption clip.
6492
+ * - `color` — Solid colour of a color clip.
6493
+ * - `shape` — Shape clip kind: `rect` or `ellipse`.
6494
+ * - `width` — Shape width, a fraction of canvas width.
6495
+ * - `height` — Shape height, a fraction of canvas height.
6496
+ * - `radius` — Rect corner rounding, in 1080-height px.
6497
+ * - `fill` — Shape or text paint: colour or gradient.
6498
+ * - `stroke` — Shape outline: colour and width.
6499
+ * - `transform` — Position, scale, rotation, opacity, crop, blur.
6500
+ * - `fit` — contain, cover, fill or none.
6501
+ * - `blend` — Layer blend mode; null clears.
6502
+ * - `style` — Text styling: font, fill, strokes, glow, position.
6503
+ * - `style.position` — top, middle or bottom; omit it, never null.
6504
+ * - `playback` — Rate, direction, audio policy, or freeze.
6505
+ * - `volumeDb` — Audio level in dB; 0 is source level.
6506
+ * - `gain` — Keyframed audio level in dB.
6507
+ * - `fadeIn` — Fade-in seconds at the clip's start.
6508
+ * - `fadeOut` — Fade-out seconds at the clip's end.
6509
+ * - `duck` — Lower this clip while another track plays.
6510
+ * - `animate` — Transform keyframes; `at` is clip-relative seconds.
6511
+ * - `reveal` — Per-character, word or line reveal timing.
6512
+ * - `animation` — Preset slots `{ in, out, loop }`; null clears.
6513
+ * - `effects` — Effect stack, at most 8; null clears.
6514
+ * - `transitionIn` — Entrance effect: kind plus seconds.
6515
+ * - `transitionOut` — Exit effect: kind plus seconds.
6516
+ * - `mask` — Shape, path or track matte.
6517
+ * - `words` — Caption words with clip-local times.
6518
+ *
6519
+ * #### Error codes (errors)
6520
+ *
6521
+ * - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
6522
+ * - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
6523
+ * - `INVALID_STYLE` — A style value is out of range.
6524
+ * - `INVALID_MASK` — A mask definition is malformed.
6525
+ * - `MASK_IN_USE` — The edit would break a live mask.
6526
+ * - `TOO_MANY_MASKS` — At most 16 masks per project.
6527
+ * - `RATE_OUT_OF_RANGE` — A rate is outside 0.25-4.
6528
+ * - `UNSUPPORTED_PLAYBACK` — Reverse without an explicit mute.
6529
+ * - `INVALID_PLAYBACK` — A playback object is partial or malformed.
6530
+ * - `UNKNOWN_FONT` — The family is not in `ListFonts()`.
6531
+ * - `UNKNOWN_FIELD` — The field name is not accepted here.
6532
+ * - `UNKNOWN_TEXT_STYLE` — `style.preset` is not in the catalog.
6533
+ * - `TEXT_STYLE_TARGET_MISMATCH` — Preset on the wrong clip type.
6534
+ * - `CAPTION_ALIGN_LOW_CONFIDENCE` — Alignment confidence too low; nothing changed.
6535
+ * - `OVERLAP` — Two clips on one track would share time.
6536
+ * - `OUT_OF_SOURCE` — The clip would read past its source.
6537
+ * - `LOCKED_TRACK` — The edit targets a locked track.
6538
+ * - `UNBOUND_LIBRARY` — The library is not bound to the project.
6539
+ * - `TRACK_KIND_MISMATCH` — The clip type does not fit the track.
6540
+ * - `NOT_FOUND` — The named id is not in this project.
6541
+ * - `TOO_SHORT` — The result would be under one frame.
6542
+ * - `INVALID_DUCK` — Bad `duck` level or a missing track.
6543
+ * - `UNKNOWN_ANIMATION` — The preset is not in `ListAnimations()`.
6544
+ * - `INVALID_ANIMATION_PARAM` — Bad slot, parameter or keyframe limit.
6545
+ * - `ANIMATION_TOO_LONG` — In plus out exceed the clip length.
6546
+ * - `ANIMATION_TARGET_MISMATCH` — The preset does not match the clip type.
6547
+ * - `ANIMATION_PHASE_MISMATCH` — The preset is in the wrong slot.
6548
+ * - `UNKNOWN_EFFECT` — The effect is not in `ListEffects()`.
6549
+ * - `INVALID_EFFECT_PARAM` — Bad effect parameter or keyframe.
6550
+ * - `TOO_MANY_EFFECTS` — More than 8 effects on one clip.
6551
+ * - `PROJECT_NOT_FOUND` — No visible project has this id.
6552
+ * - `EXPORT_NOT_FOUND` — No such export in this project.
6553
+ * - `DRAFT_RENDER_NOT_FOUND` — No such draft render.
6554
+ * - `VERSION_NOT_FOUND` — No saved version has this revision.
6555
+ * - `LIBRARY_NOT_FOUND` — The library is missing or invisible.
6556
+ * - `BINDING_INVALID` — The binding request is malformed.
6557
+ * - `BINDING_IN_USE` — Clips still use this library's assets.
6558
+ * - `NOTHING_TO_UNDO` — No earlier revision to return to.
6559
+ * - `NOTHING_TO_REDO` — No undone revision is waiting.
6560
+ * - `UNDO_CONFLICT` — The revision to undo is no longer head.
6561
+ * - `REVISION_CONFLICT` — The project moved; your revision is stale.
6562
+ * - `CUT_BUSY` — The project is busy; retry.
6563
+ * - `INVALID_CAPTION_FILE` — The subtitle file is malformed or too big.
6564
+ * - `SCRIPT_ERROR` — The script threw or did not parse.
6565
+ * - `SCRIPT_LIMIT` — An execute budget was exceeded.
6566
+ * - `OPS_REJECTED` — An op failed; the whole edit rolled back.
6567
+ * - `EDIT_EXPIRED` — The saved edit id is over ten minutes old.
6568
+ * - `MEDIA_NOT_FOUND` — The asset id is not in that library.
6569
+ * - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
6570
+ * - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
6571
+ * - `MEDIA_IMPORT_FAILED` — Importing media failed.
6572
+ * - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
6573
+ * - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
6574
+ * - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
6575
+ * - `EXPORT_FAILED` — The render failed; read `error.cause`.
6576
+ * - `INVALID_PARAMS` — The request is malformed.
6577
+ * - `PERMISSION_DENIED` — This credential may not do that here.
6578
+ * - `NOT_IMPLEMENTED` — Not available on this platform yet.
6579
+ * - `INTERNAL` — Unexpected failure; retry with the request id.
6580
+ * <!-- cut-reference:end -->
6520
6581
  *
6521
6582
  */
6522
6583
  export const cutExecute = (options) => (options.client ?? client).post({
@@ -6591,9 +6652,9 @@ export const cutListFrames = (options) => (options.client ?? client).get({
6591
6652
  ...options
6592
6653
  });
6593
6654
  /**
6594
- * Analyze project media
6655
+ * Analyze project media or measure the project mix
6595
6656
  *
6596
- * Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed.
6657
+ * Request silence, filler-word, scene or beat analysis for selected bound assets before editing, or measure the mix the timeline itself renders with kind mix. That kind is a render job, not a read: it answers pending with retry_after_sec and an id. Poll by calling this same method again with body { kinds: ["mix"], id } (there is no separate retrieve method); that call reads the measurement and renders nothing. The answer only exists once the audio has been rendered and measured. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed. kind mix is separate: it reports the project mix loudness, the loudness of each role and where music masks speech, so an editor can fix the mix rather than guess at it.
6597
6658
  */
6598
6659
  export const cutCreateAnalysis = (options) => (options.client ?? client).post({
6599
6660
  security: [{
@@ -6732,6 +6793,46 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
6732
6793
  ...options.headers
6733
6794
  }
6734
6795
  });
6796
+ /**
6797
+ * Create draft range render
6798
+ *
6799
+ * Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration (an end up to 0.05 s past it, a rounded duration, is read as the end), and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.
6800
+ */
6801
+ export const cutCreateRender = (options) => (options.client ?? client).post({
6802
+ security: [{
6803
+ key: 'BearerAuth',
6804
+ scheme: 'bearer',
6805
+ type: 'http'
6806
+ }, {
6807
+ key: 'ApiKeyAuth',
6808
+ name: 'X-API-Key',
6809
+ type: 'apiKey'
6810
+ }],
6811
+ url: '/cut/v1/projects/{project_id}/renders',
6812
+ ...options,
6813
+ headers: {
6814
+ 'Content-Type': 'application/json',
6815
+ ...options.headers
6816
+ }
6817
+ });
6818
+ /**
6819
+ * Retrieve draft range render
6820
+ *
6821
+ * Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.
6822
+ */
6823
+ export const cutRetrieveRender = (options) => (options.client ?? client).get({
6824
+ security: [{
6825
+ key: 'BearerAuth',
6826
+ scheme: 'bearer',
6827
+ type: 'http'
6828
+ }, {
6829
+ key: 'ApiKeyAuth',
6830
+ name: 'X-API-Key',
6831
+ type: 'apiKey'
6832
+ }],
6833
+ url: '/cut/v1/renders/{render_id}',
6834
+ ...options
6835
+ });
6735
6836
  /**
6736
6837
  * Retrieve video export
6737
6838
  *
@@ -7155,95 +7256,101 @@ export const databaseInsert = (options) => (options.client ?? client).post({
7155
7256
  }
7156
7257
  });
7157
7258
  /**
7158
- * List knowledge bases
7259
+ * Read a commit's test catalog
7159
7260
  *
7160
- * Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
7261
+ * Read the catalog version discovered at one commit — how many suites and cases it holds, which frameworks they come from, and how the commit changed them. Call this first: it tells you which suites, cases and sizes exist before you list them or select them into a plan, and the reported diff explains why a case count moved. A commit whose discovery has not finished answers CATALOG_NOT_READY, which means "not yet", not "no tests"; wait and read again. Omit commit to read the newest catalog published for the project.
7161
7262
  */
7162
- export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
7263
+ export const devopsTestCatalogGet = (options) => (options.client ?? client).get({
7163
7264
  security: [{
7164
- key: 'knowledge-bearerAuth',
7265
+ key: 'devops-bearerAuth',
7165
7266
  scheme: 'bearer',
7166
7267
  type: 'http'
7167
7268
  }],
7168
- url: '/knowledge/v1/vector_stores',
7269
+ url: '/devops/v1/projects/{project}/test-catalog',
7169
7270
  ...options
7170
7271
  });
7171
7272
  /**
7172
- * Create knowledge base
7273
+ * List test suites
7173
7274
  *
7174
- * Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
7275
+ * List the suites the project's newest catalog discovered — one suite per test file and framework pair, with its size, purposes and question count. Use it to find the suite id a case belongs to, or to see which files make up an area before selecting cases from them. Suites come from the catalog, so a file added in code appears only after its commit's catalog is published. Archived suites are returned too; they carry archived true and no case is ever silently dropped from the list.
7175
7276
  */
7176
- export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
7277
+ export const devopsTestSuitesList = (options) => (options.client ?? client).get({
7177
7278
  security: [{
7178
- key: 'knowledge-bearerAuth',
7279
+ key: 'devops-bearerAuth',
7179
7280
  scheme: 'bearer',
7180
7281
  type: 'http'
7181
7282
  }],
7182
- url: '/knowledge/v1/vector_stores',
7183
- ...options,
7184
- headers: {
7185
- 'Content-Type': 'application/json',
7186
- ...options.headers
7187
- }
7283
+ url: '/devops/v1/projects/{project}/test-suites',
7284
+ ...options
7188
7285
  });
7189
7286
  /**
7190
- * Delete knowledge base
7287
+ * Retrieve a test suite
7191
7288
  *
7192
- * Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
7289
+ * Read one suite by the id a suite list returned, to learn its file, framework, size, purposes and how many cases it holds. Use it when a case's suite id needs a name for display, or to confirm which commit's catalog a suite came from. The id is opaque; it comes from the list, never from the file path.
7193
7290
  */
7194
- export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
7291
+ export const devopsTestSuitesGet = (options) => (options.client ?? client).get({
7195
7292
  security: [{
7196
- key: 'knowledge-bearerAuth',
7293
+ key: 'devops-bearerAuth',
7197
7294
  scheme: 'bearer',
7198
7295
  type: 'http'
7199
7296
  }],
7200
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
7297
+ url: '/devops/v1/test-suites/{id}',
7201
7298
  ...options
7202
7299
  });
7203
7300
  /**
7204
- * Retrieve knowledge base
7301
+ * List test cases
7205
7302
  *
7206
- * Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
7303
+ * List a project's cases with their health, state and recent statistics, so you can decide which ones a plan must run and which are quarantined. This is the read a test dashboard is built on; filter it to narrow by state or health instead of paging through everything. A case's id is a fingerprint of its own title and path, so it survives a rename — read aliases when reconciling history recorded under an older title.
7207
7304
  */
7208
- export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
7305
+ export const devopsTestCasesList = (options) => (options.client ?? client).get({
7209
7306
  security: [{
7210
- key: 'knowledge-bearerAuth',
7307
+ key: 'devops-bearerAuth',
7211
7308
  scheme: 'bearer',
7212
7309
  type: 'http'
7213
7310
  }],
7214
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
7311
+ url: '/devops/v1/projects/{project}/test-cases',
7215
7312
  ...options
7216
7313
  });
7217
7314
  /**
7218
- * Update knowledge base
7315
+ * Retrieve a test case
7219
7316
  *
7220
- * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
7317
+ * Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.
7221
7318
  */
7222
- export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
7319
+ export const devopsTestCasesGet = (options) => (options.client ?? client).get({
7223
7320
  security: [{
7224
- key: 'knowledge-bearerAuth',
7321
+ key: 'devops-bearerAuth',
7225
7322
  scheme: 'bearer',
7226
7323
  type: 'http'
7227
7324
  }],
7228
- url: '/knowledge/v1/vector_stores/{vector_store_id}',
7229
- ...options,
7230
- headers: {
7231
- 'Content-Type': 'application/json',
7232
- ...options.headers
7233
- }
7325
+ url: '/devops/v1/test-cases/{id}',
7326
+ ...options
7234
7327
  });
7235
7328
  /**
7236
- * Search knowledge base
7329
+ * List test plans
7237
7330
  *
7238
- * Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
7331
+ * List the project's plans — what each one selects, which stage and gate it belongs to, and when it runs next. Read this before creating a plan, so a new plan extends what exists instead of duplicating a selector an existing plan already covers.
7239
7332
  */
7240
- export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
7333
+ export const devopsTestPlansList = (options) => (options.client ?? client).get({
7241
7334
  security: [{
7242
- key: 'knowledge-bearerAuth',
7335
+ key: 'devops-bearerAuth',
7243
7336
  scheme: 'bearer',
7244
7337
  type: 'http'
7245
7338
  }],
7246
- url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
7339
+ url: '/devops/v1/projects/{project}/test-plans',
7340
+ ...options
7341
+ });
7342
+ /**
7343
+ * Create a test plan
7344
+ *
7345
+ * Create a plan that decides which cases a stage must run. The plan's key is unique inside the project and is what a later run names; the selector chooses cases by size, purpose, tag, package or explicit ids, and the trigger says when the plan fires by itself. A merge or promotion gate must name the environment it guards, and a plan with a gate but no environment is refused with PLAN_GATE_ENVIRONMENT_MISMATCH rather than created and silently ignored. A plan has no revision history: update it with a patch.
7346
+ */
7347
+ export const devopsTestPlansCreate = (options) => (options.client ?? client).post({
7348
+ security: [{
7349
+ key: 'devops-bearerAuth',
7350
+ scheme: 'bearer',
7351
+ type: 'http'
7352
+ }],
7353
+ url: '/devops/v1/projects/{project}/test-plans',
7247
7354
  ...options,
7248
7355
  headers: {
7249
7356
  'Content-Type': 'application/json',
@@ -7251,31 +7358,45 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
7251
7358
  }
7252
7359
  });
7253
7360
  /**
7254
- * List files
7361
+ * Delete a test plan
7255
7362
  *
7256
- * Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
7363
+ * Delete a plan so it schedules nothing further. The plan stops firing immediately; runs it already produced keep their own record and are not deleted with it. To stop a plan temporarily and keep it for later, pause it instead — deleting cannot be undone and the plan's key becomes free for another plan to take.
7257
7364
  */
7258
- export const knowledgeListFiles = (options) => (options.client ?? client).get({
7365
+ export const devopsTestPlansDelete = (options) => (options.client ?? client).delete({
7259
7366
  security: [{
7260
- key: 'knowledge-bearerAuth',
7367
+ key: 'devops-bearerAuth',
7261
7368
  scheme: 'bearer',
7262
7369
  type: 'http'
7263
7370
  }],
7264
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7371
+ url: '/devops/v1/test-plans/{id}',
7265
7372
  ...options
7266
7373
  });
7267
7374
  /**
7268
- * Add file
7375
+ * Retrieve a test plan
7269
7376
  *
7270
- * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
7377
+ * Read one plan by the id a plan list returned, to see its selector, gate, repeat count, timeout and pause state before updating or deleting it. A paused plan carries the reason, the actor and the time it resumes, so a pause you did not set is explained here rather than guessed at.
7271
7378
  */
7272
- export const knowledgeAttachFile = (options) => (options.client ?? client).post({
7379
+ export const devopsTestPlansGet = (options) => (options.client ?? client).get({
7273
7380
  security: [{
7274
- key: 'knowledge-bearerAuth',
7381
+ key: 'devops-bearerAuth',
7275
7382
  scheme: 'bearer',
7276
7383
  type: 'http'
7277
7384
  }],
7278
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7385
+ url: '/devops/v1/test-plans/{id}',
7386
+ ...options
7387
+ });
7388
+ /**
7389
+ * Update a test plan
7390
+ *
7391
+ * Change a plan's title, trigger, selector, gate, repeat count, timeout or enabled flag. Only the fields present in the body are changed, so a body naming one field leaves the rest exactly as they were. Changing a selector does not create a version — the plan is not a published artefact, and runs already started keep the selection they were created with. Read the plan first to know what you are leaving unchanged.
7392
+ */
7393
+ export const devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
7394
+ security: [{
7395
+ key: 'devops-bearerAuth',
7396
+ scheme: 'bearer',
7397
+ type: 'http'
7398
+ }],
7399
+ url: '/devops/v1/test-plans/{id}',
7279
7400
  ...options,
7280
7401
  headers: {
7281
7402
  'Content-Type': 'application/json',
@@ -7283,45 +7404,63 @@ export const knowledgeAttachFile = (options) => (options.client ?? client).post(
7283
7404
  }
7284
7405
  });
7285
7406
  /**
7286
- * Remove file
7407
+ * Pause a test plan
7287
7408
  *
7288
- * Removes the file from search immediately; does not delete the original File.
7409
+ * Stop a plan from starting new runs while keeping it and its history. A reason is required and is recorded on the plan, so the next reader learns why it stopped. Give until to resume automatically at a time; omit it to stay paused until someone resumes it. Runs already in flight are not cancelled — cancel those individually.
7289
7410
  */
7290
- export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
7411
+ export const devopsTestPlansPause = (options) => (options.client ?? client).post({
7291
7412
  security: [{
7292
- key: 'knowledge-bearerAuth',
7413
+ key: 'devops-bearerAuth',
7293
7414
  scheme: 'bearer',
7294
7415
  type: 'http'
7295
7416
  }],
7296
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7417
+ url: '/devops/v1/test-plans/{id}:pause',
7418
+ ...options,
7419
+ headers: {
7420
+ 'Content-Type': 'application/json',
7421
+ ...options.headers
7422
+ }
7423
+ });
7424
+ /**
7425
+ * Resume a test plan
7426
+ *
7427
+ * Clear a plan's pause so it schedules runs again. Resuming an active plan changes nothing and is safe to repeat. The plan keeps its selector, gate and key; only the pause is removed.
7428
+ */
7429
+ export const devopsTestPlansResume = (options) => (options.client ?? client).post({
7430
+ security: [{
7431
+ key: 'devops-bearerAuth',
7432
+ scheme: 'bearer',
7433
+ type: 'http'
7434
+ }],
7435
+ url: '/devops/v1/test-plans/{id}:resume',
7297
7436
  ...options
7298
7437
  });
7299
7438
  /**
7300
- * Retrieve file
7439
+ * List test runs
7301
7440
  *
7302
- * Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
7441
+ * List the project's runs newest first, with each run's state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit's tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.
7303
7442
  */
7304
- export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
7443
+ export const devopsTestRunsList = (options) => (options.client ?? client).get({
7305
7444
  security: [{
7306
- key: 'knowledge-bearerAuth',
7445
+ key: 'devops-bearerAuth',
7307
7446
  scheme: 'bearer',
7308
7447
  type: 'http'
7309
7448
  }],
7310
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7449
+ url: '/devops/v1/projects/{project}/test-runs',
7311
7450
  ...options
7312
7451
  });
7313
7452
  /**
7314
- * Update file attributes
7453
+ * Create a test run
7315
7454
  *
7316
- * Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
7455
+ * Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued, the default, returns as soon as the run exists; started waits until the run has begun, except for an external run, which is answered at once because it leaves queued only when your own CI uploads; finished waits for a verdict. The wait is bounded at about 25 seconds, and a wait that reaches that bound returns the run as it stands rather than failing — read state to see whether it finished. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.
7317
7456
  */
7318
- export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
7457
+ export const devopsTestRunsCreate = (options) => (options.client ?? client).post({
7319
7458
  security: [{
7320
- key: 'knowledge-bearerAuth',
7459
+ key: 'devops-bearerAuth',
7321
7460
  scheme: 'bearer',
7322
7461
  type: 'http'
7323
7462
  }],
7324
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7463
+ url: '/devops/v1/projects/{project}/test-runs',
7325
7464
  ...options,
7326
7465
  headers: {
7327
7466
  'Content-Type': 'application/json',
@@ -7329,31 +7468,31 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
7329
7468
  }
7330
7469
  });
7331
7470
  /**
7332
- * Read extracted content
7471
+ * Retrieve a test run
7333
7472
  *
7334
- * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
7473
+ * Read one run's current state, result and counts, and ask for its failed executions inline with expand. Poll this after creating a run whose result was pending. A result is monotonic once it reaches a verdict — a failed run never becomes passed by a later report, so read the run rather than the last report to know where it ended.
7335
7474
  */
7336
- export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
7475
+ export const devopsTestRunsGet = (options) => (options.client ?? client).get({
7337
7476
  security: [{
7338
- key: 'knowledge-bearerAuth',
7477
+ key: 'devops-bearerAuth',
7339
7478
  scheme: 'bearer',
7340
7479
  type: 'http'
7341
7480
  }],
7342
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
7481
+ url: '/devops/v1/test-runs/{id}',
7343
7482
  ...options
7344
7483
  });
7345
7484
  /**
7346
- * Create file batch
7485
+ * Cancel a test run
7347
7486
  *
7348
- * Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
7487
+ * Stop a run that is still going. A reason is required and is recorded on the run, because a cancelled run is read later as evidence about why a commit was not verified. Cancelling a run that already reached a verdict is refused with RUN_ALREADY_FINISHED: its result is final and cancelling it would erase the verdict. Executions already recorded stay readable.
7349
7488
  */
7350
- export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
7489
+ export const devopsTestRunsCancel = (options) => (options.client ?? client).post({
7351
7490
  security: [{
7352
- key: 'knowledge-bearerAuth',
7491
+ key: 'devops-bearerAuth',
7353
7492
  scheme: 'bearer',
7354
7493
  type: 'http'
7355
7494
  }],
7356
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
7495
+ url: '/devops/v1/test-runs/{id}:cancel',
7357
7496
  ...options,
7358
7497
  headers: {
7359
7498
  'Content-Type': 'application/json',
@@ -7361,95 +7500,347 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
7361
7500
  }
7362
7501
  });
7363
7502
  /**
7364
- * Retrieve file batch
7503
+ * List a run's executions
7365
7504
  *
7366
- * Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
7505
+ * List the executions recorded against one run — one entry per case the run selected, with its status, duration, attempts and evidence. Use it to find the case that failed, or to compare a repeat run against the previous one case by case. Reads happen while the run is still going, so a case may still be pending; filter by status to watch only the failures.
7367
7506
  */
7368
- export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
7507
+ export const devopsTestExecutionsList = (options) => (options.client ?? client).get({
7369
7508
  security: [{
7370
- key: 'knowledge-bearerAuth',
7509
+ key: 'devops-bearerAuth',
7371
7510
  scheme: 'bearer',
7372
7511
  type: 'http'
7373
7512
  }],
7374
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
7513
+ url: '/devops/v1/test-runs/{run}/executions',
7375
7514
  ...options
7376
7515
  });
7377
7516
  /**
7378
- * Cancel file batch
7517
+ * Retrieve one case's execution in a run
7379
7518
  *
7380
- * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
7519
+ * Read one case's execution inside one run, including every attempt with its own duration and message. Use it after a run reports a failure to see whether the case failed once and passed on retry — that is what flaky true means — and to reach the evidence files a triage needs. Both ids come from the run and case reads; an execution that does not exist for that pair is NOT_FOUND rather than an empty answer.
7381
7520
  */
7382
- export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
7521
+ export const devopsTestExecutionsGet = (options) => (options.client ?? client).get({
7383
7522
  security: [{
7384
- key: 'knowledge-bearerAuth',
7523
+ key: 'devops-bearerAuth',
7385
7524
  scheme: 'bearer',
7386
7525
  type: 'http'
7387
7526
  }],
7388
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
7527
+ url: '/devops/v1/test-runs/{run}/executions/{case}',
7389
7528
  ...options
7390
7529
  });
7391
7530
  /**
7392
- * List batch files
7531
+ * Upload an external test report
7393
7532
  *
7394
- * Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
7533
+ * Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable.
7395
7534
  */
7396
- export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
7535
+ export const devopsTestReportsUpload = (options) => (options.client ?? client).post({
7397
7536
  security: [{
7398
- key: 'knowledge-bearerAuth',
7537
+ key: 'devops-bearerAuth',
7399
7538
  scheme: 'bearer',
7400
7539
  type: 'http'
7401
7540
  }],
7402
- url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
7403
- ...options
7541
+ url: '/devops/v1/projects/{project}/test-reports',
7542
+ ...options,
7543
+ headers: {
7544
+ 'Content-Type': 'application/json',
7545
+ ...options.headers
7546
+ }
7404
7547
  });
7405
7548
  /**
7406
- * Restore knowledge base
7549
+ * List knowledge bases
7407
7550
  *
7408
- * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
7551
+ * Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
7409
7552
  */
7410
- export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
7553
+ export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
7411
7554
  security: [{
7412
7555
  key: 'knowledge-bearerAuth',
7413
7556
  scheme: 'bearer',
7414
7557
  type: 'http'
7415
7558
  }],
7416
- url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
7559
+ url: '/knowledge/v1/vector_stores',
7417
7560
  ...options
7418
7561
  });
7419
7562
  /**
7420
- * Permanently purge knowledge base
7563
+ * Create knowledge base
7421
7564
  *
7422
- * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
7565
+ * Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
7423
7566
  */
7424
- export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
7567
+ export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
7425
7568
  security: [{
7426
7569
  key: 'knowledge-bearerAuth',
7427
7570
  scheme: 'bearer',
7428
7571
  type: 'http'
7429
7572
  }],
7430
- url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
7431
- ...options
7573
+ url: '/knowledge/v1/vector_stores',
7574
+ ...options,
7575
+ headers: {
7576
+ 'Content-Type': 'application/json',
7577
+ ...options.headers
7578
+ }
7432
7579
  });
7433
7580
  /**
7434
- * Retry failed file
7581
+ * Delete knowledge base
7435
7582
  *
7436
- * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
7583
+ * Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
7437
7584
  */
7438
- export const knowledgeRetryFile = (options) => (options.client ?? client).post({
7585
+ export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
7439
7586
  security: [{
7440
7587
  key: 'knowledge-bearerAuth',
7441
7588
  scheme: 'bearer',
7442
7589
  type: 'http'
7443
7590
  }],
7444
- url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
7591
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7445
7592
  ...options
7446
7593
  });
7447
7594
  /**
7448
- * List file segments
7595
+ * Retrieve knowledge base
7449
7596
  *
7450
- * Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.
7597
+ * Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
7451
7598
  */
7452
- export const knowledgeListSegments = (options) => (options.client ?? client).get({
7599
+ export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
7600
+ security: [{
7601
+ key: 'knowledge-bearerAuth',
7602
+ scheme: 'bearer',
7603
+ type: 'http'
7604
+ }],
7605
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7606
+ ...options
7607
+ });
7608
+ /**
7609
+ * Update knowledge base
7610
+ *
7611
+ * Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
7612
+ */
7613
+ export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
7614
+ security: [{
7615
+ key: 'knowledge-bearerAuth',
7616
+ scheme: 'bearer',
7617
+ type: 'http'
7618
+ }],
7619
+ url: '/knowledge/v1/vector_stores/{vector_store_id}',
7620
+ ...options,
7621
+ headers: {
7622
+ 'Content-Type': 'application/json',
7623
+ ...options.headers
7624
+ }
7625
+ });
7626
+ /**
7627
+ * Search knowledge base
7628
+ *
7629
+ * Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
7630
+ */
7631
+ export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
7632
+ security: [{
7633
+ key: 'knowledge-bearerAuth',
7634
+ scheme: 'bearer',
7635
+ type: 'http'
7636
+ }],
7637
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
7638
+ ...options,
7639
+ headers: {
7640
+ 'Content-Type': 'application/json',
7641
+ ...options.headers
7642
+ }
7643
+ });
7644
+ /**
7645
+ * List files
7646
+ *
7647
+ * Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
7648
+ */
7649
+ export const knowledgeListFiles = (options) => (options.client ?? client).get({
7650
+ security: [{
7651
+ key: 'knowledge-bearerAuth',
7652
+ scheme: 'bearer',
7653
+ type: 'http'
7654
+ }],
7655
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7656
+ ...options
7657
+ });
7658
+ /**
7659
+ * Add file
7660
+ *
7661
+ * Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
7662
+ */
7663
+ export const knowledgeAttachFile = (options) => (options.client ?? client).post({
7664
+ security: [{
7665
+ key: 'knowledge-bearerAuth',
7666
+ scheme: 'bearer',
7667
+ type: 'http'
7668
+ }],
7669
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
7670
+ ...options,
7671
+ headers: {
7672
+ 'Content-Type': 'application/json',
7673
+ ...options.headers
7674
+ }
7675
+ });
7676
+ /**
7677
+ * Remove file
7678
+ *
7679
+ * Removes the file from search immediately; does not delete the original File.
7680
+ */
7681
+ export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
7682
+ security: [{
7683
+ key: 'knowledge-bearerAuth',
7684
+ scheme: 'bearer',
7685
+ type: 'http'
7686
+ }],
7687
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7688
+ ...options
7689
+ });
7690
+ /**
7691
+ * Retrieve file
7692
+ *
7693
+ * Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
7694
+ */
7695
+ export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
7696
+ security: [{
7697
+ key: 'knowledge-bearerAuth',
7698
+ scheme: 'bearer',
7699
+ type: 'http'
7700
+ }],
7701
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7702
+ ...options
7703
+ });
7704
+ /**
7705
+ * Update file attributes
7706
+ *
7707
+ * Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
7708
+ */
7709
+ export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
7710
+ security: [{
7711
+ key: 'knowledge-bearerAuth',
7712
+ scheme: 'bearer',
7713
+ type: 'http'
7714
+ }],
7715
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
7716
+ ...options,
7717
+ headers: {
7718
+ 'Content-Type': 'application/json',
7719
+ ...options.headers
7720
+ }
7721
+ });
7722
+ /**
7723
+ * Read extracted content
7724
+ *
7725
+ * Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
7726
+ */
7727
+ export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
7728
+ security: [{
7729
+ key: 'knowledge-bearerAuth',
7730
+ scheme: 'bearer',
7731
+ type: 'http'
7732
+ }],
7733
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
7734
+ ...options
7735
+ });
7736
+ /**
7737
+ * Create file batch
7738
+ *
7739
+ * Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
7740
+ */
7741
+ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
7742
+ security: [{
7743
+ key: 'knowledge-bearerAuth',
7744
+ scheme: 'bearer',
7745
+ type: 'http'
7746
+ }],
7747
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
7748
+ ...options,
7749
+ headers: {
7750
+ 'Content-Type': 'application/json',
7751
+ ...options.headers
7752
+ }
7753
+ });
7754
+ /**
7755
+ * Retrieve file batch
7756
+ *
7757
+ * Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
7758
+ */
7759
+ export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
7760
+ security: [{
7761
+ key: 'knowledge-bearerAuth',
7762
+ scheme: 'bearer',
7763
+ type: 'http'
7764
+ }],
7765
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
7766
+ ...options
7767
+ });
7768
+ /**
7769
+ * Cancel file batch
7770
+ *
7771
+ * Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
7772
+ */
7773
+ export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
7774
+ security: [{
7775
+ key: 'knowledge-bearerAuth',
7776
+ scheme: 'bearer',
7777
+ type: 'http'
7778
+ }],
7779
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
7780
+ ...options
7781
+ });
7782
+ /**
7783
+ * List batch files
7784
+ *
7785
+ * Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
7786
+ */
7787
+ export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
7788
+ security: [{
7789
+ key: 'knowledge-bearerAuth',
7790
+ scheme: 'bearer',
7791
+ type: 'http'
7792
+ }],
7793
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
7794
+ ...options
7795
+ });
7796
+ /**
7797
+ * Restore knowledge base
7798
+ *
7799
+ * Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
7800
+ */
7801
+ export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
7802
+ security: [{
7803
+ key: 'knowledge-bearerAuth',
7804
+ scheme: 'bearer',
7805
+ type: 'http'
7806
+ }],
7807
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
7808
+ ...options
7809
+ });
7810
+ /**
7811
+ * Permanently purge knowledge base
7812
+ *
7813
+ * Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
7814
+ */
7815
+ export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
7816
+ security: [{
7817
+ key: 'knowledge-bearerAuth',
7818
+ scheme: 'bearer',
7819
+ type: 'http'
7820
+ }],
7821
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
7822
+ ...options
7823
+ });
7824
+ /**
7825
+ * Retry failed file
7826
+ *
7827
+ * Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
7828
+ */
7829
+ export const knowledgeRetryFile = (options) => (options.client ?? client).post({
7830
+ security: [{
7831
+ key: 'knowledge-bearerAuth',
7832
+ scheme: 'bearer',
7833
+ type: 'http'
7834
+ }],
7835
+ url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
7836
+ ...options
7837
+ });
7838
+ /**
7839
+ * List file segments
7840
+ *
7841
+ * Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.
7842
+ */
7843
+ export const knowledgeListSegments = (options) => (options.client ?? client).get({
7453
7844
  security: [{
7454
7845
  key: 'knowledge-bearerAuth',
7455
7846
  scheme: 'bearer',
@@ -9337,6 +9728,1008 @@ export const searchMap = (options) => (options.client ?? client).post({
9337
9728
  ...options.headers
9338
9729
  }
9339
9730
  });
9731
+ /**
9732
+ * List the genres Studio can write
9733
+ *
9734
+ * List the genre catalog so you can choose how a piece is structured before creating a draft. Each genre names its unit kinds, draft properties, deterministic checks and writing rules, and by default only the genres open today are returned. Read the chosen genre in full with studioGenresGet before the first write, because its kinds and limits decide what that draft accepts.
9735
+ */
9736
+ export const studioGenresList = (options) => (options?.client ?? client).get({
9737
+ security: [{
9738
+ key: 'BearerAuth',
9739
+ scheme: 'bearer',
9740
+ type: 'http'
9741
+ }, {
9742
+ key: 'ApiKeyAuth',
9743
+ name: 'X-API-Key',
9744
+ type: 'apiKey'
9745
+ }],
9746
+ url: '/studio/v1/genres',
9747
+ ...options
9748
+ });
9749
+ /**
9750
+ * Read one genre with its built-in templates
9751
+ *
9752
+ * Read the full rules of one genre: its unit kinds and what each may contain, the draft properties with their limits, the deterministic checks the software runs, the semantic review list, and the built-in templates that can seed a draft. Ask for this before creating a draft of that genre, and again when a write is refused for an unknown kind, a property limit or a block type the genre does not allow.
9753
+ */
9754
+ export const studioGenresGet = (options) => (options.client ?? client).get({
9755
+ security: [{
9756
+ key: 'BearerAuth',
9757
+ scheme: 'bearer',
9758
+ type: 'http'
9759
+ }, {
9760
+ key: 'ApiKeyAuth',
9761
+ name: 'X-API-Key',
9762
+ type: 'apiKey'
9763
+ }],
9764
+ url: '/studio/v1/genres/{genre}',
9765
+ ...options
9766
+ });
9767
+ /**
9768
+ * List the platforms a work can be produced for
9769
+ *
9770
+ * List rendition targets with the format each needs, whether it receives a finished piece through an API, a draft box or an export, and the hard limits a piece must respect. Pass a genre to see only the platforms that genre produces by default. Read one platform in full before rendering, because its limits decide whether the rendition validates.
9771
+ */
9772
+ export const studioPlatformsList = (options) => (options?.client ?? client).get({
9773
+ security: [{
9774
+ key: 'BearerAuth',
9775
+ scheme: 'bearer',
9776
+ type: 'http'
9777
+ }, {
9778
+ key: 'ApiKeyAuth',
9779
+ name: 'X-API-Key',
9780
+ type: 'apiKey'
9781
+ }],
9782
+ url: '/studio/v1/platforms',
9783
+ ...options
9784
+ });
9785
+ /**
9786
+ * Read the rules of one platform
9787
+ *
9788
+ * Read one platform in full: the format it consumes, how it receives a finished piece, the preview fidelity the Console can offer, the limits on title, body, image count and aspect, and whether a connected channel is required. Read this before creating a rendition, and again when validation reports that the piece breaks a platform limit.
9789
+ */
9790
+ export const studioPlatformsGet = (options) => (options.client ?? client).get({
9791
+ security: [{
9792
+ key: 'BearerAuth',
9793
+ scheme: 'bearer',
9794
+ type: 'http'
9795
+ }, {
9796
+ key: 'ApiKeyAuth',
9797
+ name: 'X-API-Key',
9798
+ type: 'apiKey'
9799
+ }],
9800
+ url: '/studio/v1/platforms/{platform}',
9801
+ ...options
9802
+ });
9803
+ /**
9804
+ * List the works of this organization
9805
+ *
9806
+ * List works owned by the API key organization so you can find the one being discussed, with its drafts and how long ago each moved. Archived works are left out unless you ask for them. Continue with next_page_token until the answer stops carrying one; the summaries carry no unit bodies, so read a work before writing in it.
9807
+ */
9808
+ export const studioWorksList = (options) => (options?.client ?? client).get({
9809
+ security: [{
9810
+ key: 'BearerAuth',
9811
+ scheme: 'bearer',
9812
+ type: 'http'
9813
+ }, {
9814
+ key: 'ApiKeyAuth',
9815
+ name: 'X-API-Key',
9816
+ type: 'apiKey'
9817
+ }],
9818
+ url: '/studio/v1/works',
9819
+ ...options
9820
+ });
9821
+ /**
9822
+ * Create a work with its goal
9823
+ *
9824
+ * Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves — the reader, what that reader should get or do, the one-sentence message and the constraints — and the original brief the person gave in their own words. A slug is derived from the title unless you pass one. The work starts with no drafts; create the first one with the drafts create call, because the genre decides the structure.
9825
+ */
9826
+ export const studioWorksCreate = (options) => (options.client ?? client).post({
9827
+ security: [{
9828
+ key: 'BearerAuth',
9829
+ scheme: 'bearer',
9830
+ type: 'http'
9831
+ }, {
9832
+ key: 'ApiKeyAuth',
9833
+ name: 'X-API-Key',
9834
+ type: 'apiKey'
9835
+ }],
9836
+ url: '/studio/v1/works',
9837
+ ...options,
9838
+ headers: {
9839
+ 'Content-Type': 'application/json',
9840
+ ...options.headers
9841
+ }
9842
+ });
9843
+ /**
9844
+ * Resolve a loose reference to a work, draft or unit
9845
+ *
9846
+ * Turn a loose reference into the address the other calls take: a slug, a work title, a draft key or a unit number, as a person or another tool would say it. A hit answers the work slug and, when the reference pointed deeper, the draft key and unit number; a miss answers an empty resolved value with up to three near matches instead of failing. Use it when a person names something instead of an id.
9847
+ */
9848
+ export const studioWorksResolve = (options) => (options.client ?? client).get({
9849
+ security: [{
9850
+ key: 'BearerAuth',
9851
+ scheme: 'bearer',
9852
+ type: 'http'
9853
+ }, {
9854
+ key: 'ApiKeyAuth',
9855
+ name: 'X-API-Key',
9856
+ type: 'apiKey'
9857
+ }],
9858
+ url: '/studio/v1/works:resolve',
9859
+ ...options
9860
+ });
9861
+ /**
9862
+ * Read a work, optionally with one draft and unit
9863
+ *
9864
+ * Read a work and, in the same answer, whatever part of it the page needs: pass draft to get that draft with its todos, its unit outline and its properties, and unit to get one unit with its blocks and Markdown body. This is the call that opens an editing session, because it answers the goal, the brief, the current revisions and the unit to write in one round trip.
9865
+ */
9866
+ export const studioWorksGet = (options) => (options.client ?? client).get({
9867
+ security: [{
9868
+ key: 'BearerAuth',
9869
+ scheme: 'bearer',
9870
+ type: 'http'
9871
+ }, {
9872
+ key: 'ApiKeyAuth',
9873
+ name: 'X-API-Key',
9874
+ type: 'apiKey'
9875
+ }],
9876
+ url: '/studio/v1/works/{work}',
9877
+ ...options
9878
+ });
9879
+ /**
9880
+ * Change the title, goal or attached libraries
9881
+ *
9882
+ * Change work-level settings: the title, the slug, the goal, the attached reference libraries, the style or the archived flag. Send update_mask naming exactly the fields you change; a field left out keeps its value. Pass expected_revision to have the write refused when someone else changed the work first, and note that changing the message makes every draft derived from it stale.
9883
+ */
9884
+ export const studioWorksUpdate = (options) => (options.client ?? client).patch({
9885
+ security: [{
9886
+ key: 'BearerAuth',
9887
+ scheme: 'bearer',
9888
+ type: 'http'
9889
+ }, {
9890
+ key: 'ApiKeyAuth',
9891
+ name: 'X-API-Key',
9892
+ type: 'apiKey'
9893
+ }],
9894
+ url: '/studio/v1/works/{work}',
9895
+ ...options,
9896
+ headers: {
9897
+ 'Content-Type': 'application/json',
9898
+ ...options.headers
9899
+ }
9900
+ });
9901
+ /**
9902
+ * Add to or correct the original brief
9903
+ *
9904
+ * Extend the original brief: append text, attach files, add points taken from an outline, edit one point, or drop a point. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose. The brief carries its own revision, separate from the work and from each draft.
9905
+ */
9906
+ export const studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
9907
+ security: [{
9908
+ key: 'BearerAuth',
9909
+ scheme: 'bearer',
9910
+ type: 'http'
9911
+ }, {
9912
+ key: 'ApiKeyAuth',
9913
+ name: 'X-API-Key',
9914
+ type: 'apiKey'
9915
+ }],
9916
+ url: '/studio/v1/works/{work}/brief',
9917
+ ...options,
9918
+ headers: {
9919
+ 'Content-Type': 'application/json',
9920
+ ...options.headers
9921
+ }
9922
+ });
9923
+ /**
9924
+ * List the drafts a work carries
9925
+ *
9926
+ * List every draft of one work, each with its genre, its size and whether it is out of date against what it was derived from. Use it to choose the draft a later call works in: the key beside each draft is what the draft path segment takes. This list is not paged, because a work carries a handful of drafts rather than thousands.
9927
+ */
9928
+ export const studioDraftsList = (options) => (options.client ?? client).get({
9929
+ security: [{
9930
+ key: 'BearerAuth',
9931
+ scheme: 'bearer',
9932
+ type: 'http'
9933
+ }, {
9934
+ key: 'ApiKeyAuth',
9935
+ name: 'X-API-Key',
9936
+ type: 'apiKey'
9937
+ }],
9938
+ url: '/studio/v1/works/{work}/drafts',
9939
+ ...options
9940
+ });
9941
+ /**
9942
+ * Create a draft of a genre inside a work
9943
+ *
9944
+ * Create a draft: one way of delivering the work, written in one genre. The genre decides the unit kinds, the properties and the checks, so read it first with the genre call and pass its key. A template may seed the unit tree, an outline may be given instead, and derived_from records that this draft is built from the goal message or from another draft of the work. The work may hold several drafts, one per platform or per length.
9945
+ */
9946
+ export const studioDraftsCreate = (options) => (options.client ?? client).post({
9947
+ security: [{
9948
+ key: 'BearerAuth',
9949
+ scheme: 'bearer',
9950
+ type: 'http'
9951
+ }, {
9952
+ key: 'ApiKeyAuth',
9953
+ name: 'X-API-Key',
9954
+ type: 'apiKey'
9955
+ }],
9956
+ url: '/studio/v1/works/{work}/drafts',
9957
+ ...options,
9958
+ headers: {
9959
+ 'Content-Type': 'application/json',
9960
+ ...options.headers
9961
+ }
9962
+ });
9963
+ /**
9964
+ * Read one draft with optional units and todos
9965
+ *
9966
+ * Read one draft: its genre, its properties, its revisions, whether it is stale, and optionally its unit tree and its todo list. Pass expand to add the parts you need in this one call instead of reading them separately. Read this before writing to the draft, because the revision it returns is the precondition the next write has to carry.
9967
+ */
9968
+ export const studioDraftsGet = (options) => (options.client ?? client).get({
9969
+ security: [{
9970
+ key: 'BearerAuth',
9971
+ scheme: 'bearer',
9972
+ type: 'http'
9973
+ }, {
9974
+ key: 'ApiKeyAuth',
9975
+ name: 'X-API-Key',
9976
+ type: 'apiKey'
9977
+ }],
9978
+ url: '/studio/v1/works/{work}/drafts/{draft}',
9979
+ ...options
9980
+ });
9981
+ /**
9982
+ * Change a draft title, key, properties or style
9983
+ *
9984
+ * Change the draft itself rather than its units: its page title, its in-work key, its generic properties, the style that overrides the work style, or its mode. Send update_mask naming exactly the fields you change. Changing the key keeps the previous one resolving, so old links and old references still work; a key another draft of the work already uses answers DRAFT_KEY_TAKEN.
9985
+ */
9986
+ export const studioDraftsUpdate = (options) => (options.client ?? client).patch({
9987
+ security: [{
9988
+ key: 'BearerAuth',
9989
+ scheme: 'bearer',
9990
+ type: 'http'
9991
+ }, {
9992
+ key: 'ApiKeyAuth',
9993
+ name: 'X-API-Key',
9994
+ type: 'apiKey'
9995
+ }],
9996
+ url: '/studio/v1/works/{work}/drafts/{draft}',
9997
+ ...options,
9998
+ headers: {
9999
+ 'Content-Type': 'application/json',
10000
+ ...options.headers
10001
+ }
10002
+ });
10003
+ /**
10004
+ * Read the whole unit outline as Markdown
10005
+ *
10006
+ * Read the draft structure as one Markdown page: one line per unit carrying its number, structure name, intent, status, length and revision, followed by the unit list itself. Use it to plan a sequence of writes without reading every unit, since it carries no body text. Read one unit in full with the unit call once you know which one to write.
10007
+ */
10008
+ export const studioDraftsOutline = (options) => (options.client ?? client).get({
10009
+ security: [{
10010
+ key: 'BearerAuth',
10011
+ scheme: 'bearer',
10012
+ type: 'http'
10013
+ }, {
10014
+ key: 'ApiKeyAuth',
10015
+ name: 'X-API-Key',
10016
+ type: 'apiKey'
10017
+ }],
10018
+ url: '/studio/v1/works/{work}/drafts/{draft}/outline',
10019
+ ...options
10020
+ });
10021
+ /**
10022
+ * Read the computed todo list of a draft
10023
+ *
10024
+ * Read what is outstanding in one draft, computed from the data rather than from a plan: a unit without an intent, a body behind its intent, an unclaimed brief point, a failed check, a stale rendition. Each item names the layer it belongs to and suggests the call that resolves it. Follow the list instead of inventing an order, and re-read it after a batch of writes.
10025
+ */
10026
+ export const studioDraftsStatus = (options) => (options.client ?? client).get({
10027
+ security: [{
10028
+ key: 'BearerAuth',
10029
+ scheme: 'bearer',
10030
+ type: 'http'
10031
+ }, {
10032
+ key: 'ApiKeyAuth',
10033
+ name: 'X-API-Key',
10034
+ type: 'apiKey'
10035
+ }],
10036
+ url: '/studio/v1/works/{work}/drafts/{draft}/status',
10037
+ ...options
10038
+ });
10039
+ /**
10040
+ * Read a review pass over the whole draft
10041
+ *
10042
+ * Read everything a reviewer needs in one answer: the deterministic check results, the semantic review list the genre asks a reader to judge, the brief coverage showing which unit claims each requirement point, and the body text. When the draft is long the body is a synopsis with an excerpt around each unit and next_page_token carries the full text. This is the call an agent makes before writing review comments.
10043
+ */
10044
+ export const studioDraftsReview = (options) => (options.client ?? client).get({
10045
+ security: [{
10046
+ key: 'BearerAuth',
10047
+ scheme: 'bearer',
10048
+ type: 'http'
10049
+ }, {
10050
+ key: 'ApiKeyAuth',
10051
+ name: 'X-API-Key',
10052
+ type: 'apiKey'
10053
+ }],
10054
+ url: '/studio/v1/works/{work}/drafts/{draft}/review',
10055
+ ...options
10056
+ });
10057
+ /**
10058
+ * Confirm a draft already follows its source
10059
+ *
10060
+ * Clear the stale flag after checking that the draft still matches what it was derived from: the recorded source revision moves to the source current revision without touching any unit. Call it after the source moved and you have brought this draft up to date, not to make the flag disappear while the text is still behind. It answers the same shape as a draft write, and the draft revision does not move.
10061
+ */
10062
+ export const studioDraftsRebase = (options) => (options.client ?? client).post({
10063
+ security: [{
10064
+ key: 'BearerAuth',
10065
+ scheme: 'bearer',
10066
+ type: 'http'
10067
+ }, {
10068
+ key: 'ApiKeyAuth',
10069
+ name: 'X-API-Key',
10070
+ type: 'apiKey'
10071
+ }],
10072
+ url: '/studio/v1/works/{work}/drafts/{draft}:rebase',
10073
+ ...options,
10074
+ headers: {
10075
+ 'Content-Type': 'application/json',
10076
+ ...options.headers
10077
+ }
10078
+ });
10079
+ /**
10080
+ * Export the draft as Markdown or plain text
10081
+ *
10082
+ * Read the whole draft as one document in Markdown or plain text, returned synchronously in the answer. This is the quick path for a person who wants the text now; a file in a platform format, a card image or a docx comes from creating a rendition instead. Ask for text rather than markdown when the reader should not see block anchors or heading syntax.
10083
+ */
10084
+ export const studioDraftsExport = (options) => (options.client ?? client).get({
10085
+ security: [{
10086
+ key: 'BearerAuth',
10087
+ scheme: 'bearer',
10088
+ type: 'http'
10089
+ }, {
10090
+ key: 'ApiKeyAuth',
10091
+ name: 'X-API-Key',
10092
+ type: 'apiKey'
10093
+ }],
10094
+ url: '/studio/v1/works/{work}/drafts/{draft}/export',
10095
+ ...options
10096
+ });
10097
+ /**
10098
+ * Add one unit to the draft tree
10099
+ *
10100
+ * Add a unit to the structure: a chapter, a scene, a section, an argument or a product depending on the genre. Say where it goes with parent and after, give it the structure name people will use to manage it, and write the intent that says what it has to accomplish. Adding a unit changes the draft revision, so pass expected_revision, and the new unit itself starts with no body.
10101
+ */
10102
+ export const studioUnitsCreate = (options) => (options.client ?? client).post({
10103
+ security: [{
10104
+ key: 'BearerAuth',
10105
+ scheme: 'bearer',
10106
+ type: 'http'
10107
+ }, {
10108
+ key: 'ApiKeyAuth',
10109
+ name: 'X-API-Key',
10110
+ type: 'apiKey'
10111
+ }],
10112
+ url: '/studio/v1/works/{work}/drafts/{draft}/units',
10113
+ ...options,
10114
+ headers: {
10115
+ 'Content-Type': 'application/json',
10116
+ ...options.headers
10117
+ }
10118
+ });
10119
+ /**
10120
+ * Add a whole outline of units at once
10121
+ *
10122
+ * Create many units in one write from a nested outline, which is how a structure is built after the person approved a plan. Nesting in the outline becomes the parent chain, numbers are assigned in order, and the draft gets one revision for the whole batch rather than one per unit. Sending the same outline twice would duplicate it, so pass the draft revision you read and repeat the call only after a refusal.
10123
+ */
10124
+ export const studioUnitsBatchCreate = (options) => (options.client ?? client).post({
10125
+ security: [{
10126
+ key: 'BearerAuth',
10127
+ scheme: 'bearer',
10128
+ type: 'http'
10129
+ }, {
10130
+ key: 'ApiKeyAuth',
10131
+ name: 'X-API-Key',
10132
+ type: 'apiKey'
10133
+ }],
10134
+ url: '/studio/v1/works/{work}/drafts/{draft}/units:batchCreate',
10135
+ ...options,
10136
+ headers: {
10137
+ 'Content-Type': 'application/json',
10138
+ ...options.headers
10139
+ }
10140
+ });
10141
+ /**
10142
+ * Write intents for many units in one call
10143
+ *
10144
+ * Change the intent of several units in one write: the synopsis, the points and the brief points each of them claims. Bodies are not part of this call, because a body is written one unit at a time with its own revision; here the whole batch shares the draft revision you read. Use it to lay out a plan across the tree, then write bodies one by one.
10145
+ */
10146
+ export const studioUnitsBatchUpdate = (options) => (options.client ?? client).post({
10147
+ security: [{
10148
+ key: 'BearerAuth',
10149
+ scheme: 'bearer',
10150
+ type: 'http'
10151
+ }, {
10152
+ key: 'ApiKeyAuth',
10153
+ name: 'X-API-Key',
10154
+ type: 'apiKey'
10155
+ }],
10156
+ url: '/studio/v1/works/{work}/drafts/{draft}/units:batchUpdate',
10157
+ ...options,
10158
+ headers: {
10159
+ 'Content-Type': 'application/json',
10160
+ ...options.headers
10161
+ }
10162
+ });
10163
+ /**
10164
+ * Read one unit with its blocks and Markdown
10165
+ *
10166
+ * Read one unit: its intent, its status, its revision, its links to reference entries, and its body as both blocks and Markdown. The Markdown carries each block identifier inline as an anchor comment, so a rewrite can keep the identifiers of the blocks it keeps. Read this before writing the body, because the revision it returns is the precondition that write has to carry.
10167
+ */
10168
+ export const studioUnitsGet = (options) => (options.client ?? client).get({
10169
+ security: [{
10170
+ key: 'BearerAuth',
10171
+ scheme: 'bearer',
10172
+ type: 'http'
10173
+ }, {
10174
+ key: 'ApiKeyAuth',
10175
+ name: 'X-API-Key',
10176
+ type: 'apiKey'
10177
+ }],
10178
+ url: '/studio/v1/works/{work}/units/{unit}',
10179
+ ...options
10180
+ });
10181
+ /**
10182
+ * Change a unit intent, body or status
10183
+ *
10184
+ * Change one unit: its name, its heading, its synopsis and points, the brief points it claims, its status, its links to reference entries, or its body as a whole Markdown text. A body write requires expected_revision, because replacing the whole text would drop blocks someone else inserted. The answer carries the unit as it now stands, so read the next field of the answer instead of re-reading the unit.
10185
+ */
10186
+ export const studioUnitsUpdate = (options) => (options.client ?? client).patch({
10187
+ security: [{
10188
+ key: 'BearerAuth',
10189
+ scheme: 'bearer',
10190
+ type: 'http'
10191
+ }, {
10192
+ key: 'ApiKeyAuth',
10193
+ name: 'X-API-Key',
10194
+ type: 'apiKey'
10195
+ }],
10196
+ url: '/studio/v1/works/{work}/units/{unit}',
10197
+ ...options,
10198
+ headers: {
10199
+ 'Content-Type': 'application/json',
10200
+ ...options.headers
10201
+ }
10202
+ });
10203
+ /**
10204
+ * Move a unit to another place in the tree
10205
+ *
10206
+ * Move a unit under another parent or after another sibling, without changing its number, its identifier, its intent or its body. A move that would put a unit inside its own descendant, or that would cross into another draft, is refused. Only the moved unit changes, so the revision to pass is its own.
10207
+ */
10208
+ export const studioUnitsMove = (options) => (options.client ?? client).post({
10209
+ security: [{
10210
+ key: 'BearerAuth',
10211
+ scheme: 'bearer',
10212
+ type: 'http'
10213
+ }, {
10214
+ key: 'ApiKeyAuth',
10215
+ name: 'X-API-Key',
10216
+ type: 'apiKey'
10217
+ }],
10218
+ url: '/studio/v1/works/{work}/units/{unit}:move',
10219
+ ...options,
10220
+ headers: {
10221
+ 'Content-Type': 'application/json',
10222
+ ...options.headers
10223
+ }
10224
+ });
10225
+ /**
10226
+ * Edit a unit body block by block
10227
+ *
10228
+ * Change a body by naming the blocks to insert, replace or delete instead of resending the whole text. This is the safe way for a writer that only touches part of a unit, because a block another writer changed after your revision is refused rather than overwritten. The revision is required, and the answer carries the unit with its blocks so the next edit can address them.
10229
+ */
10230
+ export const studioUnitsPatchBlocks = (options) => (options.client ?? client).post({
10231
+ security: [{
10232
+ key: 'BearerAuth',
10233
+ scheme: 'bearer',
10234
+ type: 'http'
10235
+ }, {
10236
+ key: 'ApiKeyAuth',
10237
+ name: 'X-API-Key',
10238
+ type: 'apiKey'
10239
+ }],
10240
+ url: '/studio/v1/works/{work}/units/{unit}/blocks:patch',
10241
+ ...options,
10242
+ headers: {
10243
+ 'Content-Type': 'application/json',
10244
+ ...options.headers
10245
+ }
10246
+ });
10247
+ /**
10248
+ * Read the context pack for writing one unit
10249
+ *
10250
+ * Read everything a writer needs before touching one unit: the genre rules, the goal, the brief, the style, the upstream source, the reference entries this unit draws on, the synopses of the units before it, and the intent of this unit, assembled in a fixed order and measured against a token budget. Entries left out say why, so a missing detail is visible rather than silent. Same input gives the same pack, which is what makes a written result reproducible.
10251
+ */
10252
+ export const studioUnitsContext = (options) => (options.client ?? client).get({
10253
+ security: [{
10254
+ key: 'BearerAuth',
10255
+ scheme: 'bearer',
10256
+ type: 'http'
10257
+ }, {
10258
+ key: 'ApiKeyAuth',
10259
+ name: 'X-API-Key',
10260
+ type: 'apiKey'
10261
+ }],
10262
+ url: '/studio/v1/works/{work}/units/{unit}/context',
10263
+ ...options
10264
+ });
10265
+ /**
10266
+ * List the reference libraries of this organization
10267
+ *
10268
+ * List the reference libraries this API key organization owns, each with how many entries it holds, so you can choose the one a work draws on. Continue with next_page_token until the answer stops carrying one. A library is shared across works, so the list is the whole organization's rather than one work's.
10269
+ */
10270
+ export const studioCodexesList = (options) => (options?.client ?? client).get({
10271
+ security: [{
10272
+ key: 'BearerAuth',
10273
+ scheme: 'bearer',
10274
+ type: 'http'
10275
+ }, {
10276
+ key: 'ApiKeyAuth',
10277
+ name: 'X-API-Key',
10278
+ type: 'apiKey'
10279
+ }],
10280
+ url: '/studio/v1/codexes',
10281
+ ...options
10282
+ });
10283
+ /**
10284
+ * Create a reference library
10285
+ *
10286
+ * Create a reference library: a shared store of the people, places, products and facts a piece draws on, reusable across works. Attach it to a work with the work update call, and the entries it holds then reach the context packs of that work's units. A library is not private to one work, so the same brand facts can serve every piece that mentions them.
10287
+ */
10288
+ export const studioCodexesCreate = (options) => (options.client ?? client).post({
10289
+ security: [{
10290
+ key: 'BearerAuth',
10291
+ scheme: 'bearer',
10292
+ type: 'http'
10293
+ }, {
10294
+ key: 'ApiKeyAuth',
10295
+ name: 'X-API-Key',
10296
+ type: 'apiKey'
10297
+ }],
10298
+ url: '/studio/v1/codexes',
10299
+ ...options,
10300
+ headers: {
10301
+ 'Content-Type': 'application/json',
10302
+ ...options.headers
10303
+ }
10304
+ });
10305
+ /**
10306
+ * Delete a reference library
10307
+ *
10308
+ * Delete a library and every entry inside it. A library attached to any work is refused with CODEX_IN_USE, because deleting it would silently strip the reference material those units draw on; detach it from the work first. This cannot be undone, so confirm which library the identifier names.
10309
+ */
10310
+ export const studioCodexesDelete = (options) => (options.client ?? client).delete({
10311
+ security: [{
10312
+ key: 'BearerAuth',
10313
+ scheme: 'bearer',
10314
+ type: 'http'
10315
+ }, {
10316
+ key: 'ApiKeyAuth',
10317
+ name: 'X-API-Key',
10318
+ type: 'apiKey'
10319
+ }],
10320
+ url: '/studio/v1/codexes/{codex}',
10321
+ ...options
10322
+ });
10323
+ /**
10324
+ * Read one reference library
10325
+ *
10326
+ * Read one reference library: its name, its description, its labels and how many entries it holds. Read this to confirm a library exists before attaching it to a work; the entries themselves are listed with the entry list call, because a library may hold more of them than fit in one answer.
10327
+ */
10328
+ export const studioCodexesGet = (options) => (options.client ?? client).get({
10329
+ security: [{
10330
+ key: 'BearerAuth',
10331
+ scheme: 'bearer',
10332
+ type: 'http'
10333
+ }, {
10334
+ key: 'ApiKeyAuth',
10335
+ name: 'X-API-Key',
10336
+ type: 'apiKey'
10337
+ }],
10338
+ url: '/studio/v1/codexes/{codex}',
10339
+ ...options
10340
+ });
10341
+ /**
10342
+ * Rename a reference library or change its description
10343
+ *
10344
+ * Change the library itself: its name, its description or its labels. Send update_mask naming exactly the fields you change; a field left out keeps its value. The entries inside are untouched, and a work that has the library attached keeps it attached under the new name.
10345
+ */
10346
+ export const studioCodexesUpdate = (options) => (options.client ?? client).patch({
10347
+ security: [{
10348
+ key: 'BearerAuth',
10349
+ scheme: 'bearer',
10350
+ type: 'http'
10351
+ }, {
10352
+ key: 'ApiKeyAuth',
10353
+ name: 'X-API-Key',
10354
+ type: 'apiKey'
10355
+ }],
10356
+ url: '/studio/v1/codexes/{codex}',
10357
+ ...options,
10358
+ headers: {
10359
+ 'Content-Type': 'application/json',
10360
+ ...options.headers
10361
+ }
10362
+ });
10363
+ /**
10364
+ * List the entries of a reference library
10365
+ *
10366
+ * List the entries of one library in pages, each with its type, its name, its aliases and whether it is always present in context. Use it to see what a work already knows before adding an entry, since a duplicate name is refused rather than merged. Continue with next_page_token until the answer stops carrying one.
10367
+ */
10368
+ export const studioEntriesList = (options) => (options.client ?? client).get({
10369
+ security: [{
10370
+ key: 'BearerAuth',
10371
+ scheme: 'bearer',
10372
+ type: 'http'
10373
+ }, {
10374
+ key: 'ApiKeyAuth',
10375
+ name: 'X-API-Key',
10376
+ type: 'apiKey'
10377
+ }],
10378
+ url: '/studio/v1/codexes/{codex}/entries',
10379
+ ...options
10380
+ });
10381
+ /**
10382
+ * Add an entry to a reference library
10383
+ *
10384
+ * Add one entry: a character, a place, a product, a source of facts. Give it the type the genre uses, the name the text will mention, and the description and facts that should reach a writer when it is mentioned. Aliases and excluded phrases keep detection honest, so a common word inside an idiom is not mistaken for the entry. A name already used in the library is refused.
10385
+ */
10386
+ export const studioEntriesCreate = (options) => (options.client ?? client).post({
10387
+ security: [{
10388
+ key: 'BearerAuth',
10389
+ scheme: 'bearer',
10390
+ type: 'http'
10391
+ }, {
10392
+ key: 'ApiKeyAuth',
10393
+ name: 'X-API-Key',
10394
+ type: 'apiKey'
10395
+ }],
10396
+ url: '/studio/v1/codexes/{codex}/entries',
10397
+ ...options,
10398
+ headers: {
10399
+ 'Content-Type': 'application/json',
10400
+ ...options.headers
10401
+ }
10402
+ });
10403
+ /**
10404
+ * Delete a reference entry
10405
+ *
10406
+ * Delete one entry from a library, which also removes the mentions and the links that pointed at it. Units that claimed it keep their text; only the reference goes away. This cannot be undone, so confirm the name of the entry before deleting it, and prefer changing its tracking setting to never when it should stop reaching writers but stay recorded.
10407
+ */
10408
+ export const studioEntriesDelete = (options) => (options.client ?? client).delete({
10409
+ security: [{
10410
+ key: 'BearerAuth',
10411
+ scheme: 'bearer',
10412
+ type: 'http'
10413
+ }, {
10414
+ key: 'ApiKeyAuth',
10415
+ name: 'X-API-Key',
10416
+ type: 'apiKey'
10417
+ }],
10418
+ url: '/studio/v1/codexes/{codex}/entries/{entry}',
10419
+ ...options
10420
+ });
10421
+ /**
10422
+ * Read one reference entry
10423
+ *
10424
+ * Read one entry in full: its description, its fact ledger, its relations to other entries, its detection settings and its images. Read it before changing it, because an update replaces the fields it names rather than merging them. The entry is addressed by its name in this library, or by its ent_ identifier.
10425
+ */
10426
+ export const studioEntriesGet = (options) => (options.client ?? client).get({
10427
+ security: [{
10428
+ key: 'BearerAuth',
10429
+ scheme: 'bearer',
10430
+ type: 'http'
10431
+ }, {
10432
+ key: 'ApiKeyAuth',
10433
+ name: 'X-API-Key',
10434
+ type: 'apiKey'
10435
+ }],
10436
+ url: '/studio/v1/codexes/{codex}/entries/{entry}',
10437
+ ...options
10438
+ });
10439
+ /**
10440
+ * Change what a reference entry says
10441
+ *
10442
+ * Change one entry: its type, its name, its aliases, its description, its facts, its notes, its tracking setting, its images or its relations. Send update_mask naming exactly the fields you change, because a field the mask leaves out keeps its value while a list field the mask names is replaced whole. Renaming an entry changes what the text has to mention for detection to find it.
10443
+ */
10444
+ export const studioEntriesUpdate = (options) => (options.client ?? client).patch({
10445
+ security: [{
10446
+ key: 'BearerAuth',
10447
+ scheme: 'bearer',
10448
+ type: 'http'
10449
+ }, {
10450
+ key: 'ApiKeyAuth',
10451
+ name: 'X-API-Key',
10452
+ type: 'apiKey'
10453
+ }],
10454
+ url: '/studio/v1/codexes/{codex}/entries/{entry}',
10455
+ ...options,
10456
+ headers: {
10457
+ 'Content-Type': 'application/json',
10458
+ ...options.headers
10459
+ }
10460
+ });
10461
+ /**
10462
+ * List the writing styles of this organization
10463
+ *
10464
+ * List the styles this API key organization owns, each with its name and description, so you can choose the voice a work should be written in. Continue with next_page_token until the answer stops carrying one. Read one style in full before attaching it, because its samples are what actually shape the writing.
10465
+ */
10466
+ export const studioStylesList = (options) => (options?.client ?? client).get({
10467
+ security: [{
10468
+ key: 'BearerAuth',
10469
+ scheme: 'bearer',
10470
+ type: 'http'
10471
+ }, {
10472
+ key: 'ApiKeyAuth',
10473
+ name: 'X-API-Key',
10474
+ type: 'apiKey'
10475
+ }],
10476
+ url: '/studio/v1/styles',
10477
+ ...options
10478
+ });
10479
+ /**
10480
+ * Create a writing style
10481
+ *
10482
+ * Create a style: the voice a piece is written in, held as samples rather than as adjectives. Samples matter more than a description, so paste one to five paragraphs of writing the piece should sound like, and put the words to avoid into avoid so the banned-word check uses them. Attach a style to a work, or to one draft of it, and its samples then reach every context pack.
10483
+ */
10484
+ export const studioStylesCreate = (options) => (options.client ?? client).post({
10485
+ security: [{
10486
+ key: 'BearerAuth',
10487
+ scheme: 'bearer',
10488
+ type: 'http'
10489
+ }, {
10490
+ key: 'ApiKeyAuth',
10491
+ name: 'X-API-Key',
10492
+ type: 'apiKey'
10493
+ }],
10494
+ url: '/studio/v1/styles',
10495
+ ...options,
10496
+ headers: {
10497
+ 'Content-Type': 'application/json',
10498
+ ...options.headers
10499
+ }
10500
+ });
10501
+ /**
10502
+ * Delete a writing style
10503
+ *
10504
+ * Delete a style, which detaches it from every work and draft that used it; those units then stop receiving its samples and glossary in their context packs. This cannot be undone, so confirm the style identifier before deleting it, and read the work first when it is not certain which style it uses.
10505
+ */
10506
+ export const studioStylesDelete = (options) => (options.client ?? client).delete({
10507
+ security: [{
10508
+ key: 'BearerAuth',
10509
+ scheme: 'bearer',
10510
+ type: 'http'
10511
+ }, {
10512
+ key: 'ApiKeyAuth',
10513
+ name: 'X-API-Key',
10514
+ type: 'apiKey'
10515
+ }],
10516
+ url: '/studio/v1/styles/{style}',
10517
+ ...options
10518
+ });
10519
+ /**
10520
+ * Read one writing style
10521
+ *
10522
+ * Read one style in full: its samples, the wording to use and to avoid, and its glossary of wrong-to-right terms. Read it before attaching it to a work, since samples decide the sound of the writing far more than the description does, and a glossary term also becomes a deterministic check against the text.
10523
+ */
10524
+ export const studioStylesGet = (options) => (options.client ?? client).get({
10525
+ security: [{
10526
+ key: 'BearerAuth',
10527
+ scheme: 'bearer',
10528
+ type: 'http'
10529
+ }, {
10530
+ key: 'ApiKeyAuth',
10531
+ name: 'X-API-Key',
10532
+ type: 'apiKey'
10533
+ }],
10534
+ url: '/studio/v1/styles/{style}',
10535
+ ...options
10536
+ });
10537
+ /**
10538
+ * Change a writing style
10539
+ *
10540
+ * Change a style: its name, its description, its samples, its use and avoid lists, or its glossary. Send update_mask naming exactly the fields you change; a list the mask names is replaced whole. Adding a term to the glossary or to avoid also changes what the deterministic checks flag, so a work that uses this style sees new findings on its next check.
10541
+ */
10542
+ export const studioStylesUpdate = (options) => (options.client ?? client).patch({
10543
+ security: [{
10544
+ key: 'BearerAuth',
10545
+ scheme: 'bearer',
10546
+ type: 'http'
10547
+ }, {
10548
+ key: 'ApiKeyAuth',
10549
+ name: 'X-API-Key',
10550
+ type: 'apiKey'
10551
+ }],
10552
+ url: '/studio/v1/styles/{style}',
10553
+ ...options,
10554
+ headers: {
10555
+ 'Content-Type': 'application/json',
10556
+ ...options.headers
10557
+ }
10558
+ });
10559
+ /**
10560
+ * List the templates a genre can start from
10561
+ *
10562
+ * List templates: the built-in starting structures of each genre, followed by the ones this organization saved. Pass a genre to see only the templates that genre can use. A template is used once when a draft is created and is then detached, so changing a template never rewrites a draft that already started from it.
10563
+ */
10564
+ export const studioTemplatesList = (options) => (options?.client ?? client).get({
10565
+ security: [{
10566
+ key: 'BearerAuth',
10567
+ scheme: 'bearer',
10568
+ type: 'http'
10569
+ }, {
10570
+ key: 'ApiKeyAuth',
10571
+ name: 'X-API-Key',
10572
+ type: 'apiKey'
10573
+ }],
10574
+ url: '/studio/v1/templates',
10575
+ ...options
10576
+ });
10577
+ /**
10578
+ * Save a starting structure as a template
10579
+ *
10580
+ * Save a unit tree as a reusable template for one genre, so the same structure can seed later drafts. Give the genre, a name, the outline of units with their intents, and optionally the writing guidance a writer should follow. Creating a template from an existing draft is a separate milestone and answers NOT_IMPLEMENTED, so build the outline here instead.
10581
+ */
10582
+ export const studioTemplatesCreate = (options) => (options.client ?? client).post({
10583
+ security: [{
10584
+ key: 'BearerAuth',
10585
+ scheme: 'bearer',
10586
+ type: 'http'
10587
+ }, {
10588
+ key: 'ApiKeyAuth',
10589
+ name: 'X-API-Key',
10590
+ type: 'apiKey'
10591
+ }],
10592
+ url: '/studio/v1/templates',
10593
+ ...options,
10594
+ headers: {
10595
+ 'Content-Type': 'application/json',
10596
+ ...options.headers
10597
+ }
10598
+ });
10599
+ /**
10600
+ * Delete a saved template
10601
+ *
10602
+ * Delete a template this organization saved. A built-in template belongs to the catalog and cannot be deleted, so this answers TEMPLATE_NOT_FOUND for one. Drafts that already started from the template are unaffected, because the template was detached when they were created. This cannot be undone.
10603
+ */
10604
+ export const studioTemplatesDelete = (options) => (options.client ?? client).delete({
10605
+ security: [{
10606
+ key: 'BearerAuth',
10607
+ scheme: 'bearer',
10608
+ type: 'http'
10609
+ }, {
10610
+ key: 'ApiKeyAuth',
10611
+ name: 'X-API-Key',
10612
+ type: 'apiKey'
10613
+ }],
10614
+ url: '/studio/v1/templates/{template}',
10615
+ ...options
10616
+ });
10617
+ /**
10618
+ * Read one template
10619
+ *
10620
+ * Read one template: its genre, the writing guidance it carries and the unit outline it seeds, with each unit's intent. Address a saved template by its identifier and a built-in one by its key, alone or with its genre prefix such as novel_long:three_act when two genres share a key. Read it before creating a draft from it, because the template decides the structure the draft starts with.
10621
+ */
10622
+ export const studioTemplatesGet = (options) => (options.client ?? client).get({
10623
+ security: [{
10624
+ key: 'BearerAuth',
10625
+ scheme: 'bearer',
10626
+ type: 'http'
10627
+ }, {
10628
+ key: 'ApiKeyAuth',
10629
+ name: 'X-API-Key',
10630
+ type: 'apiKey'
10631
+ }],
10632
+ url: '/studio/v1/templates/{template}',
10633
+ ...options
10634
+ });
10635
+ /**
10636
+ * List the rendition themes of a platform
10637
+ *
10638
+ * List themes: the layouts a rendition is produced with, for one platform or for all of them. Pass a platform to see only the themes that platform can use. A theme decides the page or card a rendition is built into, so read the chosen theme before creating a rendition rather than after the output looks wrong.
10639
+ */
10640
+ export const studioThemesList = (options) => (options?.client ?? client).get({
10641
+ security: [{
10642
+ key: 'BearerAuth',
10643
+ scheme: 'bearer',
10644
+ type: 'http'
10645
+ }, {
10646
+ key: 'ApiKeyAuth',
10647
+ name: 'X-API-Key',
10648
+ type: 'apiKey'
10649
+ }],
10650
+ url: '/studio/v1/themes',
10651
+ ...options
10652
+ });
10653
+ /**
10654
+ * Create a rendition theme
10655
+ *
10656
+ * Create a theme for one platform: the HTML and CSS a written piece is rendered into, plus the fixed header and footer every rendition carries. A DOCX platform takes a reference document instead of markup, and a card theme takes its aspect, width and fonts. An agent may write a theme here, which is how a new layout appears without a release.
10657
+ */
10658
+ export const studioThemesCreate = (options) => (options.client ?? client).post({
10659
+ security: [{
10660
+ key: 'BearerAuth',
10661
+ scheme: 'bearer',
10662
+ type: 'http'
10663
+ }, {
10664
+ key: 'ApiKeyAuth',
10665
+ name: 'X-API-Key',
10666
+ type: 'apiKey'
10667
+ }],
10668
+ url: '/studio/v1/themes',
10669
+ ...options,
10670
+ headers: {
10671
+ 'Content-Type': 'application/json',
10672
+ ...options.headers
10673
+ }
10674
+ });
10675
+ /**
10676
+ * Delete a rendition theme
10677
+ *
10678
+ * Delete a theme this organization created. A built-in theme belongs to the platform and cannot be deleted, so this answers THEME_NOT_FOUND for one. Renditions already produced with the theme keep their output, because the produced file no longer depends on the theme. This cannot be undone.
10679
+ */
10680
+ export const studioThemesDelete = (options) => (options.client ?? client).delete({
10681
+ security: [{
10682
+ key: 'BearerAuth',
10683
+ scheme: 'bearer',
10684
+ type: 'http'
10685
+ }, {
10686
+ key: 'ApiKeyAuth',
10687
+ name: 'X-API-Key',
10688
+ type: 'apiKey'
10689
+ }],
10690
+ url: '/studio/v1/themes/{theme}',
10691
+ ...options
10692
+ });
10693
+ /**
10694
+ * Read one rendition theme
10695
+ *
10696
+ * Read one theme in full: the HTML template and stylesheet it renders with, the header and footer it always carries, the reference document a DOCX rendition uses, or the card proportions a card rendition uses. Read it before creating a rendition with it, because a theme decides what the output looks like and a DOCX theme is a file rather than markup.
10697
+ */
10698
+ export const studioThemesGet = (options) => (options.client ?? client).get({
10699
+ security: [{
10700
+ key: 'BearerAuth',
10701
+ scheme: 'bearer',
10702
+ type: 'http'
10703
+ }, {
10704
+ key: 'ApiKeyAuth',
10705
+ name: 'X-API-Key',
10706
+ type: 'apiKey'
10707
+ }],
10708
+ url: '/studio/v1/themes/{theme}',
10709
+ ...options
10710
+ });
10711
+ /**
10712
+ * Change a rendition theme
10713
+ *
10714
+ * Change a theme: its name, its markup, its stylesheet, or the fixed fragments around every rendition. Send update_mask naming exactly the fields you change. Changing a theme does not rewrite renditions already produced with an earlier version, because each rendition records the theme version it was built from.
10715
+ */
10716
+ export const studioThemesUpdate = (options) => (options.client ?? client).patch({
10717
+ security: [{
10718
+ key: 'BearerAuth',
10719
+ scheme: 'bearer',
10720
+ type: 'http'
10721
+ }, {
10722
+ key: 'ApiKeyAuth',
10723
+ name: 'X-API-Key',
10724
+ type: 'apiKey'
10725
+ }],
10726
+ url: '/studio/v1/themes/{theme}',
10727
+ ...options,
10728
+ headers: {
10729
+ 'Content-Type': 'application/json',
10730
+ ...options.headers
10731
+ }
10732
+ });
9340
10733
  /**
9341
10734
  * List vaults
9342
10735
  *
@@ -9950,7 +11343,7 @@ export const ticketGetLabels = (options) => (options?.client ?? client).get({
9950
11343
  /**
9951
11344
  * Create or add labels
9952
11345
  *
9953
- * Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.
11346
+ * Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
9954
11347
  */
9955
11348
  export const ticketPostLabels = (options) => (options.client ?? client).post({
9956
11349
  security: [{
@@ -9972,7 +11365,7 @@ export const ticketPostLabels = (options) => (options.client ?? client).post({
9972
11365
  /**
9973
11366
  * Remove labels
9974
11367
  *
9975
- * Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.
11368
+ * Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
9976
11369
  */
9977
11370
  export const ticketDeleteLabelsName = (options) => (options.client ?? client).delete({
9978
11371
  security: [{
@@ -9990,7 +11383,7 @@ export const ticketDeleteLabelsName = (options) => (options.client ?? client).de
9990
11383
  /**
9991
11384
  * Update labels
9992
11385
  *
9993
- * Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Organization owner or admin authority is required for this write; API keys without role information act as members.
11386
+ * Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
9994
11387
  */
9995
11388
  export const ticketPatchLabelsName = (options) => (options.client ?? client).patch({
9996
11389
  security: [{