@deepraxis/cli 0.2.1-dev.00ed035 → 0.2.1-dev.02959a2
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 +45 -3
- package/README.md +15 -0
- package/dist/praxis.js +2986 -252
- package/package.json +1 -1
package/dist/praxis.js
CHANGED
|
@@ -143,7 +143,7 @@ across all toolsets allowed.`
|
|
|
143
143
|
type: "array",
|
|
144
144
|
itemType: "object",
|
|
145
145
|
required: false,
|
|
146
|
-
description: "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general and personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search or
|
|
146
|
+
description: "Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general and personal agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A service binding opens a whole service and carries only enabled: search, browser, ticket, crm, canvas or cut. There is no binding by default; enabling one opens every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for no bindings. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time."
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
name: "kind",
|
|
@@ -1218,6 +1218,37 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
1218
1218
|
}
|
|
1219
1219
|
]
|
|
1220
1220
|
},
|
|
1221
|
+
{
|
|
1222
|
+
resource: "agent.computers.files.convert",
|
|
1223
|
+
method: "create",
|
|
1224
|
+
summary: "Convert a Computer Document to PDF",
|
|
1225
|
+
description: `Convert an Office document (docx, doc, ppt, pptx, rtf, odt; up to 16 MiB) to PDF inside a platform-owned ephemeral document sandbox, whatever machine family the computer itself runs on. Returns base64 PDF bytes.
|
|
1226
|
+
|
|
1227
|
+
Praxis extension: the preview conversion endpoint. The browser never parses an untrusted document — LibreOffice runs only inside an ephemeral document-family sandbox and the converter instance is killed after use. The file stays tenant-owned; non-convertible types answer EXTENSION_NOT_CONVERTIBLE and a failed conversion answers CONVERSION_FAILED.`,
|
|
1228
|
+
http: "POST",
|
|
1229
|
+
path: "/agent/v1/computers/{computer_id}/files/convert",
|
|
1230
|
+
streaming: "no",
|
|
1231
|
+
pagination: false,
|
|
1232
|
+
pathParams: [
|
|
1233
|
+
{
|
|
1234
|
+
name: "computer_id",
|
|
1235
|
+
sdkName: "computer_id",
|
|
1236
|
+
description: "Computer id (cmp_...), as returned by computers.create or computers.list."
|
|
1237
|
+
}
|
|
1238
|
+
],
|
|
1239
|
+
query: [],
|
|
1240
|
+
body: {
|
|
1241
|
+
required: true,
|
|
1242
|
+
fields: [
|
|
1243
|
+
{
|
|
1244
|
+
name: "name",
|
|
1245
|
+
type: "string",
|
|
1246
|
+
required: true,
|
|
1247
|
+
description: "Name of the entry or object."
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1221
1252
|
{
|
|
1222
1253
|
resource: "agent.computers.leases",
|
|
1223
1254
|
method: "delete",
|
|
@@ -6100,7 +6131,7 @@ file at the root of that directory.`
|
|
|
6100
6131
|
"allow"
|
|
6101
6132
|
],
|
|
6102
6133
|
required: false,
|
|
6103
|
-
description: "skip
|
|
6134
|
+
description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
|
|
6104
6135
|
},
|
|
6105
6136
|
{
|
|
6106
6137
|
name: "catchup_window_seconds",
|
|
@@ -6274,7 +6305,7 @@ file at the root of that directory.`
|
|
|
6274
6305
|
"allow"
|
|
6275
6306
|
],
|
|
6276
6307
|
required: false,
|
|
6277
|
-
description: "skip
|
|
6308
|
+
description: "skip skips while a previous run is still active; allow permits overlapping runs. When omitted, schedule triggers use skip and webhook triggers use allow."
|
|
6278
6309
|
},
|
|
6279
6310
|
{
|
|
6280
6311
|
name: "catchup_window_seconds",
|
|
@@ -9961,8 +9992,8 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
9961
9992
|
{
|
|
9962
9993
|
resource: "cut.projects.analysis",
|
|
9963
9994
|
method: "create",
|
|
9964
|
-
summary: "Analyze project media",
|
|
9965
|
-
description: "Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed.",
|
|
9995
|
+
summary: "Analyze project media or measure the project mix",
|
|
9996
|
+
description: "Request silence, filler-word or scene analysis for selected bound assets before editing, or measure the mix the timeline itself renders with kind mix. That kind is a render job, not a read: it answers pending with retry_after_sec and is polled by the id it returned, because the answer only exists once the audio has been rendered and measured. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed. kind mix is separate: it reports the project mix loudness, the loudness of each role and where music masks speech, so an editor can fix the mix rather than guess at it.",
|
|
9966
9997
|
http: "POST",
|
|
9967
9998
|
path: "/cut/v1/projects/{project_id}/analysis",
|
|
9968
9999
|
streaming: "no",
|
|
@@ -9992,10 +10023,35 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
9992
10023
|
enum: [
|
|
9993
10024
|
"silence",
|
|
9994
10025
|
"filler",
|
|
9995
|
-
"scenes"
|
|
10026
|
+
"scenes",
|
|
10027
|
+
"mix"
|
|
9996
10028
|
],
|
|
9997
10029
|
required: true,
|
|
9998
|
-
description: "Analysis types to request
|
|
10030
|
+
description: "Analysis types to request. silence, filler and scenes analyze the selected source assets and are read from the media library; mix measures the project's own rendered mix and is requested on its own."
|
|
10031
|
+
},
|
|
10032
|
+
{
|
|
10033
|
+
name: "from",
|
|
10034
|
+
type: "number",
|
|
10035
|
+
required: false,
|
|
10036
|
+
description: "Range start for kind mix, in seconds on the project clock. Omitted with to, the whole timeline is measured, capped at 120 seconds. Ignored by the asset kinds."
|
|
10037
|
+
},
|
|
10038
|
+
{
|
|
10039
|
+
name: "to",
|
|
10040
|
+
type: "number",
|
|
10041
|
+
required: false,
|
|
10042
|
+
description: "Range end for kind mix, in seconds on the project clock, exclusive. A range longer than 120 seconds is refused; request several ranges instead."
|
|
10043
|
+
},
|
|
10044
|
+
{
|
|
10045
|
+
name: "revision",
|
|
10046
|
+
type: "integer",
|
|
10047
|
+
required: false,
|
|
10048
|
+
description: "Optional committed project revision to measure; omission uses the current revision. Mix only."
|
|
10049
|
+
},
|
|
10050
|
+
{
|
|
10051
|
+
name: "id",
|
|
10052
|
+
type: "string",
|
|
10053
|
+
required: false,
|
|
10054
|
+
description: "Poll one running mix measurement by the id its first call returned. Sending id reads that measurement and renders nothing."
|
|
9999
10055
|
}
|
|
10000
10056
|
]
|
|
10001
10057
|
}
|
|
@@ -10162,6 +10218,18 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10162
10218
|
type: "integer",
|
|
10163
10219
|
required: false,
|
|
10164
10220
|
description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
|
|
10221
|
+
},
|
|
10222
|
+
{
|
|
10223
|
+
name: "loudness",
|
|
10224
|
+
type: "object",
|
|
10225
|
+
required: false,
|
|
10226
|
+
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."
|
|
10227
|
+
},
|
|
10228
|
+
{
|
|
10229
|
+
name: "poster",
|
|
10230
|
+
type: "object",
|
|
10231
|
+
required: false,
|
|
10232
|
+
description: "Cover frame, in seconds on the project clock. Omitted, the cover is the first frame with picture that is not inside a fade-in or a transition — a black opening no longer makes the library thumbnail black. A frame inside a transition is skipped, and a timeline that is black throughout keeps its first frame (reported as BLACK_FIRST_FRAME). The frame actually used is reported as poster_at on the export."
|
|
10165
10233
|
}
|
|
10166
10234
|
]
|
|
10167
10235
|
}
|
|
@@ -10170,7 +10238,7 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10170
10238
|
resource: "cut.projects.frames",
|
|
10171
10239
|
method: "list",
|
|
10172
10240
|
summary: "Render preview frames",
|
|
10173
|
-
description: "Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. The default scale is 0.25; use 0.5 for subtitle layout inspection (1080×1920 renders at 540×960). The maximum is 0.5; values above it return INVALID_PARAMS. Actual width and height are returned per frame. PNGs above 2 MiB or responses above 4 MiB return RESPONSE_TOO_LARGE without silently lowering resolution.
|
|
10241
|
+
description: "Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Request at most eight times. Each returned url is an inline PNG data URL (data:image/png;base64,...), not a hosted HTTP image link. The default scale is 0.25; use 0.5 for subtitle layout inspection (1080×1920 renders at 540×960). The maximum is 0.5; values above it return INVALID_PARAMS. Actual width and height are returned per frame. PNGs above 2 MiB or responses above 4 MiB return RESPONSE_TOO_LARGE without silently lowering resolution. The response always includes warnings; FRAME_UNAVAILABLE means a source preview could not be obtained and an offline tile was drawn. Its message identifies a timeout, delivery capacity limit, or unavailable source and contains no source URL. Decode each image's base64 payload to save it. Codemode returns at most four images per call, so request at most four times when reviewing there.",
|
|
10174
10242
|
http: "GET",
|
|
10175
10243
|
path: "/cut/v1/projects/{project_id}/frames",
|
|
10176
10244
|
streaming: "no",
|
|
@@ -10244,6 +10312,57 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10244
10312
|
]
|
|
10245
10313
|
}
|
|
10246
10314
|
},
|
|
10315
|
+
{
|
|
10316
|
+
resource: "cut.projects.renders",
|
|
10317
|
+
method: "create",
|
|
10318
|
+
summary: "Create draft range render",
|
|
10319
|
+
description: "Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration, and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.",
|
|
10320
|
+
http: "POST",
|
|
10321
|
+
path: "/cut/v1/projects/{project_id}/renders",
|
|
10322
|
+
streaming: "no",
|
|
10323
|
+
pagination: false,
|
|
10324
|
+
pathParams: [
|
|
10325
|
+
{
|
|
10326
|
+
name: "project_id",
|
|
10327
|
+
sdkName: "project_id",
|
|
10328
|
+
description: "Project identifier returned by its create or list operation; use the id, not a display name."
|
|
10329
|
+
}
|
|
10330
|
+
],
|
|
10331
|
+
query: [],
|
|
10332
|
+
body: {
|
|
10333
|
+
required: true,
|
|
10334
|
+
fields: [
|
|
10335
|
+
{
|
|
10336
|
+
name: "kind",
|
|
10337
|
+
type: "string",
|
|
10338
|
+
enum: [
|
|
10339
|
+
"audio",
|
|
10340
|
+
"video"
|
|
10341
|
+
],
|
|
10342
|
+
required: true,
|
|
10343
|
+
description: "audio renders the mixed soundtrack alone as an .m4a file for listening; video renders a draft-quality .mp4 with picture and sound for looking at. An audio draft is the cheaper of the two and is what a loudness or mix measurement asks for."
|
|
10344
|
+
},
|
|
10345
|
+
{
|
|
10346
|
+
name: "from",
|
|
10347
|
+
type: "number",
|
|
10348
|
+
required: true,
|
|
10349
|
+
description: "Start of the interval in seconds on the project clock, inclusive. Must be less than to."
|
|
10350
|
+
},
|
|
10351
|
+
{
|
|
10352
|
+
name: "to",
|
|
10353
|
+
type: "number",
|
|
10354
|
+
required: true,
|
|
10355
|
+
description: "End of the interval in seconds on the project clock, exclusive. At most 120 seconds after from, and never beyond the timeline duration; a longer passage is requested as several ranges."
|
|
10356
|
+
},
|
|
10357
|
+
{
|
|
10358
|
+
name: "revision",
|
|
10359
|
+
type: "integer",
|
|
10360
|
+
required: false,
|
|
10361
|
+
description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
|
|
10362
|
+
}
|
|
10363
|
+
]
|
|
10364
|
+
}
|
|
10365
|
+
},
|
|
10247
10366
|
{
|
|
10248
10367
|
resource: "cut.projects",
|
|
10249
10368
|
method: "retrieveState",
|
|
@@ -10385,7 +10504,159 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10385
10504
|
resource: "cut.projects",
|
|
10386
10505
|
method: "execute",
|
|
10387
10506
|
summary: "Execute editing script",
|
|
10388
|
-
description: 'Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`\n\n### Script function reference\n\nFunctions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.\n\n```ts\nGetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;\nGetItem(id: ClipId): ItemView;\nFindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];\nGetMedia(ref: MediaRef): MediaInfo;\nGetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];\nGetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];\nListTransitions(): TransitionInfo[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };\nDelete(id: ClipId, o?: { ripple?: boolean }): void;\nJoin(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;\nUpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;\nDeleteJoin(id: JoinId): void;\nSplit(id: ClipId, at: number): ClipId;\nTrim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;\nMove(id: ClipId, start: number, track?: TrackId): void;\nRippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;\nAddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;\nUpdateTrack(id: TrackId, patch: TrackPatch): void;\nDeleteTrack(id: TrackId): void;\nSetSettings(patch: Partial<ProjectSettingsView>): void;\nAddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];\nSetMarker(at: number, label: string): string;\nPrint(...values: unknown[]): void;\nPreview(at: number[]): void;\n```\n\n| Functions | Behavior and arguments |\n| --- | --- |\n| GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |\n| ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |\n| FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |\n| GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |\n| GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |\n| Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |\n| SetSpeed | Change video/audio rate in 0.25–4; keep is required. source preserves consumed source and changes length, duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |\n| Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |\n| Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |\n| RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |\n| AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb and style as appropriate to track kind. |\n| SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |\n| AddCaptionsFromTranscript | Create captions from an audio/video clip\'s kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |\n| SetMarker | Add a label at a timeline time and return its ID. |\n| Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result\'s frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |\n\n#### Joins between clips\n\nEndpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint\'s length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection\'s code and message, shorten or remove conflicting joins, and retry the saved edit.\n\nTransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use the catalog defaults. Unknown kinds and unknown or invalid parameters are rejected. Effects: dissolve (no parameters); dip (color black/white, default black); push and wipe (direction left/right/up/down, default left); wipe also has softness 0–1, default 0; iris has centerX/centerY 0–1, both default 0.5; blinds has integer count 2–64, default 8, and orientation vertical/horizontal, default vertical; blur has radius 0–100 pixels at 1080-pixel frame height, default 24. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\n\nMinimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.\n\n#### Insert fields (ItemInit)\n\nEvery item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.\n\n| type | Required fields beyond type/start | Optional fields |\n| --- | --- | --- |\n| video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |\n| image | media, length | transform, fit, animate, transitionIn, transitionOut |\n| text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |\n| color | color, length | transform, fill, animate, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |\n| caption | text, length | — |\n\nVideo tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.\n\n| Field | Value |\n| --- | --- |\n| transform | Partial `{x, y, scale, rotation, opacity, crop, blur}`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is `{top,right,bottom,left}`. blur is 0–100 pixels at 1080-pixel frame height. |\n| style | Partial `{fontFamily, fontSize, fontWeight, color, stroke, background, align, maxWidth, position, margin}`. fontFamily: Geist or Noto Sans SC (default); fontSize defaults to 48; fontWeight: 400 (default), 500 or 700; color defaults to #FFFFFF; align: left, center (default), right; maxWidth is a fraction of canvas width (default 0.9). stroke is `{color,width}`. Text and captions support position (top/middle/bottom; box centers at 12%/50%/85% of height without margin) and optional margin (0–0.4 of canvas height, box edge distance for top/bottom; middle ignores it). Omitted position preserves the text transform (center by default); explicit position controls vertical placement, so omit it for y animation. Caption style additionally supports highlightColor and maxLines: 2. GetItem and GetTimeline return text style and current caption track style. Caption tracks only accept captions; use AddCaptionsFromTranscript, and place text on video tracks. |\n| animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of `{at: number, value: number, ease?: Ease}` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |\n| Ease | linear, in, out, inOut, `{bezier: [x1,y1,x2,y2]}` or `{spring: {stiffness, damping, mass?}}`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |\n| reveal | `{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |\n| fill | A color string (#RRGGBB or #RRGGBBAA), `{linear: {angle, stops: [{at,color}, ...]}}` or `{radial: {stops: [{at,color}, ...]}}`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |\n| shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |\n| transitionIn, transitionOut | `{kind, length: number}` at the clip\'s beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |\n\n#### Update fields (ItemPatchView)\n\nAll fields are optional; use only fields relevant to the item\'s type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: `Update(id, {volumeDb: -12})` or `Update(id, {transitionIn: null})`.\n\n#### Speed, reverse and freeze\n\nVideo/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.\n\nUpdate of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.\n\nExample for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.\n\n#### Script names versus HTTP response names\n\nUse camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.\n\nUnrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection\'s #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.\n',
|
|
10507
|
+
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);\`
|
|
10508
|
+
|
|
10509
|
+
<!-- cut-reference:start -->
|
|
10510
|
+
### Script function, field and error reference
|
|
10511
|
+
|
|
10512
|
+
Every script function, clip field and error code has its own section, read one at a time:
|
|
10513
|
+
|
|
10514
|
+
\`\`\`
|
|
10515
|
+
codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
|
|
10516
|
+
codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
|
|
10517
|
+
codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
|
|
10518
|
+
codemode.describe("praxis.cut.script") // names, one page at a time
|
|
10519
|
+
\`\`\`
|
|
10520
|
+
|
|
10521
|
+
Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the \`praxis.cut.<kind>.\` prefix.
|
|
10522
|
+
|
|
10523
|
+
#### Script functions (script)
|
|
10524
|
+
|
|
10525
|
+
- \`GetTimeline\` — Duration, tracks, joins; clips are under \`items\`.
|
|
10526
|
+
- \`GetItem\` — One clip's compact view, by id.
|
|
10527
|
+
- \`FindItems\` — Visit every clip with its track; collect results.
|
|
10528
|
+
- \`GetMedia\` — Media metadata; \`durationUs\` is microseconds.
|
|
10529
|
+
- \`GetTranscript\` — Transcript words in source microseconds.
|
|
10530
|
+
- \`GetAnalysis\` — Silence, filler or scene segments.
|
|
10531
|
+
- \`ListTransitions\` — Join transition kinds and parameters.
|
|
10532
|
+
- \`ListEffects\` — Visual-effect catalog and parameters.
|
|
10533
|
+
- \`ListAnimations\` — Animation presets by phase and target.
|
|
10534
|
+
- \`ListFonts\` — Font families, weights and scripts.
|
|
10535
|
+
- \`ListTextStyles\` — Text style presets for \`style.preset\`.
|
|
10536
|
+
- \`ListTextTemplates\` — Multi-layer templates and their slots.
|
|
10537
|
+
- \`Insert\` — Add a clip; a track never overlaps itself.
|
|
10538
|
+
- \`Append\` — Add a clip at the end of a track.
|
|
10539
|
+
- \`Update\` — Change named fields; the rest stay.
|
|
10540
|
+
- \`SetSpeed\` — Change rate, keeping source or duration.
|
|
10541
|
+
- \`Delete\` — Remove a clip. There is no \`Remove\`.
|
|
10542
|
+
- \`Join\` — Overlap clips; followers shift, track shortens.
|
|
10543
|
+
- \`UpdateJoin\` — Change a join's length or effect.
|
|
10544
|
+
- \`DeleteJoin\` — Remove a join; restore the butt cut.
|
|
10545
|
+
- \`Split\` — Cut a clip in two at a time.
|
|
10546
|
+
- \`Trim\` — Move one clip edge by seconds.
|
|
10547
|
+
- \`Move\` — Set a clip's start or track.
|
|
10548
|
+
- \`RippleDeleteRange\` — Cut a time range and close the gap.
|
|
10549
|
+
- \`AddTrack\` — Add a video, audio or caption track.
|
|
10550
|
+
- \`UpdateTrack\` — Change a track's name, lock, gain or role.
|
|
10551
|
+
- \`DeleteTrack\` — Remove a track and its clips.
|
|
10552
|
+
- \`SetSettings\` — Change canvas, frame rate or background.
|
|
10553
|
+
- \`AddCaptionsFromTranscript\` — Captions from a clip's kept words.
|
|
10554
|
+
- \`InsertTemplate\` — Insert a template and fill its slots.
|
|
10555
|
+
- \`AlignCaptions\` — Rebuild captions from text punctuation.
|
|
10556
|
+
- \`ImportCaptions\` — Import SRT or WebVTT onto captions.
|
|
10557
|
+
- \`ExportCaptions\` — Export captions as SRT or WebVTT.
|
|
10558
|
+
- \`SetMarker\` — Label a timeline position.
|
|
10559
|
+
- \`Print\` — Append values to the result's \`prints\`.
|
|
10560
|
+
- \`Preview\` — Up to 8 frames as inline PNG data URLs.
|
|
10561
|
+
|
|
10562
|
+
#### Fields (fields)
|
|
10563
|
+
|
|
10564
|
+
- \`type\` — Clip kind; decides which fields apply.
|
|
10565
|
+
- \`start\` — Clip start in seconds; snaps to frames.
|
|
10566
|
+
- \`length\` — Duration; optional for video and audio.
|
|
10567
|
+
- \`media\` — Source \`{ libraryId, assetId }\`.
|
|
10568
|
+
- \`sourceIn\` — First source second kept; default 0.
|
|
10569
|
+
- \`sourceOut\` — Exclusive source end; read-only.
|
|
10570
|
+
- \`text\` — Text of a text or caption clip.
|
|
10571
|
+
- \`color\` — Solid colour of a color clip.
|
|
10572
|
+
- \`shape\` — Shape clip kind: \`rect\` or \`ellipse\`.
|
|
10573
|
+
- \`width\` — Shape width, a fraction of canvas width.
|
|
10574
|
+
- \`height\` — Shape height, a fraction of canvas height.
|
|
10575
|
+
- \`radius\` — Rect corner rounding, in 1080-height px.
|
|
10576
|
+
- \`fill\` — Shape or text paint: colour or gradient.
|
|
10577
|
+
- \`stroke\` — Shape outline: colour and width.
|
|
10578
|
+
- \`transform\` — Position, scale, rotation, opacity, crop, blur.
|
|
10579
|
+
- \`fit\` — contain, cover, fill or none.
|
|
10580
|
+
- \`blend\` — Layer blend mode; null clears.
|
|
10581
|
+
- \`style\` — Text styling: font, fill, strokes, glow, position.
|
|
10582
|
+
- \`style.position\` — top, middle or bottom; omit it, never null.
|
|
10583
|
+
- \`playback\` — Rate, direction, audio policy, or freeze.
|
|
10584
|
+
- \`volumeDb\` — Audio level in dB; 0 is source level.
|
|
10585
|
+
- \`gain\` — Keyframed audio level in dB.
|
|
10586
|
+
- \`fadeIn\` — Fade-in seconds at the clip's start.
|
|
10587
|
+
- \`fadeOut\` — Fade-out seconds at the clip's end.
|
|
10588
|
+
- \`duck\` — Lower this clip while another track plays.
|
|
10589
|
+
- \`animate\` — Transform keyframes; \`at\` is clip-relative seconds.
|
|
10590
|
+
- \`reveal\` — Per-character, word or line reveal timing.
|
|
10591
|
+
- \`animation\` — Preset slots \`{ in, out, loop }\`; null clears.
|
|
10592
|
+
- \`effects\` — Effect stack, at most 8; null clears.
|
|
10593
|
+
- \`transitionIn\` — Entrance effect: kind plus seconds.
|
|
10594
|
+
- \`transitionOut\` — Exit effect: kind plus seconds.
|
|
10595
|
+
- \`mask\` — Shape, path or track matte.
|
|
10596
|
+
- \`words\` — Caption words with clip-local times.
|
|
10597
|
+
|
|
10598
|
+
#### Error codes (errors)
|
|
10599
|
+
|
|
10600
|
+
- \`JOIN_CONFLICT\` — A join is invalid or blocks this edit.
|
|
10601
|
+
- \`INVALID_TRANSITION\` — Bad transition kind, parameter or length.
|
|
10602
|
+
- \`INVALID_STYLE\` — A style value is out of range.
|
|
10603
|
+
- \`INVALID_MASK\` — A mask definition is malformed.
|
|
10604
|
+
- \`MASK_IN_USE\` — The edit would break a live mask.
|
|
10605
|
+
- \`TOO_MANY_MASKS\` — At most 16 masks per project.
|
|
10606
|
+
- \`RATE_OUT_OF_RANGE\` — A rate is outside 0.25-4.
|
|
10607
|
+
- \`UNSUPPORTED_PLAYBACK\` — Reverse without an explicit mute.
|
|
10608
|
+
- \`INVALID_PLAYBACK\` — A playback object is partial or malformed.
|
|
10609
|
+
- \`UNKNOWN_FONT\` — The family is not in \`ListFonts()\`.
|
|
10610
|
+
- \`UNKNOWN_FIELD\` — The field name is not accepted here.
|
|
10611
|
+
- \`UNKNOWN_TEXT_STYLE\` — \`style.preset\` is not in the catalog.
|
|
10612
|
+
- \`TEXT_STYLE_TARGET_MISMATCH\` — Preset on the wrong clip type.
|
|
10613
|
+
- \`CAPTION_ALIGN_LOW_CONFIDENCE\` — Alignment confidence too low; nothing changed.
|
|
10614
|
+
- \`OVERLAP\` — Two clips on one track would share time.
|
|
10615
|
+
- \`OUT_OF_SOURCE\` — The clip would read past its source.
|
|
10616
|
+
- \`LOCKED_TRACK\` — The edit targets a locked track.
|
|
10617
|
+
- \`UNBOUND_LIBRARY\` — The library is not bound to the project.
|
|
10618
|
+
- \`TRACK_KIND_MISMATCH\` — The clip type does not fit the track.
|
|
10619
|
+
- \`NOT_FOUND\` — The named id is not in this project.
|
|
10620
|
+
- \`TOO_SHORT\` — The result would be under one frame.
|
|
10621
|
+
- \`INVALID_DUCK\` — Bad \`duck\` level or a missing track.
|
|
10622
|
+
- \`UNKNOWN_ANIMATION\` — The preset is not in \`ListAnimations()\`.
|
|
10623
|
+
- \`INVALID_ANIMATION_PARAM\` — Bad slot, parameter or keyframe limit.
|
|
10624
|
+
- \`ANIMATION_TOO_LONG\` — In plus out exceed the clip length.
|
|
10625
|
+
- \`ANIMATION_TARGET_MISMATCH\` — The preset does not match the clip type.
|
|
10626
|
+
- \`ANIMATION_PHASE_MISMATCH\` — The preset is in the wrong slot.
|
|
10627
|
+
- \`UNKNOWN_EFFECT\` — The effect is not in \`ListEffects()\`.
|
|
10628
|
+
- \`INVALID_EFFECT_PARAM\` — Bad effect parameter or keyframe.
|
|
10629
|
+
- \`TOO_MANY_EFFECTS\` — More than 8 effects on one clip.
|
|
10630
|
+
- \`PROJECT_NOT_FOUND\` — No visible project has this id.
|
|
10631
|
+
- \`EXPORT_NOT_FOUND\` — No such export in this project.
|
|
10632
|
+
- \`DRAFT_RENDER_NOT_FOUND\` — No such draft render.
|
|
10633
|
+
- \`VERSION_NOT_FOUND\` — No saved version has this revision.
|
|
10634
|
+
- \`LIBRARY_NOT_FOUND\` — The library is missing or invisible.
|
|
10635
|
+
- \`BINDING_INVALID\` — The binding request is malformed.
|
|
10636
|
+
- \`BINDING_IN_USE\` — Clips still use this library's assets.
|
|
10637
|
+
- \`NOTHING_TO_UNDO\` — No earlier revision to return to.
|
|
10638
|
+
- \`NOTHING_TO_REDO\` — No undone revision is waiting.
|
|
10639
|
+
- \`UNDO_CONFLICT\` — The revision to undo is no longer head.
|
|
10640
|
+
- \`REVISION_CONFLICT\` — The project moved; your revision is stale.
|
|
10641
|
+
- \`CUT_BUSY\` — The project is busy; retry.
|
|
10642
|
+
- \`INVALID_CAPTION_FILE\` — The subtitle file is malformed or too big.
|
|
10643
|
+
- \`SCRIPT_ERROR\` — The script threw or did not parse.
|
|
10644
|
+
- \`SCRIPT_LIMIT\` — An execute budget was exceeded.
|
|
10645
|
+
- \`OPS_REJECTED\` — An op failed; the whole edit rolled back.
|
|
10646
|
+
- \`EDIT_EXPIRED\` — The saved edit id is over ten minutes old.
|
|
10647
|
+
- \`MEDIA_OFFLINE\` — The asset cannot be fetched right now.
|
|
10648
|
+
- \`MEDIA_UNAVAILABLE\` — The asset is not usable for rendering.
|
|
10649
|
+
- \`MEDIA_IMPORT_FAILED\` — Importing media failed.
|
|
10650
|
+
- \`FRAME_OUT_OF_RANGE\` — The preview time is outside the project.
|
|
10651
|
+
- \`PROJECT_TOO_LARGE\` — The project exceeds the size limit.
|
|
10652
|
+
- \`RESPONSE_TOO_LARGE\` — The response would exceed its budget.
|
|
10653
|
+
- \`EXPORT_FAILED\` — The render failed; read \`error.cause\`.
|
|
10654
|
+
- \`INVALID_PARAMS\` — The request is malformed.
|
|
10655
|
+
- \`PERMISSION_DENIED\` — This credential may not do that here.
|
|
10656
|
+
- \`NOT_IMPLEMENTED\` — Not available on this platform yet.
|
|
10657
|
+
- \`INTERNAL\` — Unexpected failure; retry with the request id.
|
|
10658
|
+
<!-- cut-reference:end -->
|
|
10659
|
+
`,
|
|
10389
10660
|
http: "POST",
|
|
10390
10661
|
path: "/cut/v1/projects/{project_id}:execute",
|
|
10391
10662
|
streaming: "no",
|
|
@@ -10447,6 +10718,24 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10447
10718
|
],
|
|
10448
10719
|
query: []
|
|
10449
10720
|
},
|
|
10721
|
+
{
|
|
10722
|
+
resource: "cut.renders",
|
|
10723
|
+
method: "retrieve",
|
|
10724
|
+
summary: "Retrieve draft range render",
|
|
10725
|
+
description: "Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.",
|
|
10726
|
+
http: "GET",
|
|
10727
|
+
path: "/cut/v1/renders/{render_id}",
|
|
10728
|
+
streaming: "no",
|
|
10729
|
+
pagination: false,
|
|
10730
|
+
pathParams: [
|
|
10731
|
+
{
|
|
10732
|
+
name: "render_id",
|
|
10733
|
+
sdkName: "render_id",
|
|
10734
|
+
description: "Draft render id (cutr_…) returned by projects.renders.create."
|
|
10735
|
+
}
|
|
10736
|
+
],
|
|
10737
|
+
query: []
|
|
10738
|
+
},
|
|
10450
10739
|
{
|
|
10451
10740
|
resource: "cut.versions",
|
|
10452
10741
|
method: "restore",
|
|
@@ -11419,6 +11708,696 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11419
11708
|
]
|
|
11420
11709
|
}
|
|
11421
11710
|
},
|
|
11711
|
+
{
|
|
11712
|
+
resource: "devops.projects.testCases",
|
|
11713
|
+
method: "list",
|
|
11714
|
+
summary: "List test cases",
|
|
11715
|
+
description: "List a project's cases with their health, state and recent statistics, so you can decide which ones a plan must run and which are quarantined. This is the read a test dashboard is built on; filter it to narrow by state or health instead of paging through everything. A case's id is a fingerprint of its own title and path, so it survives a rename — read aliases when reconciling history recorded under an older title.",
|
|
11716
|
+
http: "GET",
|
|
11717
|
+
path: "/devops/v1/projects/{project}/test-cases",
|
|
11718
|
+
streaming: "no",
|
|
11719
|
+
pagination: false,
|
|
11720
|
+
pathParams: [
|
|
11721
|
+
{
|
|
11722
|
+
name: "project",
|
|
11723
|
+
sdkName: "project",
|
|
11724
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
11725
|
+
}
|
|
11726
|
+
],
|
|
11727
|
+
query: [
|
|
11728
|
+
{
|
|
11729
|
+
name: "pageSize",
|
|
11730
|
+
type: "integer",
|
|
11731
|
+
required: false,
|
|
11732
|
+
description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
|
|
11733
|
+
},
|
|
11734
|
+
{
|
|
11735
|
+
name: "pageToken",
|
|
11736
|
+
type: "string",
|
|
11737
|
+
required: false,
|
|
11738
|
+
description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
|
|
11739
|
+
},
|
|
11740
|
+
{
|
|
11741
|
+
name: "filter",
|
|
11742
|
+
type: "string",
|
|
11743
|
+
required: false,
|
|
11744
|
+
description: "AIP-160 equality filter over one declared field at a time, for example state=quarantined or health=broken. Fields a case list does not declare are refused with INVALID_ARGUMENT rather than ignored, so a typo never silently widens the result."
|
|
11745
|
+
},
|
|
11746
|
+
{
|
|
11747
|
+
name: "orderBy",
|
|
11748
|
+
type: "string",
|
|
11749
|
+
required: false,
|
|
11750
|
+
description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
|
|
11751
|
+
}
|
|
11752
|
+
]
|
|
11753
|
+
},
|
|
11754
|
+
{
|
|
11755
|
+
resource: "devops.projects",
|
|
11756
|
+
method: "retrieveTestCatalog",
|
|
11757
|
+
summary: "Read a commit's test catalog",
|
|
11758
|
+
description: 'Read the catalog version discovered at one commit — how many suites and cases it holds, which frameworks they come from, and how the commit changed them. Call this first: it tells you which suites, cases and sizes exist before you list them or select them into a plan, and the reported diff explains why a case count moved. A commit whose discovery has not finished answers CATALOG_NOT_READY, which means "not yet", not "no tests"; wait and read again. Omit commit to read the newest catalog published for the project.',
|
|
11759
|
+
http: "GET",
|
|
11760
|
+
path: "/devops/v1/projects/{project}/test-catalog",
|
|
11761
|
+
streaming: "no",
|
|
11762
|
+
pagination: false,
|
|
11763
|
+
pathParams: [
|
|
11764
|
+
{
|
|
11765
|
+
name: "project",
|
|
11766
|
+
sdkName: "project",
|
|
11767
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
11768
|
+
}
|
|
11769
|
+
],
|
|
11770
|
+
query: [
|
|
11771
|
+
{
|
|
11772
|
+
name: "commit",
|
|
11773
|
+
type: "string",
|
|
11774
|
+
required: false,
|
|
11775
|
+
description: "Full 40-character commit sha whose catalog you want, from a project branch or commit read. Omit it to read the newest catalog published for the project."
|
|
11776
|
+
}
|
|
11777
|
+
]
|
|
11778
|
+
},
|
|
11779
|
+
{
|
|
11780
|
+
resource: "devops.projects.testPlans",
|
|
11781
|
+
method: "list",
|
|
11782
|
+
summary: "List test plans",
|
|
11783
|
+
description: "List the project's plans — what each one selects, which stage and gate it belongs to, and when it runs next. Read this before creating a plan, so a new plan extends what exists instead of duplicating a selector an existing plan already covers.",
|
|
11784
|
+
http: "GET",
|
|
11785
|
+
path: "/devops/v1/projects/{project}/test-plans",
|
|
11786
|
+
streaming: "no",
|
|
11787
|
+
pagination: false,
|
|
11788
|
+
pathParams: [
|
|
11789
|
+
{
|
|
11790
|
+
name: "project",
|
|
11791
|
+
sdkName: "project",
|
|
11792
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
11793
|
+
}
|
|
11794
|
+
],
|
|
11795
|
+
query: [
|
|
11796
|
+
{
|
|
11797
|
+
name: "pageSize",
|
|
11798
|
+
type: "integer",
|
|
11799
|
+
required: false,
|
|
11800
|
+
description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
|
|
11801
|
+
},
|
|
11802
|
+
{
|
|
11803
|
+
name: "pageToken",
|
|
11804
|
+
type: "string",
|
|
11805
|
+
required: false,
|
|
11806
|
+
description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
|
|
11807
|
+
},
|
|
11808
|
+
{
|
|
11809
|
+
name: "orderBy",
|
|
11810
|
+
type: "string",
|
|
11811
|
+
required: false,
|
|
11812
|
+
description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
|
|
11813
|
+
}
|
|
11814
|
+
]
|
|
11815
|
+
},
|
|
11816
|
+
{
|
|
11817
|
+
resource: "devops.projects.testPlans",
|
|
11818
|
+
method: "create",
|
|
11819
|
+
summary: "Create a test plan",
|
|
11820
|
+
description: "Create a plan that decides which cases a stage must run. The plan's key is unique inside the project and is what a later run names; the selector chooses cases by size, purpose, tag, package or explicit ids, and the trigger says when the plan fires by itself. A merge or promotion gate must name the environment it guards, and a plan with a gate but no environment is refused with PLAN_GATE_ENVIRONMENT_MISMATCH rather than created and silently ignored. A plan has no revision history: update it with a patch.",
|
|
11821
|
+
http: "POST",
|
|
11822
|
+
path: "/devops/v1/projects/{project}/test-plans",
|
|
11823
|
+
streaming: "no",
|
|
11824
|
+
pagination: false,
|
|
11825
|
+
pathParams: [
|
|
11826
|
+
{
|
|
11827
|
+
name: "project",
|
|
11828
|
+
sdkName: "project",
|
|
11829
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
11830
|
+
}
|
|
11831
|
+
],
|
|
11832
|
+
query: [],
|
|
11833
|
+
body: {
|
|
11834
|
+
required: true,
|
|
11835
|
+
fields: [
|
|
11836
|
+
{
|
|
11837
|
+
name: "key",
|
|
11838
|
+
type: "string",
|
|
11839
|
+
required: true,
|
|
11840
|
+
description: "Short name for the plan, unique inside the project; a key already in use is refused rather than silently reused."
|
|
11841
|
+
},
|
|
11842
|
+
{
|
|
11843
|
+
name: "title",
|
|
11844
|
+
type: "string",
|
|
11845
|
+
required: true,
|
|
11846
|
+
description: "Display title of the plan, shown wherever the plan is listed."
|
|
11847
|
+
},
|
|
11848
|
+
{
|
|
11849
|
+
name: "stage",
|
|
11850
|
+
type: "string",
|
|
11851
|
+
enum: [
|
|
11852
|
+
"dev",
|
|
11853
|
+
"presubmit",
|
|
11854
|
+
"postsubmit",
|
|
11855
|
+
"nightly",
|
|
11856
|
+
"production"
|
|
11857
|
+
],
|
|
11858
|
+
required: true,
|
|
11859
|
+
description: "Which stage of delivery this plan belongs to, which decides when it is expected to run."
|
|
11860
|
+
},
|
|
11861
|
+
{
|
|
11862
|
+
name: "trigger",
|
|
11863
|
+
type: "object",
|
|
11864
|
+
required: true,
|
|
11865
|
+
description: "What starts a run of this plan. Exactly one kind applies; the fields a kind needs are the ones it carries."
|
|
11866
|
+
},
|
|
11867
|
+
{
|
|
11868
|
+
name: "selector",
|
|
11869
|
+
type: "object",
|
|
11870
|
+
required: true,
|
|
11871
|
+
description: "Which cases a plan or run selects. Every member is optional and they combine as an intersection, so a selector with no member selects every case in the catalog."
|
|
11872
|
+
},
|
|
11873
|
+
{
|
|
11874
|
+
name: "environment",
|
|
11875
|
+
type: "string",
|
|
11876
|
+
required: false,
|
|
11877
|
+
description: "The environment this plan runs against; required by a merge or promotion gate, and refused with PLAN_GATE_ENVIRONMENT_MISMATCH when it disagrees with the gate."
|
|
11878
|
+
},
|
|
11879
|
+
{
|
|
11880
|
+
name: "gate",
|
|
11881
|
+
type: "string",
|
|
11882
|
+
enum: [
|
|
11883
|
+
"merge",
|
|
11884
|
+
"promotion",
|
|
11885
|
+
"observation",
|
|
11886
|
+
"none"
|
|
11887
|
+
],
|
|
11888
|
+
required: true,
|
|
11889
|
+
description: "Whether this plan's result blocks a stage; a merge or promotion gate must name its environment."
|
|
11890
|
+
},
|
|
11891
|
+
{
|
|
11892
|
+
name: "repeat",
|
|
11893
|
+
type: "integer",
|
|
11894
|
+
required: false,
|
|
11895
|
+
description: "How many times each selected case runs in one run; omit for once. More than one is how a flake is told apart from a real failure."
|
|
11896
|
+
},
|
|
11897
|
+
{
|
|
11898
|
+
name: "timeoutMinutes",
|
|
11899
|
+
type: "integer",
|
|
11900
|
+
required: false,
|
|
11901
|
+
description: "How many minutes a run of this plan may take before it is timed out; omit for the service's default."
|
|
11902
|
+
}
|
|
11903
|
+
]
|
|
11904
|
+
}
|
|
11905
|
+
},
|
|
11906
|
+
{
|
|
11907
|
+
resource: "devops.projects.testReports",
|
|
11908
|
+
method: "create",
|
|
11909
|
+
summary: "Upload an external test report",
|
|
11910
|
+
description: "Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable.",
|
|
11911
|
+
http: "POST",
|
|
11912
|
+
path: "/devops/v1/projects/{project}/test-reports",
|
|
11913
|
+
streaming: "no",
|
|
11914
|
+
pagination: false,
|
|
11915
|
+
pathParams: [
|
|
11916
|
+
{
|
|
11917
|
+
name: "project",
|
|
11918
|
+
sdkName: "project",
|
|
11919
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
11920
|
+
}
|
|
11921
|
+
],
|
|
11922
|
+
query: [],
|
|
11923
|
+
body: {
|
|
11924
|
+
required: true,
|
|
11925
|
+
fields: [
|
|
11926
|
+
{
|
|
11927
|
+
name: "reportId",
|
|
11928
|
+
type: "string",
|
|
11929
|
+
required: true,
|
|
11930
|
+
description: "Your own identifier for this report. Uploading the same id again is idempotent and counts once, so a retry after a timeout is safe."
|
|
11931
|
+
},
|
|
11932
|
+
{
|
|
11933
|
+
name: "format",
|
|
11934
|
+
type: "string",
|
|
11935
|
+
enum: [
|
|
11936
|
+
"ctrf",
|
|
11937
|
+
"junit"
|
|
11938
|
+
],
|
|
11939
|
+
required: true,
|
|
11940
|
+
description: "Which report format the document is in; it decides how the document is parsed."
|
|
11941
|
+
},
|
|
11942
|
+
{
|
|
11943
|
+
name: "ref",
|
|
11944
|
+
type: "object",
|
|
11945
|
+
required: true,
|
|
11946
|
+
description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
|
|
11947
|
+
},
|
|
11948
|
+
{
|
|
11949
|
+
name: "report",
|
|
11950
|
+
type: "string",
|
|
11951
|
+
required: true,
|
|
11952
|
+
description: "The report document itself, as text — JSON for ctrf, XML for junit. Send the file's contents unchanged; a malformed document is refused with REPORT_INVALID and records nothing."
|
|
11953
|
+
}
|
|
11954
|
+
]
|
|
11955
|
+
}
|
|
11956
|
+
},
|
|
11957
|
+
{
|
|
11958
|
+
resource: "devops.projects.testRuns",
|
|
11959
|
+
method: "list",
|
|
11960
|
+
summary: "List test runs",
|
|
11961
|
+
description: "List the project's runs newest first, with each run's state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit's tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.",
|
|
11962
|
+
http: "GET",
|
|
11963
|
+
path: "/devops/v1/projects/{project}/test-runs",
|
|
11964
|
+
streaming: "no",
|
|
11965
|
+
pagination: false,
|
|
11966
|
+
pathParams: [
|
|
11967
|
+
{
|
|
11968
|
+
name: "project",
|
|
11969
|
+
sdkName: "project",
|
|
11970
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
11971
|
+
}
|
|
11972
|
+
],
|
|
11973
|
+
query: [
|
|
11974
|
+
{
|
|
11975
|
+
name: "pageSize",
|
|
11976
|
+
type: "integer",
|
|
11977
|
+
required: false,
|
|
11978
|
+
description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
|
|
11979
|
+
},
|
|
11980
|
+
{
|
|
11981
|
+
name: "pageToken",
|
|
11982
|
+
type: "string",
|
|
11983
|
+
required: false,
|
|
11984
|
+
description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
|
|
11985
|
+
},
|
|
11986
|
+
{
|
|
11987
|
+
name: "filter",
|
|
11988
|
+
type: "string",
|
|
11989
|
+
required: false,
|
|
11990
|
+
description: "AIP-160 equality filter over one declared field, for example state=running or result=failed. An undeclared field is refused with INVALID_ARGUMENT; it is never ignored, so a mistyped filter cannot quietly return everything."
|
|
11991
|
+
},
|
|
11992
|
+
{
|
|
11993
|
+
name: "orderBy",
|
|
11994
|
+
type: "string",
|
|
11995
|
+
required: false,
|
|
11996
|
+
description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
|
|
11997
|
+
}
|
|
11998
|
+
]
|
|
11999
|
+
},
|
|
12000
|
+
{
|
|
12001
|
+
resource: "devops.projects.testRuns",
|
|
12002
|
+
method: "create",
|
|
12003
|
+
summary: "Create a test run",
|
|
12004
|
+
description: "Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued, the default, returns as soon as the run exists; started waits until the run has begun, except for an external run, which is answered at once because it leaves queued only when your own CI uploads; finished waits for a verdict. The wait is bounded at about 25 seconds, and a wait that reaches that bound returns the run as it stands rather than failing — read state to see whether it finished. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.",
|
|
12005
|
+
http: "POST",
|
|
12006
|
+
path: "/devops/v1/projects/{project}/test-runs",
|
|
12007
|
+
streaming: "no",
|
|
12008
|
+
pagination: false,
|
|
12009
|
+
pathParams: [
|
|
12010
|
+
{
|
|
12011
|
+
name: "project",
|
|
12012
|
+
sdkName: "project",
|
|
12013
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
12014
|
+
}
|
|
12015
|
+
],
|
|
12016
|
+
query: [],
|
|
12017
|
+
body: {
|
|
12018
|
+
required: true,
|
|
12019
|
+
fields: [
|
|
12020
|
+
{
|
|
12021
|
+
name: "ref",
|
|
12022
|
+
type: "object",
|
|
12023
|
+
required: true,
|
|
12024
|
+
description: "The exact revision a run tested. A commit is always named, because a run without one has nothing to report against."
|
|
12025
|
+
},
|
|
12026
|
+
{
|
|
12027
|
+
name: "plan",
|
|
12028
|
+
type: "string",
|
|
12029
|
+
required: false,
|
|
12030
|
+
description: "Plan whose selector this run uses; omit it when passing selector instead. Naming a plan records the run against that plan, which is what a gate reads."
|
|
12031
|
+
},
|
|
12032
|
+
{
|
|
12033
|
+
name: "selector",
|
|
12034
|
+
type: "object",
|
|
12035
|
+
required: false,
|
|
12036
|
+
description: "An ad-hoc selector for this run alone, used instead of a plan's; it is not saved as a plan, so a run you want to repeat should name a plan."
|
|
12037
|
+
},
|
|
12038
|
+
{
|
|
12039
|
+
name: "environment",
|
|
12040
|
+
type: "string",
|
|
12041
|
+
required: false,
|
|
12042
|
+
description: "Environment to run against; it decides whether production-only cases become selectable. Omit it for a run that needs no environment."
|
|
12043
|
+
},
|
|
12044
|
+
{
|
|
12045
|
+
name: "repeat",
|
|
12046
|
+
type: "integer",
|
|
12047
|
+
required: false,
|
|
12048
|
+
description: "How many times each selected case runs, which is how a flake is told apart from a real failure; omit for once."
|
|
12049
|
+
},
|
|
12050
|
+
{
|
|
12051
|
+
name: "waitUntil",
|
|
12052
|
+
type: "string",
|
|
12053
|
+
enum: [
|
|
12054
|
+
"queued",
|
|
12055
|
+
"started",
|
|
12056
|
+
"finished"
|
|
12057
|
+
],
|
|
12058
|
+
required: false,
|
|
12059
|
+
description: "How far the call waits before answering, bounded at about 25 seconds; omit it for queued, which returns at once. The wait reads the run's own state, so a wait that reaches the bound returns the run as it stands instead of failing — check state before assuming the request was honoured."
|
|
12060
|
+
},
|
|
12061
|
+
{
|
|
12062
|
+
name: "executor",
|
|
12063
|
+
type: "string",
|
|
12064
|
+
enum: [
|
|
12065
|
+
"cloud",
|
|
12066
|
+
"external"
|
|
12067
|
+
],
|
|
12068
|
+
required: false,
|
|
12069
|
+
description: "Who carries the run out. cloud, the default, runs the selected cases in Praxis at the commit; external creates a run that waits for your own CI to upload a report with test-reports."
|
|
12070
|
+
},
|
|
12071
|
+
{
|
|
12072
|
+
name: "requestId",
|
|
12073
|
+
type: "string",
|
|
12074
|
+
required: false,
|
|
12075
|
+
description: "A key you choose to make creating this run idempotent: repeating the call with the same requestId returns the run it created instead of starting another, so a retry after a timeout is safe."
|
|
12076
|
+
}
|
|
12077
|
+
]
|
|
12078
|
+
}
|
|
12079
|
+
},
|
|
12080
|
+
{
|
|
12081
|
+
resource: "devops.projects.testSuites",
|
|
12082
|
+
method: "list",
|
|
12083
|
+
summary: "List test suites",
|
|
12084
|
+
description: "List the suites the project's newest catalog discovered — one suite per test file and framework pair, with its size, purposes and question count. Use it to find the suite id a case belongs to, or to see which files make up an area before selecting cases from them. Suites come from the catalog, so a file added in code appears only after its commit's catalog is published. Archived suites are returned too; they carry archived true and no case is ever silently dropped from the list.",
|
|
12085
|
+
http: "GET",
|
|
12086
|
+
path: "/devops/v1/projects/{project}/test-suites",
|
|
12087
|
+
streaming: "no",
|
|
12088
|
+
pagination: false,
|
|
12089
|
+
pathParams: [
|
|
12090
|
+
{
|
|
12091
|
+
name: "project",
|
|
12092
|
+
sdkName: "project",
|
|
12093
|
+
description: "Identifies the project whose data you are reading, from the project list or create answer."
|
|
12094
|
+
}
|
|
12095
|
+
],
|
|
12096
|
+
query: [
|
|
12097
|
+
{
|
|
12098
|
+
name: "pageSize",
|
|
12099
|
+
type: "integer",
|
|
12100
|
+
required: false,
|
|
12101
|
+
description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
|
|
12102
|
+
},
|
|
12103
|
+
{
|
|
12104
|
+
name: "pageToken",
|
|
12105
|
+
type: "string",
|
|
12106
|
+
required: false,
|
|
12107
|
+
description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
|
|
12108
|
+
},
|
|
12109
|
+
{
|
|
12110
|
+
name: "orderBy",
|
|
12111
|
+
type: "string",
|
|
12112
|
+
required: false,
|
|
12113
|
+
description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
|
|
12114
|
+
}
|
|
12115
|
+
]
|
|
12116
|
+
},
|
|
12117
|
+
{
|
|
12118
|
+
resource: "devops.testCases",
|
|
12119
|
+
method: "retrieve",
|
|
12120
|
+
summary: "Retrieve a test case",
|
|
12121
|
+
description: "Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.",
|
|
12122
|
+
http: "GET",
|
|
12123
|
+
path: "/devops/v1/test-cases/{id}",
|
|
12124
|
+
streaming: "no",
|
|
12125
|
+
pagination: false,
|
|
12126
|
+
pathParams: [
|
|
12127
|
+
{
|
|
12128
|
+
name: "id",
|
|
12129
|
+
sdkName: "id",
|
|
12130
|
+
description: "The case identifier returned by a case list, or an older id listed in that case's aliases."
|
|
12131
|
+
}
|
|
12132
|
+
],
|
|
12133
|
+
query: []
|
|
12134
|
+
},
|
|
12135
|
+
{
|
|
12136
|
+
resource: "devops.testPlans",
|
|
12137
|
+
method: "delete",
|
|
12138
|
+
summary: "Delete a test plan",
|
|
12139
|
+
description: "Delete a plan so it schedules nothing further. The plan stops firing immediately; runs it already produced keep their own record and are not deleted with it. To stop a plan temporarily and keep it for later, pause it instead — deleting cannot be undone and the plan's key becomes free for another plan to take.",
|
|
12140
|
+
http: "DELETE",
|
|
12141
|
+
path: "/devops/v1/test-plans/{id}",
|
|
12142
|
+
streaming: "no",
|
|
12143
|
+
pagination: false,
|
|
12144
|
+
pathParams: [
|
|
12145
|
+
{
|
|
12146
|
+
name: "id",
|
|
12147
|
+
sdkName: "id",
|
|
12148
|
+
description: "The plan identifier returned by a plan list or create answer."
|
|
12149
|
+
}
|
|
12150
|
+
],
|
|
12151
|
+
query: []
|
|
12152
|
+
},
|
|
12153
|
+
{
|
|
12154
|
+
resource: "devops.testPlans",
|
|
12155
|
+
method: "retrieve",
|
|
12156
|
+
summary: "Retrieve a test plan",
|
|
12157
|
+
description: "Read one plan by the id a plan list returned, to see its selector, gate, repeat count, timeout and pause state before updating or deleting it. A paused plan carries the reason, the actor and the time it resumes, so a pause you did not set is explained here rather than guessed at.",
|
|
12158
|
+
http: "GET",
|
|
12159
|
+
path: "/devops/v1/test-plans/{id}",
|
|
12160
|
+
streaming: "no",
|
|
12161
|
+
pagination: false,
|
|
12162
|
+
pathParams: [
|
|
12163
|
+
{
|
|
12164
|
+
name: "id",
|
|
12165
|
+
sdkName: "id",
|
|
12166
|
+
description: "The plan identifier returned by a plan list or create answer."
|
|
12167
|
+
}
|
|
12168
|
+
],
|
|
12169
|
+
query: []
|
|
12170
|
+
},
|
|
12171
|
+
{
|
|
12172
|
+
resource: "devops.testPlans",
|
|
12173
|
+
method: "update",
|
|
12174
|
+
summary: "Update a test plan",
|
|
12175
|
+
description: "Change a plan's title, trigger, selector, gate, repeat count, timeout or enabled flag. Only the fields present in the body are changed, so a body naming one field leaves the rest exactly as they were. Changing a selector does not create a version — the plan is not a published artefact, and runs already started keep the selection they were created with. Read the plan first to know what you are leaving unchanged.",
|
|
12176
|
+
http: "PATCH",
|
|
12177
|
+
path: "/devops/v1/test-plans/{id}",
|
|
12178
|
+
streaming: "no",
|
|
12179
|
+
pagination: false,
|
|
12180
|
+
pathParams: [
|
|
12181
|
+
{
|
|
12182
|
+
name: "id",
|
|
12183
|
+
sdkName: "id",
|
|
12184
|
+
description: "The plan identifier returned by a plan list or create answer."
|
|
12185
|
+
}
|
|
12186
|
+
],
|
|
12187
|
+
query: [],
|
|
12188
|
+
body: {
|
|
12189
|
+
required: true,
|
|
12190
|
+
fields: [
|
|
12191
|
+
{
|
|
12192
|
+
name: "plan",
|
|
12193
|
+
type: "object",
|
|
12194
|
+
required: true,
|
|
12195
|
+
description: "The fields to change. Anything absent keeps its current value, so read the plan first if you need to know what you are leaving alone."
|
|
12196
|
+
},
|
|
12197
|
+
{
|
|
12198
|
+
name: "updateMask",
|
|
12199
|
+
type: "string",
|
|
12200
|
+
required: false,
|
|
12201
|
+
description: "Comma-separated names of the plan fields this patch intends to change, for example title,enabled. Omit it to apply every field present in plan; naming fields makes the intent explicit and keeps a concurrent edit from being overwritten by accident."
|
|
12202
|
+
}
|
|
12203
|
+
]
|
|
12204
|
+
}
|
|
12205
|
+
},
|
|
12206
|
+
{
|
|
12207
|
+
resource: "devops.testPlans",
|
|
12208
|
+
method: "pause",
|
|
12209
|
+
summary: "Pause a test plan",
|
|
12210
|
+
description: "Stop a plan from starting new runs while keeping it and its history. A reason is required and is recorded on the plan, so the next reader learns why it stopped. Give until to resume automatically at a time; omit it to stay paused until someone resumes it. Runs already in flight are not cancelled — cancel those individually.",
|
|
12211
|
+
http: "POST",
|
|
12212
|
+
path: "/devops/v1/test-plans/{id}:pause",
|
|
12213
|
+
streaming: "no",
|
|
12214
|
+
pagination: false,
|
|
12215
|
+
pathParams: [
|
|
12216
|
+
{
|
|
12217
|
+
name: "id",
|
|
12218
|
+
sdkName: "id",
|
|
12219
|
+
description: "The plan identifier returned by a plan list or create answer."
|
|
12220
|
+
}
|
|
12221
|
+
],
|
|
12222
|
+
query: [],
|
|
12223
|
+
body: {
|
|
12224
|
+
required: true,
|
|
12225
|
+
fields: [
|
|
12226
|
+
{
|
|
12227
|
+
name: "reason",
|
|
12228
|
+
type: "string",
|
|
12229
|
+
required: true,
|
|
12230
|
+
description: "Why the plan is being paused; it is stored on the plan and read by whoever finds it stopped."
|
|
12231
|
+
},
|
|
12232
|
+
{
|
|
12233
|
+
name: "until",
|
|
12234
|
+
type: "string",
|
|
12235
|
+
required: false,
|
|
12236
|
+
description: "RFC 3339 UTC time the plan resumes by itself; omit it to stay paused until someone resumes it."
|
|
12237
|
+
}
|
|
12238
|
+
]
|
|
12239
|
+
}
|
|
12240
|
+
},
|
|
12241
|
+
{
|
|
12242
|
+
resource: "devops.testPlans",
|
|
12243
|
+
method: "resume",
|
|
12244
|
+
summary: "Resume a test plan",
|
|
12245
|
+
description: "Clear a plan's pause so it schedules runs again. Resuming an active plan changes nothing and is safe to repeat. The plan keeps its selector, gate and key; only the pause is removed.",
|
|
12246
|
+
http: "POST",
|
|
12247
|
+
path: "/devops/v1/test-plans/{id}:resume",
|
|
12248
|
+
streaming: "no",
|
|
12249
|
+
pagination: false,
|
|
12250
|
+
pathParams: [
|
|
12251
|
+
{
|
|
12252
|
+
name: "id",
|
|
12253
|
+
sdkName: "id",
|
|
12254
|
+
description: "The plan identifier returned by a plan list or create answer."
|
|
12255
|
+
}
|
|
12256
|
+
],
|
|
12257
|
+
query: []
|
|
12258
|
+
},
|
|
12259
|
+
{
|
|
12260
|
+
resource: "devops.testRuns",
|
|
12261
|
+
method: "retrieve",
|
|
12262
|
+
summary: "Retrieve a test run",
|
|
12263
|
+
description: "Read one run's current state, result and counts, and ask for its failed executions inline with expand. Poll this after creating a run whose result was pending. A result is monotonic once it reaches a verdict — a failed run never becomes passed by a later report, so read the run rather than the last report to know where it ended.",
|
|
12264
|
+
http: "GET",
|
|
12265
|
+
path: "/devops/v1/test-runs/{id}",
|
|
12266
|
+
streaming: "no",
|
|
12267
|
+
pagination: false,
|
|
12268
|
+
pathParams: [
|
|
12269
|
+
{
|
|
12270
|
+
name: "id",
|
|
12271
|
+
sdkName: "id",
|
|
12272
|
+
description: "The run identifier returned by a run list or create answer."
|
|
12273
|
+
}
|
|
12274
|
+
],
|
|
12275
|
+
query: [
|
|
12276
|
+
{
|
|
12277
|
+
name: "expand",
|
|
12278
|
+
type: "array",
|
|
12279
|
+
itemType: "string",
|
|
12280
|
+
enum: [
|
|
12281
|
+
"failedExecutions"
|
|
12282
|
+
],
|
|
12283
|
+
required: false,
|
|
12284
|
+
description: "Repeatable field to expand inline. failedExecutions returns the non-passed executions with the run, which saves a second call when you only need to see what broke; omit it for the bare run."
|
|
12285
|
+
}
|
|
12286
|
+
]
|
|
12287
|
+
},
|
|
12288
|
+
{
|
|
12289
|
+
resource: "devops.testRuns",
|
|
12290
|
+
method: "cancel",
|
|
12291
|
+
summary: "Cancel a test run",
|
|
12292
|
+
description: "Stop a run that is still going. A reason is required and is recorded on the run, because a cancelled run is read later as evidence about why a commit was not verified. Cancelling a run that already reached a verdict is refused with RUN_ALREADY_FINISHED: its result is final and cancelling it would erase the verdict. Executions already recorded stay readable.",
|
|
12293
|
+
http: "POST",
|
|
12294
|
+
path: "/devops/v1/test-runs/{id}:cancel",
|
|
12295
|
+
streaming: "no",
|
|
12296
|
+
pagination: false,
|
|
12297
|
+
pathParams: [
|
|
12298
|
+
{
|
|
12299
|
+
name: "id",
|
|
12300
|
+
sdkName: "id",
|
|
12301
|
+
description: "The run identifier returned by a run list or create answer."
|
|
12302
|
+
}
|
|
12303
|
+
],
|
|
12304
|
+
query: [],
|
|
12305
|
+
body: {
|
|
12306
|
+
required: true,
|
|
12307
|
+
fields: [
|
|
12308
|
+
{
|
|
12309
|
+
name: "reason",
|
|
12310
|
+
type: "string",
|
|
12311
|
+
required: true,
|
|
12312
|
+
description: "Why the run is being cancelled; it is stored on the run and is what a later reader finds instead of a result."
|
|
12313
|
+
}
|
|
12314
|
+
]
|
|
12315
|
+
}
|
|
12316
|
+
},
|
|
12317
|
+
{
|
|
12318
|
+
resource: "devops.testRuns.executions",
|
|
12319
|
+
method: "list",
|
|
12320
|
+
summary: "List a run's executions",
|
|
12321
|
+
description: "List the executions recorded against one run — one entry per case the run selected, with its status, duration, attempts and evidence. Use it to find the case that failed, or to compare a repeat run against the previous one case by case. Reads happen while the run is still going, so a case may still be pending; filter by status to watch only the failures.",
|
|
12322
|
+
http: "GET",
|
|
12323
|
+
path: "/devops/v1/test-runs/{run}/executions",
|
|
12324
|
+
streaming: "no",
|
|
12325
|
+
pagination: false,
|
|
12326
|
+
pathParams: [
|
|
12327
|
+
{
|
|
12328
|
+
name: "run",
|
|
12329
|
+
sdkName: "run",
|
|
12330
|
+
description: "The run whose executions you are reading, from a run list or create answer."
|
|
12331
|
+
}
|
|
12332
|
+
],
|
|
12333
|
+
query: [
|
|
12334
|
+
{
|
|
12335
|
+
name: "pageSize",
|
|
12336
|
+
type: "integer",
|
|
12337
|
+
required: false,
|
|
12338
|
+
description: "How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone."
|
|
12339
|
+
},
|
|
12340
|
+
{
|
|
12341
|
+
name: "pageToken",
|
|
12342
|
+
type: "string",
|
|
12343
|
+
required: false,
|
|
12344
|
+
description: "The cursor from the previous page's nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page."
|
|
12345
|
+
},
|
|
12346
|
+
{
|
|
12347
|
+
name: "filter",
|
|
12348
|
+
type: "string",
|
|
12349
|
+
required: false,
|
|
12350
|
+
description: "AIP-160 equality filter over one declared field, for example result=failed to read only a run's failures. Fields an execution list does not declare are refused with INVALID_ARGUMENT rather than ignored."
|
|
12351
|
+
},
|
|
12352
|
+
{
|
|
12353
|
+
name: "orderBy",
|
|
12354
|
+
type: "string",
|
|
12355
|
+
required: false,
|
|
12356
|
+
description: "Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource's own order."
|
|
12357
|
+
}
|
|
12358
|
+
]
|
|
12359
|
+
},
|
|
12360
|
+
{
|
|
12361
|
+
resource: "devops.testRuns.executions",
|
|
12362
|
+
method: "retrieve",
|
|
12363
|
+
summary: "Retrieve one case's execution in a run",
|
|
12364
|
+
description: "Read one case's execution inside one run, including every attempt with its own duration and message. Use it after a run reports a failure to see whether the case failed once and passed on retry — that is what flaky true means — and to reach the evidence files a triage needs. Both ids come from the run and case reads; an execution that does not exist for that pair is NOT_FOUND rather than an empty answer.",
|
|
12365
|
+
http: "GET",
|
|
12366
|
+
path: "/devops/v1/test-runs/{run}/executions/{case}",
|
|
12367
|
+
streaming: "no",
|
|
12368
|
+
pagination: false,
|
|
12369
|
+
pathParams: [
|
|
12370
|
+
{
|
|
12371
|
+
name: "run",
|
|
12372
|
+
sdkName: "run",
|
|
12373
|
+
description: "The run whose executions you are reading, from a run list or create answer."
|
|
12374
|
+
},
|
|
12375
|
+
{
|
|
12376
|
+
name: "case",
|
|
12377
|
+
sdkName: "case",
|
|
12378
|
+
description: "The case to read inside that run, from the run's execution list or the project's case list."
|
|
12379
|
+
}
|
|
12380
|
+
],
|
|
12381
|
+
query: []
|
|
12382
|
+
},
|
|
12383
|
+
{
|
|
12384
|
+
resource: "devops.testSuites",
|
|
12385
|
+
method: "retrieve",
|
|
12386
|
+
summary: "Retrieve a test suite",
|
|
12387
|
+
description: "Read one suite by the id a suite list returned, to learn its file, framework, size, purposes and how many cases it holds. Use it when a case's suite id needs a name for display, or to confirm which commit's catalog a suite came from. The id is opaque; it comes from the list, never from the file path.",
|
|
12388
|
+
http: "GET",
|
|
12389
|
+
path: "/devops/v1/test-suites/{id}",
|
|
12390
|
+
streaming: "no",
|
|
12391
|
+
pagination: false,
|
|
12392
|
+
pathParams: [
|
|
12393
|
+
{
|
|
12394
|
+
name: "id",
|
|
12395
|
+
sdkName: "id",
|
|
12396
|
+
description: "The suite identifier returned by a suite list, not the file path it was discovered from."
|
|
12397
|
+
}
|
|
12398
|
+
],
|
|
12399
|
+
query: []
|
|
12400
|
+
},
|
|
11422
12401
|
{
|
|
11423
12402
|
resource: "file.files",
|
|
11424
12403
|
method: "list",
|
|
@@ -11630,7 +12609,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11630
12609
|
resource: "file.uploads",
|
|
11631
12610
|
method: "create",
|
|
11632
12611
|
summary: "Create an upload",
|
|
11633
|
-
description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most
|
|
12612
|
+
description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 20 GiB (21474836480 bytes) and only user_data, assistants and vision purposes. Send parts of at most 64000000 bytes; an unfinished upload waits for them for 7 days, so a client can create → send parts → query GET /file/v1/uploads/{upload_id} → resend only the missing parts → complete. Optional part_size fixes every part length and makes each numbered part retryable with identical bytes. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
|
|
11634
12613
|
http: "POST",
|
|
11635
12614
|
path: "/file/v1/uploads",
|
|
11636
12615
|
streaming: "no",
|
|
@@ -11644,7 +12623,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11644
12623
|
name: "bytes",
|
|
11645
12624
|
type: "integer",
|
|
11646
12625
|
required: true,
|
|
11647
|
-
description: "Exact complete file length in bytes, from 1 through
|
|
12626
|
+
description: "Exact complete file length in bytes, from 1 through 21474836480 (20 GiB); the sum of completed parts must match."
|
|
11648
12627
|
},
|
|
11649
12628
|
{
|
|
11650
12629
|
name: "filename",
|
|
@@ -11688,7 +12667,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11688
12667
|
resource: "file.uploads",
|
|
11689
12668
|
method: "createSigned",
|
|
11690
12669
|
summary: "Create a one-time upload URL",
|
|
11691
|
-
description: "Upload a local file of up to
|
|
12670
|
+
description: "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {\"filename\":\"photo.png\",\"bytes\":2048,\"content_type\":\"image/png\"}.",
|
|
11692
12671
|
http: "POST",
|
|
11693
12672
|
path: "/file/v1/uploads/signed",
|
|
11694
12673
|
streaming: "no",
|
|
@@ -11708,7 +12687,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11708
12687
|
name: "bytes",
|
|
11709
12688
|
type: "integer",
|
|
11710
12689
|
required: true,
|
|
11711
|
-
description: "Exact local file size in bytes, from 1 through
|
|
12690
|
+
description: "Exact local file size in bytes, from 1 through 21474836480 (20 GiB). Up to 104857600 bytes returns one PUT URL; larger files return numbered part URLs, a completion URL and a status URL. Every PUT requires its exact signed Content-Length."
|
|
11712
12691
|
},
|
|
11713
12692
|
{
|
|
11714
12693
|
name: "content_type",
|
|
@@ -11731,7 +12710,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11731
12710
|
name: "expires_in",
|
|
11732
12711
|
type: "integer",
|
|
11733
12712
|
required: false,
|
|
11734
|
-
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or
|
|
12713
|
+
description: "Lifetime in seconds, from 1 through 604800: defaults to 900 for single PUT or 604800 (7 days) for multipart. All part URLs, the status URL and the completion URL share one expiry. This does not set the resulting file's lifetime."
|
|
11735
12714
|
},
|
|
11736
12715
|
{
|
|
11737
12716
|
name: "part_size",
|
|
@@ -11742,6 +12721,24 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11742
12721
|
]
|
|
11743
12722
|
}
|
|
11744
12723
|
},
|
|
12724
|
+
{
|
|
12725
|
+
resource: "file.uploads",
|
|
12726
|
+
method: "retrieve",
|
|
12727
|
+
summary: "Retrieve an upload",
|
|
12728
|
+
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.",
|
|
12729
|
+
http: "GET",
|
|
12730
|
+
path: "/file/v1/uploads/{upload_id}",
|
|
12731
|
+
streaming: "no",
|
|
12732
|
+
pagination: false,
|
|
12733
|
+
pathParams: [
|
|
12734
|
+
{
|
|
12735
|
+
name: "upload_id",
|
|
12736
|
+
sdkName: "upload_id",
|
|
12737
|
+
description: "Upload identifier returned by create; the upload must belong to your organization."
|
|
12738
|
+
}
|
|
12739
|
+
],
|
|
12740
|
+
query: []
|
|
12741
|
+
},
|
|
11745
12742
|
{
|
|
11746
12743
|
resource: "file.uploads",
|
|
11747
12744
|
method: "cancel",
|
|
@@ -11764,7 +12761,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11764
12761
|
resource: "file.uploads",
|
|
11765
12762
|
method: "complete",
|
|
11766
12763
|
summary: "Complete an upload",
|
|
11767
|
-
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
12764
|
+
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. When parts were lost, query GET /file/v1/uploads/{upload_id} and resend them before completing. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
11768
12765
|
http: "POST",
|
|
11769
12766
|
path: "/file/v1/uploads/{upload_id}/complete",
|
|
11770
12767
|
streaming: "no",
|
|
@@ -11800,7 +12797,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
11800
12797
|
resource: "file.uploads.parts",
|
|
11801
12798
|
method: "create",
|
|
11802
12799
|
summary: "Add an upload part",
|
|
11803
|
-
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
12800
|
+
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID, and query GET /file/v1/uploads/{upload_id} to see which numbers already arrived. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
11804
12801
|
http: "POST",
|
|
11805
12802
|
path: "/file/v1/uploads/{upload_id}/parts",
|
|
11806
12803
|
streaming: "no",
|
|
@@ -12613,6 +13610,18 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12613
13610
|
],
|
|
12614
13611
|
query: []
|
|
12615
13612
|
},
|
|
13613
|
+
{
|
|
13614
|
+
resource: "media.generation.capabilities",
|
|
13615
|
+
method: "list",
|
|
13616
|
+
summary: "Get generation capabilities",
|
|
13617
|
+
description: "Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.",
|
|
13618
|
+
http: "GET",
|
|
13619
|
+
path: "/media/v1/generation/capabilities",
|
|
13620
|
+
streaming: "no",
|
|
13621
|
+
pagination: false,
|
|
13622
|
+
pathParams: [],
|
|
13623
|
+
query: []
|
|
13624
|
+
},
|
|
12616
13625
|
{
|
|
12617
13626
|
resource: "media.libraries",
|
|
12618
13627
|
method: "list",
|
|
@@ -12837,7 +13846,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12837
13846
|
resource: "media.libraries.assets",
|
|
12838
13847
|
method: "create",
|
|
12839
13848
|
summary: "Upload asset",
|
|
12840
|
-
description: " For understanding, Media generates proxies for video or audio sources of 100 MB or more; originals remain available unchanged.
|
|
13849
|
+
description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
12841
13850
|
http: "POST",
|
|
12842
13851
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
12843
13852
|
streaming: "no",
|
|
@@ -12961,7 +13970,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12961
13970
|
resource: "media.libraries.assets.import",
|
|
12962
13971
|
method: "create",
|
|
12963
13972
|
summary: "Import file",
|
|
12964
|
-
description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video or audio sources of 100 MB or more; originals remain available unchanged.
|
|
13973
|
+
description: "Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
12965
13974
|
http: "POST",
|
|
12966
13975
|
path: "/media/v1/libraries/{library_id}/assets/import",
|
|
12967
13976
|
streaming: "no",
|
|
@@ -13229,7 +14238,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13229
14238
|
resource: "media.libraries.assets.reprocess",
|
|
13230
14239
|
method: "create",
|
|
13231
14240
|
summary: "Reprocess asset",
|
|
13232
|
-
description: " For understanding, Media generates proxies for video or audio sources of 100 MB or more; originals remain available unchanged.
|
|
14241
|
+
description: " For understanding, Media generates proxies for video sources of 25 MB or more or longer than 10 minutes, and for audio-only sources of 100 MB or more; originals remain available unchanged. Long videos are supported. When a video proxy is needed and is still above 95 MB after recompression, the source is reported as UNSUPPORTED with the limit in the failure message. Proxy preparation uses the organization’s metered sandbox resources.",
|
|
13233
14242
|
http: "POST",
|
|
13234
14243
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
|
|
13235
14244
|
streaming: "no",
|
|
@@ -13304,10 +14313,14 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13304
14313
|
"transcript",
|
|
13305
14314
|
"frame",
|
|
13306
14315
|
"overview",
|
|
14316
|
+
"audio",
|
|
14317
|
+
"loudness",
|
|
14318
|
+
"beats",
|
|
14319
|
+
"content",
|
|
13307
14320
|
"embedding"
|
|
13308
14321
|
],
|
|
13309
14322
|
required: false,
|
|
13310
|
-
description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, and embedding reports a failed embedding step."
|
|
14323
|
+
description: "Return one output kind: caption is a visual description, tags are generated labels, ocr is visible text, transcript is speech, frame is a video shot, overview is a video summary, audio is sampled audio understanding, loudness is measured loudness, beats is the measured tempo and beat grid, content is the derived speech, music and silence split, and embedding reports a failed embedding step."
|
|
13311
14324
|
},
|
|
13312
14325
|
{
|
|
13313
14326
|
name: "cursor",
|
|
@@ -13327,7 +14340,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13327
14340
|
resource: "media.libraries.assets",
|
|
13328
14341
|
method: "batch",
|
|
13329
14342
|
summary: "Batch assets alias",
|
|
13330
|
-
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 or audio sources of 100 MB or more; originals remain available unchanged.
|
|
14343
|
+
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.',
|
|
13331
14344
|
http: "POST",
|
|
13332
14345
|
path: "/media/v1/libraries/{library_id}/assets:batch",
|
|
13333
14346
|
streaming: "no",
|
|
@@ -13362,7 +14375,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13362
14375
|
resource: "media.libraries.batches",
|
|
13363
14376
|
method: "create",
|
|
13364
14377
|
summary: "Create batch",
|
|
13365
|
-
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 or audio sources of 100 MB or more; originals remain available unchanged.
|
|
14378
|
+
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.',
|
|
13366
14379
|
http: "POST",
|
|
13367
14380
|
path: "/media/v1/libraries/{library_id}/batches",
|
|
13368
14381
|
streaming: "no",
|
|
@@ -13523,11 +14536,155 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13523
14536
|
}
|
|
13524
14537
|
]
|
|
13525
14538
|
},
|
|
14539
|
+
{
|
|
14540
|
+
resource: "media.libraries.generations",
|
|
14541
|
+
method: "create",
|
|
14542
|
+
summary: "Create video generation",
|
|
14543
|
+
description: "Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.",
|
|
14544
|
+
http: "POST",
|
|
14545
|
+
path: "/media/v1/libraries/{library_id}/generations",
|
|
14546
|
+
streaming: "no",
|
|
14547
|
+
pagination: false,
|
|
14548
|
+
pathParams: [
|
|
14549
|
+
{
|
|
14550
|
+
name: "library_id",
|
|
14551
|
+
sdkName: "library_id",
|
|
14552
|
+
description: "Library ID returned by creation."
|
|
14553
|
+
}
|
|
14554
|
+
],
|
|
14555
|
+
query: [],
|
|
14556
|
+
body: {
|
|
14557
|
+
required: true,
|
|
14558
|
+
fields: [
|
|
14559
|
+
{
|
|
14560
|
+
name: "intent",
|
|
14561
|
+
type: "string",
|
|
14562
|
+
required: true,
|
|
14563
|
+
description: "Generation operation; v1 accepts only video.generate text-to-video requests."
|
|
14564
|
+
},
|
|
14565
|
+
{
|
|
14566
|
+
name: "prompt",
|
|
14567
|
+
type: "string",
|
|
14568
|
+
required: true,
|
|
14569
|
+
description: "Text prompt describing the video to generate."
|
|
14570
|
+
},
|
|
14571
|
+
{
|
|
14572
|
+
name: "count",
|
|
14573
|
+
type: "integer",
|
|
14574
|
+
required: false,
|
|
14575
|
+
description: "Number of videos to generate; defaults to 1 and must be from 1 to 4."
|
|
14576
|
+
},
|
|
14577
|
+
{
|
|
14578
|
+
name: "duration_seconds",
|
|
14579
|
+
type: "integer",
|
|
14580
|
+
required: false,
|
|
14581
|
+
description: "Requested video duration in seconds; Router validates the model-specific supported durations."
|
|
14582
|
+
},
|
|
14583
|
+
{
|
|
14584
|
+
name: "aspect_ratio",
|
|
14585
|
+
type: "string",
|
|
14586
|
+
required: false,
|
|
14587
|
+
description: "Requested output aspect ratio; defaults to 16:9 and Router validates model support."
|
|
14588
|
+
},
|
|
14589
|
+
{
|
|
14590
|
+
name: "model",
|
|
14591
|
+
type: "string",
|
|
14592
|
+
required: false,
|
|
14593
|
+
description: "Router model with video_generation capability; defaults to wan2.7-t2v."
|
|
14594
|
+
},
|
|
14595
|
+
{
|
|
14596
|
+
name: "save",
|
|
14597
|
+
type: "string",
|
|
14598
|
+
enum: [
|
|
14599
|
+
"candidate",
|
|
14600
|
+
"library"
|
|
14601
|
+
],
|
|
14602
|
+
required: false,
|
|
14603
|
+
description: "candidate keeps outputs temporary for explicit save calls; library saves successful outputs automatically."
|
|
14604
|
+
},
|
|
14605
|
+
{
|
|
14606
|
+
name: "asset_folder",
|
|
14607
|
+
type: "string",
|
|
14608
|
+
required: false,
|
|
14609
|
+
description: "Folder for assets saved automatically or by later save calls; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
|
|
14610
|
+
},
|
|
14611
|
+
{
|
|
14612
|
+
name: "tags",
|
|
14613
|
+
type: "array",
|
|
14614
|
+
itemType: "string",
|
|
14615
|
+
required: false,
|
|
14616
|
+
description: "Tags applied when an output becomes a library asset."
|
|
14617
|
+
},
|
|
14618
|
+
{
|
|
14619
|
+
name: "understanding",
|
|
14620
|
+
type: "string",
|
|
14621
|
+
enum: [
|
|
14622
|
+
"auto",
|
|
14623
|
+
"skip"
|
|
14624
|
+
],
|
|
14625
|
+
required: false,
|
|
14626
|
+
description: "Understanding behavior when a candidate is saved as an asset; defaults to auto."
|
|
14627
|
+
},
|
|
14628
|
+
{
|
|
14629
|
+
name: "references",
|
|
14630
|
+
type: "array",
|
|
14631
|
+
itemType: "object",
|
|
14632
|
+
required: false,
|
|
14633
|
+
description: "Not supported in v1; omit this field. Only text-to-video is currently available."
|
|
14634
|
+
}
|
|
14635
|
+
]
|
|
14636
|
+
}
|
|
14637
|
+
},
|
|
14638
|
+
{
|
|
14639
|
+
resource: "media.libraries.jobs",
|
|
14640
|
+
method: "list",
|
|
14641
|
+
summary: "List jobs",
|
|
14642
|
+
description: "List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.",
|
|
14643
|
+
http: "GET",
|
|
14644
|
+
path: "/media/v1/libraries/{library_id}/jobs",
|
|
14645
|
+
streaming: "no",
|
|
14646
|
+
pagination: true,
|
|
14647
|
+
pathParams: [
|
|
14648
|
+
{
|
|
14649
|
+
name: "library_id",
|
|
14650
|
+
sdkName: "library_id",
|
|
14651
|
+
description: "Library ID returned by creation."
|
|
14652
|
+
}
|
|
14653
|
+
],
|
|
14654
|
+
query: [
|
|
14655
|
+
{
|
|
14656
|
+
name: "status",
|
|
14657
|
+
type: "string",
|
|
14658
|
+
enum: [
|
|
14659
|
+
"queued",
|
|
14660
|
+
"running",
|
|
14661
|
+
"completed",
|
|
14662
|
+
"completed_with_errors",
|
|
14663
|
+
"failed",
|
|
14664
|
+
"cancelled"
|
|
14665
|
+
],
|
|
14666
|
+
required: false,
|
|
14667
|
+
description: "Filter jobs by their current status."
|
|
14668
|
+
},
|
|
14669
|
+
{
|
|
14670
|
+
name: "limit",
|
|
14671
|
+
type: "integer",
|
|
14672
|
+
required: false,
|
|
14673
|
+
description: "Maximum entries in this page, from 1 through 100; defaults to 100."
|
|
14674
|
+
},
|
|
14675
|
+
{
|
|
14676
|
+
name: "cursor",
|
|
14677
|
+
type: "string",
|
|
14678
|
+
required: false,
|
|
14679
|
+
description: "Job id from the previous page’s next_cursor; omit for the first page."
|
|
14680
|
+
}
|
|
14681
|
+
]
|
|
14682
|
+
},
|
|
13526
14683
|
{
|
|
13527
14684
|
resource: "media.libraries.jobs",
|
|
13528
14685
|
method: "retrieve",
|
|
13529
|
-
summary: "Get job
|
|
13530
|
-
description: "Read
|
|
14686
|
+
summary: "Get job",
|
|
14687
|
+
description: "Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.",
|
|
13531
14688
|
http: "GET",
|
|
13532
14689
|
path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
13533
14690
|
streaming: "no",
|
|
@@ -13541,11 +14698,96 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13541
14698
|
{
|
|
13542
14699
|
name: "job_id",
|
|
13543
14700
|
sdkName: "job_id",
|
|
13544
|
-
description: "
|
|
14701
|
+
description: "Job identifier returned by batch creation, video-generation creation or job listing; resolved within this library."
|
|
13545
14702
|
}
|
|
13546
14703
|
],
|
|
13547
14704
|
query: []
|
|
13548
14705
|
},
|
|
14706
|
+
{
|
|
14707
|
+
resource: "media.libraries.jobs",
|
|
14708
|
+
method: "cancel",
|
|
14709
|
+
summary: "Cancel job",
|
|
14710
|
+
description: "Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.",
|
|
14711
|
+
http: "POST",
|
|
14712
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
14713
|
+
streaming: "no",
|
|
14714
|
+
pagination: false,
|
|
14715
|
+
pathParams: [
|
|
14716
|
+
{
|
|
14717
|
+
name: "library_id",
|
|
14718
|
+
sdkName: "library_id",
|
|
14719
|
+
description: "Library ID returned by creation."
|
|
14720
|
+
},
|
|
14721
|
+
{
|
|
14722
|
+
name: "job_id",
|
|
14723
|
+
sdkName: "job_id",
|
|
14724
|
+
description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
|
|
14725
|
+
}
|
|
14726
|
+
],
|
|
14727
|
+
query: []
|
|
14728
|
+
},
|
|
14729
|
+
{
|
|
14730
|
+
resource: "media.libraries.jobs.outputs.save",
|
|
14731
|
+
method: "create",
|
|
14732
|
+
summary: "Save generation output",
|
|
14733
|
+
description: "Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.",
|
|
14734
|
+
http: "POST",
|
|
14735
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
|
|
14736
|
+
streaming: "no",
|
|
14737
|
+
pagination: false,
|
|
14738
|
+
pathParams: [
|
|
14739
|
+
{
|
|
14740
|
+
name: "library_id",
|
|
14741
|
+
sdkName: "library_id",
|
|
14742
|
+
description: "Library ID returned by creation."
|
|
14743
|
+
},
|
|
14744
|
+
{
|
|
14745
|
+
name: "job_id",
|
|
14746
|
+
sdkName: "job_id",
|
|
14747
|
+
description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
|
|
14748
|
+
},
|
|
14749
|
+
{
|
|
14750
|
+
name: "index",
|
|
14751
|
+
sdkName: "index",
|
|
14752
|
+
description: "Zero-based position of the candidate in the Job outputs array."
|
|
14753
|
+
}
|
|
14754
|
+
],
|
|
14755
|
+
query: [],
|
|
14756
|
+
body: {
|
|
14757
|
+
required: false,
|
|
14758
|
+
fields: [
|
|
14759
|
+
{
|
|
14760
|
+
name: "public_id",
|
|
14761
|
+
type: "string",
|
|
14762
|
+
required: false,
|
|
14763
|
+
description: "Delivery identifier for the saved asset; defaults to gen_<job_id>_<index> and is idempotent."
|
|
14764
|
+
},
|
|
14765
|
+
{
|
|
14766
|
+
name: "asset_folder",
|
|
14767
|
+
type: "string",
|
|
14768
|
+
required: false,
|
|
14769
|
+
description: "Destination folder for the saved asset; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
|
|
14770
|
+
},
|
|
14771
|
+
{
|
|
14772
|
+
name: "tags",
|
|
14773
|
+
type: "array",
|
|
14774
|
+
itemType: "string",
|
|
14775
|
+
required: false,
|
|
14776
|
+
description: "Tags to apply to the saved asset."
|
|
14777
|
+
},
|
|
14778
|
+
{
|
|
14779
|
+
name: "understanding",
|
|
14780
|
+
type: "string",
|
|
14781
|
+
enum: [
|
|
14782
|
+
"auto",
|
|
14783
|
+
"skip"
|
|
14784
|
+
],
|
|
14785
|
+
required: false,
|
|
14786
|
+
description: "Understanding behavior for the saved asset; defaults to auto."
|
|
14787
|
+
}
|
|
14788
|
+
]
|
|
14789
|
+
}
|
|
14790
|
+
},
|
|
13549
14791
|
{
|
|
13550
14792
|
resource: "media.libraries.purge",
|
|
13551
14793
|
method: "create",
|
|
@@ -13657,7 +14899,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13657
14899
|
name: "expression",
|
|
13658
14900
|
type: "string",
|
|
13659
14901
|
required: false,
|
|
13660
|
-
description: 'Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context. Quality filters: flags:watermark matches any current shot with a watermark; flags.watermark:false requires an assessed video with no positive watermark judgment. The same syntax supports slideshow, hand_frame, text_sticker and low_quality. folder_mismatch:true selects lexical folder/location hints. Geometry filters support width, height, resolution:1920x1080, numeric aspect_ratio (width/height), and orientation:landscape, portrait or square. Missing geometry or unassessed legacy flags do not match positive filters. failure_code=UPSTREAM_FAILED selects assets with a current failed understanding carrying that code; combine with processing_state=failed or processing_state=partial.'
|
|
14902
|
+
description: 'Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: ["context"] to include context. Quality filters: flags:watermark matches any current shot with a watermark; flags.watermark:false requires an assessed video with no positive watermark judgment. The same syntax supports slideshow, hand_frame, text_sticker and low_quality. folder_mismatch:true selects lexical folder/location hints. Geometry filters support width, height, resolution:1920x1080, numeric aspect_ratio (width/height), and orientation:landscape, portrait or square. Missing geometry or unassessed legacy flags do not match positive filters. has_music:true AND audio_genre:jazz AND audio_mood:calm selects current-version audio profiles with music and matching model labels; has_music:false applies only to sampled ranges, not the entire source. failure_code=UPSTREAM_FAILED selects assets with a current failed understanding carrying that code; combine with processing_state=failed or processing_state=partial.'
|
|
13661
14903
|
},
|
|
13662
14904
|
{
|
|
13663
14905
|
name: "sort_by",
|
|
@@ -13830,7 +15072,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13830
15072
|
name: "kinds",
|
|
13831
15073
|
type: "string",
|
|
13832
15074
|
required: false,
|
|
13833
|
-
description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, embedding. Omit or empty to include every kind."
|
|
15075
|
+
description: "Comma-separated output kinds: caption, tags, ocr, frame, transcript, overview, audio, loudness, beats, content, embedding. Omit or empty to include every kind."
|
|
13834
15076
|
},
|
|
13835
15077
|
{
|
|
13836
15078
|
name: "cursor",
|
|
@@ -16055,293 +17297,826 @@ for more details.`
|
|
|
16055
17297
|
sdkName: "response_id",
|
|
16056
17298
|
description: "Id of the stored response, the `id` returned by createResponse (it looks like resp_...). An unknown id, a response created with store false, an expired response and another tenant's response all answer 404."
|
|
16057
17299
|
}
|
|
16058
|
-
],
|
|
16059
|
-
query: []
|
|
17300
|
+
],
|
|
17301
|
+
query: []
|
|
17302
|
+
},
|
|
17303
|
+
{
|
|
17304
|
+
resource: "model.responses.inputItems",
|
|
17305
|
+
method: "list",
|
|
17306
|
+
summary: "List Response Input Items",
|
|
17307
|
+
description: "Read the input items of a stored response using its id from creation. Use the returned items to inspect the input that produced that response.",
|
|
17308
|
+
http: "GET",
|
|
17309
|
+
path: "/model/v1/responses/{response_id}/input_items",
|
|
17310
|
+
streaming: "no",
|
|
17311
|
+
pagination: false,
|
|
17312
|
+
pathParams: [
|
|
17313
|
+
{
|
|
17314
|
+
name: "response_id",
|
|
17315
|
+
sdkName: "response_id",
|
|
17316
|
+
description: "Id of the stored response, the `id` returned by createResponse (it looks like resp_...). An unknown id, a response created with store false, an expired response and another tenant's response all answer 404."
|
|
17317
|
+
}
|
|
17318
|
+
],
|
|
17319
|
+
query: []
|
|
17320
|
+
},
|
|
17321
|
+
{
|
|
17322
|
+
resource: "model.systemone",
|
|
17323
|
+
method: "create",
|
|
17324
|
+
summary: "Ask structured decision questions",
|
|
17325
|
+
description: "Ask typed questions about a state and get calibrated probabilities instead of generated text. Same request and response as TypeSafe System One. Use model ids from model.models.list declaring typesafe.systemone. Send one or more noul, choice or score questions; answers use the same question ids. Input tokens are charged at the catalog input price; output tokens are free. usage.cost and X-Praxis-Cost-Usd expose the same customer charge in USD. box questions and assets are unsupported and return 400: images are not supported. Unknown top-level fields pass unchanged to the native upstream.",
|
|
17326
|
+
http: "POST",
|
|
17327
|
+
path: "/model/v1/systemone",
|
|
17328
|
+
streaming: "no",
|
|
17329
|
+
pagination: false,
|
|
17330
|
+
pathParams: [],
|
|
17331
|
+
query: [],
|
|
17332
|
+
body: {
|
|
17333
|
+
required: true,
|
|
17334
|
+
fields: [
|
|
17335
|
+
{
|
|
17336
|
+
name: "model",
|
|
17337
|
+
type: "string",
|
|
17338
|
+
required: true,
|
|
17339
|
+
description: "Published model id from model.models.list with supported_apis containing typesafe.systemone; returned unchanged in the response."
|
|
17340
|
+
},
|
|
17341
|
+
{
|
|
17342
|
+
name: "state",
|
|
17343
|
+
type: "object",
|
|
17344
|
+
required: true,
|
|
17345
|
+
description: "Shared content evaluated by every question, supplied as text, a JSON object or an array."
|
|
17346
|
+
},
|
|
17347
|
+
{
|
|
17348
|
+
name: "questions",
|
|
17349
|
+
type: "object",
|
|
17350
|
+
required: true,
|
|
17351
|
+
description: "Non-empty map of caller-chosen question ids to typed questions; answers preserve these ids. noul evaluates yes/no, choice selects a named option, score rates ordered levels. box is unsupported."
|
|
17352
|
+
},
|
|
17353
|
+
{
|
|
17354
|
+
name: "assets",
|
|
17355
|
+
type: "object",
|
|
17356
|
+
required: false,
|
|
17357
|
+
description: "Unsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported."
|
|
17358
|
+
}
|
|
17359
|
+
]
|
|
17360
|
+
}
|
|
17361
|
+
},
|
|
17362
|
+
{
|
|
17363
|
+
resource: "model.videos",
|
|
17364
|
+
method: "list",
|
|
17365
|
+
summary: "List videos",
|
|
17366
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
17367
|
+
http: "GET",
|
|
17368
|
+
path: "/model/v1/videos",
|
|
17369
|
+
streaming: "no",
|
|
17370
|
+
pagination: false,
|
|
17371
|
+
pathParams: [],
|
|
17372
|
+
query: [
|
|
17373
|
+
{
|
|
17374
|
+
name: "after",
|
|
17375
|
+
type: "string",
|
|
17376
|
+
required: false,
|
|
17377
|
+
description: "Cursor: the id of the video job after which the page starts, normally the `last_id` of the previous page. It must refer to an existing job of yours, otherwise the call fails."
|
|
17378
|
+
},
|
|
17379
|
+
{
|
|
17380
|
+
name: "limit",
|
|
17381
|
+
type: "integer",
|
|
17382
|
+
required: false,
|
|
17383
|
+
description: "Maximum number of jobs per page, from 1 to 100; defaults to 20."
|
|
17384
|
+
},
|
|
17385
|
+
{
|
|
17386
|
+
name: "order",
|
|
17387
|
+
type: "string",
|
|
17388
|
+
enum: [
|
|
17389
|
+
"asc",
|
|
17390
|
+
"desc"
|
|
17391
|
+
],
|
|
17392
|
+
required: false,
|
|
17393
|
+
description: "Sort order by creation time: desc (default) lists the newest job first, asc the oldest first."
|
|
17394
|
+
}
|
|
17395
|
+
]
|
|
17396
|
+
},
|
|
17397
|
+
{
|
|
17398
|
+
resource: "model.videos",
|
|
17399
|
+
method: "create",
|
|
17400
|
+
summary: "Create video",
|
|
17401
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
17402
|
+
http: "POST",
|
|
17403
|
+
path: "/model/v1/videos",
|
|
17404
|
+
streaming: "no",
|
|
17405
|
+
pagination: false,
|
|
17406
|
+
multipart: true,
|
|
17407
|
+
pathParams: [],
|
|
17408
|
+
query: [],
|
|
17409
|
+
body: {
|
|
17410
|
+
required: true,
|
|
17411
|
+
fields: [
|
|
17412
|
+
{
|
|
17413
|
+
name: "model",
|
|
17414
|
+
type: "string",
|
|
17415
|
+
required: false,
|
|
17416
|
+
description: "Video model id, for example `wan2.7-t2v`; list candidates with listModels?type=video. Router support (partial): Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation."
|
|
17417
|
+
},
|
|
17418
|
+
{
|
|
17419
|
+
name: "prompt",
|
|
17420
|
+
type: "string",
|
|
17421
|
+
required: true,
|
|
17422
|
+
description: "Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400."
|
|
17423
|
+
},
|
|
17424
|
+
{
|
|
17425
|
+
name: "seconds",
|
|
17426
|
+
type: "object",
|
|
17427
|
+
required: false,
|
|
17428
|
+
description: "Takes precedence over duration."
|
|
17429
|
+
},
|
|
17430
|
+
{
|
|
17431
|
+
name: "duration",
|
|
17432
|
+
type: "integer",
|
|
17433
|
+
required: false,
|
|
17434
|
+
description: "Length of the video in whole seconds. `seconds` takes precedence when both are given."
|
|
17435
|
+
},
|
|
17436
|
+
{
|
|
17437
|
+
name: "size",
|
|
17438
|
+
type: "string",
|
|
17439
|
+
required: false,
|
|
17440
|
+
description: "Output resolution as `WIDTHxHEIGHT`, for example `1280x720`. Router support (partial): Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel."
|
|
17441
|
+
},
|
|
17442
|
+
{
|
|
17443
|
+
name: "input_reference",
|
|
17444
|
+
type: "object",
|
|
17445
|
+
required: false,
|
|
17446
|
+
description: "Reference image for image-to-video: a URL or base64 data URL, an object with `image_url`, or an uploaded image file (multipart, at most 20 MiB)."
|
|
17447
|
+
},
|
|
17448
|
+
{
|
|
17449
|
+
name: "input_references",
|
|
17450
|
+
type: "array",
|
|
17451
|
+
itemType: "object",
|
|
17452
|
+
required: false,
|
|
17453
|
+
description: "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
|
|
17454
|
+
},
|
|
17455
|
+
{
|
|
17456
|
+
name: "frame_images",
|
|
17457
|
+
type: "array",
|
|
17458
|
+
itemType: "object",
|
|
17459
|
+
required: false,
|
|
17460
|
+
description: "Images that pin the first and last frame; at most 2 entries."
|
|
17461
|
+
},
|
|
17462
|
+
{
|
|
17463
|
+
name: "resolution",
|
|
17464
|
+
type: "string",
|
|
17465
|
+
required: false,
|
|
17466
|
+
description: "Output resolution label such as `720p`, for models that take a label instead of `size`."
|
|
17467
|
+
},
|
|
17468
|
+
{
|
|
17469
|
+
name: "aspect_ratio",
|
|
17470
|
+
type: "string",
|
|
17471
|
+
required: false,
|
|
17472
|
+
description: "Aspect ratio of the video such as `16:9`."
|
|
17473
|
+
},
|
|
17474
|
+
{
|
|
17475
|
+
name: "generate_audio",
|
|
17476
|
+
type: "boolean",
|
|
17477
|
+
required: false,
|
|
17478
|
+
description: "Whether the video carries a generated audio track. Router support (supported): false produces no audio track on wan2.7-t2v; the default output includes audio."
|
|
17479
|
+
},
|
|
17480
|
+
{
|
|
17481
|
+
name: "seed",
|
|
17482
|
+
type: "integer",
|
|
17483
|
+
required: false,
|
|
17484
|
+
description: "Seed for reproducible generation, on models that support it."
|
|
17485
|
+
},
|
|
17486
|
+
{
|
|
17487
|
+
name: "callback_url",
|
|
17488
|
+
type: "string",
|
|
17489
|
+
required: false,
|
|
17490
|
+
description: "HTTP or HTTPS callback URL, forwarded to models that support completion callbacks."
|
|
17491
|
+
},
|
|
17492
|
+
{
|
|
17493
|
+
name: "quality",
|
|
17494
|
+
type: "string",
|
|
17495
|
+
required: false,
|
|
17496
|
+
description: "Provider-specific quality setting."
|
|
17497
|
+
}
|
|
17498
|
+
]
|
|
17499
|
+
}
|
|
17500
|
+
},
|
|
17501
|
+
{
|
|
17502
|
+
resource: "model.videos",
|
|
17503
|
+
method: "delete",
|
|
17504
|
+
summary: "Delete video",
|
|
17505
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
17506
|
+
http: "DELETE",
|
|
17507
|
+
path: "/model/v1/videos/{video_id}",
|
|
17508
|
+
streaming: "no",
|
|
17509
|
+
pagination: false,
|
|
17510
|
+
pathParams: [
|
|
17511
|
+
{
|
|
17512
|
+
name: "video_id",
|
|
17513
|
+
sdkName: "video_id",
|
|
17514
|
+
description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
|
|
17515
|
+
}
|
|
17516
|
+
],
|
|
17517
|
+
query: []
|
|
17518
|
+
},
|
|
17519
|
+
{
|
|
17520
|
+
resource: "model.videos",
|
|
17521
|
+
method: "retrieve",
|
|
17522
|
+
summary: "Retrieve video",
|
|
17523
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
17524
|
+
http: "GET",
|
|
17525
|
+
path: "/model/v1/videos/{video_id}",
|
|
17526
|
+
streaming: "no",
|
|
17527
|
+
pagination: false,
|
|
17528
|
+
pathParams: [
|
|
17529
|
+
{
|
|
17530
|
+
name: "video_id",
|
|
17531
|
+
sdkName: "video_id",
|
|
17532
|
+
description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
|
|
17533
|
+
}
|
|
17534
|
+
],
|
|
17535
|
+
query: []
|
|
17536
|
+
},
|
|
17537
|
+
{
|
|
17538
|
+
resource: "model.videos",
|
|
17539
|
+
method: "retrieveContent",
|
|
17540
|
+
summary: "Download video",
|
|
17541
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
17542
|
+
http: "GET",
|
|
17543
|
+
path: "/model/v1/videos/{video_id}/content",
|
|
17544
|
+
streaming: "no",
|
|
17545
|
+
pagination: false,
|
|
17546
|
+
pathParams: [
|
|
17547
|
+
{
|
|
17548
|
+
name: "video_id",
|
|
17549
|
+
sdkName: "video_id",
|
|
17550
|
+
description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
|
|
17551
|
+
}
|
|
17552
|
+
],
|
|
17553
|
+
query: [
|
|
17554
|
+
{
|
|
17555
|
+
name: "variant",
|
|
17556
|
+
type: "string",
|
|
17557
|
+
enum: [
|
|
17558
|
+
"video",
|
|
17559
|
+
"thumbnail",
|
|
17560
|
+
"spritesheet"
|
|
17561
|
+
],
|
|
17562
|
+
required: false,
|
|
17563
|
+
description: "Spritesheet is not available in this release (400)."
|
|
17564
|
+
},
|
|
17565
|
+
{
|
|
17566
|
+
name: "index",
|
|
17567
|
+
type: "integer",
|
|
17568
|
+
required: false,
|
|
17569
|
+
description: "Output index; this release produces index 0. variant takes precedence."
|
|
17570
|
+
}
|
|
17571
|
+
]
|
|
17572
|
+
},
|
|
17573
|
+
{
|
|
17574
|
+
resource: "model.videos",
|
|
17575
|
+
method: "remix",
|
|
17576
|
+
summary: "Remix video",
|
|
17577
|
+
description: "Not supported in this release; always returns 400.",
|
|
17578
|
+
http: "POST",
|
|
17579
|
+
path: "/model/v1/videos/{video_id}/remix",
|
|
17580
|
+
streaming: "no",
|
|
17581
|
+
pagination: false,
|
|
17582
|
+
pathParams: [
|
|
17583
|
+
{
|
|
17584
|
+
name: "video_id",
|
|
17585
|
+
sdkName: "video_id",
|
|
17586
|
+
description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
|
|
17587
|
+
}
|
|
17588
|
+
],
|
|
17589
|
+
query: []
|
|
17590
|
+
},
|
|
17591
|
+
{
|
|
17592
|
+
resource: "ontology.changesets",
|
|
17593
|
+
method: "create",
|
|
17594
|
+
summary: "Apply changeset",
|
|
17595
|
+
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.",
|
|
17596
|
+
http: "POST",
|
|
17597
|
+
path: "/ontology/v1/changesets",
|
|
17598
|
+
streaming: "no",
|
|
17599
|
+
pagination: false,
|
|
17600
|
+
pathParams: [],
|
|
17601
|
+
query: [],
|
|
17602
|
+
body: {
|
|
17603
|
+
required: true,
|
|
17604
|
+
fields: [
|
|
17605
|
+
{
|
|
17606
|
+
name: "at",
|
|
17607
|
+
type: "string",
|
|
17608
|
+
required: true,
|
|
17609
|
+
description: "World time the batch describes, in ISO 8601 UTC; operations without their own time are dated by it."
|
|
17610
|
+
},
|
|
17611
|
+
{
|
|
17612
|
+
name: "scope",
|
|
17613
|
+
type: "string",
|
|
17614
|
+
required: false,
|
|
17615
|
+
description: "Scope the batch came from, normally the session id it was observed in; it is stored with the operations for later reading."
|
|
17616
|
+
},
|
|
17617
|
+
{
|
|
17618
|
+
name: "ops",
|
|
17619
|
+
type: "array",
|
|
17620
|
+
itemType: "object",
|
|
17621
|
+
required: true,
|
|
17622
|
+
description: "At most 500 operations, applied in order; each names its kind in op and the fields that kind requires."
|
|
17623
|
+
}
|
|
17624
|
+
]
|
|
17625
|
+
}
|
|
17626
|
+
},
|
|
17627
|
+
{
|
|
17628
|
+
resource: "ontology.nodes",
|
|
17629
|
+
method: "list",
|
|
17630
|
+
summary: "List nodes",
|
|
17631
|
+
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.",
|
|
17632
|
+
http: "GET",
|
|
17633
|
+
path: "/ontology/v1/nodes",
|
|
17634
|
+
streaming: "no",
|
|
17635
|
+
pagination: true,
|
|
17636
|
+
pathParams: [],
|
|
17637
|
+
query: [
|
|
17638
|
+
{
|
|
17639
|
+
name: "type",
|
|
17640
|
+
type: "array",
|
|
17641
|
+
itemType: "string",
|
|
17642
|
+
required: false,
|
|
17643
|
+
description: "Repeat to filter to any of several registered node type names, for example type=file&type=ticket; omit to list every type."
|
|
17644
|
+
},
|
|
17645
|
+
{
|
|
17646
|
+
name: "q",
|
|
17647
|
+
type: "string",
|
|
17648
|
+
required: false,
|
|
17649
|
+
description: "Free text matched against node names, aliases and descriptions; omit to list without a text filter."
|
|
17650
|
+
},
|
|
17651
|
+
{
|
|
17652
|
+
name: "owner",
|
|
17653
|
+
type: "string",
|
|
17654
|
+
required: false,
|
|
17655
|
+
description: "Filter to nodes owned by this member id, or omit to list nodes of every owner; organization-wide nodes carry no owner."
|
|
17656
|
+
},
|
|
17657
|
+
{
|
|
17658
|
+
name: "as_of",
|
|
17659
|
+
type: "string",
|
|
17660
|
+
required: false,
|
|
17661
|
+
description: "ISO 8601 timestamp; return the graph as it was then, so a node recorded later is absent. Omit to read current state."
|
|
17662
|
+
},
|
|
17663
|
+
{
|
|
17664
|
+
name: "limit",
|
|
17665
|
+
type: "integer",
|
|
17666
|
+
required: false,
|
|
17667
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
17668
|
+
},
|
|
17669
|
+
{
|
|
17670
|
+
name: "cursor",
|
|
17671
|
+
type: "string",
|
|
17672
|
+
required: false,
|
|
17673
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
17674
|
+
}
|
|
17675
|
+
]
|
|
17676
|
+
},
|
|
17677
|
+
{
|
|
17678
|
+
resource: "ontology.nodes",
|
|
17679
|
+
method: "create",
|
|
17680
|
+
summary: "Create node",
|
|
17681
|
+
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.",
|
|
17682
|
+
http: "POST",
|
|
17683
|
+
path: "/ontology/v1/nodes",
|
|
17684
|
+
streaming: "no",
|
|
17685
|
+
pagination: false,
|
|
17686
|
+
pathParams: [],
|
|
17687
|
+
query: [],
|
|
17688
|
+
body: {
|
|
17689
|
+
required: true,
|
|
17690
|
+
fields: [
|
|
17691
|
+
{
|
|
17692
|
+
name: "type",
|
|
17693
|
+
type: "string",
|
|
17694
|
+
required: true,
|
|
17695
|
+
description: "Registered node type name from types.list; an unregistered name is refused and nothing is written."
|
|
17696
|
+
},
|
|
17697
|
+
{
|
|
17698
|
+
name: "ref",
|
|
17699
|
+
type: "string",
|
|
17700
|
+
required: false,
|
|
17701
|
+
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."
|
|
17702
|
+
},
|
|
17703
|
+
{
|
|
17704
|
+
name: "name",
|
|
17705
|
+
type: "string",
|
|
17706
|
+
required: true,
|
|
17707
|
+
description: "Display name of the entity, at most 200 characters."
|
|
17708
|
+
},
|
|
17709
|
+
{
|
|
17710
|
+
name: "aliases",
|
|
17711
|
+
type: "array",
|
|
17712
|
+
itemType: "string",
|
|
17713
|
+
required: false,
|
|
17714
|
+
description: "Other names this entity is known by; they are matched by search alongside the name."
|
|
17715
|
+
},
|
|
17716
|
+
{
|
|
17717
|
+
name: "description",
|
|
17718
|
+
type: "string",
|
|
17719
|
+
required: false,
|
|
17720
|
+
description: "Profile of the entity, at most 500 characters; omit or null for none."
|
|
17721
|
+
},
|
|
17722
|
+
{
|
|
17723
|
+
name: "owner",
|
|
17724
|
+
type: "string",
|
|
17725
|
+
required: false,
|
|
17726
|
+
description: "Member id whose content this is, restricting it to that member; omit or null to make it readable organization-wide."
|
|
17727
|
+
}
|
|
17728
|
+
]
|
|
17729
|
+
}
|
|
17730
|
+
},
|
|
17731
|
+
{
|
|
17732
|
+
resource: "ontology.nodes",
|
|
17733
|
+
method: "retrieve",
|
|
17734
|
+
summary: "Retrieve node",
|
|
17735
|
+
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.",
|
|
17736
|
+
http: "GET",
|
|
17737
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
17738
|
+
streaming: "no",
|
|
17739
|
+
pagination: false,
|
|
17740
|
+
pathParams: [
|
|
17741
|
+
{
|
|
17742
|
+
name: "node_id",
|
|
17743
|
+
sdkName: "node_id",
|
|
17744
|
+
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."
|
|
17745
|
+
}
|
|
17746
|
+
],
|
|
17747
|
+
query: [
|
|
17748
|
+
{
|
|
17749
|
+
name: "expand",
|
|
17750
|
+
type: "string",
|
|
17751
|
+
enum: [
|
|
17752
|
+
"relations"
|
|
17753
|
+
],
|
|
17754
|
+
required: false,
|
|
17755
|
+
description: "Set to relations to include the node's incoming and outgoing relations in the same response; omit for the node alone."
|
|
17756
|
+
},
|
|
17757
|
+
{
|
|
17758
|
+
name: "as_of",
|
|
17759
|
+
type: "string",
|
|
17760
|
+
required: false,
|
|
17761
|
+
description: "ISO 8601 timestamp; read the node and its relations as they were then, including relations invalidated since. Omit to read current state."
|
|
17762
|
+
}
|
|
17763
|
+
]
|
|
16060
17764
|
},
|
|
16061
17765
|
{
|
|
16062
|
-
resource: "
|
|
16063
|
-
method: "
|
|
16064
|
-
summary: "
|
|
16065
|
-
description: "
|
|
16066
|
-
http: "
|
|
16067
|
-
path: "/
|
|
17766
|
+
resource: "ontology.nodes",
|
|
17767
|
+
method: "update",
|
|
17768
|
+
summary: "Update node",
|
|
17769
|
+
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.",
|
|
17770
|
+
http: "PATCH",
|
|
17771
|
+
path: "/ontology/v1/nodes/{node_id}",
|
|
16068
17772
|
streaming: "no",
|
|
16069
17773
|
pagination: false,
|
|
16070
17774
|
pathParams: [
|
|
16071
17775
|
{
|
|
16072
|
-
name: "
|
|
16073
|
-
sdkName: "
|
|
16074
|
-
description: "
|
|
17776
|
+
name: "node_id",
|
|
17777
|
+
sdkName: "node_id",
|
|
17778
|
+
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."
|
|
16075
17779
|
}
|
|
16076
17780
|
],
|
|
16077
|
-
query: []
|
|
17781
|
+
query: [],
|
|
17782
|
+
body: {
|
|
17783
|
+
required: true,
|
|
17784
|
+
fields: [
|
|
17785
|
+
{
|
|
17786
|
+
name: "name",
|
|
17787
|
+
type: "string",
|
|
17788
|
+
required: false,
|
|
17789
|
+
description: "New display name, at most 200 characters; omit to keep the current name."
|
|
17790
|
+
},
|
|
17791
|
+
{
|
|
17792
|
+
name: "aliases",
|
|
17793
|
+
type: "array",
|
|
17794
|
+
itemType: "string",
|
|
17795
|
+
required: false,
|
|
17796
|
+
description: "Replacement alias list; an empty array clears the aliases and omitting the field keeps them."
|
|
17797
|
+
},
|
|
17798
|
+
{
|
|
17799
|
+
name: "description",
|
|
17800
|
+
type: "string",
|
|
17801
|
+
required: false,
|
|
17802
|
+
description: "Replacement profile, at most 500 characters; an explicit null clears it and omitting the field keeps it."
|
|
17803
|
+
}
|
|
17804
|
+
]
|
|
17805
|
+
}
|
|
16078
17806
|
},
|
|
16079
17807
|
{
|
|
16080
|
-
resource: "
|
|
17808
|
+
resource: "ontology.nodes.merge",
|
|
16081
17809
|
method: "create",
|
|
16082
|
-
summary: "
|
|
16083
|
-
description: "
|
|
17810
|
+
summary: "Merge node",
|
|
17811
|
+
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.",
|
|
16084
17812
|
http: "POST",
|
|
16085
|
-
path: "/
|
|
17813
|
+
path: "/ontology/v1/nodes/{node_id}/merge",
|
|
16086
17814
|
streaming: "no",
|
|
16087
17815
|
pagination: false,
|
|
16088
|
-
pathParams: [
|
|
17816
|
+
pathParams: [
|
|
17817
|
+
{
|
|
17818
|
+
name: "node_id",
|
|
17819
|
+
sdkName: "node_id",
|
|
17820
|
+
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."
|
|
17821
|
+
}
|
|
17822
|
+
],
|
|
16089
17823
|
query: [],
|
|
16090
17824
|
body: {
|
|
16091
17825
|
required: true,
|
|
16092
17826
|
fields: [
|
|
16093
17827
|
{
|
|
16094
|
-
name: "
|
|
17828
|
+
name: "into",
|
|
16095
17829
|
type: "string",
|
|
16096
17830
|
required: true,
|
|
16097
|
-
description: "
|
|
16098
|
-
},
|
|
16099
|
-
{
|
|
16100
|
-
name: "state",
|
|
16101
|
-
type: "object",
|
|
16102
|
-
required: true,
|
|
16103
|
-
description: "Shared content evaluated by every question, supplied as text, a JSON object or an array."
|
|
16104
|
-
},
|
|
16105
|
-
{
|
|
16106
|
-
name: "questions",
|
|
16107
|
-
type: "object",
|
|
16108
|
-
required: true,
|
|
16109
|
-
description: "Non-empty map of caller-chosen question ids to typed questions; answers preserve these ids. noul evaluates yes/no, choice selects a named option, score rates ordered levels. box is unsupported."
|
|
16110
|
-
},
|
|
16111
|
-
{
|
|
16112
|
-
name: "assets",
|
|
16113
|
-
type: "object",
|
|
16114
|
-
required: false,
|
|
16115
|
-
description: "Unsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported."
|
|
17831
|
+
description: "Node id that should survive, from nodes.list or search; the merged node's relations and aliases move to it."
|
|
16116
17832
|
}
|
|
16117
17833
|
]
|
|
16118
17834
|
}
|
|
16119
17835
|
},
|
|
16120
17836
|
{
|
|
16121
|
-
resource: "
|
|
17837
|
+
resource: "ontology.relations",
|
|
16122
17838
|
method: "list",
|
|
16123
|
-
summary: "List
|
|
16124
|
-
description: "
|
|
17839
|
+
summary: "List relations",
|
|
17840
|
+
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.",
|
|
16125
17841
|
http: "GET",
|
|
16126
|
-
path: "/
|
|
17842
|
+
path: "/ontology/v1/relations",
|
|
16127
17843
|
streaming: "no",
|
|
16128
|
-
pagination:
|
|
17844
|
+
pagination: true,
|
|
16129
17845
|
pathParams: [],
|
|
16130
17846
|
query: [
|
|
16131
17847
|
{
|
|
16132
|
-
name: "
|
|
17848
|
+
name: "node",
|
|
16133
17849
|
type: "string",
|
|
16134
17850
|
required: false,
|
|
16135
|
-
description: "
|
|
17851
|
+
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."
|
|
16136
17852
|
},
|
|
16137
17853
|
{
|
|
16138
|
-
name: "
|
|
16139
|
-
type: "
|
|
17854
|
+
name: "type",
|
|
17855
|
+
type: "array",
|
|
17856
|
+
itemType: "string",
|
|
16140
17857
|
required: false,
|
|
16141
|
-
description: "
|
|
17858
|
+
description: "Repeat to filter to any of several registered relation type names, for example type=references&type=serves; omit to list every type."
|
|
16142
17859
|
},
|
|
16143
17860
|
{
|
|
16144
|
-
name: "
|
|
17861
|
+
name: "direction",
|
|
16145
17862
|
type: "string",
|
|
16146
17863
|
enum: [
|
|
16147
|
-
"
|
|
16148
|
-
"
|
|
17864
|
+
"out",
|
|
17865
|
+
"in",
|
|
17866
|
+
"both"
|
|
16149
17867
|
],
|
|
16150
17868
|
required: false,
|
|
16151
|
-
description: "
|
|
17869
|
+
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."
|
|
17870
|
+
},
|
|
17871
|
+
{
|
|
17872
|
+
name: "as_of",
|
|
17873
|
+
type: "string",
|
|
17874
|
+
required: false,
|
|
17875
|
+
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."
|
|
17876
|
+
},
|
|
17877
|
+
{
|
|
17878
|
+
name: "include_invalid",
|
|
17879
|
+
type: "boolean",
|
|
17880
|
+
required: false,
|
|
17881
|
+
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."
|
|
17882
|
+
},
|
|
17883
|
+
{
|
|
17884
|
+
name: "limit",
|
|
17885
|
+
type: "integer",
|
|
17886
|
+
required: false,
|
|
17887
|
+
description: "Maximum items to return per page, from 1 to 100; defaults to 50 when omitted. Values above 100 are clamped to 100."
|
|
17888
|
+
},
|
|
17889
|
+
{
|
|
17890
|
+
name: "cursor",
|
|
17891
|
+
type: "string",
|
|
17892
|
+
required: false,
|
|
17893
|
+
description: "Opaque next_cursor from the preceding list response; omit for the first page and stop when next_cursor is null."
|
|
16152
17894
|
}
|
|
16153
17895
|
]
|
|
16154
17896
|
},
|
|
16155
17897
|
{
|
|
16156
|
-
resource: "
|
|
17898
|
+
resource: "ontology.relations",
|
|
16157
17899
|
method: "create",
|
|
16158
|
-
summary: "Create
|
|
16159
|
-
description: "
|
|
17900
|
+
summary: "Create relation",
|
|
17901
|
+
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.",
|
|
16160
17902
|
http: "POST",
|
|
16161
|
-
path: "/
|
|
17903
|
+
path: "/ontology/v1/relations",
|
|
16162
17904
|
streaming: "no",
|
|
16163
17905
|
pagination: false,
|
|
16164
|
-
multipart: true,
|
|
16165
17906
|
pathParams: [],
|
|
16166
17907
|
query: [],
|
|
16167
17908
|
body: {
|
|
16168
17909
|
required: true,
|
|
16169
17910
|
fields: [
|
|
16170
17911
|
{
|
|
16171
|
-
name: "
|
|
17912
|
+
name: "type",
|
|
16172
17913
|
type: "string",
|
|
16173
|
-
required:
|
|
16174
|
-
description: "
|
|
17914
|
+
required: true,
|
|
17915
|
+
description: "Registered relation type name from types.list; it must admit both endpoints or the write is refused."
|
|
16175
17916
|
},
|
|
16176
17917
|
{
|
|
16177
|
-
name: "
|
|
17918
|
+
name: "source",
|
|
16178
17919
|
type: "string",
|
|
16179
17920
|
required: true,
|
|
16180
|
-
description: "
|
|
16181
|
-
},
|
|
16182
|
-
{
|
|
16183
|
-
name: "seconds",
|
|
16184
|
-
type: "object",
|
|
16185
|
-
required: false,
|
|
16186
|
-
description: "Takes precedence over duration."
|
|
17921
|
+
description: "Node id the fact starts from, from nodes.list or nodes.create."
|
|
16187
17922
|
},
|
|
16188
17923
|
{
|
|
16189
|
-
name: "
|
|
16190
|
-
type: "
|
|
16191
|
-
required:
|
|
16192
|
-
description: "
|
|
17924
|
+
name: "target",
|
|
17925
|
+
type: "string",
|
|
17926
|
+
required: true,
|
|
17927
|
+
description: "Node id the fact points at, from nodes.list or nodes.create."
|
|
16193
17928
|
},
|
|
16194
17929
|
{
|
|
16195
|
-
name: "
|
|
17930
|
+
name: "fact",
|
|
16196
17931
|
type: "string",
|
|
16197
|
-
required:
|
|
16198
|
-
description: "
|
|
17932
|
+
required: true,
|
|
17933
|
+
description: "The relationship in one sentence, at most 280 characters, written to read back on its own."
|
|
16199
17934
|
},
|
|
16200
17935
|
{
|
|
16201
|
-
name: "
|
|
16202
|
-
type: "
|
|
17936
|
+
name: "valid_at",
|
|
17937
|
+
type: "string",
|
|
16203
17938
|
required: false,
|
|
16204
|
-
description: "
|
|
17939
|
+
description: "World time the fact became true, when the mirrored record dates it; omit to leave it undated."
|
|
16205
17940
|
},
|
|
16206
17941
|
{
|
|
16207
|
-
name: "
|
|
16208
|
-
type: "
|
|
16209
|
-
itemType: "object",
|
|
17942
|
+
name: "owner",
|
|
17943
|
+
type: "string",
|
|
16210
17944
|
required: false,
|
|
16211
|
-
description: "
|
|
16212
|
-
}
|
|
17945
|
+
description: "Member id whose content this fact is, restricting it to that member; omit or null for organization-wide."
|
|
17946
|
+
}
|
|
17947
|
+
]
|
|
17948
|
+
}
|
|
17949
|
+
},
|
|
17950
|
+
{
|
|
17951
|
+
resource: "ontology.relations",
|
|
17952
|
+
method: "retrieve",
|
|
17953
|
+
summary: "Retrieve relation",
|
|
17954
|
+
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.",
|
|
17955
|
+
http: "GET",
|
|
17956
|
+
path: "/ontology/v1/relations/{relation_id}",
|
|
17957
|
+
streaming: "no",
|
|
17958
|
+
pagination: false,
|
|
17959
|
+
pathParams: [
|
|
17960
|
+
{
|
|
17961
|
+
name: "relation_id",
|
|
17962
|
+
sdkName: "relation_id",
|
|
17963
|
+
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."
|
|
17964
|
+
}
|
|
17965
|
+
],
|
|
17966
|
+
query: []
|
|
17967
|
+
},
|
|
17968
|
+
{
|
|
17969
|
+
resource: "ontology.relations.invalidate",
|
|
17970
|
+
method: "create",
|
|
17971
|
+
summary: "Invalidate relation",
|
|
17972
|
+
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.",
|
|
17973
|
+
http: "POST",
|
|
17974
|
+
path: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
17975
|
+
streaming: "no",
|
|
17976
|
+
pagination: false,
|
|
17977
|
+
pathParams: [
|
|
17978
|
+
{
|
|
17979
|
+
name: "relation_id",
|
|
17980
|
+
sdkName: "relation_id",
|
|
17981
|
+
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."
|
|
17982
|
+
}
|
|
17983
|
+
],
|
|
17984
|
+
query: [],
|
|
17985
|
+
body: {
|
|
17986
|
+
required: true,
|
|
17987
|
+
fields: [
|
|
16213
17988
|
{
|
|
16214
|
-
name: "
|
|
16215
|
-
type: "
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
description: "Images that pin the first and last frame; at most 2 entries."
|
|
17989
|
+
name: "invalid_at",
|
|
17990
|
+
type: "string",
|
|
17991
|
+
required: true,
|
|
17992
|
+
description: "World time the fact stopped being true, in ISO 8601 UTC; reads at an earlier as_of still return the relation."
|
|
16219
17993
|
},
|
|
16220
17994
|
{
|
|
16221
|
-
name: "
|
|
17995
|
+
name: "superseded_by",
|
|
16222
17996
|
type: "string",
|
|
16223
17997
|
required: false,
|
|
16224
|
-
description: "
|
|
17998
|
+
description: "Relation id that replaces this one, when a successor was recorded; omit or null when nothing replaced it."
|
|
16225
17999
|
},
|
|
16226
18000
|
{
|
|
16227
|
-
name: "
|
|
18001
|
+
name: "reason",
|
|
16228
18002
|
type: "string",
|
|
16229
18003
|
required: false,
|
|
16230
|
-
description: "
|
|
16231
|
-
}
|
|
18004
|
+
description: "Why it stopped being true, for people reading the history later; not enforced and safe to omit."
|
|
18005
|
+
}
|
|
18006
|
+
]
|
|
18007
|
+
}
|
|
18008
|
+
},
|
|
18009
|
+
{
|
|
18010
|
+
resource: "ontology.search",
|
|
18011
|
+
method: "create",
|
|
18012
|
+
summary: "Search nodes",
|
|
18013
|
+
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.",
|
|
18014
|
+
http: "POST",
|
|
18015
|
+
path: "/ontology/v1/search",
|
|
18016
|
+
streaming: "no",
|
|
18017
|
+
pagination: false,
|
|
18018
|
+
pathParams: [],
|
|
18019
|
+
query: [],
|
|
18020
|
+
body: {
|
|
18021
|
+
required: true,
|
|
18022
|
+
fields: [
|
|
16232
18023
|
{
|
|
16233
|
-
name: "
|
|
16234
|
-
type: "
|
|
16235
|
-
required:
|
|
16236
|
-
description: "
|
|
18024
|
+
name: "text",
|
|
18025
|
+
type: "string",
|
|
18026
|
+
required: true,
|
|
18027
|
+
description: "Text to find nodes for, matched against names, aliases, descriptions and relation facts; an empty string is refused."
|
|
16237
18028
|
},
|
|
16238
18029
|
{
|
|
16239
|
-
name: "
|
|
16240
|
-
type: "
|
|
18030
|
+
name: "types",
|
|
18031
|
+
type: "array",
|
|
18032
|
+
itemType: "string",
|
|
16241
18033
|
required: false,
|
|
16242
|
-
description: "
|
|
18034
|
+
description: "Registered node type names to search within; omit to search every type."
|
|
16243
18035
|
},
|
|
16244
18036
|
{
|
|
16245
|
-
name: "
|
|
16246
|
-
type: "
|
|
18037
|
+
name: "window",
|
|
18038
|
+
type: "object",
|
|
16247
18039
|
required: false,
|
|
16248
|
-
description: "
|
|
18040
|
+
description: "Restrict matches to facts recorded within a period; omit to search all time."
|
|
16249
18041
|
},
|
|
16250
18042
|
{
|
|
16251
|
-
name: "
|
|
16252
|
-
type: "
|
|
18043
|
+
name: "limit",
|
|
18044
|
+
type: "integer",
|
|
16253
18045
|
required: false,
|
|
16254
|
-
description: "
|
|
18046
|
+
description: "Maximum candidate nodes to return, from 1 to 50; defaults to 20 when omitted."
|
|
16255
18047
|
}
|
|
16256
18048
|
]
|
|
16257
18049
|
}
|
|
16258
18050
|
},
|
|
16259
18051
|
{
|
|
16260
|
-
resource: "
|
|
16261
|
-
method: "
|
|
16262
|
-
summary: "
|
|
16263
|
-
description: "
|
|
16264
|
-
http: "DELETE",
|
|
16265
|
-
path: "/model/v1/videos/{video_id}",
|
|
16266
|
-
streaming: "no",
|
|
16267
|
-
pagination: false,
|
|
16268
|
-
pathParams: [
|
|
16269
|
-
{
|
|
16270
|
-
name: "video_id",
|
|
16271
|
-
sdkName: "video_id",
|
|
16272
|
-
description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
|
|
16273
|
-
}
|
|
16274
|
-
],
|
|
16275
|
-
query: []
|
|
16276
|
-
},
|
|
16277
|
-
{
|
|
16278
|
-
resource: "model.videos",
|
|
16279
|
-
method: "retrieve",
|
|
16280
|
-
summary: "Retrieve video",
|
|
16281
|
-
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
18052
|
+
resource: "ontology.types",
|
|
18053
|
+
method: "list",
|
|
18054
|
+
summary: "List types",
|
|
18055
|
+
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.",
|
|
16282
18056
|
http: "GET",
|
|
16283
|
-
path: "/
|
|
18057
|
+
path: "/ontology/v1/types",
|
|
16284
18058
|
streaming: "no",
|
|
16285
18059
|
pagination: false,
|
|
16286
|
-
pathParams: [
|
|
16287
|
-
{
|
|
16288
|
-
name: "video_id",
|
|
16289
|
-
sdkName: "video_id",
|
|
16290
|
-
description: "Id of the video job whose output you want, the `id` returned by createVideo. The job must be completed; before that the call answers 400."
|
|
16291
|
-
}
|
|
16292
|
-
],
|
|
18060
|
+
pathParams: [],
|
|
16293
18061
|
query: []
|
|
16294
18062
|
},
|
|
16295
18063
|
{
|
|
16296
|
-
resource: "
|
|
16297
|
-
method: "
|
|
16298
|
-
summary: "
|
|
16299
|
-
description: "
|
|
16300
|
-
http: "
|
|
16301
|
-
path: "/
|
|
18064
|
+
resource: "ontology.types",
|
|
18065
|
+
method: "create",
|
|
18066
|
+
summary: "Register type",
|
|
18067
|
+
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.",
|
|
18068
|
+
http: "POST",
|
|
18069
|
+
path: "/ontology/v1/types",
|
|
16302
18070
|
streaming: "no",
|
|
16303
18071
|
pagination: false,
|
|
16304
|
-
pathParams: [
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
"
|
|
16317
|
-
"
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
18072
|
+
pathParams: [],
|
|
18073
|
+
query: [],
|
|
18074
|
+
body: {
|
|
18075
|
+
required: true,
|
|
18076
|
+
fields: [
|
|
18077
|
+
{
|
|
18078
|
+
name: "owner",
|
|
18079
|
+
type: "string",
|
|
18080
|
+
required: true,
|
|
18081
|
+
description: "Service that registered these types, for example file or ticket; it is the registrant a later change to a type is checked against."
|
|
18082
|
+
},
|
|
18083
|
+
{
|
|
18084
|
+
name: "version",
|
|
18085
|
+
type: "integer",
|
|
18086
|
+
required: true,
|
|
18087
|
+
description: "Monotonic version of this owner's registration; a later registration must extend this one without removing or narrowing anything."
|
|
18088
|
+
},
|
|
18089
|
+
{
|
|
18090
|
+
name: "nodes",
|
|
18091
|
+
type: "array",
|
|
18092
|
+
itemType: "object",
|
|
18093
|
+
required: true,
|
|
18094
|
+
description: "Node types this owner registers."
|
|
18095
|
+
},
|
|
18096
|
+
{
|
|
18097
|
+
name: "edges",
|
|
18098
|
+
type: "array",
|
|
18099
|
+
itemType: "object",
|
|
18100
|
+
required: true,
|
|
18101
|
+
description: "Relation types this owner registers."
|
|
18102
|
+
}
|
|
18103
|
+
]
|
|
18104
|
+
}
|
|
16330
18105
|
},
|
|
16331
18106
|
{
|
|
16332
|
-
resource: "
|
|
16333
|
-
method: "
|
|
16334
|
-
summary: "
|
|
16335
|
-
description: "
|
|
16336
|
-
http: "
|
|
16337
|
-
path: "/
|
|
18107
|
+
resource: "ontology.types",
|
|
18108
|
+
method: "retrieve",
|
|
18109
|
+
summary: "Retrieve type",
|
|
18110
|
+
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.",
|
|
18111
|
+
http: "GET",
|
|
18112
|
+
path: "/ontology/v1/types/{name}",
|
|
16338
18113
|
streaming: "no",
|
|
16339
18114
|
pagination: false,
|
|
16340
18115
|
pathParams: [
|
|
16341
18116
|
{
|
|
16342
|
-
name: "
|
|
16343
|
-
sdkName: "
|
|
16344
|
-
description: "
|
|
18117
|
+
name: "name",
|
|
18118
|
+
sdkName: "name",
|
|
18119
|
+
description: "A type name from types.list, with its dots preserved — a display label is not accepted."
|
|
16345
18120
|
}
|
|
16346
18121
|
],
|
|
16347
18122
|
query: []
|
|
@@ -19069,7 +20844,7 @@ for more details.`
|
|
|
19069
20844
|
resource: "ticket.labels",
|
|
19070
20845
|
method: "create",
|
|
19071
20846
|
summary: "Create or add labels",
|
|
19072
|
-
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.
|
|
20847
|
+
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.",
|
|
19073
20848
|
http: "POST",
|
|
19074
20849
|
path: "/ticket/v1/labels",
|
|
19075
20850
|
streaming: "no",
|
|
@@ -19111,7 +20886,7 @@ for more details.`
|
|
|
19111
20886
|
resource: "ticket.labels",
|
|
19112
20887
|
method: "delete",
|
|
19113
20888
|
summary: "Remove labels",
|
|
19114
|
-
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.
|
|
20889
|
+
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.",
|
|
19115
20890
|
http: "DELETE",
|
|
19116
20891
|
path: "/ticket/v1/labels/{name}",
|
|
19117
20892
|
streaming: "no",
|
|
@@ -19136,7 +20911,7 @@ for more details.`
|
|
|
19136
20911
|
resource: "ticket.labels",
|
|
19137
20912
|
method: "update",
|
|
19138
20913
|
summary: "Update labels",
|
|
19139
|
-
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.
|
|
20914
|
+
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.",
|
|
19140
20915
|
http: "PATCH",
|
|
19141
20916
|
path: "/ticket/v1/labels/{name}",
|
|
19142
20917
|
streaming: "no",
|
|
@@ -19432,7 +21207,7 @@ for more details.`
|
|
|
19432
21207
|
name: "filter",
|
|
19433
21208
|
type: "string",
|
|
19434
21209
|
required: false,
|
|
19435
|
-
description: "Search qualifier subset: is/state, reason, label/-label, no, assignee, author, mentions, milestone, type, kind, assignee-kind, in and sort;
|
|
21210
|
+
description: "Search qualifier subset: is/state, reason, label/-label, no, assignee, author, mentions, milestone, type, kind, assignee-kind, in and sort; write each qualifier as field:value (for example, is:open milestone:5), never field=value. Unknown qualifiers return INVALID_PARAMS. Passed unchanged to the service."
|
|
19436
21211
|
}
|
|
19437
21212
|
]
|
|
19438
21213
|
},
|
|
@@ -20538,7 +22313,7 @@ for more details.`
|
|
|
20538
22313
|
resource: "vault.vaults",
|
|
20539
22314
|
method: "create",
|
|
20540
22315
|
summary: "Create vault",
|
|
20541
|
-
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.
|
|
22316
|
+
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.",
|
|
20542
22317
|
http: "POST",
|
|
20543
22318
|
path: "/vault/v1/vaults",
|
|
20544
22319
|
streaming: "no",
|
|
@@ -21071,6 +22846,8 @@ function problemFrom(status, headers, body, statusText) {
|
|
|
21071
22846
|
param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
|
|
21072
22847
|
errors: Array.isArray(value.errors) ? value.errors : [],
|
|
21073
22848
|
requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
|
|
22849
|
+
docUrl: string(nested.doc_url) ?? string(value.doc_url) ?? string(nested.docUrl) ?? string(value.docUrl),
|
|
22850
|
+
describe: string(nested.describe) ?? string(value.describe),
|
|
21074
22851
|
raw: body
|
|
21075
22852
|
};
|
|
21076
22853
|
}
|
|
@@ -21084,6 +22861,8 @@ class PraxisError extends Error {
|
|
|
21084
22861
|
errors;
|
|
21085
22862
|
requestId;
|
|
21086
22863
|
param;
|
|
22864
|
+
docUrl;
|
|
22865
|
+
describe;
|
|
21087
22866
|
raw;
|
|
21088
22867
|
constructor(problem = {}, options) {
|
|
21089
22868
|
super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
|
|
@@ -21096,6 +22875,8 @@ class PraxisError extends Error {
|
|
|
21096
22875
|
this.errors = problem.errors ?? [];
|
|
21097
22876
|
this.requestId = problem.requestId;
|
|
21098
22877
|
this.param = problem.param;
|
|
22878
|
+
this.docUrl = problem.docUrl;
|
|
22879
|
+
this.describe = problem.describe;
|
|
21099
22880
|
this.raw = problem.raw;
|
|
21100
22881
|
}
|
|
21101
22882
|
static fromResponse(response, body) {
|
|
@@ -22500,6 +24281,23 @@ var computersFilesContent = (options) => (options.client ?? client).get({
|
|
|
22500
24281
|
url: "/agent/v1/computers/{computer_id}/files/content",
|
|
22501
24282
|
...options
|
|
22502
24283
|
});
|
|
24284
|
+
var computersFilesConvert = (options) => (options.client ?? client).post({
|
|
24285
|
+
security: [{
|
|
24286
|
+
key: "BearerAuth",
|
|
24287
|
+
scheme: "bearer",
|
|
24288
|
+
type: "http"
|
|
24289
|
+
}, {
|
|
24290
|
+
key: "ApiKeyAuth",
|
|
24291
|
+
name: "X-API-Key",
|
|
24292
|
+
type: "apiKey"
|
|
24293
|
+
}],
|
|
24294
|
+
url: "/agent/v1/computers/{computer_id}/files/convert",
|
|
24295
|
+
...options,
|
|
24296
|
+
headers: {
|
|
24297
|
+
"Content-Type": "application/json",
|
|
24298
|
+
...options.headers
|
|
24299
|
+
}
|
|
24300
|
+
});
|
|
22503
24301
|
var connectComputer = (options) => (options.client ?? client).post({
|
|
22504
24302
|
security: [{
|
|
22505
24303
|
key: "BearerAuth",
|
|
@@ -22998,6 +24796,15 @@ var fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
22998
24796
|
url: "/file/v1/uploads/{upload_id}/cancel",
|
|
22999
24797
|
...options
|
|
23000
24798
|
});
|
|
24799
|
+
var fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
24800
|
+
security: [{
|
|
24801
|
+
key: "BearerAuth",
|
|
24802
|
+
scheme: "bearer",
|
|
24803
|
+
type: "http"
|
|
24804
|
+
}],
|
|
24805
|
+
url: "/file/v1/uploads/{upload_id}",
|
|
24806
|
+
...options
|
|
24807
|
+
});
|
|
23001
24808
|
var fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
23002
24809
|
security: [{
|
|
23003
24810
|
key: "BearerAuth",
|
|
@@ -26874,6 +28681,36 @@ var cutCreateExport = (options) => (options.client ?? client).post({
|
|
|
26874
28681
|
...options.headers
|
|
26875
28682
|
}
|
|
26876
28683
|
});
|
|
28684
|
+
var cutCreateRender = (options) => (options.client ?? client).post({
|
|
28685
|
+
security: [{
|
|
28686
|
+
key: "BearerAuth",
|
|
28687
|
+
scheme: "bearer",
|
|
28688
|
+
type: "http"
|
|
28689
|
+
}, {
|
|
28690
|
+
key: "ApiKeyAuth",
|
|
28691
|
+
name: "X-API-Key",
|
|
28692
|
+
type: "apiKey"
|
|
28693
|
+
}],
|
|
28694
|
+
url: "/cut/v1/projects/{project_id}/renders",
|
|
28695
|
+
...options,
|
|
28696
|
+
headers: {
|
|
28697
|
+
"Content-Type": "application/json",
|
|
28698
|
+
...options.headers
|
|
28699
|
+
}
|
|
28700
|
+
});
|
|
28701
|
+
var cutRetrieveRender = (options) => (options.client ?? client).get({
|
|
28702
|
+
security: [{
|
|
28703
|
+
key: "BearerAuth",
|
|
28704
|
+
scheme: "bearer",
|
|
28705
|
+
type: "http"
|
|
28706
|
+
}, {
|
|
28707
|
+
key: "ApiKeyAuth",
|
|
28708
|
+
name: "X-API-Key",
|
|
28709
|
+
type: "apiKey"
|
|
28710
|
+
}],
|
|
28711
|
+
url: "/cut/v1/renders/{render_id}",
|
|
28712
|
+
...options
|
|
28713
|
+
});
|
|
26877
28714
|
var cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
26878
28715
|
security: [{
|
|
26879
28716
|
key: "BearerAuth",
|
|
@@ -27164,6 +29001,201 @@ var databaseInsert = (options) => (options.client ?? client).post({
|
|
|
27164
29001
|
...options.headers
|
|
27165
29002
|
}
|
|
27166
29003
|
});
|
|
29004
|
+
var devopsTestCatalogGet = (options) => (options.client ?? client).get({
|
|
29005
|
+
security: [{
|
|
29006
|
+
key: "devops-bearerAuth",
|
|
29007
|
+
scheme: "bearer",
|
|
29008
|
+
type: "http"
|
|
29009
|
+
}],
|
|
29010
|
+
url: "/devops/v1/projects/{project}/test-catalog",
|
|
29011
|
+
...options
|
|
29012
|
+
});
|
|
29013
|
+
var devopsTestSuitesList = (options) => (options.client ?? client).get({
|
|
29014
|
+
security: [{
|
|
29015
|
+
key: "devops-bearerAuth",
|
|
29016
|
+
scheme: "bearer",
|
|
29017
|
+
type: "http"
|
|
29018
|
+
}],
|
|
29019
|
+
url: "/devops/v1/projects/{project}/test-suites",
|
|
29020
|
+
...options
|
|
29021
|
+
});
|
|
29022
|
+
var devopsTestSuitesGet = (options) => (options.client ?? client).get({
|
|
29023
|
+
security: [{
|
|
29024
|
+
key: "devops-bearerAuth",
|
|
29025
|
+
scheme: "bearer",
|
|
29026
|
+
type: "http"
|
|
29027
|
+
}],
|
|
29028
|
+
url: "/devops/v1/test-suites/{id}",
|
|
29029
|
+
...options
|
|
29030
|
+
});
|
|
29031
|
+
var devopsTestCasesList = (options) => (options.client ?? client).get({
|
|
29032
|
+
security: [{
|
|
29033
|
+
key: "devops-bearerAuth",
|
|
29034
|
+
scheme: "bearer",
|
|
29035
|
+
type: "http"
|
|
29036
|
+
}],
|
|
29037
|
+
url: "/devops/v1/projects/{project}/test-cases",
|
|
29038
|
+
...options
|
|
29039
|
+
});
|
|
29040
|
+
var devopsTestCasesGet = (options) => (options.client ?? client).get({
|
|
29041
|
+
security: [{
|
|
29042
|
+
key: "devops-bearerAuth",
|
|
29043
|
+
scheme: "bearer",
|
|
29044
|
+
type: "http"
|
|
29045
|
+
}],
|
|
29046
|
+
url: "/devops/v1/test-cases/{id}",
|
|
29047
|
+
...options
|
|
29048
|
+
});
|
|
29049
|
+
var devopsTestPlansList = (options) => (options.client ?? client).get({
|
|
29050
|
+
security: [{
|
|
29051
|
+
key: "devops-bearerAuth",
|
|
29052
|
+
scheme: "bearer",
|
|
29053
|
+
type: "http"
|
|
29054
|
+
}],
|
|
29055
|
+
url: "/devops/v1/projects/{project}/test-plans",
|
|
29056
|
+
...options
|
|
29057
|
+
});
|
|
29058
|
+
var devopsTestPlansCreate = (options) => (options.client ?? client).post({
|
|
29059
|
+
security: [{
|
|
29060
|
+
key: "devops-bearerAuth",
|
|
29061
|
+
scheme: "bearer",
|
|
29062
|
+
type: "http"
|
|
29063
|
+
}],
|
|
29064
|
+
url: "/devops/v1/projects/{project}/test-plans",
|
|
29065
|
+
...options,
|
|
29066
|
+
headers: {
|
|
29067
|
+
"Content-Type": "application/json",
|
|
29068
|
+
...options.headers
|
|
29069
|
+
}
|
|
29070
|
+
});
|
|
29071
|
+
var devopsTestPlansDelete = (options) => (options.client ?? client).delete({
|
|
29072
|
+
security: [{
|
|
29073
|
+
key: "devops-bearerAuth",
|
|
29074
|
+
scheme: "bearer",
|
|
29075
|
+
type: "http"
|
|
29076
|
+
}],
|
|
29077
|
+
url: "/devops/v1/test-plans/{id}",
|
|
29078
|
+
...options
|
|
29079
|
+
});
|
|
29080
|
+
var devopsTestPlansGet = (options) => (options.client ?? client).get({
|
|
29081
|
+
security: [{
|
|
29082
|
+
key: "devops-bearerAuth",
|
|
29083
|
+
scheme: "bearer",
|
|
29084
|
+
type: "http"
|
|
29085
|
+
}],
|
|
29086
|
+
url: "/devops/v1/test-plans/{id}",
|
|
29087
|
+
...options
|
|
29088
|
+
});
|
|
29089
|
+
var devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
|
|
29090
|
+
security: [{
|
|
29091
|
+
key: "devops-bearerAuth",
|
|
29092
|
+
scheme: "bearer",
|
|
29093
|
+
type: "http"
|
|
29094
|
+
}],
|
|
29095
|
+
url: "/devops/v1/test-plans/{id}",
|
|
29096
|
+
...options,
|
|
29097
|
+
headers: {
|
|
29098
|
+
"Content-Type": "application/json",
|
|
29099
|
+
...options.headers
|
|
29100
|
+
}
|
|
29101
|
+
});
|
|
29102
|
+
var devopsTestPlansPause = (options) => (options.client ?? client).post({
|
|
29103
|
+
security: [{
|
|
29104
|
+
key: "devops-bearerAuth",
|
|
29105
|
+
scheme: "bearer",
|
|
29106
|
+
type: "http"
|
|
29107
|
+
}],
|
|
29108
|
+
url: "/devops/v1/test-plans/{id}:pause",
|
|
29109
|
+
...options,
|
|
29110
|
+
headers: {
|
|
29111
|
+
"Content-Type": "application/json",
|
|
29112
|
+
...options.headers
|
|
29113
|
+
}
|
|
29114
|
+
});
|
|
29115
|
+
var devopsTestPlansResume = (options) => (options.client ?? client).post({
|
|
29116
|
+
security: [{
|
|
29117
|
+
key: "devops-bearerAuth",
|
|
29118
|
+
scheme: "bearer",
|
|
29119
|
+
type: "http"
|
|
29120
|
+
}],
|
|
29121
|
+
url: "/devops/v1/test-plans/{id}:resume",
|
|
29122
|
+
...options
|
|
29123
|
+
});
|
|
29124
|
+
var devopsTestRunsList = (options) => (options.client ?? client).get({
|
|
29125
|
+
security: [{
|
|
29126
|
+
key: "devops-bearerAuth",
|
|
29127
|
+
scheme: "bearer",
|
|
29128
|
+
type: "http"
|
|
29129
|
+
}],
|
|
29130
|
+
url: "/devops/v1/projects/{project}/test-runs",
|
|
29131
|
+
...options
|
|
29132
|
+
});
|
|
29133
|
+
var devopsTestRunsCreate = (options) => (options.client ?? client).post({
|
|
29134
|
+
security: [{
|
|
29135
|
+
key: "devops-bearerAuth",
|
|
29136
|
+
scheme: "bearer",
|
|
29137
|
+
type: "http"
|
|
29138
|
+
}],
|
|
29139
|
+
url: "/devops/v1/projects/{project}/test-runs",
|
|
29140
|
+
...options,
|
|
29141
|
+
headers: {
|
|
29142
|
+
"Content-Type": "application/json",
|
|
29143
|
+
...options.headers
|
|
29144
|
+
}
|
|
29145
|
+
});
|
|
29146
|
+
var devopsTestRunsGet = (options) => (options.client ?? client).get({
|
|
29147
|
+
security: [{
|
|
29148
|
+
key: "devops-bearerAuth",
|
|
29149
|
+
scheme: "bearer",
|
|
29150
|
+
type: "http"
|
|
29151
|
+
}],
|
|
29152
|
+
url: "/devops/v1/test-runs/{id}",
|
|
29153
|
+
...options
|
|
29154
|
+
});
|
|
29155
|
+
var devopsTestRunsCancel = (options) => (options.client ?? client).post({
|
|
29156
|
+
security: [{
|
|
29157
|
+
key: "devops-bearerAuth",
|
|
29158
|
+
scheme: "bearer",
|
|
29159
|
+
type: "http"
|
|
29160
|
+
}],
|
|
29161
|
+
url: "/devops/v1/test-runs/{id}:cancel",
|
|
29162
|
+
...options,
|
|
29163
|
+
headers: {
|
|
29164
|
+
"Content-Type": "application/json",
|
|
29165
|
+
...options.headers
|
|
29166
|
+
}
|
|
29167
|
+
});
|
|
29168
|
+
var devopsTestExecutionsList = (options) => (options.client ?? client).get({
|
|
29169
|
+
security: [{
|
|
29170
|
+
key: "devops-bearerAuth",
|
|
29171
|
+
scheme: "bearer",
|
|
29172
|
+
type: "http"
|
|
29173
|
+
}],
|
|
29174
|
+
url: "/devops/v1/test-runs/{run}/executions",
|
|
29175
|
+
...options
|
|
29176
|
+
});
|
|
29177
|
+
var devopsTestExecutionsGet = (options) => (options.client ?? client).get({
|
|
29178
|
+
security: [{
|
|
29179
|
+
key: "devops-bearerAuth",
|
|
29180
|
+
scheme: "bearer",
|
|
29181
|
+
type: "http"
|
|
29182
|
+
}],
|
|
29183
|
+
url: "/devops/v1/test-runs/{run}/executions/{case}",
|
|
29184
|
+
...options
|
|
29185
|
+
});
|
|
29186
|
+
var devopsTestReportsUpload = (options) => (options.client ?? client).post({
|
|
29187
|
+
security: [{
|
|
29188
|
+
key: "devops-bearerAuth",
|
|
29189
|
+
scheme: "bearer",
|
|
29190
|
+
type: "http"
|
|
29191
|
+
}],
|
|
29192
|
+
url: "/devops/v1/projects/{project}/test-reports",
|
|
29193
|
+
...options,
|
|
29194
|
+
headers: {
|
|
29195
|
+
"Content-Type": "application/json",
|
|
29196
|
+
...options.headers
|
|
29197
|
+
}
|
|
29198
|
+
});
|
|
27167
29199
|
var knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
27168
29200
|
security: [{
|
|
27169
29201
|
key: "knowledge-bearerAuth",
|
|
@@ -27703,6 +29735,217 @@ var mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).g
|
|
|
27703
29735
|
url: "/media/v1/libraries/{library_id}/understandings",
|
|
27704
29736
|
...options
|
|
27705
29737
|
});
|
|
29738
|
+
var mediaCreateGeneration = (options) => (options.client ?? client).post({
|
|
29739
|
+
security: [{
|
|
29740
|
+
key: "media-BearerAuth",
|
|
29741
|
+
scheme: "bearer",
|
|
29742
|
+
type: "http"
|
|
29743
|
+
}],
|
|
29744
|
+
url: "/media/v1/libraries/{library_id}/generations",
|
|
29745
|
+
...options,
|
|
29746
|
+
headers: {
|
|
29747
|
+
"Content-Type": "application/json",
|
|
29748
|
+
...options.headers
|
|
29749
|
+
}
|
|
29750
|
+
});
|
|
29751
|
+
var mediaListJobs = (options) => (options.client ?? client).get({
|
|
29752
|
+
security: [{
|
|
29753
|
+
key: "media-BearerAuth",
|
|
29754
|
+
scheme: "bearer",
|
|
29755
|
+
type: "http"
|
|
29756
|
+
}],
|
|
29757
|
+
url: "/media/v1/libraries/{library_id}/jobs",
|
|
29758
|
+
...options
|
|
29759
|
+
});
|
|
29760
|
+
var mediaCancelJob = (options) => (options.client ?? client).post({
|
|
29761
|
+
security: [{
|
|
29762
|
+
key: "media-BearerAuth",
|
|
29763
|
+
scheme: "bearer",
|
|
29764
|
+
type: "http"
|
|
29765
|
+
}],
|
|
29766
|
+
url: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
29767
|
+
...options
|
|
29768
|
+
});
|
|
29769
|
+
var mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
|
|
29770
|
+
security: [{
|
|
29771
|
+
key: "media-BearerAuth",
|
|
29772
|
+
scheme: "bearer",
|
|
29773
|
+
type: "http"
|
|
29774
|
+
}],
|
|
29775
|
+
url: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
|
|
29776
|
+
...options,
|
|
29777
|
+
headers: {
|
|
29778
|
+
"Content-Type": "application/json",
|
|
29779
|
+
...options.headers
|
|
29780
|
+
}
|
|
29781
|
+
});
|
|
29782
|
+
var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
29783
|
+
security: [{
|
|
29784
|
+
key: "media-BearerAuth",
|
|
29785
|
+
scheme: "bearer",
|
|
29786
|
+
type: "http"
|
|
29787
|
+
}],
|
|
29788
|
+
url: "/media/v1/generation/capabilities",
|
|
29789
|
+
...options
|
|
29790
|
+
});
|
|
29791
|
+
var ontologyListTypes = (options) => (options?.client ?? client).get({
|
|
29792
|
+
security: [{
|
|
29793
|
+
key: "ontology-bearerAuth",
|
|
29794
|
+
scheme: "bearer",
|
|
29795
|
+
type: "http"
|
|
29796
|
+
}],
|
|
29797
|
+
url: "/ontology/v1/types",
|
|
29798
|
+
...options
|
|
29799
|
+
});
|
|
29800
|
+
var ontologyRegisterType = (options) => (options.client ?? client).post({
|
|
29801
|
+
security: [{
|
|
29802
|
+
key: "ontology-bearerAuth",
|
|
29803
|
+
scheme: "bearer",
|
|
29804
|
+
type: "http"
|
|
29805
|
+
}],
|
|
29806
|
+
url: "/ontology/v1/types",
|
|
29807
|
+
...options,
|
|
29808
|
+
headers: {
|
|
29809
|
+
"Content-Type": "application/json",
|
|
29810
|
+
...options.headers
|
|
29811
|
+
}
|
|
29812
|
+
});
|
|
29813
|
+
var ontologyRetrieveType = (options) => (options.client ?? client).get({
|
|
29814
|
+
security: [{
|
|
29815
|
+
key: "ontology-bearerAuth",
|
|
29816
|
+
scheme: "bearer",
|
|
29817
|
+
type: "http"
|
|
29818
|
+
}],
|
|
29819
|
+
url: "/ontology/v1/types/{name}",
|
|
29820
|
+
...options
|
|
29821
|
+
});
|
|
29822
|
+
var ontologyListNodes = (options) => (options?.client ?? client).get({
|
|
29823
|
+
security: [{
|
|
29824
|
+
key: "ontology-bearerAuth",
|
|
29825
|
+
scheme: "bearer",
|
|
29826
|
+
type: "http"
|
|
29827
|
+
}],
|
|
29828
|
+
url: "/ontology/v1/nodes",
|
|
29829
|
+
...options
|
|
29830
|
+
});
|
|
29831
|
+
var ontologyCreateNode = (options) => (options.client ?? client).post({
|
|
29832
|
+
security: [{
|
|
29833
|
+
key: "ontology-bearerAuth",
|
|
29834
|
+
scheme: "bearer",
|
|
29835
|
+
type: "http"
|
|
29836
|
+
}],
|
|
29837
|
+
url: "/ontology/v1/nodes",
|
|
29838
|
+
...options,
|
|
29839
|
+
headers: {
|
|
29840
|
+
"Content-Type": "application/json",
|
|
29841
|
+
...options.headers
|
|
29842
|
+
}
|
|
29843
|
+
});
|
|
29844
|
+
var ontologyRetrieveNode = (options) => (options.client ?? client).get({
|
|
29845
|
+
security: [{
|
|
29846
|
+
key: "ontology-bearerAuth",
|
|
29847
|
+
scheme: "bearer",
|
|
29848
|
+
type: "http"
|
|
29849
|
+
}],
|
|
29850
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
29851
|
+
...options
|
|
29852
|
+
});
|
|
29853
|
+
var ontologyUpdateNode = (options) => (options.client ?? client).patch({
|
|
29854
|
+
security: [{
|
|
29855
|
+
key: "ontology-bearerAuth",
|
|
29856
|
+
scheme: "bearer",
|
|
29857
|
+
type: "http"
|
|
29858
|
+
}],
|
|
29859
|
+
url: "/ontology/v1/nodes/{node_id}",
|
|
29860
|
+
...options,
|
|
29861
|
+
headers: {
|
|
29862
|
+
"Content-Type": "application/json",
|
|
29863
|
+
...options.headers
|
|
29864
|
+
}
|
|
29865
|
+
});
|
|
29866
|
+
var ontologyMergeNode = (options) => (options.client ?? client).post({
|
|
29867
|
+
security: [{
|
|
29868
|
+
key: "ontology-bearerAuth",
|
|
29869
|
+
scheme: "bearer",
|
|
29870
|
+
type: "http"
|
|
29871
|
+
}],
|
|
29872
|
+
url: "/ontology/v1/nodes/{node_id}/merge",
|
|
29873
|
+
...options,
|
|
29874
|
+
headers: {
|
|
29875
|
+
"Content-Type": "application/json",
|
|
29876
|
+
...options.headers
|
|
29877
|
+
}
|
|
29878
|
+
});
|
|
29879
|
+
var ontologyListRelations = (options) => (options?.client ?? client).get({
|
|
29880
|
+
security: [{
|
|
29881
|
+
key: "ontology-bearerAuth",
|
|
29882
|
+
scheme: "bearer",
|
|
29883
|
+
type: "http"
|
|
29884
|
+
}],
|
|
29885
|
+
url: "/ontology/v1/relations",
|
|
29886
|
+
...options
|
|
29887
|
+
});
|
|
29888
|
+
var ontologyCreateRelation = (options) => (options.client ?? client).post({
|
|
29889
|
+
security: [{
|
|
29890
|
+
key: "ontology-bearerAuth",
|
|
29891
|
+
scheme: "bearer",
|
|
29892
|
+
type: "http"
|
|
29893
|
+
}],
|
|
29894
|
+
url: "/ontology/v1/relations",
|
|
29895
|
+
...options,
|
|
29896
|
+
headers: {
|
|
29897
|
+
"Content-Type": "application/json",
|
|
29898
|
+
...options.headers
|
|
29899
|
+
}
|
|
29900
|
+
});
|
|
29901
|
+
var ontologyRetrieveRelation = (options) => (options.client ?? client).get({
|
|
29902
|
+
security: [{
|
|
29903
|
+
key: "ontology-bearerAuth",
|
|
29904
|
+
scheme: "bearer",
|
|
29905
|
+
type: "http"
|
|
29906
|
+
}],
|
|
29907
|
+
url: "/ontology/v1/relations/{relation_id}",
|
|
29908
|
+
...options
|
|
29909
|
+
});
|
|
29910
|
+
var ontologyInvalidateRelation = (options) => (options.client ?? client).post({
|
|
29911
|
+
security: [{
|
|
29912
|
+
key: "ontology-bearerAuth",
|
|
29913
|
+
scheme: "bearer",
|
|
29914
|
+
type: "http"
|
|
29915
|
+
}],
|
|
29916
|
+
url: "/ontology/v1/relations/{relation_id}/invalidate",
|
|
29917
|
+
...options,
|
|
29918
|
+
headers: {
|
|
29919
|
+
"Content-Type": "application/json",
|
|
29920
|
+
...options.headers
|
|
29921
|
+
}
|
|
29922
|
+
});
|
|
29923
|
+
var ontologyApplyChangeset = (options) => (options.client ?? client).post({
|
|
29924
|
+
security: [{
|
|
29925
|
+
key: "ontology-bearerAuth",
|
|
29926
|
+
scheme: "bearer",
|
|
29927
|
+
type: "http"
|
|
29928
|
+
}],
|
|
29929
|
+
url: "/ontology/v1/changesets",
|
|
29930
|
+
...options,
|
|
29931
|
+
headers: {
|
|
29932
|
+
"Content-Type": "application/json",
|
|
29933
|
+
...options.headers
|
|
29934
|
+
}
|
|
29935
|
+
});
|
|
29936
|
+
var ontologySearch = (options) => (options.client ?? client).post({
|
|
29937
|
+
security: [{
|
|
29938
|
+
key: "ontology-bearerAuth",
|
|
29939
|
+
scheme: "bearer",
|
|
29940
|
+
type: "http"
|
|
29941
|
+
}],
|
|
29942
|
+
url: "/ontology/v1/search",
|
|
29943
|
+
...options,
|
|
29944
|
+
headers: {
|
|
29945
|
+
"Content-Type": "application/json",
|
|
29946
|
+
...options.headers
|
|
29947
|
+
}
|
|
29948
|
+
});
|
|
27706
29949
|
var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
27707
29950
|
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
27708
29951
|
security: [
|
|
@@ -29580,6 +31823,9 @@ function createAgent(transport) {
|
|
|
29580
31823
|
create: bind(transport, computersCreate),
|
|
29581
31824
|
delete: bind(transport, computersDelete),
|
|
29582
31825
|
files: {
|
|
31826
|
+
convert: {
|
|
31827
|
+
create: bind(transport, computersFilesConvert)
|
|
31828
|
+
},
|
|
29583
31829
|
list: bind(transport, computersFilesList),
|
|
29584
31830
|
retrieveContent: bind(transport, computersFilesContent)
|
|
29585
31831
|
},
|
|
@@ -30027,6 +32273,9 @@ function createCut(transport) {
|
|
|
30027
32273
|
media: {
|
|
30028
32274
|
import: bind(transport, cutImportMedia)
|
|
30029
32275
|
},
|
|
32276
|
+
renders: {
|
|
32277
|
+
create: bind(transport, cutCreateRender)
|
|
32278
|
+
},
|
|
30030
32279
|
retrieve: bind(transport, cutRetrieveProject),
|
|
30031
32280
|
retrieveState: bind(transport, cutRetrieveState),
|
|
30032
32281
|
retrieveTimeline: bind(transport, cutRetrieveTimeline),
|
|
@@ -30037,6 +32286,9 @@ function createCut(transport) {
|
|
|
30037
32286
|
list: bind(transport, cutListVersions)
|
|
30038
32287
|
}
|
|
30039
32288
|
},
|
|
32289
|
+
renders: {
|
|
32290
|
+
retrieve: bind(transport, cutRetrieveRender)
|
|
32291
|
+
},
|
|
30040
32292
|
versions: {
|
|
30041
32293
|
restore: bind(transport, cutRestoreVersion)
|
|
30042
32294
|
}
|
|
@@ -30079,6 +32331,51 @@ function createDatabase(transport) {
|
|
|
30079
32331
|
}
|
|
30080
32332
|
};
|
|
30081
32333
|
}
|
|
32334
|
+
function createDevops(transport) {
|
|
32335
|
+
return {
|
|
32336
|
+
projects: {
|
|
32337
|
+
retrieveTestCatalog: bind(transport, devopsTestCatalogGet),
|
|
32338
|
+
testCases: {
|
|
32339
|
+
list: bind(transport, devopsTestCasesList)
|
|
32340
|
+
},
|
|
32341
|
+
testPlans: {
|
|
32342
|
+
create: bind(transport, devopsTestPlansCreate),
|
|
32343
|
+
list: bind(transport, devopsTestPlansList)
|
|
32344
|
+
},
|
|
32345
|
+
testReports: {
|
|
32346
|
+
create: bind(transport, devopsTestReportsUpload)
|
|
32347
|
+
},
|
|
32348
|
+
testRuns: {
|
|
32349
|
+
create: bind(transport, devopsTestRunsCreate),
|
|
32350
|
+
list: bind(transport, devopsTestRunsList)
|
|
32351
|
+
},
|
|
32352
|
+
testSuites: {
|
|
32353
|
+
list: bind(transport, devopsTestSuitesList)
|
|
32354
|
+
}
|
|
32355
|
+
},
|
|
32356
|
+
testCases: {
|
|
32357
|
+
retrieve: bind(transport, devopsTestCasesGet)
|
|
32358
|
+
},
|
|
32359
|
+
testPlans: {
|
|
32360
|
+
delete: bind(transport, devopsTestPlansDelete),
|
|
32361
|
+
pause: bind(transport, devopsTestPlansPause),
|
|
32362
|
+
resume: bind(transport, devopsTestPlansResume),
|
|
32363
|
+
retrieve: bind(transport, devopsTestPlansGet),
|
|
32364
|
+
update: bind(transport, devopsTestPlansUpdate)
|
|
32365
|
+
},
|
|
32366
|
+
testRuns: {
|
|
32367
|
+
cancel: bind(transport, devopsTestRunsCancel),
|
|
32368
|
+
executions: {
|
|
32369
|
+
list: bind(transport, devopsTestExecutionsList),
|
|
32370
|
+
retrieve: bind(transport, devopsTestExecutionsGet)
|
|
32371
|
+
},
|
|
32372
|
+
retrieve: bind(transport, devopsTestRunsGet)
|
|
32373
|
+
},
|
|
32374
|
+
testSuites: {
|
|
32375
|
+
retrieve: bind(transport, devopsTestSuitesGet)
|
|
32376
|
+
}
|
|
32377
|
+
};
|
|
32378
|
+
}
|
|
30082
32379
|
function createFile(transport) {
|
|
30083
32380
|
return {
|
|
30084
32381
|
files: {
|
|
@@ -30101,7 +32398,8 @@ function createFile(transport) {
|
|
|
30101
32398
|
createSigned: bind(transport, fileCreateSignedUpload),
|
|
30102
32399
|
parts: {
|
|
30103
32400
|
create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
|
|
30104
|
-
}
|
|
32401
|
+
},
|
|
32402
|
+
retrieve: bind(transport, fileRetrieveUpload)
|
|
30105
32403
|
}
|
|
30106
32404
|
};
|
|
30107
32405
|
}
|
|
@@ -30153,6 +32451,11 @@ function createKnowledge(transport) {
|
|
|
30153
32451
|
}
|
|
30154
32452
|
function createMedia(transport) {
|
|
30155
32453
|
return {
|
|
32454
|
+
generation: {
|
|
32455
|
+
capabilities: {
|
|
32456
|
+
list: bind(transport, mediaGetGenerationCapabilities)
|
|
32457
|
+
}
|
|
32458
|
+
},
|
|
30156
32459
|
libraries: {
|
|
30157
32460
|
assets: {
|
|
30158
32461
|
batch: bind(transport, mediaBatchAssets),
|
|
@@ -30189,7 +32492,17 @@ function createMedia(transport) {
|
|
|
30189
32492
|
folders: {
|
|
30190
32493
|
list: bind(transport, mediaListFolders)
|
|
30191
32494
|
},
|
|
32495
|
+
generations: {
|
|
32496
|
+
create: bind(transport, mediaCreateGeneration)
|
|
32497
|
+
},
|
|
30192
32498
|
jobs: {
|
|
32499
|
+
cancel: bind(transport, mediaCancelJob),
|
|
32500
|
+
list: bindPage(transport, mediaListJobs),
|
|
32501
|
+
outputs: {
|
|
32502
|
+
save: {
|
|
32503
|
+
create: bind(transport, mediaSaveGenerationOutput)
|
|
32504
|
+
}
|
|
32505
|
+
},
|
|
30193
32506
|
retrieve: bind(transport, mediaGetJob)
|
|
30194
32507
|
},
|
|
30195
32508
|
list: bindPage(transport, mediaListLibraries),
|
|
@@ -30314,6 +32627,38 @@ function createModel(transport) {
|
|
|
30314
32627
|
}
|
|
30315
32628
|
};
|
|
30316
32629
|
}
|
|
32630
|
+
function createOntology(transport) {
|
|
32631
|
+
return {
|
|
32632
|
+
changesets: {
|
|
32633
|
+
create: bind(transport, ontologyApplyChangeset)
|
|
32634
|
+
},
|
|
32635
|
+
nodes: {
|
|
32636
|
+
create: bind(transport, ontologyCreateNode),
|
|
32637
|
+
list: bindPage(transport, ontologyListNodes),
|
|
32638
|
+
merge: {
|
|
32639
|
+
create: bind(transport, ontologyMergeNode)
|
|
32640
|
+
},
|
|
32641
|
+
retrieve: bind(transport, ontologyRetrieveNode),
|
|
32642
|
+
update: bind(transport, ontologyUpdateNode)
|
|
32643
|
+
},
|
|
32644
|
+
relations: {
|
|
32645
|
+
create: bind(transport, ontologyCreateRelation),
|
|
32646
|
+
invalidate: {
|
|
32647
|
+
create: bind(transport, ontologyInvalidateRelation)
|
|
32648
|
+
},
|
|
32649
|
+
list: bindPage(transport, ontologyListRelations),
|
|
32650
|
+
retrieve: bind(transport, ontologyRetrieveRelation)
|
|
32651
|
+
},
|
|
32652
|
+
search: {
|
|
32653
|
+
create: bind(transport, ontologySearch)
|
|
32654
|
+
},
|
|
32655
|
+
types: {
|
|
32656
|
+
create: bind(transport, ontologyRegisterType),
|
|
32657
|
+
list: bind(transport, ontologyListTypes),
|
|
32658
|
+
retrieve: bind(transport, ontologyRetrieveType)
|
|
32659
|
+
}
|
|
32660
|
+
};
|
|
32661
|
+
}
|
|
30317
32662
|
function createOrganization(transport) {
|
|
30318
32663
|
return {
|
|
30319
32664
|
charges: {
|
|
@@ -30575,11 +32920,13 @@ var resourceFactories = {
|
|
|
30575
32920
|
crm: createCrm,
|
|
30576
32921
|
cut: createCut,
|
|
30577
32922
|
database: createDatabase,
|
|
32923
|
+
devops: createDevops,
|
|
30578
32924
|
file: createFile,
|
|
30579
32925
|
knowledge: createKnowledge,
|
|
30580
32926
|
media: createMedia,
|
|
30581
32927
|
meta: createMeta,
|
|
30582
32928
|
model: createModel,
|
|
32929
|
+
ontology: createOntology,
|
|
30583
32930
|
organization: createOrganization,
|
|
30584
32931
|
sandbox: createSandbox,
|
|
30585
32932
|
search: createSearch,
|
|
@@ -31653,6 +34000,26 @@ async function prepareMultipart(op, opts) {
|
|
|
31653
34000
|
opts.body = body;
|
|
31654
34001
|
}
|
|
31655
34002
|
|
|
34003
|
+
// src/core/pagination.ts
|
|
34004
|
+
var PAGE_TOKENS = /^(page_?token|next_?page_?token)$/i;
|
|
34005
|
+
function pageTokenField(op) {
|
|
34006
|
+
return op.query.find((field) => PAGE_TOKENS.test(field.name));
|
|
34007
|
+
}
|
|
34008
|
+
function nextPageToken(result) {
|
|
34009
|
+
const value = result;
|
|
34010
|
+
const token = value?.next_page_token ?? value?.nextPageToken ?? value?.next_cursor;
|
|
34011
|
+
return typeof token === "string" && token ? token : undefined;
|
|
34012
|
+
}
|
|
34013
|
+
function pageOf(result) {
|
|
34014
|
+
const value = result;
|
|
34015
|
+
const arrays = value && typeof value === "object" ? Object.values(value).filter(Array.isArray) : [];
|
|
34016
|
+
const data = Array.isArray(value?.data) ? value.data : Array.isArray(value?.items) ? value.items : arrays.length === 1 ? arrays[0] : undefined;
|
|
34017
|
+
if (!Array.isArray(data))
|
|
34018
|
+
return;
|
|
34019
|
+
const token = nextPageToken(result);
|
|
34020
|
+
return { items: data, ...token ? { token } : {} };
|
|
34021
|
+
}
|
|
34022
|
+
|
|
31656
34023
|
// src/core/bind-args.ts
|
|
31657
34024
|
var globalOptions = [
|
|
31658
34025
|
{ name: "org", type: "string" },
|
|
@@ -31868,7 +34235,7 @@ function bindArgs(parsed, op, data) {
|
|
|
31868
34235
|
(opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
|
|
31869
34236
|
}
|
|
31870
34237
|
}
|
|
31871
|
-
if (globals.all && !op.pagination)
|
|
34238
|
+
if (globals.all && !op.pagination && !pageTokenField(op))
|
|
31872
34239
|
throw new UsageError("--all requires a paginated operation");
|
|
31873
34240
|
for (const p of op.pathParams)
|
|
31874
34241
|
if (p !== target && opts.path?.[p.sdkName] === undefined)
|
|
@@ -31894,8 +34261,8 @@ function bindArgs(parsed, op, data) {
|
|
|
31894
34261
|
}
|
|
31895
34262
|
|
|
31896
34263
|
// src/core/help.ts
|
|
31897
|
-
function describeOption(s) {
|
|
31898
|
-
return `--${s.name}${s.type === "boolean" ? " [true|false]" : ` <${s.type}>`}${s.repeated ? " (repeatable)" : ""}${
|
|
34264
|
+
function describeOption(s, required = s.required) {
|
|
34265
|
+
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, " ")}` : ""}`;
|
|
31899
34266
|
}
|
|
31900
34267
|
function example(command) {
|
|
31901
34268
|
const target = targetParam(command.op);
|
|
@@ -31911,18 +34278,22 @@ function example(command) {
|
|
|
31911
34278
|
args.push("--yes");
|
|
31912
34279
|
return args.join(" ");
|
|
31913
34280
|
}
|
|
34281
|
+
function fieldRequired(op, field, location) {
|
|
34282
|
+
return Boolean(field.required) && (location === "path" || location === "query" || Boolean(op.body?.required));
|
|
34283
|
+
}
|
|
31914
34284
|
function help(commands, prefix, command) {
|
|
31915
34285
|
if (command) {
|
|
31916
34286
|
const target = targetParam(command.op);
|
|
34287
|
+
const parents = operationOptions(command.op).filter((s) => s.location === "path" && s.required).map((s) => ` --${s.name} <${s.field?.name ?? s.sdkName}>`).join("");
|
|
31917
34288
|
return [
|
|
31918
|
-
`praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
34289
|
+
`praxis ${command.words.join(" ")}${parents}${target ? ` <${target.sdkName}>` : ""} [options]`,
|
|
31919
34290
|
`SDK: ${command.op.resource}.${command.alias ?? command.op.method}`,
|
|
31920
34291
|
`${command.op.http} ${command.op.path}`,
|
|
31921
34292
|
...target ? [`Position: <${target.sdkName}>${target.type ? ` <${target.type}>` : ""} (required target ID)`] : [],
|
|
31922
34293
|
"",
|
|
31923
34294
|
"Options:",
|
|
31924
34295
|
...target?.description ? [` <${target.sdkName}> — ${target.description.replace(/\s+/g, " ")}`] : [],
|
|
31925
|
-
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s)}`),
|
|
34296
|
+
...[...operationOptions(command.op), ...bodyDataOption(command.op), ...globalOptions].map((s) => ` ${describeOption(s, s.required && fieldRequired(command.op, s, s.location ?? "query"))}`),
|
|
31926
34297
|
...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" : ""})`) ?? [],
|
|
31927
34298
|
" -h is an alias of --help",
|
|
31928
34299
|
"PRAXIS_ENV=develop|production (default: develop); no --env option.",
|
|
@@ -31990,6 +34361,7 @@ var workflows = [
|
|
|
31990
34361
|
{ words: ["app", "create"], usage: "app create <name> [--dir <path>] [--template <dir>] [--no-install]", summary: "Create an application project from the standard template and install its dependencies.", example: "praxis app create my-app" },
|
|
31991
34362
|
{ words: ["app", "deploy"], usage: "app deploy [--dir <path>] [--no-build]", summary: "Build the project, publish it, create declared secrets, run the health check and print the URL.", example: "praxis app deploy --dir ./my-app" },
|
|
31992
34363
|
{ words: ["app", "rollback"], usage: "app rollback [--dir <path>] [--to <version_id>]", summary: "Deploy the previous version again (or --to a given version) and wait until it is active.", example: "praxis app rollback --to <version_id>" },
|
|
34364
|
+
{ words: ["devops", "test", "run"], usage: "devops test run --remote [--project <dvp_…>] [--no-wait] [--repeat <n>] [--select <kind:value>]", summary: "Run the DevOps test selection for the pushed HEAD on the Praxis cloud, wait for the verdict and list the failed cases.", example: "praxis devops test run --remote --select smoke" },
|
|
31993
34365
|
{ words: ["skill"], usage: "skill [--install <dir>]", summary: "Print the AI skill, or write <dir>/praxis-cli/SKILL.md." }
|
|
31994
34366
|
];
|
|
31995
34367
|
var workflowNouns = [...new Set(workflows.filter((w) => w.words.length > 1).map((w) => w.words[0]))];
|
|
@@ -32220,21 +34592,90 @@ function toStored(tokens, now, previous) {
|
|
|
32220
34592
|
return { ...previous?.organization_id ? { organization_id: previous.organization_id } : {}, access_token: tokens.access_token, ...refresh ? { refresh_token: refresh } : {}, expires_at: now + (tokens.expires_in ?? 900) * 1000 };
|
|
32221
34593
|
}
|
|
32222
34594
|
var REFRESH_SKEW_MS = 30000;
|
|
32223
|
-
|
|
32224
|
-
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
34595
|
+
var ATTEMPT_TIMEOUT_MS = 8000;
|
|
34596
|
+
var RETRY_DELAYS_MS = [1000, 3000];
|
|
34597
|
+
var RETRY_DEADLINE_MS = 20000;
|
|
34598
|
+
var REFRESH_UNKNOWN_SAFE_MS = 25000;
|
|
34599
|
+
var defaultSleep = (ms, signal) => new Promise((resolve) => {
|
|
34600
|
+
if (signal?.aborted) {
|
|
34601
|
+
resolve();
|
|
34602
|
+
return;
|
|
34603
|
+
}
|
|
34604
|
+
const timer = setTimeout(finish, ms);
|
|
34605
|
+
function finish() {
|
|
34606
|
+
clearTimeout(timer);
|
|
34607
|
+
signal?.removeEventListener("abort", finish);
|
|
34608
|
+
resolve();
|
|
34609
|
+
}
|
|
34610
|
+
signal?.addEventListener("abort", finish, { once: true });
|
|
34611
|
+
});
|
|
34612
|
+
var defaultSchedule = (ms, fire) => {
|
|
34613
|
+
const timer = setTimeout(fire, ms);
|
|
34614
|
+
return () => clearTimeout(timer);
|
|
34615
|
+
};
|
|
34616
|
+
var TRANSIENT_STATUSES = new Set([408, 425, 429]);
|
|
34617
|
+
async function attemptRefresh(stored, accountUrl, fetchImpl, now, schedule) {
|
|
34618
|
+
const controller = new AbortController;
|
|
34619
|
+
let timedOut = false;
|
|
34620
|
+
const cancel = schedule(ATTEMPT_TIMEOUT_MS, () => {
|
|
34621
|
+
timedOut = true;
|
|
34622
|
+
controller.abort();
|
|
32230
34623
|
});
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
34624
|
+
let response;
|
|
34625
|
+
try {
|
|
34626
|
+
response = await fetchImpl(`${accountUrl}/api/auth/oauth2/token`, {
|
|
34627
|
+
method: "POST",
|
|
34628
|
+
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
34629
|
+
body: new URLSearchParams({ grant_type: "refresh_token", refresh_token: stored.refresh_token, client_id: CLIENT_ID }).toString(),
|
|
34630
|
+
signal: controller.signal
|
|
34631
|
+
});
|
|
34632
|
+
} catch (error2) {
|
|
34633
|
+
const name = error2?.name;
|
|
34634
|
+
return { kind: "transient", reason: timedOut || name === "AbortError" || name === "TimeoutError" ? "timeout" : "network" };
|
|
34635
|
+
} finally {
|
|
34636
|
+
cancel();
|
|
34637
|
+
}
|
|
34638
|
+
let body;
|
|
34639
|
+
try {
|
|
34640
|
+
body = await response.json();
|
|
34641
|
+
} catch {
|
|
34642
|
+
return { kind: "transient", reason: response.ok ? "unparseable" : `http ${response.status}` };
|
|
34643
|
+
}
|
|
34644
|
+
const error = body.error;
|
|
34645
|
+
if (response.ok) {
|
|
34646
|
+
if (typeof body.access_token !== "string")
|
|
34647
|
+
return { kind: "transient", reason: "unparseable" };
|
|
34648
|
+
return { kind: "ok", tokens: toStored(body, now, stored) };
|
|
34649
|
+
}
|
|
34650
|
+
if (response.status === 400 && error === "invalid_grant")
|
|
34651
|
+
return { kind: "rejected" };
|
|
34652
|
+
if (response.status === 401)
|
|
34653
|
+
return { kind: "rejected" };
|
|
34654
|
+
if (response.status >= 500 || TRANSIENT_STATUSES.has(response.status))
|
|
34655
|
+
return { kind: "transient", reason: `http ${response.status}` };
|
|
34656
|
+
return { kind: "rejected" };
|
|
34657
|
+
}
|
|
34658
|
+
async function refreshWithRetry(stored, accountUrl, fetchImpl, now, sleep2, schedule) {
|
|
34659
|
+
const startedAt = now();
|
|
34660
|
+
let outcome = { kind: "transient", reason: "no attempt made" };
|
|
34661
|
+
for (let attempt = 0;attempt <= RETRY_DELAYS_MS.length; attempt += 1) {
|
|
34662
|
+
if (attempt > 0) {
|
|
34663
|
+
if (now() + RETRY_DELAYS_MS[attempt - 1] - startedAt > RETRY_DEADLINE_MS)
|
|
34664
|
+
break;
|
|
34665
|
+
await sleep2(RETRY_DELAYS_MS[attempt - 1]);
|
|
34666
|
+
}
|
|
34667
|
+
if (now() - startedAt > RETRY_DEADLINE_MS)
|
|
34668
|
+
break;
|
|
34669
|
+
outcome = await attemptRefresh(stored, accountUrl, fetchImpl, now(), schedule);
|
|
34670
|
+
if (outcome.kind !== "transient")
|
|
34671
|
+
return outcome;
|
|
34672
|
+
}
|
|
34673
|
+
return outcome;
|
|
32235
34674
|
}
|
|
32236
34675
|
async function currentAccessToken(options) {
|
|
32237
34676
|
const now = options.now ?? Date.now;
|
|
34677
|
+
const sleep2 = options.sleep ?? defaultSleep;
|
|
34678
|
+
const schedule = options.schedule ?? defaultSchedule;
|
|
32238
34679
|
const path = options.path ?? tokenPath(options.env);
|
|
32239
34680
|
const fresh = (t) => t !== null && t.expires_at - REFRESH_SKEW_MS > now();
|
|
32240
34681
|
const store = options.store ?? createTokenStore(options.env, path, options.secretStore);
|
|
@@ -32244,17 +34685,41 @@ async function currentAccessToken(options) {
|
|
|
32244
34685
|
return null;
|
|
32245
34686
|
if (fresh(current))
|
|
32246
34687
|
return current.access_token;
|
|
32247
|
-
const
|
|
32248
|
-
if (
|
|
34688
|
+
const unknownSince = current.rotation_unknown_since;
|
|
34689
|
+
if (unknownSince !== undefined && now() - unknownSince >= REFRESH_UNKNOWN_SAFE_MS) {
|
|
34690
|
+
await session.delete();
|
|
32249
34691
|
return null;
|
|
32250
|
-
|
|
32251
|
-
|
|
34692
|
+
}
|
|
34693
|
+
const firstAttempt = now();
|
|
34694
|
+
await session.save({ ...current, rotation_unknown_since: unknownSince ?? firstAttempt });
|
|
34695
|
+
const outcome = await refreshWithRetry(current, options.accountUrl, options.fetch, () => now(), sleep2, schedule);
|
|
34696
|
+
switch (outcome.kind) {
|
|
34697
|
+
case "ok":
|
|
34698
|
+
await session.save(outcome.tokens);
|
|
34699
|
+
return outcome.tokens.access_token;
|
|
34700
|
+
case "rejected":
|
|
34701
|
+
await session.delete();
|
|
34702
|
+
return null;
|
|
34703
|
+
case "transient":
|
|
34704
|
+
throw new PraxisError({ code: "AUTH_REFRESH_UNAVAILABLE", message: `The token service is temporarily unavailable (${outcome.reason}); the login is kept, retry shortly.` });
|
|
34705
|
+
}
|
|
32252
34706
|
});
|
|
32253
34707
|
}
|
|
32254
|
-
var
|
|
32255
|
-
|
|
34708
|
+
var REFRESH_MAX_HOLD_MS = RETRY_DEADLINE_MS + ATTEMPT_TIMEOUT_MS;
|
|
34709
|
+
var LOCK_STALE_MS = REFRESH_MAX_HOLD_MS + 1e4;
|
|
34710
|
+
function isLockStale(ageMs, waitedMs) {
|
|
34711
|
+
return ageMs > LOCK_STALE_MS || waitedMs > LOCK_STALE_MS;
|
|
34712
|
+
}
|
|
34713
|
+
var fileLockAge = (lockPath) => Date.now() - statSync(lockPath).mtimeMs;
|
|
34714
|
+
async function withLock(lockPath, run, ports = {}) {
|
|
34715
|
+
const now = ports.now ?? Date.now;
|
|
34716
|
+
const wait = ports.wait ?? ((ms) => new Promise((resolve) => {
|
|
34717
|
+
setTimeout(resolve, ms);
|
|
34718
|
+
}));
|
|
34719
|
+
const lockAge = ports.lockAge ?? fileLockAge;
|
|
32256
34720
|
mkdirSync(join(lockPath, ".."), { recursive: true, mode: 448 });
|
|
32257
|
-
|
|
34721
|
+
const startedAt = now();
|
|
34722
|
+
for (;; ) {
|
|
32258
34723
|
try {
|
|
32259
34724
|
closeSync(openSync(lockPath, "wx", 384));
|
|
32260
34725
|
break;
|
|
@@ -32263,15 +34728,15 @@ async function withLock(lockPath, run) {
|
|
|
32263
34728
|
throw error;
|
|
32264
34729
|
let age = 0;
|
|
32265
34730
|
try {
|
|
32266
|
-
age =
|
|
34731
|
+
age = lockAge(lockPath);
|
|
32267
34732
|
} catch {
|
|
32268
34733
|
continue;
|
|
32269
34734
|
}
|
|
32270
|
-
if (age
|
|
34735
|
+
if (isLockStale(age, now() - startedAt)) {
|
|
32271
34736
|
rmSync(lockPath, { force: true });
|
|
32272
34737
|
continue;
|
|
32273
34738
|
}
|
|
32274
|
-
await
|
|
34739
|
+
await wait(50);
|
|
32275
34740
|
}
|
|
32276
34741
|
}
|
|
32277
34742
|
try {
|
|
@@ -32337,7 +34802,7 @@ function credentials(config, vars, ports) {
|
|
|
32337
34802
|
if (stored.refresh_token)
|
|
32338
34803
|
remember(stored.refresh_token);
|
|
32339
34804
|
}
|
|
32340
|
-
const opaque = await currentAccessToken({ env: config.env, accountUrl: config.accountUrl, path, store, now: ports.now, fetch: (url, init) => ports.fetch(url, { ...init,
|
|
34805
|
+
const opaque = await currentAccessToken({ env: config.env, accountUrl: config.accountUrl, path, store, now: ports.now, fetch: (url, init) => ports.fetch(url, { ...init, redirect: "error" }) });
|
|
32341
34806
|
if (!opaque)
|
|
32342
34807
|
throw new PraxisError({ code: "NOT_LOGGED_IN", message: "Not logged in or login has expired." });
|
|
32343
34808
|
remember(opaque);
|
|
@@ -32446,7 +34911,18 @@ function skillDocument(commands) {
|
|
|
32446
34911
|
"## Account and CLI",
|
|
32447
34912
|
"",
|
|
32448
34913
|
...workflows.map((w) => `praxis ${w.usage} — ${w.summary.replace("Print the AI skill, or write", "Print this skill; use --install <dir> to write")}`),
|
|
32449
|
-
"praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)"
|
|
34914
|
+
"praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)",
|
|
34915
|
+
"",
|
|
34916
|
+
"## devops test run (workflow)",
|
|
34917
|
+
"",
|
|
34918
|
+
"Run the project's tests at the commit HEAD is on, on the Praxis cloud executor, and wait for the verdict:",
|
|
34919
|
+
"",
|
|
34920
|
+
"- Only the pushed commit is tested. HEAD must be on a remote branch (`git push` first); this command never pushes for you. Uncommitted changes are a warning only — the working tree is not what runs.",
|
|
34921
|
+
"- The project comes from `--project dvp_…`, or from `devops.project` in the current directory's praxis.jsonc. Neither present is a usage error, exit code 2.",
|
|
34922
|
+
"- `--select` narrows the run: `tag:<tag>` (a bare word reads as a tag), `package:<path>`, `suite:<path>`, `file:<path>`. `--repeat N` runs each selected case N times (a flake then shows up as flaky, not as a failure).",
|
|
34923
|
+
"- The run waits by default and polls every 5s; `--no-wait` returns as soon as the run exists, with `result` still `pending`.",
|
|
34924
|
+
"- Exit code 0 means the verdict passed (or is still pending); 1 means failed, errored, cancelled or timed out — the failed cases are listed, up to 20, with the run URL for the rest; 2 is a usage error.",
|
|
34925
|
+
"- The run URL is on the Console of the environment the CLI talks to; the run id is also on stdout with `--json`."
|
|
32450
34926
|
];
|
|
32451
34927
|
let domain;
|
|
32452
34928
|
for (const command of commands) {
|
|
@@ -32992,6 +35468,191 @@ async function appRollback(args, client2, ports) {
|
|
|
32992
35468
|
ports.emit({ kind: "object", data: { url: worker.subdomain?.url ?? null, worker_id: worker.id, from_version: from, to_version: to, deployment_id: done.id } });
|
|
32993
35469
|
}
|
|
32994
35470
|
|
|
35471
|
+
// src/commands/devops.ts
|
|
35472
|
+
import { join as join4 } from "node:path";
|
|
35473
|
+
|
|
35474
|
+
// src/devops/pure.ts
|
|
35475
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
35476
|
+
var PROJECT_ID = /^dvp_[a-z0-9]+$/;
|
|
35477
|
+
var POLL_MS = 5000;
|
|
35478
|
+
var FAILURE_LIMIT = 20;
|
|
35479
|
+
var hint = 'Pass --project dvp_…, or add "devops": { "project": "dvp_…" } to praxis.jsonc in the current directory.';
|
|
35480
|
+
function checkProject(value, hintText = hint) {
|
|
35481
|
+
if (typeof value !== "string" || !value.trim())
|
|
35482
|
+
throw new UsageError("A DevOps project id must be a non-empty string", hintText);
|
|
35483
|
+
if (!PROJECT_ID.test(value.trim()))
|
|
35484
|
+
throw new UsageError(`Not a DevOps project id: ${value}`, "A project id starts with dvp_ and comes from the project list. " + hintText);
|
|
35485
|
+
return value.trim();
|
|
35486
|
+
}
|
|
35487
|
+
function parseDevopsProject(value) {
|
|
35488
|
+
if (value === null || value === undefined || typeof value !== "object" || Array.isArray(value))
|
|
35489
|
+
return;
|
|
35490
|
+
const devops = value.devops;
|
|
35491
|
+
if (devops === undefined)
|
|
35492
|
+
return;
|
|
35493
|
+
if (devops === null || typeof devops !== "object" || Array.isArray(devops))
|
|
35494
|
+
throw new UsageError("praxis.jsonc devops must be an object", 'Write {"devops":{"project":"dvp_…"}}. ' + hint);
|
|
35495
|
+
const project = devops.project;
|
|
35496
|
+
if (project === undefined)
|
|
35497
|
+
return;
|
|
35498
|
+
return checkProject(project);
|
|
35499
|
+
}
|
|
35500
|
+
function resolveProject(flag, projectFile) {
|
|
35501
|
+
if (flag !== undefined)
|
|
35502
|
+
return checkProject(flag);
|
|
35503
|
+
const fromFile = parseDevopsProject(projectFile);
|
|
35504
|
+
if (fromFile !== undefined)
|
|
35505
|
+
return fromFile;
|
|
35506
|
+
throw new UsageError("No DevOps project named for this run", hint);
|
|
35507
|
+
}
|
|
35508
|
+
var sorted = (values) => [...values].sort();
|
|
35509
|
+
var SELECT_KINDS = { tag: "anyTags", package: "packages", suite: "packages", file: "packages" };
|
|
35510
|
+
function parseSelect(values) {
|
|
35511
|
+
if (!values.length)
|
|
35512
|
+
return;
|
|
35513
|
+
const tags = [], packages = [];
|
|
35514
|
+
for (const raw of values) {
|
|
35515
|
+
const at = raw.indexOf(":");
|
|
35516
|
+
const kind = at < 0 ? "tag" : raw.slice(0, at).trim().toLowerCase();
|
|
35517
|
+
const value = (at < 0 ? raw : raw.slice(at + 1)).trim();
|
|
35518
|
+
const kinds = Object.keys(SELECT_KINDS).join(", ");
|
|
35519
|
+
if (!value)
|
|
35520
|
+
throw new UsageError(`--select ${raw} names no value`, `Use --select <kind>:<value>, or a bare tag name; kinds are ${kinds}.`);
|
|
35521
|
+
if (!Object.hasOwn(SELECT_KINDS, kind))
|
|
35522
|
+
throw new UsageError(`--select ${raw}: unknown kind "${kind}"`, `Use one of: ${kinds}.`);
|
|
35523
|
+
(SELECT_KINDS[kind] === "anyTags" ? tags : packages).push(value);
|
|
35524
|
+
}
|
|
35525
|
+
return { ...tags.length ? { anyTags: sorted(tags) } : {}, ...packages.length ? { packages: sorted(packages) } : {} };
|
|
35526
|
+
}
|
|
35527
|
+
function parseRepeat(value) {
|
|
35528
|
+
if (value === undefined)
|
|
35529
|
+
return 1;
|
|
35530
|
+
const n = typeof value === "string" && value.trim() ? Number(value) : NaN;
|
|
35531
|
+
if (!Number.isSafeInteger(n) || n < 1)
|
|
35532
|
+
throw new UsageError("--repeat must be an integer of at least 1");
|
|
35533
|
+
return n;
|
|
35534
|
+
}
|
|
35535
|
+
function requireRemote(remote) {
|
|
35536
|
+
if (!remote)
|
|
35537
|
+
throw new UsageError("Only remote test runs are available", "Add --remote to run the selected cases on the Praxis cloud executor.");
|
|
35538
|
+
}
|
|
35539
|
+
function requestIdFor(input) {
|
|
35540
|
+
const selector = input.selector === undefined ? null : {
|
|
35541
|
+
sizes: sorted(input.selector.sizes ?? []),
|
|
35542
|
+
anyTags: sorted(input.selector.anyTags ?? []),
|
|
35543
|
+
packages: sorted(input.selector.packages ?? []),
|
|
35544
|
+
cases: sorted(input.selector.cases ?? [])
|
|
35545
|
+
};
|
|
35546
|
+
const material = JSON.stringify(["devops-test-run", input.project, input.commit, input.repeat, selector]);
|
|
35547
|
+
return `req_${createHash2("sha256").update(material).digest("hex").slice(0, 32)}`;
|
|
35548
|
+
}
|
|
35549
|
+
var isTerminal = (state) => state === "finished";
|
|
35550
|
+
function shortSha(commit) {
|
|
35551
|
+
return commit.slice(0, 7);
|
|
35552
|
+
}
|
|
35553
|
+
function headBranch(output) {
|
|
35554
|
+
const name = output.trim();
|
|
35555
|
+
return !name || name === "HEAD" ? undefined : name;
|
|
35556
|
+
}
|
|
35557
|
+
function requirePushed(remoteContains, commit, branch) {
|
|
35558
|
+
if (remoteContains.trim())
|
|
35559
|
+
return;
|
|
35560
|
+
throw new UsageError(`Commit ${shortSha(commit)}${branch ? ` on ${branch}` : ""} is not on any remote branch`, `Push it first (git push${branch ? ` origin ${branch}` : ""}); the run tests the pushed commit, and this command never pushes for you.`);
|
|
35561
|
+
}
|
|
35562
|
+
function dirtyNotice(status, commit) {
|
|
35563
|
+
const files = status.split(`
|
|
35564
|
+
`).filter((line) => line.trim()).length;
|
|
35565
|
+
if (files === 0)
|
|
35566
|
+
return;
|
|
35567
|
+
return `Warning: ${files} uncommitted change${files === 1 ? "" : "s"}; the run tests the pushed commit ${shortSha(commit)}, not this working tree.`;
|
|
35568
|
+
}
|
|
35569
|
+
function exitCodeFor(result) {
|
|
35570
|
+
return result === "passed" || result === "pending" ? 0 : 1;
|
|
35571
|
+
}
|
|
35572
|
+
var wantsFailures = (result) => result !== "passed" && result !== "pending";
|
|
35573
|
+
function failedList(items, nextPageToken2, url) {
|
|
35574
|
+
const shown = items.slice(0, FAILURE_LIMIT);
|
|
35575
|
+
if (items.length <= FAILURE_LIMIT && !nextPageToken2)
|
|
35576
|
+
return { shown };
|
|
35577
|
+
return { shown, hint: `Showing ${FAILURE_LIMIT} of the failed cases; the run page lists them all: ${url}` };
|
|
35578
|
+
}
|
|
35579
|
+
var CONSOLE = { develop: "https://console-develop.deepraxis.com", production: "https://console.deepraxis.com" };
|
|
35580
|
+
function runUrl(env, project, id, viewerUrl) {
|
|
35581
|
+
return viewerUrl?.trim() || `${CONSOLE[env]}/devops/projects/${project}/test-runs/${id}`;
|
|
35582
|
+
}
|
|
35583
|
+
|
|
35584
|
+
// src/commands/devops.ts
|
|
35585
|
+
async function projectFile(cwd, ports) {
|
|
35586
|
+
let text;
|
|
35587
|
+
try {
|
|
35588
|
+
text = await ports.readFile(join4(cwd, "praxis.jsonc"));
|
|
35589
|
+
} catch (error) {
|
|
35590
|
+
if (error.code === "ENOENT")
|
|
35591
|
+
return;
|
|
35592
|
+
throw error;
|
|
35593
|
+
}
|
|
35594
|
+
try {
|
|
35595
|
+
return parseJsonc(text);
|
|
35596
|
+
} catch (error) {
|
|
35597
|
+
throw new UsageError(`praxis.jsonc is not valid JSONC: ${error.message}`);
|
|
35598
|
+
}
|
|
35599
|
+
}
|
|
35600
|
+
var COUNT_ORDER = ["passed", "failed", "flaky", "skipped", "pending", "other"];
|
|
35601
|
+
var countLine = (counts) => COUNT_ORDER.filter((key) => counts?.[key]).map((key) => `${counts[key]} ${key}`).join(", ") || "no counts reported";
|
|
35602
|
+
async function devopsTestRun(args, connect, env, ports) {
|
|
35603
|
+
requireRemote(args.remote);
|
|
35604
|
+
const project = resolveProject(args.project, await projectFile(ports.cwd, ports));
|
|
35605
|
+
const selector = parseSelect(args.select ?? []);
|
|
35606
|
+
const repeat = parseRepeat(args.repeat);
|
|
35607
|
+
const git = async (gitArgs) => (await ports.git(gitArgs, ports.cwd)).output;
|
|
35608
|
+
const commit = (await git(["rev-parse", "HEAD"])).trim();
|
|
35609
|
+
if (!commit)
|
|
35610
|
+
throw new UsageError("git rev-parse HEAD answered no commit", "Run this command inside a git repository.");
|
|
35611
|
+
const branch = headBranch(await git(["rev-parse", "--abbrev-ref", "HEAD"]));
|
|
35612
|
+
requirePushed(await git(["branch", "-r", "--contains", "HEAD"]), commit, branch);
|
|
35613
|
+
const notice = dirtyNotice(await git(["status", "--porcelain"]), commit);
|
|
35614
|
+
if (notice)
|
|
35615
|
+
ports.emit({ kind: "message", channel: "stderr", text: notice });
|
|
35616
|
+
const client2 = await connect();
|
|
35617
|
+
const requestId = requestIdFor({ project, commit, selector, repeat });
|
|
35618
|
+
let run = await client2.devops.projects.testRuns.create({ path: { project }, body: { ref: { ...branch ? { branch } : {}, commit }, ...selector ? { selector } : {}, repeat, executor: "cloud", requestId } });
|
|
35619
|
+
while (args.wait && !isTerminal(run.state)) {
|
|
35620
|
+
await ports.wait(POLL_MS);
|
|
35621
|
+
run = await client2.devops.testRuns.retrieve({ path: { id: run.id } });
|
|
35622
|
+
}
|
|
35623
|
+
const url = runUrl(env, project, run.id, run.viewerUrl);
|
|
35624
|
+
let failures = [], failureHint;
|
|
35625
|
+
if (wantsFailures(run.result)) {
|
|
35626
|
+
const page = await client2.devops.testRuns.executions.list({ path: { run: run.id }, query: { pageSize: FAILURE_LIMIT, filter: "result=failed" } });
|
|
35627
|
+
({ shown: failures, hint: failureHint } = failedList(page.items, page.nextPageToken, url));
|
|
35628
|
+
}
|
|
35629
|
+
const data = {
|
|
35630
|
+
id: run.id,
|
|
35631
|
+
url,
|
|
35632
|
+
project,
|
|
35633
|
+
state: run.state,
|
|
35634
|
+
result: run.result,
|
|
35635
|
+
repeat,
|
|
35636
|
+
commit,
|
|
35637
|
+
...branch ? { branch } : {},
|
|
35638
|
+
selected: run.selection?.selectedCount ?? null,
|
|
35639
|
+
counts: run.counts ?? null,
|
|
35640
|
+
request_id: requestId,
|
|
35641
|
+
failures: failures.map((execution) => ({ case: execution.case, title: execution.title, package: execution.package ?? null, status: execution.status })),
|
|
35642
|
+
...failureHint ? { failures_hint: failureHint } : {}
|
|
35643
|
+
};
|
|
35644
|
+
ports.emit({ kind: "object", data });
|
|
35645
|
+
ports.human([
|
|
35646
|
+
`${run.result} — ${project} @ ${commit.slice(0, 7)}${branch ? ` (${branch})` : ""}`,
|
|
35647
|
+
`state ${run.state}, ${countLine(run.counts)}`,
|
|
35648
|
+
url,
|
|
35649
|
+
...failures.map((execution) => ` failed ${execution.title}`),
|
|
35650
|
+
...failureHint ? [failureHint] : []
|
|
35651
|
+
].join(`
|
|
35652
|
+
`));
|
|
35653
|
+
return exitCodeFor(run.result);
|
|
35654
|
+
}
|
|
35655
|
+
|
|
32995
35656
|
// src/main.ts
|
|
32996
35657
|
import { spawnSync } from "node:child_process";
|
|
32997
35658
|
|
|
@@ -33290,9 +35951,11 @@ function renderHuman(result, ctx) {
|
|
|
33290
35951
|
const details = result.details !== undefined ? JSON.stringify(result.details) : undefined;
|
|
33291
35952
|
const detailsLine = details !== undefined ? ` details ${details.length > 2000 ? details.slice(0, 1999) + "…" : details}
|
|
33292
35953
|
` : "";
|
|
35954
|
+
const problemLine = problemLines(result.problem).map((line) => ` ${plain(line)}
|
|
35955
|
+
`).join("");
|
|
33293
35956
|
return { stderr: err.red(`✗ ${plain(result.message)}`) + `
|
|
33294
35957
|
` + err.dim(` code ${plain(result.code)}${result.status !== undefined ? ` · ${result.status}` : ""} · env ${plain(result.env)}${result.request_id ? ` · request ${plain(result.request_id)}` : ""}`) + `
|
|
33295
|
-
` + detailsLine + (result.hint ? ` → ${plain(result.hint)}
|
|
35958
|
+
` + detailsLine + problemLine + (result.hint ? ` → ${plain(result.hint)}
|
|
33296
35959
|
` : "") };
|
|
33297
35960
|
}
|
|
33298
35961
|
case "list":
|
|
@@ -33380,8 +36043,33 @@ ${usage ? `usage: ${JSON.stringify(usage)}
|
|
|
33380
36043
|
}
|
|
33381
36044
|
|
|
33382
36045
|
// src/output/render.ts
|
|
36046
|
+
var PROBLEM_HINTS = ["hint", "errors", "violations", "title", "type"];
|
|
36047
|
+
function serverProblem(raw) {
|
|
36048
|
+
const value = record(raw);
|
|
36049
|
+
const problem = {};
|
|
36050
|
+
for (const member of ["code", "detail", ...PROBLEM_HINTS, "status"]) {
|
|
36051
|
+
const entry = value[member];
|
|
36052
|
+
if (entry !== undefined && entry !== null)
|
|
36053
|
+
problem[member] = entry;
|
|
36054
|
+
}
|
|
36055
|
+
const adds = PROBLEM_HINTS.some((member) => Array.isArray(problem[member]) ? problem[member].length > 0 : problem[member] !== undefined);
|
|
36056
|
+
return adds ? problem : undefined;
|
|
36057
|
+
}
|
|
36058
|
+
function problemLines(problem) {
|
|
36059
|
+
const lines = [];
|
|
36060
|
+
for (const group of [problem?.errors, problem?.violations]) {
|
|
36061
|
+
for (const item of Array.isArray(group) ? group : []) {
|
|
36062
|
+
const entry = record(item);
|
|
36063
|
+
const where = scalar(entry.pointer ?? entry.field);
|
|
36064
|
+
const detail = scalar(entry.detail ?? entry.message ?? entry.reason);
|
|
36065
|
+
if (where || detail)
|
|
36066
|
+
lines.push(`${where ? `${where}: ` : ""}${detail}`);
|
|
36067
|
+
}
|
|
36068
|
+
}
|
|
36069
|
+
return lines;
|
|
36070
|
+
}
|
|
33383
36071
|
function errorJSON(result, ctx) {
|
|
33384
|
-
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 } : {} } }) + `
|
|
36072
|
+
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 } : {} } }) + `
|
|
33385
36073
|
`;
|
|
33386
36074
|
}
|
|
33387
36075
|
function render(result, ctx) {
|
|
@@ -33537,6 +36225,8 @@ function errorInput(error, ctx) {
|
|
|
33537
36225
|
const raw = record(sdk?.raw), nested = record(raw.error);
|
|
33538
36226
|
const candidate = nested.details ?? raw.details;
|
|
33539
36227
|
const details = candidate !== null && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : undefined;
|
|
36228
|
+
const problem = serverProblem(Object.keys(nested).length ? nested : raw);
|
|
36229
|
+
const serverText = (value) => typeof value === "string" && value.trim() ? value : undefined;
|
|
33540
36230
|
let message = error instanceof Error ? error.message : "Unexpected error";
|
|
33541
36231
|
const prefix = message.match(/^([A-Z][A-Z0-9_]+):\s*/)?.[1];
|
|
33542
36232
|
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");
|
|
@@ -33548,22 +36238,25 @@ function errorInput(error, ctx) {
|
|
|
33548
36238
|
if (stripped)
|
|
33549
36239
|
message = `${humanize(code)}${message ? `: ${message}` : ""}`;
|
|
33550
36240
|
const status = sdk?.status, request_id = sdk?.requestId;
|
|
36241
|
+
message = serverText(problem?.detail) ?? serverText(problem?.title) ?? message;
|
|
33551
36242
|
const authFailure = status === 401 || ["NOT_LOGGED_IN", "UNAUTHENTICATED", "TOKEN_REVOKED", "LOGIN_FAILED"].includes(code);
|
|
33552
36243
|
const source = ctx.credentialSource ?? "login";
|
|
33553
|
-
let
|
|
36244
|
+
let hint2 = genericHint;
|
|
33554
36245
|
if (error instanceof UsageError)
|
|
33555
|
-
|
|
36246
|
+
hint2 = error.hint;
|
|
36247
|
+
else if (serverText(problem?.hint))
|
|
36248
|
+
hint2 = serverText(problem?.hint);
|
|
33556
36249
|
else if (authFailure)
|
|
33557
|
-
|
|
36250
|
+
hint2 = authHint(source);
|
|
33558
36251
|
else if (status === 404)
|
|
33559
|
-
|
|
36252
|
+
hint2 = ctx.listCommand ? `Check the id; list existing ones with \`${ctx.listCommand}\`` : "Check the id.";
|
|
33560
36253
|
else if (status === 403)
|
|
33561
|
-
|
|
36254
|
+
hint2 = "Check that your account or API key has permission to access this resource.";
|
|
33562
36255
|
else if (status === 429)
|
|
33563
|
-
|
|
36256
|
+
hint2 = "Rate limited; retry later.";
|
|
33564
36257
|
else if (status !== undefined && status >= 500)
|
|
33565
|
-
|
|
33566
|
-
return { kind: "error", code, message, hint, ...details !== undefined ? { details } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
|
|
36258
|
+
hint2 = `Server error; retry later.${request_id ? ` Request id: ${request_id}.` : ""}`;
|
|
36259
|
+
return { kind: "error", code, message, hint: hint2, ...details !== undefined ? { details } : {}, ...problem !== undefined ? { problem } : {}, env: ctx.env, ...authFailure ? { credential_source: source } : {}, ...status !== undefined ? { status } : {}, ...request_id ? { request_id } : {} };
|
|
33567
36260
|
}
|
|
33568
36261
|
|
|
33569
36262
|
// src/output/progress.ts
|
|
@@ -33593,7 +36286,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
33593
36286
|
}
|
|
33594
36287
|
|
|
33595
36288
|
// src/main.ts
|
|
33596
|
-
var version = "0.2.1-dev.
|
|
36289
|
+
var version = "0.2.1-dev.02959a2";
|
|
33597
36290
|
var commands = commandTree(operations);
|
|
33598
36291
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
33599
36292
|
function route(argv) {
|
|
@@ -33678,7 +36371,14 @@ var defaults = {
|
|
|
33678
36371
|
var appOptions = {
|
|
33679
36372
|
"app create": [{ name: "dir", type: "string", description: "Directory to create the project in (default: ./<name>)." }, { name: "template", type: "string", description: "Copy a local template directory instead of downloading the standard template." }, { name: "no-install", type: "boolean", description: "Skip installing dependencies." }],
|
|
33680
36373
|
"app deploy": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "no-build", type: "boolean", description: "Publish the existing dist/ output without building." }],
|
|
33681
|
-
"app rollback": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "to", type: "string", description: "Version id to deploy (default: the previous version)." }]
|
|
36374
|
+
"app rollback": [{ name: "dir", type: "string", description: "Project directory (default: the nearest parent containing praxis.jsonc)." }, { name: "to", type: "string", description: "Version id to deploy (default: the previous version)." }],
|
|
36375
|
+
"devops test run": [
|
|
36376
|
+
{ name: "project", type: "string", description: "DevOps project id (dvp_…); default: the devops.project field of praxis.jsonc in the current directory." },
|
|
36377
|
+
{ name: "remote", type: "boolean", description: "Run the cases on the Praxis cloud executor. Required; local execution does not exist yet." },
|
|
36378
|
+
{ name: "no-wait", type: "boolean", description: "Return as soon as the run exists instead of waiting for a verdict." },
|
|
36379
|
+
{ name: "repeat", type: "string", description: "How many times each selected case runs (default: 1)." },
|
|
36380
|
+
{ name: "select", type: "string", repeated: true, description: "Narrow the selection; repeatable. tag:<tag> (a bare word reads as a tag), package:<path>, suite:<path> or file:<path>." }
|
|
36381
|
+
]
|
|
33682
36382
|
};
|
|
33683
36383
|
async function main(argv, injected = {}) {
|
|
33684
36384
|
const ports = { ...defaults, ...injected };
|
|
@@ -33811,7 +36511,7 @@ Examples:
|
|
|
33811
36511
|
let owner = client2;
|
|
33812
36512
|
for (const part of op.resource.split("."))
|
|
33813
36513
|
owner = owner[part];
|
|
33814
|
-
|
|
36514
|
+
let result = await owner[op.method](opts);
|
|
33815
36515
|
const name2 = `${op.resource}.${op.method}`;
|
|
33816
36516
|
const list = (items) => {
|
|
33817
36517
|
const view = clientList(items, op, flags.limit, ctx.mode);
|
|
@@ -33825,7 +36525,21 @@ Examples:
|
|
|
33825
36525
|
const cursor = result instanceof Page ? result.next_cursor : record(result).next_cursor ?? record(result).nextToken;
|
|
33826
36526
|
if (typeof cursor === "string" && cursor)
|
|
33827
36527
|
ctx.nextCommand = nextPageCommand(selected.command, parsed, cursor);
|
|
33828
|
-
|
|
36528
|
+
const pageToken = pageTokenField(op), token = pageToken?.sdkName ?? pageToken?.name;
|
|
36529
|
+
const firstPage = flags.all && !(result instanceof Page) && token ? pageOf(result) : undefined;
|
|
36530
|
+
if (flags.all && !(result instanceof Page) && token && !firstPage)
|
|
36531
|
+
throw new UsageError(`--all cannot find the list in ${op.resource}.${op.method}'s response; page with --${token.replace(/_/g, "-")} instead`);
|
|
36532
|
+
if (firstPage) {
|
|
36533
|
+
const items = [...firstPage.items];
|
|
36534
|
+
const seen = new Set;
|
|
36535
|
+
for (let next = firstPage.token;next && !seen.has(next); next = pageOf(result)?.token) {
|
|
36536
|
+
seen.add(next);
|
|
36537
|
+
result = await owner[op.method]({ ...opts, query: { ...opts.query, [token]: next } });
|
|
36538
|
+
items.push(...pageOf(result)?.items ?? []);
|
|
36539
|
+
}
|
|
36540
|
+
ctx.nextCommand = undefined;
|
|
36541
|
+
emit({ kind: "list", ...list(items), ...ctx.mode === "json" ? { raw: { data: items, next_page_token: null } } : {}, nextCursor: null, op: name2 });
|
|
36542
|
+
} else if (result instanceof Page) {
|
|
33829
36543
|
if (flags.all) {
|
|
33830
36544
|
const items = [];
|
|
33831
36545
|
for await (const item of result)
|
|
@@ -33899,6 +36613,26 @@ Examples:
|
|
|
33899
36613
|
await appRollback({ dir, to: parsed.flags.to?.[0] }, client2, appPorts);
|
|
33900
36614
|
break;
|
|
33901
36615
|
}
|
|
36616
|
+
case "devops test run": {
|
|
36617
|
+
return await devopsTestRun({
|
|
36618
|
+
project: parsed.flags.project?.[0],
|
|
36619
|
+
remote: Boolean(parsed.flags.remote),
|
|
36620
|
+
wait: !parsed.flags["no-wait"],
|
|
36621
|
+
repeat: parsed.flags.repeat?.[0],
|
|
36622
|
+
select: parsed.flags.select
|
|
36623
|
+
}, async () => await auth.client(org), config.env, {
|
|
36624
|
+
git: (args, cwd) => ports.spawnCapture("git", args, { cwd }),
|
|
36625
|
+
readFile: ports.readFile,
|
|
36626
|
+
wait: ports.wait,
|
|
36627
|
+
mode: ctx.mode,
|
|
36628
|
+
emit,
|
|
36629
|
+
human: (text) => {
|
|
36630
|
+
if (ctx.mode === "human")
|
|
36631
|
+
emit({ kind: "message", channel: "stdout", text });
|
|
36632
|
+
},
|
|
36633
|
+
cwd: ports.cwd
|
|
36634
|
+
});
|
|
36635
|
+
}
|
|
33902
36636
|
case "api": {
|
|
33903
36637
|
const method = parsed.positional[0];
|
|
33904
36638
|
if (!HTTP_METHOD.test(method))
|
|
@@ -33921,7 +36655,7 @@ Examples:
|
|
|
33921
36655
|
}
|
|
33922
36656
|
}
|
|
33923
36657
|
if (true)
|
|
33924
|
-
process.
|
|
36658
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
33925
36659
|
export {
|
|
33926
36660
|
main
|
|
33927
36661
|
};
|