@deepraxis/cli 0.2.1-dev.ec2a9a1 → 0.2.1-dev.f23829c
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 +17 -1
- package/dist/praxis.js +1057 -33
- package/package.json +1 -1
package/dist/praxis.js
CHANGED
|
@@ -1218,6 +1218,37 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
1218
1218
|
}
|
|
1219
1219
|
]
|
|
1220
1220
|
},
|
|
1221
|
+
{
|
|
1222
|
+
resource: "agent.computers.files.convert",
|
|
1223
|
+
method: "create",
|
|
1224
|
+
summary: "Convert a Computer Document to PDF",
|
|
1225
|
+
description: `Convert an Office document (docx, doc, ppt, pptx, rtf, odt; up to 16 MiB) to PDF inside a platform-owned ephemeral document sandbox, whatever machine family the computer itself runs on. Returns base64 PDF bytes.
|
|
1226
|
+
|
|
1227
|
+
Praxis extension: the preview conversion endpoint. The browser never parses an untrusted document — LibreOffice runs only inside an ephemeral document-family sandbox and the converter instance is killed after use. The file stays tenant-owned; non-convertible types answer EXTENSION_NOT_CONVERTIBLE and a failed conversion answers CONVERSION_FAILED.`,
|
|
1228
|
+
http: "POST",
|
|
1229
|
+
path: "/agent/v1/computers/{computer_id}/files/convert",
|
|
1230
|
+
streaming: "no",
|
|
1231
|
+
pagination: false,
|
|
1232
|
+
pathParams: [
|
|
1233
|
+
{
|
|
1234
|
+
name: "computer_id",
|
|
1235
|
+
sdkName: "computer_id",
|
|
1236
|
+
description: "Computer id (cmp_...), as returned by computers.create or computers.list."
|
|
1237
|
+
}
|
|
1238
|
+
],
|
|
1239
|
+
query: [],
|
|
1240
|
+
body: {
|
|
1241
|
+
required: true,
|
|
1242
|
+
fields: [
|
|
1243
|
+
{
|
|
1244
|
+
name: "name",
|
|
1245
|
+
type: "string",
|
|
1246
|
+
required: true,
|
|
1247
|
+
description: "Name of the entry or object."
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1221
1252
|
{
|
|
1222
1253
|
resource: "agent.computers.leases",
|
|
1223
1254
|
method: "delete",
|
|
@@ -6100,7 +6131,7 @@ file at the root of that directory.`
|
|
|
6100
6131
|
"allow"
|
|
6101
6132
|
],
|
|
6102
6133
|
required: false,
|
|
6103
|
-
description: "skip
|
|
6134
|
+
description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
|
|
6104
6135
|
},
|
|
6105
6136
|
{
|
|
6106
6137
|
name: "catchup_window_seconds",
|
|
@@ -6274,7 +6305,7 @@ file at the root of that directory.`
|
|
|
6274
6305
|
"allow"
|
|
6275
6306
|
],
|
|
6276
6307
|
required: false,
|
|
6277
|
-
description: "skip
|
|
6308
|
+
description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
|
|
6278
6309
|
},
|
|
6279
6310
|
{
|
|
6280
6311
|
name: "catchup_window_seconds",
|
|
@@ -10167,7 +10198,7 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10167
10198
|
name: "loudness",
|
|
10168
10199
|
type: "object",
|
|
10169
10200
|
required: false,
|
|
10170
|
-
description: "
|
|
10201
|
+
description: "Loudness normalization target. Omitted, the export is normalized to -14 LUFS integrated and -1 dBTP true peak, the level short-video and streaming platforms play at; null renders without normalization. Normalization adds analysis and rendering work."
|
|
10171
10202
|
}
|
|
10172
10203
|
]
|
|
10173
10204
|
}
|
|
@@ -10391,7 +10422,158 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10391
10422
|
resource: "cut.projects",
|
|
10392
10423
|
method: "execute",
|
|
10393
10424
|
summary: "Execute editing script",
|
|
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): { 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',
|
|
10425
|
+
description: `Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: \`const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);\`
|
|
10426
|
+
|
|
10427
|
+
<!-- cut-reference:start -->
|
|
10428
|
+
### Script function, field and error reference
|
|
10429
|
+
|
|
10430
|
+
Every script function, clip field and error code has its own section, read one at a time:
|
|
10431
|
+
|
|
10432
|
+
\`\`\`
|
|
10433
|
+
codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
|
|
10434
|
+
codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
|
|
10435
|
+
codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
|
|
10436
|
+
codemode.describe("praxis.cut.script") // names, one page at a time
|
|
10437
|
+
\`\`\`
|
|
10438
|
+
|
|
10439
|
+
Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
|
|
10440
|
+
|
|
10441
|
+
#### Script functions (script)
|
|
10442
|
+
|
|
10443
|
+
- \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
|
|
10444
|
+
- \`GetItem\` — One clip's compact view, by id.
|
|
10445
|
+
- \`FindItems\` — Visit every clip with its track; collect results.
|
|
10446
|
+
- \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
|
|
10447
|
+
- \`GetTranscript\` — Transcript words in source microseconds.
|
|
10448
|
+
- \`GetAnalysis\` — Silence, filler or scene segments.
|
|
10449
|
+
- \`ListTransitions\` — Join transition kinds and parameters.
|
|
10450
|
+
- \`ListEffects\` — Visual-effect catalog and parameters.
|
|
10451
|
+
- \`ListAnimations\` — Animation presets by phase and target.
|
|
10452
|
+
- \`ListFonts\` — Font families, weights and scripts.
|
|
10453
|
+
- \`ListTextStyles\` — Text style presets for \`style.preset\`.
|
|
10454
|
+
- \`ListTextTemplates\` — Multi-layer templates and their slots.
|
|
10455
|
+
- \`Insert\` — Add a clip; a track never overlaps itself.
|
|
10456
|
+
- \`Append\` — Add a clip at the end of a track.
|
|
10457
|
+
- \`Update\` — Change named fields; the rest stay.
|
|
10458
|
+
- \`SetSpeed\` — Change rate, keeping source or duration.
|
|
10459
|
+
- \`Delete\` — Remove a clip. There is no \`Remove\`.
|
|
10460
|
+
- \`Join\` — Overlap clips; followers shift, track shortens.
|
|
10461
|
+
- \`UpdateJoin\` — Change a join's length or effect.
|
|
10462
|
+
- \`DeleteJoin\` — Remove a join; restore the butt cut.
|
|
10463
|
+
- \`Split\` — Cut a clip in two at a time.
|
|
10464
|
+
- \`Trim\` — Move one clip edge by seconds.
|
|
10465
|
+
- \`Move\` — Set a clip's start or track.
|
|
10466
|
+
- \`RippleDeleteRange\` — Cut a time range and close the gap.
|
|
10467
|
+
- \`AddTrack\` — Add a video, audio or caption track.
|
|
10468
|
+
- \`UpdateTrack\` — Change a track's name, lock, gain or role.
|
|
10469
|
+
- \`DeleteTrack\` — Remove a track and its clips.
|
|
10470
|
+
- \`SetSettings\` — Change canvas, frame rate or background.
|
|
10471
|
+
- \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
|
|
10472
|
+
- \`InsertTemplate\` — Insert a template and fill its slots.
|
|
10473
|
+
- \`AlignCaptions\` — Rebuild captions from text punctuation.
|
|
10474
|
+
- \`ImportCaptions\` — Import SRT or WebVTT onto captions.
|
|
10475
|
+
- \`ExportCaptions\` — Export captions as SRT or WebVTT.
|
|
10476
|
+
- \`SetMarker\` — Label a timeline position.
|
|
10477
|
+
- \`Print\` — Append values to the result's \`prints\`.
|
|
10478
|
+
- \`Preview\` — Up to 8 frames as inline PNG data URLs.
|
|
10479
|
+
|
|
10480
|
+
#### Fields (fields)
|
|
10481
|
+
|
|
10482
|
+
- \`type\` — Clip kind; decides which fields apply.
|
|
10483
|
+
- \`start\` — Clip start in seconds; snaps to frames.
|
|
10484
|
+
- \`length\` — Duration; optional for video and audio.
|
|
10485
|
+
- \`media\` — Source \`{ libraryId, assetId }\`.
|
|
10486
|
+
- \`sourceIn\` — First source second kept; default 0.
|
|
10487
|
+
- \`sourceOut\` — Exclusive source end; read-only.
|
|
10488
|
+
- \`text\` — Text of a text or caption clip.
|
|
10489
|
+
- \`color\` — Solid colour of a color clip.
|
|
10490
|
+
- \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
|
|
10491
|
+
- \`width\` — Shape width, a fraction of canvas width.
|
|
10492
|
+
- \`height\` — Shape height, a fraction of canvas height.
|
|
10493
|
+
- \`radius\` — Rect corner rounding, in 1080-height px.
|
|
10494
|
+
- \`fill\` — Shape or text paint: colour or gradient.
|
|
10495
|
+
- \`stroke\` — Shape outline: colour and width.
|
|
10496
|
+
- \`transform\` — Position, scale, rotation, opacity, crop, blur.
|
|
10497
|
+
- \`fit\` — contain, cover, fill or none.
|
|
10498
|
+
- \`blend\` — Layer blend mode; null clears.
|
|
10499
|
+
- \`style\` — Text styling: font, fill, strokes, glow, position.
|
|
10500
|
+
- \`style.position\` — top, middle or bottom; omit it, never null.
|
|
10501
|
+
- \`playback\` — Rate, direction, audio policy, or freeze.
|
|
10502
|
+
- \`volumeDb\` — Audio level in dB; 0 is source level.
|
|
10503
|
+
- \`gain\` — Keyframed audio level in dB.
|
|
10504
|
+
- \`fadeIn\` — Fade-in seconds at the clip's start.
|
|
10505
|
+
- \`fadeOut\` — Fade-out seconds at the clip's end.
|
|
10506
|
+
- \`duck\` — Lower this clip while another track plays.
|
|
10507
|
+
- \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
|
|
10508
|
+
- \`reveal\` — Per-character, word or line reveal timing.
|
|
10509
|
+
- \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
|
|
10510
|
+
- \`effects\` — Effect stack, at most 8; null clears.
|
|
10511
|
+
- \`transitionIn\` — Entrance effect: kind plus seconds.
|
|
10512
|
+
- \`transitionOut\` — Exit effect: kind plus seconds.
|
|
10513
|
+
- \`mask\` — Shape, path or track matte.
|
|
10514
|
+
- \`words\` — Caption words with clip-local times.
|
|
10515
|
+
|
|
10516
|
+
#### Error codes (errors)
|
|
10517
|
+
|
|
10518
|
+
- \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
|
|
10519
|
+
- \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
|
|
10520
|
+
- \`INVALID_STYLE\` — A style value is out of range.
|
|
10521
|
+
- \`INVALID_MASK\` — A mask definition is malformed.
|
|
10522
|
+
- \`MASK_IN_USE\` — The edit would break a live mask.
|
|
10523
|
+
- \`TOO_MANY_MASKS\` — At most 16 masks per project.
|
|
10524
|
+
- \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
|
|
10525
|
+
- \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
|
|
10526
|
+
- \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
|
|
10527
|
+
- \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
|
|
10528
|
+
- \`UNKNOWN_FIELD\` — The field name is not accepted here.
|
|
10529
|
+
- \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
|
|
10530
|
+
- \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
|
|
10531
|
+
- \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
|
|
10532
|
+
- \`OVERLAP\` — Two clips on one track would share time.
|
|
10533
|
+
- \`OUT_OF_SOURCE\` — The clip would read past its source.
|
|
10534
|
+
- \`LOCKED_TRACK\` — The edit targets a locked track.
|
|
10535
|
+
- \`UNBOUND_LIBRARY\` — The library is not bound to the project.
|
|
10536
|
+
- \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
|
|
10537
|
+
- \`NOT_FOUND\` — The named id is not in this project.
|
|
10538
|
+
- \`TOO_SHORT\` — The result would be under one frame.
|
|
10539
|
+
- \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
|
|
10540
|
+
- \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
|
|
10541
|
+
- \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
|
|
10542
|
+
- \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
|
|
10543
|
+
- \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
|
|
10544
|
+
- \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
|
|
10545
|
+
- \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
|
|
10546
|
+
- \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
|
|
10547
|
+
- \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
|
|
10548
|
+
- \`PROJECT_NOT_FOUND\` — No visible project has this id.
|
|
10549
|
+
- \`EXPORT_NOT_FOUND\` — No such export in this project.
|
|
10550
|
+
- \`VERSION_NOT_FOUND\` — No saved version has this revision.
|
|
10551
|
+
- \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
|
|
10552
|
+
- \`BINDING_INVALID\` — The binding request is malformed.
|
|
10553
|
+
- \`BINDING_IN_USE\` — Clips still use this library's assets.
|
|
10554
|
+
- \`NOTHING_TO_UNDO\` — No earlier revision to return to.
|
|
10555
|
+
- \`NOTHING_TO_REDO\` — No undone revision is waiting.
|
|
10556
|
+
- \`UNDO_CONFLICT\` — The revision to undo is no longer head.
|
|
10557
|
+
- \`REVISION_CONFLICT\` — The project moved; your revision is stale.
|
|
10558
|
+
- \`CUT_BUSY\` — The project is busy; retry.
|
|
10559
|
+
- \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
|
|
10560
|
+
- \`SCRIPT_ERROR\` — The script threw or did not parse.
|
|
10561
|
+
- \`SCRIPT_LIMIT\` — An execute budget was exceeded.
|
|
10562
|
+
- \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
|
|
10563
|
+
- \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
|
|
10564
|
+
- \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
|
|
10565
|
+
- \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
|
|
10566
|
+
- \`MEDIA_IMPORT_FAILED\` — Importing media failed.
|
|
10567
|
+
- \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
|
|
10568
|
+
- \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
|
|
10569
|
+
- \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
|
|
10570
|
+
- \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
|
|
10571
|
+
- \`INVALID_PARAMS\` — The request is malformed.
|
|
10572
|
+
- \`PERMISSION_DENIED\` — This credential may not do that here.
|
|
10573
|
+
- \`NOT_IMPLEMENTED\` — Not available on this platform yet.
|
|
10574
|
+
- \`INTERNAL\` — Unexpected failure; retry with the request id.
|
|
10575
|
+
<!-- cut-reference:end -->
|
|
10576
|
+
`,
|
|
10395
10577
|
http: "POST",
|
|
10396
10578
|
path: "/cut/v1/projects/{project_id}:execute",
|
|
10397
10579
|
streaming: "no",
|
|
@@ -11636,7 +11818,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11636
11818
|
resource: "file.uploads",
|
|
11637
11819
|
method: "create",
|
|
11638
11820
|
summary: "Create an upload",
|
|
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
|
|
11821
|
+
description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 20 GiB (21474836480 bytes) and only user_data, assistants and vision purposes. Send parts of at most 64000000 bytes; an unfinished upload waits for them for 7 days, so a client can create → send parts → query GET /file/v1/uploads/{upload_id} → resend only the missing parts → complete. Optional part_size fixes every part length and makes each numbered part retryable with identical bytes. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
|
|
11640
11822
|
http: "POST",
|
|
11641
11823
|
path: "/file/v1/uploads",
|
|
11642
11824
|
streaming: "no",
|
|
@@ -11650,7 +11832,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11650
11832
|
name: "bytes",
|
|
11651
11833
|
type: "integer",
|
|
11652
11834
|
required: true,
|
|
11653
|
-
description: "Exact complete file length in bytes, from 1 through
|
|
11835
|
+
description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
|
|
11654
11836
|
},
|
|
11655
11837
|
{
|
|
11656
11838
|
name: "filename",
|
|
@@ -11694,7 +11876,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11694
11876
|
resource: "file.uploads",
|
|
11695
11877
|
method: "createSigned",
|
|
11696
11878
|
summary: "Create a one-time upload URL",
|
|
11697
|
-
description: "Upload a local file of up to
|
|
11879
|
+
description: "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {\"filename\":\"photo.png\",\"bytes\":2048,\"content_type\":\"image/png\"}.",
|
|
11698
11880
|
http: "POST",
|
|
11699
11881
|
path: "/file/v1/uploads/signed",
|
|
11700
11882
|
streaming: "no",
|
|
@@ -11714,7 +11896,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11714
11896
|
name: "bytes",
|
|
11715
11897
|
type: "integer",
|
|
11716
11898
|
required: true,
|
|
11717
|
-
description: "Exact local file size in bytes, from 1 through
|
|
11899
|
+
description: "Exact local file size in bytes, from 1 through 21474836480 (20 GiB). Up to 104857600 bytes returns one PUT URL; larger files return numbered part URLs, a completion URL and a status URL. Every PUT requires its exact signed Content-Length."
|
|
11718
11900
|
},
|
|
11719
11901
|
{
|
|
11720
11902
|
name: "content_type",
|
|
@@ -11737,7 +11919,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11737
11919
|
name: "expires_in",
|
|
11738
11920
|
type: "integer",
|
|
11739
11921
|
required: false,
|
|
11740
|
-
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or
|
|
11922
|
+
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or 604800 (7 days) for multipart. All part URLs, the status URL and the completion URL share one expiry. This does not set the resulting file's lifetime."
|
|
11741
11923
|
},
|
|
11742
11924
|
{
|
|
11743
11925
|
name: "part_size",
|
|
@@ -11748,6 +11930,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11748
11930
|
]
|
|
11749
11931
|
}
|
|
11750
11932
|
},
|
|
11933
|
+
{
|
|
11934
|
+
resource: "file.uploads",
|
|
11935
|
+
method: "retrieve",
|
|
11936
|
+
summary: "Retrieve an upload",
|
|
11937
|
+
description: "Read the state of an unfinished upload — its status, declared bytes, fixed part_size and the parts it already holds (received_parts, each with part_number, bytes and sha256). After a break or a failed part, call it to resend only the missing numbers, then complete. A cancelled or expired upload is refused; a completed one returns its file. A missing or other-organization upload returns 404.",
|
|
11938
|
+
http: "GET",
|
|
11939
|
+
path: "/file/v1/uploads/{upload_id}",
|
|
11940
|
+
streaming: "no",
|
|
11941
|
+
pagination: false,
|
|
11942
|
+
pathParams: [
|
|
11943
|
+
{
|
|
11944
|
+
name: "upload_id",
|
|
11945
|
+
sdkName: "upload_id",
|
|
11946
|
+
description: "Upload identifier returned by create; the upload must belong to your organization."
|
|
11947
|
+
}
|
|
11948
|
+
],
|
|
11949
|
+
query: []
|
|
11950
|
+
},
|
|
11751
11951
|
{
|
|
11752
11952
|
resource: "file.uploads",
|
|
11753
11953
|
method: "cancel",
|
|
@@ -11770,7 +11970,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11770
11970
|
resource: "file.uploads",
|
|
11771
11971
|
method: "complete",
|
|
11772
11972
|
summary: "Complete an upload",
|
|
11773
|
-
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
11973
|
+
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. When parts were lost, query GET /file/v1/uploads/{upload_id} and resend them before completing. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
11774
11974
|
http: "POST",
|
|
11775
11975
|
path: "/file/v1/uploads/{upload_id}/complete",
|
|
11776
11976
|
streaming: "no",
|
|
@@ -11806,7 +12006,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11806
12006
|
resource: "file.uploads.parts",
|
|
11807
12007
|
method: "create",
|
|
11808
12008
|
summary: "Add an upload part",
|
|
11809
|
-
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
12009
|
+
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID, and query GET /file/v1/uploads/{upload_id} to see which numbers already arrived. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
11810
12010
|
http: "POST",
|
|
11811
12011
|
path: "/file/v1/uploads/{upload_id}/parts",
|
|
11812
12012
|
streaming: "no",
|
|
@@ -12855,7 +13055,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12855
13055
|
resource: "media.libraries.assets",
|
|
12856
13056
|
method: "create",
|
|
12857
13057
|
summary: "Upload asset",
|
|
12858
|
-
description: " For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13058
|
+
description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
12859
13059
|
http: "POST",
|
|
12860
13060
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
12861
13061
|
streaming: "no",
|
|
@@ -12979,7 +13179,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12979
13179
|
resource: "media.libraries.assets.import",
|
|
12980
13180
|
method: "create",
|
|
12981
13181
|
summary: "Import file",
|
|
12982
|
-
description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13182
|
+
description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
12983
13183
|
http: "POST",
|
|
12984
13184
|
path: "/media/v1/libraries/{library_id}/assets/import",
|
|
12985
13185
|
streaming: "no",
|
|
@@ -13247,7 +13447,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13247
13447
|
resource: "media.libraries.assets.reprocess",
|
|
13248
13448
|
method: "create",
|
|
13249
13449
|
summary: "Reprocess asset",
|
|
13250
|
-
description: " For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
13450
|
+
description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
13251
13451
|
http: "POST",
|
|
13252
13452
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
|
|
13253
13453
|
streaming: "no",
|
|
@@ -13346,7 +13546,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13346
13546
|
resource: "media.libraries.assets",
|
|
13347
13547
|
method: "batch",
|
|
13348
13548
|
summary: "Batch assets alias",
|
|
13349
|
-
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.
|
|
13549
|
+
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.',
|
|
13350
13550
|
http: "POST",
|
|
13351
13551
|
path: "/media/v1/libraries/{library_id}/assets:batch",
|
|
13352
13552
|
streaming: "no",
|
|
@@ -13381,7 +13581,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13381
13581
|
resource: "media.libraries.batches",
|
|
13382
13582
|
method: "create",
|
|
13383
13583
|
summary: "Create batch",
|
|
13384
|
-
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.
|
|
13584
|
+
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.',
|
|
13385
13585
|
http: "POST",
|
|
13386
13586
|
path: "/media/v1/libraries/{library_id}/batches",
|
|
13387
13587
|
streaming: "no",
|
|
@@ -16594,6 +16794,539 @@ for more details.`
|
|
|
16594
16794
|
],
|
|
16595
16795
|
query: []
|
|
16596
16796
|
},
|
|
16797
|
+
{
|
|
16798
|
+
resource: "ontology.changesets",
|
|
16799
|
+
method: "create",
|
|
16800
|
+
summary: "Apply changeset",
|
|
16801
|
+
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.",
|
|
16802
|
+
http: "POST",
|
|
16803
|
+
path: "/ontology/v1/changesets",
|
|
16804
|
+
streaming: "no",
|
|
16805
|
+
pagination: false,
|
|
16806
|
+
pathParams: [],
|
|
16807
|
+
query: [],
|
|
16808
|
+
body: {
|
|
16809
|
+
required: true,
|
|
16810
|
+
fields: [
|
|
16811
|
+
{
|
|
16812
|
+
name: "at",
|
|
16813
|
+
type: "string",
|
|
16814
|
+
required: true,
|
|
16815
|
+
description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
|
|
16816
|
+
},
|
|
16817
|
+
{
|
|
16818
|
+
name: "scope",
|
|
16819
|
+
type: "string",
|
|
16820
|
+
required: false,
|
|
16821
|
+
description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
|
|
16822
|
+
},
|
|
16823
|
+
{
|
|
16824
|
+
name: "ops",
|
|
16825
|
+
type: "array",
|
|
16826
|
+
itemType: "object",
|
|
16827
|
+
required: true,
|
|
16828
|
+
description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
|
|
16829
|
+
}
|
|
16830
|
+
]
|
|
16831
|
+
}
|
|
16832
|
+
},
|
|
16833
|
+
{
|
|
16834
|
+
resource: "ontology.nodes",
|
|
16835
|
+
method: "list",
|
|
16836
|
+
summary: "List nodes",
|
|
16837
|
+
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.",
|
|
16838
|
+
http: "GET",
|
|
16839
|
+
path: "/ontology/v1/nodes",
|
|
16840
|
+
streaming: "no",
|
|
16841
|
+
pagination: true,
|
|
16842
|
+
pathParams: [],
|
|
16843
|
+
query: [
|
|
16844
|
+
{
|
|
16845
|
+
name: "type",
|
|
16846
|
+
type: "array",
|
|
16847
|
+
itemType: "string",
|
|
16848
|
+
required: false,
|
|
16849
|
+
description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
|
|
16850
|
+
},
|
|
16851
|
+
{
|
|
16852
|
+
name: "q",
|
|
16853
|
+
type: "string",
|
|
16854
|
+
required: false,
|
|
16855
|
+
description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
|
|
16856
|
+
},
|
|
16857
|
+
{
|
|
16858
|
+
name: "owner",
|
|
16859
|
+
type: "string",
|
|
16860
|
+
required: false,
|
|
16861
|
+
description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
|
|
16862
|
+
},
|
|
16863
|
+
{
|
|
16864
|
+
name: "as_of",
|
|
16865
|
+
type: "string",
|
|
16866
|
+
required: false,
|
|
16867
|
+
description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
|
|
16868
|
+
},
|
|
16869
|
+
{
|
|
16870
|
+
name: "limit",
|
|
16871
|
+
type: "integer",
|
|
16872
|
+
required: false,
|
|
16873
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
16874
|
+
},
|
|
16875
|
+
{
|
|
16876
|
+
name: "cursor",
|
|
16877
|
+
type: "string",
|
|
16878
|
+
required: false,
|
|
16879
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
16880
|
+
}
|
|
16881
|
+
]
|
|
16882
|
+
},
|
|
16883
|
+
{
|
|
16884
|
+
resource: "ontology.nodes",
|
|
16885
|
+
method: "create",
|
|
16886
|
+
summary: "Create node",
|
|
16887
|
+
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.",
|
|
16888
|
+
http: "POST",
|
|
16889
|
+
path: "/ontology/v1/nodes",
|
|
16890
|
+
streaming: "no",
|
|
16891
|
+
pagination: false,
|
|
16892
|
+
pathParams: [],
|
|
16893
|
+
query: [],
|
|
16894
|
+
body: {
|
|
16895
|
+
required: true,
|
|
16896
|
+
fields: [
|
|
16897
|
+
{
|
|
16898
|
+
name: "type",
|
|
16899
|
+
type: "string",
|
|
16900
|
+
required: true,
|
|
16901
|
+
description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
|
|
16902
|
+
},
|
|
16903
|
+
{
|
|
16904
|
+
name: "ref",
|
|
16905
|
+
type: "string",
|
|
16906
|
+
required: false,
|
|
16907
|
+
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."
|
|
16908
|
+
},
|
|
16909
|
+
{
|
|
16910
|
+
name: "name",
|
|
16911
|
+
type: "string",
|
|
16912
|
+
required: true,
|
|
16913
|
+
description: "Display name of the entity, at most 200 characters."
|
|
16914
|
+
},
|
|
16915
|
+
{
|
|
16916
|
+
name: "aliases",
|
|
16917
|
+
type: "array",
|
|
16918
|
+
itemType: "string",
|
|
16919
|
+
required: false,
|
|
16920
|
+
description: "Other names this entity is known by; they are matched by search alongside the name."
|
|
16921
|
+
},
|
|
16922
|
+
{
|
|
16923
|
+
name: "description",
|
|
16924
|
+
type: "string",
|
|
16925
|
+
required: false,
|
|
16926
|
+
description: "Profile of the entity, at most 500 characters; omit or null for none."
|
|
16927
|
+
},
|
|
16928
|
+
{
|
|
16929
|
+
name: "owner",
|
|
16930
|
+
type: "string",
|
|
16931
|
+
required: false,
|
|
16932
|
+
description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
|
|
16933
|
+
}
|
|
16934
|
+
]
|
|
16935
|
+
}
|
|
16936
|
+
},
|
|
16937
|
+
{
|
|
16938
|
+
resource: "ontology.nodes",
|
|
16939
|
+
method: "retrieve",
|
|
16940
|
+
summary: "Retrieve node",
|
|
16941
|
+
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.",
|
|
16942
|
+
http: "GET",
|
|
16943
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16944
|
+
streaming: "no",
|
|
16945
|
+
pagination: false,
|
|
16946
|
+
pathParams: [
|
|
16947
|
+
{
|
|
16948
|
+
name: "node_id",
|
|
16949
|
+
sdkName: "node_id",
|
|
16950
|
+
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."
|
|
16951
|
+
}
|
|
16952
|
+
],
|
|
16953
|
+
query: [
|
|
16954
|
+
{
|
|
16955
|
+
name: "expand",
|
|
16956
|
+
type: "string",
|
|
16957
|
+
enum: [
|
|
16958
|
+
"relations"
|
|
16959
|
+
],
|
|
16960
|
+
required: false,
|
|
16961
|
+
description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
|
|
16962
|
+
},
|
|
16963
|
+
{
|
|
16964
|
+
name: "as_of",
|
|
16965
|
+
type: "string",
|
|
16966
|
+
required: false,
|
|
16967
|
+
description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
|
|
16968
|
+
}
|
|
16969
|
+
]
|
|
16970
|
+
},
|
|
16971
|
+
{
|
|
16972
|
+
resource: "ontology.nodes",
|
|
16973
|
+
method: "update",
|
|
16974
|
+
summary: "Update node",
|
|
16975
|
+
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.",
|
|
16976
|
+
http: "PATCH",
|
|
16977
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16978
|
+
streaming: "no",
|
|
16979
|
+
pagination: false,
|
|
16980
|
+
pathParams: [
|
|
16981
|
+
{
|
|
16982
|
+
name: "node_id",
|
|
16983
|
+
sdkName: "node_id",
|
|
16984
|
+
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."
|
|
16985
|
+
}
|
|
16986
|
+
],
|
|
16987
|
+
query: [],
|
|
16988
|
+
body: {
|
|
16989
|
+
required: true,
|
|
16990
|
+
fields: [
|
|
16991
|
+
{
|
|
16992
|
+
name: "name",
|
|
16993
|
+
type: "string",
|
|
16994
|
+
required: false,
|
|
16995
|
+
description: "New display name, at most 200 characters; omit to keep the current name."
|
|
16996
|
+
},
|
|
16997
|
+
{
|
|
16998
|
+
name: "aliases",
|
|
16999
|
+
type: "array",
|
|
17000
|
+
itemType: "string",
|
|
17001
|
+
required: false,
|
|
17002
|
+
description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
|
|
17003
|
+
},
|
|
17004
|
+
{
|
|
17005
|
+
name: "description",
|
|
17006
|
+
type: "string",
|
|
17007
|
+
required: false,
|
|
17008
|
+
description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
|
|
17009
|
+
}
|
|
17010
|
+
]
|
|
17011
|
+
}
|
|
17012
|
+
},
|
|
17013
|
+
{
|
|
17014
|
+
resource: "ontology.nodes.merge",
|
|
17015
|
+
method: "create",
|
|
17016
|
+
summary: "Merge node",
|
|
17017
|
+
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.",
|
|
17018
|
+
http: "POST",
|
|
17019
|
+
path: "/ontology/v1/nodes/{node_id}/merge",
|
|
17020
|
+
streaming: "no",
|
|
17021
|
+
pagination: false,
|
|
17022
|
+
pathParams: [
|
|
17023
|
+
{
|
|
17024
|
+
name: "node_id",
|
|
17025
|
+
sdkName: "node_id",
|
|
17026
|
+
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."
|
|
17027
|
+
}
|
|
17028
|
+
],
|
|
17029
|
+
query: [],
|
|
17030
|
+
body: {
|
|
17031
|
+
required: true,
|
|
17032
|
+
fields: [
|
|
17033
|
+
{
|
|
17034
|
+
name: "into",
|
|
17035
|
+
type: "string",
|
|
17036
|
+
required: true,
|
|
17037
|
+
description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
|
|
17038
|
+
}
|
|
17039
|
+
]
|
|
17040
|
+
}
|
|
17041
|
+
},
|
|
17042
|
+
{
|
|
17043
|
+
resource: "ontology.relations",
|
|
17044
|
+
method: "list",
|
|
17045
|
+
summary: "List relations",
|
|
17046
|
+
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.",
|
|
17047
|
+
http: "GET",
|
|
17048
|
+
path: "/ontology/v1/relations",
|
|
17049
|
+
streaming: "no",
|
|
17050
|
+
pagination: true,
|
|
17051
|
+
pathParams: [],
|
|
17052
|
+
query: [
|
|
17053
|
+
{
|
|
17054
|
+
name: "node",
|
|
17055
|
+
type: "string",
|
|
17056
|
+
required: false,
|
|
17057
|
+
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."
|
|
17058
|
+
},
|
|
17059
|
+
{
|
|
17060
|
+
name: "type",
|
|
17061
|
+
type: "array",
|
|
17062
|
+
itemType: "string",
|
|
17063
|
+
required: false,
|
|
17064
|
+
description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
|
|
17065
|
+
},
|
|
17066
|
+
{
|
|
17067
|
+
name: "direction",
|
|
17068
|
+
type: "string",
|
|
17069
|
+
enum: [
|
|
17070
|
+
"out",
|
|
17071
|
+
"in",
|
|
17072
|
+
"both"
|
|
17073
|
+
],
|
|
17074
|
+
required: false,
|
|
17075
|
+
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."
|
|
17076
|
+
},
|
|
17077
|
+
{
|
|
17078
|
+
name: "as_of",
|
|
17079
|
+
type: "string",
|
|
17080
|
+
required: false,
|
|
17081
|
+
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."
|
|
17082
|
+
},
|
|
17083
|
+
{
|
|
17084
|
+
name: "include_invalid",
|
|
17085
|
+
type: "boolean",
|
|
17086
|
+
required: false,
|
|
17087
|
+
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."
|
|
17088
|
+
},
|
|
17089
|
+
{
|
|
17090
|
+
name: "limit",
|
|
17091
|
+
type: "integer",
|
|
17092
|
+
required: false,
|
|
17093
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
17094
|
+
},
|
|
17095
|
+
{
|
|
17096
|
+
name: "cursor",
|
|
17097
|
+
type: "string",
|
|
17098
|
+
required: false,
|
|
17099
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
17100
|
+
}
|
|
17101
|
+
]
|
|
17102
|
+
},
|
|
17103
|
+
{
|
|
17104
|
+
resource: "ontology.relations",
|
|
17105
|
+
method: "create",
|
|
17106
|
+
summary: "Create relation",
|
|
17107
|
+
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.",
|
|
17108
|
+
http: "POST",
|
|
17109
|
+
path: "/ontology/v1/relations",
|
|
17110
|
+
streaming: "no",
|
|
17111
|
+
pagination: false,
|
|
17112
|
+
pathParams: [],
|
|
17113
|
+
query: [],
|
|
17114
|
+
body: {
|
|
17115
|
+
required: true,
|
|
17116
|
+
fields: [
|
|
17117
|
+
{
|
|
17118
|
+
name: "type",
|
|
17119
|
+
type: "string",
|
|
17120
|
+
required: true,
|
|
17121
|
+
description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
|
|
17122
|
+
},
|
|
17123
|
+
{
|
|
17124
|
+
name: "source",
|
|
17125
|
+
type: "string",
|
|
17126
|
+
required: true,
|
|
17127
|
+
description: "Node id the fact starts from, from nodes.list or nodes.create."
|
|
17128
|
+
},
|
|
17129
|
+
{
|
|
17130
|
+
name: "target",
|
|
17131
|
+
type: "string",
|
|
17132
|
+
required: true,
|
|
17133
|
+
description: "Node id the fact points at, from nodes.list or nodes.create."
|
|
17134
|
+
},
|
|
17135
|
+
{
|
|
17136
|
+
name: "fact",
|
|
17137
|
+
type: "string",
|
|
17138
|
+
required: true,
|
|
17139
|
+
description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
|
|
17140
|
+
},
|
|
17141
|
+
{
|
|
17142
|
+
name: "valid_at",
|
|
17143
|
+
type: "string",
|
|
17144
|
+
required: false,
|
|
17145
|
+
description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
|
|
17146
|
+
},
|
|
17147
|
+
{
|
|
17148
|
+
name: "owner",
|
|
17149
|
+
type: "string",
|
|
17150
|
+
required: false,
|
|
17151
|
+
description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
|
|
17152
|
+
}
|
|
17153
|
+
]
|
|
17154
|
+
}
|
|
17155
|
+
},
|
|
17156
|
+
{
|
|
17157
|
+
resource: "ontology.relations",
|
|
17158
|
+
method: "retrieve",
|
|
17159
|
+
summary: "Retrieve relation",
|
|
17160
|
+
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.",
|
|
17161
|
+
http: "GET",
|
|
17162
|
+
path: "/ontology/v1/relations/{relation_id}",
|
|
17163
|
+
streaming: "no",
|
|
17164
|
+
pagination: false,
|
|
17165
|
+
pathParams: [
|
|
17166
|
+
{
|
|
17167
|
+
name: "relation_id",
|
|
17168
|
+
sdkName: "relation_id",
|
|
17169
|
+
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."
|
|
17170
|
+
}
|
|
17171
|
+
],
|
|
17172
|
+
query: []
|
|
17173
|
+
},
|
|
17174
|
+
{
|
|
17175
|
+
resource: "ontology.relations.invalidate",
|
|
17176
|
+
method: "create",
|
|
17177
|
+
summary: "Invalidate relation",
|
|
17178
|
+
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.",
|
|
17179
|
+
http: "POST",
|
|
17180
|
+
path: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
17181
|
+
streaming: "no",
|
|
17182
|
+
pagination: false,
|
|
17183
|
+
pathParams: [
|
|
17184
|
+
{
|
|
17185
|
+
name: "relation_id",
|
|
17186
|
+
sdkName: "relation_id",
|
|
17187
|
+
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."
|
|
17188
|
+
}
|
|
17189
|
+
],
|
|
17190
|
+
query: [],
|
|
17191
|
+
body: {
|
|
17192
|
+
required: true,
|
|
17193
|
+
fields: [
|
|
17194
|
+
{
|
|
17195
|
+
name: "invalid_at",
|
|
17196
|
+
type: "string",
|
|
17197
|
+
required: true,
|
|
17198
|
+
description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
|
|
17199
|
+
},
|
|
17200
|
+
{
|
|
17201
|
+
name: "superseded_by",
|
|
17202
|
+
type: "string",
|
|
17203
|
+
required: false,
|
|
17204
|
+
description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
|
|
17205
|
+
},
|
|
17206
|
+
{
|
|
17207
|
+
name: "reason",
|
|
17208
|
+
type: "string",
|
|
17209
|
+
required: false,
|
|
17210
|
+
description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
|
|
17211
|
+
}
|
|
17212
|
+
]
|
|
17213
|
+
}
|
|
17214
|
+
},
|
|
17215
|
+
{
|
|
17216
|
+
resource: "ontology.search",
|
|
17217
|
+
method: "create",
|
|
17218
|
+
summary: "Search nodes",
|
|
17219
|
+
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.",
|
|
17220
|
+
http: "POST",
|
|
17221
|
+
path: "/ontology/v1/search",
|
|
17222
|
+
streaming: "no",
|
|
17223
|
+
pagination: false,
|
|
17224
|
+
pathParams: [],
|
|
17225
|
+
query: [],
|
|
17226
|
+
body: {
|
|
17227
|
+
required: true,
|
|
17228
|
+
fields: [
|
|
17229
|
+
{
|
|
17230
|
+
name: "text",
|
|
17231
|
+
type: "string",
|
|
17232
|
+
required: true,
|
|
17233
|
+
description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
|
|
17234
|
+
},
|
|
17235
|
+
{
|
|
17236
|
+
name: "types",
|
|
17237
|
+
type: "array",
|
|
17238
|
+
itemType: "string",
|
|
17239
|
+
required: false,
|
|
17240
|
+
description: "Registered node type names to search within; omit to search every type."
|
|
17241
|
+
},
|
|
17242
|
+
{
|
|
17243
|
+
name: "window",
|
|
17244
|
+
type: "object",
|
|
17245
|
+
required: false,
|
|
17246
|
+
description: "Restrict matches to facts recorded within a period; omit to search all time."
|
|
17247
|
+
},
|
|
17248
|
+
{
|
|
17249
|
+
name: "limit",
|
|
17250
|
+
type: "integer",
|
|
17251
|
+
required: false,
|
|
17252
|
+
description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
|
|
17253
|
+
}
|
|
17254
|
+
]
|
|
17255
|
+
}
|
|
17256
|
+
},
|
|
17257
|
+
{
|
|
17258
|
+
resource: "ontology.types",
|
|
17259
|
+
method: "list",
|
|
17260
|
+
summary: "List types",
|
|
17261
|
+
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.",
|
|
17262
|
+
http: "GET",
|
|
17263
|
+
path: "/ontology/v1/types",
|
|
17264
|
+
streaming: "no",
|
|
17265
|
+
pagination: false,
|
|
17266
|
+
pathParams: [],
|
|
17267
|
+
query: []
|
|
17268
|
+
},
|
|
17269
|
+
{
|
|
17270
|
+
resource: "ontology.types",
|
|
17271
|
+
method: "create",
|
|
17272
|
+
summary: "Register type",
|
|
17273
|
+
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.",
|
|
17274
|
+
http: "POST",
|
|
17275
|
+
path: "/ontology/v1/types",
|
|
17276
|
+
streaming: "no",
|
|
17277
|
+
pagination: false,
|
|
17278
|
+
pathParams: [],
|
|
17279
|
+
query: [],
|
|
17280
|
+
body: {
|
|
17281
|
+
required: true,
|
|
17282
|
+
fields: [
|
|
17283
|
+
{
|
|
17284
|
+
name: "owner",
|
|
17285
|
+
type: "string",
|
|
17286
|
+
required: true,
|
|
17287
|
+
description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
|
|
17288
|
+
},
|
|
17289
|
+
{
|
|
17290
|
+
name: "version",
|
|
17291
|
+
type: "integer",
|
|
17292
|
+
required: true,
|
|
17293
|
+
description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
|
|
17294
|
+
},
|
|
17295
|
+
{
|
|
17296
|
+
name: "nodes",
|
|
17297
|
+
type: "array",
|
|
17298
|
+
itemType: "object",
|
|
17299
|
+
required: true,
|
|
17300
|
+
description: "Node types this owner registers."
|
|
17301
|
+
},
|
|
17302
|
+
{
|
|
17303
|
+
name: "edges",
|
|
17304
|
+
type: "array",
|
|
17305
|
+
itemType: "object",
|
|
17306
|
+
required: true,
|
|
17307
|
+
description: "Relation types this owner registers."
|
|
17308
|
+
}
|
|
17309
|
+
]
|
|
17310
|
+
}
|
|
17311
|
+
},
|
|
17312
|
+
{
|
|
17313
|
+
resource: "ontology.types",
|
|
17314
|
+
method: "retrieve",
|
|
17315
|
+
summary: "Retrieve type",
|
|
17316
|
+
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.",
|
|
17317
|
+
http: "GET",
|
|
17318
|
+
path: "/ontology/v1/types/{name}",
|
|
17319
|
+
streaming: "no",
|
|
17320
|
+
pagination: false,
|
|
17321
|
+
pathParams: [
|
|
17322
|
+
{
|
|
17323
|
+
name: "name",
|
|
17324
|
+
sdkName: "name",
|
|
17325
|
+
description: "A type name from types.list, with its dots preserved — a display label is not accepted."
|
|
17326
|
+
}
|
|
17327
|
+
],
|
|
17328
|
+
query: []
|
|
17329
|
+
},
|
|
16597
17330
|
{
|
|
16598
17331
|
resource: "organization.charges",
|
|
16599
17332
|
method: "list",
|
|
@@ -19317,7 +20050,7 @@ for more details.`
|
|
|
19317
20050
|
resource: "ticket.labels",
|
|
19318
20051
|
method: "create",
|
|
19319
20052
|
summary: "Create or add labels",
|
|
19320
|
-
description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
20053
|
+
description: "Create or add labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
|
|
19321
20054
|
http: "POST",
|
|
19322
20055
|
path: "/ticket/v1/labels",
|
|
19323
20056
|
streaming: "no",
|
|
@@ -19359,7 +20092,7 @@ for more details.`
|
|
|
19359
20092
|
resource: "ticket.labels",
|
|
19360
20093
|
method: "delete",
|
|
19361
20094
|
summary: "Remove labels",
|
|
19362
|
-
description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
20095
|
+
description: "Remove labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
|
|
19363
20096
|
http: "DELETE",
|
|
19364
20097
|
path: "/ticket/v1/labels/{name}",
|
|
19365
20098
|
streaming: "no",
|
|
@@ -19384,7 +20117,7 @@ for more details.`
|
|
|
19384
20117
|
resource: "ticket.labels",
|
|
19385
20118
|
method: "update",
|
|
19386
20119
|
summary: "Update labels",
|
|
19387
|
-
description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
20120
|
+
description: "Update labels within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.",
|
|
19388
20121
|
http: "PATCH",
|
|
19389
20122
|
path: "/ticket/v1/labels/{name}",
|
|
19390
20123
|
streaming: "no",
|
|
@@ -20786,7 +21519,7 @@ for more details.`
|
|
|
20786
21519
|
resource: "vault.vaults",
|
|
20787
21520
|
method: "create",
|
|
20788
21521
|
summary: "Create vault",
|
|
20789
|
-
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.
|
|
21522
|
+
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.",
|
|
20790
21523
|
http: "POST",
|
|
20791
21524
|
path: "/vault/v1/vaults",
|
|
20792
21525
|
streaming: "no",
|
|
@@ -22748,6 +23481,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
|
|
|
22748
23481
|
url: "/agent/v1/computers/{computer_id}/files/content",
|
|
22749
23482
|
...options
|
|
22750
23483
|
});
|
|
23484
|
+
var computersFilesConvert = (options) => (options.client ?? client).post({
|
|
23485
|
+
security: [{
|
|
23486
|
+
key: "BearerAuth",
|
|
23487
|
+
scheme: "bearer",
|
|
23488
|
+
type: "http"
|
|
23489
|
+
}, {
|
|
23490
|
+
key: "ApiKeyAuth",
|
|
23491
|
+
name: "X-API-Key",
|
|
23492
|
+
type: "apiKey"
|
|
23493
|
+
}],
|
|
23494
|
+
url: "/agent/v1/computers/{computer_id}/files/convert",
|
|
23495
|
+
...options,
|
|
23496
|
+
headers: {
|
|
23497
|
+
"Content-Type": "application/json",
|
|
23498
|
+
...options.headers
|
|
23499
|
+
}
|
|
23500
|
+
});
|
|
22751
23501
|
var connectComputer = (options) => (options.client ?? client).post({
|
|
22752
23502
|
security: [{
|
|
22753
23503
|
key: "BearerAuth",
|
|
@@ -23246,6 +23996,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
23246
23996
|
url: "/file/v1/uploads/{upload_id}/cancel",
|
|
23247
23997
|
...options
|
|
23248
23998
|
});
|
|
23999
|
+
var fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
24000
|
+
security: [{
|
|
24001
|
+
key: "BearerAuth",
|
|
24002
|
+
scheme: "bearer",
|
|
24003
|
+
type: "http"
|
|
24004
|
+
}],
|
|
24005
|
+
url: "/file/v1/uploads/{upload_id}",
|
|
24006
|
+
...options
|
|
24007
|
+
});
|
|
23249
24008
|
var fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
23250
24009
|
security: [{
|
|
23251
24010
|
key: "BearerAuth",
|
|
@@ -28004,6 +28763,164 @@ var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).ge
|
|
|
28004
28763
|
url: "/media/v1/generation/capabilities",
|
|
28005
28764
|
...options
|
|
28006
28765
|
});
|
|
28766
|
+
var ontologyListTypes = (options) => (options?.client ?? client).get({
|
|
28767
|
+
security: [{
|
|
28768
|
+
key: "ontology-bearerAuth",
|
|
28769
|
+
scheme: "bearer",
|
|
28770
|
+
type: "http"
|
|
28771
|
+
}],
|
|
28772
|
+
url: "/ontology/v1/types",
|
|
28773
|
+
...options
|
|
28774
|
+
});
|
|
28775
|
+
var ontologyRegisterType = (options) => (options.client ?? client).post({
|
|
28776
|
+
security: [{
|
|
28777
|
+
key: "ontology-bearerAuth",
|
|
28778
|
+
scheme: "bearer",
|
|
28779
|
+
type: "http"
|
|
28780
|
+
}],
|
|
28781
|
+
url: "/ontology/v1/types",
|
|
28782
|
+
...options,
|
|
28783
|
+
headers: {
|
|
28784
|
+
"Content-Type": "application/json",
|
|
28785
|
+
...options.headers
|
|
28786
|
+
}
|
|
28787
|
+
});
|
|
28788
|
+
var ontologyRetrieveType = (options) => (options.client ?? client).get({
|
|
28789
|
+
security: [{
|
|
28790
|
+
key: "ontology-bearerAuth",
|
|
28791
|
+
scheme: "bearer",
|
|
28792
|
+
type: "http"
|
|
28793
|
+
}],
|
|
28794
|
+
url: "/ontology/v1/types/{name}",
|
|
28795
|
+
...options
|
|
28796
|
+
});
|
|
28797
|
+
var ontologyListNodes = (options) => (options?.client ?? client).get({
|
|
28798
|
+
security: [{
|
|
28799
|
+
key: "ontology-bearerAuth",
|
|
28800
|
+
scheme: "bearer",
|
|
28801
|
+
type: "http"
|
|
28802
|
+
}],
|
|
28803
|
+
url: "/ontology/v1/nodes",
|
|
28804
|
+
...options
|
|
28805
|
+
});
|
|
28806
|
+
var ontologyCreateNode = (options) => (options.client ?? client).post({
|
|
28807
|
+
security: [{
|
|
28808
|
+
key: "ontology-bearerAuth",
|
|
28809
|
+
scheme: "bearer",
|
|
28810
|
+
type: "http"
|
|
28811
|
+
}],
|
|
28812
|
+
url: "/ontology/v1/nodes",
|
|
28813
|
+
...options,
|
|
28814
|
+
headers: {
|
|
28815
|
+
"Content-Type": "application/json",
|
|
28816
|
+
...options.headers
|
|
28817
|
+
}
|
|
28818
|
+
});
|
|
28819
|
+
var ontologyRetrieveNode = (options) => (options.client ?? client).get({
|
|
28820
|
+
security: [{
|
|
28821
|
+
key: "ontology-bearerAuth",
|
|
28822
|
+
scheme: "bearer",
|
|
28823
|
+
type: "http"
|
|
28824
|
+
}],
|
|
28825
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
28826
|
+
...options
|
|
28827
|
+
});
|
|
28828
|
+
var ontologyUpdateNode = (options) => (options.client ?? client).patch({
|
|
28829
|
+
security: [{
|
|
28830
|
+
key: "ontology-bearerAuth",
|
|
28831
|
+
scheme: "bearer",
|
|
28832
|
+
type: "http"
|
|
28833
|
+
}],
|
|
28834
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
28835
|
+
...options,
|
|
28836
|
+
headers: {
|
|
28837
|
+
"Content-Type": "application/json",
|
|
28838
|
+
...options.headers
|
|
28839
|
+
}
|
|
28840
|
+
});
|
|
28841
|
+
var ontologyMergeNode = (options) => (options.client ?? client).post({
|
|
28842
|
+
security: [{
|
|
28843
|
+
key: "ontology-bearerAuth",
|
|
28844
|
+
scheme: "bearer",
|
|
28845
|
+
type: "http"
|
|
28846
|
+
}],
|
|
28847
|
+
url: "/ontology/v1/nodes/{node_id}/merge",
|
|
28848
|
+
...options,
|
|
28849
|
+
headers: {
|
|
28850
|
+
"Content-Type": "application/json",
|
|
28851
|
+
...options.headers
|
|
28852
|
+
}
|
|
28853
|
+
});
|
|
28854
|
+
var ontologyListRelations = (options) => (options?.client ?? client).get({
|
|
28855
|
+
security: [{
|
|
28856
|
+
key: "ontology-bearerAuth",
|
|
28857
|
+
scheme: "bearer",
|
|
28858
|
+
type: "http"
|
|
28859
|
+
}],
|
|
28860
|
+
url: "/ontology/v1/relations",
|
|
28861
|
+
...options
|
|
28862
|
+
});
|
|
28863
|
+
var ontologyCreateRelation = (options) => (options.client ?? client).post({
|
|
28864
|
+
security: [{
|
|
28865
|
+
key: "ontology-bearerAuth",
|
|
28866
|
+
scheme: "bearer",
|
|
28867
|
+
type: "http"
|
|
28868
|
+
}],
|
|
28869
|
+
url: "/ontology/v1/relations",
|
|
28870
|
+
...options,
|
|
28871
|
+
headers: {
|
|
28872
|
+
"Content-Type": "application/json",
|
|
28873
|
+
...options.headers
|
|
28874
|
+
}
|
|
28875
|
+
});
|
|
28876
|
+
var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
|
|
28877
|
+
security: [{
|
|
28878
|
+
key: "ontology-bearerAuth",
|
|
28879
|
+
scheme: "bearer",
|
|
28880
|
+
type: "http"
|
|
28881
|
+
}],
|
|
28882
|
+
url: "/ontology/v1/relations/{relation_id}",
|
|
28883
|
+
...options
|
|
28884
|
+
});
|
|
28885
|
+
var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
|
|
28886
|
+
security: [{
|
|
28887
|
+
key: "ontology-bearerAuth",
|
|
28888
|
+
scheme: "bearer",
|
|
28889
|
+
type: "http"
|
|
28890
|
+
}],
|
|
28891
|
+
url: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
28892
|
+
...options,
|
|
28893
|
+
headers: {
|
|
28894
|
+
"Content-Type": "application/json",
|
|
28895
|
+
...options.headers
|
|
28896
|
+
}
|
|
28897
|
+
});
|
|
28898
|
+
var ontologyApplyChangeset = (options) => (options.client ?? client).post({
|
|
28899
|
+
security: [{
|
|
28900
|
+
key: "ontology-bearerAuth",
|
|
28901
|
+
scheme: "bearer",
|
|
28902
|
+
type: "http"
|
|
28903
|
+
}],
|
|
28904
|
+
url: "/ontology/v1/changesets",
|
|
28905
|
+
...options,
|
|
28906
|
+
headers: {
|
|
28907
|
+
"Content-Type": "application/json",
|
|
28908
|
+
...options.headers
|
|
28909
|
+
}
|
|
28910
|
+
});
|
|
28911
|
+
var ontologySearch = (options) => (options.client ?? client).post({
|
|
28912
|
+
security: [{
|
|
28913
|
+
key: "ontology-bearerAuth",
|
|
28914
|
+
scheme: "bearer",
|
|
28915
|
+
type: "http"
|
|
28916
|
+
}],
|
|
28917
|
+
url: "/ontology/v1/search",
|
|
28918
|
+
...options,
|
|
28919
|
+
headers: {
|
|
28920
|
+
"Content-Type": "application/json",
|
|
28921
|
+
...options.headers
|
|
28922
|
+
}
|
|
28923
|
+
});
|
|
28007
28924
|
var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
28008
28925
|
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
28009
28926
|
security: [
|
|
@@ -29881,6 +30798,9 @@ function createAgent(transport) {
|
|
|
29881
30798
|
create: bind(transport, computersCreate),
|
|
29882
30799
|
delete: bind(transport, computersDelete),
|
|
29883
30800
|
files: {
|
|
30801
|
+
convert: {
|
|
30802
|
+
create: bind(transport, computersFilesConvert)
|
|
30803
|
+
},
|
|
29884
30804
|
list: bind(transport, computersFilesList),
|
|
29885
30805
|
retrieveContent: bind(transport, computersFilesContent)
|
|
29886
30806
|
},
|
|
@@ -30402,7 +31322,8 @@ function createFile(transport) {
|
|
|
30402
31322
|
createSigned: bind(transport, fileCreateSignedUpload),
|
|
30403
31323
|
parts: {
|
|
30404
31324
|
create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
|
|
30405
|
-
}
|
|
31325
|
+
},
|
|
31326
|
+
retrieve: bind(transport, fileRetrieveUpload)
|
|
30406
31327
|
}
|
|
30407
31328
|
};
|
|
30408
31329
|
}
|
|
@@ -30630,6 +31551,38 @@ function createModel(transport) {
|
|
|
30630
31551
|
}
|
|
30631
31552
|
};
|
|
30632
31553
|
}
|
|
31554
|
+
function createOntology(transport) {
|
|
31555
|
+
return {
|
|
31556
|
+
changesets: {
|
|
31557
|
+
create: bind(transport, ontologyApplyChangeset)
|
|
31558
|
+
},
|
|
31559
|
+
nodes: {
|
|
31560
|
+
create: bind(transport, ontologyCreateNode),
|
|
31561
|
+
list: bindPage(transport, ontologyListNodes),
|
|
31562
|
+
merge: {
|
|
31563
|
+
create: bind(transport, ontologyMergeNode)
|
|
31564
|
+
},
|
|
31565
|
+
retrieve: bind(transport, ontologyRetrieveNode),
|
|
31566
|
+
update: bind(transport, ontologyUpdateNode)
|
|
31567
|
+
},
|
|
31568
|
+
relations: {
|
|
31569
|
+
create: bind(transport, ontologyCreateRelation),
|
|
31570
|
+
invalidate: {
|
|
31571
|
+
create: bind(transport, ontologyInvalidateRelation)
|
|
31572
|
+
},
|
|
31573
|
+
list: bindPage(transport, ontologyListRelations),
|
|
31574
|
+
retrieve: bind(transport, ontologyRetrieveRelation)
|
|
31575
|
+
},
|
|
31576
|
+
search: {
|
|
31577
|
+
create: bind(transport, ontologySearch)
|
|
31578
|
+
},
|
|
31579
|
+
types: {
|
|
31580
|
+
create: bind(transport, ontologyRegisterType),
|
|
31581
|
+
list: bind(transport, ontologyListTypes),
|
|
31582
|
+
retrieve: bind(transport, ontologyRetrieveType)
|
|
31583
|
+
}
|
|
31584
|
+
};
|
|
31585
|
+
}
|
|
30633
31586
|
function createOrganization(transport) {
|
|
30634
31587
|
return {
|
|
30635
31588
|
charges: {
|
|
@@ -30896,6 +31849,7 @@ var resourceFactories = {
|
|
|
30896
31849
|
media: createMedia,
|
|
30897
31850
|
meta: createMeta,
|
|
30898
31851
|
model: createModel,
|
|
31852
|
+
ontology: createOntology,
|
|
30899
31853
|
organization: createOrganization,
|
|
30900
31854
|
sandbox: createSandbox,
|
|
30901
31855
|
search: createSearch,
|
|
@@ -31969,6 +32923,26 @@ async function prepareMultipart(op, opts) {
|
|
|
31969
32923
|
opts.body = body;
|
|
31970
32924
|
}
|
|
31971
32925
|
|
|
32926
|
+
// src/core/pagination.ts
|
|
32927
|
+
var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
|
|
32928
|
+
function pageTokenField(op) {
|
|
32929
|
+
return op.query.find((field) => PAGE_TOKENS.test(field.name));
|
|
32930
|
+
}
|
|
32931
|
+
function nextPageToken(result) {
|
|
32932
|
+
const value = result;
|
|
32933
|
+
const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
|
|
32934
|
+
return typeof token === "string" && token ? token : undefined;
|
|
32935
|
+
}
|
|
32936
|
+
function pageOf(result) {
|
|
32937
|
+
const value = result;
|
|
32938
|
+
const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
|
|
32939
|
+
const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
|
|
32940
|
+
if (!Array.isArray(data))
|
|
32941
|
+
return;
|
|
32942
|
+
const token = nextPageToken(result);
|
|
32943
|
+
return { items: data, ...token ? { token } : {} };
|
|
32944
|
+
}
|
|
32945
|
+
|
|
31972
32946
|
// src/core/bind-args.ts
|
|
31973
32947
|
var globalOptions = [
|
|
31974
32948
|
{ name: "org", type: "string" },
|
|
@@ -32184,7 +33158,7 @@ function bindArgs(parsed, op, data) {
|
|
|
32184
33158
|
(opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
|
|
32185
33159
|
}
|
|
32186
33160
|
}
|
|
32187
|
-
if (globals.all && !op.pagination)
|
|
33161
|
+
if (globals.all && !op.pagination && !pageTokenField(op))
|
|
32188
33162
|
throw new UsageError("--all requires a paginated operation");
|
|
32189
33163
|
for (const p of op.pathParams)
|
|
32190
33164
|
if (p !== target && opts.path?.[p.sdkName] === undefined)
|
|
@@ -32210,8 +33184,8 @@ function bindArgs(parsed, op, data) {
|
|
|
32210
33184
|
}
|
|
32211
33185
|
|
|
32212
33186
|
// src/core/help.ts
|
|
32213
|
-
function describeOption(s) {
|
|
32214
|
-
return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${
|
|
33187
|
+
function describeOption(s, required = s.required) {
|
|
33188
|
+
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, " ")}` : ""}`;
|
|
32215
33189
|
}
|
|
32216
33190
|
function example(command) {
|
|
32217
33191
|
const target = targetParam(command.op);
|
|
@@ -32227,18 +33201,22 @@ function example(command) {
|
|
|
32227
33201
|
args.push("--yes");
|
|
32228
33202
|
return args.join(" ");
|
|
32229
33203
|
}
|
|
33204
|
+
function fieldRequired(op, field, location) {
|
|
33205
|
+
return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
|
|
33206
|
+
}
|
|
32230
33207
|
function help(commands, prefix, command) {
|
|
32231
33208
|
if (command) {
|
|
32232
33209
|
const target = targetParam(command.op);
|
|
33210
|
+
const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
|
|
32233
33211
|
return [
|
|
32234
|
-
`praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
33212
|
+
`praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
32235
33213
|
`SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
|
|
32236
33214
|
`${command.op.http} ${command.op.path}`,
|
|
32237
33215
|
...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
|
|
32238
33216
|
"",
|
|
32239
33217
|
"Options:",
|
|
32240
33218
|
...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
|
|
32241
|
-
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
|
|
33219
|
+
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
|
|
32242
33220
|
...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" : ""})`) ?? [],
|
|
32243
33221
|
" -h is an alias of --help",
|
|
32244
33222
|
"PRAXIS_ENV=develop|production (default: develop); no --env option.",
|
|
@@ -33606,9 +34584,11 @@ function renderHuman(result, ctx) {
|
|
|
33606
34584
|
const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
|
|
33607
34585
|
const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
|
|
33608
34586
|
` : "";
|
|
34587
|
+
const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
|
|
34588
|
+
`).join("");
|
|
33609
34589
|
return { stderr: err.red(`✗ ${plain(result.message)}`) + `
|
|
33610
34590
|
` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
|
|
33611
|
-
` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
|
|
34591
|
+
` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
|
|
33612
34592
|
` : "") };
|
|
33613
34593
|
}
|
|
33614
34594
|
case "list":
|
|
@@ -33696,8 +34676,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
|
|
|
33696
34676
|
}
|
|
33697
34677
|
|
|
33698
34678
|
// src/output/render.ts
|
|
34679
|
+
var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
|
|
34680
|
+
function serverProblem(raw) {
|
|
34681
|
+
const value = record(raw);
|
|
34682
|
+
const problem = {};
|
|
34683
|
+
for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
|
|
34684
|
+
const entry = value[member];
|
|
34685
|
+
if (entry !== undefined && entry !== null)
|
|
34686
|
+
problem[member] = entry;
|
|
34687
|
+
}
|
|
34688
|
+
const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
|
|
34689
|
+
return adds ? problem : undefined;
|
|
34690
|
+
}
|
|
34691
|
+
function problemLines(problem) {
|
|
34692
|
+
const lines = [];
|
|
34693
|
+
for (const group of [problem?.errors, problem?.violations]) {
|
|
34694
|
+
for (const item of Array.isArray(group) ? group : []) {
|
|
34695
|
+
const entry = record(item);
|
|
34696
|
+
const where = scalar(entry.pointer ?? entry.field);
|
|
34697
|
+
const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
|
|
34698
|
+
if (where || detail)
|
|
34699
|
+
lines.push(`${where ? `${where}: ` : ""}${detail}`);
|
|
34700
|
+
}
|
|
34701
|
+
}
|
|
34702
|
+
return lines;
|
|
34703
|
+
}
|
|
33699
34704
|
function errorJSON(result, ctx) {
|
|
33700
|
-
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 } : {} } }) + `
|
|
34705
|
+
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 } : {} } }) + `
|
|
33701
34706
|
`;
|
|
33702
34707
|
}
|
|
33703
34708
|
function render(result, ctx) {
|
|
@@ -33853,6 +34858,8 @@ function errorInput(error, ctx) {
|
|
|
33853
34858
|
const raw = record(sdk?.raw), nested = record(raw.error);
|
|
33854
34859
|
const candidate = nested.details ?? raw.details;
|
|
33855
34860
|
const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
|
|
34861
|
+
const problem = serverProblem(Object.keys(nested).length ? nested : raw);
|
|
34862
|
+
const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
|
|
33856
34863
|
let message = error instanceof Error ? error.message : "Unexpected error";
|
|
33857
34864
|
const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
|
|
33858
34865
|
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");
|
|
@@ -33864,11 +34871,14 @@ function errorInput(error, ctx) {
|
|
|
33864
34871
|
if (stripped)
|
|
33865
34872
|
message = `${humanize(code)}${message ? `: ${message}` : ""}`;
|
|
33866
34873
|
const status = sdk?.status, request_id = sdk?.requestId;
|
|
34874
|
+
message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
|
|
33867
34875
|
const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
|
|
33868
34876
|
const source = ctx.credentialSource ?? "login";
|
|
33869
34877
|
let hint = genericHint;
|
|
33870
34878
|
if (error instanceof UsageError)
|
|
33871
34879
|
hint = error.hint;
|
|
34880
|
+
else if (serverText(problem?.hint))
|
|
34881
|
+
hint = serverText(problem?.hint);
|
|
33872
34882
|
else if (authFailure)
|
|
33873
34883
|
hint = authHint(source);
|
|
33874
34884
|
else if (status === 404)
|
|
@@ -33879,7 +34889,7 @@ function errorInput(error, ctx) {
|
|
|
33879
34889
|
hint = "Rate limited; retry later.";
|
|
33880
34890
|
else if (status !== undefined && status >= 500)
|
|
33881
34891
|
hint = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
|
|
33882
|
-
return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
|
|
34892
|
+
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 } : {} };
|
|
33883
34893
|
}
|
|
33884
34894
|
|
|
33885
34895
|
// src/output/progress.ts
|
|
@@ -33909,7 +34919,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
33909
34919
|
}
|
|
33910
34920
|
|
|
33911
34921
|
// src/main.ts
|
|
33912
|
-
var version = "0.2.1-dev.
|
|
34922
|
+
var version = "0.2.1-dev.f23829c";
|
|
33913
34923
|
var commands = commandTree(operations);
|
|
33914
34924
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
33915
34925
|
function route(argv) {
|
|
@@ -34127,7 +35137,7 @@ Examples:
|
|
|
34127
35137
|
let owner = client2;
|
|
34128
35138
|
for (const part of op.resource.split("."))
|
|
34129
35139
|
owner = owner[part];
|
|
34130
|
-
|
|
35140
|
+
let result = await owner[op.method](opts);
|
|
34131
35141
|
const name2 = `${op.resource}.${op.method}`;
|
|
34132
35142
|
const list = (items) => {
|
|
34133
35143
|
const view = clientList(items, op, flags.limit, ctx.mode);
|
|
@@ -34141,7 +35151,21 @@ Examples:
|
|
|
34141
35151
|
const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
|
|
34142
35152
|
if (typeof cursor === "string" && cursor)
|
|
34143
35153
|
ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
|
|
34144
|
-
|
|
35154
|
+
const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
|
|
35155
|
+
const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
|
|
35156
|
+
if (flags.all && !(result instanceof Page) && token && !firstPage)
|
|
35157
|
+
throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
|
|
35158
|
+
if (firstPage) {
|
|
35159
|
+
const items = [...firstPage.items];
|
|
35160
|
+
const seen = new Set;
|
|
35161
|
+
for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
|
|
35162
|
+
seen.add(next);
|
|
35163
|
+
result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
|
|
35164
|
+
items.push(...pageOf(result)?.items ?? []);
|
|
35165
|
+
}
|
|
35166
|
+
ctx.nextCommand = undefined;
|
|
35167
|
+
emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
|
|
35168
|
+
} else if (result instanceof Page) {
|
|
34145
35169
|
if (flags.all) {
|
|
34146
35170
|
const items = [];
|
|
34147
35171
|
for await (const item of result)
|
|
@@ -34237,7 +35261,7 @@ Examples:
|
|
|
34237
35261
|
}
|
|
34238
35262
|
}
|
|
34239
35263
|
if (true)
|
|
34240
|
-
process.
|
|
35264
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
34241
35265
|
export {
|
|
34242
35266
|
main
|
|
34243
35267
|
};
|