@deepraxis/sdk 0.1.1-dev.4421e6c → 0.1.1-dev.44bea19
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/METHODS.md +321 -1
- package/README.md +3 -3
- package/dist/core/errors.d.ts +6 -0
- package/dist/core/errors.js +8 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +805 -131
- package/dist/generated/sdk.gen.js +2660 -718
- package/dist/generated/types.gen.d.ts +48103 -36686
- package/dist/helpers/browser-actions.d.ts +84 -0
- package/dist/helpers/browser-actions.js +141 -0
- package/dist/helpers/browser-connect.d.ts +26 -2
- package/dist/helpers/browser-connect.js +263 -25
- package/dist/helpers/browser-decisions.d.ts +44 -0
- package/dist/helpers/browser-decisions.js +53 -0
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +20 -11
- package/dist/operations.generated.d.ts +7167 -3798
- package/dist/operations.generated.js +9098 -4901
- package/dist/resources.generated.d.ts +255 -9
- package/dist/resources.generated.js +207 -0
- package/package.json +2 -2
|
@@ -513,6 +513,30 @@ export const computersFilesContent = (options) => (options.client ?? client).get
|
|
|
513
513
|
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
514
514
|
...options
|
|
515
515
|
});
|
|
516
|
+
/**
|
|
517
|
+
* Convert a Computer Document to PDF
|
|
518
|
+
*
|
|
519
|
+
* Convert an Office document (docx, doc, ppt, pptx, rtf, odt; up to 16 MiB) to PDF inside a platform-owned ephemeral document sandbox, whatever machine family the computer itself runs on. Returns base64 PDF bytes.
|
|
520
|
+
*
|
|
521
|
+
* Praxis extension: the preview conversion endpoint. The browser never parses an untrusted document — LibreOffice runs only inside an ephemeral document-family sandbox and the converter instance is killed after use. The file stays tenant-owned; non-convertible types answer EXTENSION_NOT_CONVERTIBLE and a failed conversion answers CONVERSION_FAILED.
|
|
522
|
+
*/
|
|
523
|
+
export const computersFilesConvert = (options) => (options.client ?? client).post({
|
|
524
|
+
security: [{
|
|
525
|
+
key: 'BearerAuth',
|
|
526
|
+
scheme: 'bearer',
|
|
527
|
+
type: 'http'
|
|
528
|
+
}, {
|
|
529
|
+
key: 'ApiKeyAuth',
|
|
530
|
+
name: 'X-API-Key',
|
|
531
|
+
type: 'apiKey'
|
|
532
|
+
}],
|
|
533
|
+
url: '/agent/v1/computers/{computer_id}/files/convert',
|
|
534
|
+
...options,
|
|
535
|
+
headers: {
|
|
536
|
+
'Content-Type': 'application/json',
|
|
537
|
+
...options.headers
|
|
538
|
+
}
|
|
539
|
+
});
|
|
516
540
|
/**
|
|
517
541
|
* Connect computer
|
|
518
542
|
*
|
|
@@ -879,6 +903,24 @@ export const browserListEvents = (options) => (options.client ?? client).get({
|
|
|
879
903
|
url: '/browser/v1/sessions/{sessionId}/events',
|
|
880
904
|
...options
|
|
881
905
|
});
|
|
906
|
+
/**
|
|
907
|
+
* 执行页面动作
|
|
908
|
+
*
|
|
909
|
+
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。
|
|
910
|
+
*/
|
|
911
|
+
export const browserRunPageAction = (options) => (options.client ?? client).post({
|
|
912
|
+
security: [{
|
|
913
|
+
key: 'BrowserBearer',
|
|
914
|
+
scheme: 'bearer',
|
|
915
|
+
type: 'http'
|
|
916
|
+
}],
|
|
917
|
+
url: '/browser/v1/sessions/{sessionId}/actions',
|
|
918
|
+
...options,
|
|
919
|
+
headers: {
|
|
920
|
+
'Content-Type': 'application/json',
|
|
921
|
+
...options.headers
|
|
922
|
+
}
|
|
923
|
+
});
|
|
882
924
|
/**
|
|
883
925
|
* 请求人工接管
|
|
884
926
|
*
|
|
@@ -932,7 +974,7 @@ export const browserViewerHeartbeat = (options) => (options.client ?? client).po
|
|
|
932
974
|
/**
|
|
933
975
|
* 列出浏览器上下文
|
|
934
976
|
*
|
|
935
|
-
* 分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null
|
|
977
|
+
* 分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。传 name 时只返回该名称的登录态;名称在当前账户内唯一,所以最多一条。
|
|
936
978
|
*/
|
|
937
979
|
export const browserListContexts = (options) => (options?.client ?? client).get({
|
|
938
980
|
security: [{
|
|
@@ -1169,7 +1211,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
|
|
|
1169
1211
|
/**
|
|
1170
1212
|
* Create an upload
|
|
1171
1213
|
*
|
|
1172
|
-
* 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
|
|
1214
|
+
* 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.
|
|
1173
1215
|
*/
|
|
1174
1216
|
export const fileCreateUpload = (options) => (options.client ?? client).post({
|
|
1175
1217
|
security: [{
|
|
@@ -1187,7 +1229,7 @@ export const fileCreateUpload = (options) => (options.client ?? client).post({
|
|
|
1187
1229
|
/**
|
|
1188
1230
|
* Add an upload part
|
|
1189
1231
|
*
|
|
1190
|
-
* 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.
|
|
1232
|
+
* 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.
|
|
1191
1233
|
*/
|
|
1192
1234
|
export const fileAddUploadPart = (options) => (options.client ?? client).post({
|
|
1193
1235
|
...formDataBodySerializer,
|
|
@@ -1206,7 +1248,7 @@ export const fileAddUploadPart = (options) => (options.client ?? client).post({
|
|
|
1206
1248
|
/**
|
|
1207
1249
|
* Complete an upload
|
|
1208
1250
|
*
|
|
1209
|
-
* 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.
|
|
1251
|
+
* 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.
|
|
1210
1252
|
*/
|
|
1211
1253
|
export const fileCompleteUpload = (options) => (options.client ?? client).post({
|
|
1212
1254
|
security: [{
|
|
@@ -1235,10 +1277,24 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
1235
1277
|
url: '/file/v1/uploads/{upload_id}/cancel',
|
|
1236
1278
|
...options
|
|
1237
1279
|
});
|
|
1280
|
+
/**
|
|
1281
|
+
* Retrieve an upload
|
|
1282
|
+
*
|
|
1283
|
+
* 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.
|
|
1284
|
+
*/
|
|
1285
|
+
export const fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
1286
|
+
security: [{
|
|
1287
|
+
key: 'BearerAuth',
|
|
1288
|
+
scheme: 'bearer',
|
|
1289
|
+
type: 'http'
|
|
1290
|
+
}],
|
|
1291
|
+
url: '/file/v1/uploads/{upload_id}',
|
|
1292
|
+
...options
|
|
1293
|
+
});
|
|
1238
1294
|
/**
|
|
1239
1295
|
* Create a one-time upload URL
|
|
1240
1296
|
*
|
|
1241
|
-
* Upload a local file of up to
|
|
1297
|
+
* 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"}.
|
|
1242
1298
|
*/
|
|
1243
1299
|
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1244
1300
|
security: [{
|
|
@@ -6371,121 +6427,157 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
6371
6427
|
*
|
|
6372
6428
|
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`
|
|
6373
6429
|
*
|
|
6374
|
-
*
|
|
6375
|
-
*
|
|
6376
|
-
* Functions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.
|
|
6377
|
-
*
|
|
6378
|
-
* ```ts
|
|
6379
|
-
* GetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;
|
|
6380
|
-
* GetItem(id: ClipId): ItemView;
|
|
6381
|
-
* FindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];
|
|
6382
|
-
* GetMedia(ref: MediaRef): MediaInfo;
|
|
6383
|
-
* GetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];
|
|
6384
|
-
* GetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];
|
|
6385
|
-
* ListTransitions(): TransitionInfo[];
|
|
6386
|
-
* ListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];
|
|
6387
|
-
* ListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];
|
|
6388
|
-
* Insert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;
|
|
6389
|
-
* Update(id: ClipId, patch: ItemPatchView): void;
|
|
6390
|
-
* SetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };
|
|
6391
|
-
* Delete(id: ClipId, o?: { ripple?: boolean }): void;
|
|
6392
|
-
* Join(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;
|
|
6393
|
-
* UpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;
|
|
6394
|
-
* DeleteJoin(id: JoinId): void;
|
|
6395
|
-
* Split(id: ClipId, at: number): ClipId;
|
|
6396
|
-
* Trim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;
|
|
6397
|
-
* Move(id: ClipId, start: number, track?: TrackId): void;
|
|
6398
|
-
* RippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;
|
|
6399
|
-
* AddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;
|
|
6400
|
-
* UpdateTrack(id: TrackId, patch: TrackPatch): void;
|
|
6401
|
-
* DeleteTrack(id: TrackId): void;
|
|
6402
|
-
* SetSettings(patch: Partial<ProjectSettingsView>): void;
|
|
6403
|
-
* AddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];
|
|
6404
|
-
* SetMarker(at: number, label: string): string;
|
|
6405
|
-
* Print(...values: unknown[]): void;
|
|
6406
|
-
* Preview(at: number[]): void;
|
|
6407
|
-
* ```
|
|
6408
|
-
*
|
|
6409
|
-
* | Functions | Behavior and arguments |
|
|
6410
|
-
* | --- | --- |
|
|
6411
|
-
* | 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. |
|
|
6412
|
-
* | 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. |
|
|
6413
|
-
* | ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |
|
|
6414
|
-
* | FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |
|
|
6415
|
-
* | GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |
|
|
6416
|
-
* | 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. |
|
|
6417
|
-
* | 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. |
|
|
6418
|
-
* | 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. |
|
|
6419
|
-
* | 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. |
|
|
6420
|
-
* | 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. |
|
|
6421
|
-
* | RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |
|
|
6422
|
-
* | 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. |
|
|
6423
|
-
* | SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |
|
|
6424
|
-
* | 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. |
|
|
6425
|
-
* | SetMarker | Add a label at a timeline time and return its ID. |
|
|
6426
|
-
* | 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. |
|
|
6427
|
-
*
|
|
6428
|
-
* #### Joins between clips
|
|
6429
|
-
*
|
|
6430
|
-
* Endpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint's length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection's code and message, shorten or remove conflicting joins, and retry the saved edit.
|
|
6431
|
-
*
|
|
6432
|
-
* TransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.
|
|
6433
|
-
*
|
|
6434
|
-
* Minimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.
|
|
6435
|
-
*
|
|
6436
|
-
* #### Insert fields (ItemInit)
|
|
6437
|
-
*
|
|
6438
|
-
* Every item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.
|
|
6439
|
-
*
|
|
6440
|
-
* | type | Required fields beyond type/start | Optional fields |
|
|
6441
|
-
* | --- | --- | --- |
|
|
6442
|
-
* | video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, animation, transitionIn, transitionOut |
|
|
6443
|
-
* | image | media, length | transform, fit, animate, animation, transitionIn, transitionOut |
|
|
6444
|
-
* | text | text, length | style, transform, reveal, animate, animation, transitionIn, transitionOut |
|
|
6445
|
-
* | color | color, length | transform, fill, animate, animation, transitionIn, transitionOut |
|
|
6446
|
-
* | shape | shape, length, width, height, fill | radius, stroke, transform, animate, animation, transitionIn, transitionOut |
|
|
6447
|
-
* | audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |
|
|
6448
|
-
* | caption | text, length | — |
|
|
6449
|
-
*
|
|
6450
|
-
* Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.
|
|
6451
|
-
*
|
|
6452
|
-
* | Field | Value |
|
|
6453
|
-
* | --- | --- |
|
|
6454
|
-
* | 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. |
|
|
6455
|
-
* | style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |
|
|
6456
|
-
* | 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. |
|
|
6457
|
-
* | animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |
|
|
6458
|
-
* | 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. |
|
|
6459
|
-
* | 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. |
|
|
6460
|
-
* | 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. |
|
|
6461
|
-
* | 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}`. |
|
|
6462
|
-
* | 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. |
|
|
6463
|
-
*
|
|
6464
|
-
* #### Update fields (ItemPatchView)
|
|
6465
|
-
*
|
|
6466
|
-
* All fields are optional; use only fields relevant to the item's type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.
|
|
6467
|
-
*
|
|
6468
|
-
* #### Animation presets
|
|
6469
|
-
*
|
|
6470
|
-
* Discover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.
|
|
6471
|
-
*
|
|
6472
|
-
* Presets replace the clip's existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.
|
|
6473
|
-
*
|
|
6474
|
-
* Errors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.
|
|
6475
|
-
*
|
|
6476
|
-
* #### Speed, reverse and freeze
|
|
6477
|
-
*
|
|
6478
|
-
* Video/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.
|
|
6479
|
-
*
|
|
6480
|
-
* Update of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.
|
|
6481
|
-
*
|
|
6482
|
-
* Example for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.
|
|
6430
|
+
* <!-- cut-reference:start -->
|
|
6431
|
+
* ### Script function, field and error reference
|
|
6483
6432
|
*
|
|
6484
|
-
*
|
|
6433
|
+
* Every script function, clip field and error code has its own section, read one at a time:
|
|
6485
6434
|
*
|
|
6486
|
-
*
|
|
6435
|
+
* ```
|
|
6436
|
+
* codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
|
|
6437
|
+
* codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
|
|
6438
|
+
* codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
|
|
6439
|
+
* codemode.describe("praxis.cut.script") // names, one page at a time
|
|
6440
|
+
* ```
|
|
6487
6441
|
*
|
|
6488
|
-
*
|
|
6442
|
+
* Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
|
|
6443
|
+
*
|
|
6444
|
+
* #### Script functions (script)
|
|
6445
|
+
*
|
|
6446
|
+
* - `GetTimeline` — Duration, tracks, joins; clips are under `items`.
|
|
6447
|
+
* - `GetItem` — One clip's compact view, by id.
|
|
6448
|
+
* - `FindItems` — Visit every clip with its track; collect results.
|
|
6449
|
+
* - `GetMedia` — Media metadata; `duration` is seconds.
|
|
6450
|
+
* - `GetTranscript` — Transcript words in source microseconds.
|
|
6451
|
+
* - `GetAnalysis` — Silence, filler, scene or beat segments.
|
|
6452
|
+
* - `ListTransitions` — Join transition kinds and parameters.
|
|
6453
|
+
* - `ListEffects` — Visual-effect catalog and parameters.
|
|
6454
|
+
* - `ListAnimations` — Animation presets by phase and target.
|
|
6455
|
+
* - `ListFonts` — Font families, weights and scripts.
|
|
6456
|
+
* - `ListTextStyles` — Text style presets for `style.preset`.
|
|
6457
|
+
* - `ListTextTemplates` — Multi-layer templates and their slots.
|
|
6458
|
+
* - `Insert` — Add a clip; a track never overlaps itself.
|
|
6459
|
+
* - `Append` — Add a clip at the end of a track.
|
|
6460
|
+
* - `Update` — Change named fields; the rest stay.
|
|
6461
|
+
* - `SetSpeed` — Change rate, keeping source or duration.
|
|
6462
|
+
* - `Delete` — Remove a clip. There is no `Remove`.
|
|
6463
|
+
* - `Join` — Overlap clips; followers shift, track shortens.
|
|
6464
|
+
* - `UpdateJoin` — Change a join's length or effect.
|
|
6465
|
+
* - `DeleteJoin` — Remove a join; restore the butt cut.
|
|
6466
|
+
* - `Split` — Cut a clip in two at a time.
|
|
6467
|
+
* - `Trim` — Move one clip edge by seconds.
|
|
6468
|
+
* - `Move` — Set a clip's start or track.
|
|
6469
|
+
* - `RippleDeleteRange` — Cut a time range and close the gap.
|
|
6470
|
+
* - `AddTrack` — Add a video, audio or caption track.
|
|
6471
|
+
* - `UpdateTrack` — Change a track's name, lock, gain or role.
|
|
6472
|
+
* - `DeleteTrack` — Remove a track and its clips.
|
|
6473
|
+
* - `SetSettings` — Change canvas, frame rate or background.
|
|
6474
|
+
* - `AddCaptionsFromTranscript` — Captions from a clip's kept words.
|
|
6475
|
+
* - `InsertTemplate` — Insert a template and fill its slots.
|
|
6476
|
+
* - `AlignCaptions` — Rebuild captions from text punctuation.
|
|
6477
|
+
* - `ImportCaptions` — Import SRT or WebVTT onto captions.
|
|
6478
|
+
* - `ExportCaptions` — Export captions as SRT or WebVTT.
|
|
6479
|
+
* - `SetMarker` — Label a timeline position.
|
|
6480
|
+
* - `Print` — Append values to the result's `prints`.
|
|
6481
|
+
* - `Preview` — Up to 8 frames as inline PNG data URLs.
|
|
6482
|
+
*
|
|
6483
|
+
* #### Fields (fields)
|
|
6484
|
+
*
|
|
6485
|
+
* - `type` — Clip kind; decides which fields apply.
|
|
6486
|
+
* - `start` — Clip start in seconds; snaps to frames.
|
|
6487
|
+
* - `length` — Duration; video and audio may omit it or write "auto".
|
|
6488
|
+
* - `media` — Source `{ libraryId, assetId }`.
|
|
6489
|
+
* - `sourceIn` — First source second kept; default 0.
|
|
6490
|
+
* - `sourceOut` — Exclusive source end; read-only.
|
|
6491
|
+
* - `text` — Text of a text or caption clip.
|
|
6492
|
+
* - `color` — Solid colour of a color clip.
|
|
6493
|
+
* - `shape` — Shape clip kind: `rect` or `ellipse`.
|
|
6494
|
+
* - `width` — Shape width, a fraction of canvas width.
|
|
6495
|
+
* - `height` — Shape height, a fraction of canvas height.
|
|
6496
|
+
* - `radius` — Rect corner rounding, in 1080-height px.
|
|
6497
|
+
* - `fill` — Shape or text paint: colour or gradient.
|
|
6498
|
+
* - `stroke` — Shape outline: colour and width.
|
|
6499
|
+
* - `transform` — Position, scale, rotation, opacity, crop, blur.
|
|
6500
|
+
* - `fit` — contain, cover, fill or none.
|
|
6501
|
+
* - `blend` — Layer blend mode; null clears.
|
|
6502
|
+
* - `style` — Text styling: font, fill, strokes, glow, position.
|
|
6503
|
+
* - `style.position` — top, middle or bottom; omit it, never null.
|
|
6504
|
+
* - `playback` — Rate, direction, audio policy, or freeze.
|
|
6505
|
+
* - `volumeDb` — Audio level in dB; 0 is source level.
|
|
6506
|
+
* - `gain` — Keyframed audio level in dB.
|
|
6507
|
+
* - `fadeIn` — Fade-in seconds at the clip's start.
|
|
6508
|
+
* - `fadeOut` — Fade-out seconds at the clip's end.
|
|
6509
|
+
* - `duck` — Lower this clip while another track plays.
|
|
6510
|
+
* - `animate` — Transform keyframes; `at` is clip-relative seconds.
|
|
6511
|
+
* - `reveal` — Per-character, word or line reveal timing.
|
|
6512
|
+
* - `animation` — Preset slots `{ in, out, loop }`; null clears.
|
|
6513
|
+
* - `effects` — Effect stack, at most 8; null clears.
|
|
6514
|
+
* - `transitionIn` — Entrance effect: kind plus seconds.
|
|
6515
|
+
* - `transitionOut` — Exit effect: kind plus seconds.
|
|
6516
|
+
* - `mask` — Shape, path or track matte.
|
|
6517
|
+
* - `words` — Caption words with clip-local times.
|
|
6518
|
+
*
|
|
6519
|
+
* #### Error codes (errors)
|
|
6520
|
+
*
|
|
6521
|
+
* - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
|
|
6522
|
+
* - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
|
|
6523
|
+
* - `INVALID_STYLE` — A style value is out of range.
|
|
6524
|
+
* - `INVALID_MASK` — A mask definition is malformed.
|
|
6525
|
+
* - `MASK_IN_USE` — The edit would break a live mask.
|
|
6526
|
+
* - `TOO_MANY_MASKS` — At most 16 masks per project.
|
|
6527
|
+
* - `RATE_OUT_OF_RANGE` — A rate is outside 0.25-4.
|
|
6528
|
+
* - `UNSUPPORTED_PLAYBACK` — Reverse without an explicit mute.
|
|
6529
|
+
* - `INVALID_PLAYBACK` — A playback object is partial or malformed.
|
|
6530
|
+
* - `UNKNOWN_FONT` — The family is not in `ListFonts()`.
|
|
6531
|
+
* - `UNKNOWN_FIELD` — The field name is not accepted here.
|
|
6532
|
+
* - `UNKNOWN_TEXT_STYLE` — `style.preset` is not in the catalog.
|
|
6533
|
+
* - `TEXT_STYLE_TARGET_MISMATCH` — Preset on the wrong clip type.
|
|
6534
|
+
* - `CAPTION_ALIGN_LOW_CONFIDENCE` — Alignment confidence too low; nothing changed.
|
|
6535
|
+
* - `OVERLAP` — Two clips on one track would share time.
|
|
6536
|
+
* - `OUT_OF_SOURCE` — The clip would read past its source.
|
|
6537
|
+
* - `LOCKED_TRACK` — The edit targets a locked track.
|
|
6538
|
+
* - `UNBOUND_LIBRARY` — The library is not bound to the project.
|
|
6539
|
+
* - `TRACK_KIND_MISMATCH` — The clip type does not fit the track.
|
|
6540
|
+
* - `NOT_FOUND` — The named id is not in this project.
|
|
6541
|
+
* - `TOO_SHORT` — The result would be under one frame.
|
|
6542
|
+
* - `INVALID_DUCK` — Bad `duck` level or a missing track.
|
|
6543
|
+
* - `UNKNOWN_ANIMATION` — The preset is not in `ListAnimations()`.
|
|
6544
|
+
* - `INVALID_ANIMATION_PARAM` — Bad slot, parameter or keyframe limit.
|
|
6545
|
+
* - `ANIMATION_TOO_LONG` — In plus out exceed the clip length.
|
|
6546
|
+
* - `ANIMATION_TARGET_MISMATCH` — The preset does not match the clip type.
|
|
6547
|
+
* - `ANIMATION_PHASE_MISMATCH` — The preset is in the wrong slot.
|
|
6548
|
+
* - `UNKNOWN_EFFECT` — The effect is not in `ListEffects()`.
|
|
6549
|
+
* - `INVALID_EFFECT_PARAM` — Bad effect parameter or keyframe.
|
|
6550
|
+
* - `TOO_MANY_EFFECTS` — More than 8 effects on one clip.
|
|
6551
|
+
* - `PROJECT_NOT_FOUND` — No visible project has this id.
|
|
6552
|
+
* - `EXPORT_NOT_FOUND` — No such export in this project.
|
|
6553
|
+
* - `DRAFT_RENDER_NOT_FOUND` — No such draft render.
|
|
6554
|
+
* - `VERSION_NOT_FOUND` — No saved version has this revision.
|
|
6555
|
+
* - `LIBRARY_NOT_FOUND` — The library is missing or invisible.
|
|
6556
|
+
* - `BINDING_INVALID` — The binding request is malformed.
|
|
6557
|
+
* - `BINDING_IN_USE` — Clips still use this library's assets.
|
|
6558
|
+
* - `NOTHING_TO_UNDO` — No earlier revision to return to.
|
|
6559
|
+
* - `NOTHING_TO_REDO` — No undone revision is waiting.
|
|
6560
|
+
* - `UNDO_CONFLICT` — The revision to undo is no longer head.
|
|
6561
|
+
* - `REVISION_CONFLICT` — The project moved; your revision is stale.
|
|
6562
|
+
* - `CUT_BUSY` — The project is busy; retry.
|
|
6563
|
+
* - `INVALID_CAPTION_FILE` — The subtitle file is malformed or too big.
|
|
6564
|
+
* - `SCRIPT_ERROR` — The script threw or did not parse.
|
|
6565
|
+
* - `SCRIPT_LIMIT` — An execute budget was exceeded.
|
|
6566
|
+
* - `OPS_REJECTED` — An op failed; the whole edit rolled back.
|
|
6567
|
+
* - `EDIT_EXPIRED` — The saved edit id is over ten minutes old.
|
|
6568
|
+
* - `MEDIA_NOT_FOUND` — The asset id is not in that library.
|
|
6569
|
+
* - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
|
|
6570
|
+
* - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
|
|
6571
|
+
* - `MEDIA_IMPORT_FAILED` — Importing media failed.
|
|
6572
|
+
* - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
|
|
6573
|
+
* - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
|
|
6574
|
+
* - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
|
|
6575
|
+
* - `EXPORT_FAILED` — The render failed; read `error.cause`.
|
|
6576
|
+
* - `INVALID_PARAMS` — The request is malformed.
|
|
6577
|
+
* - `PERMISSION_DENIED` — This credential may not do that here.
|
|
6578
|
+
* - `NOT_IMPLEMENTED` — Not available on this platform yet.
|
|
6579
|
+
* - `INTERNAL` — Unexpected failure; retry with the request id.
|
|
6580
|
+
* <!-- cut-reference:end -->
|
|
6489
6581
|
*
|
|
6490
6582
|
*/
|
|
6491
6583
|
export const cutExecute = (options) => (options.client ?? client).post({
|
|
@@ -6560,9 +6652,9 @@ export const cutListFrames = (options) => (options.client ?? client).get({
|
|
|
6560
6652
|
...options
|
|
6561
6653
|
});
|
|
6562
6654
|
/**
|
|
6563
|
-
* Analyze project media
|
|
6655
|
+
* Analyze project media or measure the project mix
|
|
6564
6656
|
*
|
|
6565
|
-
* Request silence, filler-word or
|
|
6657
|
+
* Request silence, filler-word, scene or beat analysis for selected bound assets before editing, or measure the mix the timeline itself renders with kind mix. That kind is a render job, not a read: it answers pending with retry_after_sec and an id. Poll by calling this same method again with body { kinds: ["mix"], id } (there is no separate retrieve method); that call reads the measurement and renders nothing. The answer only exists once the audio has been rendered and measured. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed. kind mix is separate: it reports the project mix loudness, the loudness of each role and where music masks speech, so an editor can fix the mix rather than guess at it.
|
|
6566
6658
|
*/
|
|
6567
6659
|
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
6568
6660
|
security: [{
|
|
@@ -6701,6 +6793,46 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
|
6701
6793
|
...options.headers
|
|
6702
6794
|
}
|
|
6703
6795
|
});
|
|
6796
|
+
/**
|
|
6797
|
+
* Create draft range render
|
|
6798
|
+
*
|
|
6799
|
+
* Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration (an end up to 0.05 s past it, a rounded duration, is read as the end), and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.
|
|
6800
|
+
*/
|
|
6801
|
+
export const cutCreateRender = (options) => (options.client ?? client).post({
|
|
6802
|
+
security: [{
|
|
6803
|
+
key: 'BearerAuth',
|
|
6804
|
+
scheme: 'bearer',
|
|
6805
|
+
type: 'http'
|
|
6806
|
+
}, {
|
|
6807
|
+
key: 'ApiKeyAuth',
|
|
6808
|
+
name: 'X-API-Key',
|
|
6809
|
+
type: 'apiKey'
|
|
6810
|
+
}],
|
|
6811
|
+
url: '/cut/v1/projects/{project_id}/renders',
|
|
6812
|
+
...options,
|
|
6813
|
+
headers: {
|
|
6814
|
+
'Content-Type': 'application/json',
|
|
6815
|
+
...options.headers
|
|
6816
|
+
}
|
|
6817
|
+
});
|
|
6818
|
+
/**
|
|
6819
|
+
* Retrieve draft range render
|
|
6820
|
+
*
|
|
6821
|
+
* Poll a draft render id returned by projects.renders.create to see whether the interval is ready, then read url while it lasts. queued and rendering are in progress; done provides file_id and a short-lived url for the rendered .m4a or .mp4; failed provides error. Only done yields a url, and the file behind it disappears 24 hours after it was stored, so retrieve again when the link has expired.
|
|
6822
|
+
*/
|
|
6823
|
+
export const cutRetrieveRender = (options) => (options.client ?? client).get({
|
|
6824
|
+
security: [{
|
|
6825
|
+
key: 'BearerAuth',
|
|
6826
|
+
scheme: 'bearer',
|
|
6827
|
+
type: 'http'
|
|
6828
|
+
}, {
|
|
6829
|
+
key: 'ApiKeyAuth',
|
|
6830
|
+
name: 'X-API-Key',
|
|
6831
|
+
type: 'apiKey'
|
|
6832
|
+
}],
|
|
6833
|
+
url: '/cut/v1/renders/{render_id}',
|
|
6834
|
+
...options
|
|
6835
|
+
});
|
|
6704
6836
|
/**
|
|
6705
6837
|
* Retrieve video export
|
|
6706
6838
|
*
|
|
@@ -7124,95 +7256,101 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
7124
7256
|
}
|
|
7125
7257
|
});
|
|
7126
7258
|
/**
|
|
7127
|
-
*
|
|
7259
|
+
* Read a commit's test catalog
|
|
7128
7260
|
*
|
|
7129
|
-
*
|
|
7261
|
+
* Read the catalog version discovered at one commit — how many suites and cases it holds, which frameworks they come from, and how the commit changed them. Call this first: it tells you which suites, cases and sizes exist before you list them or select them into a plan, and the reported diff explains why a case count moved. A commit whose discovery has not finished answers CATALOG_NOT_READY, which means "not yet", not "no tests"; wait and read again. Omit commit to read the newest catalog published for the project.
|
|
7130
7262
|
*/
|
|
7131
|
-
export const
|
|
7263
|
+
export const devopsTestCatalogGet = (options) => (options.client ?? client).get({
|
|
7132
7264
|
security: [{
|
|
7133
|
-
key: '
|
|
7265
|
+
key: 'devops-bearerAuth',
|
|
7134
7266
|
scheme: 'bearer',
|
|
7135
7267
|
type: 'http'
|
|
7136
7268
|
}],
|
|
7137
|
-
url: '/
|
|
7269
|
+
url: '/devops/v1/projects/{project}/test-catalog',
|
|
7138
7270
|
...options
|
|
7139
7271
|
});
|
|
7140
7272
|
/**
|
|
7141
|
-
*
|
|
7273
|
+
* List test suites
|
|
7142
7274
|
*
|
|
7143
|
-
*
|
|
7275
|
+
* List the suites the project's newest catalog discovered — one suite per test file and framework pair, with its size, purposes and question count. Use it to find the suite id a case belongs to, or to see which files make up an area before selecting cases from them. Suites come from the catalog, so a file added in code appears only after its commit's catalog is published. Archived suites are returned too; they carry archived true and no case is ever silently dropped from the list.
|
|
7144
7276
|
*/
|
|
7145
|
-
export const
|
|
7277
|
+
export const devopsTestSuitesList = (options) => (options.client ?? client).get({
|
|
7146
7278
|
security: [{
|
|
7147
|
-
key: '
|
|
7279
|
+
key: 'devops-bearerAuth',
|
|
7148
7280
|
scheme: 'bearer',
|
|
7149
7281
|
type: 'http'
|
|
7150
7282
|
}],
|
|
7151
|
-
url: '/
|
|
7152
|
-
...options
|
|
7153
|
-
headers: {
|
|
7154
|
-
'Content-Type': 'application/json',
|
|
7155
|
-
...options.headers
|
|
7156
|
-
}
|
|
7283
|
+
url: '/devops/v1/projects/{project}/test-suites',
|
|
7284
|
+
...options
|
|
7157
7285
|
});
|
|
7158
7286
|
/**
|
|
7159
|
-
*
|
|
7287
|
+
* Retrieve a test suite
|
|
7160
7288
|
*
|
|
7161
|
-
*
|
|
7289
|
+
* Read one suite by the id a suite list returned, to learn its file, framework, size, purposes and how many cases it holds. Use it when a case's suite id needs a name for display, or to confirm which commit's catalog a suite came from. The id is opaque; it comes from the list, never from the file path.
|
|
7162
7290
|
*/
|
|
7163
|
-
export const
|
|
7291
|
+
export const devopsTestSuitesGet = (options) => (options.client ?? client).get({
|
|
7164
7292
|
security: [{
|
|
7165
|
-
key: '
|
|
7293
|
+
key: 'devops-bearerAuth',
|
|
7166
7294
|
scheme: 'bearer',
|
|
7167
7295
|
type: 'http'
|
|
7168
7296
|
}],
|
|
7169
|
-
url: '/
|
|
7297
|
+
url: '/devops/v1/test-suites/{id}',
|
|
7170
7298
|
...options
|
|
7171
7299
|
});
|
|
7172
7300
|
/**
|
|
7173
|
-
*
|
|
7301
|
+
* List test cases
|
|
7174
7302
|
*
|
|
7175
|
-
*
|
|
7303
|
+
* List a project's cases with their health, state and recent statistics, so you can decide which ones a plan must run and which are quarantined. This is the read a test dashboard is built on; filter it to narrow by state or health instead of paging through everything. A case's id is a fingerprint of its own title and path, so it survives a rename — read aliases when reconciling history recorded under an older title.
|
|
7176
7304
|
*/
|
|
7177
|
-
export const
|
|
7305
|
+
export const devopsTestCasesList = (options) => (options.client ?? client).get({
|
|
7178
7306
|
security: [{
|
|
7179
|
-
key: '
|
|
7307
|
+
key: 'devops-bearerAuth',
|
|
7180
7308
|
scheme: 'bearer',
|
|
7181
7309
|
type: 'http'
|
|
7182
7310
|
}],
|
|
7183
|
-
url: '/
|
|
7311
|
+
url: '/devops/v1/projects/{project}/test-cases',
|
|
7184
7312
|
...options
|
|
7185
7313
|
});
|
|
7186
7314
|
/**
|
|
7187
|
-
*
|
|
7315
|
+
* Retrieve a test case
|
|
7188
7316
|
*
|
|
7189
|
-
*
|
|
7317
|
+
* Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.
|
|
7190
7318
|
*/
|
|
7191
|
-
export const
|
|
7319
|
+
export const devopsTestCasesGet = (options) => (options.client ?? client).get({
|
|
7192
7320
|
security: [{
|
|
7193
|
-
key: '
|
|
7321
|
+
key: 'devops-bearerAuth',
|
|
7194
7322
|
scheme: 'bearer',
|
|
7195
7323
|
type: 'http'
|
|
7196
7324
|
}],
|
|
7197
|
-
url: '/
|
|
7198
|
-
...options
|
|
7199
|
-
headers: {
|
|
7200
|
-
'Content-Type': 'application/json',
|
|
7201
|
-
...options.headers
|
|
7202
|
-
}
|
|
7325
|
+
url: '/devops/v1/test-cases/{id}',
|
|
7326
|
+
...options
|
|
7203
7327
|
});
|
|
7204
7328
|
/**
|
|
7205
|
-
*
|
|
7329
|
+
* List test plans
|
|
7206
7330
|
*
|
|
7207
|
-
*
|
|
7331
|
+
* List the project's plans — what each one selects, which stage and gate it belongs to, and when it runs next. Read this before creating a plan, so a new plan extends what exists instead of duplicating a selector an existing plan already covers.
|
|
7208
7332
|
*/
|
|
7209
|
-
export const
|
|
7333
|
+
export const devopsTestPlansList = (options) => (options.client ?? client).get({
|
|
7210
7334
|
security: [{
|
|
7211
|
-
key: '
|
|
7335
|
+
key: 'devops-bearerAuth',
|
|
7212
7336
|
scheme: 'bearer',
|
|
7213
7337
|
type: 'http'
|
|
7214
7338
|
}],
|
|
7215
|
-
url: '/
|
|
7339
|
+
url: '/devops/v1/projects/{project}/test-plans',
|
|
7340
|
+
...options
|
|
7341
|
+
});
|
|
7342
|
+
/**
|
|
7343
|
+
* Create a test plan
|
|
7344
|
+
*
|
|
7345
|
+
* Create a plan that decides which cases a stage must run. The plan's key is unique inside the project and is what a later run names; the selector chooses cases by size, purpose, tag, package or explicit ids, and the trigger says when the plan fires by itself. A merge or promotion gate must name the environment it guards, and a plan with a gate but no environment is refused with PLAN_GATE_ENVIRONMENT_MISMATCH rather than created and silently ignored. A plan has no revision history: update it with a patch.
|
|
7346
|
+
*/
|
|
7347
|
+
export const devopsTestPlansCreate = (options) => (options.client ?? client).post({
|
|
7348
|
+
security: [{
|
|
7349
|
+
key: 'devops-bearerAuth',
|
|
7350
|
+
scheme: 'bearer',
|
|
7351
|
+
type: 'http'
|
|
7352
|
+
}],
|
|
7353
|
+
url: '/devops/v1/projects/{project}/test-plans',
|
|
7216
7354
|
...options,
|
|
7217
7355
|
headers: {
|
|
7218
7356
|
'Content-Type': 'application/json',
|
|
@@ -7220,31 +7358,45 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
|
|
|
7220
7358
|
}
|
|
7221
7359
|
});
|
|
7222
7360
|
/**
|
|
7223
|
-
*
|
|
7361
|
+
* Delete a test plan
|
|
7224
7362
|
*
|
|
7225
|
-
*
|
|
7363
|
+
* Delete a plan so it schedules nothing further. The plan stops firing immediately; runs it already produced keep their own record and are not deleted with it. To stop a plan temporarily and keep it for later, pause it instead — deleting cannot be undone and the plan's key becomes free for another plan to take.
|
|
7226
7364
|
*/
|
|
7227
|
-
export const
|
|
7365
|
+
export const devopsTestPlansDelete = (options) => (options.client ?? client).delete({
|
|
7228
7366
|
security: [{
|
|
7229
|
-
key: '
|
|
7367
|
+
key: 'devops-bearerAuth',
|
|
7230
7368
|
scheme: 'bearer',
|
|
7231
7369
|
type: 'http'
|
|
7232
7370
|
}],
|
|
7233
|
-
url: '/
|
|
7371
|
+
url: '/devops/v1/test-plans/{id}',
|
|
7234
7372
|
...options
|
|
7235
7373
|
});
|
|
7236
7374
|
/**
|
|
7237
|
-
*
|
|
7375
|
+
* Retrieve a test plan
|
|
7238
7376
|
*
|
|
7239
|
-
*
|
|
7377
|
+
* Read one plan by the id a plan list returned, to see its selector, gate, repeat count, timeout and pause state before updating or deleting it. A paused plan carries the reason, the actor and the time it resumes, so a pause you did not set is explained here rather than guessed at.
|
|
7240
7378
|
*/
|
|
7241
|
-
export const
|
|
7379
|
+
export const devopsTestPlansGet = (options) => (options.client ?? client).get({
|
|
7242
7380
|
security: [{
|
|
7243
|
-
key: '
|
|
7381
|
+
key: 'devops-bearerAuth',
|
|
7244
7382
|
scheme: 'bearer',
|
|
7245
7383
|
type: 'http'
|
|
7246
7384
|
}],
|
|
7247
|
-
url: '/
|
|
7385
|
+
url: '/devops/v1/test-plans/{id}',
|
|
7386
|
+
...options
|
|
7387
|
+
});
|
|
7388
|
+
/**
|
|
7389
|
+
* Update a test plan
|
|
7390
|
+
*
|
|
7391
|
+
* Change a plan's title, trigger, selector, gate, repeat count, timeout or enabled flag. Only the fields present in the body are changed, so a body naming one field leaves the rest exactly as they were. Changing a selector does not create a version — the plan is not a published artefact, and runs already started keep the selection they were created with. Read the plan first to know what you are leaving unchanged.
|
|
7392
|
+
*/
|
|
7393
|
+
export const devopsTestPlansUpdate = (options) => (options.client ?? client).patch({
|
|
7394
|
+
security: [{
|
|
7395
|
+
key: 'devops-bearerAuth',
|
|
7396
|
+
scheme: 'bearer',
|
|
7397
|
+
type: 'http'
|
|
7398
|
+
}],
|
|
7399
|
+
url: '/devops/v1/test-plans/{id}',
|
|
7248
7400
|
...options,
|
|
7249
7401
|
headers: {
|
|
7250
7402
|
'Content-Type': 'application/json',
|
|
@@ -7252,45 +7404,63 @@ export const knowledgeAttachFile = (options) => (options.client ?? client).post(
|
|
|
7252
7404
|
}
|
|
7253
7405
|
});
|
|
7254
7406
|
/**
|
|
7255
|
-
*
|
|
7407
|
+
* Pause a test plan
|
|
7256
7408
|
*
|
|
7257
|
-
*
|
|
7409
|
+
* Stop a plan from starting new runs while keeping it and its history. A reason is required and is recorded on the plan, so the next reader learns why it stopped. Give until to resume automatically at a time; omit it to stay paused until someone resumes it. Runs already in flight are not cancelled — cancel those individually.
|
|
7258
7410
|
*/
|
|
7259
|
-
export const
|
|
7411
|
+
export const devopsTestPlansPause = (options) => (options.client ?? client).post({
|
|
7260
7412
|
security: [{
|
|
7261
|
-
key: '
|
|
7413
|
+
key: 'devops-bearerAuth',
|
|
7262
7414
|
scheme: 'bearer',
|
|
7263
7415
|
type: 'http'
|
|
7264
7416
|
}],
|
|
7265
|
-
url: '/
|
|
7417
|
+
url: '/devops/v1/test-plans/{id}:pause',
|
|
7418
|
+
...options,
|
|
7419
|
+
headers: {
|
|
7420
|
+
'Content-Type': 'application/json',
|
|
7421
|
+
...options.headers
|
|
7422
|
+
}
|
|
7423
|
+
});
|
|
7424
|
+
/**
|
|
7425
|
+
* Resume a test plan
|
|
7426
|
+
*
|
|
7427
|
+
* Clear a plan's pause so it schedules runs again. Resuming an active plan changes nothing and is safe to repeat. The plan keeps its selector, gate and key; only the pause is removed.
|
|
7428
|
+
*/
|
|
7429
|
+
export const devopsTestPlansResume = (options) => (options.client ?? client).post({
|
|
7430
|
+
security: [{
|
|
7431
|
+
key: 'devops-bearerAuth',
|
|
7432
|
+
scheme: 'bearer',
|
|
7433
|
+
type: 'http'
|
|
7434
|
+
}],
|
|
7435
|
+
url: '/devops/v1/test-plans/{id}:resume',
|
|
7266
7436
|
...options
|
|
7267
7437
|
});
|
|
7268
7438
|
/**
|
|
7269
|
-
*
|
|
7439
|
+
* List test runs
|
|
7270
7440
|
*
|
|
7271
|
-
*
|
|
7441
|
+
* List the project's runs newest first, with each run's state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit's tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.
|
|
7272
7442
|
*/
|
|
7273
|
-
export const
|
|
7443
|
+
export const devopsTestRunsList = (options) => (options.client ?? client).get({
|
|
7274
7444
|
security: [{
|
|
7275
|
-
key: '
|
|
7445
|
+
key: 'devops-bearerAuth',
|
|
7276
7446
|
scheme: 'bearer',
|
|
7277
7447
|
type: 'http'
|
|
7278
7448
|
}],
|
|
7279
|
-
url: '/
|
|
7449
|
+
url: '/devops/v1/projects/{project}/test-runs',
|
|
7280
7450
|
...options
|
|
7281
7451
|
});
|
|
7282
7452
|
/**
|
|
7283
|
-
*
|
|
7453
|
+
* Create a test run
|
|
7284
7454
|
*
|
|
7285
|
-
*
|
|
7455
|
+
* Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued, the default, returns as soon as the run exists; started waits until the run has begun, except for an external run, which is answered at once because it leaves queued only when your own CI uploads; finished waits for a verdict. The wait is bounded at about 25 seconds, and a wait that reaches that bound returns the run as it stands rather than failing — read state to see whether it finished. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.
|
|
7286
7456
|
*/
|
|
7287
|
-
export const
|
|
7457
|
+
export const devopsTestRunsCreate = (options) => (options.client ?? client).post({
|
|
7288
7458
|
security: [{
|
|
7289
|
-
key: '
|
|
7459
|
+
key: 'devops-bearerAuth',
|
|
7290
7460
|
scheme: 'bearer',
|
|
7291
7461
|
type: 'http'
|
|
7292
7462
|
}],
|
|
7293
|
-
url: '/
|
|
7463
|
+
url: '/devops/v1/projects/{project}/test-runs',
|
|
7294
7464
|
...options,
|
|
7295
7465
|
headers: {
|
|
7296
7466
|
'Content-Type': 'application/json',
|
|
@@ -7298,31 +7468,31 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
|
|
|
7298
7468
|
}
|
|
7299
7469
|
});
|
|
7300
7470
|
/**
|
|
7301
|
-
*
|
|
7471
|
+
* Retrieve a test run
|
|
7302
7472
|
*
|
|
7303
|
-
*
|
|
7473
|
+
* Read one run's current state, result and counts, and ask for its failed executions inline with expand. Poll this after creating a run whose result was pending. A result is monotonic once it reaches a verdict — a failed run never becomes passed by a later report, so read the run rather than the last report to know where it ended.
|
|
7304
7474
|
*/
|
|
7305
|
-
export const
|
|
7475
|
+
export const devopsTestRunsGet = (options) => (options.client ?? client).get({
|
|
7306
7476
|
security: [{
|
|
7307
|
-
key: '
|
|
7477
|
+
key: 'devops-bearerAuth',
|
|
7308
7478
|
scheme: 'bearer',
|
|
7309
7479
|
type: 'http'
|
|
7310
7480
|
}],
|
|
7311
|
-
url: '/
|
|
7481
|
+
url: '/devops/v1/test-runs/{id}',
|
|
7312
7482
|
...options
|
|
7313
7483
|
});
|
|
7314
7484
|
/**
|
|
7315
|
-
*
|
|
7485
|
+
* Cancel a test run
|
|
7316
7486
|
*
|
|
7317
|
-
*
|
|
7487
|
+
* Stop a run that is still going. A reason is required and is recorded on the run, because a cancelled run is read later as evidence about why a commit was not verified. Cancelling a run that already reached a verdict is refused with RUN_ALREADY_FINISHED: its result is final and cancelling it would erase the verdict. Executions already recorded stay readable.
|
|
7318
7488
|
*/
|
|
7319
|
-
export const
|
|
7489
|
+
export const devopsTestRunsCancel = (options) => (options.client ?? client).post({
|
|
7320
7490
|
security: [{
|
|
7321
|
-
key: '
|
|
7491
|
+
key: 'devops-bearerAuth',
|
|
7322
7492
|
scheme: 'bearer',
|
|
7323
7493
|
type: 'http'
|
|
7324
7494
|
}],
|
|
7325
|
-
url: '/
|
|
7495
|
+
url: '/devops/v1/test-runs/{id}:cancel',
|
|
7326
7496
|
...options,
|
|
7327
7497
|
headers: {
|
|
7328
7498
|
'Content-Type': 'application/json',
|
|
@@ -7330,87 +7500,339 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
|
|
|
7330
7500
|
}
|
|
7331
7501
|
});
|
|
7332
7502
|
/**
|
|
7333
|
-
*
|
|
7503
|
+
* List a run's executions
|
|
7334
7504
|
*
|
|
7335
|
-
*
|
|
7505
|
+
* List the executions recorded against one run — one entry per case the run selected, with its status, duration, attempts and evidence. Use it to find the case that failed, or to compare a repeat run against the previous one case by case. Reads happen while the run is still going, so a case may still be pending; filter by status to watch only the failures.
|
|
7336
7506
|
*/
|
|
7337
|
-
export const
|
|
7507
|
+
export const devopsTestExecutionsList = (options) => (options.client ?? client).get({
|
|
7338
7508
|
security: [{
|
|
7339
|
-
key: '
|
|
7509
|
+
key: 'devops-bearerAuth',
|
|
7340
7510
|
scheme: 'bearer',
|
|
7341
7511
|
type: 'http'
|
|
7342
7512
|
}],
|
|
7343
|
-
url: '/
|
|
7513
|
+
url: '/devops/v1/test-runs/{run}/executions',
|
|
7344
7514
|
...options
|
|
7345
7515
|
});
|
|
7346
7516
|
/**
|
|
7347
|
-
*
|
|
7517
|
+
* Retrieve one case's execution in a run
|
|
7348
7518
|
*
|
|
7349
|
-
*
|
|
7519
|
+
* Read one case's execution inside one run, including every attempt with its own duration and message. Use it after a run reports a failure to see whether the case failed once and passed on retry — that is what flaky true means — and to reach the evidence files a triage needs. Both ids come from the run and case reads; an execution that does not exist for that pair is NOT_FOUND rather than an empty answer.
|
|
7350
7520
|
*/
|
|
7351
|
-
export const
|
|
7521
|
+
export const devopsTestExecutionsGet = (options) => (options.client ?? client).get({
|
|
7352
7522
|
security: [{
|
|
7353
|
-
key: '
|
|
7523
|
+
key: 'devops-bearerAuth',
|
|
7354
7524
|
scheme: 'bearer',
|
|
7355
7525
|
type: 'http'
|
|
7356
7526
|
}],
|
|
7357
|
-
url: '/
|
|
7527
|
+
url: '/devops/v1/test-runs/{run}/executions/{case}',
|
|
7358
7528
|
...options
|
|
7359
7529
|
});
|
|
7360
7530
|
/**
|
|
7361
|
-
*
|
|
7531
|
+
* Upload an external test report
|
|
7362
7532
|
*
|
|
7363
|
-
*
|
|
7533
|
+
* Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable.
|
|
7364
7534
|
*/
|
|
7365
|
-
export const
|
|
7535
|
+
export const devopsTestReportsUpload = (options) => (options.client ?? client).post({
|
|
7366
7536
|
security: [{
|
|
7367
|
-
key: '
|
|
7537
|
+
key: 'devops-bearerAuth',
|
|
7368
7538
|
scheme: 'bearer',
|
|
7369
7539
|
type: 'http'
|
|
7370
7540
|
}],
|
|
7371
|
-
url: '/
|
|
7372
|
-
...options
|
|
7541
|
+
url: '/devops/v1/projects/{project}/test-reports',
|
|
7542
|
+
...options,
|
|
7543
|
+
headers: {
|
|
7544
|
+
'Content-Type': 'application/json',
|
|
7545
|
+
...options.headers
|
|
7546
|
+
}
|
|
7373
7547
|
});
|
|
7374
7548
|
/**
|
|
7375
|
-
*
|
|
7549
|
+
* List knowledge bases
|
|
7376
7550
|
*
|
|
7377
|
-
*
|
|
7551
|
+
* Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
|
|
7378
7552
|
*/
|
|
7379
|
-
export const
|
|
7553
|
+
export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
7380
7554
|
security: [{
|
|
7381
7555
|
key: 'knowledge-bearerAuth',
|
|
7382
7556
|
scheme: 'bearer',
|
|
7383
7557
|
type: 'http'
|
|
7384
7558
|
}],
|
|
7385
|
-
url: '/knowledge/v1/vector_stores
|
|
7559
|
+
url: '/knowledge/v1/vector_stores',
|
|
7386
7560
|
...options
|
|
7387
7561
|
});
|
|
7388
7562
|
/**
|
|
7389
|
-
*
|
|
7563
|
+
* Create knowledge base
|
|
7390
7564
|
*
|
|
7391
|
-
*
|
|
7565
|
+
* Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
|
|
7392
7566
|
*/
|
|
7393
|
-
export const
|
|
7567
|
+
export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
|
|
7394
7568
|
security: [{
|
|
7395
7569
|
key: 'knowledge-bearerAuth',
|
|
7396
7570
|
scheme: 'bearer',
|
|
7397
7571
|
type: 'http'
|
|
7398
7572
|
}],
|
|
7399
|
-
url: '/knowledge/v1/vector_stores
|
|
7400
|
-
...options
|
|
7573
|
+
url: '/knowledge/v1/vector_stores',
|
|
7574
|
+
...options,
|
|
7575
|
+
headers: {
|
|
7576
|
+
'Content-Type': 'application/json',
|
|
7577
|
+
...options.headers
|
|
7578
|
+
}
|
|
7401
7579
|
});
|
|
7402
7580
|
/**
|
|
7403
|
-
*
|
|
7581
|
+
* Delete knowledge base
|
|
7404
7582
|
*
|
|
7405
|
-
*
|
|
7583
|
+
* Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
|
|
7406
7584
|
*/
|
|
7407
|
-
export const
|
|
7585
|
+
export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
|
|
7408
7586
|
security: [{
|
|
7409
7587
|
key: 'knowledge-bearerAuth',
|
|
7410
7588
|
scheme: 'bearer',
|
|
7411
7589
|
type: 'http'
|
|
7412
7590
|
}],
|
|
7413
|
-
url: '/knowledge/v1/vector_stores/{vector_store_id}
|
|
7591
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7592
|
+
...options
|
|
7593
|
+
});
|
|
7594
|
+
/**
|
|
7595
|
+
* Retrieve knowledge base
|
|
7596
|
+
*
|
|
7597
|
+
* Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
|
|
7598
|
+
*/
|
|
7599
|
+
export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
|
|
7600
|
+
security: [{
|
|
7601
|
+
key: 'knowledge-bearerAuth',
|
|
7602
|
+
scheme: 'bearer',
|
|
7603
|
+
type: 'http'
|
|
7604
|
+
}],
|
|
7605
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7606
|
+
...options
|
|
7607
|
+
});
|
|
7608
|
+
/**
|
|
7609
|
+
* Update knowledge base
|
|
7610
|
+
*
|
|
7611
|
+
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
7612
|
+
*/
|
|
7613
|
+
export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
|
|
7614
|
+
security: [{
|
|
7615
|
+
key: 'knowledge-bearerAuth',
|
|
7616
|
+
scheme: 'bearer',
|
|
7617
|
+
type: 'http'
|
|
7618
|
+
}],
|
|
7619
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7620
|
+
...options,
|
|
7621
|
+
headers: {
|
|
7622
|
+
'Content-Type': 'application/json',
|
|
7623
|
+
...options.headers
|
|
7624
|
+
}
|
|
7625
|
+
});
|
|
7626
|
+
/**
|
|
7627
|
+
* Search knowledge base
|
|
7628
|
+
*
|
|
7629
|
+
* Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
|
|
7630
|
+
*/
|
|
7631
|
+
export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
|
|
7632
|
+
security: [{
|
|
7633
|
+
key: 'knowledge-bearerAuth',
|
|
7634
|
+
scheme: 'bearer',
|
|
7635
|
+
type: 'http'
|
|
7636
|
+
}],
|
|
7637
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
|
|
7638
|
+
...options,
|
|
7639
|
+
headers: {
|
|
7640
|
+
'Content-Type': 'application/json',
|
|
7641
|
+
...options.headers
|
|
7642
|
+
}
|
|
7643
|
+
});
|
|
7644
|
+
/**
|
|
7645
|
+
* List files
|
|
7646
|
+
*
|
|
7647
|
+
* Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
|
|
7648
|
+
*/
|
|
7649
|
+
export const knowledgeListFiles = (options) => (options.client ?? client).get({
|
|
7650
|
+
security: [{
|
|
7651
|
+
key: 'knowledge-bearerAuth',
|
|
7652
|
+
scheme: 'bearer',
|
|
7653
|
+
type: 'http'
|
|
7654
|
+
}],
|
|
7655
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7656
|
+
...options
|
|
7657
|
+
});
|
|
7658
|
+
/**
|
|
7659
|
+
* Add file
|
|
7660
|
+
*
|
|
7661
|
+
* Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. PDF files accept up to 536870912 bytes (512 MiB), while other formats accept up to 52428800 bytes (50 MiB), constrained by Router conversion; every file is limited to 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
|
|
7662
|
+
*/
|
|
7663
|
+
export const knowledgeAttachFile = (options) => (options.client ?? client).post({
|
|
7664
|
+
security: [{
|
|
7665
|
+
key: 'knowledge-bearerAuth',
|
|
7666
|
+
scheme: 'bearer',
|
|
7667
|
+
type: 'http'
|
|
7668
|
+
}],
|
|
7669
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7670
|
+
...options,
|
|
7671
|
+
headers: {
|
|
7672
|
+
'Content-Type': 'application/json',
|
|
7673
|
+
...options.headers
|
|
7674
|
+
}
|
|
7675
|
+
});
|
|
7676
|
+
/**
|
|
7677
|
+
* Remove file
|
|
7678
|
+
*
|
|
7679
|
+
* Removes the file from search immediately; does not delete the original File.
|
|
7680
|
+
*/
|
|
7681
|
+
export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
|
|
7682
|
+
security: [{
|
|
7683
|
+
key: 'knowledge-bearerAuth',
|
|
7684
|
+
scheme: 'bearer',
|
|
7685
|
+
type: 'http'
|
|
7686
|
+
}],
|
|
7687
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7688
|
+
...options
|
|
7689
|
+
});
|
|
7690
|
+
/**
|
|
7691
|
+
* Retrieve file
|
|
7692
|
+
*
|
|
7693
|
+
* Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
|
|
7694
|
+
*/
|
|
7695
|
+
export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
|
|
7696
|
+
security: [{
|
|
7697
|
+
key: 'knowledge-bearerAuth',
|
|
7698
|
+
scheme: 'bearer',
|
|
7699
|
+
type: 'http'
|
|
7700
|
+
}],
|
|
7701
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7702
|
+
...options
|
|
7703
|
+
});
|
|
7704
|
+
/**
|
|
7705
|
+
* Update file attributes
|
|
7706
|
+
*
|
|
7707
|
+
* Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
|
|
7708
|
+
*/
|
|
7709
|
+
export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
|
|
7710
|
+
security: [{
|
|
7711
|
+
key: 'knowledge-bearerAuth',
|
|
7712
|
+
scheme: 'bearer',
|
|
7713
|
+
type: 'http'
|
|
7714
|
+
}],
|
|
7715
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7716
|
+
...options,
|
|
7717
|
+
headers: {
|
|
7718
|
+
'Content-Type': 'application/json',
|
|
7719
|
+
...options.headers
|
|
7720
|
+
}
|
|
7721
|
+
});
|
|
7722
|
+
/**
|
|
7723
|
+
* Read extracted content
|
|
7724
|
+
*
|
|
7725
|
+
* Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
|
|
7726
|
+
*/
|
|
7727
|
+
export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
7728
|
+
security: [{
|
|
7729
|
+
key: 'knowledge-bearerAuth',
|
|
7730
|
+
scheme: 'bearer',
|
|
7731
|
+
type: 'http'
|
|
7732
|
+
}],
|
|
7733
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
|
|
7734
|
+
...options
|
|
7735
|
+
});
|
|
7736
|
+
/**
|
|
7737
|
+
* Create file batch
|
|
7738
|
+
*
|
|
7739
|
+
* Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
|
|
7740
|
+
*/
|
|
7741
|
+
export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
|
|
7742
|
+
security: [{
|
|
7743
|
+
key: 'knowledge-bearerAuth',
|
|
7744
|
+
scheme: 'bearer',
|
|
7745
|
+
type: 'http'
|
|
7746
|
+
}],
|
|
7747
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
|
|
7748
|
+
...options,
|
|
7749
|
+
headers: {
|
|
7750
|
+
'Content-Type': 'application/json',
|
|
7751
|
+
...options.headers
|
|
7752
|
+
}
|
|
7753
|
+
});
|
|
7754
|
+
/**
|
|
7755
|
+
* Retrieve file batch
|
|
7756
|
+
*
|
|
7757
|
+
* Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
|
|
7758
|
+
*/
|
|
7759
|
+
export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
|
|
7760
|
+
security: [{
|
|
7761
|
+
key: 'knowledge-bearerAuth',
|
|
7762
|
+
scheme: 'bearer',
|
|
7763
|
+
type: 'http'
|
|
7764
|
+
}],
|
|
7765
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
|
|
7766
|
+
...options
|
|
7767
|
+
});
|
|
7768
|
+
/**
|
|
7769
|
+
* Cancel file batch
|
|
7770
|
+
*
|
|
7771
|
+
* Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
|
|
7772
|
+
*/
|
|
7773
|
+
export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
|
|
7774
|
+
security: [{
|
|
7775
|
+
key: 'knowledge-bearerAuth',
|
|
7776
|
+
scheme: 'bearer',
|
|
7777
|
+
type: 'http'
|
|
7778
|
+
}],
|
|
7779
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
|
|
7780
|
+
...options
|
|
7781
|
+
});
|
|
7782
|
+
/**
|
|
7783
|
+
* List batch files
|
|
7784
|
+
*
|
|
7785
|
+
* Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
|
|
7786
|
+
*/
|
|
7787
|
+
export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
|
|
7788
|
+
security: [{
|
|
7789
|
+
key: 'knowledge-bearerAuth',
|
|
7790
|
+
scheme: 'bearer',
|
|
7791
|
+
type: 'http'
|
|
7792
|
+
}],
|
|
7793
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
|
|
7794
|
+
...options
|
|
7795
|
+
});
|
|
7796
|
+
/**
|
|
7797
|
+
* Restore knowledge base
|
|
7798
|
+
*
|
|
7799
|
+
* Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
|
|
7800
|
+
*/
|
|
7801
|
+
export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
|
|
7802
|
+
security: [{
|
|
7803
|
+
key: 'knowledge-bearerAuth',
|
|
7804
|
+
scheme: 'bearer',
|
|
7805
|
+
type: 'http'
|
|
7806
|
+
}],
|
|
7807
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
|
|
7808
|
+
...options
|
|
7809
|
+
});
|
|
7810
|
+
/**
|
|
7811
|
+
* Permanently purge knowledge base
|
|
7812
|
+
*
|
|
7813
|
+
* Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
|
|
7814
|
+
*/
|
|
7815
|
+
export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
|
|
7816
|
+
security: [{
|
|
7817
|
+
key: 'knowledge-bearerAuth',
|
|
7818
|
+
scheme: 'bearer',
|
|
7819
|
+
type: 'http'
|
|
7820
|
+
}],
|
|
7821
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
|
|
7822
|
+
...options
|
|
7823
|
+
});
|
|
7824
|
+
/**
|
|
7825
|
+
* Retry failed file
|
|
7826
|
+
*
|
|
7827
|
+
* Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
|
|
7828
|
+
*/
|
|
7829
|
+
export const knowledgeRetryFile = (options) => (options.client ?? client).post({
|
|
7830
|
+
security: [{
|
|
7831
|
+
key: 'knowledge-bearerAuth',
|
|
7832
|
+
scheme: 'bearer',
|
|
7833
|
+
type: 'http'
|
|
7834
|
+
}],
|
|
7835
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
7414
7836
|
...options
|
|
7415
7837
|
});
|
|
7416
7838
|
/**
|
|
@@ -7596,7 +8018,7 @@ export const mediaListAssets = (options) => (options.client ?? client).get({
|
|
|
7596
8018
|
/**
|
|
7597
8019
|
* Upload asset
|
|
7598
8020
|
*
|
|
7599
|
-
* For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
8021
|
+
* 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.
|
|
7600
8022
|
*/
|
|
7601
8023
|
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
7602
8024
|
security: [{
|
|
@@ -7614,7 +8036,7 @@ export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
|
7614
8036
|
/**
|
|
7615
8037
|
* Import file
|
|
7616
8038
|
*
|
|
7617
|
-
* Copy a File into an independent Media asset. New assets default to organization-private delivery (type=authenticated); explicitly set type=upload for public originals and derivatives. Omitting type on overwrite preserves the current type. Deleting the source File does not delete this copy. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
8039
|
+
* 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.
|
|
7618
8040
|
*/
|
|
7619
8041
|
export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
7620
8042
|
security: [{
|
|
@@ -7678,7 +8100,7 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
|
7678
8100
|
/**
|
|
7679
8101
|
* Reprocess asset
|
|
7680
8102
|
*
|
|
7681
|
-
* For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
8103
|
+
* 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.
|
|
7682
8104
|
*/
|
|
7683
8105
|
export const mediaReprocessAsset = (options) => (options.client ?? client).post({
|
|
7684
8106
|
security: [{
|
|
@@ -7796,7 +8218,7 @@ export const mediaListFolders = (options) => (options.client ?? client).get({
|
|
|
7796
8218
|
/**
|
|
7797
8219
|
* Create batch
|
|
7798
8220
|
*
|
|
7799
|
-
* Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
8221
|
+
* 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.
|
|
7800
8222
|
*/
|
|
7801
8223
|
export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
7802
8224
|
security: [{
|
|
@@ -7828,7 +8250,7 @@ export const mediaGetBatch = (options) => (options.client ?? client).get({
|
|
|
7828
8250
|
/**
|
|
7829
8251
|
* Batch assets alias
|
|
7830
8252
|
*
|
|
7831
|
-
* Queue a frozen selection for tagging, untagging, context replacement, moving, deleting or reprocessing. IDs are limited to 1000; use an expression for larger selections, subject to the search scan budget. reprocess starts at most 30 assets per rolling minute per library. Only retryable failed steps and legacy source-size unsupported steps rerun. Omit kinds to inspect all recoverable steps, or supply kinds to narrow them. Other unsupported, permanent and completed steps remain unchanged; a permanent output blocks only its own step. Assets without any selected recoverable step count as failed items without starting understanding. Poll the returned job id; done counts accepted launches, not successful model inference. Staff Admin only permits reprocess and requires a nonblank reason. Example: {"action":"reprocess","selector":{"expression":"processing_state=failed AND failure_code=UPSTREAM_FAILED"}}. For understanding, Media generates proxies for video sources of 25 MB or more and audio-only sources of 100 MB or more; originals remain available unchanged.
|
|
8253
|
+
* 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.
|
|
7832
8254
|
*/
|
|
7833
8255
|
export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
7834
8256
|
security: [{
|
|
@@ -7844,9 +8266,9 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
7844
8266
|
}
|
|
7845
8267
|
});
|
|
7846
8268
|
/**
|
|
7847
|
-
* Get job
|
|
8269
|
+
* Get job
|
|
7848
8270
|
*
|
|
7849
|
-
* Read
|
|
8271
|
+
* 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.
|
|
7850
8272
|
*/
|
|
7851
8273
|
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
7852
8274
|
security: [{
|
|
@@ -7890,106 +8312,91 @@ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).
|
|
|
7890
8312
|
}
|
|
7891
8313
|
});
|
|
7892
8314
|
/**
|
|
7893
|
-
*
|
|
8315
|
+
* Get default library
|
|
7894
8316
|
*
|
|
7895
|
-
*
|
|
8317
|
+
* Return this organization’s default library. Calling ensures the organization’s default library exists (ADR-093): the first call creates it and later calls return the same library, so this is the method to call before writing when no library id is known. Generated and edited media land here when no library is named. The path segment {lib} accepts the literal default, which resolves to this library before the credential check — so an agent that has never listed libraries can still write to the right place. Returns the same Library object as libraries.retrieve; a credential bound to one library reaches this only when that binding covers the default library.
|
|
7896
8318
|
*/
|
|
7897
|
-
export const
|
|
8319
|
+
export const mediaGetDefaultLibrary = (options) => (options?.client ?? client).get({
|
|
7898
8320
|
security: [{
|
|
7899
8321
|
key: 'media-BearerAuth',
|
|
7900
8322
|
scheme: 'bearer',
|
|
7901
8323
|
type: 'http'
|
|
7902
8324
|
}],
|
|
7903
|
-
url: '/media/v1/libraries/
|
|
8325
|
+
url: '/media/v1/libraries/default',
|
|
7904
8326
|
...options
|
|
7905
8327
|
});
|
|
7906
8328
|
/**
|
|
7907
|
-
*
|
|
8329
|
+
* Set default library
|
|
7908
8330
|
*
|
|
7909
|
-
*
|
|
8331
|
+
* Point this organization’s default library at an existing library. Calling ensures the organization’s default library exists (ADR-093): the path is resolved before the credential check, so a first call creates the default library when there is none and then repoints it. The path segment {lib} accepts the literal default, which resolves to this library before the credential check. Supply library_id from library creation or listing; the library must be active and belong to the organization. This changes where library-less generation and uploads land across the whole organization, so it affects other callers as well as this one. It does not move or copy any asset — assets already in the previous default library stay there. Returns the library now set as the default. Deleting the default library is refused with LIBRARY_IS_DEFAULT until another library is made the default.
|
|
7910
8332
|
*/
|
|
7911
|
-
export const
|
|
8333
|
+
export const mediaSetDefaultLibrary = (options) => (options.client ?? client).put({
|
|
7912
8334
|
security: [{
|
|
7913
8335
|
key: 'media-BearerAuth',
|
|
7914
8336
|
scheme: 'bearer',
|
|
7915
8337
|
type: 'http'
|
|
7916
8338
|
}],
|
|
7917
|
-
url: '/media/v1/libraries/
|
|
7918
|
-
...options
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
8339
|
+
url: '/media/v1/libraries/default',
|
|
8340
|
+
...options,
|
|
8341
|
+
headers: {
|
|
8342
|
+
'Content-Type': 'application/json',
|
|
8343
|
+
...options.headers
|
|
8344
|
+
}
|
|
8345
|
+
});
|
|
8346
|
+
/**
|
|
8347
|
+
* Get asset lineage
|
|
7922
8348
|
*
|
|
7923
|
-
*
|
|
8349
|
+
* Read the whole edit tree containing one asset, so a caller sees what it was edited from and what was edited from it. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The response names the root the tree descends from, the asset asked about, and every step between them, each with the operation, prompt and creation time that produced it. Deleted assets stay in the tree, marked deleted, so the chain stays connected after cleanup. This is a read: it starts no processing and changes no asset. Example: GET /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/lineage.
|
|
7924
8350
|
*/
|
|
7925
|
-
export const
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
{
|
|
7929
|
-
key: 'sandbox-ApiKeyAuth',
|
|
7930
|
-
name: 'X-API-Key',
|
|
7931
|
-
type: 'apiKey'
|
|
7932
|
-
},
|
|
7933
|
-
{
|
|
7934
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8351
|
+
export const mediaGetAssetLineage = (options) => (options.client ?? client).get({
|
|
8352
|
+
security: [{
|
|
8353
|
+
key: 'media-BearerAuth',
|
|
7935
8354
|
scheme: 'bearer',
|
|
7936
8355
|
type: 'http'
|
|
7937
|
-
},
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
{
|
|
7950
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8356
|
+
}],
|
|
8357
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/lineage',
|
|
8358
|
+
...options
|
|
8359
|
+
});
|
|
8360
|
+
/**
|
|
8361
|
+
* Summarize understanding failures
|
|
8362
|
+
*
|
|
8363
|
+
* Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.
|
|
8364
|
+
*/
|
|
8365
|
+
export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
|
|
8366
|
+
security: [{
|
|
8367
|
+
key: 'media-BearerAuth',
|
|
7951
8368
|
scheme: 'bearer',
|
|
7952
8369
|
type: 'http'
|
|
7953
|
-
}
|
|
7954
|
-
|
|
7955
|
-
url: '/sandbox/v1/sandboxes',
|
|
8370
|
+
}],
|
|
8371
|
+
url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
|
|
7956
8372
|
...options
|
|
7957
8373
|
});
|
|
7958
8374
|
/**
|
|
7959
|
-
*
|
|
8375
|
+
* List understanding results across a library
|
|
7960
8376
|
*
|
|
7961
|
-
*
|
|
8377
|
+
* Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
|
|
7962
8378
|
*/
|
|
7963
|
-
export const
|
|
7964
|
-
security: [
|
|
7965
|
-
|
|
7966
|
-
key: 'sandbox-ApiKeyAuth',
|
|
7967
|
-
name: 'X-API-Key',
|
|
7968
|
-
type: 'apiKey'
|
|
7969
|
-
},
|
|
7970
|
-
{
|
|
7971
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8379
|
+
export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
|
|
8380
|
+
security: [{
|
|
8381
|
+
key: 'media-BearerAuth',
|
|
7972
8382
|
scheme: 'bearer',
|
|
7973
8383
|
type: 'http'
|
|
7974
|
-
},
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
{
|
|
7987
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8384
|
+
}],
|
|
8385
|
+
url: '/media/v1/libraries/{library_id}/understandings',
|
|
8386
|
+
...options
|
|
8387
|
+
});
|
|
8388
|
+
/**
|
|
8389
|
+
* Create video generation
|
|
8390
|
+
*
|
|
8391
|
+
* 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.
|
|
8392
|
+
*/
|
|
8393
|
+
export const mediaCreateGeneration = (options) => (options.client ?? client).post({
|
|
8394
|
+
security: [{
|
|
8395
|
+
key: 'media-BearerAuth',
|
|
7988
8396
|
scheme: 'bearer',
|
|
7989
8397
|
type: 'http'
|
|
7990
|
-
}
|
|
7991
|
-
|
|
7992
|
-
url: '/sandbox/v1/sandboxes',
|
|
8398
|
+
}],
|
|
8399
|
+
url: '/media/v1/libraries/{library_id}/generations',
|
|
7993
8400
|
...options,
|
|
7994
8401
|
headers: {
|
|
7995
8402
|
'Content-Type': 'application/json',
|
|
@@ -7997,77 +8404,45 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
7997
8404
|
}
|
|
7998
8405
|
});
|
|
7999
8406
|
/**
|
|
8000
|
-
*
|
|
8407
|
+
* List jobs
|
|
8001
8408
|
*
|
|
8002
|
-
*
|
|
8409
|
+
* 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.
|
|
8003
8410
|
*/
|
|
8004
|
-
export const
|
|
8005
|
-
security: [
|
|
8006
|
-
|
|
8007
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8008
|
-
name: 'X-API-Key',
|
|
8009
|
-
type: 'apiKey'
|
|
8010
|
-
},
|
|
8011
|
-
{
|
|
8012
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8013
|
-
scheme: 'bearer',
|
|
8014
|
-
type: 'http'
|
|
8015
|
-
},
|
|
8016
|
-
{
|
|
8017
|
-
key: 'sandbox-AuthProviderTeamAuth',
|
|
8018
|
-
name: 'X-Team-ID',
|
|
8019
|
-
type: 'apiKey'
|
|
8020
|
-
},
|
|
8021
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8022
|
-
{
|
|
8023
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8024
|
-
name: 'X-Team-ID',
|
|
8025
|
-
type: 'apiKey'
|
|
8026
|
-
},
|
|
8027
|
-
{
|
|
8028
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8411
|
+
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
8412
|
+
security: [{
|
|
8413
|
+
key: 'media-BearerAuth',
|
|
8029
8414
|
scheme: 'bearer',
|
|
8030
8415
|
type: 'http'
|
|
8031
|
-
}
|
|
8032
|
-
|
|
8033
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
8416
|
+
}],
|
|
8417
|
+
url: '/media/v1/libraries/{library_id}/jobs',
|
|
8034
8418
|
...options
|
|
8035
8419
|
});
|
|
8036
8420
|
/**
|
|
8037
|
-
*
|
|
8421
|
+
* Cancel job
|
|
8038
8422
|
*
|
|
8039
|
-
*
|
|
8423
|
+
* Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
|
|
8040
8424
|
*/
|
|
8041
|
-
export const
|
|
8042
|
-
security: [
|
|
8043
|
-
|
|
8044
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8045
|
-
name: 'X-API-Key',
|
|
8046
|
-
type: 'apiKey'
|
|
8047
|
-
},
|
|
8048
|
-
{
|
|
8049
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8425
|
+
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
8426
|
+
security: [{
|
|
8427
|
+
key: 'media-BearerAuth',
|
|
8050
8428
|
scheme: 'bearer',
|
|
8051
8429
|
type: 'http'
|
|
8052
|
-
},
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
{
|
|
8065
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8430
|
+
}],
|
|
8431
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
|
|
8432
|
+
...options
|
|
8433
|
+
});
|
|
8434
|
+
/**
|
|
8435
|
+
* Save generation output
|
|
8436
|
+
*
|
|
8437
|
+
* 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.
|
|
8438
|
+
*/
|
|
8439
|
+
export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
|
|
8440
|
+
security: [{
|
|
8441
|
+
key: 'media-BearerAuth',
|
|
8066
8442
|
scheme: 'bearer',
|
|
8067
8443
|
type: 'http'
|
|
8068
|
-
}
|
|
8069
|
-
|
|
8070
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
8444
|
+
}],
|
|
8445
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
|
|
8071
8446
|
...options,
|
|
8072
8447
|
headers: {
|
|
8073
8448
|
'Content-Type': 'application/json',
|
|
@@ -8075,81 +8450,45 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
|
|
|
8075
8450
|
}
|
|
8076
8451
|
});
|
|
8077
8452
|
/**
|
|
8078
|
-
*
|
|
8453
|
+
* Get generation capabilities
|
|
8079
8454
|
*
|
|
8080
|
-
*
|
|
8455
|
+
* 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.
|
|
8081
8456
|
*/
|
|
8082
|
-
export const
|
|
8083
|
-
security: [
|
|
8084
|
-
|
|
8085
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8086
|
-
name: 'X-API-Key',
|
|
8087
|
-
type: 'apiKey'
|
|
8088
|
-
},
|
|
8089
|
-
{
|
|
8090
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8091
|
-
scheme: 'bearer',
|
|
8092
|
-
type: 'http'
|
|
8093
|
-
},
|
|
8094
|
-
{
|
|
8095
|
-
key: 'sandbox-AuthProviderTeamAuth',
|
|
8096
|
-
name: 'X-Team-ID',
|
|
8097
|
-
type: 'apiKey'
|
|
8098
|
-
},
|
|
8099
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8100
|
-
{
|
|
8101
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8102
|
-
name: 'X-Team-ID',
|
|
8103
|
-
type: 'apiKey'
|
|
8104
|
-
},
|
|
8105
|
-
{
|
|
8106
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8457
|
+
export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
8458
|
+
security: [{
|
|
8459
|
+
key: 'media-BearerAuth',
|
|
8107
8460
|
scheme: 'bearer',
|
|
8108
8461
|
type: 'http'
|
|
8109
|
-
}
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
...options,
|
|
8113
|
-
headers: {
|
|
8114
|
-
'Content-Type': 'application/json',
|
|
8115
|
-
...options.headers
|
|
8116
|
-
}
|
|
8462
|
+
}],
|
|
8463
|
+
url: '/media/v1/generation/capabilities',
|
|
8464
|
+
...options
|
|
8117
8465
|
});
|
|
8118
8466
|
/**
|
|
8119
|
-
*
|
|
8467
|
+
* List types
|
|
8120
8468
|
*
|
|
8121
|
-
*
|
|
8469
|
+
* 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.
|
|
8122
8470
|
*/
|
|
8123
|
-
export const
|
|
8124
|
-
security: [
|
|
8125
|
-
|
|
8126
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8127
|
-
name: 'X-API-Key',
|
|
8128
|
-
type: 'apiKey'
|
|
8129
|
-
},
|
|
8130
|
-
{
|
|
8131
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8471
|
+
export const ontologyListTypes = (options) => (options?.client ?? client).get({
|
|
8472
|
+
security: [{
|
|
8473
|
+
key: 'ontology-bearerAuth',
|
|
8132
8474
|
scheme: 'bearer',
|
|
8133
8475
|
type: 'http'
|
|
8134
|
-
},
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
{
|
|
8147
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8476
|
+
}],
|
|
8477
|
+
url: '/ontology/v1/types',
|
|
8478
|
+
...options
|
|
8479
|
+
});
|
|
8480
|
+
/**
|
|
8481
|
+
* Register type
|
|
8482
|
+
*
|
|
8483
|
+
* 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.
|
|
8484
|
+
*/
|
|
8485
|
+
export const ontologyRegisterType = (options) => (options.client ?? client).post({
|
|
8486
|
+
security: [{
|
|
8487
|
+
key: 'ontology-bearerAuth',
|
|
8148
8488
|
scheme: 'bearer',
|
|
8149
8489
|
type: 'http'
|
|
8150
|
-
}
|
|
8151
|
-
|
|
8152
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
8490
|
+
}],
|
|
8491
|
+
url: '/ontology/v1/types',
|
|
8153
8492
|
...options,
|
|
8154
8493
|
headers: {
|
|
8155
8494
|
'Content-Type': 'application/json',
|
|
@@ -8157,77 +8496,77 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
8157
8496
|
}
|
|
8158
8497
|
});
|
|
8159
8498
|
/**
|
|
8160
|
-
*
|
|
8499
|
+
* Retrieve type
|
|
8161
8500
|
*
|
|
8162
|
-
*
|
|
8501
|
+
* 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.
|
|
8163
8502
|
*/
|
|
8164
|
-
export const
|
|
8165
|
-
security: [
|
|
8166
|
-
|
|
8167
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8168
|
-
name: 'X-API-Key',
|
|
8169
|
-
type: 'apiKey'
|
|
8170
|
-
},
|
|
8171
|
-
{
|
|
8172
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8503
|
+
export const ontologyRetrieveType = (options) => (options.client ?? client).get({
|
|
8504
|
+
security: [{
|
|
8505
|
+
key: 'ontology-bearerAuth',
|
|
8173
8506
|
scheme: 'bearer',
|
|
8174
8507
|
type: 'http'
|
|
8175
|
-
},
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
{
|
|
8188
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8508
|
+
}],
|
|
8509
|
+
url: '/ontology/v1/types/{name}',
|
|
8510
|
+
...options
|
|
8511
|
+
});
|
|
8512
|
+
/**
|
|
8513
|
+
* List nodes
|
|
8514
|
+
*
|
|
8515
|
+
* 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.
|
|
8516
|
+
*/
|
|
8517
|
+
export const ontologyListNodes = (options) => (options?.client ?? client).get({
|
|
8518
|
+
security: [{
|
|
8519
|
+
key: 'ontology-bearerAuth',
|
|
8189
8520
|
scheme: 'bearer',
|
|
8190
8521
|
type: 'http'
|
|
8191
|
-
}
|
|
8192
|
-
|
|
8193
|
-
url: '/sandbox/v1/templates',
|
|
8522
|
+
}],
|
|
8523
|
+
url: '/ontology/v1/nodes',
|
|
8194
8524
|
...options
|
|
8195
8525
|
});
|
|
8196
8526
|
/**
|
|
8197
|
-
* Create
|
|
8527
|
+
* Create node
|
|
8198
8528
|
*
|
|
8199
|
-
*
|
|
8529
|
+
* 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; it does not give any agent a memory.
|
|
8200
8530
|
*/
|
|
8201
|
-
export const
|
|
8202
|
-
security: [
|
|
8203
|
-
|
|
8204
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8205
|
-
name: 'X-API-Key',
|
|
8206
|
-
type: 'apiKey'
|
|
8207
|
-
},
|
|
8208
|
-
{
|
|
8209
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
8531
|
+
export const ontologyCreateNode = (options) => (options.client ?? client).post({
|
|
8532
|
+
security: [{
|
|
8533
|
+
key: 'ontology-bearerAuth',
|
|
8210
8534
|
scheme: 'bearer',
|
|
8211
8535
|
type: 'http'
|
|
8212
|
-
},
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8536
|
+
}],
|
|
8537
|
+
url: '/ontology/v1/nodes',
|
|
8538
|
+
...options,
|
|
8539
|
+
headers: {
|
|
8540
|
+
'Content-Type': 'application/json',
|
|
8541
|
+
...options.headers
|
|
8542
|
+
}
|
|
8543
|
+
});
|
|
8544
|
+
/**
|
|
8545
|
+
* Retrieve node
|
|
8546
|
+
*
|
|
8547
|
+
* 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.
|
|
8548
|
+
*/
|
|
8549
|
+
export const ontologyRetrieveNode = (options) => (options.client ?? client).get({
|
|
8550
|
+
security: [{
|
|
8551
|
+
key: 'ontology-bearerAuth',
|
|
8226
8552
|
scheme: 'bearer',
|
|
8227
8553
|
type: 'http'
|
|
8228
|
-
}
|
|
8229
|
-
|
|
8230
|
-
|
|
8554
|
+
}],
|
|
8555
|
+
url: '/ontology/v1/nodes/{node_id}',
|
|
8556
|
+
...options
|
|
8557
|
+
});
|
|
8558
|
+
/**
|
|
8559
|
+
* Update node
|
|
8560
|
+
*
|
|
8561
|
+
* 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.
|
|
8562
|
+
*/
|
|
8563
|
+
export const ontologyUpdateNode = (options) => (options.client ?? client).patch({
|
|
8564
|
+
security: [{
|
|
8565
|
+
key: 'ontology-bearerAuth',
|
|
8566
|
+
scheme: 'bearer',
|
|
8567
|
+
type: 'http'
|
|
8568
|
+
}],
|
|
8569
|
+
url: '/ontology/v1/nodes/{node_id}',
|
|
8231
8570
|
...options,
|
|
8232
8571
|
headers: {
|
|
8233
8572
|
'Content-Type': 'application/json',
|
|
@@ -8235,11 +8574,144 @@ export const requestTemplateBuild = (options) => (options.client ?? client).post
|
|
|
8235
8574
|
}
|
|
8236
8575
|
});
|
|
8237
8576
|
/**
|
|
8238
|
-
*
|
|
8577
|
+
* Retrieve neighborhood
|
|
8239
8578
|
*
|
|
8240
|
-
*
|
|
8579
|
+
* Load the subgraph around one node instead of the whole graph — the read to use when a screen or an agent needs the context of one entity. Returns the start node, every node within depth hops of it, the relations whose both ends are in that set, and truncated true when the node limit cut the walk short. direction chooses which way relations are followed; as_of and include_invalid read the graph as those parameters do elsewhere. Visibility is exactly nodes.retrieve's — a node you may reach but not read comes back restricted with its name only, and relations touching it are withheld, so this read never reaches further than a node read does. The node id comes from nodes.list, nodes.create or a changeset; an unknown one answers ONTOLOGY_NODE_NOT_FOUND, the same answer nodes.retrieve gives.
|
|
8241
8580
|
*/
|
|
8242
|
-
export const
|
|
8581
|
+
export const ontologyNeighborhood = (options) => (options.client ?? client).get({
|
|
8582
|
+
security: [{
|
|
8583
|
+
key: 'ontology-bearerAuth',
|
|
8584
|
+
scheme: 'bearer',
|
|
8585
|
+
type: 'http'
|
|
8586
|
+
}],
|
|
8587
|
+
url: '/ontology/v1/nodes/{node_id}/neighborhood',
|
|
8588
|
+
...options
|
|
8589
|
+
});
|
|
8590
|
+
/**
|
|
8591
|
+
* Merge node
|
|
8592
|
+
*
|
|
8593
|
+
* 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.
|
|
8594
|
+
*/
|
|
8595
|
+
export const ontologyMergeNode = (options) => (options.client ?? client).post({
|
|
8596
|
+
security: [{
|
|
8597
|
+
key: 'ontology-bearerAuth',
|
|
8598
|
+
scheme: 'bearer',
|
|
8599
|
+
type: 'http'
|
|
8600
|
+
}],
|
|
8601
|
+
url: '/ontology/v1/nodes/{node_id}/merge',
|
|
8602
|
+
...options,
|
|
8603
|
+
headers: {
|
|
8604
|
+
'Content-Type': 'application/json',
|
|
8605
|
+
...options.headers
|
|
8606
|
+
}
|
|
8607
|
+
});
|
|
8608
|
+
/**
|
|
8609
|
+
* List relations
|
|
8610
|
+
*
|
|
8611
|
+
* 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.
|
|
8612
|
+
*/
|
|
8613
|
+
export const ontologyListRelations = (options) => (options?.client ?? client).get({
|
|
8614
|
+
security: [{
|
|
8615
|
+
key: 'ontology-bearerAuth',
|
|
8616
|
+
scheme: 'bearer',
|
|
8617
|
+
type: 'http'
|
|
8618
|
+
}],
|
|
8619
|
+
url: '/ontology/v1/relations',
|
|
8620
|
+
...options
|
|
8621
|
+
});
|
|
8622
|
+
/**
|
|
8623
|
+
* Create relation
|
|
8624
|
+
*
|
|
8625
|
+
* 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; it does not give any agent a memory.
|
|
8626
|
+
*/
|
|
8627
|
+
export const ontologyCreateRelation = (options) => (options.client ?? client).post({
|
|
8628
|
+
security: [{
|
|
8629
|
+
key: 'ontology-bearerAuth',
|
|
8630
|
+
scheme: 'bearer',
|
|
8631
|
+
type: 'http'
|
|
8632
|
+
}],
|
|
8633
|
+
url: '/ontology/v1/relations',
|
|
8634
|
+
...options,
|
|
8635
|
+
headers: {
|
|
8636
|
+
'Content-Type': 'application/json',
|
|
8637
|
+
...options.headers
|
|
8638
|
+
}
|
|
8639
|
+
});
|
|
8640
|
+
/**
|
|
8641
|
+
* Retrieve relation
|
|
8642
|
+
*
|
|
8643
|
+
* 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.
|
|
8644
|
+
*/
|
|
8645
|
+
export const ontologyRetrieveRelation = (options) => (options.client ?? client).get({
|
|
8646
|
+
security: [{
|
|
8647
|
+
key: 'ontology-bearerAuth',
|
|
8648
|
+
scheme: 'bearer',
|
|
8649
|
+
type: 'http'
|
|
8650
|
+
}],
|
|
8651
|
+
url: '/ontology/v1/relations/{relation_id}',
|
|
8652
|
+
...options
|
|
8653
|
+
});
|
|
8654
|
+
/**
|
|
8655
|
+
* Invalidate relation
|
|
8656
|
+
*
|
|
8657
|
+
* 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.
|
|
8658
|
+
*/
|
|
8659
|
+
export const ontologyInvalidateRelation = (options) => (options.client ?? client).post({
|
|
8660
|
+
security: [{
|
|
8661
|
+
key: 'ontology-bearerAuth',
|
|
8662
|
+
scheme: 'bearer',
|
|
8663
|
+
type: 'http'
|
|
8664
|
+
}],
|
|
8665
|
+
url: '/ontology/v1/relations/{relation_id}/invalidate',
|
|
8666
|
+
...options,
|
|
8667
|
+
headers: {
|
|
8668
|
+
'Content-Type': 'application/json',
|
|
8669
|
+
...options.headers
|
|
8670
|
+
}
|
|
8671
|
+
});
|
|
8672
|
+
/**
|
|
8673
|
+
* Apply changeset
|
|
8674
|
+
*
|
|
8675
|
+
* 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.
|
|
8676
|
+
*/
|
|
8677
|
+
export const ontologyApplyChangeset = (options) => (options.client ?? client).post({
|
|
8678
|
+
security: [{
|
|
8679
|
+
key: 'ontology-bearerAuth',
|
|
8680
|
+
scheme: 'bearer',
|
|
8681
|
+
type: 'http'
|
|
8682
|
+
}],
|
|
8683
|
+
url: '/ontology/v1/changesets',
|
|
8684
|
+
...options,
|
|
8685
|
+
headers: {
|
|
8686
|
+
'Content-Type': 'application/json',
|
|
8687
|
+
...options.headers
|
|
8688
|
+
}
|
|
8689
|
+
});
|
|
8690
|
+
/**
|
|
8691
|
+
* Search nodes
|
|
8692
|
+
*
|
|
8693
|
+
* 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's recall, which reads the graph from that agent's own viewpoint inside its sessions.
|
|
8694
|
+
*/
|
|
8695
|
+
export const ontologySearch = (options) => (options.client ?? client).post({
|
|
8696
|
+
security: [{
|
|
8697
|
+
key: 'ontology-bearerAuth',
|
|
8698
|
+
scheme: 'bearer',
|
|
8699
|
+
type: 'http'
|
|
8700
|
+
}],
|
|
8701
|
+
url: '/ontology/v1/search',
|
|
8702
|
+
...options,
|
|
8703
|
+
headers: {
|
|
8704
|
+
'Content-Type': 'application/json',
|
|
8705
|
+
...options.headers
|
|
8706
|
+
}
|
|
8707
|
+
});
|
|
8708
|
+
/**
|
|
8709
|
+
* List sandboxes (v2)
|
|
8710
|
+
*
|
|
8711
|
+
* List your running and paused sandboxes with paging and filters. Use it to find a sandboxID before connecting to, pausing or killing a sandbox. Filter by state, template (id or alias), name, metadata (key=value pairs joined with &) and startedAfter; order sorts by start time (default newest first); limit is 1 to 100 (default 100). When more results exist the response carries an x-next-token header; send it back as nextToken for the next page. To read one sandbox use getSandbox.
|
|
8712
|
+
*/
|
|
8713
|
+
export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
8714
|
+
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8243
8715
|
security: [
|
|
8244
8716
|
{
|
|
8245
8717
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8268,15 +8740,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
|
|
|
8268
8740
|
type: 'http'
|
|
8269
8741
|
}
|
|
8270
8742
|
],
|
|
8271
|
-
url: '/sandbox/v1/
|
|
8743
|
+
url: '/sandbox/v1/sandboxes',
|
|
8272
8744
|
...options
|
|
8273
8745
|
});
|
|
8274
8746
|
/**
|
|
8275
|
-
* Create
|
|
8747
|
+
* Create sandbox (v2)
|
|
8276
8748
|
*
|
|
8277
|
-
* Create a
|
|
8749
|
+
* Create a sandbox from the template. All system communication with the sandbox is secured.
|
|
8278
8750
|
*/
|
|
8279
|
-
export const
|
|
8751
|
+
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
8280
8752
|
security: [
|
|
8281
8753
|
{
|
|
8282
8754
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8305,7 +8777,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
8305
8777
|
type: 'http'
|
|
8306
8778
|
}
|
|
8307
8779
|
],
|
|
8308
|
-
url: '/sandbox/v1/
|
|
8780
|
+
url: '/sandbox/v1/sandboxes',
|
|
8309
8781
|
...options,
|
|
8310
8782
|
headers: {
|
|
8311
8783
|
'Content-Type': 'application/json',
|
|
@@ -8313,11 +8785,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
8313
8785
|
}
|
|
8314
8786
|
});
|
|
8315
8787
|
/**
|
|
8316
|
-
*
|
|
8788
|
+
* Sandbox metrics
|
|
8317
8789
|
*
|
|
8318
|
-
*
|
|
8790
|
+
* Read CPU, memory and disk usage samples of a sandbox over a time window. Use it to size a sandbox or find out why it is slow. start and end are Unix timestamps in seconds; without them the recent samples are returned. An unknown id answers 404.
|
|
8319
8791
|
*/
|
|
8320
|
-
export const
|
|
8792
|
+
export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
|
|
8321
8793
|
security: [
|
|
8322
8794
|
{
|
|
8323
8795
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8346,15 +8818,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
|
|
|
8346
8818
|
type: 'http'
|
|
8347
8819
|
}
|
|
8348
8820
|
],
|
|
8349
|
-
url: '/sandbox/v1/
|
|
8821
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
8350
8822
|
...options
|
|
8351
8823
|
});
|
|
8352
8824
|
/**
|
|
8353
|
-
*
|
|
8825
|
+
* Pause sandbox
|
|
8354
8826
|
*
|
|
8355
|
-
*
|
|
8827
|
+
* Pause a running sandbox, keeping its files and memory so that connectSandbox can resume it later. Use it to stop paying for compute without losing state; to discard the sandbox use killSandbox. Success answers 204. A sandbox that is not running answers 409.
|
|
8356
8828
|
*/
|
|
8357
|
-
export const
|
|
8829
|
+
export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
|
|
8358
8830
|
security: [
|
|
8359
8831
|
{
|
|
8360
8832
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8383,15 +8855,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
|
|
|
8383
8855
|
type: 'http'
|
|
8384
8856
|
}
|
|
8385
8857
|
],
|
|
8386
|
-
url: '/sandbox/v1/
|
|
8387
|
-
...options
|
|
8858
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
8859
|
+
...options,
|
|
8860
|
+
headers: {
|
|
8861
|
+
'Content-Type': 'application/json',
|
|
8862
|
+
...options.headers
|
|
8863
|
+
}
|
|
8388
8864
|
});
|
|
8389
8865
|
/**
|
|
8390
|
-
*
|
|
8866
|
+
* Set sandbox timeout
|
|
8391
8867
|
*
|
|
8392
|
-
*
|
|
8868
|
+
* Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
|
|
8393
8869
|
*/
|
|
8394
|
-
export const
|
|
8870
|
+
export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
|
|
8395
8871
|
security: [
|
|
8396
8872
|
{
|
|
8397
8873
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8420,7 +8896,7 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
8420
8896
|
type: 'http'
|
|
8421
8897
|
}
|
|
8422
8898
|
],
|
|
8423
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8899
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
|
|
8424
8900
|
...options,
|
|
8425
8901
|
headers: {
|
|
8426
8902
|
'Content-Type': 'application/json',
|
|
@@ -8428,11 +8904,11 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
8428
8904
|
}
|
|
8429
8905
|
});
|
|
8430
8906
|
/**
|
|
8431
|
-
*
|
|
8907
|
+
* Connect sandbox (v2)
|
|
8432
8908
|
*
|
|
8433
|
-
*
|
|
8909
|
+
* Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.
|
|
8434
8910
|
*/
|
|
8435
|
-
export const
|
|
8911
|
+
export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
|
|
8436
8912
|
security: [
|
|
8437
8913
|
{
|
|
8438
8914
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8461,7 +8937,7 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
8461
8937
|
type: 'http'
|
|
8462
8938
|
}
|
|
8463
8939
|
],
|
|
8464
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8940
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
8465
8941
|
...options,
|
|
8466
8942
|
headers: {
|
|
8467
8943
|
'Content-Type': 'application/json',
|
|
@@ -8469,11 +8945,11 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
8469
8945
|
}
|
|
8470
8946
|
});
|
|
8471
8947
|
/**
|
|
8472
|
-
* List
|
|
8948
|
+
* List templates (v2)
|
|
8473
8949
|
*
|
|
8474
|
-
* List
|
|
8950
|
+
* List official templates and all your custom templates, including waiting, building, ready and error builds. Custom templates appear first; each custom row describes its latest build, not necessarily the current ready build. Use templateID for build management and a ready template name when creating a sandbox. Own-face official distinguishes public catalog entries; sourceKind is omitted until a source is submitted and on official templates. Other organizations' templates are invisible.
|
|
8475
8951
|
*/
|
|
8476
|
-
export const
|
|
8952
|
+
export const listSandboxTemplates = (options) => (options?.client ?? client).get({
|
|
8477
8953
|
security: [
|
|
8478
8954
|
{
|
|
8479
8955
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8502,15 +8978,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
|
|
|
8502
8978
|
type: 'http'
|
|
8503
8979
|
}
|
|
8504
8980
|
],
|
|
8505
|
-
url: '/sandbox/v1/
|
|
8981
|
+
url: '/sandbox/v1/templates',
|
|
8506
8982
|
...options
|
|
8507
8983
|
});
|
|
8508
8984
|
/**
|
|
8509
|
-
*
|
|
8985
|
+
* Create template (v3)
|
|
8510
8986
|
*
|
|
8511
|
-
*
|
|
8987
|
+
* Reserve a waiting build before submitting its source. Reusing a name in your organization allocates a new build on the same template. Returns templateID and buildID; start it with templates.builds.update, then poll templates.builds.status.list. A name:tag suffix and tags are assigned after successful publication. Example: {"name":"my-template","cpuCount":2,"memoryMB":2048}. The own face also accepts diskGb, a positive integer defaulting to 10 GiB.
|
|
8512
8988
|
*/
|
|
8513
|
-
export const
|
|
8989
|
+
export const requestTemplateBuild = (options) => (options.client ?? client).post({
|
|
8514
8990
|
security: [
|
|
8515
8991
|
{
|
|
8516
8992
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8539,15 +9015,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
|
|
|
8539
9015
|
type: 'http'
|
|
8540
9016
|
}
|
|
8541
9017
|
],
|
|
8542
|
-
url: '/sandbox/v1/
|
|
8543
|
-
...options
|
|
9018
|
+
url: '/sandbox/v1/templates',
|
|
9019
|
+
...options,
|
|
9020
|
+
headers: {
|
|
9021
|
+
'Content-Type': 'application/json',
|
|
9022
|
+
...options.headers
|
|
9023
|
+
}
|
|
8544
9024
|
});
|
|
8545
9025
|
/**
|
|
8546
|
-
*
|
|
9026
|
+
* List team volumes
|
|
8547
9027
|
*
|
|
8548
|
-
*
|
|
9028
|
+
* List the volumes of your team. Use it to find a volumeID before reading or deleting a volume, or to attach a volume to a sandbox by name when you create it.
|
|
8549
9029
|
*/
|
|
8550
|
-
export const
|
|
9030
|
+
export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
|
|
8551
9031
|
security: [
|
|
8552
9032
|
{
|
|
8553
9033
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8576,19 +9056,15 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
8576
9056
|
type: 'http'
|
|
8577
9057
|
}
|
|
8578
9058
|
],
|
|
8579
|
-
url: '/sandbox/v1/
|
|
8580
|
-
...options
|
|
8581
|
-
|
|
8582
|
-
'Content-Type': 'application/json',
|
|
8583
|
-
...options.headers
|
|
8584
|
-
}
|
|
8585
|
-
});
|
|
9059
|
+
url: '/sandbox/v1/volumes',
|
|
9060
|
+
...options
|
|
9061
|
+
});
|
|
8586
9062
|
/**
|
|
8587
|
-
*
|
|
9063
|
+
* Create team volume
|
|
8588
9064
|
*
|
|
8589
|
-
*
|
|
9065
|
+
* Create a team volume: persistent storage that can be mounted into sandboxes and outlives them. Send the volume name; the response returns the volume id and name. Use getVolume to read it back and deleteVolume to remove it.
|
|
8590
9066
|
*/
|
|
8591
|
-
export const
|
|
9067
|
+
export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
|
|
8592
9068
|
security: [
|
|
8593
9069
|
{
|
|
8594
9070
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8617,15 +9093,56 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
|
|
|
8617
9093
|
type: 'http'
|
|
8618
9094
|
}
|
|
8619
9095
|
],
|
|
8620
|
-
url: '/sandbox/v1/
|
|
9096
|
+
url: '/sandbox/v1/volumes',
|
|
9097
|
+
...options,
|
|
9098
|
+
headers: {
|
|
9099
|
+
'Content-Type': 'application/json',
|
|
9100
|
+
...options.headers
|
|
9101
|
+
}
|
|
9102
|
+
});
|
|
9103
|
+
/**
|
|
9104
|
+
* Delete team volume
|
|
9105
|
+
*
|
|
9106
|
+
* Delete a team volume and its data permanently. Use it only when no sandbox needs the volume any more; the data cannot be recovered. Success answers 204; an unknown id answers 404.
|
|
9107
|
+
*/
|
|
9108
|
+
export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
|
|
9109
|
+
security: [
|
|
9110
|
+
{
|
|
9111
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9112
|
+
name: 'X-API-Key',
|
|
9113
|
+
type: 'apiKey'
|
|
9114
|
+
},
|
|
9115
|
+
{
|
|
9116
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9117
|
+
scheme: 'bearer',
|
|
9118
|
+
type: 'http'
|
|
9119
|
+
},
|
|
9120
|
+
{
|
|
9121
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9122
|
+
name: 'X-Team-ID',
|
|
9123
|
+
type: 'apiKey'
|
|
9124
|
+
},
|
|
9125
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9126
|
+
{
|
|
9127
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9128
|
+
name: 'X-Team-ID',
|
|
9129
|
+
type: 'apiKey'
|
|
9130
|
+
},
|
|
9131
|
+
{
|
|
9132
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9133
|
+
scheme: 'bearer',
|
|
9134
|
+
type: 'http'
|
|
9135
|
+
}
|
|
9136
|
+
],
|
|
9137
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
8621
9138
|
...options
|
|
8622
9139
|
});
|
|
8623
9140
|
/**
|
|
8624
|
-
*
|
|
9141
|
+
* Team volume
|
|
8625
9142
|
*
|
|
8626
|
-
*
|
|
9143
|
+
* Read one team volume by id. Use it to confirm a volume exists and to read its name before mounting it in a sandbox. An unknown id answers 404.
|
|
8627
9144
|
*/
|
|
8628
|
-
export const
|
|
9145
|
+
export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
|
|
8629
9146
|
security: [
|
|
8630
9147
|
{
|
|
8631
9148
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8654,7 +9171,44 @@ export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
|
8654
9171
|
type: 'http'
|
|
8655
9172
|
}
|
|
8656
9173
|
],
|
|
8657
|
-
url: '/sandbox/v1/
|
|
9174
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
9175
|
+
...options
|
|
9176
|
+
});
|
|
9177
|
+
/**
|
|
9178
|
+
* Fork sandbox
|
|
9179
|
+
*
|
|
9180
|
+
* Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.
|
|
9181
|
+
*/
|
|
9182
|
+
export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
|
|
9183
|
+
security: [
|
|
9184
|
+
{
|
|
9185
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9186
|
+
name: 'X-API-Key',
|
|
9187
|
+
type: 'apiKey'
|
|
9188
|
+
},
|
|
9189
|
+
{
|
|
9190
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9191
|
+
scheme: 'bearer',
|
|
9192
|
+
type: 'http'
|
|
9193
|
+
},
|
|
9194
|
+
{
|
|
9195
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9196
|
+
name: 'X-Team-ID',
|
|
9197
|
+
type: 'apiKey'
|
|
9198
|
+
},
|
|
9199
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9200
|
+
{
|
|
9201
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9202
|
+
name: 'X-Team-ID',
|
|
9203
|
+
type: 'apiKey'
|
|
9204
|
+
},
|
|
9205
|
+
{
|
|
9206
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9207
|
+
scheme: 'bearer',
|
|
9208
|
+
type: 'http'
|
|
9209
|
+
}
|
|
9210
|
+
],
|
|
9211
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
|
|
8658
9212
|
...options,
|
|
8659
9213
|
headers: {
|
|
8660
9214
|
'Content-Type': 'application/json',
|
|
@@ -8662,11 +9216,11 @@ export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
|
8662
9216
|
}
|
|
8663
9217
|
});
|
|
8664
9218
|
/**
|
|
8665
|
-
*
|
|
9219
|
+
* Create snapshot
|
|
8666
9220
|
*
|
|
8667
|
-
*
|
|
9221
|
+
* Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
|
|
8668
9222
|
*/
|
|
8669
|
-
export const
|
|
9223
|
+
export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
|
|
8670
9224
|
security: [
|
|
8671
9225
|
{
|
|
8672
9226
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8695,15 +9249,134 @@ export const getTemplateBuildStatus = (options) => (options.client ?? client).ge
|
|
|
8695
9249
|
type: 'http'
|
|
8696
9250
|
}
|
|
8697
9251
|
],
|
|
8698
|
-
url: '/sandbox/v1/
|
|
9252
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
|
|
9253
|
+
...options,
|
|
9254
|
+
headers: {
|
|
9255
|
+
'Content-Type': 'application/json',
|
|
9256
|
+
...options.headers
|
|
9257
|
+
}
|
|
9258
|
+
});
|
|
9259
|
+
/**
|
|
9260
|
+
* List snapshots
|
|
9261
|
+
*
|
|
9262
|
+
* List the snapshots you created, one cursor page at a time. Use it to find a snapshot id before you create a sandbox from it or delete it. Filter by sandboxID (the source sandbox) or by name or snapshot id, optionally tag-qualified; limit is 1 to 100 (default 100). When more results exist send the cursor from the response back as nextToken.
|
|
9263
|
+
*/
|
|
9264
|
+
export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
|
|
9265
|
+
security: [
|
|
9266
|
+
{
|
|
9267
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9268
|
+
name: 'X-API-Key',
|
|
9269
|
+
type: 'apiKey'
|
|
9270
|
+
},
|
|
9271
|
+
{
|
|
9272
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9273
|
+
scheme: 'bearer',
|
|
9274
|
+
type: 'http'
|
|
9275
|
+
},
|
|
9276
|
+
{
|
|
9277
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9278
|
+
name: 'X-Team-ID',
|
|
9279
|
+
type: 'apiKey'
|
|
9280
|
+
},
|
|
9281
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9282
|
+
{
|
|
9283
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9284
|
+
name: 'X-Team-ID',
|
|
9285
|
+
type: 'apiKey'
|
|
9286
|
+
},
|
|
9287
|
+
{
|
|
9288
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9289
|
+
scheme: 'bearer',
|
|
9290
|
+
type: 'http'
|
|
9291
|
+
}
|
|
9292
|
+
],
|
|
9293
|
+
url: '/sandbox/v1/snapshots',
|
|
8699
9294
|
...options
|
|
8700
9295
|
});
|
|
8701
9296
|
/**
|
|
8702
9297
|
* Delete template
|
|
8703
9298
|
*
|
|
8704
|
-
*
|
|
9299
|
+
* Delete one of your snapshots. Sandboxes already created from it keep running; no new sandbox can be created from it afterwards. Success answers 204. A snapshot that does not exist or belongs to someone else answers 404.
|
|
8705
9300
|
*/
|
|
8706
|
-
export const
|
|
9301
|
+
export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
|
|
9302
|
+
security: [
|
|
9303
|
+
{
|
|
9304
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9305
|
+
name: 'X-API-Key',
|
|
9306
|
+
type: 'apiKey'
|
|
9307
|
+
},
|
|
9308
|
+
{
|
|
9309
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9310
|
+
scheme: 'bearer',
|
|
9311
|
+
type: 'http'
|
|
9312
|
+
},
|
|
9313
|
+
{
|
|
9314
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9315
|
+
name: 'X-Team-ID',
|
|
9316
|
+
type: 'apiKey'
|
|
9317
|
+
},
|
|
9318
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9319
|
+
{
|
|
9320
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9321
|
+
name: 'X-Team-ID',
|
|
9322
|
+
type: 'apiKey'
|
|
9323
|
+
},
|
|
9324
|
+
{
|
|
9325
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9326
|
+
scheme: 'bearer',
|
|
9327
|
+
type: 'http'
|
|
9328
|
+
}
|
|
9329
|
+
],
|
|
9330
|
+
url: '/sandbox/v1/snapshots/{snapshotID}',
|
|
9331
|
+
...options
|
|
9332
|
+
});
|
|
9333
|
+
/**
|
|
9334
|
+
* Update sandbox network
|
|
9335
|
+
*
|
|
9336
|
+
* Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
|
|
9337
|
+
*/
|
|
9338
|
+
export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
|
|
9339
|
+
security: [
|
|
9340
|
+
{
|
|
9341
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9342
|
+
name: 'X-API-Key',
|
|
9343
|
+
type: 'apiKey'
|
|
9344
|
+
},
|
|
9345
|
+
{
|
|
9346
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9347
|
+
scheme: 'bearer',
|
|
9348
|
+
type: 'http'
|
|
9349
|
+
},
|
|
9350
|
+
{
|
|
9351
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9352
|
+
name: 'X-Team-ID',
|
|
9353
|
+
type: 'apiKey'
|
|
9354
|
+
},
|
|
9355
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9356
|
+
{
|
|
9357
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9358
|
+
name: 'X-Team-ID',
|
|
9359
|
+
type: 'apiKey'
|
|
9360
|
+
},
|
|
9361
|
+
{
|
|
9362
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9363
|
+
scheme: 'bearer',
|
|
9364
|
+
type: 'http'
|
|
9365
|
+
}
|
|
9366
|
+
],
|
|
9367
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/network',
|
|
9368
|
+
...options,
|
|
9369
|
+
headers: {
|
|
9370
|
+
'Content-Type': 'application/json',
|
|
9371
|
+
...options.headers
|
|
9372
|
+
}
|
|
9373
|
+
});
|
|
9374
|
+
/**
|
|
9375
|
+
* Sandbox logs (v2)
|
|
9376
|
+
*
|
|
9377
|
+
* Read the log lines of a sandbox. Use it to debug what ran inside a sandbox. cursor is a start timestamp in milliseconds, direction chooses forward or backward from it, level sets the lowest level to return, search is a case-sensitive substring filter (at most 256 characters) and limit caps the count (at most 1000, default 1000). To continue, pass the timestamp of the last entry as the next cursor.
|
|
9378
|
+
*/
|
|
9379
|
+
export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
|
|
8707
9380
|
security: [
|
|
8708
9381
|
{
|
|
8709
9382
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -8730,83 +9403,1387 @@ export const deleteUserTemplate = (options) => (options.client ?? client).delete
|
|
|
8730
9403
|
key: 'sandbox-AdminJWTAuth',
|
|
8731
9404
|
scheme: 'bearer',
|
|
8732
9405
|
type: 'http'
|
|
8733
|
-
}
|
|
8734
|
-
],
|
|
8735
|
-
url: '/sandbox/v1/
|
|
9406
|
+
}
|
|
9407
|
+
],
|
|
9408
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
|
|
9409
|
+
...options
|
|
9410
|
+
});
|
|
9411
|
+
/**
|
|
9412
|
+
* Start template build (v2)
|
|
9413
|
+
*
|
|
9414
|
+
* Submit source for a waiting build returned by templates.create; returns 202 after queueing, not after successful publication. Unlike E2B, COPY is rejected (use RUN curl or git clone), fromTemplate accepts official catalog names only, and plaintext registry credentials are rejected. The own face also accepts dockerfile, mutually exclusive with fromImage/fromTemplate/steps, and fromImageRegistry vault references for nonofficial images. Poll templates.builds.status.list until ready or error. Example: {"fromImage":"node:22","steps":[{"type":"RUN","args":["echo hello"]}]}.
|
|
9415
|
+
*/
|
|
9416
|
+
export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
9417
|
+
security: [
|
|
9418
|
+
{
|
|
9419
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9420
|
+
name: 'X-API-Key',
|
|
9421
|
+
type: 'apiKey'
|
|
9422
|
+
},
|
|
9423
|
+
{
|
|
9424
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9425
|
+
scheme: 'bearer',
|
|
9426
|
+
type: 'http'
|
|
9427
|
+
},
|
|
9428
|
+
{
|
|
9429
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9430
|
+
name: 'X-Team-ID',
|
|
9431
|
+
type: 'apiKey'
|
|
9432
|
+
},
|
|
9433
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9434
|
+
{
|
|
9435
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9436
|
+
name: 'X-Team-ID',
|
|
9437
|
+
type: 'apiKey'
|
|
9438
|
+
},
|
|
9439
|
+
{
|
|
9440
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9441
|
+
scheme: 'bearer',
|
|
9442
|
+
type: 'http'
|
|
9443
|
+
}
|
|
9444
|
+
],
|
|
9445
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
|
|
9446
|
+
...options,
|
|
9447
|
+
headers: {
|
|
9448
|
+
'Content-Type': 'application/json',
|
|
9449
|
+
...options.headers
|
|
9450
|
+
}
|
|
9451
|
+
});
|
|
9452
|
+
/**
|
|
9453
|
+
* Template build status
|
|
9454
|
+
*
|
|
9455
|
+
* Poll a build using templateID and buildID from templates.create. waiting means source has not been submitted; building includes queued work; ready permits sandbox creation; error is terminal, with reason when available. logsOffset counts previously read log entries, starting at zero; add logEntries.length after each response. limit is 0–100, default 100. level selects one log level; offsets then count entries at that level. Drain logs until an empty page, including after a terminal status.
|
|
9456
|
+
*/
|
|
9457
|
+
export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
|
|
9458
|
+
security: [
|
|
9459
|
+
{
|
|
9460
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9461
|
+
name: 'X-API-Key',
|
|
9462
|
+
type: 'apiKey'
|
|
9463
|
+
},
|
|
9464
|
+
{
|
|
9465
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9466
|
+
scheme: 'bearer',
|
|
9467
|
+
type: 'http'
|
|
9468
|
+
},
|
|
9469
|
+
{
|
|
9470
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9471
|
+
name: 'X-Team-ID',
|
|
9472
|
+
type: 'apiKey'
|
|
9473
|
+
},
|
|
9474
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9475
|
+
{
|
|
9476
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9477
|
+
name: 'X-Team-ID',
|
|
9478
|
+
type: 'apiKey'
|
|
9479
|
+
},
|
|
9480
|
+
{
|
|
9481
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9482
|
+
scheme: 'bearer',
|
|
9483
|
+
type: 'http'
|
|
9484
|
+
}
|
|
9485
|
+
],
|
|
9486
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
|
|
9487
|
+
...options
|
|
9488
|
+
});
|
|
9489
|
+
/**
|
|
9490
|
+
* Delete template
|
|
9491
|
+
*
|
|
9492
|
+
* Permanently remove your template, its builds and tag assignments using templateID from templates.create. Active instances prevent deletion with 409; terminate them first. Unknown or other-organization IDs return 404. Snapshot IDs use snapshots.delete instead.
|
|
9493
|
+
*/
|
|
9494
|
+
export const deleteUserTemplate = (options) => (options.client ?? client).delete({
|
|
9495
|
+
security: [
|
|
9496
|
+
{
|
|
9497
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9498
|
+
name: 'X-API-Key',
|
|
9499
|
+
type: 'apiKey'
|
|
9500
|
+
},
|
|
9501
|
+
{
|
|
9502
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9503
|
+
scheme: 'bearer',
|
|
9504
|
+
type: 'http'
|
|
9505
|
+
},
|
|
9506
|
+
{
|
|
9507
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9508
|
+
name: 'X-Team-ID',
|
|
9509
|
+
type: 'apiKey'
|
|
9510
|
+
},
|
|
9511
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9512
|
+
{
|
|
9513
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9514
|
+
name: 'X-Team-ID',
|
|
9515
|
+
type: 'apiKey'
|
|
9516
|
+
},
|
|
9517
|
+
{
|
|
9518
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9519
|
+
scheme: 'bearer',
|
|
9520
|
+
type: 'http'
|
|
9521
|
+
}
|
|
9522
|
+
],
|
|
9523
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
9524
|
+
...options
|
|
9525
|
+
});
|
|
9526
|
+
/**
|
|
9527
|
+
* List template builds
|
|
9528
|
+
*
|
|
9529
|
+
* Inspect your template and its newest builds using templateID from templates.create. Build states are waiting, building, ready or error. Use limit and the returned x-next-token header to page builds. Unknown or other-organization templates return 404.
|
|
9530
|
+
*/
|
|
9531
|
+
export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
|
|
9532
|
+
security: [
|
|
9533
|
+
{
|
|
9534
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9535
|
+
name: 'X-API-Key',
|
|
9536
|
+
type: 'apiKey'
|
|
9537
|
+
},
|
|
9538
|
+
{
|
|
9539
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9540
|
+
scheme: 'bearer',
|
|
9541
|
+
type: 'http'
|
|
9542
|
+
},
|
|
9543
|
+
{
|
|
9544
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9545
|
+
name: 'X-Team-ID',
|
|
9546
|
+
type: 'apiKey'
|
|
9547
|
+
},
|
|
9548
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9549
|
+
{
|
|
9550
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9551
|
+
name: 'X-Team-ID',
|
|
9552
|
+
type: 'apiKey'
|
|
9553
|
+
},
|
|
9554
|
+
{
|
|
9555
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9556
|
+
scheme: 'bearer',
|
|
9557
|
+
type: 'http'
|
|
9558
|
+
}
|
|
9559
|
+
],
|
|
9560
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
9561
|
+
...options
|
|
9562
|
+
});
|
|
9563
|
+
/**
|
|
9564
|
+
* Delete template tags
|
|
9565
|
+
*
|
|
9566
|
+
* Remove the specified tag labels from your template by name, for example {"name":"my-template","tags":["stable"]}. Builds remain available. Removing default means untagged sandbox creation no longer resolves this template. Unknown or other-organization names return 404. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags.
|
|
9567
|
+
*/
|
|
9568
|
+
export const deleteTemplateTags = (options) => (options.client ?? client).delete({
|
|
9569
|
+
security: [
|
|
9570
|
+
{
|
|
9571
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9572
|
+
name: 'X-API-Key',
|
|
9573
|
+
type: 'apiKey'
|
|
9574
|
+
},
|
|
9575
|
+
{
|
|
9576
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9577
|
+
scheme: 'bearer',
|
|
9578
|
+
type: 'http'
|
|
9579
|
+
},
|
|
9580
|
+
{
|
|
9581
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9582
|
+
name: 'X-Team-ID',
|
|
9583
|
+
type: 'apiKey'
|
|
9584
|
+
},
|
|
9585
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9586
|
+
{
|
|
9587
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9588
|
+
name: 'X-Team-ID',
|
|
9589
|
+
type: 'apiKey'
|
|
9590
|
+
},
|
|
9591
|
+
{
|
|
9592
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9593
|
+
scheme: 'bearer',
|
|
9594
|
+
type: 'http'
|
|
9595
|
+
}
|
|
9596
|
+
],
|
|
9597
|
+
url: '/sandbox/v1/templates/tags',
|
|
9598
|
+
...options,
|
|
9599
|
+
headers: {
|
|
9600
|
+
'Content-Type': 'application/json',
|
|
9601
|
+
...options.headers
|
|
9602
|
+
}
|
|
9603
|
+
});
|
|
9604
|
+
/**
|
|
9605
|
+
* Assign template tags
|
|
9606
|
+
*
|
|
9607
|
+
* Assign tags to the ready build selected by target in name:tag format, for example {"target":"my-template:default","tags":["stable"]}. Names belong to your organization. Tags move an existing label to this build without rebuilding. Obtain available names from templates.list and tags from templates.tags.list. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags. target also accepts name:b<number> to select a ready build by number, for example my-template:b1.
|
|
9608
|
+
*/
|
|
9609
|
+
export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
9610
|
+
security: [
|
|
9611
|
+
{
|
|
9612
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9613
|
+
name: 'X-API-Key',
|
|
9614
|
+
type: 'apiKey'
|
|
9615
|
+
},
|
|
9616
|
+
{
|
|
9617
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9618
|
+
scheme: 'bearer',
|
|
9619
|
+
type: 'http'
|
|
9620
|
+
},
|
|
9621
|
+
{
|
|
9622
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9623
|
+
name: 'X-Team-ID',
|
|
9624
|
+
type: 'apiKey'
|
|
9625
|
+
},
|
|
9626
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9627
|
+
{
|
|
9628
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9629
|
+
name: 'X-Team-ID',
|
|
9630
|
+
type: 'apiKey'
|
|
9631
|
+
},
|
|
9632
|
+
{
|
|
9633
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9634
|
+
scheme: 'bearer',
|
|
9635
|
+
type: 'http'
|
|
9636
|
+
}
|
|
9637
|
+
],
|
|
9638
|
+
url: '/sandbox/v1/templates/tags',
|
|
9639
|
+
...options,
|
|
9640
|
+
headers: {
|
|
9641
|
+
'Content-Type': 'application/json',
|
|
9642
|
+
...options.headers
|
|
9643
|
+
}
|
|
9644
|
+
});
|
|
9645
|
+
/**
|
|
9646
|
+
* List template tags
|
|
9647
|
+
*
|
|
9648
|
+
* Read the tag-to-build assignments for your template using templateID from templates.create. Only ready builds acquire tags. Use a returned tag with the template name as name:tag when creating a sandbox or assigning additional tags. Foreign IDs return 404.
|
|
9649
|
+
*/
|
|
9650
|
+
export const listTemplateTags = (options) => (options.client ?? client).get({
|
|
9651
|
+
security: [
|
|
9652
|
+
{
|
|
9653
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9654
|
+
name: 'X-API-Key',
|
|
9655
|
+
type: 'apiKey'
|
|
9656
|
+
},
|
|
9657
|
+
{
|
|
9658
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9659
|
+
scheme: 'bearer',
|
|
9660
|
+
type: 'http'
|
|
9661
|
+
},
|
|
9662
|
+
{
|
|
9663
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9664
|
+
name: 'X-Team-ID',
|
|
9665
|
+
type: 'apiKey'
|
|
9666
|
+
},
|
|
9667
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9668
|
+
{
|
|
9669
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9670
|
+
name: 'X-Team-ID',
|
|
9671
|
+
type: 'apiKey'
|
|
9672
|
+
},
|
|
9673
|
+
{
|
|
9674
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9675
|
+
scheme: 'bearer',
|
|
9676
|
+
type: 'http'
|
|
9677
|
+
}
|
|
9678
|
+
],
|
|
9679
|
+
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
9680
|
+
...options
|
|
9681
|
+
});
|
|
9682
|
+
/**
|
|
9683
|
+
* Check template alias
|
|
9684
|
+
*
|
|
9685
|
+
* Resolve a name within your organization to its templateID before reading or managing builds. Use the bare template name, without a :tag suffix. Unknown and other-organization names return 404. The response public field is false for your private templates.
|
|
9686
|
+
*/
|
|
9687
|
+
export const resolveTemplateAlias = (options) => (options.client ?? client).get({
|
|
9688
|
+
security: [
|
|
9689
|
+
{
|
|
9690
|
+
key: 'sandbox-ApiKeyAuth',
|
|
9691
|
+
name: 'X-API-Key',
|
|
9692
|
+
type: 'apiKey'
|
|
9693
|
+
},
|
|
9694
|
+
{
|
|
9695
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
9696
|
+
scheme: 'bearer',
|
|
9697
|
+
type: 'http'
|
|
9698
|
+
},
|
|
9699
|
+
{
|
|
9700
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
9701
|
+
name: 'X-Team-ID',
|
|
9702
|
+
type: 'apiKey'
|
|
9703
|
+
},
|
|
9704
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
9705
|
+
{
|
|
9706
|
+
key: 'sandbox-AdminTeamAuth',
|
|
9707
|
+
name: 'X-Team-ID',
|
|
9708
|
+
type: 'apiKey'
|
|
9709
|
+
},
|
|
9710
|
+
{
|
|
9711
|
+
key: 'sandbox-AdminJWTAuth',
|
|
9712
|
+
scheme: 'bearer',
|
|
9713
|
+
type: 'http'
|
|
9714
|
+
}
|
|
9715
|
+
],
|
|
9716
|
+
url: '/sandbox/v1/templates/aliases/{alias}',
|
|
9717
|
+
...options
|
|
9718
|
+
});
|
|
9719
|
+
/**
|
|
9720
|
+
* Search for data based on a query
|
|
9721
|
+
*
|
|
9722
|
+
* Search the web and return ranked results with extracted content. Use it to answer questions with current information; to read the full text of known URLs use searchExtract, to walk a site use searchCrawl and to list a site's URLs use searchMap. query is required. topic chooses general, news or finance; time_range limits results to the last day, week, month or year; country boosts results from one country (topic general only). Each result carries title, url, content and a relevance score, and the response can include a generated answer, images and follow-up questions when requested.
|
|
9723
|
+
*/
|
|
9724
|
+
export const searchSearch = (options) => (options.client ?? client).post({
|
|
9725
|
+
security: [{
|
|
9726
|
+
key: 'search-bearerAuth',
|
|
9727
|
+
scheme: 'bearer',
|
|
9728
|
+
type: 'http'
|
|
9729
|
+
}],
|
|
9730
|
+
url: '/search/v1/search',
|
|
9731
|
+
...options,
|
|
9732
|
+
headers: {
|
|
9733
|
+
'Content-Type': 'application/json',
|
|
9734
|
+
...options.headers
|
|
9735
|
+
}
|
|
9736
|
+
});
|
|
9737
|
+
/**
|
|
9738
|
+
* Retrieve raw web content from specified URLs
|
|
9739
|
+
*
|
|
9740
|
+
* Extract content from one URL or batch up to 20 URLs in one request. Successful URLs appear in results; per-URL failures appear in failed_results. Check both arrays even when the response is HTTP 200. Request options apply to every URL in the batch.
|
|
9741
|
+
*/
|
|
9742
|
+
export const searchExtract = (options) => (options.client ?? client).post({
|
|
9743
|
+
security: [{
|
|
9744
|
+
key: 'search-bearerAuth',
|
|
9745
|
+
scheme: 'bearer',
|
|
9746
|
+
type: 'http'
|
|
9747
|
+
}],
|
|
9748
|
+
url: '/search/v1/extract',
|
|
9749
|
+
...options,
|
|
9750
|
+
headers: {
|
|
9751
|
+
'Content-Type': 'application/json',
|
|
9752
|
+
...options.headers
|
|
9753
|
+
}
|
|
9754
|
+
});
|
|
9755
|
+
/**
|
|
9756
|
+
* Initiate a web crawl from a base URL
|
|
9757
|
+
*
|
|
9758
|
+
* Tavily Crawl is a graph-based website traversal tool that can explore hundreds of paths in parallel with built-in extraction and intelligent discovery.
|
|
9759
|
+
*/
|
|
9760
|
+
export const searchCrawl = (options) => (options.client ?? client).post({
|
|
9761
|
+
security: [{
|
|
9762
|
+
key: 'search-bearerAuth',
|
|
9763
|
+
scheme: 'bearer',
|
|
9764
|
+
type: 'http'
|
|
9765
|
+
}],
|
|
9766
|
+
url: '/search/v1/crawl',
|
|
9767
|
+
...options,
|
|
9768
|
+
headers: {
|
|
9769
|
+
'Content-Type': 'application/json',
|
|
9770
|
+
...options.headers
|
|
9771
|
+
}
|
|
9772
|
+
});
|
|
9773
|
+
/**
|
|
9774
|
+
* Initiate a web mapping from a base URL
|
|
9775
|
+
*
|
|
9776
|
+
* Tavily Map traverses websites like a graph and can explore hundreds of paths in parallel with intelligent discovery to generate comprehensive site maps.
|
|
9777
|
+
*/
|
|
9778
|
+
export const searchMap = (options) => (options.client ?? client).post({
|
|
9779
|
+
security: [{
|
|
9780
|
+
key: 'search-bearerAuth',
|
|
9781
|
+
scheme: 'bearer',
|
|
9782
|
+
type: 'http'
|
|
9783
|
+
}],
|
|
9784
|
+
url: '/search/v1/map',
|
|
9785
|
+
...options,
|
|
9786
|
+
headers: {
|
|
9787
|
+
'Content-Type': 'application/json',
|
|
9788
|
+
...options.headers
|
|
9789
|
+
}
|
|
9790
|
+
});
|
|
9791
|
+
/**
|
|
9792
|
+
* List the genres Studio can write
|
|
9793
|
+
*
|
|
9794
|
+
* List the genre catalog so you can choose how a piece is structured before creating a draft. Each genre names its unit kinds, draft properties, deterministic checks and writing rules, and by default only the genres open today are returned. Read the chosen genre in full with studioGenresGet before the first write, because its kinds and limits decide what that draft accepts.
|
|
9795
|
+
*/
|
|
9796
|
+
export const studioGenresList = (options) => (options?.client ?? client).get({
|
|
9797
|
+
security: [{
|
|
9798
|
+
key: 'BearerAuth',
|
|
9799
|
+
scheme: 'bearer',
|
|
9800
|
+
type: 'http'
|
|
9801
|
+
}, {
|
|
9802
|
+
key: 'ApiKeyAuth',
|
|
9803
|
+
name: 'X-API-Key',
|
|
9804
|
+
type: 'apiKey'
|
|
9805
|
+
}],
|
|
9806
|
+
url: '/studio/v1/genres',
|
|
9807
|
+
...options
|
|
9808
|
+
});
|
|
9809
|
+
/**
|
|
9810
|
+
* Read one genre with its built-in templates
|
|
9811
|
+
*
|
|
9812
|
+
* Read the full rules of one genre: its unit kinds and what each may contain, the draft properties with their limits, the deterministic checks the software runs, the semantic review list, and the built-in templates that can seed a draft. Ask for this before creating a draft of that genre, and again when a write is refused for an unknown kind, a property limit or a block type the genre does not allow.
|
|
9813
|
+
*/
|
|
9814
|
+
export const studioGenresGet = (options) => (options.client ?? client).get({
|
|
9815
|
+
security: [{
|
|
9816
|
+
key: 'BearerAuth',
|
|
9817
|
+
scheme: 'bearer',
|
|
9818
|
+
type: 'http'
|
|
9819
|
+
}, {
|
|
9820
|
+
key: 'ApiKeyAuth',
|
|
9821
|
+
name: 'X-API-Key',
|
|
9822
|
+
type: 'apiKey'
|
|
9823
|
+
}],
|
|
9824
|
+
url: '/studio/v1/genres/{genre}',
|
|
9825
|
+
...options
|
|
9826
|
+
});
|
|
9827
|
+
/**
|
|
9828
|
+
* List the platforms a work can be produced for
|
|
9829
|
+
*
|
|
9830
|
+
* List rendition targets with the format each needs, whether it receives a finished piece through an API, a draft box or an export, and the hard limits a piece must respect. Pass a genre to see only the platforms that genre produces by default. Read one platform in full before rendering, because its limits decide whether the rendition validates.
|
|
9831
|
+
*/
|
|
9832
|
+
export const studioPlatformsList = (options) => (options?.client ?? client).get({
|
|
9833
|
+
security: [{
|
|
9834
|
+
key: 'BearerAuth',
|
|
9835
|
+
scheme: 'bearer',
|
|
9836
|
+
type: 'http'
|
|
9837
|
+
}, {
|
|
9838
|
+
key: 'ApiKeyAuth',
|
|
9839
|
+
name: 'X-API-Key',
|
|
9840
|
+
type: 'apiKey'
|
|
9841
|
+
}],
|
|
9842
|
+
url: '/studio/v1/platforms',
|
|
9843
|
+
...options
|
|
9844
|
+
});
|
|
9845
|
+
/**
|
|
9846
|
+
* Read the rules of one platform
|
|
9847
|
+
*
|
|
9848
|
+
* Read one platform in full: the format it consumes, how it receives a finished piece, the preview fidelity the Console can offer, the limits on title, body, image count and aspect, and whether a connected channel is required. Read this before creating a rendition, and again when validation reports that the piece breaks a platform limit.
|
|
9849
|
+
*/
|
|
9850
|
+
export const studioPlatformsGet = (options) => (options.client ?? client).get({
|
|
9851
|
+
security: [{
|
|
9852
|
+
key: 'BearerAuth',
|
|
9853
|
+
scheme: 'bearer',
|
|
9854
|
+
type: 'http'
|
|
9855
|
+
}, {
|
|
9856
|
+
key: 'ApiKeyAuth',
|
|
9857
|
+
name: 'X-API-Key',
|
|
9858
|
+
type: 'apiKey'
|
|
9859
|
+
}],
|
|
9860
|
+
url: '/studio/v1/platforms/{platform}',
|
|
9861
|
+
...options
|
|
9862
|
+
});
|
|
9863
|
+
/**
|
|
9864
|
+
* List the works of this organization
|
|
9865
|
+
*
|
|
9866
|
+
* List works owned by the API key organization so you can find the one being discussed, with its drafts and how long ago each moved. Archived works are left out unless you ask for them. Continue with next_page_token until the answer stops carrying one; the summaries carry no unit bodies, so read a work before writing in it.
|
|
9867
|
+
*/
|
|
9868
|
+
export const studioWorksList = (options) => (options?.client ?? client).get({
|
|
9869
|
+
security: [{
|
|
9870
|
+
key: 'BearerAuth',
|
|
9871
|
+
scheme: 'bearer',
|
|
9872
|
+
type: 'http'
|
|
9873
|
+
}, {
|
|
9874
|
+
key: 'ApiKeyAuth',
|
|
9875
|
+
name: 'X-API-Key',
|
|
9876
|
+
type: 'apiKey'
|
|
9877
|
+
}],
|
|
9878
|
+
url: '/studio/v1/works',
|
|
9879
|
+
...options
|
|
9880
|
+
});
|
|
9881
|
+
/**
|
|
9882
|
+
* Create a work with its goal
|
|
9883
|
+
*
|
|
9884
|
+
* Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves — the reader, what that reader should get or do, the one-sentence message and the constraints — and the original brief the person gave in their own words. A slug is derived from the title unless you pass one. The work starts with no drafts; create the first one with the drafts create call, because the genre decides the structure.
|
|
9885
|
+
*/
|
|
9886
|
+
export const studioWorksCreate = (options) => (options.client ?? client).post({
|
|
9887
|
+
security: [{
|
|
9888
|
+
key: 'BearerAuth',
|
|
9889
|
+
scheme: 'bearer',
|
|
9890
|
+
type: 'http'
|
|
9891
|
+
}, {
|
|
9892
|
+
key: 'ApiKeyAuth',
|
|
9893
|
+
name: 'X-API-Key',
|
|
9894
|
+
type: 'apiKey'
|
|
9895
|
+
}],
|
|
9896
|
+
url: '/studio/v1/works',
|
|
9897
|
+
...options,
|
|
9898
|
+
headers: {
|
|
9899
|
+
'Content-Type': 'application/json',
|
|
9900
|
+
...options.headers
|
|
9901
|
+
}
|
|
9902
|
+
});
|
|
9903
|
+
/**
|
|
9904
|
+
* Resolve a loose reference to a work, draft or unit
|
|
9905
|
+
*
|
|
9906
|
+
* Turn a loose reference into the address the other calls take: a slug, a work title, a draft key or a unit number, as a person or another tool would say it. A hit answers the work slug and, when the reference pointed deeper, the draft key and unit number; a miss answers an empty resolved value with up to three near matches instead of failing. Use it when a person names something instead of an id.
|
|
9907
|
+
*/
|
|
9908
|
+
export const studioWorksResolve = (options) => (options.client ?? client).get({
|
|
9909
|
+
security: [{
|
|
9910
|
+
key: 'BearerAuth',
|
|
9911
|
+
scheme: 'bearer',
|
|
9912
|
+
type: 'http'
|
|
9913
|
+
}, {
|
|
9914
|
+
key: 'ApiKeyAuth',
|
|
9915
|
+
name: 'X-API-Key',
|
|
9916
|
+
type: 'apiKey'
|
|
9917
|
+
}],
|
|
9918
|
+
url: '/studio/v1/works:resolve',
|
|
9919
|
+
...options
|
|
9920
|
+
});
|
|
9921
|
+
/**
|
|
9922
|
+
* Read a work, optionally with one draft and unit
|
|
9923
|
+
*
|
|
9924
|
+
* Read a work and, in the same answer, whatever part of it the page needs: pass draft to get that draft with its todos, its unit outline and its properties, and unit to get one unit with its blocks and Markdown body. This is the call that opens an editing session, because it answers the goal, the brief, the current revisions and the unit to write in one round trip.
|
|
9925
|
+
*/
|
|
9926
|
+
export const studioWorksGet = (options) => (options.client ?? client).get({
|
|
9927
|
+
security: [{
|
|
9928
|
+
key: 'BearerAuth',
|
|
9929
|
+
scheme: 'bearer',
|
|
9930
|
+
type: 'http'
|
|
9931
|
+
}, {
|
|
9932
|
+
key: 'ApiKeyAuth',
|
|
9933
|
+
name: 'X-API-Key',
|
|
9934
|
+
type: 'apiKey'
|
|
9935
|
+
}],
|
|
9936
|
+
url: '/studio/v1/works/{work}',
|
|
9937
|
+
...options
|
|
9938
|
+
});
|
|
9939
|
+
/**
|
|
9940
|
+
* Change the title, goal or attached libraries
|
|
9941
|
+
*
|
|
9942
|
+
* Change work-level settings: the title, the slug, the goal, the attached reference libraries, the style or the archived flag. Send update_mask naming exactly the fields you change; a field left out keeps its value. Pass expected_revision to have the write refused when someone else changed the work first, and note that changing the message makes every draft derived from it stale.
|
|
9943
|
+
*/
|
|
9944
|
+
export const studioWorksUpdate = (options) => (options.client ?? client).patch({
|
|
9945
|
+
security: [{
|
|
9946
|
+
key: 'BearerAuth',
|
|
9947
|
+
scheme: 'bearer',
|
|
9948
|
+
type: 'http'
|
|
9949
|
+
}, {
|
|
9950
|
+
key: 'ApiKeyAuth',
|
|
9951
|
+
name: 'X-API-Key',
|
|
9952
|
+
type: 'apiKey'
|
|
9953
|
+
}],
|
|
9954
|
+
url: '/studio/v1/works/{work}',
|
|
9955
|
+
...options,
|
|
9956
|
+
headers: {
|
|
9957
|
+
'Content-Type': 'application/json',
|
|
9958
|
+
...options.headers
|
|
9959
|
+
}
|
|
9960
|
+
});
|
|
9961
|
+
/**
|
|
9962
|
+
* Add to or correct the original brief
|
|
9963
|
+
*
|
|
9964
|
+
* Extend the original brief: append text, attach files, add points taken from an outline, edit one point, or drop a point. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose. The brief carries its own revision, separate from the work and from each draft.
|
|
9965
|
+
*/
|
|
9966
|
+
export const studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
|
|
9967
|
+
security: [{
|
|
9968
|
+
key: 'BearerAuth',
|
|
9969
|
+
scheme: 'bearer',
|
|
9970
|
+
type: 'http'
|
|
9971
|
+
}, {
|
|
9972
|
+
key: 'ApiKeyAuth',
|
|
9973
|
+
name: 'X-API-Key',
|
|
9974
|
+
type: 'apiKey'
|
|
9975
|
+
}],
|
|
9976
|
+
url: '/studio/v1/works/{work}/brief',
|
|
9977
|
+
...options,
|
|
9978
|
+
headers: {
|
|
9979
|
+
'Content-Type': 'application/json',
|
|
9980
|
+
...options.headers
|
|
9981
|
+
}
|
|
9982
|
+
});
|
|
9983
|
+
/**
|
|
9984
|
+
* List the drafts a work carries
|
|
9985
|
+
*
|
|
9986
|
+
* List every draft of one work, each with its genre, its size and whether it is out of date against what it was derived from. Use it to choose the draft a later call works in: the key beside each draft is what the draft path segment takes. This list is not paged, because a work carries a handful of drafts rather than thousands.
|
|
9987
|
+
*/
|
|
9988
|
+
export const studioDraftsList = (options) => (options.client ?? client).get({
|
|
9989
|
+
security: [{
|
|
9990
|
+
key: 'BearerAuth',
|
|
9991
|
+
scheme: 'bearer',
|
|
9992
|
+
type: 'http'
|
|
9993
|
+
}, {
|
|
9994
|
+
key: 'ApiKeyAuth',
|
|
9995
|
+
name: 'X-API-Key',
|
|
9996
|
+
type: 'apiKey'
|
|
9997
|
+
}],
|
|
9998
|
+
url: '/studio/v1/works/{work}/drafts',
|
|
9999
|
+
...options
|
|
10000
|
+
});
|
|
10001
|
+
/**
|
|
10002
|
+
* Create a draft of a genre inside a work
|
|
10003
|
+
*
|
|
10004
|
+
* Create a draft: one way of delivering the work, written in one genre. The genre decides the unit kinds, the properties and the checks, so read it first with the genre call and pass its key. A template may seed the unit tree, an outline may be given instead, and derived_from records that this draft is built from the goal message or from another draft of the work. The work may hold several drafts, one per platform or per length.
|
|
10005
|
+
*/
|
|
10006
|
+
export const studioDraftsCreate = (options) => (options.client ?? client).post({
|
|
10007
|
+
security: [{
|
|
10008
|
+
key: 'BearerAuth',
|
|
10009
|
+
scheme: 'bearer',
|
|
10010
|
+
type: 'http'
|
|
10011
|
+
}, {
|
|
10012
|
+
key: 'ApiKeyAuth',
|
|
10013
|
+
name: 'X-API-Key',
|
|
10014
|
+
type: 'apiKey'
|
|
10015
|
+
}],
|
|
10016
|
+
url: '/studio/v1/works/{work}/drafts',
|
|
10017
|
+
...options,
|
|
10018
|
+
headers: {
|
|
10019
|
+
'Content-Type': 'application/json',
|
|
10020
|
+
...options.headers
|
|
10021
|
+
}
|
|
10022
|
+
});
|
|
10023
|
+
/**
|
|
10024
|
+
* Read one draft with optional units and todos
|
|
10025
|
+
*
|
|
10026
|
+
* Read one draft: its genre, its properties, its revisions, whether it is stale, and optionally its unit tree and its todo list. Pass expand to add the parts you need in this one call instead of reading them separately. Read this before writing to the draft, because the revision it returns is the precondition the next write has to carry.
|
|
10027
|
+
*/
|
|
10028
|
+
export const studioDraftsGet = (options) => (options.client ?? client).get({
|
|
10029
|
+
security: [{
|
|
10030
|
+
key: 'BearerAuth',
|
|
10031
|
+
scheme: 'bearer',
|
|
10032
|
+
type: 'http'
|
|
10033
|
+
}, {
|
|
10034
|
+
key: 'ApiKeyAuth',
|
|
10035
|
+
name: 'X-API-Key',
|
|
10036
|
+
type: 'apiKey'
|
|
10037
|
+
}],
|
|
10038
|
+
url: '/studio/v1/works/{work}/drafts/{draft}',
|
|
10039
|
+
...options
|
|
10040
|
+
});
|
|
10041
|
+
/**
|
|
10042
|
+
* Change a draft title, key, properties or style
|
|
10043
|
+
*
|
|
10044
|
+
* Change the draft itself rather than its units: its page title, its in-work key, its generic properties, the style that overrides the work style, or its mode. Send update_mask naming exactly the fields you change. Changing the key keeps the previous one resolving, so old links and old references still work; a key another draft of the work already uses answers DRAFT_KEY_TAKEN.
|
|
10045
|
+
*/
|
|
10046
|
+
export const studioDraftsUpdate = (options) => (options.client ?? client).patch({
|
|
10047
|
+
security: [{
|
|
10048
|
+
key: 'BearerAuth',
|
|
10049
|
+
scheme: 'bearer',
|
|
10050
|
+
type: 'http'
|
|
10051
|
+
}, {
|
|
10052
|
+
key: 'ApiKeyAuth',
|
|
10053
|
+
name: 'X-API-Key',
|
|
10054
|
+
type: 'apiKey'
|
|
10055
|
+
}],
|
|
10056
|
+
url: '/studio/v1/works/{work}/drafts/{draft}',
|
|
10057
|
+
...options,
|
|
10058
|
+
headers: {
|
|
10059
|
+
'Content-Type': 'application/json',
|
|
10060
|
+
...options.headers
|
|
10061
|
+
}
|
|
10062
|
+
});
|
|
10063
|
+
/**
|
|
10064
|
+
* Read the whole unit outline as Markdown
|
|
10065
|
+
*
|
|
10066
|
+
* Read the draft structure as one Markdown page: one line per unit carrying its number, structure name, intent, status, length and revision, followed by the unit list itself. Use it to plan a sequence of writes without reading every unit, since it carries no body text. Read one unit in full with the unit call once you know which one to write.
|
|
10067
|
+
*/
|
|
10068
|
+
export const studioDraftsOutline = (options) => (options.client ?? client).get({
|
|
10069
|
+
security: [{
|
|
10070
|
+
key: 'BearerAuth',
|
|
10071
|
+
scheme: 'bearer',
|
|
10072
|
+
type: 'http'
|
|
10073
|
+
}, {
|
|
10074
|
+
key: 'ApiKeyAuth',
|
|
10075
|
+
name: 'X-API-Key',
|
|
10076
|
+
type: 'apiKey'
|
|
10077
|
+
}],
|
|
10078
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/outline',
|
|
10079
|
+
...options
|
|
10080
|
+
});
|
|
10081
|
+
/**
|
|
10082
|
+
* Read the computed todo list of a draft
|
|
10083
|
+
*
|
|
10084
|
+
* Read what is outstanding in one draft, computed from the data rather than from a plan: a unit without an intent, a body behind its intent, an unclaimed brief point, a failed check, a stale rendition. Each item names the layer it belongs to and suggests the call that resolves it. Follow the list instead of inventing an order, and re-read it after a batch of writes.
|
|
10085
|
+
*/
|
|
10086
|
+
export const studioDraftsStatus = (options) => (options.client ?? client).get({
|
|
10087
|
+
security: [{
|
|
10088
|
+
key: 'BearerAuth',
|
|
10089
|
+
scheme: 'bearer',
|
|
10090
|
+
type: 'http'
|
|
10091
|
+
}, {
|
|
10092
|
+
key: 'ApiKeyAuth',
|
|
10093
|
+
name: 'X-API-Key',
|
|
10094
|
+
type: 'apiKey'
|
|
10095
|
+
}],
|
|
10096
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/status',
|
|
10097
|
+
...options
|
|
10098
|
+
});
|
|
10099
|
+
/**
|
|
10100
|
+
* Read a review pass over the whole draft
|
|
10101
|
+
*
|
|
10102
|
+
* Read everything a reviewer needs in one answer: the deterministic check results, the semantic review list the genre asks a reader to judge, the brief coverage showing which unit claims each requirement point, and the body text. When the draft is long the body is a synopsis with an excerpt around each unit and next_page_token carries the full text. This is the call an agent makes before writing review comments.
|
|
10103
|
+
*/
|
|
10104
|
+
export const studioDraftsReview = (options) => (options.client ?? client).get({
|
|
10105
|
+
security: [{
|
|
10106
|
+
key: 'BearerAuth',
|
|
10107
|
+
scheme: 'bearer',
|
|
10108
|
+
type: 'http'
|
|
10109
|
+
}, {
|
|
10110
|
+
key: 'ApiKeyAuth',
|
|
10111
|
+
name: 'X-API-Key',
|
|
10112
|
+
type: 'apiKey'
|
|
10113
|
+
}],
|
|
10114
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/review',
|
|
10115
|
+
...options
|
|
10116
|
+
});
|
|
10117
|
+
/**
|
|
10118
|
+
* Confirm a draft already follows its source
|
|
10119
|
+
*
|
|
10120
|
+
* Clear the stale flag after checking that the draft still matches what it was derived from: the recorded source revision moves to the source current revision without touching any unit. Call it after the source moved and you have brought this draft up to date, not to make the flag disappear while the text is still behind. It answers the same shape as a draft write, and the draft revision does not move.
|
|
10121
|
+
*/
|
|
10122
|
+
export const studioDraftsRebase = (options) => (options.client ?? client).post({
|
|
10123
|
+
security: [{
|
|
10124
|
+
key: 'BearerAuth',
|
|
10125
|
+
scheme: 'bearer',
|
|
10126
|
+
type: 'http'
|
|
10127
|
+
}, {
|
|
10128
|
+
key: 'ApiKeyAuth',
|
|
10129
|
+
name: 'X-API-Key',
|
|
10130
|
+
type: 'apiKey'
|
|
10131
|
+
}],
|
|
10132
|
+
url: '/studio/v1/works/{work}/drafts/{draft}:rebase',
|
|
10133
|
+
...options,
|
|
10134
|
+
headers: {
|
|
10135
|
+
'Content-Type': 'application/json',
|
|
10136
|
+
...options.headers
|
|
10137
|
+
}
|
|
10138
|
+
});
|
|
10139
|
+
/**
|
|
10140
|
+
* Export the draft as Markdown or plain text
|
|
10141
|
+
*
|
|
10142
|
+
* Read the whole draft as one document in Markdown or plain text, returned synchronously in the answer. This is the quick path for a person who wants the text now; a file in a platform format, a card image or a docx comes from creating a rendition instead. Ask for text rather than markdown when the reader should not see block anchors or heading syntax.
|
|
10143
|
+
*/
|
|
10144
|
+
export const studioDraftsExport = (options) => (options.client ?? client).get({
|
|
10145
|
+
security: [{
|
|
10146
|
+
key: 'BearerAuth',
|
|
10147
|
+
scheme: 'bearer',
|
|
10148
|
+
type: 'http'
|
|
10149
|
+
}, {
|
|
10150
|
+
key: 'ApiKeyAuth',
|
|
10151
|
+
name: 'X-API-Key',
|
|
10152
|
+
type: 'apiKey'
|
|
10153
|
+
}],
|
|
10154
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/export',
|
|
10155
|
+
...options
|
|
10156
|
+
});
|
|
10157
|
+
/**
|
|
10158
|
+
* Add one unit to the draft tree
|
|
10159
|
+
*
|
|
10160
|
+
* Add a unit to the structure: a chapter, a scene, a section, an argument or a product depending on the genre. Say where it goes with parent and after, give it the structure name people will use to manage it, and write the intent that says what it has to accomplish. Adding a unit changes the draft revision, so pass expected_revision, and the new unit itself starts with no body.
|
|
10161
|
+
*/
|
|
10162
|
+
export const studioUnitsCreate = (options) => (options.client ?? client).post({
|
|
10163
|
+
security: [{
|
|
10164
|
+
key: 'BearerAuth',
|
|
10165
|
+
scheme: 'bearer',
|
|
10166
|
+
type: 'http'
|
|
10167
|
+
}, {
|
|
10168
|
+
key: 'ApiKeyAuth',
|
|
10169
|
+
name: 'X-API-Key',
|
|
10170
|
+
type: 'apiKey'
|
|
10171
|
+
}],
|
|
10172
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/units',
|
|
10173
|
+
...options,
|
|
10174
|
+
headers: {
|
|
10175
|
+
'Content-Type': 'application/json',
|
|
10176
|
+
...options.headers
|
|
10177
|
+
}
|
|
10178
|
+
});
|
|
10179
|
+
/**
|
|
10180
|
+
* Add a whole outline of units at once
|
|
10181
|
+
*
|
|
10182
|
+
* Create many units in one write from a nested outline, which is how a structure is built after the person approved a plan. Nesting in the outline becomes the parent chain, numbers are assigned in order, and the draft gets one revision for the whole batch rather than one per unit. Sending the same outline twice would duplicate it, so pass the draft revision you read and repeat the call only after a refusal.
|
|
10183
|
+
*/
|
|
10184
|
+
export const studioUnitsBatchCreate = (options) => (options.client ?? client).post({
|
|
10185
|
+
security: [{
|
|
10186
|
+
key: 'BearerAuth',
|
|
10187
|
+
scheme: 'bearer',
|
|
10188
|
+
type: 'http'
|
|
10189
|
+
}, {
|
|
10190
|
+
key: 'ApiKeyAuth',
|
|
10191
|
+
name: 'X-API-Key',
|
|
10192
|
+
type: 'apiKey'
|
|
10193
|
+
}],
|
|
10194
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/units:batchCreate',
|
|
10195
|
+
...options,
|
|
10196
|
+
headers: {
|
|
10197
|
+
'Content-Type': 'application/json',
|
|
10198
|
+
...options.headers
|
|
10199
|
+
}
|
|
10200
|
+
});
|
|
10201
|
+
/**
|
|
10202
|
+
* Write intents for many units in one call
|
|
10203
|
+
*
|
|
10204
|
+
* Change the intent of several units in one write: the synopsis, the points and the brief points each of them claims. Bodies are not part of this call, because a body is written one unit at a time with its own revision; here the whole batch shares the draft revision you read. Use it to lay out a plan across the tree, then write bodies one by one.
|
|
10205
|
+
*/
|
|
10206
|
+
export const studioUnitsBatchUpdate = (options) => (options.client ?? client).post({
|
|
10207
|
+
security: [{
|
|
10208
|
+
key: 'BearerAuth',
|
|
10209
|
+
scheme: 'bearer',
|
|
10210
|
+
type: 'http'
|
|
10211
|
+
}, {
|
|
10212
|
+
key: 'ApiKeyAuth',
|
|
10213
|
+
name: 'X-API-Key',
|
|
10214
|
+
type: 'apiKey'
|
|
10215
|
+
}],
|
|
10216
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/units:batchUpdate',
|
|
10217
|
+
...options,
|
|
10218
|
+
headers: {
|
|
10219
|
+
'Content-Type': 'application/json',
|
|
10220
|
+
...options.headers
|
|
10221
|
+
}
|
|
10222
|
+
});
|
|
10223
|
+
/**
|
|
10224
|
+
* Read one unit with its blocks and Markdown
|
|
10225
|
+
*
|
|
10226
|
+
* Read one unit: its intent, its status, its revision, its links to reference entries, and its body as both blocks and Markdown. The Markdown carries each block identifier inline as an anchor comment, so a rewrite can keep the identifiers of the blocks it keeps. Read this before writing the body, because the revision it returns is the precondition that write has to carry.
|
|
10227
|
+
*/
|
|
10228
|
+
export const studioUnitsGet = (options) => (options.client ?? client).get({
|
|
10229
|
+
security: [{
|
|
10230
|
+
key: 'BearerAuth',
|
|
10231
|
+
scheme: 'bearer',
|
|
10232
|
+
type: 'http'
|
|
10233
|
+
}, {
|
|
10234
|
+
key: 'ApiKeyAuth',
|
|
10235
|
+
name: 'X-API-Key',
|
|
10236
|
+
type: 'apiKey'
|
|
10237
|
+
}],
|
|
10238
|
+
url: '/studio/v1/works/{work}/units/{unit}',
|
|
10239
|
+
...options
|
|
10240
|
+
});
|
|
10241
|
+
/**
|
|
10242
|
+
* Change a unit intent, body or status
|
|
10243
|
+
*
|
|
10244
|
+
* Change one unit: its name, its heading, its synopsis and points, the brief points it claims, its status, its links to reference entries, or its body as a whole Markdown text. A body write requires expected_revision, because replacing the whole text would drop blocks someone else inserted. The answer carries the unit as it now stands, so read the next field of the answer instead of re-reading the unit.
|
|
10245
|
+
*/
|
|
10246
|
+
export const studioUnitsUpdate = (options) => (options.client ?? client).patch({
|
|
10247
|
+
security: [{
|
|
10248
|
+
key: 'BearerAuth',
|
|
10249
|
+
scheme: 'bearer',
|
|
10250
|
+
type: 'http'
|
|
10251
|
+
}, {
|
|
10252
|
+
key: 'ApiKeyAuth',
|
|
10253
|
+
name: 'X-API-Key',
|
|
10254
|
+
type: 'apiKey'
|
|
10255
|
+
}],
|
|
10256
|
+
url: '/studio/v1/works/{work}/units/{unit}',
|
|
10257
|
+
...options,
|
|
10258
|
+
headers: {
|
|
10259
|
+
'Content-Type': 'application/json',
|
|
10260
|
+
...options.headers
|
|
10261
|
+
}
|
|
10262
|
+
});
|
|
10263
|
+
/**
|
|
10264
|
+
* Move a unit to another place in the tree
|
|
10265
|
+
*
|
|
10266
|
+
* Move a unit under another parent or after another sibling, without changing its number, its identifier, its intent or its body. A move that would put a unit inside its own descendant, or that would cross into another draft, is refused. Only the moved unit changes, so the revision to pass is its own.
|
|
10267
|
+
*/
|
|
10268
|
+
export const studioUnitsMove = (options) => (options.client ?? client).post({
|
|
10269
|
+
security: [{
|
|
10270
|
+
key: 'BearerAuth',
|
|
10271
|
+
scheme: 'bearer',
|
|
10272
|
+
type: 'http'
|
|
10273
|
+
}, {
|
|
10274
|
+
key: 'ApiKeyAuth',
|
|
10275
|
+
name: 'X-API-Key',
|
|
10276
|
+
type: 'apiKey'
|
|
10277
|
+
}],
|
|
10278
|
+
url: '/studio/v1/works/{work}/units/{unit}:move',
|
|
10279
|
+
...options,
|
|
10280
|
+
headers: {
|
|
10281
|
+
'Content-Type': 'application/json',
|
|
10282
|
+
...options.headers
|
|
10283
|
+
}
|
|
10284
|
+
});
|
|
10285
|
+
/**
|
|
10286
|
+
* Edit a unit body block by block
|
|
10287
|
+
*
|
|
10288
|
+
* Change a body by naming the blocks to insert, replace or delete instead of resending the whole text. This is the safe way for a writer that only touches part of a unit, because a block another writer changed after your revision is refused rather than overwritten. The revision is required, and the answer carries the unit with its blocks so the next edit can address them.
|
|
10289
|
+
*/
|
|
10290
|
+
export const studioUnitsPatchBlocks = (options) => (options.client ?? client).post({
|
|
10291
|
+
security: [{
|
|
10292
|
+
key: 'BearerAuth',
|
|
10293
|
+
scheme: 'bearer',
|
|
10294
|
+
type: 'http'
|
|
10295
|
+
}, {
|
|
10296
|
+
key: 'ApiKeyAuth',
|
|
10297
|
+
name: 'X-API-Key',
|
|
10298
|
+
type: 'apiKey'
|
|
10299
|
+
}],
|
|
10300
|
+
url: '/studio/v1/works/{work}/units/{unit}/blocks:patch',
|
|
10301
|
+
...options,
|
|
10302
|
+
headers: {
|
|
10303
|
+
'Content-Type': 'application/json',
|
|
10304
|
+
...options.headers
|
|
10305
|
+
}
|
|
10306
|
+
});
|
|
10307
|
+
/**
|
|
10308
|
+
* Read the context pack for writing one unit
|
|
10309
|
+
*
|
|
10310
|
+
* Read everything a writer needs before touching one unit: the genre rules, the goal, the brief, the style, the upstream source, the reference entries this unit draws on, the synopses of the units before it, and the intent of this unit, assembled in a fixed order and measured against a token budget. Entries left out say why, so a missing detail is visible rather than silent. Same input gives the same pack, which is what makes a written result reproducible.
|
|
10311
|
+
*/
|
|
10312
|
+
export const studioUnitsContext = (options) => (options.client ?? client).get({
|
|
10313
|
+
security: [{
|
|
10314
|
+
key: 'BearerAuth',
|
|
10315
|
+
scheme: 'bearer',
|
|
10316
|
+
type: 'http'
|
|
10317
|
+
}, {
|
|
10318
|
+
key: 'ApiKeyAuth',
|
|
10319
|
+
name: 'X-API-Key',
|
|
10320
|
+
type: 'apiKey'
|
|
10321
|
+
}],
|
|
10322
|
+
url: '/studio/v1/works/{work}/units/{unit}/context',
|
|
10323
|
+
...options
|
|
10324
|
+
});
|
|
10325
|
+
/**
|
|
10326
|
+
* List the reference libraries of this organization
|
|
10327
|
+
*
|
|
10328
|
+
* List the reference libraries this API key organization owns, each with how many entries it holds, so you can choose the one a work draws on. Continue with next_page_token until the answer stops carrying one. A library is shared across works, so the list is the whole organization's rather than one work's.
|
|
10329
|
+
*/
|
|
10330
|
+
export const studioCodexesList = (options) => (options?.client ?? client).get({
|
|
10331
|
+
security: [{
|
|
10332
|
+
key: 'BearerAuth',
|
|
10333
|
+
scheme: 'bearer',
|
|
10334
|
+
type: 'http'
|
|
10335
|
+
}, {
|
|
10336
|
+
key: 'ApiKeyAuth',
|
|
10337
|
+
name: 'X-API-Key',
|
|
10338
|
+
type: 'apiKey'
|
|
10339
|
+
}],
|
|
10340
|
+
url: '/studio/v1/codexes',
|
|
10341
|
+
...options
|
|
10342
|
+
});
|
|
10343
|
+
/**
|
|
10344
|
+
* Create a reference library
|
|
10345
|
+
*
|
|
10346
|
+
* Create a reference library: a shared store of the people, places, products and facts a piece draws on, reusable across works. Attach it to a work with the work update call, and the entries it holds then reach the context packs of that work's units. A library is not private to one work, so the same brand facts can serve every piece that mentions them.
|
|
10347
|
+
*/
|
|
10348
|
+
export const studioCodexesCreate = (options) => (options.client ?? client).post({
|
|
10349
|
+
security: [{
|
|
10350
|
+
key: 'BearerAuth',
|
|
10351
|
+
scheme: 'bearer',
|
|
10352
|
+
type: 'http'
|
|
10353
|
+
}, {
|
|
10354
|
+
key: 'ApiKeyAuth',
|
|
10355
|
+
name: 'X-API-Key',
|
|
10356
|
+
type: 'apiKey'
|
|
10357
|
+
}],
|
|
10358
|
+
url: '/studio/v1/codexes',
|
|
10359
|
+
...options,
|
|
10360
|
+
headers: {
|
|
10361
|
+
'Content-Type': 'application/json',
|
|
10362
|
+
...options.headers
|
|
10363
|
+
}
|
|
10364
|
+
});
|
|
10365
|
+
/**
|
|
10366
|
+
* Delete a reference library
|
|
10367
|
+
*
|
|
10368
|
+
* Delete a library and every entry inside it. A library attached to any work is refused with CODEX_IN_USE, because deleting it would silently strip the reference material those units draw on; detach it from the work first. This cannot be undone, so confirm which library the identifier names.
|
|
10369
|
+
*/
|
|
10370
|
+
export const studioCodexesDelete = (options) => (options.client ?? client).delete({
|
|
10371
|
+
security: [{
|
|
10372
|
+
key: 'BearerAuth',
|
|
10373
|
+
scheme: 'bearer',
|
|
10374
|
+
type: 'http'
|
|
10375
|
+
}, {
|
|
10376
|
+
key: 'ApiKeyAuth',
|
|
10377
|
+
name: 'X-API-Key',
|
|
10378
|
+
type: 'apiKey'
|
|
10379
|
+
}],
|
|
10380
|
+
url: '/studio/v1/codexes/{codex}',
|
|
10381
|
+
...options
|
|
10382
|
+
});
|
|
10383
|
+
/**
|
|
10384
|
+
* Read one reference library
|
|
10385
|
+
*
|
|
10386
|
+
* Read one reference library: its name, its description, its labels and how many entries it holds. Read this to confirm a library exists before attaching it to a work; the entries themselves are listed with the entry list call, because a library may hold more of them than fit in one answer.
|
|
10387
|
+
*/
|
|
10388
|
+
export const studioCodexesGet = (options) => (options.client ?? client).get({
|
|
10389
|
+
security: [{
|
|
10390
|
+
key: 'BearerAuth',
|
|
10391
|
+
scheme: 'bearer',
|
|
10392
|
+
type: 'http'
|
|
10393
|
+
}, {
|
|
10394
|
+
key: 'ApiKeyAuth',
|
|
10395
|
+
name: 'X-API-Key',
|
|
10396
|
+
type: 'apiKey'
|
|
10397
|
+
}],
|
|
10398
|
+
url: '/studio/v1/codexes/{codex}',
|
|
10399
|
+
...options
|
|
10400
|
+
});
|
|
10401
|
+
/**
|
|
10402
|
+
* Rename a reference library or change its description
|
|
10403
|
+
*
|
|
10404
|
+
* Change the library itself: its name, its description or its labels. Send update_mask naming exactly the fields you change; a field left out keeps its value. The entries inside are untouched, and a work that has the library attached keeps it attached under the new name.
|
|
10405
|
+
*/
|
|
10406
|
+
export const studioCodexesUpdate = (options) => (options.client ?? client).patch({
|
|
10407
|
+
security: [{
|
|
10408
|
+
key: 'BearerAuth',
|
|
10409
|
+
scheme: 'bearer',
|
|
10410
|
+
type: 'http'
|
|
10411
|
+
}, {
|
|
10412
|
+
key: 'ApiKeyAuth',
|
|
10413
|
+
name: 'X-API-Key',
|
|
10414
|
+
type: 'apiKey'
|
|
10415
|
+
}],
|
|
10416
|
+
url: '/studio/v1/codexes/{codex}',
|
|
10417
|
+
...options,
|
|
10418
|
+
headers: {
|
|
10419
|
+
'Content-Type': 'application/json',
|
|
10420
|
+
...options.headers
|
|
10421
|
+
}
|
|
10422
|
+
});
|
|
10423
|
+
/**
|
|
10424
|
+
* List the entries of a reference library
|
|
10425
|
+
*
|
|
10426
|
+
* List the entries of one library in pages, each with its type, its name, its aliases and whether it is always present in context. Use it to see what a work already knows before adding an entry, since a duplicate name is refused rather than merged. Continue with next_page_token until the answer stops carrying one.
|
|
10427
|
+
*/
|
|
10428
|
+
export const studioEntriesList = (options) => (options.client ?? client).get({
|
|
10429
|
+
security: [{
|
|
10430
|
+
key: 'BearerAuth',
|
|
10431
|
+
scheme: 'bearer',
|
|
10432
|
+
type: 'http'
|
|
10433
|
+
}, {
|
|
10434
|
+
key: 'ApiKeyAuth',
|
|
10435
|
+
name: 'X-API-Key',
|
|
10436
|
+
type: 'apiKey'
|
|
10437
|
+
}],
|
|
10438
|
+
url: '/studio/v1/codexes/{codex}/entries',
|
|
10439
|
+
...options
|
|
10440
|
+
});
|
|
10441
|
+
/**
|
|
10442
|
+
* Add an entry to a reference library
|
|
10443
|
+
*
|
|
10444
|
+
* Add one entry: a character, a place, a product, a source of facts. Give it the type the genre uses, the name the text will mention, and the description and facts that should reach a writer when it is mentioned. Aliases and excluded phrases keep detection honest, so a common word inside an idiom is not mistaken for the entry. A name already used in the library is refused.
|
|
10445
|
+
*/
|
|
10446
|
+
export const studioEntriesCreate = (options) => (options.client ?? client).post({
|
|
10447
|
+
security: [{
|
|
10448
|
+
key: 'BearerAuth',
|
|
10449
|
+
scheme: 'bearer',
|
|
10450
|
+
type: 'http'
|
|
10451
|
+
}, {
|
|
10452
|
+
key: 'ApiKeyAuth',
|
|
10453
|
+
name: 'X-API-Key',
|
|
10454
|
+
type: 'apiKey'
|
|
10455
|
+
}],
|
|
10456
|
+
url: '/studio/v1/codexes/{codex}/entries',
|
|
10457
|
+
...options,
|
|
10458
|
+
headers: {
|
|
10459
|
+
'Content-Type': 'application/json',
|
|
10460
|
+
...options.headers
|
|
10461
|
+
}
|
|
10462
|
+
});
|
|
10463
|
+
/**
|
|
10464
|
+
* Delete a reference entry
|
|
10465
|
+
*
|
|
10466
|
+
* Delete one entry from a library, which also removes the mentions and the links that pointed at it. Units that claimed it keep their text; only the reference goes away. This cannot be undone, so confirm the name of the entry before deleting it, and prefer changing its tracking setting to never when it should stop reaching writers but stay recorded.
|
|
10467
|
+
*/
|
|
10468
|
+
export const studioEntriesDelete = (options) => (options.client ?? client).delete({
|
|
10469
|
+
security: [{
|
|
10470
|
+
key: 'BearerAuth',
|
|
10471
|
+
scheme: 'bearer',
|
|
10472
|
+
type: 'http'
|
|
10473
|
+
}, {
|
|
10474
|
+
key: 'ApiKeyAuth',
|
|
10475
|
+
name: 'X-API-Key',
|
|
10476
|
+
type: 'apiKey'
|
|
10477
|
+
}],
|
|
10478
|
+
url: '/studio/v1/codexes/{codex}/entries/{entry}',
|
|
10479
|
+
...options
|
|
10480
|
+
});
|
|
10481
|
+
/**
|
|
10482
|
+
* Read one reference entry
|
|
10483
|
+
*
|
|
10484
|
+
* Read one entry in full: its description, its fact ledger, its relations to other entries, its detection settings and its images. Read it before changing it, because an update replaces the fields it names rather than merging them. The entry is addressed by its name in this library, or by its ent_ identifier.
|
|
10485
|
+
*/
|
|
10486
|
+
export const studioEntriesGet = (options) => (options.client ?? client).get({
|
|
10487
|
+
security: [{
|
|
10488
|
+
key: 'BearerAuth',
|
|
10489
|
+
scheme: 'bearer',
|
|
10490
|
+
type: 'http'
|
|
10491
|
+
}, {
|
|
10492
|
+
key: 'ApiKeyAuth',
|
|
10493
|
+
name: 'X-API-Key',
|
|
10494
|
+
type: 'apiKey'
|
|
10495
|
+
}],
|
|
10496
|
+
url: '/studio/v1/codexes/{codex}/entries/{entry}',
|
|
10497
|
+
...options
|
|
10498
|
+
});
|
|
10499
|
+
/**
|
|
10500
|
+
* Change what a reference entry says
|
|
10501
|
+
*
|
|
10502
|
+
* Change one entry: its type, its name, its aliases, its description, its facts, its notes, its tracking setting, its images or its relations. Send update_mask naming exactly the fields you change, because a field the mask leaves out keeps its value while a list field the mask names is replaced whole. Renaming an entry changes what the text has to mention for detection to find it.
|
|
10503
|
+
*/
|
|
10504
|
+
export const studioEntriesUpdate = (options) => (options.client ?? client).patch({
|
|
10505
|
+
security: [{
|
|
10506
|
+
key: 'BearerAuth',
|
|
10507
|
+
scheme: 'bearer',
|
|
10508
|
+
type: 'http'
|
|
10509
|
+
}, {
|
|
10510
|
+
key: 'ApiKeyAuth',
|
|
10511
|
+
name: 'X-API-Key',
|
|
10512
|
+
type: 'apiKey'
|
|
10513
|
+
}],
|
|
10514
|
+
url: '/studio/v1/codexes/{codex}/entries/{entry}',
|
|
10515
|
+
...options,
|
|
10516
|
+
headers: {
|
|
10517
|
+
'Content-Type': 'application/json',
|
|
10518
|
+
...options.headers
|
|
10519
|
+
}
|
|
10520
|
+
});
|
|
10521
|
+
/**
|
|
10522
|
+
* List the writing styles of this organization
|
|
10523
|
+
*
|
|
10524
|
+
* List the styles this API key organization owns, each with its name and description, so you can choose the voice a work should be written in. Continue with next_page_token until the answer stops carrying one. Read one style in full before attaching it, because its samples are what actually shape the writing.
|
|
10525
|
+
*/
|
|
10526
|
+
export const studioStylesList = (options) => (options?.client ?? client).get({
|
|
10527
|
+
security: [{
|
|
10528
|
+
key: 'BearerAuth',
|
|
10529
|
+
scheme: 'bearer',
|
|
10530
|
+
type: 'http'
|
|
10531
|
+
}, {
|
|
10532
|
+
key: 'ApiKeyAuth',
|
|
10533
|
+
name: 'X-API-Key',
|
|
10534
|
+
type: 'apiKey'
|
|
10535
|
+
}],
|
|
10536
|
+
url: '/studio/v1/styles',
|
|
10537
|
+
...options
|
|
10538
|
+
});
|
|
10539
|
+
/**
|
|
10540
|
+
* Create a writing style
|
|
10541
|
+
*
|
|
10542
|
+
* Create a style: the voice a piece is written in, held as samples rather than as adjectives. Samples matter more than a description, so paste one to five paragraphs of writing the piece should sound like, and put the words to avoid into avoid so the banned-word check uses them. Attach a style to a work, or to one draft of it, and its samples then reach every context pack.
|
|
10543
|
+
*/
|
|
10544
|
+
export const studioStylesCreate = (options) => (options.client ?? client).post({
|
|
10545
|
+
security: [{
|
|
10546
|
+
key: 'BearerAuth',
|
|
10547
|
+
scheme: 'bearer',
|
|
10548
|
+
type: 'http'
|
|
10549
|
+
}, {
|
|
10550
|
+
key: 'ApiKeyAuth',
|
|
10551
|
+
name: 'X-API-Key',
|
|
10552
|
+
type: 'apiKey'
|
|
10553
|
+
}],
|
|
10554
|
+
url: '/studio/v1/styles',
|
|
10555
|
+
...options,
|
|
10556
|
+
headers: {
|
|
10557
|
+
'Content-Type': 'application/json',
|
|
10558
|
+
...options.headers
|
|
10559
|
+
}
|
|
10560
|
+
});
|
|
10561
|
+
/**
|
|
10562
|
+
* Delete a writing style
|
|
10563
|
+
*
|
|
10564
|
+
* Delete a style, which detaches it from every work and draft that used it; those units then stop receiving its samples and glossary in their context packs. This cannot be undone, so confirm the style identifier before deleting it, and read the work first when it is not certain which style it uses.
|
|
10565
|
+
*/
|
|
10566
|
+
export const studioStylesDelete = (options) => (options.client ?? client).delete({
|
|
10567
|
+
security: [{
|
|
10568
|
+
key: 'BearerAuth',
|
|
10569
|
+
scheme: 'bearer',
|
|
10570
|
+
type: 'http'
|
|
10571
|
+
}, {
|
|
10572
|
+
key: 'ApiKeyAuth',
|
|
10573
|
+
name: 'X-API-Key',
|
|
10574
|
+
type: 'apiKey'
|
|
10575
|
+
}],
|
|
10576
|
+
url: '/studio/v1/styles/{style}',
|
|
10577
|
+
...options
|
|
10578
|
+
});
|
|
10579
|
+
/**
|
|
10580
|
+
* Read one writing style
|
|
10581
|
+
*
|
|
10582
|
+
* Read one style in full: its samples, the wording to use and to avoid, and its glossary of wrong-to-right terms. Read it before attaching it to a work, since samples decide the sound of the writing far more than the description does, and a glossary term also becomes a deterministic check against the text.
|
|
10583
|
+
*/
|
|
10584
|
+
export const studioStylesGet = (options) => (options.client ?? client).get({
|
|
10585
|
+
security: [{
|
|
10586
|
+
key: 'BearerAuth',
|
|
10587
|
+
scheme: 'bearer',
|
|
10588
|
+
type: 'http'
|
|
10589
|
+
}, {
|
|
10590
|
+
key: 'ApiKeyAuth',
|
|
10591
|
+
name: 'X-API-Key',
|
|
10592
|
+
type: 'apiKey'
|
|
10593
|
+
}],
|
|
10594
|
+
url: '/studio/v1/styles/{style}',
|
|
10595
|
+
...options
|
|
10596
|
+
});
|
|
10597
|
+
/**
|
|
10598
|
+
* Change a writing style
|
|
10599
|
+
*
|
|
10600
|
+
* Change a style: its name, its description, its samples, its use and avoid lists, or its glossary. Send update_mask naming exactly the fields you change; a list the mask names is replaced whole. Adding a term to the glossary or to avoid also changes what the deterministic checks flag, so a work that uses this style sees new findings on its next check.
|
|
10601
|
+
*/
|
|
10602
|
+
export const studioStylesUpdate = (options) => (options.client ?? client).patch({
|
|
10603
|
+
security: [{
|
|
10604
|
+
key: 'BearerAuth',
|
|
10605
|
+
scheme: 'bearer',
|
|
10606
|
+
type: 'http'
|
|
10607
|
+
}, {
|
|
10608
|
+
key: 'ApiKeyAuth',
|
|
10609
|
+
name: 'X-API-Key',
|
|
10610
|
+
type: 'apiKey'
|
|
10611
|
+
}],
|
|
10612
|
+
url: '/studio/v1/styles/{style}',
|
|
10613
|
+
...options,
|
|
10614
|
+
headers: {
|
|
10615
|
+
'Content-Type': 'application/json',
|
|
10616
|
+
...options.headers
|
|
10617
|
+
}
|
|
10618
|
+
});
|
|
10619
|
+
/**
|
|
10620
|
+
* List the templates a genre can start from
|
|
10621
|
+
*
|
|
10622
|
+
* List templates: the built-in starting structures of each genre, followed by the ones this organization saved. Pass a genre to see only the templates that genre can use. A template is used once when a draft is created and is then detached, so changing a template never rewrites a draft that already started from it.
|
|
10623
|
+
*/
|
|
10624
|
+
export const studioTemplatesList = (options) => (options?.client ?? client).get({
|
|
10625
|
+
security: [{
|
|
10626
|
+
key: 'BearerAuth',
|
|
10627
|
+
scheme: 'bearer',
|
|
10628
|
+
type: 'http'
|
|
10629
|
+
}, {
|
|
10630
|
+
key: 'ApiKeyAuth',
|
|
10631
|
+
name: 'X-API-Key',
|
|
10632
|
+
type: 'apiKey'
|
|
10633
|
+
}],
|
|
10634
|
+
url: '/studio/v1/templates',
|
|
10635
|
+
...options
|
|
10636
|
+
});
|
|
10637
|
+
/**
|
|
10638
|
+
* Save a starting structure as a template
|
|
10639
|
+
*
|
|
10640
|
+
* Save a unit tree as a reusable template for one genre, so the same structure can seed later drafts. Give the genre, a name, the outline of units with their intents, and optionally the writing guidance a writer should follow. Creating a template from an existing draft is a separate milestone and answers NOT_IMPLEMENTED, so build the outline here instead.
|
|
10641
|
+
*/
|
|
10642
|
+
export const studioTemplatesCreate = (options) => (options.client ?? client).post({
|
|
10643
|
+
security: [{
|
|
10644
|
+
key: 'BearerAuth',
|
|
10645
|
+
scheme: 'bearer',
|
|
10646
|
+
type: 'http'
|
|
10647
|
+
}, {
|
|
10648
|
+
key: 'ApiKeyAuth',
|
|
10649
|
+
name: 'X-API-Key',
|
|
10650
|
+
type: 'apiKey'
|
|
10651
|
+
}],
|
|
10652
|
+
url: '/studio/v1/templates',
|
|
10653
|
+
...options,
|
|
10654
|
+
headers: {
|
|
10655
|
+
'Content-Type': 'application/json',
|
|
10656
|
+
...options.headers
|
|
10657
|
+
}
|
|
10658
|
+
});
|
|
10659
|
+
/**
|
|
10660
|
+
* Delete a saved template
|
|
10661
|
+
*
|
|
10662
|
+
* Delete a template this organization saved. A built-in template belongs to the catalog and cannot be deleted, so this answers TEMPLATE_NOT_FOUND for one. Drafts that already started from the template are unaffected, because the template was detached when they were created. This cannot be undone.
|
|
10663
|
+
*/
|
|
10664
|
+
export const studioTemplatesDelete = (options) => (options.client ?? client).delete({
|
|
10665
|
+
security: [{
|
|
10666
|
+
key: 'BearerAuth',
|
|
10667
|
+
scheme: 'bearer',
|
|
10668
|
+
type: 'http'
|
|
10669
|
+
}, {
|
|
10670
|
+
key: 'ApiKeyAuth',
|
|
10671
|
+
name: 'X-API-Key',
|
|
10672
|
+
type: 'apiKey'
|
|
10673
|
+
}],
|
|
10674
|
+
url: '/studio/v1/templates/{template}',
|
|
10675
|
+
...options
|
|
10676
|
+
});
|
|
10677
|
+
/**
|
|
10678
|
+
* Read one template
|
|
10679
|
+
*
|
|
10680
|
+
* Read one template: its genre, the writing guidance it carries and the unit outline it seeds, with each unit's intent. Address a saved template by its identifier and a built-in one by its key, alone or with its genre prefix such as novel_long:three_act when two genres share a key. Read it before creating a draft from it, because the template decides the structure the draft starts with.
|
|
10681
|
+
*/
|
|
10682
|
+
export const studioTemplatesGet = (options) => (options.client ?? client).get({
|
|
10683
|
+
security: [{
|
|
10684
|
+
key: 'BearerAuth',
|
|
10685
|
+
scheme: 'bearer',
|
|
10686
|
+
type: 'http'
|
|
10687
|
+
}, {
|
|
10688
|
+
key: 'ApiKeyAuth',
|
|
10689
|
+
name: 'X-API-Key',
|
|
10690
|
+
type: 'apiKey'
|
|
10691
|
+
}],
|
|
10692
|
+
url: '/studio/v1/templates/{template}',
|
|
10693
|
+
...options
|
|
10694
|
+
});
|
|
10695
|
+
/**
|
|
10696
|
+
* List the rendition themes of a platform
|
|
10697
|
+
*
|
|
10698
|
+
* List themes: the layouts a rendition is produced with, for one platform or for all of them. Pass a platform to see only the themes that platform can use. A theme decides the page or card a rendition is built into, so read the chosen theme before creating a rendition rather than after the output looks wrong.
|
|
10699
|
+
*/
|
|
10700
|
+
export const studioThemesList = (options) => (options?.client ?? client).get({
|
|
10701
|
+
security: [{
|
|
10702
|
+
key: 'BearerAuth',
|
|
10703
|
+
scheme: 'bearer',
|
|
10704
|
+
type: 'http'
|
|
10705
|
+
}, {
|
|
10706
|
+
key: 'ApiKeyAuth',
|
|
10707
|
+
name: 'X-API-Key',
|
|
10708
|
+
type: 'apiKey'
|
|
10709
|
+
}],
|
|
10710
|
+
url: '/studio/v1/themes',
|
|
10711
|
+
...options
|
|
10712
|
+
});
|
|
10713
|
+
/**
|
|
10714
|
+
* Create a rendition theme
|
|
10715
|
+
*
|
|
10716
|
+
* Create a theme for one platform: the HTML and CSS a written piece is rendered into, plus the fixed header and footer every rendition carries. A DOCX platform takes a reference document instead of markup, and a card theme takes its aspect, width and fonts. An agent may write a theme here, which is how a new layout appears without a release.
|
|
10717
|
+
*/
|
|
10718
|
+
export const studioThemesCreate = (options) => (options.client ?? client).post({
|
|
10719
|
+
security: [{
|
|
10720
|
+
key: 'BearerAuth',
|
|
10721
|
+
scheme: 'bearer',
|
|
10722
|
+
type: 'http'
|
|
10723
|
+
}, {
|
|
10724
|
+
key: 'ApiKeyAuth',
|
|
10725
|
+
name: 'X-API-Key',
|
|
10726
|
+
type: 'apiKey'
|
|
10727
|
+
}],
|
|
10728
|
+
url: '/studio/v1/themes',
|
|
10729
|
+
...options,
|
|
10730
|
+
headers: {
|
|
10731
|
+
'Content-Type': 'application/json',
|
|
10732
|
+
...options.headers
|
|
10733
|
+
}
|
|
10734
|
+
});
|
|
10735
|
+
/**
|
|
10736
|
+
* Delete a rendition theme
|
|
10737
|
+
*
|
|
10738
|
+
* Delete a theme this organization created. A built-in theme belongs to the platform and cannot be deleted, so this answers THEME_NOT_FOUND for one. Renditions already produced with the theme keep their output, because the produced file no longer depends on the theme. This cannot be undone.
|
|
10739
|
+
*/
|
|
10740
|
+
export const studioThemesDelete = (options) => (options.client ?? client).delete({
|
|
10741
|
+
security: [{
|
|
10742
|
+
key: 'BearerAuth',
|
|
10743
|
+
scheme: 'bearer',
|
|
10744
|
+
type: 'http'
|
|
10745
|
+
}, {
|
|
10746
|
+
key: 'ApiKeyAuth',
|
|
10747
|
+
name: 'X-API-Key',
|
|
10748
|
+
type: 'apiKey'
|
|
10749
|
+
}],
|
|
10750
|
+
url: '/studio/v1/themes/{theme}',
|
|
8736
10751
|
...options
|
|
8737
10752
|
});
|
|
8738
10753
|
/**
|
|
8739
|
-
*
|
|
10754
|
+
* Read one rendition theme
|
|
8740
10755
|
*
|
|
8741
|
-
*
|
|
10756
|
+
* Read one theme in full: the HTML template and stylesheet it renders with, the header and footer it always carries, the reference document a DOCX rendition uses, or the card proportions a card rendition uses. Read it before creating a rendition with it, because a theme decides what the output looks like and a DOCX theme is a file rather than markup.
|
|
8742
10757
|
*/
|
|
8743
|
-
export const
|
|
8744
|
-
security: [
|
|
8745
|
-
|
|
8746
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8747
|
-
name: 'X-API-Key',
|
|
8748
|
-
type: 'apiKey'
|
|
8749
|
-
},
|
|
8750
|
-
{
|
|
8751
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
10758
|
+
export const studioThemesGet = (options) => (options.client ?? client).get({
|
|
10759
|
+
security: [{
|
|
10760
|
+
key: 'BearerAuth',
|
|
8752
10761
|
scheme: 'bearer',
|
|
8753
10762
|
type: 'http'
|
|
8754
|
-
},
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
name: 'X-Team-ID',
|
|
8758
|
-
type: 'apiKey'
|
|
8759
|
-
},
|
|
8760
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8761
|
-
{
|
|
8762
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8763
|
-
name: 'X-Team-ID',
|
|
10763
|
+
}, {
|
|
10764
|
+
key: 'ApiKeyAuth',
|
|
10765
|
+
name: 'X-API-Key',
|
|
8764
10766
|
type: 'apiKey'
|
|
8765
|
-
},
|
|
8766
|
-
|
|
8767
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8768
|
-
scheme: 'bearer',
|
|
8769
|
-
type: 'http'
|
|
8770
|
-
}
|
|
8771
|
-
],
|
|
8772
|
-
url: '/sandbox/v1/templates/{templateID}',
|
|
10767
|
+
}],
|
|
10768
|
+
url: '/studio/v1/themes/{theme}',
|
|
8773
10769
|
...options
|
|
8774
10770
|
});
|
|
8775
10771
|
/**
|
|
8776
|
-
*
|
|
10772
|
+
* Change a rendition theme
|
|
8777
10773
|
*
|
|
8778
|
-
*
|
|
10774
|
+
* Change a theme: its name, its markup, its stylesheet, or the fixed fragments around every rendition. Send update_mask naming exactly the fields you change. Changing a theme does not rewrite renditions already produced with an earlier version, because each rendition records the theme version it was built from.
|
|
8779
10775
|
*/
|
|
8780
|
-
export const
|
|
8781
|
-
security: [
|
|
8782
|
-
|
|
8783
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8784
|
-
name: 'X-API-Key',
|
|
8785
|
-
type: 'apiKey'
|
|
8786
|
-
},
|
|
8787
|
-
{
|
|
8788
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
10776
|
+
export const studioThemesUpdate = (options) => (options.client ?? client).patch({
|
|
10777
|
+
security: [{
|
|
10778
|
+
key: 'BearerAuth',
|
|
8789
10779
|
scheme: 'bearer',
|
|
8790
10780
|
type: 'http'
|
|
8791
|
-
},
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
name: 'X-Team-ID',
|
|
8795
|
-
type: 'apiKey'
|
|
8796
|
-
},
|
|
8797
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8798
|
-
{
|
|
8799
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8800
|
-
name: 'X-Team-ID',
|
|
10781
|
+
}, {
|
|
10782
|
+
key: 'ApiKeyAuth',
|
|
10783
|
+
name: 'X-API-Key',
|
|
8801
10784
|
type: 'apiKey'
|
|
8802
|
-
},
|
|
8803
|
-
|
|
8804
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8805
|
-
scheme: 'bearer',
|
|
8806
|
-
type: 'http'
|
|
8807
|
-
}
|
|
8808
|
-
],
|
|
8809
|
-
url: '/sandbox/v1/templates/tags',
|
|
10785
|
+
}],
|
|
10786
|
+
url: '/studio/v1/themes/{theme}',
|
|
8810
10787
|
...options,
|
|
8811
10788
|
headers: {
|
|
8812
10789
|
'Content-Type': 'application/json',
|
|
@@ -8814,40 +10791,21 @@ export const deleteTemplateTags = (options) => (options.client ?? client).delete
|
|
|
8814
10791
|
}
|
|
8815
10792
|
});
|
|
8816
10793
|
/**
|
|
8817
|
-
*
|
|
10794
|
+
* Create a rendition of a draft for a platform
|
|
8818
10795
|
*
|
|
8819
|
-
*
|
|
10796
|
+
* Create a rendition: the form of one draft that a platform receives, such as a Xiaohongshu card set, a DOCX file or a Markdown file. Read the platform first with the platform call and pass its versioned key; pass a theme only to override the platform's default layout. Pass render true to render in the same call and read render_state and issues in the answer; without it the rendition starts as pending and the render call produces it. Rendering a Xiaohongshu card set is billed by Browser Rendering time (meter browser_ms, product studio-render); DOCX and Markdown renditions are not billed. A draft with no body renders as invalid with a draft_empty issue, and an unavailable render service leaves render_state failed with a render_unavailable issue, so repeat the render call later. Send a request_id to make a repeated call return the first rendition instead of creating another. Next, publish the rendition to export it.
|
|
8820
10797
|
*/
|
|
8821
|
-
export const
|
|
8822
|
-
security: [
|
|
8823
|
-
|
|
8824
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8825
|
-
name: 'X-API-Key',
|
|
8826
|
-
type: 'apiKey'
|
|
8827
|
-
},
|
|
8828
|
-
{
|
|
8829
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
10798
|
+
export const studioRenditionsCreate = (options) => (options.client ?? client).post({
|
|
10799
|
+
security: [{
|
|
10800
|
+
key: 'BearerAuth',
|
|
8830
10801
|
scheme: 'bearer',
|
|
8831
10802
|
type: 'http'
|
|
8832
|
-
},
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
name: 'X-Team-ID',
|
|
8836
|
-
type: 'apiKey'
|
|
8837
|
-
},
|
|
8838
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8839
|
-
{
|
|
8840
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8841
|
-
name: 'X-Team-ID',
|
|
10803
|
+
}, {
|
|
10804
|
+
key: 'ApiKeyAuth',
|
|
10805
|
+
name: 'X-API-Key',
|
|
8842
10806
|
type: 'apiKey'
|
|
8843
|
-
},
|
|
8844
|
-
|
|
8845
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8846
|
-
scheme: 'bearer',
|
|
8847
|
-
type: 'http'
|
|
8848
|
-
}
|
|
8849
|
-
],
|
|
8850
|
-
url: '/sandbox/v1/templates/tags',
|
|
10807
|
+
}],
|
|
10808
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/renditions',
|
|
8851
10809
|
...options,
|
|
8852
10810
|
headers: {
|
|
8853
10811
|
'Content-Type': 'application/json',
|
|
@@ -8855,91 +10813,75 @@ export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
|
8855
10813
|
}
|
|
8856
10814
|
});
|
|
8857
10815
|
/**
|
|
8858
|
-
* List
|
|
10816
|
+
* List the renditions of a work
|
|
8859
10817
|
*
|
|
8860
|
-
*
|
|
10818
|
+
* List the renditions of one work, each with its platform, render state, stale flag and publish state. Pass draft to see only the renditions of one draft. Use it to find the rendition to publish or to render again, and read stale before exporting: a stale rendition was built from an older draft and cannot be exported until the render call has rebuilt it. The answer is one page; keep following next_page_token while it is present.
|
|
8861
10819
|
*/
|
|
8862
|
-
export const
|
|
8863
|
-
security: [
|
|
8864
|
-
|
|
8865
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8866
|
-
name: 'X-API-Key',
|
|
8867
|
-
type: 'apiKey'
|
|
8868
|
-
},
|
|
8869
|
-
{
|
|
8870
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
10820
|
+
export const studioRenditionsList = (options) => (options.client ?? client).get({
|
|
10821
|
+
security: [{
|
|
10822
|
+
key: 'BearerAuth',
|
|
8871
10823
|
scheme: 'bearer',
|
|
8872
10824
|
type: 'http'
|
|
8873
|
-
},
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
name: 'X-Team-ID',
|
|
8877
|
-
type: 'apiKey'
|
|
8878
|
-
},
|
|
8879
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8880
|
-
{
|
|
8881
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8882
|
-
name: 'X-Team-ID',
|
|
10825
|
+
}, {
|
|
10826
|
+
key: 'ApiKeyAuth',
|
|
10827
|
+
name: 'X-API-Key',
|
|
8883
10828
|
type: 'apiKey'
|
|
8884
|
-
},
|
|
8885
|
-
|
|
8886
|
-
key: 'sandbox-AdminJWTAuth',
|
|
8887
|
-
scheme: 'bearer',
|
|
8888
|
-
type: 'http'
|
|
8889
|
-
}
|
|
8890
|
-
],
|
|
8891
|
-
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
10829
|
+
}],
|
|
10830
|
+
url: '/studio/v1/works/{work}/renditions',
|
|
8892
10831
|
...options
|
|
8893
10832
|
});
|
|
8894
10833
|
/**
|
|
8895
|
-
*
|
|
10834
|
+
* Delete a rendition
|
|
8896
10835
|
*
|
|
8897
|
-
*
|
|
10836
|
+
* Delete a rendition and stop listing it. The draft it was built from is untouched, and a new rendition can be created from it at any time. Files already downloaded from an earlier export are not affected. Use it to clear a failed or abandoned rendition; to refresh one, call the render operation instead.
|
|
8898
10837
|
*/
|
|
8899
|
-
export const
|
|
8900
|
-
security: [
|
|
8901
|
-
|
|
8902
|
-
key: 'sandbox-ApiKeyAuth',
|
|
8903
|
-
name: 'X-API-Key',
|
|
8904
|
-
type: 'apiKey'
|
|
8905
|
-
},
|
|
8906
|
-
{
|
|
8907
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
10838
|
+
export const studioRenditionsDelete = (options) => (options.client ?? client).delete({
|
|
10839
|
+
security: [{
|
|
10840
|
+
key: 'BearerAuth',
|
|
8908
10841
|
scheme: 'bearer',
|
|
8909
10842
|
type: 'http'
|
|
8910
|
-
},
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
name: 'X-Team-ID',
|
|
8914
|
-
type: 'apiKey'
|
|
8915
|
-
},
|
|
8916
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8917
|
-
{
|
|
8918
|
-
key: 'sandbox-AdminTeamAuth',
|
|
8919
|
-
name: 'X-Team-ID',
|
|
10843
|
+
}, {
|
|
10844
|
+
key: 'ApiKeyAuth',
|
|
10845
|
+
name: 'X-API-Key',
|
|
8920
10846
|
type: 'apiKey'
|
|
8921
|
-
},
|
|
8922
|
-
|
|
8923
|
-
|
|
10847
|
+
}],
|
|
10848
|
+
url: '/studio/v1/works/{work}/renditions/{rendition}',
|
|
10849
|
+
...options
|
|
10850
|
+
});
|
|
10851
|
+
/**
|
|
10852
|
+
* Read one rendition
|
|
10853
|
+
*
|
|
10854
|
+
* Read one rendition in full: its render state, the validation issues the render found, the parts (one per card page or thread post), the files it produced and its publish state. Call it after create, render or publish to see the outcome, because a render that finished invalid or failed is reported here and not as an HTTP error. stale is true when the draft has changed since source_revision; call the render operation before exporting a stale rendition.
|
|
10855
|
+
*/
|
|
10856
|
+
export const studioRenditionsGet = (options) => (options.client ?? client).get({
|
|
10857
|
+
security: [{
|
|
10858
|
+
key: 'BearerAuth',
|
|
8924
10859
|
scheme: 'bearer',
|
|
8925
10860
|
type: 'http'
|
|
8926
|
-
}
|
|
8927
|
-
|
|
8928
|
-
|
|
10861
|
+
}, {
|
|
10862
|
+
key: 'ApiKeyAuth',
|
|
10863
|
+
name: 'X-API-Key',
|
|
10864
|
+
type: 'apiKey'
|
|
10865
|
+
}],
|
|
10866
|
+
url: '/studio/v1/works/{work}/renditions/{rendition}',
|
|
8929
10867
|
...options
|
|
8930
10868
|
});
|
|
8931
10869
|
/**
|
|
8932
|
-
*
|
|
10870
|
+
* Change the theme or settings of a rendition
|
|
8933
10871
|
*
|
|
8934
|
-
*
|
|
10872
|
+
* Change a rendition's theme or settings. Send update_mask naming exactly the fields you change, such as theme or settings; a field left out keeps its value. The produced files are not rebuilt by this call, so call the render operation afterwards to apply the change. A rendition whose export or publish has started is locked and answers RENDITION_PUBLISH_LOCKED; create a new rendition for new content.
|
|
8935
10873
|
*/
|
|
8936
|
-
export const
|
|
10874
|
+
export const studioRenditionsUpdate = (options) => (options.client ?? client).patch({
|
|
8937
10875
|
security: [{
|
|
8938
|
-
key: '
|
|
10876
|
+
key: 'BearerAuth',
|
|
8939
10877
|
scheme: 'bearer',
|
|
8940
10878
|
type: 'http'
|
|
10879
|
+
}, {
|
|
10880
|
+
key: 'ApiKeyAuth',
|
|
10881
|
+
name: 'X-API-Key',
|
|
10882
|
+
type: 'apiKey'
|
|
8941
10883
|
}],
|
|
8942
|
-
url: '/
|
|
10884
|
+
url: '/studio/v1/works/{work}/renditions/{rendition}',
|
|
8943
10885
|
...options,
|
|
8944
10886
|
headers: {
|
|
8945
10887
|
'Content-Type': 'application/json',
|
|
@@ -8947,58 +10889,58 @@ export const searchSearch = (options) => (options.client ?? client).post({
|
|
|
8947
10889
|
}
|
|
8948
10890
|
});
|
|
8949
10891
|
/**
|
|
8950
|
-
*
|
|
10892
|
+
* Render a rendition again from the current draft
|
|
8951
10893
|
*
|
|
8952
|
-
*
|
|
10894
|
+
* Render the rendition from the draft as it is now, replacing its parts and files and clearing stale. Call it after the draft changed, after a theme or settings change, or after a failed render. The answer carries render_state: rendered, invalid when the draft has an error-level issue (for example draft_empty on a draft with no body), or failed when the render service was unavailable (issue render_unavailable; repeat later). A render does not fail the HTTP call for those outcomes, so read render_state and issues. Rendering a Xiaohongshu card set is billed by Browser Rendering time (meter browser_ms, product studio-render); DOCX and Markdown are not billed. Rendering the same rendition twice at once answers REVISION_CONFLICT; retry shortly. Next, publish the rendition to export it.
|
|
8953
10895
|
*/
|
|
8954
|
-
export const
|
|
10896
|
+
export const studioRenditionsRender = (options) => (options.client ?? client).post({
|
|
8955
10897
|
security: [{
|
|
8956
|
-
key: '
|
|
10898
|
+
key: 'BearerAuth',
|
|
8957
10899
|
scheme: 'bearer',
|
|
8958
10900
|
type: 'http'
|
|
10901
|
+
}, {
|
|
10902
|
+
key: 'ApiKeyAuth',
|
|
10903
|
+
name: 'X-API-Key',
|
|
10904
|
+
type: 'apiKey'
|
|
8959
10905
|
}],
|
|
8960
|
-
url: '/
|
|
8961
|
-
...options
|
|
8962
|
-
headers: {
|
|
8963
|
-
'Content-Type': 'application/json',
|
|
8964
|
-
...options.headers
|
|
8965
|
-
}
|
|
10906
|
+
url: '/studio/v1/works/{work}/renditions/{rendition}:render',
|
|
10907
|
+
...options
|
|
8966
10908
|
});
|
|
8967
10909
|
/**
|
|
8968
|
-
*
|
|
10910
|
+
* Export a rendition
|
|
8969
10911
|
*
|
|
8970
|
-
*
|
|
10912
|
+
* Export a rendition for the platforms that deliver a file: markdown@1, docx@1 and xiaohongshu@1 end with publish.state exported, and a card rendition gains one ZIP of its pages in files. Publishing to a platform account such as X or WeChat is not available yet and answers PLATFORM_NOT_AVAILABLE; export instead. The rendition must be rendered, not stale and without error-level issues: RENDITION_NOT_RENDERED means call the render operation first, RENDITION_STALE means the draft changed so render again, RENDITION_INVALID means fix the draft problems listed in issues and render again. Exporting the same rendition twice at once answers REVISION_CONFLICT; retry shortly. Next, call the content operation to download the file.
|
|
8971
10913
|
*/
|
|
8972
|
-
export const
|
|
10914
|
+
export const studioRenditionsPublish = (options) => (options.client ?? client).post({
|
|
8973
10915
|
security: [{
|
|
8974
|
-
key: '
|
|
10916
|
+
key: 'BearerAuth',
|
|
8975
10917
|
scheme: 'bearer',
|
|
8976
10918
|
type: 'http'
|
|
10919
|
+
}, {
|
|
10920
|
+
key: 'ApiKeyAuth',
|
|
10921
|
+
name: 'X-API-Key',
|
|
10922
|
+
type: 'apiKey'
|
|
8977
10923
|
}],
|
|
8978
|
-
url: '/
|
|
8979
|
-
...options
|
|
8980
|
-
headers: {
|
|
8981
|
-
'Content-Type': 'application/json',
|
|
8982
|
-
...options.headers
|
|
8983
|
-
}
|
|
10924
|
+
url: '/studio/v1/works/{work}/renditions/{rendition}:publish',
|
|
10925
|
+
...options
|
|
8984
10926
|
});
|
|
8985
10927
|
/**
|
|
8986
|
-
*
|
|
10928
|
+
* Get a download URL for a rendition file
|
|
8987
10929
|
*
|
|
8988
|
-
*
|
|
10930
|
+
* Get a signed, short-lived URL to download what a rendition produced. Without part it points to the rendition's own first file: the ZIP of pages for a card rendition, the DOCX for docx@1. With part it points to that part's first file, such as one card PNG; a part that has no file, or a rendition not rendered yet, answers RENDITION_NOT_RENDERED, and an index no part has answers INVALID_PARAMS. Call it after a successful render or export, download the url before expire_time, and call again for a fresh one when it has expired. The URL is a credential: do not store or share it.
|
|
8989
10931
|
*/
|
|
8990
|
-
export const
|
|
10932
|
+
export const studioRenditionsContentUrl = (options) => (options.client ?? client).get({
|
|
8991
10933
|
security: [{
|
|
8992
|
-
key: '
|
|
10934
|
+
key: 'BearerAuth',
|
|
8993
10935
|
scheme: 'bearer',
|
|
8994
10936
|
type: 'http'
|
|
10937
|
+
}, {
|
|
10938
|
+
key: 'ApiKeyAuth',
|
|
10939
|
+
name: 'X-API-Key',
|
|
10940
|
+
type: 'apiKey'
|
|
8995
10941
|
}],
|
|
8996
|
-
url: '/
|
|
8997
|
-
...options
|
|
8998
|
-
headers: {
|
|
8999
|
-
'Content-Type': 'application/json',
|
|
9000
|
-
...options.headers
|
|
9001
|
-
}
|
|
10942
|
+
url: '/studio/v1/works/{work}/renditions/{rendition}/content',
|
|
10943
|
+
...options
|
|
9002
10944
|
});
|
|
9003
10945
|
/**
|
|
9004
10946
|
* List vaults
|
|
@@ -9017,7 +10959,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
|
|
|
9017
10959
|
/**
|
|
9018
10960
|
* Create vault
|
|
9019
10961
|
*
|
|
9020
|
-
* 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.
|
|
10962
|
+
* 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.
|
|
9021
10963
|
*/
|
|
9022
10964
|
export const vaultCreateVault = (options) => (options.client ?? client).post({
|
|
9023
10965
|
security: [{
|
|
@@ -9613,7 +11555,7 @@ export const ticketGetLabels = (options) => (options?.client ?? client).get({
|
|
|
9613
11555
|
/**
|
|
9614
11556
|
* Create or add labels
|
|
9615
11557
|
*
|
|
9616
|
-
* 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.
|
|
11558
|
+
* 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.
|
|
9617
11559
|
*/
|
|
9618
11560
|
export const ticketPostLabels = (options) => (options.client ?? client).post({
|
|
9619
11561
|
security: [{
|
|
@@ -9635,7 +11577,7 @@ export const ticketPostLabels = (options) => (options.client ?? client).post({
|
|
|
9635
11577
|
/**
|
|
9636
11578
|
* Remove labels
|
|
9637
11579
|
*
|
|
9638
|
-
* 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.
|
|
11580
|
+
* 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.
|
|
9639
11581
|
*/
|
|
9640
11582
|
export const ticketDeleteLabelsName = (options) => (options.client ?? client).delete({
|
|
9641
11583
|
security: [{
|
|
@@ -9653,7 +11595,7 @@ export const ticketDeleteLabelsName = (options) => (options.client ?? client).de
|
|
|
9653
11595
|
/**
|
|
9654
11596
|
* Update labels
|
|
9655
11597
|
*
|
|
9656
|
-
* 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.
|
|
11598
|
+
* 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.
|
|
9657
11599
|
*/
|
|
9658
11600
|
export const ticketPatchLabelsName = (options) => (options.client ?? client).patch({
|
|
9659
11601
|
security: [{
|