@deepraxis/cli 0.2.1-dev.4d394b7 → 0.2.1-dev.52419cf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMMANDS.md +22 -1
- package/dist/praxis.js +1484 -136
- package/package.json +1 -1
package/dist/praxis.js
CHANGED
|
@@ -143,7 +143,7 @@ across all toolsets allowed.`
|
|
|
143
143
|
type: "array",
|
|
144
144
|
itemType: "object",
|
|
145
145
|
required: false,
|
|
146
|
-
description: "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general and personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search or
|
|
146
|
+
description: "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general and personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search, browser, ticket, crm, canvas or cut. There is no binding by default; enabling one opens every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for no bindings. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time."
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
name: "kind",
|
|
@@ -1218,6 +1218,37 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
1218
1218
|
}
|
|
1219
1219
|
]
|
|
1220
1220
|
},
|
|
1221
|
+
{
|
|
1222
|
+
resource: "agent.computers.files.convert",
|
|
1223
|
+
method: "create",
|
|
1224
|
+
summary: "Convert a Computer Document to PDF",
|
|
1225
|
+
description: `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.
|
|
1226
|
+
|
|
1227
|
+
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.`,
|
|
1228
|
+
http: "POST",
|
|
1229
|
+
path: "/agent/v1/computers/{computer_id}/files/convert",
|
|
1230
|
+
streaming: "no",
|
|
1231
|
+
pagination: false,
|
|
1232
|
+
pathParams: [
|
|
1233
|
+
{
|
|
1234
|
+
name: "computer_id",
|
|
1235
|
+
sdkName: "computer_id",
|
|
1236
|
+
description: "Computer id (cmp_...), as returned by computers.create or computers.list."
|
|
1237
|
+
}
|
|
1238
|
+
],
|
|
1239
|
+
query: [],
|
|
1240
|
+
body: {
|
|
1241
|
+
required: true,
|
|
1242
|
+
fields: [
|
|
1243
|
+
{
|
|
1244
|
+
name: "name",
|
|
1245
|
+
type: "string",
|
|
1246
|
+
required: true,
|
|
1247
|
+
description: "Name of the entry or object."
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1221
1252
|
{
|
|
1222
1253
|
resource: "agent.computers.leases",
|
|
1223
1254
|
method: "delete",
|
|
@@ -6100,7 +6131,7 @@ file at the root of that directory.`
|
|
|
6100
6131
|
"allow"
|
|
6101
6132
|
],
|
|
6102
6133
|
required: false,
|
|
6103
|
-
description: "skip
|
|
6134
|
+
description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
|
|
6104
6135
|
},
|
|
6105
6136
|
{
|
|
6106
6137
|
name: "catchup_window_seconds",
|
|
@@ -6274,7 +6305,7 @@ file at the root of that directory.`
|
|
|
6274
6305
|
"allow"
|
|
6275
6306
|
],
|
|
6276
6307
|
required: false,
|
|
6277
|
-
description: "skip
|
|
6308
|
+
description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
|
|
6278
6309
|
},
|
|
6279
6310
|
{
|
|
6280
6311
|
name: "catchup_window_seconds",
|
|
@@ -10162,6 +10193,12 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10162
10193
|
type: "integer",
|
|
10163
10194
|
required: false,
|
|
10164
10195
|
description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
|
|
10196
|
+
},
|
|
10197
|
+
{
|
|
10198
|
+
name: "loudness",
|
|
10199
|
+
type: "object",
|
|
10200
|
+
required: false,
|
|
10201
|
+
description: "Loudness normalization target. Omitted, the export is normalized to -14 LUFS integrated and -1 dBTP true peak, the level short-video and streaming platforms play at; null renders without normalization. Normalization adds analysis and rendering work."
|
|
10165
10202
|
}
|
|
10166
10203
|
]
|
|
10167
10204
|
}
|
|
@@ -10385,7 +10422,158 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10385
10422
|
resource: "cut.projects",
|
|
10386
10423
|
method: "execute",
|
|
10387
10424
|
summary: "Execute editing script",
|
|
10388
|
-
description: '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);`\n\n### Script function reference\n\nFunctions 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.\n\n```ts\nGetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;\nGetItem(id: ClipId): ItemView;\nFindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];\nGetMedia(ref: MediaRef): MediaInfo;\nGetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];\nGetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];\nListTransitions(): TransitionInfo[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };\nDelete(id: ClipId, o?: { ripple?: boolean }): void;\nJoin(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;\nUpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;\nDeleteJoin(id: JoinId): void;\nSplit(id: ClipId, at: number): ClipId;\nTrim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;\nMove(id: ClipId, start: number, track?: TrackId): void;\nRippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;\nAddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;\nUpdateTrack(id: TrackId, patch: TrackPatch): void;\nDeleteTrack(id: TrackId): void;\nSetSettings(patch: Partial<ProjectSettingsView>): void;\nAddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];\nSetMarker(at: number, label: string): string;\nPrint(...values: unknown[]): void;\nPreview(at: number[]): void;\n```\n\n| Functions | Behavior and arguments |\n| --- | --- |\n| GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text 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. |\n| 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. |\n| FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |\n| GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |\n| 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. |\n| 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. |\n| SetSpeed | Change video/audio rate in 0.25–4; keep is required. 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. |\n| 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. |\n| 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. |\n| RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |\n| AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb and style as appropriate to track kind. |\n| SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |\n| 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. |\n| SetMarker | Add a label at a timeline time and return its ID. |\n| 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. |\n\n#### Joins between clips\n\nEndpoints 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.\n\nTransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use the catalog defaults. Unknown kinds and unknown or invalid parameters are rejected. Effects: dissolve (no parameters); dip (color black/white, default black); push and wipe (direction left/right/up/down, default left); wipe also has softness 0–1, default 0; iris has centerX/centerY 0–1, both default 0.5; blinds has integer count 2–64, default 8, and orientation vertical/horizontal, default vertical; blur has radius 0–100 pixels at 1080-pixel frame height, default 24. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\n\nMinimal 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.\n\n#### Insert fields (ItemInit)\n\nEvery 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.\n\n| type | Required fields beyond type/start | Optional fields |\n| --- | --- | --- |\n| video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |\n| image | media, length | transform, fit, animate, transitionIn, transitionOut |\n| text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |\n| color | color, length | transform, fill, animate, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |\n| caption | text, length | — |\n\nVideo 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.\n\n| Field | Value |\n| --- | --- |\n| 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. |\n| style | Partial `{fontFamily, fontSize, fontWeight, color, stroke, background, align, maxWidth, position, margin}`. fontFamily: Geist or Noto Sans SC (default); fontSize defaults to 48; fontWeight: 400 (default), 500 or 700; color defaults to #FFFFFF; align: left, center (default), right; maxWidth is a fraction of canvas width (default 0.9). stroke is `{color,width}`. Text and captions support position (top/middle/bottom; box centers at 12%/50%/85% of height without margin) and optional margin (0–0.4 of canvas height, box edge distance for top/bottom; middle ignores it). Omitted position preserves the text transform (center by default); explicit position controls vertical placement, so omit it for y animation. Caption style additionally supports highlightColor and maxLines: 2. GetItem and GetTimeline return text style and current caption track style. Caption tracks only accept captions; use AddCaptionsFromTranscript, and place text on video tracks. |\n| 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. |\n| 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. |\n| 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. |\n| 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. |\n| 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}`. |\n| 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. |\n\n#### Update fields (ItemPatchView)\n\nAll 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, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: `Update(id, {volumeDb: -12})` or `Update(id, {transitionIn: null})`.\n\n#### Speed, reverse and freeze\n\nVideo/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.\n\nUpdate 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.\n\nExample 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.\n\n#### Script names versus HTTP response names\n\nUse 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.\n\nUnrecognized 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.\n',
|
|
10425
|
+
description: `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);\`
|
|
10426
|
+
|
|
10427
|
+
<!-- cut-reference:start -->
|
|
10428
|
+
### Script function, field and error reference
|
|
10429
|
+
|
|
10430
|
+
Every script function, clip field and error code has its own section, read one at a time:
|
|
10431
|
+
|
|
10432
|
+
\`\`\`
|
|
10433
|
+
codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
|
|
10434
|
+
codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
|
|
10435
|
+
codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
|
|
10436
|
+
codemode.describe("praxis.cut.script") // names, one page at a time
|
|
10437
|
+
\`\`\`
|
|
10438
|
+
|
|
10439
|
+
Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
|
|
10440
|
+
|
|
10441
|
+
#### Script functions (script)
|
|
10442
|
+
|
|
10443
|
+
- \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
|
|
10444
|
+
- \`GetItem\` — One clip's compact view, by id.
|
|
10445
|
+
- \`FindItems\` — Visit every clip with its track; collect results.
|
|
10446
|
+
- \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
|
|
10447
|
+
- \`GetTranscript\` — Transcript words in source microseconds.
|
|
10448
|
+
- \`GetAnalysis\` — Silence, filler or scene segments.
|
|
10449
|
+
- \`ListTransitions\` — Join transition kinds and parameters.
|
|
10450
|
+
- \`ListEffects\` — Visual-effect catalog and parameters.
|
|
10451
|
+
- \`ListAnimations\` — Animation presets by phase and target.
|
|
10452
|
+
- \`ListFonts\` — Font families, weights and scripts.
|
|
10453
|
+
- \`ListTextStyles\` — Text style presets for \`style.preset\`.
|
|
10454
|
+
- \`ListTextTemplates\` — Multi-layer templates and their slots.
|
|
10455
|
+
- \`Insert\` — Add a clip; a track never overlaps itself.
|
|
10456
|
+
- \`Append\` — Add a clip at the end of a track.
|
|
10457
|
+
- \`Update\` — Change named fields; the rest stay.
|
|
10458
|
+
- \`SetSpeed\` — Change rate, keeping source or duration.
|
|
10459
|
+
- \`Delete\` — Remove a clip. There is no \`Remove\`.
|
|
10460
|
+
- \`Join\` — Overlap clips; followers shift, track shortens.
|
|
10461
|
+
- \`UpdateJoin\` — Change a join's length or effect.
|
|
10462
|
+
- \`DeleteJoin\` — Remove a join; restore the butt cut.
|
|
10463
|
+
- \`Split\` — Cut a clip in two at a time.
|
|
10464
|
+
- \`Trim\` — Move one clip edge by seconds.
|
|
10465
|
+
- \`Move\` — Set a clip's start or track.
|
|
10466
|
+
- \`RippleDeleteRange\` — Cut a time range and close the gap.
|
|
10467
|
+
- \`AddTrack\` — Add a video, audio or caption track.
|
|
10468
|
+
- \`UpdateTrack\` — Change a track's name, lock, gain or role.
|
|
10469
|
+
- \`DeleteTrack\` — Remove a track and its clips.
|
|
10470
|
+
- \`SetSettings\` — Change canvas, frame rate or background.
|
|
10471
|
+
- \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
|
|
10472
|
+
- \`InsertTemplate\` — Insert a template and fill its slots.
|
|
10473
|
+
- \`AlignCaptions\` — Rebuild captions from text punctuation.
|
|
10474
|
+
- \`ImportCaptions\` — Import SRT or WebVTT onto captions.
|
|
10475
|
+
- \`ExportCaptions\` — Export captions as SRT or WebVTT.
|
|
10476
|
+
- \`SetMarker\` — Label a timeline position.
|
|
10477
|
+
- \`Print\` — Append values to the result's \`prints\`.
|
|
10478
|
+
- \`Preview\` — Up to 8 frames as inline PNG data URLs.
|
|
10479
|
+
|
|
10480
|
+
#### Fields (fields)
|
|
10481
|
+
|
|
10482
|
+
- \`type\` — Clip kind; decides which fields apply.
|
|
10483
|
+
- \`start\` — Clip start in seconds; snaps to frames.
|
|
10484
|
+
- \`length\` — Duration; optional for video and audio.
|
|
10485
|
+
- \`media\` — Source \`{ libraryId, assetId }\`.
|
|
10486
|
+
- \`sourceIn\` — First source second kept; default 0.
|
|
10487
|
+
- \`sourceOut\` — Exclusive source end; read-only.
|
|
10488
|
+
- \`text\` — Text of a text or caption clip.
|
|
10489
|
+
- \`color\` — Solid colour of a color clip.
|
|
10490
|
+
- \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
|
|
10491
|
+
- \`width\` — Shape width, a fraction of canvas width.
|
|
10492
|
+
- \`height\` — Shape height, a fraction of canvas height.
|
|
10493
|
+
- \`radius\` — Rect corner rounding, in 1080-height px.
|
|
10494
|
+
- \`fill\` — Shape or text paint: colour or gradient.
|
|
10495
|
+
- \`stroke\` — Shape outline: colour and width.
|
|
10496
|
+
- \`transform\` — Position, scale, rotation, opacity, crop, blur.
|
|
10497
|
+
- \`fit\` — contain, cover, fill or none.
|
|
10498
|
+
- \`blend\` — Layer blend mode; null clears.
|
|
10499
|
+
- \`style\` — Text styling: font, fill, strokes, glow, position.
|
|
10500
|
+
- \`style.position\` — top, middle or bottom; omit it, never null.
|
|
10501
|
+
- \`playback\` — Rate, direction, audio policy, or freeze.
|
|
10502
|
+
- \`volumeDb\` — Audio level in dB; 0 is source level.
|
|
10503
|
+
- \`gain\` — Keyframed audio level in dB.
|
|
10504
|
+
- \`fadeIn\` — Fade-in seconds at the clip's start.
|
|
10505
|
+
- \`fadeOut\` — Fade-out seconds at the clip's end.
|
|
10506
|
+
- \`duck\` — Lower this clip while another track plays.
|
|
10507
|
+
- \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
|
|
10508
|
+
- \`reveal\` — Per-character, word or line reveal timing.
|
|
10509
|
+
- \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
|
|
10510
|
+
- \`effects\` — Effect stack, at most 8; null clears.
|
|
10511
|
+
- \`transitionIn\` — Entrance effect: kind plus seconds.
|
|
10512
|
+
- \`transitionOut\` — Exit effect: kind plus seconds.
|
|
10513
|
+
- \`mask\` — Shape, path or track matte.
|
|
10514
|
+
- \`words\` — Caption words with clip-local times.
|
|
10515
|
+
|
|
10516
|
+
#### Error codes (errors)
|
|
10517
|
+
|
|
10518
|
+
- \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
|
|
10519
|
+
- \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
|
|
10520
|
+
- \`INVALID_STYLE\` — A style value is out of range.
|
|
10521
|
+
- \`INVALID_MASK\` — A mask definition is malformed.
|
|
10522
|
+
- \`MASK_IN_USE\` — The edit would break a live mask.
|
|
10523
|
+
- \`TOO_MANY_MASKS\` — At most 16 masks per project.
|
|
10524
|
+
- \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
|
|
10525
|
+
- \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
|
|
10526
|
+
- \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
|
|
10527
|
+
- \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
|
|
10528
|
+
- \`UNKNOWN_FIELD\` — The field name is not accepted here.
|
|
10529
|
+
- \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
|
|
10530
|
+
- \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
|
|
10531
|
+
- \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
|
|
10532
|
+
- \`OVERLAP\` — Two clips on one track would share time.
|
|
10533
|
+
- \`OUT_OF_SOURCE\` — The clip would read past its source.
|
|
10534
|
+
- \`LOCKED_TRACK\` — The edit targets a locked track.
|
|
10535
|
+
- \`UNBOUND_LIBRARY\` — The library is not bound to the project.
|
|
10536
|
+
- \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
|
|
10537
|
+
- \`NOT_FOUND\` — The named id is not in this project.
|
|
10538
|
+
- \`TOO_SHORT\` — The result would be under one frame.
|
|
10539
|
+
- \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
|
|
10540
|
+
- \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
|
|
10541
|
+
- \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
|
|
10542
|
+
- \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
|
|
10543
|
+
- \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
|
|
10544
|
+
- \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
|
|
10545
|
+
- \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
|
|
10546
|
+
- \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
|
|
10547
|
+
- \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
|
|
10548
|
+
- \`PROJECT_NOT_FOUND\` — No visible project has this id.
|
|
10549
|
+
- \`EXPORT_NOT_FOUND\` — No such export in this project.
|
|
10550
|
+
- \`VERSION_NOT_FOUND\` — No saved version has this revision.
|
|
10551
|
+
- \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
|
|
10552
|
+
- \`BINDING_INVALID\` — The binding request is malformed.
|
|
10553
|
+
- \`BINDING_IN_USE\` — Clips still use this library's assets.
|
|
10554
|
+
- \`NOTHING_TO_UNDO\` — No earlier revision to return to.
|
|
10555
|
+
- \`NOTHING_TO_REDO\` — No undone revision is waiting.
|
|
10556
|
+
- \`UNDO_CONFLICT\` — The revision to undo is no longer head.
|
|
10557
|
+
- \`REVISION_CONFLICT\` — The project moved; your revision is stale.
|
|
10558
|
+
- \`CUT_BUSY\` — The project is busy; retry.
|
|
10559
|
+
- \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
|
|
10560
|
+
- \`SCRIPT_ERROR\` — The script threw or did not parse.
|
|
10561
|
+
- \`SCRIPT_LIMIT\` — An execute budget was exceeded.
|
|
10562
|
+
- \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
|
|
10563
|
+
- \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
|
|
10564
|
+
- \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
|
|
10565
|
+
- \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
|
|
10566
|
+
- \`MEDIA_IMPORT_FAILED\` — Importing media failed.
|
|
10567
|
+
- \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
|
|
10568
|
+
- \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
|
|
10569
|
+
- \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
|
|
10570
|
+
- \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
|
|
10571
|
+
- \`INVALID_PARAMS\` — The request is malformed.
|
|
10572
|
+
- \`PERMISSION_DENIED\` — This credential may not do that here.
|
|
10573
|
+
- \`NOT_IMPLEMENTED\` — Not available on this platform yet.
|
|
10574
|
+
- \`INTERNAL\` — Unexpected failure; retry with the request id.
|
|
10575
|
+
<!-- cut-reference:end -->
|
|
10576
|
+
`,
|
|
10389
10577
|
http: "POST",
|
|
10390
10578
|
path: "/cut/v1/projects/{project_id}:execute",
|
|
10391
10579
|
streaming: "no",
|
|
@@ -11630,7 +11818,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11630
11818
|
resource: "file.uploads",
|
|
11631
11819
|
method: "create",
|
|
11632
11820
|
summary: "Create an upload",
|
|
11633
|
-
description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most
|
|
11821
|
+
description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 20 GiB (21474836480 bytes) and only user_data, assistants and vision purposes. Send parts of at most 64000000 bytes; an unfinished upload waits for them for 7 days, so a client can create → send parts → query GET /file/v1/uploads/{upload_id} → resend only the missing parts → complete. Optional part_size fixes every part length and makes each numbered part retryable with identical bytes. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
|
|
11634
11822
|
http: "POST",
|
|
11635
11823
|
path: "/file/v1/uploads",
|
|
11636
11824
|
streaming: "no",
|
|
@@ -11644,7 +11832,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11644
11832
|
name: "bytes",
|
|
11645
11833
|
type: "integer",
|
|
11646
11834
|
required: true,
|
|
11647
|
-
description: "Exact complete file length in bytes, from 1 through
|
|
11835
|
+
description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
|
|
11648
11836
|
},
|
|
11649
11837
|
{
|
|
11650
11838
|
name: "filename",
|
|
@@ -11688,7 +11876,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11688
11876
|
resource: "file.uploads",
|
|
11689
11877
|
method: "createSigned",
|
|
11690
11878
|
summary: "Create a one-time upload URL",
|
|
11691
|
-
description: "Upload a local file of up to
|
|
11879
|
+
description: "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {\"filename\":\"photo.png\",\"bytes\":2048,\"content_type\":\"image/png\"}.",
|
|
11692
11880
|
http: "POST",
|
|
11693
11881
|
path: "/file/v1/uploads/signed",
|
|
11694
11882
|
streaming: "no",
|
|
@@ -11708,7 +11896,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11708
11896
|
name: "bytes",
|
|
11709
11897
|
type: "integer",
|
|
11710
11898
|
required: true,
|
|
11711
|
-
description: "Exact local file size in bytes, from 1 through
|
|
11899
|
+
description: "Exact local file size in bytes, from 1 through 21474836480 (20 GiB). Up to 104857600 bytes returns one PUT URL; larger files return numbered part URLs, a completion URL and a status URL. Every PUT requires its exact signed Content-Length."
|
|
11712
11900
|
},
|
|
11713
11901
|
{
|
|
11714
11902
|
name: "content_type",
|
|
@@ -11731,7 +11919,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11731
11919
|
name: "expires_in",
|
|
11732
11920
|
type: "integer",
|
|
11733
11921
|
required: false,
|
|
11734
|
-
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or
|
|
11922
|
+
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or 604800 (7 days) for multipart. All part URLs, the status URL and the completion URL share one expiry. This does not set the resulting file's lifetime."
|
|
11735
11923
|
},
|
|
11736
11924
|
{
|
|
11737
11925
|
name: "part_size",
|
|
@@ -11742,6 +11930,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11742
11930
|
]
|
|
11743
11931
|
}
|
|
11744
11932
|
},
|
|
11933
|
+
{
|
|
11934
|
+
resource: "file.uploads",
|
|
11935
|
+
method: "retrieve",
|
|
11936
|
+
summary: "Retrieve an upload",
|
|
11937
|
+
description: "Read the state of an unfinished upload — its status, declared bytes, fixed part_size and the parts it already holds (received_parts, each with part_number, bytes and sha256). After a break or a failed part, call it to resend only the missing numbers, then complete. A cancelled or expired upload is refused; a completed one returns its file. A missing or other-organization upload returns 404.",
|
|
11938
|
+
http: "GET",
|
|
11939
|
+
path: "/file/v1/uploads/{upload_id}",
|
|
11940
|
+
streaming: "no",
|
|
11941
|
+
pagination: false,
|
|
11942
|
+
pathParams: [
|
|
11943
|
+
{
|
|
11944
|
+
name: "upload_id",
|
|
11945
|
+
sdkName: "upload_id",
|
|
11946
|
+
description: "Upload identifier returned by create; the upload must belong to your organization."
|
|
11947
|
+
}
|
|
11948
|
+
],
|
|
11949
|
+
query: []
|
|
11950
|
+
},
|
|
11745
11951
|
{
|
|
11746
11952
|
resource: "file.uploads",
|
|
11747
11953
|
method: "cancel",
|
|
@@ -11764,7 +11970,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11764
11970
|
resource: "file.uploads",
|
|
11765
11971
|
method: "complete",
|
|
11766
11972
|
summary: "Complete an upload",
|
|
11767
|
-
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
11973
|
+
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. When parts were lost, query GET /file/v1/uploads/{upload_id} and resend them before completing. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
11768
11974
|
http: "POST",
|
|
11769
11975
|
path: "/file/v1/uploads/{upload_id}/complete",
|
|
11770
11976
|
streaming: "no",
|
|
@@ -11800,7 +12006,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11800
12006
|
resource: "file.uploads.parts",
|
|
11801
12007
|
method: "create",
|
|
11802
12008
|
summary: "Add an upload part",
|
|
11803
|
-
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
12009
|
+
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID, and query GET /file/v1/uploads/{upload_id} to see which numbers already arrived. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
11804
12010
|
http: "POST",
|
|
11805
12011
|
path: "/file/v1/uploads/{upload_id}/parts",
|
|
11806
12012
|
streaming: "no",
|
|
@@ -12613,6 +12819,18 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12613
12819
|
],
|
|
12614
12820
|
query: []
|
|
12615
12821
|
},
|
|
12822
|
+
{
|
|
12823
|
+
resource: "media.generation.capabilities",
|
|
12824
|
+
method: "list",
|
|
12825
|
+
summary: "Get generation capabilities",
|
|
12826
|
+
description: "Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.",
|
|
12827
|
+
http: "GET",
|
|
12828
|
+
path: "/media/v1/generation/capabilities",
|
|
12829
|
+
streaming: "no",
|
|
12830
|
+
pagination: false,
|
|
12831
|
+
pathParams: [],
|
|
12832
|
+
query: []
|
|
12833
|
+
},
|
|
12616
12834
|
{
|
|
12617
12835
|
resource: "media.libraries",
|
|
12618
12836
|
method: "list",
|
|
@@ -12837,7 +13055,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12837
13055
|
resource: "media.libraries.assets",
|
|
12838
13056
|
method: "create",
|
|
12839
13057
|
summary: "Upload asset",
|
|
12840
|
-
description: " For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13058
|
+
description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
12841
13059
|
http: "POST",
|
|
12842
13060
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
12843
13061
|
streaming: "no",
|
|
@@ -12961,7 +13179,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12961
13179
|
resource: "media.libraries.assets.import",
|
|
12962
13180
|
method: "create",
|
|
12963
13181
|
summary: "Import file",
|
|
12964
|
-
description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13182
|
+
description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
12965
13183
|
http: "POST",
|
|
12966
13184
|
path: "/media/v1/libraries/{library_id}/assets/import",
|
|
12967
13185
|
streaming: "no",
|
|
@@ -13229,7 +13447,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13229
13447
|
resource: "media.libraries.assets.reprocess",
|
|
13230
13448
|
method: "create",
|
|
13231
13449
|
summary: "Reprocess asset",
|
|
13232
|
-
description: " For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13450
|
+
description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
13233
13451
|
http: "POST",
|
|
13234
13452
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
|
|
13235
13453
|
streaming: "no",
|
|
@@ -13305,10 +13523,13 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13305
13523
|
"frame",
|
|
13306
13524
|
"overview",
|
|
13307
13525
|
"audio",
|
|
13526
|
+
"loudness",
|
|
13527
|
+
"beats",
|
|
13528
|
+
"content",
|
|
13308
13529
|
"embedding"
|
|
13309
13530
|
],
|
|
13310
13531
|
required: false,
|
|
13311
|
-
description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, and embedding reports a failed embedding step."
|
|
13532
|
+
description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, loudness is measured loudness, beats is the measured tempo and beat grid, content is the derived speech, music and silence split, and embedding reports a failed embedding step."
|
|
13312
13533
|
},
|
|
13313
13534
|
{
|
|
13314
13535
|
name: "cursor",
|
|
@@ -13328,7 +13549,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13328
13549
|
resource: "media.libraries.assets",
|
|
13329
13550
|
method: "batch",
|
|
13330
13551
|
summary: "Batch assets alias",
|
|
13331
|
-
description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13552
|
+
description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
|
|
13332
13553
|
http: "POST",
|
|
13333
13554
|
path: "/media/v1/libraries/{library_id}/assets:batch",
|
|
13334
13555
|
streaming: "no",
|
|
@@ -13363,7 +13584,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13363
13584
|
resource: "media.libraries.batches",
|
|
13364
13585
|
method: "create",
|
|
13365
13586
|
summary: "Create batch",
|
|
13366
|
-
description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13587
|
+
description: 'Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.',
|
|
13367
13588
|
http: "POST",
|
|
13368
13589
|
path: "/media/v1/libraries/{library_id}/batches",
|
|
13369
13590
|
streaming: "no",
|
|
@@ -13524,36 +13745,157 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13524
13745
|
}
|
|
13525
13746
|
]
|
|
13526
13747
|
},
|
|
13748
|
+
{
|
|
13749
|
+
resource: "media.libraries.generations",
|
|
13750
|
+
method: "create",
|
|
13751
|
+
summary: "Create video generation",
|
|
13752
|
+
description: "Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.",
|
|
13753
|
+
http: "POST",
|
|
13754
|
+
path: "/media/v1/libraries/{library_id}/generations",
|
|
13755
|
+
streaming: "no",
|
|
13756
|
+
pagination: false,
|
|
13757
|
+
pathParams: [
|
|
13758
|
+
{
|
|
13759
|
+
name: "library_id",
|
|
13760
|
+
sdkName: "library_id",
|
|
13761
|
+
description: "Library ID returned by creation."
|
|
13762
|
+
}
|
|
13763
|
+
],
|
|
13764
|
+
query: [],
|
|
13765
|
+
body: {
|
|
13766
|
+
required: true,
|
|
13767
|
+
fields: [
|
|
13768
|
+
{
|
|
13769
|
+
name: "intent",
|
|
13770
|
+
type: "string",
|
|
13771
|
+
required: true,
|
|
13772
|
+
description: "Generation operation; v1 accepts only video.generate text-to-video requests."
|
|
13773
|
+
},
|
|
13774
|
+
{
|
|
13775
|
+
name: "prompt",
|
|
13776
|
+
type: "string",
|
|
13777
|
+
required: true,
|
|
13778
|
+
description: "Text prompt describing the video to generate."
|
|
13779
|
+
},
|
|
13780
|
+
{
|
|
13781
|
+
name: "count",
|
|
13782
|
+
type: "integer",
|
|
13783
|
+
required: false,
|
|
13784
|
+
description: "Number of videos to generate; defaults to 1 and must be from 1 to 4."
|
|
13785
|
+
},
|
|
13786
|
+
{
|
|
13787
|
+
name: "duration_seconds",
|
|
13788
|
+
type: "integer",
|
|
13789
|
+
required: false,
|
|
13790
|
+
description: "Requested video duration in seconds; Router validates the model-specific supported durations."
|
|
13791
|
+
},
|
|
13792
|
+
{
|
|
13793
|
+
name: "aspect_ratio",
|
|
13794
|
+
type: "string",
|
|
13795
|
+
required: false,
|
|
13796
|
+
description: "Requested output aspect ratio; defaults to 16:9 and Router validates model support."
|
|
13797
|
+
},
|
|
13798
|
+
{
|
|
13799
|
+
name: "model",
|
|
13800
|
+
type: "string",
|
|
13801
|
+
required: false,
|
|
13802
|
+
description: "Router model with video_generation capability; defaults to wan2.7-t2v."
|
|
13803
|
+
},
|
|
13804
|
+
{
|
|
13805
|
+
name: "save",
|
|
13806
|
+
type: "string",
|
|
13807
|
+
enum: [
|
|
13808
|
+
"candidate",
|
|
13809
|
+
"library"
|
|
13810
|
+
],
|
|
13811
|
+
required: false,
|
|
13812
|
+
description: "candidate keeps outputs temporary for explicit save calls; library saves successful outputs automatically."
|
|
13813
|
+
},
|
|
13814
|
+
{
|
|
13815
|
+
name: "asset_folder",
|
|
13816
|
+
type: "string",
|
|
13817
|
+
required: false,
|
|
13818
|
+
description: "Folder for assets saved automatically or by later save calls; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
|
|
13819
|
+
},
|
|
13820
|
+
{
|
|
13821
|
+
name: "tags",
|
|
13822
|
+
type: "array",
|
|
13823
|
+
itemType: "string",
|
|
13824
|
+
required: false,
|
|
13825
|
+
description: "Tags applied when an output becomes a library asset."
|
|
13826
|
+
},
|
|
13827
|
+
{
|
|
13828
|
+
name: "understanding",
|
|
13829
|
+
type: "string",
|
|
13830
|
+
enum: [
|
|
13831
|
+
"auto",
|
|
13832
|
+
"skip"
|
|
13833
|
+
],
|
|
13834
|
+
required: false,
|
|
13835
|
+
description: "Understanding behavior when a candidate is saved as an asset; defaults to auto."
|
|
13836
|
+
},
|
|
13837
|
+
{
|
|
13838
|
+
name: "references",
|
|
13839
|
+
type: "array",
|
|
13840
|
+
itemType: "object",
|
|
13841
|
+
required: false,
|
|
13842
|
+
description: "Not supported in v1; omit this field. Only text-to-video is currently available."
|
|
13843
|
+
}
|
|
13844
|
+
]
|
|
13845
|
+
}
|
|
13846
|
+
},
|
|
13527
13847
|
{
|
|
13528
13848
|
resource: "media.libraries.jobs",
|
|
13529
|
-
method: "
|
|
13530
|
-
summary: "
|
|
13531
|
-
description: "
|
|
13849
|
+
method: "list",
|
|
13850
|
+
summary: "List jobs",
|
|
13851
|
+
description: "List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.",
|
|
13532
13852
|
http: "GET",
|
|
13533
|
-
path: "/media/v1/libraries/{library_id}/jobs
|
|
13853
|
+
path: "/media/v1/libraries/{library_id}/jobs",
|
|
13534
13854
|
streaming: "no",
|
|
13535
|
-
pagination:
|
|
13855
|
+
pagination: true,
|
|
13536
13856
|
pathParams: [
|
|
13537
13857
|
{
|
|
13538
13858
|
name: "library_id",
|
|
13539
13859
|
sdkName: "library_id",
|
|
13540
13860
|
description: "Library ID returned by creation."
|
|
13861
|
+
}
|
|
13862
|
+
],
|
|
13863
|
+
query: [
|
|
13864
|
+
{
|
|
13865
|
+
name: "status",
|
|
13866
|
+
type: "string",
|
|
13867
|
+
enum: [
|
|
13868
|
+
"queued",
|
|
13869
|
+
"running",
|
|
13870
|
+
"completed",
|
|
13871
|
+
"completed_with_errors",
|
|
13872
|
+
"failed",
|
|
13873
|
+
"cancelled"
|
|
13874
|
+
],
|
|
13875
|
+
required: false,
|
|
13876
|
+
description: "Filter jobs by their current status."
|
|
13541
13877
|
},
|
|
13542
13878
|
{
|
|
13543
|
-
name: "
|
|
13544
|
-
|
|
13545
|
-
|
|
13879
|
+
name: "limit",
|
|
13880
|
+
type: "integer",
|
|
13881
|
+
required: false,
|
|
13882
|
+
description: "Maximum entries in this page, from 1 through 100; defaults to 100."
|
|
13883
|
+
},
|
|
13884
|
+
{
|
|
13885
|
+
name: "cursor",
|
|
13886
|
+
type: "string",
|
|
13887
|
+
required: false,
|
|
13888
|
+
description: "Job id from the previous page’s next_cursor; omit for the first page."
|
|
13546
13889
|
}
|
|
13547
|
-
]
|
|
13548
|
-
query: []
|
|
13890
|
+
]
|
|
13549
13891
|
},
|
|
13550
13892
|
{
|
|
13551
|
-
resource: "media.libraries.
|
|
13552
|
-
method: "
|
|
13553
|
-
summary: "
|
|
13554
|
-
description: "
|
|
13555
|
-
http: "
|
|
13556
|
-
path: "/media/v1/libraries/{library_id}/
|
|
13893
|
+
resource: "media.libraries.jobs",
|
|
13894
|
+
method: "retrieve",
|
|
13895
|
+
summary: "Get job",
|
|
13896
|
+
description: "Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.",
|
|
13897
|
+
http: "GET",
|
|
13898
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
13557
13899
|
streaming: "no",
|
|
13558
13900
|
pagination: false,
|
|
13559
13901
|
pathParams: [
|
|
@@ -13561,17 +13903,22 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13561
13903
|
name: "library_id",
|
|
13562
13904
|
sdkName: "library_id",
|
|
13563
13905
|
description: "Library ID returned by creation."
|
|
13906
|
+
},
|
|
13907
|
+
{
|
|
13908
|
+
name: "job_id",
|
|
13909
|
+
sdkName: "job_id",
|
|
13910
|
+
description: "Job identifier returned by batch creation, video-generation creation or job listing; resolved within this library."
|
|
13564
13911
|
}
|
|
13565
13912
|
],
|
|
13566
13913
|
query: []
|
|
13567
13914
|
},
|
|
13568
13915
|
{
|
|
13569
|
-
resource: "media.libraries",
|
|
13570
|
-
method: "
|
|
13571
|
-
summary: "
|
|
13572
|
-
description: "
|
|
13916
|
+
resource: "media.libraries.jobs",
|
|
13917
|
+
method: "cancel",
|
|
13918
|
+
summary: "Cancel job",
|
|
13919
|
+
description: "Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.",
|
|
13573
13920
|
http: "POST",
|
|
13574
|
-
path: "/media/v1/libraries/{library_id}/
|
|
13921
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
13575
13922
|
streaming: "no",
|
|
13576
13923
|
pagination: false,
|
|
13577
13924
|
pathParams: [
|
|
@@ -13579,17 +13926,22 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13579
13926
|
name: "library_id",
|
|
13580
13927
|
sdkName: "library_id",
|
|
13581
13928
|
description: "Library ID returned by creation."
|
|
13929
|
+
},
|
|
13930
|
+
{
|
|
13931
|
+
name: "job_id",
|
|
13932
|
+
sdkName: "job_id",
|
|
13933
|
+
description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
|
|
13582
13934
|
}
|
|
13583
13935
|
],
|
|
13584
13936
|
query: []
|
|
13585
13937
|
},
|
|
13586
13938
|
{
|
|
13587
|
-
resource: "media.libraries.
|
|
13939
|
+
resource: "media.libraries.jobs.outputs.save",
|
|
13588
13940
|
method: "create",
|
|
13589
|
-
summary: "
|
|
13590
|
-
description: "
|
|
13941
|
+
summary: "Save generation output",
|
|
13942
|
+
description: "Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.",
|
|
13591
13943
|
http: "POST",
|
|
13592
|
-
path: "/media/v1/libraries/{library_id}/
|
|
13944
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
|
|
13593
13945
|
streaming: "no",
|
|
13594
13946
|
pagination: false,
|
|
13595
13947
|
pathParams: [
|
|
@@ -13597,50 +13949,61 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13597
13949
|
name: "library_id",
|
|
13598
13950
|
sdkName: "library_id",
|
|
13599
13951
|
description: "Library ID returned by creation."
|
|
13952
|
+
},
|
|
13953
|
+
{
|
|
13954
|
+
name: "job_id",
|
|
13955
|
+
sdkName: "job_id",
|
|
13956
|
+
description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
|
|
13957
|
+
},
|
|
13958
|
+
{
|
|
13959
|
+
name: "index",
|
|
13960
|
+
sdkName: "index",
|
|
13961
|
+
description: "Zero-based position of the candidate in the Job outputs array."
|
|
13600
13962
|
}
|
|
13601
13963
|
],
|
|
13602
13964
|
query: [],
|
|
13603
13965
|
body: {
|
|
13604
|
-
required:
|
|
13966
|
+
required: false,
|
|
13605
13967
|
fields: [
|
|
13606
13968
|
{
|
|
13607
|
-
name: "
|
|
13969
|
+
name: "public_id",
|
|
13608
13970
|
type: "string",
|
|
13609
|
-
required:
|
|
13610
|
-
description: "
|
|
13971
|
+
required: false,
|
|
13972
|
+
description: "Delivery identifier for the saved asset; defaults to gen_<job_id>_<index> and is idempotent."
|
|
13611
13973
|
},
|
|
13612
13974
|
{
|
|
13613
|
-
name: "
|
|
13975
|
+
name: "asset_folder",
|
|
13614
13976
|
type: "string",
|
|
13615
13977
|
required: false,
|
|
13616
|
-
description: "
|
|
13978
|
+
description: "Destination folder for the saved asset; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
|
|
13617
13979
|
},
|
|
13618
13980
|
{
|
|
13619
|
-
name: "
|
|
13620
|
-
type: "
|
|
13981
|
+
name: "tags",
|
|
13982
|
+
type: "array",
|
|
13983
|
+
itemType: "string",
|
|
13621
13984
|
required: false,
|
|
13622
|
-
description: "
|
|
13985
|
+
description: "Tags to apply to the saved asset."
|
|
13623
13986
|
},
|
|
13624
13987
|
{
|
|
13625
|
-
name: "
|
|
13988
|
+
name: "understanding",
|
|
13626
13989
|
type: "string",
|
|
13627
13990
|
enum: [
|
|
13628
|
-
"
|
|
13629
|
-
"
|
|
13991
|
+
"auto",
|
|
13992
|
+
"skip"
|
|
13630
13993
|
],
|
|
13631
13994
|
required: false,
|
|
13632
|
-
description: "
|
|
13995
|
+
description: "Understanding behavior for the saved asset; defaults to auto."
|
|
13633
13996
|
}
|
|
13634
13997
|
]
|
|
13635
13998
|
}
|
|
13636
13999
|
},
|
|
13637
14000
|
{
|
|
13638
|
-
resource: "media.libraries.
|
|
14001
|
+
resource: "media.libraries.purge",
|
|
13639
14002
|
method: "create",
|
|
13640
|
-
summary: "
|
|
13641
|
-
description: "
|
|
14003
|
+
summary: "Purge library",
|
|
14004
|
+
description: "List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.",
|
|
13642
14005
|
http: "POST",
|
|
13643
|
-
path: "/media/v1/libraries/{library_id}/
|
|
14006
|
+
path: "/media/v1/libraries/{library_id}/purge",
|
|
13644
14007
|
streaming: "no",
|
|
13645
14008
|
pagination: false,
|
|
13646
14009
|
pathParams: [
|
|
@@ -13650,69 +14013,156 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13650
14013
|
description: "Library ID returned by creation."
|
|
13651
14014
|
}
|
|
13652
14015
|
],
|
|
13653
|
-
query: []
|
|
13654
|
-
body: {
|
|
13655
|
-
required: true,
|
|
13656
|
-
fields: [
|
|
13657
|
-
{
|
|
13658
|
-
name: "expression",
|
|
13659
|
-
type: "string",
|
|
13660
|
-
required: false,
|
|
13661
|
-
description: 'Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context. Quality filters: flags:watermark matches any current shot with a watermark; flags.watermark:false requires an assessed video with no positive watermark judgment. The same syntax supports slideshow, hand_frame, text_sticker and low_quality. folder_mismatch:true selects lexical folder/location hints. Geometry filters support width, height, resolution:1920x1080, numeric aspect_ratio (width/height), and orientation:landscape, portrait or square. Missing geometry or unassessed legacy flags do not match positive filters. has_music:true AND audio_genre:jazz AND audio_mood:calm selects current-version audio profiles with music and matching model labels; has_music:false applies only to sampled ranges, not the entire source. failure_code=UPSTREAM_FAILED selects assets with a current failed understanding carrying that code; combine with processing_state=failed or processing_state=partial.'
|
|
13662
|
-
},
|
|
13663
|
-
{
|
|
13664
|
-
name: "sort_by",
|
|
13665
|
-
type: "array",
|
|
13666
|
-
itemType: "object",
|
|
13667
|
-
required: false,
|
|
13668
|
-
description: "Ordered list of single-field sort objects. Allowed fields are created_at, public_id, display_name, bytes and uploaded_at; directions are asc or desc. Fields cannot repeat. Defaults to created_at descending."
|
|
13669
|
-
},
|
|
13670
|
-
{
|
|
13671
|
-
name: "max_results",
|
|
13672
|
-
type: "integer",
|
|
13673
|
-
required: false,
|
|
13674
|
-
description: "Maximum assets per page, from 1 to 500; defaults to 100."
|
|
13675
|
-
},
|
|
13676
|
-
{
|
|
13677
|
-
name: "next_cursor",
|
|
13678
|
-
type: "string",
|
|
13679
|
-
required: false,
|
|
13680
|
-
description: "Continuation token returned by the previous expression-search page. Keep sort_by unchanged when continuing."
|
|
13681
|
-
},
|
|
13682
|
-
{
|
|
13683
|
-
name: "with_field",
|
|
13684
|
-
type: "array",
|
|
13685
|
-
itemType: "string",
|
|
13686
|
-
enum: [
|
|
13687
|
-
"tags",
|
|
13688
|
-
"context"
|
|
13689
|
-
],
|
|
13690
|
-
required: false,
|
|
13691
|
-
description: "Additional resource fields to include: tags adds asset labels and context adds custom metadata. Both are omitted unless requested."
|
|
13692
|
-
},
|
|
13693
|
-
{
|
|
13694
|
-
name: "aggregate",
|
|
13695
|
-
type: "array",
|
|
13696
|
-
itemType: "string",
|
|
13697
|
-
enum: [
|
|
13698
|
-
"resource_type",
|
|
13699
|
-
"format",
|
|
13700
|
-
"asset_folder",
|
|
13701
|
-
"processing_state"
|
|
13702
|
-
],
|
|
13703
|
-
required: false,
|
|
13704
|
-
description: "Facets to count over matching assets, returned under aggregations."
|
|
13705
|
-
}
|
|
13706
|
-
]
|
|
13707
|
-
}
|
|
14016
|
+
query: []
|
|
13708
14017
|
},
|
|
13709
14018
|
{
|
|
13710
|
-
resource: "media.libraries
|
|
14019
|
+
resource: "media.libraries",
|
|
14020
|
+
method: "restore",
|
|
14021
|
+
summary: "Restore library",
|
|
14022
|
+
description: "Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.",
|
|
14023
|
+
http: "POST",
|
|
14024
|
+
path: "/media/v1/libraries/{library_id}/restore",
|
|
14025
|
+
streaming: "no",
|
|
14026
|
+
pagination: false,
|
|
14027
|
+
pathParams: [
|
|
14028
|
+
{
|
|
14029
|
+
name: "library_id",
|
|
14030
|
+
sdkName: "library_id",
|
|
14031
|
+
description: "Library ID returned by creation."
|
|
14032
|
+
}
|
|
14033
|
+
],
|
|
14034
|
+
query: []
|
|
14035
|
+
},
|
|
14036
|
+
{
|
|
14037
|
+
resource: "media.libraries.search",
|
|
13711
14038
|
method: "create",
|
|
13712
|
-
summary: "Semantic search",
|
|
13713
|
-
description: "
|
|
14039
|
+
summary: "Semantic search alias",
|
|
14040
|
+
description: "List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.",
|
|
13714
14041
|
http: "POST",
|
|
13715
|
-
path: "/media/v1/libraries/{library_id}/search
|
|
14042
|
+
path: "/media/v1/libraries/{library_id}/search",
|
|
14043
|
+
streaming: "no",
|
|
14044
|
+
pagination: false,
|
|
14045
|
+
pathParams: [
|
|
14046
|
+
{
|
|
14047
|
+
name: "library_id",
|
|
14048
|
+
sdkName: "library_id",
|
|
14049
|
+
description: "Library ID returned by creation."
|
|
14050
|
+
}
|
|
14051
|
+
],
|
|
14052
|
+
query: [],
|
|
14053
|
+
body: {
|
|
14054
|
+
required: true,
|
|
14055
|
+
fields: [
|
|
14056
|
+
{
|
|
14057
|
+
name: "query",
|
|
14058
|
+
type: "string",
|
|
14059
|
+
required: true,
|
|
14060
|
+
description: "Nonblank text to search against asset content and metadata."
|
|
14061
|
+
},
|
|
14062
|
+
{
|
|
14063
|
+
name: "filter",
|
|
14064
|
+
type: "string",
|
|
14065
|
+
required: false,
|
|
14066
|
+
description: "Optional expression filter restricting eligible assets; uses the expression-search syntax."
|
|
14067
|
+
},
|
|
14068
|
+
{
|
|
14069
|
+
name: "top_k",
|
|
14070
|
+
type: "integer",
|
|
14071
|
+
required: false,
|
|
14072
|
+
description: "Maximum search hits, from 1 to 50; defaults to 20."
|
|
14073
|
+
},
|
|
14074
|
+
{
|
|
14075
|
+
name: "mode",
|
|
14076
|
+
type: "string",
|
|
14077
|
+
enum: [
|
|
14078
|
+
"hybrid",
|
|
14079
|
+
"semantic"
|
|
14080
|
+
],
|
|
14081
|
+
required: false,
|
|
14082
|
+
description: "Ranking mode: hybrid combines semantic and keyword matches; semantic uses vector similarity only. Defaults to hybrid."
|
|
14083
|
+
}
|
|
14084
|
+
]
|
|
14085
|
+
}
|
|
14086
|
+
},
|
|
14087
|
+
{
|
|
14088
|
+
resource: "media.libraries.search.expression",
|
|
14089
|
+
method: "create",
|
|
14090
|
+
summary: "Expression search",
|
|
14091
|
+
description: "Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.",
|
|
14092
|
+
http: "POST",
|
|
14093
|
+
path: "/media/v1/libraries/{library_id}/search/expression",
|
|
14094
|
+
streaming: "no",
|
|
14095
|
+
pagination: false,
|
|
14096
|
+
pathParams: [
|
|
14097
|
+
{
|
|
14098
|
+
name: "library_id",
|
|
14099
|
+
sdkName: "library_id",
|
|
14100
|
+
description: "Library ID returned by creation."
|
|
14101
|
+
}
|
|
14102
|
+
],
|
|
14103
|
+
query: [],
|
|
14104
|
+
body: {
|
|
14105
|
+
required: true,
|
|
14106
|
+
fields: [
|
|
14107
|
+
{
|
|
14108
|
+
name: "expression",
|
|
14109
|
+
type: "string",
|
|
14110
|
+
required: false,
|
|
14111
|
+
description: 'Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context. Quality filters: flags:watermark matches any current shot with a watermark; flags.watermark:false requires an assessed video with no positive watermark judgment. The same syntax supports slideshow, hand_frame, text_sticker and low_quality. folder_mismatch:true selects lexical folder/location hints. Geometry filters support width, height, resolution:1920x1080, numeric aspect_ratio (width/height), and orientation:landscape, portrait or square. Missing geometry or unassessed legacy flags do not match positive filters. has_music:true AND audio_genre:jazz AND audio_mood:calm selects current-version audio profiles with music and matching model labels; has_music:false applies only to sampled ranges, not the entire source. failure_code=UPSTREAM_FAILED selects assets with a current failed understanding carrying that code; combine with processing_state=failed or processing_state=partial.'
|
|
14112
|
+
},
|
|
14113
|
+
{
|
|
14114
|
+
name: "sort_by",
|
|
14115
|
+
type: "array",
|
|
14116
|
+
itemType: "object",
|
|
14117
|
+
required: false,
|
|
14118
|
+
description: "Ordered list of single-field sort objects. Allowed fields are created_at, public_id, display_name, bytes and uploaded_at; directions are asc or desc. Fields cannot repeat. Defaults to created_at descending."
|
|
14119
|
+
},
|
|
14120
|
+
{
|
|
14121
|
+
name: "max_results",
|
|
14122
|
+
type: "integer",
|
|
14123
|
+
required: false,
|
|
14124
|
+
description: "Maximum assets per page, from 1 to 500; defaults to 100."
|
|
14125
|
+
},
|
|
14126
|
+
{
|
|
14127
|
+
name: "next_cursor",
|
|
14128
|
+
type: "string",
|
|
14129
|
+
required: false,
|
|
14130
|
+
description: "Continuation token returned by the previous expression-search page. Keep sort_by unchanged when continuing."
|
|
14131
|
+
},
|
|
14132
|
+
{
|
|
14133
|
+
name: "with_field",
|
|
14134
|
+
type: "array",
|
|
14135
|
+
itemType: "string",
|
|
14136
|
+
enum: [
|
|
14137
|
+
"tags",
|
|
14138
|
+
"context"
|
|
14139
|
+
],
|
|
14140
|
+
required: false,
|
|
14141
|
+
description: "Additional resource fields to include: tags adds asset labels and context adds custom metadata. Both are omitted unless requested."
|
|
14142
|
+
},
|
|
14143
|
+
{
|
|
14144
|
+
name: "aggregate",
|
|
14145
|
+
type: "array",
|
|
14146
|
+
itemType: "string",
|
|
14147
|
+
enum: [
|
|
14148
|
+
"resource_type",
|
|
14149
|
+
"format",
|
|
14150
|
+
"asset_folder",
|
|
14151
|
+
"processing_state"
|
|
14152
|
+
],
|
|
14153
|
+
required: false,
|
|
14154
|
+
description: "Facets to count over matching assets, returned under aggregations."
|
|
14155
|
+
}
|
|
14156
|
+
]
|
|
14157
|
+
}
|
|
14158
|
+
},
|
|
14159
|
+
{
|
|
14160
|
+
resource: "media.libraries.search.semantic",
|
|
14161
|
+
method: "create",
|
|
14162
|
+
summary: "Semantic search",
|
|
14163
|
+
description: "Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.",
|
|
14164
|
+
http: "POST",
|
|
14165
|
+
path: "/media/v1/libraries/{library_id}/search/semantic",
|
|
13716
14166
|
streaming: "no",
|
|
13717
14167
|
pagination: false,
|
|
13718
14168
|
pathParams: [
|
|
@@ -13831,7 +14281,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13831
14281
|
name: "kinds",
|
|
13832
14282
|
type: "string",
|
|
13833
14283
|
required: false,
|
|
13834
|
-
description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, embedding. Omit or empty to include every kind."
|
|
14284
|
+
description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, loudness, beats, content, embedding. Omit or empty to include every kind."
|
|
13835
14285
|
},
|
|
13836
14286
|
{
|
|
13837
14287
|
name: "cursor",
|
|
@@ -16347,6 +16797,539 @@ for more details.`
|
|
|
16347
16797
|
],
|
|
16348
16798
|
query: []
|
|
16349
16799
|
},
|
|
16800
|
+
{
|
|
16801
|
+
resource: "ontology.changesets",
|
|
16802
|
+
method: "create",
|
|
16803
|
+
summary: "Apply changeset",
|
|
16804
|
+
description: "Apply a batch of node, relation and invalidation operations as one transaction, when a mirror has several records to write together and a partial write would leave the graph inconsistent. Every operation succeeds or none is applied. Send an Idempotency-Key header; the same key with the same content replays the first result, and the same key with different content is ONTOLOGY_CONFLICT.",
|
|
16805
|
+
http: "POST",
|
|
16806
|
+
path: "/ontology/v1/changesets",
|
|
16807
|
+
streaming: "no",
|
|
16808
|
+
pagination: false,
|
|
16809
|
+
pathParams: [],
|
|
16810
|
+
query: [],
|
|
16811
|
+
body: {
|
|
16812
|
+
required: true,
|
|
16813
|
+
fields: [
|
|
16814
|
+
{
|
|
16815
|
+
name: "at",
|
|
16816
|
+
type: "string",
|
|
16817
|
+
required: true,
|
|
16818
|
+
description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
|
|
16819
|
+
},
|
|
16820
|
+
{
|
|
16821
|
+
name: "scope",
|
|
16822
|
+
type: "string",
|
|
16823
|
+
required: false,
|
|
16824
|
+
description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
|
|
16825
|
+
},
|
|
16826
|
+
{
|
|
16827
|
+
name: "ops",
|
|
16828
|
+
type: "array",
|
|
16829
|
+
itemType: "object",
|
|
16830
|
+
required: true,
|
|
16831
|
+
description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
|
|
16832
|
+
}
|
|
16833
|
+
]
|
|
16834
|
+
}
|
|
16835
|
+
},
|
|
16836
|
+
{
|
|
16837
|
+
resource: "ontology.nodes",
|
|
16838
|
+
method: "list",
|
|
16839
|
+
summary: "List nodes",
|
|
16840
|
+
description: "Discover the entities in this organization's graph and obtain node ids for retrieval, updates and relations. Filter by type, by free text over names, aliases, descriptions and facts, or by owner; limit is 1–100 and defaults to 50. Omit cursor for the first page, then copy next_cursor into the next request until it is null. A node whose content belongs to somebody else comes back as a restricted entry carrying only its id, type and name.",
|
|
16841
|
+
http: "GET",
|
|
16842
|
+
path: "/ontology/v1/nodes",
|
|
16843
|
+
streaming: "no",
|
|
16844
|
+
pagination: true,
|
|
16845
|
+
pathParams: [],
|
|
16846
|
+
query: [
|
|
16847
|
+
{
|
|
16848
|
+
name: "type",
|
|
16849
|
+
type: "array",
|
|
16850
|
+
itemType: "string",
|
|
16851
|
+
required: false,
|
|
16852
|
+
description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
|
|
16853
|
+
},
|
|
16854
|
+
{
|
|
16855
|
+
name: "q",
|
|
16856
|
+
type: "string",
|
|
16857
|
+
required: false,
|
|
16858
|
+
description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
|
|
16859
|
+
},
|
|
16860
|
+
{
|
|
16861
|
+
name: "owner",
|
|
16862
|
+
type: "string",
|
|
16863
|
+
required: false,
|
|
16864
|
+
description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
|
|
16865
|
+
},
|
|
16866
|
+
{
|
|
16867
|
+
name: "as_of",
|
|
16868
|
+
type: "string",
|
|
16869
|
+
required: false,
|
|
16870
|
+
description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
|
|
16871
|
+
},
|
|
16872
|
+
{
|
|
16873
|
+
name: "limit",
|
|
16874
|
+
type: "integer",
|
|
16875
|
+
required: false,
|
|
16876
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
16877
|
+
},
|
|
16878
|
+
{
|
|
16879
|
+
name: "cursor",
|
|
16880
|
+
type: "string",
|
|
16881
|
+
required: false,
|
|
16882
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
16883
|
+
}
|
|
16884
|
+
]
|
|
16885
|
+
},
|
|
16886
|
+
{
|
|
16887
|
+
resource: "ontology.nodes",
|
|
16888
|
+
method: "create",
|
|
16889
|
+
summary: "Create node",
|
|
16890
|
+
description: "Record one entity in the graph, for a system mirroring a record it owns. type must already be registered and ref, when given, must match that type's ref_prefix. Send an Idempotency-Key header; repeating the same key with the same content returns the first result instead of creating a second node. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.",
|
|
16891
|
+
http: "POST",
|
|
16892
|
+
path: "/ontology/v1/nodes",
|
|
16893
|
+
streaming: "no",
|
|
16894
|
+
pagination: false,
|
|
16895
|
+
pathParams: [],
|
|
16896
|
+
query: [],
|
|
16897
|
+
body: {
|
|
16898
|
+
required: true,
|
|
16899
|
+
fields: [
|
|
16900
|
+
{
|
|
16901
|
+
name: "type",
|
|
16902
|
+
type: "string",
|
|
16903
|
+
required: true,
|
|
16904
|
+
description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
|
|
16905
|
+
},
|
|
16906
|
+
{
|
|
16907
|
+
name: "ref",
|
|
16908
|
+
type: "string",
|
|
16909
|
+
required: false,
|
|
16910
|
+
description: "Id of the mirrored record in the owning service, which must start with the type's ref_prefix; omit or null for a concept with no external record."
|
|
16911
|
+
},
|
|
16912
|
+
{
|
|
16913
|
+
name: "name",
|
|
16914
|
+
type: "string",
|
|
16915
|
+
required: true,
|
|
16916
|
+
description: "Display name of the entity, at most 200 characters."
|
|
16917
|
+
},
|
|
16918
|
+
{
|
|
16919
|
+
name: "aliases",
|
|
16920
|
+
type: "array",
|
|
16921
|
+
itemType: "string",
|
|
16922
|
+
required: false,
|
|
16923
|
+
description: "Other names this entity is known by; they are matched by search alongside the name."
|
|
16924
|
+
},
|
|
16925
|
+
{
|
|
16926
|
+
name: "description",
|
|
16927
|
+
type: "string",
|
|
16928
|
+
required: false,
|
|
16929
|
+
description: "Profile of the entity, at most 500 characters; omit or null for none."
|
|
16930
|
+
},
|
|
16931
|
+
{
|
|
16932
|
+
name: "owner",
|
|
16933
|
+
type: "string",
|
|
16934
|
+
required: false,
|
|
16935
|
+
description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
|
|
16936
|
+
}
|
|
16937
|
+
]
|
|
16938
|
+
}
|
|
16939
|
+
},
|
|
16940
|
+
{
|
|
16941
|
+
resource: "ontology.nodes",
|
|
16942
|
+
method: "retrieve",
|
|
16943
|
+
summary: "Retrieve node",
|
|
16944
|
+
description: "Read one node's content and, with expand=relations, every relation on and around it. as_of reads the node as it was at that time. A node id from another organization, or one that never existed, answers ONTOLOGY_NODE_NOT_FOUND; a node you may reach but not read returns restricted true with its name only.",
|
|
16945
|
+
http: "GET",
|
|
16946
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16947
|
+
streaming: "no",
|
|
16948
|
+
pagination: false,
|
|
16949
|
+
pathParams: [
|
|
16950
|
+
{
|
|
16951
|
+
name: "node_id",
|
|
16952
|
+
sdkName: "node_id",
|
|
16953
|
+
description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
|
|
16954
|
+
}
|
|
16955
|
+
],
|
|
16956
|
+
query: [
|
|
16957
|
+
{
|
|
16958
|
+
name: "expand",
|
|
16959
|
+
type: "string",
|
|
16960
|
+
enum: [
|
|
16961
|
+
"relations"
|
|
16962
|
+
],
|
|
16963
|
+
required: false,
|
|
16964
|
+
description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
|
|
16965
|
+
},
|
|
16966
|
+
{
|
|
16967
|
+
name: "as_of",
|
|
16968
|
+
type: "string",
|
|
16969
|
+
required: false,
|
|
16970
|
+
description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
|
|
16971
|
+
}
|
|
16972
|
+
]
|
|
16973
|
+
},
|
|
16974
|
+
{
|
|
16975
|
+
resource: "ontology.nodes",
|
|
16976
|
+
method: "update",
|
|
16977
|
+
summary: "Update node",
|
|
16978
|
+
description: "Change a node's name, aliases or description when the mirrored record was renamed, without touching its type or identity. Send only the fields to change; omitted fields keep their current values and an explicitly null description clears it. Repeating the same edit converges on the same node, so this needs no Idempotency-Key.",
|
|
16979
|
+
http: "PATCH",
|
|
16980
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16981
|
+
streaming: "no",
|
|
16982
|
+
pagination: false,
|
|
16983
|
+
pathParams: [
|
|
16984
|
+
{
|
|
16985
|
+
name: "node_id",
|
|
16986
|
+
sdkName: "node_id",
|
|
16987
|
+
description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
|
|
16988
|
+
}
|
|
16989
|
+
],
|
|
16990
|
+
query: [],
|
|
16991
|
+
body: {
|
|
16992
|
+
required: true,
|
|
16993
|
+
fields: [
|
|
16994
|
+
{
|
|
16995
|
+
name: "name",
|
|
16996
|
+
type: "string",
|
|
16997
|
+
required: false,
|
|
16998
|
+
description: "New display name, at most 200 characters; omit to keep the current name."
|
|
16999
|
+
},
|
|
17000
|
+
{
|
|
17001
|
+
name: "aliases",
|
|
17002
|
+
type: "array",
|
|
17003
|
+
itemType: "string",
|
|
17004
|
+
required: false,
|
|
17005
|
+
description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
|
|
17006
|
+
},
|
|
17007
|
+
{
|
|
17008
|
+
name: "description",
|
|
17009
|
+
type: "string",
|
|
17010
|
+
required: false,
|
|
17011
|
+
description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
|
|
17012
|
+
}
|
|
17013
|
+
]
|
|
17014
|
+
}
|
|
17015
|
+
},
|
|
17016
|
+
{
|
|
17017
|
+
resource: "ontology.nodes.merge",
|
|
17018
|
+
method: "create",
|
|
17019
|
+
summary: "Merge node",
|
|
17020
|
+
description: "Fold a duplicate node into the node that should survive, when two records are discovered to be the same entity. The merged node's relations and aliases move to the survivor and later reads of the duplicate resolve to it. Send an Idempotency-Key header; repeating the same key replays the first result. Reversal is a staff operation, not available here.",
|
|
17021
|
+
http: "POST",
|
|
17022
|
+
path: "/ontology/v1/nodes/{node_id}/merge",
|
|
17023
|
+
streaming: "no",
|
|
17024
|
+
pagination: false,
|
|
17025
|
+
pathParams: [
|
|
17026
|
+
{
|
|
17027
|
+
name: "node_id",
|
|
17028
|
+
sdkName: "node_id",
|
|
17029
|
+
description: "Node id returned by nodes.list, nodes.create or a changeset, in the form ond_ followed by 32 lowercase letters or digits; a name or an external record id is not accepted."
|
|
17030
|
+
}
|
|
17031
|
+
],
|
|
17032
|
+
query: [],
|
|
17033
|
+
body: {
|
|
17034
|
+
required: true,
|
|
17035
|
+
fields: [
|
|
17036
|
+
{
|
|
17037
|
+
name: "into",
|
|
17038
|
+
type: "string",
|
|
17039
|
+
required: true,
|
|
17040
|
+
description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
|
|
17041
|
+
}
|
|
17042
|
+
]
|
|
17043
|
+
}
|
|
17044
|
+
},
|
|
17045
|
+
{
|
|
17046
|
+
resource: "ontology.relations",
|
|
17047
|
+
method: "list",
|
|
17048
|
+
summary: "List relations",
|
|
17049
|
+
description: "Read the facts in the graph and obtain relation ids for retrieval, invalidation or spreading. Filter by endpoint node, by type and by direction; as_of reads the relations as they were then. Invalidated relations are omitted unless include_invalid is true. limit is 1–100 and defaults to 50; follow next_cursor until it is null.",
|
|
17050
|
+
http: "GET",
|
|
17051
|
+
path: "/ontology/v1/relations",
|
|
17052
|
+
streaming: "no",
|
|
17053
|
+
pagination: true,
|
|
17054
|
+
pathParams: [],
|
|
17055
|
+
query: [
|
|
17056
|
+
{
|
|
17057
|
+
name: "node",
|
|
17058
|
+
type: "string",
|
|
17059
|
+
required: false,
|
|
17060
|
+
description: "A node id from nodes.list or nodes.create; returns the relations this node takes part in, narrowed by direction. Omit to list relations between every node."
|
|
17061
|
+
},
|
|
17062
|
+
{
|
|
17063
|
+
name: "type",
|
|
17064
|
+
type: "array",
|
|
17065
|
+
itemType: "string",
|
|
17066
|
+
required: false,
|
|
17067
|
+
description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
|
|
17068
|
+
},
|
|
17069
|
+
{
|
|
17070
|
+
name: "direction",
|
|
17071
|
+
type: "string",
|
|
17072
|
+
enum: [
|
|
17073
|
+
"out",
|
|
17074
|
+
"in",
|
|
17075
|
+
"both"
|
|
17076
|
+
],
|
|
17077
|
+
required: false,
|
|
17078
|
+
description: "Which side of node to follow; out returns relations the node is the source of, in returns those it is the target of. Only meaningful together with node."
|
|
17079
|
+
},
|
|
17080
|
+
{
|
|
17081
|
+
name: "as_of",
|
|
17082
|
+
type: "string",
|
|
17083
|
+
required: false,
|
|
17084
|
+
description: "ISO 8601 timestamp; read relations as they were then, so one recorded or invalidated later is judged by that time. Omit to read current state."
|
|
17085
|
+
},
|
|
17086
|
+
{
|
|
17087
|
+
name: "include_invalid",
|
|
17088
|
+
type: "boolean",
|
|
17089
|
+
required: false,
|
|
17090
|
+
description: "Set true to include relations whose invalid_at has passed, which is how a relation that stopped being true stays readable. Omit or false for currently valid relations only."
|
|
17091
|
+
},
|
|
17092
|
+
{
|
|
17093
|
+
name: "limit",
|
|
17094
|
+
type: "integer",
|
|
17095
|
+
required: false,
|
|
17096
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
17097
|
+
},
|
|
17098
|
+
{
|
|
17099
|
+
name: "cursor",
|
|
17100
|
+
type: "string",
|
|
17101
|
+
required: false,
|
|
17102
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
17103
|
+
}
|
|
17104
|
+
]
|
|
17105
|
+
},
|
|
17106
|
+
{
|
|
17107
|
+
resource: "ontology.relations",
|
|
17108
|
+
method: "create",
|
|
17109
|
+
summary: "Create relation",
|
|
17110
|
+
description: "Record one fact between two existing nodes, for a system mirroring a relationship it owns. type must be registered and must admit these endpoints; fact states the relationship in one sentence. Send an Idempotency-Key header; repeating the same key returns the first result instead of writing a second relation. This writes structure only — to give an agent something to remember, use POST /agent/v1/agents/{agent_id}/consolidations.",
|
|
17111
|
+
http: "POST",
|
|
17112
|
+
path: "/ontology/v1/relations",
|
|
17113
|
+
streaming: "no",
|
|
17114
|
+
pagination: false,
|
|
17115
|
+
pathParams: [],
|
|
17116
|
+
query: [],
|
|
17117
|
+
body: {
|
|
17118
|
+
required: true,
|
|
17119
|
+
fields: [
|
|
17120
|
+
{
|
|
17121
|
+
name: "type",
|
|
17122
|
+
type: "string",
|
|
17123
|
+
required: true,
|
|
17124
|
+
description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
|
|
17125
|
+
},
|
|
17126
|
+
{
|
|
17127
|
+
name: "source",
|
|
17128
|
+
type: "string",
|
|
17129
|
+
required: true,
|
|
17130
|
+
description: "Node id the fact starts from, from nodes.list or nodes.create."
|
|
17131
|
+
},
|
|
17132
|
+
{
|
|
17133
|
+
name: "target",
|
|
17134
|
+
type: "string",
|
|
17135
|
+
required: true,
|
|
17136
|
+
description: "Node id the fact points at, from nodes.list or nodes.create."
|
|
17137
|
+
},
|
|
17138
|
+
{
|
|
17139
|
+
name: "fact",
|
|
17140
|
+
type: "string",
|
|
17141
|
+
required: true,
|
|
17142
|
+
description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
|
|
17143
|
+
},
|
|
17144
|
+
{
|
|
17145
|
+
name: "valid_at",
|
|
17146
|
+
type: "string",
|
|
17147
|
+
required: false,
|
|
17148
|
+
description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
|
|
17149
|
+
},
|
|
17150
|
+
{
|
|
17151
|
+
name: "owner",
|
|
17152
|
+
type: "string",
|
|
17153
|
+
required: false,
|
|
17154
|
+
description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
|
|
17155
|
+
}
|
|
17156
|
+
]
|
|
17157
|
+
}
|
|
17158
|
+
},
|
|
17159
|
+
{
|
|
17160
|
+
resource: "ontology.relations",
|
|
17161
|
+
method: "retrieve",
|
|
17162
|
+
summary: "Retrieve relation",
|
|
17163
|
+
description: "Read one relation's fact and both of its clocks — valid_at and invalid_at for when it was true in the world, created_at and expired_at for when it was recorded and retired. An id from another organization, or one that never existed, answers ONTOLOGY_EDGE_NOT_FOUND.",
|
|
17164
|
+
http: "GET",
|
|
17165
|
+
path: "/ontology/v1/relations/{relation_id}",
|
|
17166
|
+
streaming: "no",
|
|
17167
|
+
pagination: false,
|
|
17168
|
+
pathParams: [
|
|
17169
|
+
{
|
|
17170
|
+
name: "relation_id",
|
|
17171
|
+
sdkName: "relation_id",
|
|
17172
|
+
description: "Relation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted."
|
|
17173
|
+
}
|
|
17174
|
+
],
|
|
17175
|
+
query: []
|
|
17176
|
+
},
|
|
17177
|
+
{
|
|
17178
|
+
resource: "ontology.relations.invalidate",
|
|
17179
|
+
method: "create",
|
|
17180
|
+
summary: "Invalidate relation",
|
|
17181
|
+
description: "Mark a relation as no longer true from a world time, when the mirrored record changed. The relation is kept — invalid_at moves and the relation still reads at an earlier as_of, so history stays answerable. Send an Idempotency-Key header; repeating the same key replays the first result. There is no delete.",
|
|
17182
|
+
http: "POST",
|
|
17183
|
+
path: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
17184
|
+
streaming: "no",
|
|
17185
|
+
pagination: false,
|
|
17186
|
+
pathParams: [
|
|
17187
|
+
{
|
|
17188
|
+
name: "relation_id",
|
|
17189
|
+
sdkName: "relation_id",
|
|
17190
|
+
description: "Relation id returned by relations.list, relations.create or a changeset, in the form oed_ followed by 32 lowercase letters or digits; a node id is not accepted."
|
|
17191
|
+
}
|
|
17192
|
+
],
|
|
17193
|
+
query: [],
|
|
17194
|
+
body: {
|
|
17195
|
+
required: true,
|
|
17196
|
+
fields: [
|
|
17197
|
+
{
|
|
17198
|
+
name: "invalid_at",
|
|
17199
|
+
type: "string",
|
|
17200
|
+
required: true,
|
|
17201
|
+
description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
|
|
17202
|
+
},
|
|
17203
|
+
{
|
|
17204
|
+
name: "superseded_by",
|
|
17205
|
+
type: "string",
|
|
17206
|
+
required: false,
|
|
17207
|
+
description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
|
|
17208
|
+
},
|
|
17209
|
+
{
|
|
17210
|
+
name: "reason",
|
|
17211
|
+
type: "string",
|
|
17212
|
+
required: false,
|
|
17213
|
+
description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
|
|
17214
|
+
}
|
|
17215
|
+
]
|
|
17216
|
+
}
|
|
17217
|
+
},
|
|
17218
|
+
{
|
|
17219
|
+
resource: "ontology.search",
|
|
17220
|
+
method: "create",
|
|
17221
|
+
summary: "Search nodes",
|
|
17222
|
+
description: "Resolve text to the nodes it most likely names, when a mirror holds a name and needs the node id it corresponds to. Results are ranked candidates, not an answer, each reporting whether the match came from the node's name, an alias, its description or a relation's fact. Narrow with types, and cap the result count with limit (1–50, default 20). This reads structure; it is not an agent recall — agents recall through POST /agent/v1/agents/{agent_id}/consolidations.",
|
|
17223
|
+
http: "POST",
|
|
17224
|
+
path: "/ontology/v1/search",
|
|
17225
|
+
streaming: "no",
|
|
17226
|
+
pagination: false,
|
|
17227
|
+
pathParams: [],
|
|
17228
|
+
query: [],
|
|
17229
|
+
body: {
|
|
17230
|
+
required: true,
|
|
17231
|
+
fields: [
|
|
17232
|
+
{
|
|
17233
|
+
name: "text",
|
|
17234
|
+
type: "string",
|
|
17235
|
+
required: true,
|
|
17236
|
+
description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
|
|
17237
|
+
},
|
|
17238
|
+
{
|
|
17239
|
+
name: "types",
|
|
17240
|
+
type: "array",
|
|
17241
|
+
itemType: "string",
|
|
17242
|
+
required: false,
|
|
17243
|
+
description: "Registered node type names to search within; omit to search every type."
|
|
17244
|
+
},
|
|
17245
|
+
{
|
|
17246
|
+
name: "window",
|
|
17247
|
+
type: "object",
|
|
17248
|
+
required: false,
|
|
17249
|
+
description: "Restrict matches to facts recorded within a period; omit to search all time."
|
|
17250
|
+
},
|
|
17251
|
+
{
|
|
17252
|
+
name: "limit",
|
|
17253
|
+
type: "integer",
|
|
17254
|
+
required: false,
|
|
17255
|
+
description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
|
|
17256
|
+
}
|
|
17257
|
+
]
|
|
17258
|
+
}
|
|
17259
|
+
},
|
|
17260
|
+
{
|
|
17261
|
+
resource: "ontology.types",
|
|
17262
|
+
method: "list",
|
|
17263
|
+
summary: "List types",
|
|
17264
|
+
description: "Read the node and relation types registered for this organization before writing, so a create names a type the graph accepts. Each entry is one registrant's registration with its owner, version and definitions. Types cannot be created at runtime; they are registered by the owning service at deploy time, so a type missing here is not available to write.",
|
|
17265
|
+
http: "GET",
|
|
17266
|
+
path: "/ontology/v1/types",
|
|
17267
|
+
streaming: "no",
|
|
17268
|
+
pagination: false,
|
|
17269
|
+
pathParams: [],
|
|
17270
|
+
query: []
|
|
17271
|
+
},
|
|
17272
|
+
{
|
|
17273
|
+
resource: "ontology.types",
|
|
17274
|
+
method: "create",
|
|
17275
|
+
summary: "Register type",
|
|
17276
|
+
description: "Register a node or relation type for this organization. Not open yet — this call currently answers 501 NOT_IMPLEMENTED and writes nothing, because a registration is checked and stored by the deploy gate that ships the registering service, not by a runtime call. Until it opens, read the types already in force with praxis.ontology.types.list and create records only of those types.",
|
|
17277
|
+
http: "POST",
|
|
17278
|
+
path: "/ontology/v1/types",
|
|
17279
|
+
streaming: "no",
|
|
17280
|
+
pagination: false,
|
|
17281
|
+
pathParams: [],
|
|
17282
|
+
query: [],
|
|
17283
|
+
body: {
|
|
17284
|
+
required: true,
|
|
17285
|
+
fields: [
|
|
17286
|
+
{
|
|
17287
|
+
name: "owner",
|
|
17288
|
+
type: "string",
|
|
17289
|
+
required: true,
|
|
17290
|
+
description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
|
|
17291
|
+
},
|
|
17292
|
+
{
|
|
17293
|
+
name: "version",
|
|
17294
|
+
type: "integer",
|
|
17295
|
+
required: true,
|
|
17296
|
+
description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
|
|
17297
|
+
},
|
|
17298
|
+
{
|
|
17299
|
+
name: "nodes",
|
|
17300
|
+
type: "array",
|
|
17301
|
+
itemType: "object",
|
|
17302
|
+
required: true,
|
|
17303
|
+
description: "Node types this owner registers."
|
|
17304
|
+
},
|
|
17305
|
+
{
|
|
17306
|
+
name: "edges",
|
|
17307
|
+
type: "array",
|
|
17308
|
+
itemType: "object",
|
|
17309
|
+
required: true,
|
|
17310
|
+
description: "Relation types this owner registers."
|
|
17311
|
+
}
|
|
17312
|
+
]
|
|
17313
|
+
}
|
|
17314
|
+
},
|
|
17315
|
+
{
|
|
17316
|
+
resource: "ontology.types",
|
|
17317
|
+
method: "retrieve",
|
|
17318
|
+
summary: "Retrieve type",
|
|
17319
|
+
description: "Read one registered type's definition before writing a record of it, to learn whether it is a node or an edge, which endpoints an edge type admits, and which origins it accepts. The name comes from types.list; a name that is not registered answers ONTOLOGY_TYPE_UNKNOWN, and writes of that type are refused.",
|
|
17320
|
+
http: "GET",
|
|
17321
|
+
path: "/ontology/v1/types/{name}",
|
|
17322
|
+
streaming: "no",
|
|
17323
|
+
pagination: false,
|
|
17324
|
+
pathParams: [
|
|
17325
|
+
{
|
|
17326
|
+
name: "name",
|
|
17327
|
+
sdkName: "name",
|
|
17328
|
+
description: "A type name from types.list, with its dots preserved — a display label is not accepted."
|
|
17329
|
+
}
|
|
17330
|
+
],
|
|
17331
|
+
query: []
|
|
17332
|
+
},
|
|
16350
17333
|
{
|
|
16351
17334
|
resource: "organization.charges",
|
|
16352
17335
|
method: "list",
|
|
@@ -19070,7 +20053,7 @@ for more details.`
|
|
|
19070
20053
|
resource: "ticket.labels",
|
|
19071
20054
|
method: "create",
|
|
19072
20055
|
summary: "Create or add labels",
|
|
19073
|
-
description: "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.
|
|
20056
|
+
description: "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.",
|
|
19074
20057
|
http: "POST",
|
|
19075
20058
|
path: "/ticket/v1/labels",
|
|
19076
20059
|
streaming: "no",
|
|
@@ -19112,7 +20095,7 @@ for more details.`
|
|
|
19112
20095
|
resource: "ticket.labels",
|
|
19113
20096
|
method: "delete",
|
|
19114
20097
|
summary: "Remove labels",
|
|
19115
|
-
description: "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.
|
|
20098
|
+
description: "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.",
|
|
19116
20099
|
http: "DELETE",
|
|
19117
20100
|
path: "/ticket/v1/labels/{name}",
|
|
19118
20101
|
streaming: "no",
|
|
@@ -19137,7 +20120,7 @@ for more details.`
|
|
|
19137
20120
|
resource: "ticket.labels",
|
|
19138
20121
|
method: "update",
|
|
19139
20122
|
summary: "Update labels",
|
|
19140
|
-
description: "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.
|
|
20123
|
+
description: "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.",
|
|
19141
20124
|
http: "PATCH",
|
|
19142
20125
|
path: "/ticket/v1/labels/{name}",
|
|
19143
20126
|
streaming: "no",
|
|
@@ -20539,7 +21522,7 @@ for more details.`
|
|
|
20539
21522
|
resource: "vault.vaults",
|
|
20540
21523
|
method: "create",
|
|
20541
21524
|
summary: "Create vault",
|
|
20542
|
-
description: "Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations.
|
|
21525
|
+
description: "Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Agent sessions and deployments accept up to 50 vault_ids and match their credentials against the session's MCP servers, so a stored static or oauth credential does serve as vault-backed MCP authentication; only environment_variable credentials are not yet placed, because the egress proxy ADR-058 §6 gives them is not built. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.",
|
|
20543
21526
|
http: "POST",
|
|
20544
21527
|
path: "/vault/v1/vaults",
|
|
20545
21528
|
streaming: "no",
|
|
@@ -21072,6 +22055,8 @@ function problemFrom(status, headers, body, statusText) {
|
|
|
21072
22055
|
param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
|
|
21073
22056
|
errors: Array.isArray(value.errors) ? value.errors : [],
|
|
21074
22057
|
requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
|
|
22058
|
+
docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
|
|
22059
|
+
describe: string(nested.describe) ?? string(value.describe),
|
|
21075
22060
|
raw: body
|
|
21076
22061
|
};
|
|
21077
22062
|
}
|
|
@@ -21085,6 +22070,8 @@ class PraxisError extends Error {
|
|
|
21085
22070
|
errors;
|
|
21086
22071
|
requestId;
|
|
21087
22072
|
param;
|
|
22073
|
+
docUrl;
|
|
22074
|
+
describe;
|
|
21088
22075
|
raw;
|
|
21089
22076
|
constructor(problem = {}, options) {
|
|
21090
22077
|
super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
|
|
@@ -21097,6 +22084,8 @@ class PraxisError extends Error {
|
|
|
21097
22084
|
this.errors = problem.errors ?? [];
|
|
21098
22085
|
this.requestId = problem.requestId;
|
|
21099
22086
|
this.param = problem.param;
|
|
22087
|
+
this.docUrl = problem.docUrl;
|
|
22088
|
+
this.describe = problem.describe;
|
|
21100
22089
|
this.raw = problem.raw;
|
|
21101
22090
|
}
|
|
21102
22091
|
static fromResponse(response, body) {
|
|
@@ -22501,6 +23490,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
|
|
|
22501
23490
|
url: "/agent/v1/computers/{computer_id}/files/content",
|
|
22502
23491
|
...options
|
|
22503
23492
|
});
|
|
23493
|
+
var computersFilesConvert = (options) => (options.client ?? client).post({
|
|
23494
|
+
security: [{
|
|
23495
|
+
key: "BearerAuth",
|
|
23496
|
+
scheme: "bearer",
|
|
23497
|
+
type: "http"
|
|
23498
|
+
}, {
|
|
23499
|
+
key: "ApiKeyAuth",
|
|
23500
|
+
name: "X-API-Key",
|
|
23501
|
+
type: "apiKey"
|
|
23502
|
+
}],
|
|
23503
|
+
url: "/agent/v1/computers/{computer_id}/files/convert",
|
|
23504
|
+
...options,
|
|
23505
|
+
headers: {
|
|
23506
|
+
"Content-Type": "application/json",
|
|
23507
|
+
...options.headers
|
|
23508
|
+
}
|
|
23509
|
+
});
|
|
22504
23510
|
var connectComputer = (options) => (options.client ?? client).post({
|
|
22505
23511
|
security: [{
|
|
22506
23512
|
key: "BearerAuth",
|
|
@@ -22999,6 +24005,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
22999
24005
|
url: "/file/v1/uploads/{upload_id}/cancel",
|
|
23000
24006
|
...options
|
|
23001
24007
|
});
|
|
24008
|
+
var fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
24009
|
+
security: [{
|
|
24010
|
+
key: "BearerAuth",
|
|
24011
|
+
scheme: "bearer",
|
|
24012
|
+
type: "http"
|
|
24013
|
+
}],
|
|
24014
|
+
url: "/file/v1/uploads/{upload_id}",
|
|
24015
|
+
...options
|
|
24016
|
+
});
|
|
23002
24017
|
var fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
23003
24018
|
security: [{
|
|
23004
24019
|
key: "BearerAuth",
|
|
@@ -27704,6 +28719,217 @@ var mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).g
|
|
|
27704
28719
|
url: "/media/v1/libraries/{library_id}/understandings",
|
|
27705
28720
|
...options
|
|
27706
28721
|
});
|
|
28722
|
+
var mediaCreateGeneration = (options) => (options.client ?? client).post({
|
|
28723
|
+
security: [{
|
|
28724
|
+
key: "media-BearerAuth",
|
|
28725
|
+
scheme: "bearer",
|
|
28726
|
+
type: "http"
|
|
28727
|
+
}],
|
|
28728
|
+
url: "/media/v1/libraries/{library_id}/generations",
|
|
28729
|
+
...options,
|
|
28730
|
+
headers: {
|
|
28731
|
+
"Content-Type": "application/json",
|
|
28732
|
+
...options.headers
|
|
28733
|
+
}
|
|
28734
|
+
});
|
|
28735
|
+
var mediaListJobs = (options) => (options.client ?? client).get({
|
|
28736
|
+
security: [{
|
|
28737
|
+
key: "media-BearerAuth",
|
|
28738
|
+
scheme: "bearer",
|
|
28739
|
+
type: "http"
|
|
28740
|
+
}],
|
|
28741
|
+
url: "/media/v1/libraries/{library_id}/jobs",
|
|
28742
|
+
...options
|
|
28743
|
+
});
|
|
28744
|
+
var mediaCancelJob = (options) => (options.client ?? client).post({
|
|
28745
|
+
security: [{
|
|
28746
|
+
key: "media-BearerAuth",
|
|
28747
|
+
scheme: "bearer",
|
|
28748
|
+
type: "http"
|
|
28749
|
+
}],
|
|
28750
|
+
url: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
28751
|
+
...options
|
|
28752
|
+
});
|
|
28753
|
+
var mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
|
|
28754
|
+
security: [{
|
|
28755
|
+
key: "media-BearerAuth",
|
|
28756
|
+
scheme: "bearer",
|
|
28757
|
+
type: "http"
|
|
28758
|
+
}],
|
|
28759
|
+
url: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
|
|
28760
|
+
...options,
|
|
28761
|
+
headers: {
|
|
28762
|
+
"Content-Type": "application/json",
|
|
28763
|
+
...options.headers
|
|
28764
|
+
}
|
|
28765
|
+
});
|
|
28766
|
+
var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
28767
|
+
security: [{
|
|
28768
|
+
key: "media-BearerAuth",
|
|
28769
|
+
scheme: "bearer",
|
|
28770
|
+
type: "http"
|
|
28771
|
+
}],
|
|
28772
|
+
url: "/media/v1/generation/capabilities",
|
|
28773
|
+
...options
|
|
28774
|
+
});
|
|
28775
|
+
var ontologyListTypes = (options) => (options?.client ?? client).get({
|
|
28776
|
+
security: [{
|
|
28777
|
+
key: "ontology-bearerAuth",
|
|
28778
|
+
scheme: "bearer",
|
|
28779
|
+
type: "http"
|
|
28780
|
+
}],
|
|
28781
|
+
url: "/ontology/v1/types",
|
|
28782
|
+
...options
|
|
28783
|
+
});
|
|
28784
|
+
var ontologyRegisterType = (options) => (options.client ?? client).post({
|
|
28785
|
+
security: [{
|
|
28786
|
+
key: "ontology-bearerAuth",
|
|
28787
|
+
scheme: "bearer",
|
|
28788
|
+
type: "http"
|
|
28789
|
+
}],
|
|
28790
|
+
url: "/ontology/v1/types",
|
|
28791
|
+
...options,
|
|
28792
|
+
headers: {
|
|
28793
|
+
"Content-Type": "application/json",
|
|
28794
|
+
...options.headers
|
|
28795
|
+
}
|
|
28796
|
+
});
|
|
28797
|
+
var ontologyRetrieveType = (options) => (options.client ?? client).get({
|
|
28798
|
+
security: [{
|
|
28799
|
+
key: "ontology-bearerAuth",
|
|
28800
|
+
scheme: "bearer",
|
|
28801
|
+
type: "http"
|
|
28802
|
+
}],
|
|
28803
|
+
url: "/ontology/v1/types/{name}",
|
|
28804
|
+
...options
|
|
28805
|
+
});
|
|
28806
|
+
var ontologyListNodes = (options) => (options?.client ?? client).get({
|
|
28807
|
+
security: [{
|
|
28808
|
+
key: "ontology-bearerAuth",
|
|
28809
|
+
scheme: "bearer",
|
|
28810
|
+
type: "http"
|
|
28811
|
+
}],
|
|
28812
|
+
url: "/ontology/v1/nodes",
|
|
28813
|
+
...options
|
|
28814
|
+
});
|
|
28815
|
+
var ontologyCreateNode = (options) => (options.client ?? client).post({
|
|
28816
|
+
security: [{
|
|
28817
|
+
key: "ontology-bearerAuth",
|
|
28818
|
+
scheme: "bearer",
|
|
28819
|
+
type: "http"
|
|
28820
|
+
}],
|
|
28821
|
+
url: "/ontology/v1/nodes",
|
|
28822
|
+
...options,
|
|
28823
|
+
headers: {
|
|
28824
|
+
"Content-Type": "application/json",
|
|
28825
|
+
...options.headers
|
|
28826
|
+
}
|
|
28827
|
+
});
|
|
28828
|
+
var ontologyRetrieveNode = (options) => (options.client ?? client).get({
|
|
28829
|
+
security: [{
|
|
28830
|
+
key: "ontology-bearerAuth",
|
|
28831
|
+
scheme: "bearer",
|
|
28832
|
+
type: "http"
|
|
28833
|
+
}],
|
|
28834
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
28835
|
+
...options
|
|
28836
|
+
});
|
|
28837
|
+
var ontologyUpdateNode = (options) => (options.client ?? client).patch({
|
|
28838
|
+
security: [{
|
|
28839
|
+
key: "ontology-bearerAuth",
|
|
28840
|
+
scheme: "bearer",
|
|
28841
|
+
type: "http"
|
|
28842
|
+
}],
|
|
28843
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
28844
|
+
...options,
|
|
28845
|
+
headers: {
|
|
28846
|
+
"Content-Type": "application/json",
|
|
28847
|
+
...options.headers
|
|
28848
|
+
}
|
|
28849
|
+
});
|
|
28850
|
+
var ontologyMergeNode = (options) => (options.client ?? client).post({
|
|
28851
|
+
security: [{
|
|
28852
|
+
key: "ontology-bearerAuth",
|
|
28853
|
+
scheme: "bearer",
|
|
28854
|
+
type: "http"
|
|
28855
|
+
}],
|
|
28856
|
+
url: "/ontology/v1/nodes/{node_id}/merge",
|
|
28857
|
+
...options,
|
|
28858
|
+
headers: {
|
|
28859
|
+
"Content-Type": "application/json",
|
|
28860
|
+
...options.headers
|
|
28861
|
+
}
|
|
28862
|
+
});
|
|
28863
|
+
var ontologyListRelations = (options) => (options?.client ?? client).get({
|
|
28864
|
+
security: [{
|
|
28865
|
+
key: "ontology-bearerAuth",
|
|
28866
|
+
scheme: "bearer",
|
|
28867
|
+
type: "http"
|
|
28868
|
+
}],
|
|
28869
|
+
url: "/ontology/v1/relations",
|
|
28870
|
+
...options
|
|
28871
|
+
});
|
|
28872
|
+
var ontologyCreateRelation = (options) => (options.client ?? client).post({
|
|
28873
|
+
security: [{
|
|
28874
|
+
key: "ontology-bearerAuth",
|
|
28875
|
+
scheme: "bearer",
|
|
28876
|
+
type: "http"
|
|
28877
|
+
}],
|
|
28878
|
+
url: "/ontology/v1/relations",
|
|
28879
|
+
...options,
|
|
28880
|
+
headers: {
|
|
28881
|
+
"Content-Type": "application/json",
|
|
28882
|
+
...options.headers
|
|
28883
|
+
}
|
|
28884
|
+
});
|
|
28885
|
+
var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
|
|
28886
|
+
security: [{
|
|
28887
|
+
key: "ontology-bearerAuth",
|
|
28888
|
+
scheme: "bearer",
|
|
28889
|
+
type: "http"
|
|
28890
|
+
}],
|
|
28891
|
+
url: "/ontology/v1/relations/{relation_id}",
|
|
28892
|
+
...options
|
|
28893
|
+
});
|
|
28894
|
+
var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
|
|
28895
|
+
security: [{
|
|
28896
|
+
key: "ontology-bearerAuth",
|
|
28897
|
+
scheme: "bearer",
|
|
28898
|
+
type: "http"
|
|
28899
|
+
}],
|
|
28900
|
+
url: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
28901
|
+
...options,
|
|
28902
|
+
headers: {
|
|
28903
|
+
"Content-Type": "application/json",
|
|
28904
|
+
...options.headers
|
|
28905
|
+
}
|
|
28906
|
+
});
|
|
28907
|
+
var ontologyApplyChangeset = (options) => (options.client ?? client).post({
|
|
28908
|
+
security: [{
|
|
28909
|
+
key: "ontology-bearerAuth",
|
|
28910
|
+
scheme: "bearer",
|
|
28911
|
+
type: "http"
|
|
28912
|
+
}],
|
|
28913
|
+
url: "/ontology/v1/changesets",
|
|
28914
|
+
...options,
|
|
28915
|
+
headers: {
|
|
28916
|
+
"Content-Type": "application/json",
|
|
28917
|
+
...options.headers
|
|
28918
|
+
}
|
|
28919
|
+
});
|
|
28920
|
+
var ontologySearch = (options) => (options.client ?? client).post({
|
|
28921
|
+
security: [{
|
|
28922
|
+
key: "ontology-bearerAuth",
|
|
28923
|
+
scheme: "bearer",
|
|
28924
|
+
type: "http"
|
|
28925
|
+
}],
|
|
28926
|
+
url: "/ontology/v1/search",
|
|
28927
|
+
...options,
|
|
28928
|
+
headers: {
|
|
28929
|
+
"Content-Type": "application/json",
|
|
28930
|
+
...options.headers
|
|
28931
|
+
}
|
|
28932
|
+
});
|
|
27707
28933
|
var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
27708
28934
|
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
27709
28935
|
security: [
|
|
@@ -29581,6 +30807,9 @@ function createAgent(transport) {
|
|
|
29581
30807
|
create: bind(transport, computersCreate),
|
|
29582
30808
|
delete: bind(transport, computersDelete),
|
|
29583
30809
|
files: {
|
|
30810
|
+
convert: {
|
|
30811
|
+
create: bind(transport, computersFilesConvert)
|
|
30812
|
+
},
|
|
29584
30813
|
list: bind(transport, computersFilesList),
|
|
29585
30814
|
retrieveContent: bind(transport, computersFilesContent)
|
|
29586
30815
|
},
|
|
@@ -30102,7 +31331,8 @@ function createFile(transport) {
|
|
|
30102
31331
|
createSigned: bind(transport, fileCreateSignedUpload),
|
|
30103
31332
|
parts: {
|
|
30104
31333
|
create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
|
|
30105
|
-
}
|
|
31334
|
+
},
|
|
31335
|
+
retrieve: bind(transport, fileRetrieveUpload)
|
|
30106
31336
|
}
|
|
30107
31337
|
};
|
|
30108
31338
|
}
|
|
@@ -30154,6 +31384,11 @@ function createKnowledge(transport) {
|
|
|
30154
31384
|
}
|
|
30155
31385
|
function createMedia(transport) {
|
|
30156
31386
|
return {
|
|
31387
|
+
generation: {
|
|
31388
|
+
capabilities: {
|
|
31389
|
+
list: bind(transport, mediaGetGenerationCapabilities)
|
|
31390
|
+
}
|
|
31391
|
+
},
|
|
30157
31392
|
libraries: {
|
|
30158
31393
|
assets: {
|
|
30159
31394
|
batch: bind(transport, mediaBatchAssets),
|
|
@@ -30190,7 +31425,17 @@ function createMedia(transport) {
|
|
|
30190
31425
|
folders: {
|
|
30191
31426
|
list: bind(transport, mediaListFolders)
|
|
30192
31427
|
},
|
|
31428
|
+
generations: {
|
|
31429
|
+
create: bind(transport, mediaCreateGeneration)
|
|
31430
|
+
},
|
|
30193
31431
|
jobs: {
|
|
31432
|
+
cancel: bind(transport, mediaCancelJob),
|
|
31433
|
+
list: bindPage(transport, mediaListJobs),
|
|
31434
|
+
outputs: {
|
|
31435
|
+
save: {
|
|
31436
|
+
create: bind(transport, mediaSaveGenerationOutput)
|
|
31437
|
+
}
|
|
31438
|
+
},
|
|
30194
31439
|
retrieve: bind(transport, mediaGetJob)
|
|
30195
31440
|
},
|
|
30196
31441
|
list: bindPage(transport, mediaListLibraries),
|
|
@@ -30315,6 +31560,38 @@ function createModel(transport) {
|
|
|
30315
31560
|
}
|
|
30316
31561
|
};
|
|
30317
31562
|
}
|
|
31563
|
+
function createOntology(transport) {
|
|
31564
|
+
return {
|
|
31565
|
+
changesets: {
|
|
31566
|
+
create: bind(transport, ontologyApplyChangeset)
|
|
31567
|
+
},
|
|
31568
|
+
nodes: {
|
|
31569
|
+
create: bind(transport, ontologyCreateNode),
|
|
31570
|
+
list: bindPage(transport, ontologyListNodes),
|
|
31571
|
+
merge: {
|
|
31572
|
+
create: bind(transport, ontologyMergeNode)
|
|
31573
|
+
},
|
|
31574
|
+
retrieve: bind(transport, ontologyRetrieveNode),
|
|
31575
|
+
update: bind(transport, ontologyUpdateNode)
|
|
31576
|
+
},
|
|
31577
|
+
relations: {
|
|
31578
|
+
create: bind(transport, ontologyCreateRelation),
|
|
31579
|
+
invalidate: {
|
|
31580
|
+
create: bind(transport, ontologyInvalidateRelation)
|
|
31581
|
+
},
|
|
31582
|
+
list: bindPage(transport, ontologyListRelations),
|
|
31583
|
+
retrieve: bind(transport, ontologyRetrieveRelation)
|
|
31584
|
+
},
|
|
31585
|
+
search: {
|
|
31586
|
+
create: bind(transport, ontologySearch)
|
|
31587
|
+
},
|
|
31588
|
+
types: {
|
|
31589
|
+
create: bind(transport, ontologyRegisterType),
|
|
31590
|
+
list: bind(transport, ontologyListTypes),
|
|
31591
|
+
retrieve: bind(transport, ontologyRetrieveType)
|
|
31592
|
+
}
|
|
31593
|
+
};
|
|
31594
|
+
}
|
|
30318
31595
|
function createOrganization(transport) {
|
|
30319
31596
|
return {
|
|
30320
31597
|
charges: {
|
|
@@ -30581,6 +31858,7 @@ var resourceFactories = {
|
|
|
30581
31858
|
media: createMedia,
|
|
30582
31859
|
meta: createMeta,
|
|
30583
31860
|
model: createModel,
|
|
31861
|
+
ontology: createOntology,
|
|
30584
31862
|
organization: createOrganization,
|
|
30585
31863
|
sandbox: createSandbox,
|
|
30586
31864
|
search: createSearch,
|
|
@@ -31654,6 +32932,26 @@ async function prepareMultipart(op, opts) {
|
|
|
31654
32932
|
opts.body = body;
|
|
31655
32933
|
}
|
|
31656
32934
|
|
|
32935
|
+
// src/core/pagination.ts
|
|
32936
|
+
var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
|
|
32937
|
+
function pageTokenField(op) {
|
|
32938
|
+
return op.query.find((field) => PAGE_TOKENS.test(field.name));
|
|
32939
|
+
}
|
|
32940
|
+
function nextPageToken(result) {
|
|
32941
|
+
const value = result;
|
|
32942
|
+
const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
|
|
32943
|
+
return typeof token === "string" && token ? token : undefined;
|
|
32944
|
+
}
|
|
32945
|
+
function pageOf(result) {
|
|
32946
|
+
const value = result;
|
|
32947
|
+
const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
|
|
32948
|
+
const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
|
|
32949
|
+
if (!Array.isArray(data))
|
|
32950
|
+
return;
|
|
32951
|
+
const token = nextPageToken(result);
|
|
32952
|
+
return { items: data, ...token ? { token } : {} };
|
|
32953
|
+
}
|
|
32954
|
+
|
|
31657
32955
|
// src/core/bind-args.ts
|
|
31658
32956
|
var globalOptions = [
|
|
31659
32957
|
{ name: "org", type: "string" },
|
|
@@ -31869,7 +33167,7 @@ function bindArgs(parsed, op, data) {
|
|
|
31869
33167
|
(opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
|
|
31870
33168
|
}
|
|
31871
33169
|
}
|
|
31872
|
-
if (globals.all && !op.pagination)
|
|
33170
|
+
if (globals.all && !op.pagination && !pageTokenField(op))
|
|
31873
33171
|
throw new UsageError("--all requires a paginated operation");
|
|
31874
33172
|
for (const p of op.pathParams)
|
|
31875
33173
|
if (p !== target && opts.path?.[p.sdkName] === undefined)
|
|
@@ -31895,8 +33193,8 @@ function bindArgs(parsed, op, data) {
|
|
|
31895
33193
|
}
|
|
31896
33194
|
|
|
31897
33195
|
// src/core/help.ts
|
|
31898
|
-
function describeOption(s) {
|
|
31899
|
-
return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${
|
|
33196
|
+
function describeOption(s, required = s.required) {
|
|
33197
|
+
return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${required ? " (required)" : ""}${s.enum ? ` [${s.enum.join(" | ")}]` : ""}${s.description ? ` — ${s.description.replace(/\s+/g, " ")}` : ""}`;
|
|
31900
33198
|
}
|
|
31901
33199
|
function example(command) {
|
|
31902
33200
|
const target = targetParam(command.op);
|
|
@@ -31912,18 +33210,22 @@ function example(command) {
|
|
|
31912
33210
|
args.push("--yes");
|
|
31913
33211
|
return args.join(" ");
|
|
31914
33212
|
}
|
|
33213
|
+
function fieldRequired(op, field, location) {
|
|
33214
|
+
return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
|
|
33215
|
+
}
|
|
31915
33216
|
function help(commands, prefix, command) {
|
|
31916
33217
|
if (command) {
|
|
31917
33218
|
const target = targetParam(command.op);
|
|
33219
|
+
const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
|
|
31918
33220
|
return [
|
|
31919
|
-
`praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
33221
|
+
`praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
31920
33222
|
`SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
|
|
31921
33223
|
`${command.op.http} ${command.op.path}`,
|
|
31922
33224
|
...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
|
|
31923
33225
|
"",
|
|
31924
33226
|
"Options:",
|
|
31925
33227
|
...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
|
|
31926
|
-
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
|
|
33228
|
+
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
|
|
31927
33229
|
...command.op.body?.fields.filter((f) => !operationOptions(command.op).some((s) => s.location === "body" && s.field === f) && (f.type === "object" || f.type === "array" && !["string", "number", "integer", "boolean"].includes(f.itemType ?? ""))).map((f) => ` --data: ${f.name} (${f.type}${f.required ? ", required" : ""})`) ?? [],
|
|
31928
33230
|
" -h is an alias of --help",
|
|
31929
33231
|
"PRAXIS_ENV=develop|production (default: develop); no --env option.",
|
|
@@ -33291,9 +34593,11 @@ function renderHuman(result, ctx) {
|
|
|
33291
34593
|
const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
|
|
33292
34594
|
const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
|
|
33293
34595
|
` : "";
|
|
34596
|
+
const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
|
|
34597
|
+
`).join("");
|
|
33294
34598
|
return { stderr: err.red(`✗ ${plain(result.message)}`) + `
|
|
33295
34599
|
` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
|
|
33296
|
-
` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
|
|
34600
|
+
` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
|
|
33297
34601
|
` : "") };
|
|
33298
34602
|
}
|
|
33299
34603
|
case "list":
|
|
@@ -33381,8 +34685,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
|
|
|
33381
34685
|
}
|
|
33382
34686
|
|
|
33383
34687
|
// src/output/render.ts
|
|
34688
|
+
var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
|
|
34689
|
+
function serverProblem(raw) {
|
|
34690
|
+
const value = record(raw);
|
|
34691
|
+
const problem = {};
|
|
34692
|
+
for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
|
|
34693
|
+
const entry = value[member];
|
|
34694
|
+
if (entry !== undefined && entry !== null)
|
|
34695
|
+
problem[member] = entry;
|
|
34696
|
+
}
|
|
34697
|
+
const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
|
|
34698
|
+
return adds ? problem : undefined;
|
|
34699
|
+
}
|
|
34700
|
+
function problemLines(problem) {
|
|
34701
|
+
const lines = [];
|
|
34702
|
+
for (const group of [problem?.errors, problem?.violations]) {
|
|
34703
|
+
for (const item of Array.isArray(group) ? group : []) {
|
|
34704
|
+
const entry = record(item);
|
|
34705
|
+
const where = scalar(entry.pointer ?? entry.field);
|
|
34706
|
+
const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
|
|
34707
|
+
if (where || detail)
|
|
34708
|
+
lines.push(`${where ? `${where}: ` : ""}${detail}`);
|
|
34709
|
+
}
|
|
34710
|
+
}
|
|
34711
|
+
return lines;
|
|
34712
|
+
}
|
|
33384
34713
|
function errorJSON(result, ctx) {
|
|
33385
|
-
return JSON.stringify({ error: { code: result.code, ...result.details !== undefined ? { details: result.details } : {}, message: result.message, hint: result.hint ?? null, env: result.env, command: ctx.command ?? null, status: result.status ?? null, request_id: result.request_id ?? null, ...result.credential_source ? { credential_source: result.credential_source } : {} } }) + `
|
|
34714
|
+
return JSON.stringify({ error: { code: result.code, ...result.details !== undefined ? { details: result.details } : {}, message: result.message, hint: result.hint ?? null, env: result.env, command: ctx.command ?? null, status: result.status ?? null, request_id: result.request_id ?? null, ...result.problem !== undefined ? { problem: result.problem } : {}, ...result.credential_source ? { credential_source: result.credential_source } : {} } }) + `
|
|
33386
34715
|
`;
|
|
33387
34716
|
}
|
|
33388
34717
|
function render(result, ctx) {
|
|
@@ -33538,6 +34867,8 @@ function errorInput(error, ctx) {
|
|
|
33538
34867
|
const raw = record(sdk?.raw), nested = record(raw.error);
|
|
33539
34868
|
const candidate = nested.details ?? raw.details;
|
|
33540
34869
|
const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
|
|
34870
|
+
const problem = serverProblem(Object.keys(nested).length ? nested : raw);
|
|
34871
|
+
const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
|
|
33541
34872
|
let message = error instanceof Error ? error.message : "Unexpected error";
|
|
33542
34873
|
const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
|
|
33543
34874
|
const code = error instanceof UsageError ? error.code : businessCode(raw.code) ?? businessCode(nested.code) ?? businessCode(raw.error_code) ?? prefix ?? businessCode(sdk?.code) ?? (sdk?.status ? `HTTP_${sdk.status}` : sdk ? "API_ERROR" : "RUNTIME_ERROR");
|
|
@@ -33549,11 +34880,14 @@ function errorInput(error, ctx) {
|
|
|
33549
34880
|
if (stripped)
|
|
33550
34881
|
message = `${humanize(code)}${message ? `: ${message}` : ""}`;
|
|
33551
34882
|
const status = sdk?.status, request_id = sdk?.requestId;
|
|
34883
|
+
message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
|
|
33552
34884
|
const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
|
|
33553
34885
|
const source = ctx.credentialSource ?? "login";
|
|
33554
34886
|
let hint = genericHint;
|
|
33555
34887
|
if (error instanceof UsageError)
|
|
33556
34888
|
hint = error.hint;
|
|
34889
|
+
else if (serverText(problem?.hint))
|
|
34890
|
+
hint = serverText(problem?.hint);
|
|
33557
34891
|
else if (authFailure)
|
|
33558
34892
|
hint = authHint(source);
|
|
33559
34893
|
else if (status === 404)
|
|
@@ -33564,7 +34898,7 @@ function errorInput(error, ctx) {
|
|
|
33564
34898
|
hint = "Rate limited; retry later.";
|
|
33565
34899
|
else if (status !== undefined && status >= 500)
|
|
33566
34900
|
hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
|
|
33567
|
-
return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
|
|
34901
|
+
return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, ...problem !== undefined ? { problem } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
|
|
33568
34902
|
}
|
|
33569
34903
|
|
|
33570
34904
|
// src/output/progress.ts
|
|
@@ -33594,7 +34928,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
33594
34928
|
}
|
|
33595
34929
|
|
|
33596
34930
|
// src/main.ts
|
|
33597
|
-
var version = "0.2.1-dev.
|
|
34931
|
+
var version = "0.2.1-dev.52419cf";
|
|
33598
34932
|
var commands = commandTree(operations);
|
|
33599
34933
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
33600
34934
|
function route(argv) {
|
|
@@ -33812,7 +35146,7 @@ Examples:
|
|
|
33812
35146
|
let owner = client2;
|
|
33813
35147
|
for (const part of op.resource.split("."))
|
|
33814
35148
|
owner = owner[part];
|
|
33815
|
-
|
|
35149
|
+
let result = await owner[op.method](opts);
|
|
33816
35150
|
const name2 = `${op.resource}.${op.method}`;
|
|
33817
35151
|
const list = (items) => {
|
|
33818
35152
|
const view = clientList(items, op, flags.limit, ctx.mode);
|
|
@@ -33826,7 +35160,21 @@ Examples:
|
|
|
33826
35160
|
const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
|
|
33827
35161
|
if (typeof cursor === "string" && cursor)
|
|
33828
35162
|
ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
|
|
33829
|
-
|
|
35163
|
+
const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
|
|
35164
|
+
const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
|
|
35165
|
+
if (flags.all && !(result instanceof Page) && token && !firstPage)
|
|
35166
|
+
throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
|
|
35167
|
+
if (firstPage) {
|
|
35168
|
+
const items = [...firstPage.items];
|
|
35169
|
+
const seen = new Set;
|
|
35170
|
+
for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
|
|
35171
|
+
seen.add(next);
|
|
35172
|
+
result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
|
|
35173
|
+
items.push(...pageOf(result)?.items ?? []);
|
|
35174
|
+
}
|
|
35175
|
+
ctx.nextCommand = undefined;
|
|
35176
|
+
emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
|
|
35177
|
+
} else if (result instanceof Page) {
|
|
33830
35178
|
if (flags.all) {
|
|
33831
35179
|
const items = [];
|
|
33832
35180
|
for await (const item of result)
|
|
@@ -33922,7 +35270,7 @@ Examples:
|
|
|
33922
35270
|
}
|
|
33923
35271
|
}
|
|
33924
35272
|
if (true)
|
|
33925
|
-
process.
|
|
35273
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
33926
35274
|
export {
|
|
33927
35275
|
main
|
|
33928
35276
|
};
|