@deepraxis/cli 0.2.1-dev.e5db771 → 0.2.1-dev.e9377c2
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 +16 -1
- package/dist/praxis.js +858 -30
- 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",
|
|
@@ -6100,7 +6100,7 @@ file at the root of that directory.`
|
|
|
6100
6100
|
"allow"
|
|
6101
6101
|
],
|
|
6102
6102
|
required: false,
|
|
6103
|
-
description: "skip
|
|
6103
|
+
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
6104
|
},
|
|
6105
6105
|
{
|
|
6106
6106
|
name: "catchup_window_seconds",
|
|
@@ -6274,7 +6274,7 @@ file at the root of that directory.`
|
|
|
6274
6274
|
"allow"
|
|
6275
6275
|
],
|
|
6276
6276
|
required: false,
|
|
6277
|
-
description: "skip
|
|
6277
|
+
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
6278
|
},
|
|
6279
6279
|
{
|
|
6280
6280
|
name: "catchup_window_seconds",
|
|
@@ -10162,6 +10162,12 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10162
10162
|
type: "integer",
|
|
10163
10163
|
required: false,
|
|
10164
10164
|
description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
|
|
10165
|
+
},
|
|
10166
|
+
{
|
|
10167
|
+
name: "loudness",
|
|
10168
|
+
type: "object",
|
|
10169
|
+
required: false,
|
|
10170
|
+
description: "Optional loudness normalization target; normalization adds analysis and rendering work."
|
|
10165
10171
|
}
|
|
10166
10172
|
]
|
|
10167
10173
|
}
|
|
@@ -10385,7 +10391,7 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10385
10391
|
resource: "cut.projects",
|
|
10386
10392
|
method: "execute",
|
|
10387
10393
|
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[];\nListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];\nListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];\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| ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |\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 catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o\'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\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, animation, transitionIn, transitionOut |\n| image | media, length | transform, fit, animate, animation, transitionIn, transitionOut |\n| text | text, length | style, transform, reveal, animate, animation, transitionIn, transitionOut |\n| color | color, length | transform, fill, animate, animation, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, animate, animation, 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, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |\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| animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |\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, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.\n\n#### Animation presets\n\nDiscover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.\n\nPresets replace the clip\'s existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.\n\nErrors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.\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',
|
|
10394
|
+
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[];\nListEffects(): EffectInfo[];\nListTextStyles(): TextStylePreset[];\nListTextTemplates(): TextTemplate[];\nListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];\nListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number | { curve: { at: number; rate: number; ease?: Ease }[]; audio?: "mute" | "resample" }, 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; role?: "voice" | "music" | "sfx" }, 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> & { preset?: string }; maxChars?: number }): ClipId[];\nInsertTemplate(track: TrackId, o: { template: string; start: number; slots?: Record<string, string> }): ClipId[];\nAlignCaptions(trackId: TrackId, script: string, options?: { resplit?: boolean; maxChars?: number }): { replaced: number; added: number; deleted: number };\nImportCaptions(trackId: TrackId, text: string, o?: { format?: "srt" | "vtt"; offset?: number }): ClipId[];\nExportCaptions(trackId: TrackId, o: { format: "srt" | "vtt" }): string;\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, effects, blend and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |\n| ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |\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| ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |\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. A `{curve: [{at, rate, ease?}, ...], audio?: "mute" | "resample"}` rate is forward-only and holds output duration fixed; pitch preservation is unavailable. Scalar rates: source preserves consumed source and changes length; duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |\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, audio role (`voice`, `music`, `sfx`) 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| ImportCaptions, ExportCaptions | Import SRT or WebVTT text onto a caption track and export it back. format is inferred from a WEBVTT header when omitted. offset shifts imported cues in seconds. Import rejects more than 100000 bytes, more than 5000 cues, malformed or overlapping file cues with INVALID_CAPTION_FILE; overlap with existing timeline clips uses the normal OVERLAP rejection. Export sorts by timeline start and writes millisecond timecodes. |\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 catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o\'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\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, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| image | media, length | transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| text | text, length | style, transform, blend, reveal, animate, animation, effects, mask, transitionIn, transitionOut |\n| color | color, length | transform, fill, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, gain, fadeIn, fadeOut, duck |\n| caption | text, length | — |\n\nVisual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.\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, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |\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| animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |\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#### Visual effects\n\n`effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Entries include blur, color adjustment, vignette, film grain, chromatic aberration, pixelate, glitch, shake, flash, light leak and built-in `lut` looks; user `.cube` LUTs are not supported. `speed` is cycles per second. Effects run on CPU during export and increase render time. Parameters are discovered with ListEffects(). Catalog entries expose their own parameters through ListEffects(), including `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.\n\nNumeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter\'s catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.\n\n`blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.\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, duck, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend, mask, gain. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.\n\n#### Animation presets\n\nDiscover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.\n\nPresets replace the clip\'s existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.\n\nErrors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.\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',
|
|
10389
10395
|
http: "POST",
|
|
10390
10396
|
path: "/cut/v1/projects/{project_id}:execute",
|
|
10391
10397
|
streaming: "no",
|
|
@@ -11630,7 +11636,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11630
11636
|
resource: "file.uploads",
|
|
11631
11637
|
method: "create",
|
|
11632
11638
|
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
|
|
11639
|
+
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
11640
|
http: "POST",
|
|
11635
11641
|
path: "/file/v1/uploads",
|
|
11636
11642
|
streaming: "no",
|
|
@@ -11644,7 +11650,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11644
11650
|
name: "bytes",
|
|
11645
11651
|
type: "integer",
|
|
11646
11652
|
required: true,
|
|
11647
|
-
description: "Exact complete file length in bytes, from 1 through
|
|
11653
|
+
description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
|
|
11648
11654
|
},
|
|
11649
11655
|
{
|
|
11650
11656
|
name: "filename",
|
|
@@ -11688,7 +11694,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11688
11694
|
resource: "file.uploads",
|
|
11689
11695
|
method: "createSigned",
|
|
11690
11696
|
summary: "Create a one-time upload URL",
|
|
11691
|
-
description: "Upload a local file of up to
|
|
11697
|
+
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
11698
|
http: "POST",
|
|
11693
11699
|
path: "/file/v1/uploads/signed",
|
|
11694
11700
|
streaming: "no",
|
|
@@ -11708,7 +11714,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11708
11714
|
name: "bytes",
|
|
11709
11715
|
type: "integer",
|
|
11710
11716
|
required: true,
|
|
11711
|
-
description: "Exact local file size in bytes, from 1 through
|
|
11717
|
+
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
11718
|
},
|
|
11713
11719
|
{
|
|
11714
11720
|
name: "content_type",
|
|
@@ -11731,7 +11737,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11731
11737
|
name: "expires_in",
|
|
11732
11738
|
type: "integer",
|
|
11733
11739
|
required: false,
|
|
11734
|
-
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or
|
|
11740
|
+
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
11741
|
},
|
|
11736
11742
|
{
|
|
11737
11743
|
name: "part_size",
|
|
@@ -11742,6 +11748,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11742
11748
|
]
|
|
11743
11749
|
}
|
|
11744
11750
|
},
|
|
11751
|
+
{
|
|
11752
|
+
resource: "file.uploads",
|
|
11753
|
+
method: "retrieve",
|
|
11754
|
+
summary: "Retrieve an upload",
|
|
11755
|
+
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.",
|
|
11756
|
+
http: "GET",
|
|
11757
|
+
path: "/file/v1/uploads/{upload_id}",
|
|
11758
|
+
streaming: "no",
|
|
11759
|
+
pagination: false,
|
|
11760
|
+
pathParams: [
|
|
11761
|
+
{
|
|
11762
|
+
name: "upload_id",
|
|
11763
|
+
sdkName: "upload_id",
|
|
11764
|
+
description: "Upload identifier returned by create; the upload must belong to your organization."
|
|
11765
|
+
}
|
|
11766
|
+
],
|
|
11767
|
+
query: []
|
|
11768
|
+
},
|
|
11745
11769
|
{
|
|
11746
11770
|
resource: "file.uploads",
|
|
11747
11771
|
method: "cancel",
|
|
@@ -11764,7 +11788,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11764
11788
|
resource: "file.uploads",
|
|
11765
11789
|
method: "complete",
|
|
11766
11790
|
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.",
|
|
11791
|
+
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
11792
|
http: "POST",
|
|
11769
11793
|
path: "/file/v1/uploads/{upload_id}/complete",
|
|
11770
11794
|
streaming: "no",
|
|
@@ -11800,7 +11824,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11800
11824
|
resource: "file.uploads.parts",
|
|
11801
11825
|
method: "create",
|
|
11802
11826
|
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.",
|
|
11827
|
+
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
11828
|
http: "POST",
|
|
11805
11829
|
path: "/file/v1/uploads/{upload_id}/parts",
|
|
11806
11830
|
streaming: "no",
|
|
@@ -12849,7 +12873,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12849
12873
|
resource: "media.libraries.assets",
|
|
12850
12874
|
method: "create",
|
|
12851
12875
|
summary: "Upload asset",
|
|
12852
|
-
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.
|
|
12876
|
+
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.",
|
|
12853
12877
|
http: "POST",
|
|
12854
12878
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
12855
12879
|
streaming: "no",
|
|
@@ -12973,7 +12997,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12973
12997
|
resource: "media.libraries.assets.import",
|
|
12974
12998
|
method: "create",
|
|
12975
12999
|
summary: "Import file",
|
|
12976
|
-
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.
|
|
13000
|
+
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.",
|
|
12977
13001
|
http: "POST",
|
|
12978
13002
|
path: "/media/v1/libraries/{library_id}/assets/import",
|
|
12979
13003
|
streaming: "no",
|
|
@@ -13241,7 +13265,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13241
13265
|
resource: "media.libraries.assets.reprocess",
|
|
13242
13266
|
method: "create",
|
|
13243
13267
|
summary: "Reprocess asset",
|
|
13244
|
-
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.
|
|
13268
|
+
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.",
|
|
13245
13269
|
http: "POST",
|
|
13246
13270
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
|
|
13247
13271
|
streaming: "no",
|
|
@@ -13340,7 +13364,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13340
13364
|
resource: "media.libraries.assets",
|
|
13341
13365
|
method: "batch",
|
|
13342
13366
|
summary: "Batch assets alias",
|
|
13343
|
-
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.
|
|
13367
|
+
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.',
|
|
13344
13368
|
http: "POST",
|
|
13345
13369
|
path: "/media/v1/libraries/{library_id}/assets:batch",
|
|
13346
13370
|
streaming: "no",
|
|
@@ -13375,7 +13399,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13375
13399
|
resource: "media.libraries.batches",
|
|
13376
13400
|
method: "create",
|
|
13377
13401
|
summary: "Create batch",
|
|
13378
|
-
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.
|
|
13402
|
+
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.',
|
|
13379
13403
|
http: "POST",
|
|
13380
13404
|
path: "/media/v1/libraries/{library_id}/batches",
|
|
13381
13405
|
streaming: "no",
|
|
@@ -16588,6 +16612,539 @@ for more details.`
|
|
|
16588
16612
|
],
|
|
16589
16613
|
query: []
|
|
16590
16614
|
},
|
|
16615
|
+
{
|
|
16616
|
+
resource: "ontology.changesets",
|
|
16617
|
+
method: "create",
|
|
16618
|
+
summary: "Apply changeset",
|
|
16619
|
+
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.",
|
|
16620
|
+
http: "POST",
|
|
16621
|
+
path: "/ontology/v1/changesets",
|
|
16622
|
+
streaming: "no",
|
|
16623
|
+
pagination: false,
|
|
16624
|
+
pathParams: [],
|
|
16625
|
+
query: [],
|
|
16626
|
+
body: {
|
|
16627
|
+
required: true,
|
|
16628
|
+
fields: [
|
|
16629
|
+
{
|
|
16630
|
+
name: "at",
|
|
16631
|
+
type: "string",
|
|
16632
|
+
required: true,
|
|
16633
|
+
description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
|
|
16634
|
+
},
|
|
16635
|
+
{
|
|
16636
|
+
name: "scope",
|
|
16637
|
+
type: "string",
|
|
16638
|
+
required: false,
|
|
16639
|
+
description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
|
|
16640
|
+
},
|
|
16641
|
+
{
|
|
16642
|
+
name: "ops",
|
|
16643
|
+
type: "array",
|
|
16644
|
+
itemType: "object",
|
|
16645
|
+
required: true,
|
|
16646
|
+
description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
|
|
16647
|
+
}
|
|
16648
|
+
]
|
|
16649
|
+
}
|
|
16650
|
+
},
|
|
16651
|
+
{
|
|
16652
|
+
resource: "ontology.nodes",
|
|
16653
|
+
method: "list",
|
|
16654
|
+
summary: "List nodes",
|
|
16655
|
+
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.",
|
|
16656
|
+
http: "GET",
|
|
16657
|
+
path: "/ontology/v1/nodes",
|
|
16658
|
+
streaming: "no",
|
|
16659
|
+
pagination: true,
|
|
16660
|
+
pathParams: [],
|
|
16661
|
+
query: [
|
|
16662
|
+
{
|
|
16663
|
+
name: "type",
|
|
16664
|
+
type: "array",
|
|
16665
|
+
itemType: "string",
|
|
16666
|
+
required: false,
|
|
16667
|
+
description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
|
|
16668
|
+
},
|
|
16669
|
+
{
|
|
16670
|
+
name: "q",
|
|
16671
|
+
type: "string",
|
|
16672
|
+
required: false,
|
|
16673
|
+
description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
|
|
16674
|
+
},
|
|
16675
|
+
{
|
|
16676
|
+
name: "owner",
|
|
16677
|
+
type: "string",
|
|
16678
|
+
required: false,
|
|
16679
|
+
description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
|
|
16680
|
+
},
|
|
16681
|
+
{
|
|
16682
|
+
name: "as_of",
|
|
16683
|
+
type: "string",
|
|
16684
|
+
required: false,
|
|
16685
|
+
description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
|
|
16686
|
+
},
|
|
16687
|
+
{
|
|
16688
|
+
name: "limit",
|
|
16689
|
+
type: "integer",
|
|
16690
|
+
required: false,
|
|
16691
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
16692
|
+
},
|
|
16693
|
+
{
|
|
16694
|
+
name: "cursor",
|
|
16695
|
+
type: "string",
|
|
16696
|
+
required: false,
|
|
16697
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
16698
|
+
}
|
|
16699
|
+
]
|
|
16700
|
+
},
|
|
16701
|
+
{
|
|
16702
|
+
resource: "ontology.nodes",
|
|
16703
|
+
method: "create",
|
|
16704
|
+
summary: "Create node",
|
|
16705
|
+
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.",
|
|
16706
|
+
http: "POST",
|
|
16707
|
+
path: "/ontology/v1/nodes",
|
|
16708
|
+
streaming: "no",
|
|
16709
|
+
pagination: false,
|
|
16710
|
+
pathParams: [],
|
|
16711
|
+
query: [],
|
|
16712
|
+
body: {
|
|
16713
|
+
required: true,
|
|
16714
|
+
fields: [
|
|
16715
|
+
{
|
|
16716
|
+
name: "type",
|
|
16717
|
+
type: "string",
|
|
16718
|
+
required: true,
|
|
16719
|
+
description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
|
|
16720
|
+
},
|
|
16721
|
+
{
|
|
16722
|
+
name: "ref",
|
|
16723
|
+
type: "string",
|
|
16724
|
+
required: false,
|
|
16725
|
+
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."
|
|
16726
|
+
},
|
|
16727
|
+
{
|
|
16728
|
+
name: "name",
|
|
16729
|
+
type: "string",
|
|
16730
|
+
required: true,
|
|
16731
|
+
description: "Display name of the entity, at most 200 characters."
|
|
16732
|
+
},
|
|
16733
|
+
{
|
|
16734
|
+
name: "aliases",
|
|
16735
|
+
type: "array",
|
|
16736
|
+
itemType: "string",
|
|
16737
|
+
required: false,
|
|
16738
|
+
description: "Other names this entity is known by; they are matched by search alongside the name."
|
|
16739
|
+
},
|
|
16740
|
+
{
|
|
16741
|
+
name: "description",
|
|
16742
|
+
type: "string",
|
|
16743
|
+
required: false,
|
|
16744
|
+
description: "Profile of the entity, at most 500 characters; omit or null for none."
|
|
16745
|
+
},
|
|
16746
|
+
{
|
|
16747
|
+
name: "owner",
|
|
16748
|
+
type: "string",
|
|
16749
|
+
required: false,
|
|
16750
|
+
description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
|
|
16751
|
+
}
|
|
16752
|
+
]
|
|
16753
|
+
}
|
|
16754
|
+
},
|
|
16755
|
+
{
|
|
16756
|
+
resource: "ontology.nodes",
|
|
16757
|
+
method: "retrieve",
|
|
16758
|
+
summary: "Retrieve node",
|
|
16759
|
+
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.",
|
|
16760
|
+
http: "GET",
|
|
16761
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16762
|
+
streaming: "no",
|
|
16763
|
+
pagination: false,
|
|
16764
|
+
pathParams: [
|
|
16765
|
+
{
|
|
16766
|
+
name: "node_id",
|
|
16767
|
+
sdkName: "node_id",
|
|
16768
|
+
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."
|
|
16769
|
+
}
|
|
16770
|
+
],
|
|
16771
|
+
query: [
|
|
16772
|
+
{
|
|
16773
|
+
name: "expand",
|
|
16774
|
+
type: "string",
|
|
16775
|
+
enum: [
|
|
16776
|
+
"relations"
|
|
16777
|
+
],
|
|
16778
|
+
required: false,
|
|
16779
|
+
description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
|
|
16780
|
+
},
|
|
16781
|
+
{
|
|
16782
|
+
name: "as_of",
|
|
16783
|
+
type: "string",
|
|
16784
|
+
required: false,
|
|
16785
|
+
description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
|
|
16786
|
+
}
|
|
16787
|
+
]
|
|
16788
|
+
},
|
|
16789
|
+
{
|
|
16790
|
+
resource: "ontology.nodes",
|
|
16791
|
+
method: "update",
|
|
16792
|
+
summary: "Update node",
|
|
16793
|
+
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.",
|
|
16794
|
+
http: "PATCH",
|
|
16795
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16796
|
+
streaming: "no",
|
|
16797
|
+
pagination: false,
|
|
16798
|
+
pathParams: [
|
|
16799
|
+
{
|
|
16800
|
+
name: "node_id",
|
|
16801
|
+
sdkName: "node_id",
|
|
16802
|
+
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."
|
|
16803
|
+
}
|
|
16804
|
+
],
|
|
16805
|
+
query: [],
|
|
16806
|
+
body: {
|
|
16807
|
+
required: true,
|
|
16808
|
+
fields: [
|
|
16809
|
+
{
|
|
16810
|
+
name: "name",
|
|
16811
|
+
type: "string",
|
|
16812
|
+
required: false,
|
|
16813
|
+
description: "New display name, at most 200 characters; omit to keep the current name."
|
|
16814
|
+
},
|
|
16815
|
+
{
|
|
16816
|
+
name: "aliases",
|
|
16817
|
+
type: "array",
|
|
16818
|
+
itemType: "string",
|
|
16819
|
+
required: false,
|
|
16820
|
+
description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
|
|
16821
|
+
},
|
|
16822
|
+
{
|
|
16823
|
+
name: "description",
|
|
16824
|
+
type: "string",
|
|
16825
|
+
required: false,
|
|
16826
|
+
description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
|
|
16827
|
+
}
|
|
16828
|
+
]
|
|
16829
|
+
}
|
|
16830
|
+
},
|
|
16831
|
+
{
|
|
16832
|
+
resource: "ontology.nodes.merge",
|
|
16833
|
+
method: "create",
|
|
16834
|
+
summary: "Merge node",
|
|
16835
|
+
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.",
|
|
16836
|
+
http: "POST",
|
|
16837
|
+
path: "/ontology/v1/nodes/{node_id}/merge",
|
|
16838
|
+
streaming: "no",
|
|
16839
|
+
pagination: false,
|
|
16840
|
+
pathParams: [
|
|
16841
|
+
{
|
|
16842
|
+
name: "node_id",
|
|
16843
|
+
sdkName: "node_id",
|
|
16844
|
+
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."
|
|
16845
|
+
}
|
|
16846
|
+
],
|
|
16847
|
+
query: [],
|
|
16848
|
+
body: {
|
|
16849
|
+
required: true,
|
|
16850
|
+
fields: [
|
|
16851
|
+
{
|
|
16852
|
+
name: "into",
|
|
16853
|
+
type: "string",
|
|
16854
|
+
required: true,
|
|
16855
|
+
description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
|
|
16856
|
+
}
|
|
16857
|
+
]
|
|
16858
|
+
}
|
|
16859
|
+
},
|
|
16860
|
+
{
|
|
16861
|
+
resource: "ontology.relations",
|
|
16862
|
+
method: "list",
|
|
16863
|
+
summary: "List relations",
|
|
16864
|
+
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.",
|
|
16865
|
+
http: "GET",
|
|
16866
|
+
path: "/ontology/v1/relations",
|
|
16867
|
+
streaming: "no",
|
|
16868
|
+
pagination: true,
|
|
16869
|
+
pathParams: [],
|
|
16870
|
+
query: [
|
|
16871
|
+
{
|
|
16872
|
+
name: "node",
|
|
16873
|
+
type: "string",
|
|
16874
|
+
required: false,
|
|
16875
|
+
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."
|
|
16876
|
+
},
|
|
16877
|
+
{
|
|
16878
|
+
name: "type",
|
|
16879
|
+
type: "array",
|
|
16880
|
+
itemType: "string",
|
|
16881
|
+
required: false,
|
|
16882
|
+
description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
|
|
16883
|
+
},
|
|
16884
|
+
{
|
|
16885
|
+
name: "direction",
|
|
16886
|
+
type: "string",
|
|
16887
|
+
enum: [
|
|
16888
|
+
"out",
|
|
16889
|
+
"in",
|
|
16890
|
+
"both"
|
|
16891
|
+
],
|
|
16892
|
+
required: false,
|
|
16893
|
+
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."
|
|
16894
|
+
},
|
|
16895
|
+
{
|
|
16896
|
+
name: "as_of",
|
|
16897
|
+
type: "string",
|
|
16898
|
+
required: false,
|
|
16899
|
+
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."
|
|
16900
|
+
},
|
|
16901
|
+
{
|
|
16902
|
+
name: "include_invalid",
|
|
16903
|
+
type: "boolean",
|
|
16904
|
+
required: false,
|
|
16905
|
+
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."
|
|
16906
|
+
},
|
|
16907
|
+
{
|
|
16908
|
+
name: "limit",
|
|
16909
|
+
type: "integer",
|
|
16910
|
+
required: false,
|
|
16911
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
16912
|
+
},
|
|
16913
|
+
{
|
|
16914
|
+
name: "cursor",
|
|
16915
|
+
type: "string",
|
|
16916
|
+
required: false,
|
|
16917
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
16918
|
+
}
|
|
16919
|
+
]
|
|
16920
|
+
},
|
|
16921
|
+
{
|
|
16922
|
+
resource: "ontology.relations",
|
|
16923
|
+
method: "create",
|
|
16924
|
+
summary: "Create relation",
|
|
16925
|
+
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.",
|
|
16926
|
+
http: "POST",
|
|
16927
|
+
path: "/ontology/v1/relations",
|
|
16928
|
+
streaming: "no",
|
|
16929
|
+
pagination: false,
|
|
16930
|
+
pathParams: [],
|
|
16931
|
+
query: [],
|
|
16932
|
+
body: {
|
|
16933
|
+
required: true,
|
|
16934
|
+
fields: [
|
|
16935
|
+
{
|
|
16936
|
+
name: "type",
|
|
16937
|
+
type: "string",
|
|
16938
|
+
required: true,
|
|
16939
|
+
description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
|
|
16940
|
+
},
|
|
16941
|
+
{
|
|
16942
|
+
name: "source",
|
|
16943
|
+
type: "string",
|
|
16944
|
+
required: true,
|
|
16945
|
+
description: "Node id the fact starts from, from nodes.list or nodes.create."
|
|
16946
|
+
},
|
|
16947
|
+
{
|
|
16948
|
+
name: "target",
|
|
16949
|
+
type: "string",
|
|
16950
|
+
required: true,
|
|
16951
|
+
description: "Node id the fact points at, from nodes.list or nodes.create."
|
|
16952
|
+
},
|
|
16953
|
+
{
|
|
16954
|
+
name: "fact",
|
|
16955
|
+
type: "string",
|
|
16956
|
+
required: true,
|
|
16957
|
+
description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
|
|
16958
|
+
},
|
|
16959
|
+
{
|
|
16960
|
+
name: "valid_at",
|
|
16961
|
+
type: "string",
|
|
16962
|
+
required: false,
|
|
16963
|
+
description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
|
|
16964
|
+
},
|
|
16965
|
+
{
|
|
16966
|
+
name: "owner",
|
|
16967
|
+
type: "string",
|
|
16968
|
+
required: false,
|
|
16969
|
+
description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
|
|
16970
|
+
}
|
|
16971
|
+
]
|
|
16972
|
+
}
|
|
16973
|
+
},
|
|
16974
|
+
{
|
|
16975
|
+
resource: "ontology.relations",
|
|
16976
|
+
method: "retrieve",
|
|
16977
|
+
summary: "Retrieve relation",
|
|
16978
|
+
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.",
|
|
16979
|
+
http: "GET",
|
|
16980
|
+
path: "/ontology/v1/relations/{relation_id}",
|
|
16981
|
+
streaming: "no",
|
|
16982
|
+
pagination: false,
|
|
16983
|
+
pathParams: [
|
|
16984
|
+
{
|
|
16985
|
+
name: "relation_id",
|
|
16986
|
+
sdkName: "relation_id",
|
|
16987
|
+
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."
|
|
16988
|
+
}
|
|
16989
|
+
],
|
|
16990
|
+
query: []
|
|
16991
|
+
},
|
|
16992
|
+
{
|
|
16993
|
+
resource: "ontology.relations.invalidate",
|
|
16994
|
+
method: "create",
|
|
16995
|
+
summary: "Invalidate relation",
|
|
16996
|
+
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.",
|
|
16997
|
+
http: "POST",
|
|
16998
|
+
path: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
16999
|
+
streaming: "no",
|
|
17000
|
+
pagination: false,
|
|
17001
|
+
pathParams: [
|
|
17002
|
+
{
|
|
17003
|
+
name: "relation_id",
|
|
17004
|
+
sdkName: "relation_id",
|
|
17005
|
+
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."
|
|
17006
|
+
}
|
|
17007
|
+
],
|
|
17008
|
+
query: [],
|
|
17009
|
+
body: {
|
|
17010
|
+
required: true,
|
|
17011
|
+
fields: [
|
|
17012
|
+
{
|
|
17013
|
+
name: "invalid_at",
|
|
17014
|
+
type: "string",
|
|
17015
|
+
required: true,
|
|
17016
|
+
description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
|
|
17017
|
+
},
|
|
17018
|
+
{
|
|
17019
|
+
name: "superseded_by",
|
|
17020
|
+
type: "string",
|
|
17021
|
+
required: false,
|
|
17022
|
+
description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
|
|
17023
|
+
},
|
|
17024
|
+
{
|
|
17025
|
+
name: "reason",
|
|
17026
|
+
type: "string",
|
|
17027
|
+
required: false,
|
|
17028
|
+
description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
|
|
17029
|
+
}
|
|
17030
|
+
]
|
|
17031
|
+
}
|
|
17032
|
+
},
|
|
17033
|
+
{
|
|
17034
|
+
resource: "ontology.search",
|
|
17035
|
+
method: "create",
|
|
17036
|
+
summary: "Search nodes",
|
|
17037
|
+
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.",
|
|
17038
|
+
http: "POST",
|
|
17039
|
+
path: "/ontology/v1/search",
|
|
17040
|
+
streaming: "no",
|
|
17041
|
+
pagination: false,
|
|
17042
|
+
pathParams: [],
|
|
17043
|
+
query: [],
|
|
17044
|
+
body: {
|
|
17045
|
+
required: true,
|
|
17046
|
+
fields: [
|
|
17047
|
+
{
|
|
17048
|
+
name: "text",
|
|
17049
|
+
type: "string",
|
|
17050
|
+
required: true,
|
|
17051
|
+
description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
|
|
17052
|
+
},
|
|
17053
|
+
{
|
|
17054
|
+
name: "types",
|
|
17055
|
+
type: "array",
|
|
17056
|
+
itemType: "string",
|
|
17057
|
+
required: false,
|
|
17058
|
+
description: "Registered node type names to search within; omit to search every type."
|
|
17059
|
+
},
|
|
17060
|
+
{
|
|
17061
|
+
name: "window",
|
|
17062
|
+
type: "object",
|
|
17063
|
+
required: false,
|
|
17064
|
+
description: "Restrict matches to facts recorded within a period; omit to search all time."
|
|
17065
|
+
},
|
|
17066
|
+
{
|
|
17067
|
+
name: "limit",
|
|
17068
|
+
type: "integer",
|
|
17069
|
+
required: false,
|
|
17070
|
+
description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
|
|
17071
|
+
}
|
|
17072
|
+
]
|
|
17073
|
+
}
|
|
17074
|
+
},
|
|
17075
|
+
{
|
|
17076
|
+
resource: "ontology.types",
|
|
17077
|
+
method: "list",
|
|
17078
|
+
summary: "List types",
|
|
17079
|
+
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.",
|
|
17080
|
+
http: "GET",
|
|
17081
|
+
path: "/ontology/v1/types",
|
|
17082
|
+
streaming: "no",
|
|
17083
|
+
pagination: false,
|
|
17084
|
+
pathParams: [],
|
|
17085
|
+
query: []
|
|
17086
|
+
},
|
|
17087
|
+
{
|
|
17088
|
+
resource: "ontology.types",
|
|
17089
|
+
method: "create",
|
|
17090
|
+
summary: "Register type",
|
|
17091
|
+
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.",
|
|
17092
|
+
http: "POST",
|
|
17093
|
+
path: "/ontology/v1/types",
|
|
17094
|
+
streaming: "no",
|
|
17095
|
+
pagination: false,
|
|
17096
|
+
pathParams: [],
|
|
17097
|
+
query: [],
|
|
17098
|
+
body: {
|
|
17099
|
+
required: true,
|
|
17100
|
+
fields: [
|
|
17101
|
+
{
|
|
17102
|
+
name: "owner",
|
|
17103
|
+
type: "string",
|
|
17104
|
+
required: true,
|
|
17105
|
+
description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
|
|
17106
|
+
},
|
|
17107
|
+
{
|
|
17108
|
+
name: "version",
|
|
17109
|
+
type: "integer",
|
|
17110
|
+
required: true,
|
|
17111
|
+
description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
|
|
17112
|
+
},
|
|
17113
|
+
{
|
|
17114
|
+
name: "nodes",
|
|
17115
|
+
type: "array",
|
|
17116
|
+
itemType: "object",
|
|
17117
|
+
required: true,
|
|
17118
|
+
description: "Node types this owner registers."
|
|
17119
|
+
},
|
|
17120
|
+
{
|
|
17121
|
+
name: "edges",
|
|
17122
|
+
type: "array",
|
|
17123
|
+
itemType: "object",
|
|
17124
|
+
required: true,
|
|
17125
|
+
description: "Relation types this owner registers."
|
|
17126
|
+
}
|
|
17127
|
+
]
|
|
17128
|
+
}
|
|
17129
|
+
},
|
|
17130
|
+
{
|
|
17131
|
+
resource: "ontology.types",
|
|
17132
|
+
method: "retrieve",
|
|
17133
|
+
summary: "Retrieve type",
|
|
17134
|
+
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.",
|
|
17135
|
+
http: "GET",
|
|
17136
|
+
path: "/ontology/v1/types/{name}",
|
|
17137
|
+
streaming: "no",
|
|
17138
|
+
pagination: false,
|
|
17139
|
+
pathParams: [
|
|
17140
|
+
{
|
|
17141
|
+
name: "name",
|
|
17142
|
+
sdkName: "name",
|
|
17143
|
+
description: "A type name from types.list, with its dots preserved — a display label is not accepted."
|
|
17144
|
+
}
|
|
17145
|
+
],
|
|
17146
|
+
query: []
|
|
17147
|
+
},
|
|
16591
17148
|
{
|
|
16592
17149
|
resource: "organization.charges",
|
|
16593
17150
|
method: "list",
|
|
@@ -20780,7 +21337,7 @@ for more details.`
|
|
|
20780
21337
|
resource: "vault.vaults",
|
|
20781
21338
|
method: "create",
|
|
20782
21339
|
summary: "Create vault",
|
|
20783
|
-
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.
|
|
21340
|
+
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.",
|
|
20784
21341
|
http: "POST",
|
|
20785
21342
|
path: "/vault/v1/vaults",
|
|
20786
21343
|
streaming: "no",
|
|
@@ -23240,6 +23797,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
23240
23797
|
url: "/file/v1/uploads/{upload_id}/cancel",
|
|
23241
23798
|
...options
|
|
23242
23799
|
});
|
|
23800
|
+
var fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
23801
|
+
security: [{
|
|
23802
|
+
key: "BearerAuth",
|
|
23803
|
+
scheme: "bearer",
|
|
23804
|
+
type: "http"
|
|
23805
|
+
}],
|
|
23806
|
+
url: "/file/v1/uploads/{upload_id}",
|
|
23807
|
+
...options
|
|
23808
|
+
});
|
|
23243
23809
|
var fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
23244
23810
|
security: [{
|
|
23245
23811
|
key: "BearerAuth",
|
|
@@ -27998,6 +28564,164 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
|
|
|
27998
28564
|
url: "/media/v1/generation/capabilities",
|
|
27999
28565
|
...options
|
|
28000
28566
|
});
|
|
28567
|
+
var ontologyListTypes = (options) => (options?.client ?? client).get({
|
|
28568
|
+
security: [{
|
|
28569
|
+
key: "ontology-bearerAuth",
|
|
28570
|
+
scheme: "bearer",
|
|
28571
|
+
type: "http"
|
|
28572
|
+
}],
|
|
28573
|
+
url: "/ontology/v1/types",
|
|
28574
|
+
...options
|
|
28575
|
+
});
|
|
28576
|
+
var ontologyRegisterType = (options) => (options.client ?? client).post({
|
|
28577
|
+
security: [{
|
|
28578
|
+
key: "ontology-bearerAuth",
|
|
28579
|
+
scheme: "bearer",
|
|
28580
|
+
type: "http"
|
|
28581
|
+
}],
|
|
28582
|
+
url: "/ontology/v1/types",
|
|
28583
|
+
...options,
|
|
28584
|
+
headers: {
|
|
28585
|
+
"Content-Type": "application/json",
|
|
28586
|
+
...options.headers
|
|
28587
|
+
}
|
|
28588
|
+
});
|
|
28589
|
+
var ontologyRetrieveType = (options) => (options.client ?? client).get({
|
|
28590
|
+
security: [{
|
|
28591
|
+
key: "ontology-bearerAuth",
|
|
28592
|
+
scheme: "bearer",
|
|
28593
|
+
type: "http"
|
|
28594
|
+
}],
|
|
28595
|
+
url: "/ontology/v1/types/{name}",
|
|
28596
|
+
...options
|
|
28597
|
+
});
|
|
28598
|
+
var ontologyListNodes = (options) => (options?.client ?? client).get({
|
|
28599
|
+
security: [{
|
|
28600
|
+
key: "ontology-bearerAuth",
|
|
28601
|
+
scheme: "bearer",
|
|
28602
|
+
type: "http"
|
|
28603
|
+
}],
|
|
28604
|
+
url: "/ontology/v1/nodes",
|
|
28605
|
+
...options
|
|
28606
|
+
});
|
|
28607
|
+
var ontologyCreateNode = (options) => (options.client ?? client).post({
|
|
28608
|
+
security: [{
|
|
28609
|
+
key: "ontology-bearerAuth",
|
|
28610
|
+
scheme: "bearer",
|
|
28611
|
+
type: "http"
|
|
28612
|
+
}],
|
|
28613
|
+
url: "/ontology/v1/nodes",
|
|
28614
|
+
...options,
|
|
28615
|
+
headers: {
|
|
28616
|
+
"Content-Type": "application/json",
|
|
28617
|
+
...options.headers
|
|
28618
|
+
}
|
|
28619
|
+
});
|
|
28620
|
+
var ontologyRetrieveNode = (options) => (options.client ?? client).get({
|
|
28621
|
+
security: [{
|
|
28622
|
+
key: "ontology-bearerAuth",
|
|
28623
|
+
scheme: "bearer",
|
|
28624
|
+
type: "http"
|
|
28625
|
+
}],
|
|
28626
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
28627
|
+
...options
|
|
28628
|
+
});
|
|
28629
|
+
var ontologyUpdateNode = (options) => (options.client ?? client).patch({
|
|
28630
|
+
security: [{
|
|
28631
|
+
key: "ontology-bearerAuth",
|
|
28632
|
+
scheme: "bearer",
|
|
28633
|
+
type: "http"
|
|
28634
|
+
}],
|
|
28635
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
28636
|
+
...options,
|
|
28637
|
+
headers: {
|
|
28638
|
+
"Content-Type": "application/json",
|
|
28639
|
+
...options.headers
|
|
28640
|
+
}
|
|
28641
|
+
});
|
|
28642
|
+
var ontologyMergeNode = (options) => (options.client ?? client).post({
|
|
28643
|
+
security: [{
|
|
28644
|
+
key: "ontology-bearerAuth",
|
|
28645
|
+
scheme: "bearer",
|
|
28646
|
+
type: "http"
|
|
28647
|
+
}],
|
|
28648
|
+
url: "/ontology/v1/nodes/{node_id}/merge",
|
|
28649
|
+
...options,
|
|
28650
|
+
headers: {
|
|
28651
|
+
"Content-Type": "application/json",
|
|
28652
|
+
...options.headers
|
|
28653
|
+
}
|
|
28654
|
+
});
|
|
28655
|
+
var ontologyListRelations = (options) => (options?.client ?? client).get({
|
|
28656
|
+
security: [{
|
|
28657
|
+
key: "ontology-bearerAuth",
|
|
28658
|
+
scheme: "bearer",
|
|
28659
|
+
type: "http"
|
|
28660
|
+
}],
|
|
28661
|
+
url: "/ontology/v1/relations",
|
|
28662
|
+
...options
|
|
28663
|
+
});
|
|
28664
|
+
var ontologyCreateRelation = (options) => (options.client ?? client).post({
|
|
28665
|
+
security: [{
|
|
28666
|
+
key: "ontology-bearerAuth",
|
|
28667
|
+
scheme: "bearer",
|
|
28668
|
+
type: "http"
|
|
28669
|
+
}],
|
|
28670
|
+
url: "/ontology/v1/relations",
|
|
28671
|
+
...options,
|
|
28672
|
+
headers: {
|
|
28673
|
+
"Content-Type": "application/json",
|
|
28674
|
+
...options.headers
|
|
28675
|
+
}
|
|
28676
|
+
});
|
|
28677
|
+
var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
|
|
28678
|
+
security: [{
|
|
28679
|
+
key: "ontology-bearerAuth",
|
|
28680
|
+
scheme: "bearer",
|
|
28681
|
+
type: "http"
|
|
28682
|
+
}],
|
|
28683
|
+
url: "/ontology/v1/relations/{relation_id}",
|
|
28684
|
+
...options
|
|
28685
|
+
});
|
|
28686
|
+
var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
|
|
28687
|
+
security: [{
|
|
28688
|
+
key: "ontology-bearerAuth",
|
|
28689
|
+
scheme: "bearer",
|
|
28690
|
+
type: "http"
|
|
28691
|
+
}],
|
|
28692
|
+
url: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
28693
|
+
...options,
|
|
28694
|
+
headers: {
|
|
28695
|
+
"Content-Type": "application/json",
|
|
28696
|
+
...options.headers
|
|
28697
|
+
}
|
|
28698
|
+
});
|
|
28699
|
+
var ontologyApplyChangeset = (options) => (options.client ?? client).post({
|
|
28700
|
+
security: [{
|
|
28701
|
+
key: "ontology-bearerAuth",
|
|
28702
|
+
scheme: "bearer",
|
|
28703
|
+
type: "http"
|
|
28704
|
+
}],
|
|
28705
|
+
url: "/ontology/v1/changesets",
|
|
28706
|
+
...options,
|
|
28707
|
+
headers: {
|
|
28708
|
+
"Content-Type": "application/json",
|
|
28709
|
+
...options.headers
|
|
28710
|
+
}
|
|
28711
|
+
});
|
|
28712
|
+
var ontologySearch = (options) => (options.client ?? client).post({
|
|
28713
|
+
security: [{
|
|
28714
|
+
key: "ontology-bearerAuth",
|
|
28715
|
+
scheme: "bearer",
|
|
28716
|
+
type: "http"
|
|
28717
|
+
}],
|
|
28718
|
+
url: "/ontology/v1/search",
|
|
28719
|
+
...options,
|
|
28720
|
+
headers: {
|
|
28721
|
+
"Content-Type": "application/json",
|
|
28722
|
+
...options.headers
|
|
28723
|
+
}
|
|
28724
|
+
});
|
|
28001
28725
|
var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
28002
28726
|
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
28003
28727
|
security: [
|
|
@@ -30396,7 +31120,8 @@ function createFile(transport) {
|
|
|
30396
31120
|
createSigned: bind(transport, fileCreateSignedUpload),
|
|
30397
31121
|
parts: {
|
|
30398
31122
|
create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
|
|
30399
|
-
}
|
|
31123
|
+
},
|
|
31124
|
+
retrieve: bind(transport, fileRetrieveUpload)
|
|
30400
31125
|
}
|
|
30401
31126
|
};
|
|
30402
31127
|
}
|
|
@@ -30624,6 +31349,38 @@ function createModel(transport) {
|
|
|
30624
31349
|
}
|
|
30625
31350
|
};
|
|
30626
31351
|
}
|
|
31352
|
+
function createOntology(transport) {
|
|
31353
|
+
return {
|
|
31354
|
+
changesets: {
|
|
31355
|
+
create: bind(transport, ontologyApplyChangeset)
|
|
31356
|
+
},
|
|
31357
|
+
nodes: {
|
|
31358
|
+
create: bind(transport, ontologyCreateNode),
|
|
31359
|
+
list: bindPage(transport, ontologyListNodes),
|
|
31360
|
+
merge: {
|
|
31361
|
+
create: bind(transport, ontologyMergeNode)
|
|
31362
|
+
},
|
|
31363
|
+
retrieve: bind(transport, ontologyRetrieveNode),
|
|
31364
|
+
update: bind(transport, ontologyUpdateNode)
|
|
31365
|
+
},
|
|
31366
|
+
relations: {
|
|
31367
|
+
create: bind(transport, ontologyCreateRelation),
|
|
31368
|
+
invalidate: {
|
|
31369
|
+
create: bind(transport, ontologyInvalidateRelation)
|
|
31370
|
+
},
|
|
31371
|
+
list: bindPage(transport, ontologyListRelations),
|
|
31372
|
+
retrieve: bind(transport, ontologyRetrieveRelation)
|
|
31373
|
+
},
|
|
31374
|
+
search: {
|
|
31375
|
+
create: bind(transport, ontologySearch)
|
|
31376
|
+
},
|
|
31377
|
+
types: {
|
|
31378
|
+
create: bind(transport, ontologyRegisterType),
|
|
31379
|
+
list: bind(transport, ontologyListTypes),
|
|
31380
|
+
retrieve: bind(transport, ontologyRetrieveType)
|
|
31381
|
+
}
|
|
31382
|
+
};
|
|
31383
|
+
}
|
|
30627
31384
|
function createOrganization(transport) {
|
|
30628
31385
|
return {
|
|
30629
31386
|
charges: {
|
|
@@ -30890,6 +31647,7 @@ var resourceFactories = {
|
|
|
30890
31647
|
media: createMedia,
|
|
30891
31648
|
meta: createMeta,
|
|
30892
31649
|
model: createModel,
|
|
31650
|
+
ontology: createOntology,
|
|
30893
31651
|
organization: createOrganization,
|
|
30894
31652
|
sandbox: createSandbox,
|
|
30895
31653
|
search: createSearch,
|
|
@@ -31963,6 +32721,26 @@ async function prepareMultipart(op, opts) {
|
|
|
31963
32721
|
opts.body = body;
|
|
31964
32722
|
}
|
|
31965
32723
|
|
|
32724
|
+
// src/core/pagination.ts
|
|
32725
|
+
var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
|
|
32726
|
+
function pageTokenField(op) {
|
|
32727
|
+
return op.query.find((field) => PAGE_TOKENS.test(field.name));
|
|
32728
|
+
}
|
|
32729
|
+
function nextPageToken(result) {
|
|
32730
|
+
const value = result;
|
|
32731
|
+
const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
|
|
32732
|
+
return typeof token === "string" && token ? token : undefined;
|
|
32733
|
+
}
|
|
32734
|
+
function pageOf(result) {
|
|
32735
|
+
const value = result;
|
|
32736
|
+
const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
|
|
32737
|
+
const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
|
|
32738
|
+
if (!Array.isArray(data))
|
|
32739
|
+
return;
|
|
32740
|
+
const token = nextPageToken(result);
|
|
32741
|
+
return { items: data, ...token ? { token } : {} };
|
|
32742
|
+
}
|
|
32743
|
+
|
|
31966
32744
|
// src/core/bind-args.ts
|
|
31967
32745
|
var globalOptions = [
|
|
31968
32746
|
{ name: "org", type: "string" },
|
|
@@ -32178,7 +32956,7 @@ function bindArgs(parsed, op, data) {
|
|
|
32178
32956
|
(opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
|
|
32179
32957
|
}
|
|
32180
32958
|
}
|
|
32181
|
-
if (globals.all && !op.pagination)
|
|
32959
|
+
if (globals.all && !op.pagination && !pageTokenField(op))
|
|
32182
32960
|
throw new UsageError("--all requires a paginated operation");
|
|
32183
32961
|
for (const p of op.pathParams)
|
|
32184
32962
|
if (p !== target && opts.path?.[p.sdkName] === undefined)
|
|
@@ -32204,8 +32982,8 @@ function bindArgs(parsed, op, data) {
|
|
|
32204
32982
|
}
|
|
32205
32983
|
|
|
32206
32984
|
// src/core/help.ts
|
|
32207
|
-
function describeOption(s) {
|
|
32208
|
-
return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${
|
|
32985
|
+
function describeOption(s, required = s.required) {
|
|
32986
|
+
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, " ")}` : ""}`;
|
|
32209
32987
|
}
|
|
32210
32988
|
function example(command) {
|
|
32211
32989
|
const target = targetParam(command.op);
|
|
@@ -32221,18 +32999,22 @@ function example(command) {
|
|
|
32221
32999
|
args.push("--yes");
|
|
32222
33000
|
return args.join(" ");
|
|
32223
33001
|
}
|
|
33002
|
+
function fieldRequired(op, field, location) {
|
|
33003
|
+
return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
|
|
33004
|
+
}
|
|
32224
33005
|
function help(commands, prefix, command) {
|
|
32225
33006
|
if (command) {
|
|
32226
33007
|
const target = targetParam(command.op);
|
|
33008
|
+
const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
|
|
32227
33009
|
return [
|
|
32228
|
-
`praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
33010
|
+
`praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
32229
33011
|
`SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
|
|
32230
33012
|
`${command.op.http} ${command.op.path}`,
|
|
32231
33013
|
...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
|
|
32232
33014
|
"",
|
|
32233
33015
|
"Options:",
|
|
32234
33016
|
...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
|
|
32235
|
-
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
|
|
33017
|
+
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
|
|
32236
33018
|
...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" : ""})`) ?? [],
|
|
32237
33019
|
" -h is an alias of --help",
|
|
32238
33020
|
"PRAXIS_ENV=develop|production (default: develop); no --env option.",
|
|
@@ -33600,9 +34382,11 @@ function renderHuman(result, ctx) {
|
|
|
33600
34382
|
const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
|
|
33601
34383
|
const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
|
|
33602
34384
|
` : "";
|
|
34385
|
+
const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
|
|
34386
|
+
`).join("");
|
|
33603
34387
|
return { stderr: err.red(`✗ ${plain(result.message)}`) + `
|
|
33604
34388
|
` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
|
|
33605
|
-
` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
|
|
34389
|
+
` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
|
|
33606
34390
|
` : "") };
|
|
33607
34391
|
}
|
|
33608
34392
|
case "list":
|
|
@@ -33690,8 +34474,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
|
|
|
33690
34474
|
}
|
|
33691
34475
|
|
|
33692
34476
|
// src/output/render.ts
|
|
34477
|
+
var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
|
|
34478
|
+
function serverProblem(raw) {
|
|
34479
|
+
const value = record(raw);
|
|
34480
|
+
const problem = {};
|
|
34481
|
+
for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
|
|
34482
|
+
const entry = value[member];
|
|
34483
|
+
if (entry !== undefined && entry !== null)
|
|
34484
|
+
problem[member] = entry;
|
|
34485
|
+
}
|
|
34486
|
+
const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
|
|
34487
|
+
return adds ? problem : undefined;
|
|
34488
|
+
}
|
|
34489
|
+
function problemLines(problem) {
|
|
34490
|
+
const lines = [];
|
|
34491
|
+
for (const group of [problem?.errors, problem?.violations]) {
|
|
34492
|
+
for (const item of Array.isArray(group) ? group : []) {
|
|
34493
|
+
const entry = record(item);
|
|
34494
|
+
const where = scalar(entry.pointer ?? entry.field);
|
|
34495
|
+
const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
|
|
34496
|
+
if (where || detail)
|
|
34497
|
+
lines.push(`${where ? `${where}: ` : ""}${detail}`);
|
|
34498
|
+
}
|
|
34499
|
+
}
|
|
34500
|
+
return lines;
|
|
34501
|
+
}
|
|
33693
34502
|
function errorJSON(result, ctx) {
|
|
33694
|
-
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 } : {} } }) + `
|
|
34503
|
+
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 } : {} } }) + `
|
|
33695
34504
|
`;
|
|
33696
34505
|
}
|
|
33697
34506
|
function render(result, ctx) {
|
|
@@ -33847,6 +34656,8 @@ function errorInput(error, ctx) {
|
|
|
33847
34656
|
const raw = record(sdk?.raw), nested = record(raw.error);
|
|
33848
34657
|
const candidate = nested.details ?? raw.details;
|
|
33849
34658
|
const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
|
|
34659
|
+
const problem = serverProblem(Object.keys(nested).length ? nested : raw);
|
|
34660
|
+
const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
|
|
33850
34661
|
let message = error instanceof Error ? error.message : "Unexpected error";
|
|
33851
34662
|
const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
|
|
33852
34663
|
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");
|
|
@@ -33858,11 +34669,14 @@ function errorInput(error, ctx) {
|
|
|
33858
34669
|
if (stripped)
|
|
33859
34670
|
message = `${humanize(code)}${message ? `: ${message}` : ""}`;
|
|
33860
34671
|
const status = sdk?.status, request_id = sdk?.requestId;
|
|
34672
|
+
message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
|
|
33861
34673
|
const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
|
|
33862
34674
|
const source = ctx.credentialSource ?? "login";
|
|
33863
34675
|
let hint = genericHint;
|
|
33864
34676
|
if (error instanceof UsageError)
|
|
33865
34677
|
hint = error.hint;
|
|
34678
|
+
else if (serverText(problem?.hint))
|
|
34679
|
+
hint = serverText(problem?.hint);
|
|
33866
34680
|
else if (authFailure)
|
|
33867
34681
|
hint = authHint(source);
|
|
33868
34682
|
else if (status === 404)
|
|
@@ -33873,7 +34687,7 @@ function errorInput(error, ctx) {
|
|
|
33873
34687
|
hint = "Rate limited; retry later.";
|
|
33874
34688
|
else if (status !== undefined && status >= 500)
|
|
33875
34689
|
hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
|
|
33876
|
-
return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
|
|
34690
|
+
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 } : {} };
|
|
33877
34691
|
}
|
|
33878
34692
|
|
|
33879
34693
|
// src/output/progress.ts
|
|
@@ -33903,7 +34717,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
33903
34717
|
}
|
|
33904
34718
|
|
|
33905
34719
|
// src/main.ts
|
|
33906
|
-
var version = "0.2.1-dev.
|
|
34720
|
+
var version = "0.2.1-dev.e9377c2";
|
|
33907
34721
|
var commands = commandTree(operations);
|
|
33908
34722
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
33909
34723
|
function route(argv) {
|
|
@@ -34121,7 +34935,7 @@ Examples:
|
|
|
34121
34935
|
let owner = client2;
|
|
34122
34936
|
for (const part of op.resource.split("."))
|
|
34123
34937
|
owner = owner[part];
|
|
34124
|
-
|
|
34938
|
+
let result = await owner[op.method](opts);
|
|
34125
34939
|
const name2 = `${op.resource}.${op.method}`;
|
|
34126
34940
|
const list = (items) => {
|
|
34127
34941
|
const view = clientList(items, op, flags.limit, ctx.mode);
|
|
@@ -34135,7 +34949,21 @@ Examples:
|
|
|
34135
34949
|
const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
|
|
34136
34950
|
if (typeof cursor === "string" && cursor)
|
|
34137
34951
|
ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
|
|
34138
|
-
|
|
34952
|
+
const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
|
|
34953
|
+
const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
|
|
34954
|
+
if (flags.all && !(result instanceof Page) && token && !firstPage)
|
|
34955
|
+
throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
|
|
34956
|
+
if (firstPage) {
|
|
34957
|
+
const items = [...firstPage.items];
|
|
34958
|
+
const seen = new Set;
|
|
34959
|
+
for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
|
|
34960
|
+
seen.add(next);
|
|
34961
|
+
result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
|
|
34962
|
+
items.push(...pageOf(result)?.items ?? []);
|
|
34963
|
+
}
|
|
34964
|
+
ctx.nextCommand = undefined;
|
|
34965
|
+
emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
|
|
34966
|
+
} else if (result instanceof Page) {
|
|
34139
34967
|
if (flags.all) {
|
|
34140
34968
|
const items = [];
|
|
34141
34969
|
for await (const item of result)
|
|
@@ -34231,7 +35059,7 @@ Examples:
|
|
|
34231
35059
|
}
|
|
34232
35060
|
}
|
|
34233
35061
|
if (true)
|
|
34234
|
-
process.
|
|
35062
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
34235
35063
|
export {
|
|
34236
35064
|
main
|
|
34237
35065
|
};
|