@deepraxis/sdk 0.1.1-dev.b4fa9b9 → 0.1.1-dev.b58d05d

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.
@@ -971,6 +971,20 @@ export const browserViewerHeartbeat = (options) => (options.client ?? client).po
971
971
  ...options.headers
972
972
  }
973
973
  });
974
+ /**
975
+ * 读取会话只读画面帧
976
+ *
977
+ * 读取会话的一张只读画面帧(JPEG 字节)。创建者可读,同组织其他成员只在该会话声明为组织可见时可读;其余情况一律返回 404 SESSION_NOT_FOUND,不提示会话是否存在。响应体没有任何可控制浏览器的凭据,且不接受任何动作参数。
978
+ */
979
+ export const browserGetSessionFrame = (options) => (options.client ?? client).get({
980
+ security: [{
981
+ key: 'BrowserBearer',
982
+ scheme: 'bearer',
983
+ type: 'http'
984
+ }],
985
+ url: '/browser/v1/sessions/{sessionId}/frame',
986
+ ...options
987
+ });
974
988
  /**
975
989
  * 列出浏览器上下文
976
990
  *
@@ -1099,6 +1113,20 @@ export const browserStreamSession = (options) => (options.client ?? client).sse.
1099
1113
  url: '/browser/v1/sessions/{sessionId}/stream',
1100
1114
  ...options
1101
1115
  });
1116
+ /**
1117
+ * 订阅会话只读画面
1118
+ *
1119
+ * SSE:只推送只读画面帧,event 为 frame 或 end,data 为帧的 JSON 或 null;帧 data 是 JPEG 的 base64 编码,ts 是浏览器产生该帧的时刻(epoch 毫秒),约每秒最多 5 帧。评论 ping 每 15 秒一次,end 后关闭。这条通道与 /sessions/{sessionId}/stream 相互独立:它的消息只含画面,绝不含 wsUrl、signingKey、connectUrl、debuggerUrl、debuggerFullscreenUrl。创建者可订阅,同组织其他成员只在该会话声明为组织可见时可订阅;其余情况一律返回 404 SESSION_NOT_FOUND。
1120
+ */
1121
+ export const browserStreamSessionFrames = (options) => (options.client ?? client).sse.get({
1122
+ security: [{
1123
+ key: 'BrowserBearer',
1124
+ scheme: 'bearer',
1125
+ type: 'http'
1126
+ }],
1127
+ url: '/browser/v1/sessions/{sessionId}/frames',
1128
+ ...options
1129
+ });
1102
1130
  /**
1103
1131
  * 读取 Selenium 不支持提示
1104
1132
  *
@@ -2353,6 +2381,46 @@ export const getObservedProcessOutput = (options) => (options.client ?? client).
2353
2381
  url: '/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output',
2354
2382
  ...options
2355
2383
  });
2384
+ /**
2385
+ * Start a task whose output is pushed off the machine while it runs
2386
+ *
2387
+ * Run a long command whose output you will read back afterwards, including after the sandbox is deleted, instead of holding one connection open. Use this for builds, test runs and batch jobs; use commands.run for a short command whose output you want inline. The machine's resident daemon pushes the task's stdout/stderr to Praxis storage as it is produced, so the log survives the sandbox (seven days) and can be read in ranges with sandboxes.tasks.log; no vendor exec channel is involved. The command and the shipping credential travel to the daemon in its process environment, never in argv, so neither appears in the machine's process list. Only a full sandbox whose daemon advertises log-ship can run a task; any other machine returns PROVIDER_UNSUPPORTED with the reason. Returns 201 with the task id; starting is not waiting — poll the log to follow the task, and the final marker's exitCode for how it ended.
2388
+ */
2389
+ export const startSandboxTask = (options) => (options.client ?? client).post({
2390
+ security: [{
2391
+ key: 'BearerAuth',
2392
+ scheme: 'bearer',
2393
+ type: 'http'
2394
+ }, {
2395
+ key: 'ApiKeyAuth',
2396
+ name: 'X-API-Key',
2397
+ type: 'apiKey'
2398
+ }],
2399
+ url: '/sandbox/v1/sandboxes/{sandboxID}/tasks',
2400
+ ...options,
2401
+ headers: {
2402
+ 'Content-Type': 'application/json',
2403
+ ...options.headers
2404
+ }
2405
+ });
2406
+ /**
2407
+ * Read a range of a task's pushed output
2408
+ *
2409
+ * Follow a task started with sandboxes.tasks.start, or read it long after its sandbox is gone. This reads Praxis storage and never the machine, so the answer is the same whether the sandbox is running, paused or deleted; the log is kept for seven days. Read in ranges: pass the previous answer's nextOffset as offset to continue, and stop when done is true. done means the final marker exists and the whole stream has been read, and only then do exitCode and size carry the task's outcome. text is UTF-8 decoded by bytes and backs up to a whole character when a cut would split one, so a page never ends mid-character; size, offset and nextOffset all count bytes. Ownership comes from the sandbox's index row while it exists and from the record written when the task started once it does not, so a sandbox id you own keeps answering after the sandbox is deleted. A task that was never started, or one belonging to another organization, returns NOT_FOUND.
2410
+ */
2411
+ export const getSandboxTaskLog = (options) => (options.client ?? client).get({
2412
+ security: [{
2413
+ key: 'BearerAuth',
2414
+ scheme: 'bearer',
2415
+ type: 'http'
2416
+ }, {
2417
+ key: 'ApiKeyAuth',
2418
+ name: 'X-API-Key',
2419
+ type: 'apiKey'
2420
+ }],
2421
+ url: '/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log',
2422
+ ...options
2423
+ });
2356
2424
  /**
2357
2425
  * Kill sandbox
2358
2426
  *
@@ -8035,6 +8103,170 @@ export const devopsProgressiveRolloutsRollback = (options) => (options.client ??
8035
8103
  ...options.headers
8036
8104
  }
8037
8105
  });
8106
+ /**
8107
+ * Delete a target's OpenTofu state
8108
+ *
8109
+ * Delete the current OpenTofu state of one deploy target, as OpenTofu does when a workspace is deleted. The kept versions of earlier writes stay. While a lock is held the call must carry its ID, otherwise it answers 409 LOCK_CONFLICT. Deleting a state that does not exist succeeds.
8110
+ */
8111
+ export const devopsTofuStateDelete = (options) => (options.client ?? client).delete({
8112
+ security: [{
8113
+ key: 'devops-bearerAuth',
8114
+ scheme: 'bearer',
8115
+ type: 'http'
8116
+ }],
8117
+ url: '/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state',
8118
+ ...options
8119
+ });
8120
+ /**
8121
+ * Read a target's OpenTofu state
8122
+ *
8123
+ * Read the current OpenTofu state of one deploy target in one DevOps environment. This is the read half of the OpenTofu HTTP backend that `praxis devops deploy --engine tofu` configures: OpenTofu sends HTTP Basic with any username and a Praxis API key as the password, and the route accepts the ordinary Bearer key too. The answer is the state document exactly as the last write stored it. A target never deployed in this environment answers 404, which OpenTofu reads as an empty state.
8124
+ */
8125
+ export const devopsTofuStateGet = (options) => (options.client ?? client).get({
8126
+ security: [{
8127
+ key: 'devops-bearerAuth',
8128
+ scheme: 'bearer',
8129
+ type: 'http'
8130
+ }],
8131
+ url: '/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state',
8132
+ ...options
8133
+ });
8134
+ /**
8135
+ * Write a target's OpenTofu state
8136
+ *
8137
+ * Store a new OpenTofu state for one deploy target. OpenTofu calls this after every apply, passing the lock ID it holds as ID. Each accepted write also keeps an immutable version of that state (the latest 50 per target are kept), so a rollout's state change can be audited. A state document is at most 1 MiB. A write whose serial is lower than the stored serial of the same lineage is a stale write and answers 409 STALE_SERIAL; re-run so OpenTofu reads the newer state first.
8138
+ */
8139
+ export const devopsTofuStateWrite = (options) => (options.client ?? client).post({
8140
+ security: [{
8141
+ key: 'devops-bearerAuth',
8142
+ scheme: 'bearer',
8143
+ type: 'http'
8144
+ }],
8145
+ url: '/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state',
8146
+ ...options,
8147
+ headers: {
8148
+ 'Content-Type': 'application/json',
8149
+ ...options.headers
8150
+ }
8151
+ });
8152
+ /**
8153
+ * Unlock a target's OpenTofu state
8154
+ *
8155
+ * Release the lock on one target's state; this is the DELETE that `praxis devops deploy` configures as OpenTofu's unlock_method (the default UNLOCK verb on the state path works too). The lock ID is read from the lock info body, or from the ID query value. Releasing a lock that is not held succeeds; releasing it under a different ID answers 409 LOCK_CONFLICT.
8156
+ */
8157
+ export const devopsTofuStateUnlock = (options) => (options.client ?? client).delete({
8158
+ security: [{
8159
+ key: 'devops-bearerAuth',
8160
+ scheme: 'bearer',
8161
+ type: 'http'
8162
+ }],
8163
+ url: '/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state/lock',
8164
+ ...options,
8165
+ headers: {
8166
+ 'Content-Type': 'application/json',
8167
+ ...options.headers
8168
+ }
8169
+ });
8170
+ /**
8171
+ * Lock a target's OpenTofu state
8172
+ *
8173
+ * Take the lock on one target's state before OpenTofu plans or applies; this is the POST that `praxis devops deploy` configures as OpenTofu's lock_method (the default LOCK verb on the state path works too). Exactly one holder can hold the lock. A held lock answers 423 with the holder's lock info, which names who is deploying; wait for them or, if they are gone, release it with a force-unlock using the ID in that answer.
8174
+ */
8175
+ export const devopsTofuStateLock = (options) => (options.client ?? client).post({
8176
+ security: [{
8177
+ key: 'devops-bearerAuth',
8178
+ scheme: 'bearer',
8179
+ type: 'http'
8180
+ }],
8181
+ url: '/devops/v1/projects/{project}/environments/{environment}/targets/{target}/state/lock',
8182
+ ...options,
8183
+ headers: {
8184
+ 'Content-Type': 'application/json',
8185
+ ...options.headers
8186
+ }
8187
+ });
8188
+ /**
8189
+ * List changes
8190
+ *
8191
+ * List the project's changes, newest first, each with its derived stage and one cell per environment. Use it to see what is in flight before opening another change, or to find the id (the branch name) of a change you want to read. filter narrows the list: stage is derived from the facts, so it is applied after derivation, while type, owner and ended narrow on stored columns. Leaving a filter field out, or sending an empty array, does not narrow that field. ended=true lists changes that are done or abandoned, ended=false lists the rest. totalSize is answered on the first page only and counts what the filter leaves.
8192
+ */
8193
+ export const devopsChangesList = (options) => (options.client ?? client).get({
8194
+ security: [{
8195
+ key: 'devops-bearerAuth',
8196
+ scheme: 'bearer',
8197
+ type: 'http'
8198
+ }],
8199
+ url: '/devops/v1/projects/{project}/changes',
8200
+ ...options
8201
+ });
8202
+ /**
8203
+ * Create a change
8204
+ *
8205
+ * Open a change: the unit that carries one piece of work from a branch to production. A change has no separate id — its id is its branch name, <type>/<slug> (for example feat/run-page-v2), and the branch is cut from main as part of this call. type says what the work is and slug names it; both together are the id, so the same pair sent again answers the change the first call made instead of creating a second. A change with a flag also creates a release flag whose key is the slug, off in every environment, so opening one changes no runtime behaviour; withFlag defaults to true for feat and false for every other type, and you may override it either way. Requesting a change opens it at once — there is no approval step — and the caller becomes its owner. A slug already used by another type in the project is refused with CHANGE_SLUG_TAKEN because both would need the same branch name. The stage in the answer is derived from facts such as pull requests and promotions; it is never something you set.
8206
+ */
8207
+ export const devopsChangesCreate = (options) => (options.client ?? client).post({
8208
+ security: [{
8209
+ key: 'devops-bearerAuth',
8210
+ scheme: 'bearer',
8211
+ type: 'http'
8212
+ }],
8213
+ url: '/devops/v1/projects/{project}/changes',
8214
+ ...options,
8215
+ headers: {
8216
+ 'Content-Type': 'application/json',
8217
+ ...options.headers
8218
+ }
8219
+ });
8220
+ /**
8221
+ * Retrieve a change
8222
+ *
8223
+ * Read one change in full: its derived stage, its pull requests (one per slice, oldest first), its flag, its workspace, and one cell per environment showing the version it rode and how far its flag has been rolled out there. The id is the branch name and contains a slash, so it must be percent-encoded in the path: feat/run-page-v2 is sent as feat%2Frun-page-v2. The stage is derived, not stored — with several pull requests it shows the slice that is furthest behind, so a change already in production that opens a new slice goes back to reviewing. When suspectedIn is set, the latest verification in that environment failed and this change is listed among the suspects until a later verification succeeds.
8224
+ */
8225
+ export const devopsChangesGet = (options) => (options.client ?? client).get({
8226
+ security: [{
8227
+ key: 'devops-bearerAuth',
8228
+ scheme: 'bearer',
8229
+ type: 'http'
8230
+ }],
8231
+ url: '/devops/v1/changes/{id}',
8232
+ ...options
8233
+ });
8234
+ /**
8235
+ * Abandon a change
8236
+ *
8237
+ * Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2). A change that is already abandoned is refused with INVALID_ARGUMENT, which is how a caller tells an earlier abandon apart from a call that had no effect.
8238
+ */
8239
+ export const devopsChangesAbandon = (options) => (options.client ?? client).post({
8240
+ security: [{
8241
+ key: 'devops-bearerAuth',
8242
+ scheme: 'bearer',
8243
+ type: 'http'
8244
+ }],
8245
+ url: '/devops/v1/changes/{id}:abandon',
8246
+ ...options,
8247
+ headers: {
8248
+ 'Content-Type': 'application/json',
8249
+ ...options.headers
8250
+ }
8251
+ });
8252
+ /**
8253
+ * Mark the last slice
8254
+ *
8255
+ * Say whether the pull request being merged is the last slice of the change. A change defaults to yes; until it is marked as the last slice it cannot reach rolling out or done, because rolling out a container that may still grow would roll out the wrong thing. Send lastSlice=false before merging a pull request when more slices will follow, and true again on the final one. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2).
8256
+ */
8257
+ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client).post({
8258
+ security: [{
8259
+ key: 'devops-bearerAuth',
8260
+ scheme: 'bearer',
8261
+ type: 'http'
8262
+ }],
8263
+ url: '/devops/v1/changes/{id}:markLastSlice',
8264
+ ...options,
8265
+ headers: {
8266
+ 'Content-Type': 'application/json',
8267
+ ...options.headers
8268
+ }
8269
+ });
8038
8270
  /**
8039
8271
  * List knowledge bases
8040
8272
  *
@@ -8494,7 +8726,7 @@ export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
8494
8726
  /**
8495
8727
  * List assets
8496
8728
  *
8497
- * Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.
8729
+ * Upload content into an active library and return the stored asset. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing asset. Chunk uploads require both chunk headers.
8498
8730
  */
8499
8731
  export const mediaListAssets = (options) => (options.client ?? client).get({
8500
8732
  security: [{
@@ -8758,7 +8990,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
8758
8990
  /**
8759
8991
  * Get job
8760
8992
  *
8761
- * 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.
8993
+ * Read the current batch or generation Job status and progress. For generation, inspect outputs and failures; a successful output has already landed in the library as an asset.
8762
8994
  */
8763
8995
  export const mediaGetJob = (options) => (options.client ?? client).get({
8764
8996
  security: [{
@@ -8850,7 +9082,7 @@ export const mediaGetAssetLineage = (options) => (options.client ?? client).get(
8850
9082
  /**
8851
9083
  * Generate image
8852
9084
  *
8853
- * Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is charged through Router and the job records the charge in usage; nothing is charged for a request refused before it starts. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {"prompt":"A red kite above a calm sea at sunrise","n":1,"output":"sticker"}.
9085
+ * Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, final once the job is completed or failed) and each produced asset carries its own part in provenance.cost; nothing is charged for a request refused before it starts. When the job is done, tell the person the usage amount and give them each output’s viewer_url, which opens the asset in the Console. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {"prompt":"A red kite above a calm sea at sunrise","n":1,"output":"sticker"}.
8854
9086
  */
8855
9087
  export const mediaGenerateImage = (options) => (options.client ?? client).post({
8856
9088
  security: [{
@@ -8868,7 +9100,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
8868
9100
  /**
8869
9101
  * Generate video
8870
9102
  *
8871
- * Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; Router is sent a fetchable URL for each, recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is charged per second through Router and the job records the charge in usage; a refused request costs nothing. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {"prompt":"A red kite above a calm sea at sunrise","mode":"text","n":1}.
9103
+ * Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and each produced asset carries its own part in provenance.cost; a refused request costs nothing. When the job is done, tell the person the usage amount and give them each output’s viewer_url. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {"prompt":"A red kite above a calm sea at sunrise","mode":"text","n":1}.
8872
9104
  */
8873
9105
  export const mediaGenerateVideo = (options) => (options.client ?? client).post({
8874
9106
  security: [{
@@ -8886,7 +9118,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
8886
9118
  /**
8887
9119
  * Edit asset
8888
9120
  *
8889
- * Edit an existing asset and store the result as a new asset. 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 source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is charged through Router and the job records the charge in usage. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
9121
+ * Edit an existing asset and store the result as a new asset. 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 source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
8890
9122
  */
8891
9123
  export const mediaEditAsset = (options) => (options.client ?? client).post({
8892
9124
  security: [{
@@ -8902,55 +9134,55 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
8902
9134
  }
8903
9135
  });
8904
9136
  /**
8905
- * Summarize understanding failures
9137
+ * Create speech
8906
9138
  *
8907
- * 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.
9139
+ * Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, the sum over every segment) and the recording carries it in provenance.cost; a request refused before it starts costs nothing. When the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {"input":"A red kite above a calm sea at sunrise."}, or with {"input":"A red kite above a calm sea at sunrise.","voice":"zh_female_wenroumama_uranus_bigtts"} for a gentle female voice.
8908
9140
  */
8909
- export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
9141
+ export const mediaCreateSpeech = (options) => (options.client ?? client).post({
8910
9142
  security: [{
8911
9143
  key: 'media-BearerAuth',
8912
9144
  scheme: 'bearer',
8913
9145
  type: 'http'
8914
9146
  }],
8915
- url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
8916
- ...options
9147
+ url: '/media/v1/libraries/{library_id}/audio/speech',
9148
+ ...options,
9149
+ headers: {
9150
+ 'Content-Type': 'application/json',
9151
+ ...options.headers
9152
+ }
8917
9153
  });
8918
9154
  /**
8919
- * List understanding results across a library
9155
+ * Summarize understanding failures
8920
9156
  *
8921
- * 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.
9157
+ * 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.
8922
9158
  */
8923
- export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
9159
+ export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
8924
9160
  security: [{
8925
9161
  key: 'media-BearerAuth',
8926
9162
  scheme: 'bearer',
8927
9163
  type: 'http'
8928
9164
  }],
8929
- url: '/media/v1/libraries/{library_id}/understandings',
9165
+ url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
8930
9166
  ...options
8931
9167
  });
8932
9168
  /**
8933
- * Create video generation
9169
+ * List understanding results across a library
8934
9170
  *
8935
- * 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.
9171
+ * 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.
8936
9172
  */
8937
- export const mediaCreateGeneration = (options) => (options.client ?? client).post({
9173
+ export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
8938
9174
  security: [{
8939
9175
  key: 'media-BearerAuth',
8940
9176
  scheme: 'bearer',
8941
9177
  type: 'http'
8942
9178
  }],
8943
- url: '/media/v1/libraries/{library_id}/generations',
8944
- ...options,
8945
- headers: {
8946
- 'Content-Type': 'application/json',
8947
- ...options.headers
8948
- }
9179
+ url: '/media/v1/libraries/{library_id}/understandings',
9180
+ ...options
8949
9181
  });
8950
9182
  /**
8951
9183
  * List jobs
8952
9184
  *
8953
- * 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.
9185
+ * List batch and generation jobs in a library. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.
8954
9186
  */
8955
9187
  export const mediaListJobs = (options) => (options.client ?? client).get({
8956
9188
  security: [{
@@ -8964,7 +9196,7 @@ export const mediaListJobs = (options) => (options.client ?? client).get({
8964
9196
  /**
8965
9197
  * Cancel job
8966
9198
  *
8967
- * Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
9199
+ * Cancel a queued or running generation job. Outputs already produced remain in the library; poll or read the returned Job to confirm its status.
8968
9200
  */
8969
9201
  export const mediaCancelJob = (options) => (options.client ?? client).post({
8970
9202
  security: [{
@@ -8975,28 +9207,10 @@ export const mediaCancelJob = (options) => (options.client ?? client).post({
8975
9207
  url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
8976
9208
  ...options
8977
9209
  });
8978
- /**
8979
- * Save generation output
8980
- *
8981
- * 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.
8982
- */
8983
- export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
8984
- security: [{
8985
- key: 'media-BearerAuth',
8986
- scheme: 'bearer',
8987
- type: 'http'
8988
- }],
8989
- url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
8990
- ...options,
8991
- headers: {
8992
- 'Content-Type': 'application/json',
8993
- ...options.headers
8994
- }
8995
- });
8996
9210
  /**
8997
9211
  * Get generation capabilities
8998
9212
  *
8999
- * 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.
9213
+ * Read what Praxis offers for each kind of generation — image, video and speech — before asking for one, and read a speech model’s voices here before naming one. Every type answers the models available for it, the model it uses when a request names none, and what each model costs per unit; a speech model the platform publishes voices for also carries default_voice and voices there, each voice with an id, a name, a gender, a language and a style — so a request for "a gentle female voice" is answered by matching the style and gender rather than by guessing an identifier. Pass a voice id back verbatim as voice, or omit voice to take default_voice; a voice that is neither one of those nor a voice material of the library is refused with INVALID_PARAMS before any job is created. OpenAI voice names such as alloy and aura are not valid here. The video fields beside the types keep their original meaning (intents, default model, duration and aspect-ratio limits, per-library concurrency). The models come from the platform model catalogue, and an id listed here is accepted verbatim as the model field of that type’s generation request. A video model additionally carries the modes it can be driven in and the durations, aspect ratios and resolutions the catalogue has registered for it — modes, duration_seconds, aspect_ratios and resolutions — so read them before requesting video and choose a mode and a value this model lists; an empty list means the platform has not registered that option yet, and then omit the field rather than assume a value. price.amount is a decimal string with its currency; video models that charge by resolution also carry price.by_resolution, whose amount is then the cheapest tier. A model the catalogue cannot route right now is still listed, with available false, so a caller can show it as temporarily unavailable instead of hiding it. When the catalogue cannot be read the endpoint still answers: every type comes back with an empty models list and its real default_model, and the voices a speech model carries are absent rather than empty, because the voices come from the platform and not from the catalogue. Generation is charged per unit and every output is stored in the library.
9000
9214
  */
9001
9215
  export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
9002
9216
  security: [{
@@ -9290,7 +9504,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
9290
9504
  /**
9291
9505
  * Create sandbox (v2)
9292
9506
  *
9293
- * Create a sandbox from the template. All system communication with the sandbox is secured.
9507
+ * Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox.
9294
9508
  */
9295
9509
  export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
9296
9510
  security: [
@@ -9952,6 +10166,43 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
9952
10166
  url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
9953
10167
  ...options
9954
10168
  });
10169
+ /**
10170
+ * Get sandbox events
10171
+ *
10172
+ * Read one sandbox's lifecycle events, newest first by default. Unlike every other read on this face, it answers for a sandbox whose machine has ENDED (killed or failed) — a sandbox's cause of death is readable here even after its files are gone. The killed event carries eventData.terminationReason (the platform's own reason: requested, lease_expired, max_running, provider_lost, start_failed, retention, admin, unknown) and eventData.kill_reason (the E2B-shaped bucket: request, timeout, admin, orphaned, unknown); the updated event carries expiresAt. Page with offset, limit (1–100, default 10), orderAsc and repeatable types. An ended sandbox that is never going to come back also answers SANDBOX_EXPIRED (410) with terminationReason on its files and commands.
10173
+ */
10174
+ export const getSandboxEvents = (options) => (options.client ?? client).get({
10175
+ security: [
10176
+ {
10177
+ key: 'sandbox-ApiKeyAuth',
10178
+ name: 'X-API-Key',
10179
+ type: 'apiKey'
10180
+ },
10181
+ {
10182
+ key: 'sandbox-AuthProviderBearerAuth',
10183
+ scheme: 'bearer',
10184
+ type: 'http'
10185
+ },
10186
+ {
10187
+ key: 'sandbox-AuthProviderTeamAuth',
10188
+ name: 'X-Team-ID',
10189
+ type: 'apiKey'
10190
+ },
10191
+ { name: 'X-Admin-Token', type: 'apiKey' },
10192
+ {
10193
+ key: 'sandbox-AdminTeamAuth',
10194
+ name: 'X-Team-ID',
10195
+ type: 'apiKey'
10196
+ },
10197
+ {
10198
+ key: 'sandbox-AdminJWTAuth',
10199
+ scheme: 'bearer',
10200
+ type: 'http'
10201
+ }
10202
+ ],
10203
+ url: '/sandbox/v1/events/sandboxes/{sandboxID}',
10204
+ ...options
10205
+ });
9955
10206
  /**
9956
10207
  * Start template build (v2)
9957
10208
  *
@@ -10425,7 +10676,7 @@ export const studioWorksList = (options) => (options?.client ?? client).get({
10425
10676
  /**
10426
10677
  * Create a work with its goal
10427
10678
  *
10428
- * 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.
10679
+ * 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, and the one-sentence message. The work holds the goal only; the requirement for one piece (the person's text, its points, a length, banned wording) belongs to that draft and is given with the drafts create call, so a novel's plot points and length never bind the promotion derived from it. 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. A reference library belongs to the work and is created with it, so the setting written later stays this work's own; pass based_on to start from another work and have its setting and styles copied in as your own.
10429
10680
  */
10430
10681
  export const studioWorksCreate = (options) => (options.client ?? client).post({
10431
10682
  security: [{
@@ -10503,33 +10754,11 @@ export const studioWorksUpdate = (options) => (options.client ?? client).patch({
10503
10754
  }
10504
10755
  });
10505
10756
  /**
10506
- * Add to or correct the original brief
10757
+ * List the drafts a work carries
10507
10758
  *
10508
- * 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.
10759
+ * 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.
10509
10760
  */
10510
- export const studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
10511
- security: [{
10512
- key: 'BearerAuth',
10513
- scheme: 'bearer',
10514
- type: 'http'
10515
- }, {
10516
- key: 'ApiKeyAuth',
10517
- name: 'X-API-Key',
10518
- type: 'apiKey'
10519
- }],
10520
- url: '/studio/v1/works/{work}/brief',
10521
- ...options,
10522
- headers: {
10523
- 'Content-Type': 'application/json',
10524
- ...options.headers
10525
- }
10526
- });
10527
- /**
10528
- * List the drafts a work carries
10529
- *
10530
- * 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.
10531
- */
10532
- export const studioDraftsList = (options) => (options.client ?? client).get({
10761
+ export const studioDraftsList = (options) => (options.client ?? client).get({
10533
10762
  security: [{
10534
10763
  key: 'BearerAuth',
10535
10764
  scheme: 'bearer',
@@ -10604,6 +10833,28 @@ export const studioDraftsUpdate = (options) => (options.client ?? client).patch(
10604
10833
  ...options.headers
10605
10834
  }
10606
10835
  });
10836
+ /**
10837
+ * Add to or correct a draft's brief
10838
+ *
10839
+ * Extend the brief of one draft: append text, attach files, replace its constraints, add points taken from an outline, edit one point, or drop a point. The brief belongs to the draft, not the work: the length and plot points of a novel do not bind the promotion derived from it. 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 constraints (a length such as 3000 字以内, banned wording) are what the length check and the context pack read. The brief carries its own revision, separate from the draft's.
10840
+ */
10841
+ export const studioDraftsUpdateBrief = (options) => (options.client ?? client).patch({
10842
+ security: [{
10843
+ key: 'BearerAuth',
10844
+ scheme: 'bearer',
10845
+ type: 'http'
10846
+ }, {
10847
+ key: 'ApiKeyAuth',
10848
+ name: 'X-API-Key',
10849
+ type: 'apiKey'
10850
+ }],
10851
+ url: '/studio/v1/works/{work}/drafts/{draft}/brief',
10852
+ ...options,
10853
+ headers: {
10854
+ 'Content-Type': 'application/json',
10855
+ ...options.headers
10856
+ }
10857
+ });
10607
10858
  /**
10608
10859
  * Read the whole unit outline as Markdown
10609
10860
  *
@@ -10622,6 +10873,122 @@ export const studioDraftsOutline = (options) => (options.client ?? client).get({
10622
10873
  url: '/studio/v1/works/{work}/drafts/{draft}/outline',
10623
10874
  ...options
10624
10875
  });
10876
+ /**
10877
+ * List the foreshadows of a draft
10878
+ *
10879
+ * List the threads this draft sets up and pays off: each foreshadow names the unit that plants it, the unit that pays it off (or null while it is still open) and a note on what was planted. The foreshadow_paid check reports every open one in the draft's status and review, so a mystery or serial that plants a clue in chapter 2 is reminded until a later chapter answers it.
10880
+ */
10881
+ export const studioForeshadowsList = (options) => (options.client ?? client).get({
10882
+ security: [{
10883
+ key: 'BearerAuth',
10884
+ scheme: 'bearer',
10885
+ type: 'http'
10886
+ }, {
10887
+ key: 'ApiKeyAuth',
10888
+ name: 'X-API-Key',
10889
+ type: 'apiKey'
10890
+ }],
10891
+ url: '/studio/v1/works/{work}/drafts/{draft}/foreshadows',
10892
+ ...options
10893
+ });
10894
+ /**
10895
+ * Drop a foreshadow
10896
+ *
10897
+ * Remove a thread that is no longer in the story. Deleting a key that does not exist answers the same as deleting one that did.
10898
+ */
10899
+ export const studioForeshadowsDelete = (options) => (options.client ?? client).delete({
10900
+ security: [{
10901
+ key: 'BearerAuth',
10902
+ scheme: 'bearer',
10903
+ type: 'http'
10904
+ }, {
10905
+ key: 'ApiKeyAuth',
10906
+ name: 'X-API-Key',
10907
+ type: 'apiKey'
10908
+ }],
10909
+ url: '/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}',
10910
+ ...options
10911
+ });
10912
+ /**
10913
+ * Plant or pay off a foreshadow
10914
+ *
10915
+ * Record a thread under a key of your choice: the unit that plants it and, once written, the unit that pays it off. Call it when you write the setup (payoff left out or null) and again with the same key when a later unit answers it. Both units must belong to this draft. An open foreshadow is reported by the foreshadow_paid check until it has a payoff, and a unit's context pack does not need to be asked for it.
10916
+ */
10917
+ export const studioForeshadowsUpsert = (options) => (options.client ?? client).put({
10918
+ security: [{
10919
+ key: 'BearerAuth',
10920
+ scheme: 'bearer',
10921
+ type: 'http'
10922
+ }, {
10923
+ key: 'ApiKeyAuth',
10924
+ name: 'X-API-Key',
10925
+ type: 'apiKey'
10926
+ }],
10927
+ url: '/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}',
10928
+ ...options,
10929
+ headers: {
10930
+ 'Content-Type': 'application/json',
10931
+ ...options.headers
10932
+ }
10933
+ });
10934
+ /**
10935
+ * List the setting changes of a work
10936
+ *
10937
+ * List the recorded changes, all of them or those of one entry. Use it to check what a character has been through before writing the next unit, or to find a progression to delete.
10938
+ */
10939
+ export const studioProgressionsList = (options) => (options.client ?? client).get({
10940
+ security: [{
10941
+ key: 'BearerAuth',
10942
+ scheme: 'bearer',
10943
+ type: 'http'
10944
+ }, {
10945
+ key: 'ApiKeyAuth',
10946
+ name: 'X-API-Key',
10947
+ type: 'apiKey'
10948
+ }],
10949
+ url: '/studio/v1/works/{work}/progressions',
10950
+ ...options
10951
+ });
10952
+ /**
10953
+ * Record how a setting entry changes at a unit
10954
+ *
10955
+ * Record that an entry changes as of one unit: a character is injured in chapter 6, a shop moves in chapter 9, a secret becomes known. The library keeps what an entry is from the start; a progression keeps what becomes true later. A unit's context pack shows an entry's changes up to and including that unit (截至本单元的设定变化) and withholds the later ones, so chapter 3 is not written with chapter 6's injury. Name the entry by its name, an alias or its ent_ identifier, and the unit by its number.
10956
+ */
10957
+ export const studioProgressionsCreate = (options) => (options.client ?? client).post({
10958
+ security: [{
10959
+ key: 'BearerAuth',
10960
+ scheme: 'bearer',
10961
+ type: 'http'
10962
+ }, {
10963
+ key: 'ApiKeyAuth',
10964
+ name: 'X-API-Key',
10965
+ type: 'apiKey'
10966
+ }],
10967
+ url: '/studio/v1/works/{work}/progressions',
10968
+ ...options,
10969
+ headers: {
10970
+ 'Content-Type': 'application/json',
10971
+ ...options.headers
10972
+ }
10973
+ });
10974
+ /**
10975
+ * Delete a setting change
10976
+ *
10977
+ * Remove one recorded change, by the prg_ identifier the list returns; to correct a change, delete it and record the new one.
10978
+ */
10979
+ export const studioProgressionsDelete = (options) => (options.client ?? client).delete({
10980
+ security: [{
10981
+ key: 'BearerAuth',
10982
+ scheme: 'bearer',
10983
+ type: 'http'
10984
+ }, {
10985
+ key: 'ApiKeyAuth',
10986
+ name: 'X-API-Key',
10987
+ type: 'apiKey'
10988
+ }],
10989
+ url: '/studio/v1/works/{work}/progressions/{id}',
10990
+ ...options
10991
+ });
10625
10992
  /**
10626
10993
  * Read the computed todo list of a draft
10627
10994
  *
@@ -10869,7 +11236,7 @@ export const studioUnitsContext = (options) => (options.client ?? client).get({
10869
11236
  /**
10870
11237
  * List the reference libraries of this organization
10871
11238
  *
10872
- * 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.
11239
+ * 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. Pass work to read one work's own library alone; leave it out for every library the organization owns.
10873
11240
  */
10874
11241
  export const studioCodexesList = (options) => (options?.client ?? client).get({
10875
11242
  security: [{
@@ -10887,7 +11254,7 @@ export const studioCodexesList = (options) => (options?.client ?? client).get({
10887
11254
  /**
10888
11255
  * Create a reference library
10889
11256
  *
10890
- * 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.
11257
+ * Create a reference library: a store of the people, places, products and facts a piece draws on. 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 made this way is shared across works, which suits brand facts several pieces mention; the library a work needs for its own setting is created with the work itself, and the work list call finds it by filtering on work.
10891
11258
  */
10892
11259
  export const studioCodexesCreate = (options) => (options.client ?? client).post({
10893
11260
  security: [{
@@ -10985,7 +11352,7 @@ export const studioEntriesList = (options) => (options.client ?? client).get({
10985
11352
  /**
10986
11353
  * Add an entry to a reference library
10987
11354
  *
10988
- * 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.
11355
+ * 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, notes, facts and story time that should reach a writer when it is mentioned. Attach a picture gallery when the entry should be looked at as well as read. 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.
10989
11356
  */
10990
11357
  export const studioEntriesCreate = (options) => (options.client ?? client).post({
10991
11358
  security: [{
@@ -11025,7 +11392,7 @@ export const studioEntriesDelete = (options) => (options.client ?? client).delet
11025
11392
  /**
11026
11393
  * Read one reference entry
11027
11394
  *
11028
- * 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.
11395
+ * Read one entry in full: its description, its notes, its fact ledger, its relations to other entries, its story time, its detection settings and its picture gallery. 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.
11029
11396
  */
11030
11397
  export const studioEntriesGet = (options) => (options.client ?? client).get({
11031
11398
  security: [{
@@ -11043,7 +11410,7 @@ export const studioEntriesGet = (options) => (options.client ?? client).get({
11043
11410
  /**
11044
11411
  * Change what a reference entry says
11045
11412
  *
11046
- * 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.
11413
+ * Change one entry: its type, its name, its aliases, its description, its facts, its notes, its story time, its tracking setting, its picture gallery 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.
11047
11414
  */
11048
11415
  export const studioEntriesUpdate = (options) => (options.client ?? client).patch({
11049
11416
  security: [{
@@ -11083,7 +11450,7 @@ export const studioStylesList = (options) => (options?.client ?? client).get({
11083
11450
  /**
11084
11451
  * Create a writing style
11085
11452
  *
11086
- * 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.
11453
+ * 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. A style belongs to the work you name in work, and a work may only attach its own styles, so create the style with the work it will be used in. Attach a style to a work, or to one draft of it, and its samples then reach every context pack.
11087
11454
  */
11088
11455
  export const studioStylesCreate = (options) => (options.client ?? client).post({
11089
11456
  security: [{
@@ -11141,7 +11508,7 @@ export const studioStylesGet = (options) => (options.client ?? client).get({
11141
11508
  /**
11142
11509
  * Change a writing style
11143
11510
  *
11144
- * 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.
11511
+ * Change a style: its name, its description, its samples, its picture 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.
11145
11512
  */
11146
11513
  export const studioStylesUpdate = (options) => (options.client ?? client).patch({
11147
11514
  security: [{
@@ -11486,6 +11853,202 @@ export const studioRenditionsContentUrl = (options) => (options.client ?? client
11486
11853
  url: '/studio/v1/works/{work}/renditions/{rendition}/content',
11487
11854
  ...options
11488
11855
  });
11856
+ /**
11857
+ * List the blind review rounds of a work
11858
+ *
11859
+ * List the review rounds of one work, newest round first, each with its draft, round number, status and decision. Pass draft to see the rounds of one draft only. Use it to find the round to read, to answer or to cancel, and to see whether the draft already has a round running before sending another: a running round answers REVIEW_IN_PROGRESS. The answer is one page; keep following next_page_token while it is present. Rounds of other organizations are not listed and a work of another organization answers WORK_NOT_FOUND.
11860
+ */
11861
+ export const studioWorksReviewsList = (options) => (options.client ?? client).get({
11862
+ security: [{
11863
+ key: 'BearerAuth',
11864
+ scheme: 'bearer',
11865
+ type: 'http'
11866
+ }, {
11867
+ key: 'ApiKeyAuth',
11868
+ name: 'X-API-Key',
11869
+ type: 'apiKey'
11870
+ }],
11871
+ url: '/studio/v1/works/{work}/reviews',
11872
+ ...options
11873
+ });
11874
+ /**
11875
+ * Send a draft to blind review
11876
+ *
11877
+ * Send one draft of this work to the blind review centre, which freezes the draft's content revision as it is now and asks in every reviewer on the work's roster whose kind this round asks. Use it once the draft is written; the roster decides who reviews, and the sender only ever reads labels A, B, C, never the reviewer identities. Pass mode to narrow this round to expert reviewers, to audience reviewers or to both, which the settings do not decide. From the second round pass revision_of with the previous round's rv_ id and note with the change note that answers that round point by point. The answer is the new round in status reviewing; read it again with the review read until status becomes decided and then read decision, expert_reports and screening. Billing follows the reviewers' sessions, not the frame of this call. DRAFT_NOT_READY means the draft still has units without a body or fails a hard check, so finish it first; REVIEW_IN_PROGRESS means this draft already has a round running, so wait for it to decide or cancel it; REVIEW_ROUND_LIMIT means the work reached max_rounds and a person has to raise it in the review settings; NO_REVIEWERS means the work's reviewer roster has nobody of the kind this round asks, so a person adds one to the work.
11878
+ */
11879
+ export const studioWorksReviewsCreate = (options) => (options.client ?? client).post({
11880
+ security: [{
11881
+ key: 'BearerAuth',
11882
+ scheme: 'bearer',
11883
+ type: 'http'
11884
+ }, {
11885
+ key: 'ApiKeyAuth',
11886
+ name: 'X-API-Key',
11887
+ type: 'apiKey'
11888
+ }],
11889
+ url: '/studio/v1/works/{work}/reviews',
11890
+ ...options,
11891
+ headers: {
11892
+ 'Content-Type': 'application/json',
11893
+ ...options.headers
11894
+ }
11895
+ });
11896
+ /**
11897
+ * Read one blind review round
11898
+ *
11899
+ * Read one round in the sender's view: its status, the seats as labels A, B, C with the state of each, the expert reports that have come back, the screening cards, the round decision and the audience tally. Reviewers appear only as labels; who they are is never part of this answer. Call it after sending a round and repeat while status is reviewing, because reviewers answer asynchronously and a round that is not decided yet carries fewer reports. status decided gives decision and screening; cancelled means a person stopped the round; failed means it could not be completed, for example when no reviewer on the roster answered at all. Pass view=audit to also get the assignment record, the confidential editor notes and the reviewer sessions; that block is filled only for an organization administrator, and anyone else reads the same round without it.
11900
+ */
11901
+ export const studioWorksReviewsRetrieve = (options) => (options.client ?? client).get({
11902
+ security: [{
11903
+ key: 'BearerAuth',
11904
+ scheme: 'bearer',
11905
+ type: 'http'
11906
+ }, {
11907
+ key: 'ApiKeyAuth',
11908
+ name: 'X-API-Key',
11909
+ type: 'apiKey'
11910
+ }],
11911
+ url: '/studio/v1/works/{work}/reviews/{review}',
11912
+ ...options
11913
+ });
11914
+ /**
11915
+ * Cancel a running review round
11916
+ *
11917
+ * Cancel a round that is still reviewing, so its reviewers are no longer waited for and the draft can be sent again. Nothing that came back is deleted: the round stays readable with status cancelled and the reports it had. Use it when the draft changed so much that the running round is no longer about the current text, or when the round was sent by mistake; a person makes this call, and an agent calling it is refused with PERMISSION_DENIED. A round that already reached a decision answers REVIEW_IN_PROGRESS, because a decided round is answered by sending the next round with revision_of rather than by cancelling it. Reviewer sessions already started keep being billed.
11918
+ */
11919
+ export const studioWorksReviewsCancel = (options) => (options.client ?? client).post({
11920
+ security: [{
11921
+ key: 'BearerAuth',
11922
+ scheme: 'bearer',
11923
+ type: 'http'
11924
+ }, {
11925
+ key: 'ApiKeyAuth',
11926
+ name: 'X-API-Key',
11927
+ type: 'apiKey'
11928
+ }],
11929
+ url: '/studio/v1/works/{work}/reviews/{review}:cancel',
11930
+ ...options
11931
+ });
11932
+ /**
11933
+ * Read the review settings of a work
11934
+ *
11935
+ * Read how this work is reviewed: the most rounds it may take and the revision the settings are at. Who reviews is not here but on the work's reviewer roster, which every round asks whole, and read that with the reviewer list. Read this before sending a round, because a draft past its max_rounds answers REVIEW_ROUND_LIMIT, and before changing it, because the update carries the revision it returns as its precondition. Settings are not part of the work body: they are read and written here.
11936
+ */
11937
+ export const studioWorksReviewSettingsRetrieve = (options) => (options.client ?? client).get({
11938
+ security: [{
11939
+ key: 'BearerAuth',
11940
+ scheme: 'bearer',
11941
+ type: 'http'
11942
+ }, {
11943
+ key: 'ApiKeyAuth',
11944
+ name: 'X-API-Key',
11945
+ type: 'apiKey'
11946
+ }],
11947
+ url: '/studio/v1/works/{work}/review-settings',
11948
+ ...options
11949
+ });
11950
+ /**
11951
+ * Change how many rounds a work may take
11952
+ *
11953
+ * Change how many rounds a work may take. Send expected_revision with the revision this settings read returned, so two writers cannot overwrite each other silently; a mismatch answers REVISION_CONFLICT and the settings are unchanged. A person makes this change: an agent calling it is refused with PERMISSION_DENIED. The settings are locked while a round of this work is reviewing, which answers REVIEW_IN_PROGRESS; change them after the round decides or is cancelled. Raising max_rounds is how a draft whose rounds are used up is sent again. The changed limit applies to rounds sent from now on and never rewrites a round already sent; who reviews is on the reviewer roster, not here.
11954
+ */
11955
+ export const studioWorksReviewSettingsUpdate = (options) => (options.client ?? client).patch({
11956
+ security: [{
11957
+ key: 'BearerAuth',
11958
+ scheme: 'bearer',
11959
+ type: 'http'
11960
+ }, {
11961
+ key: 'ApiKeyAuth',
11962
+ name: 'X-API-Key',
11963
+ type: 'apiKey'
11964
+ }],
11965
+ url: '/studio/v1/works/{work}/review-settings',
11966
+ ...options,
11967
+ headers: {
11968
+ 'Content-Type': 'application/json',
11969
+ ...options.headers
11970
+ }
11971
+ });
11972
+ /**
11973
+ * List the reviewers of a work
11974
+ *
11975
+ * List the reviewers on this work's roster: every time a round of this work is sent, every reviewer on the roster whose kind the round asks for takes part, one seat each, in the order they were added, and the sender reads them as A, B, C. Each entry gives the agent id as /v1/agents returns it (agent_…), its kind on this roster and the service agent's display name. Read it before sending a round, because a roster with nobody of the asked kind answers NO_REVIEWERS; read it after to see who has been judging. A reviewer of another work or another organization is never listed, and a work of another organization answers WORK_NOT_FOUND. The answer is one page; keep following next_page_token while it is present.
11976
+ */
11977
+ export const studioWorksReviewersList = (options) => (options.client ?? client).get({
11978
+ security: [{
11979
+ key: 'BearerAuth',
11980
+ scheme: 'bearer',
11981
+ type: 'http'
11982
+ }, {
11983
+ key: 'ApiKeyAuth',
11984
+ name: 'X-API-Key',
11985
+ type: 'apiKey'
11986
+ }],
11987
+ url: '/studio/v1/works/{work}/reviewers',
11988
+ ...options
11989
+ });
11990
+ /**
11991
+ * Add a reviewer to a work
11992
+ *
11993
+ * Put one of this organization's service agents on the work's reviewer roster, with the kind it reviews as: expert writes a scored report, audience fills a screening card. Every round sent from now on asks every roster member of that round's kind, so add only agents that should judge every round of this work. A person makes this change, and an agent calling it is refused with PERMISSION_DENIED. Pass the agent id as /v1/agents returns it (agent_…). The agent must be a service agent of this organization: anything else, including an absent id and another organization's agent, answers REVIEWER_NOT_SERVICE_AGENT. An agent already on the roster answers REVIEWER_ALREADY_ADDED; change its kind with the update operation instead.
11994
+ */
11995
+ export const studioWorksReviewersCreate = (options) => (options.client ?? client).post({
11996
+ security: [{
11997
+ key: 'BearerAuth',
11998
+ scheme: 'bearer',
11999
+ type: 'http'
12000
+ }, {
12001
+ key: 'ApiKeyAuth',
12002
+ name: 'X-API-Key',
12003
+ type: 'apiKey'
12004
+ }],
12005
+ url: '/studio/v1/works/{work}/reviewers',
12006
+ ...options,
12007
+ headers: {
12008
+ 'Content-Type': 'application/json',
12009
+ ...options.headers
12010
+ }
12011
+ });
12012
+ /**
12013
+ * Remove a reviewer from a work
12014
+ *
12015
+ * Take one agent off the work's reviewer roster, so rounds sent from now on no longer ask it. What it has already judged is kept: the rounds it took part in stay readable with their reports,. A person makes this change, and an agent calling it is refused with PERMISSION_DENIED. An agent that is not on this work's roster answers REVIEWER_NOT_FOUND.
12016
+ */
12017
+ export const studioWorksReviewersDelete = (options) => (options.client ?? client).delete({
12018
+ security: [{
12019
+ key: 'BearerAuth',
12020
+ scheme: 'bearer',
12021
+ type: 'http'
12022
+ }, {
12023
+ key: 'ApiKeyAuth',
12024
+ name: 'X-API-Key',
12025
+ type: 'apiKey'
12026
+ }],
12027
+ url: '/studio/v1/works/{work}/reviewers/{agent}',
12028
+ ...options
12029
+ });
12030
+ /**
12031
+ * Change a reviewer's kind
12032
+ *
12033
+ * Change the kind one roster member reviews as: expert or audience. Use it when a reviewer should judge a different way, rather than removing it and adding it back, because the roster position it holds decides its label and is kept. A person makes this change, and an agent calling it is refused with PERMISSION_DENIED. A round already sent is not affected, because its seats were fixed when it was sent. An agent that is not on this work's roster answers REVIEWER_NOT_FOUND, which is also the answer for another work's reviewer.
12034
+ */
12035
+ export const studioWorksReviewersUpdate = (options) => (options.client ?? client).patch({
12036
+ security: [{
12037
+ key: 'BearerAuth',
12038
+ scheme: 'bearer',
12039
+ type: 'http'
12040
+ }, {
12041
+ key: 'ApiKeyAuth',
12042
+ name: 'X-API-Key',
12043
+ type: 'apiKey'
12044
+ }],
12045
+ url: '/studio/v1/works/{work}/reviewers/{agent}',
12046
+ ...options,
12047
+ headers: {
12048
+ 'Content-Type': 'application/json',
12049
+ ...options.headers
12050
+ }
12051
+ });
11489
12052
  /**
11490
12053
  * List vaults
11491
12054
  *
@@ -12636,3 +13199,21 @@ export const ticketGetRepositories = (options) => (options?.client ?? client).ge
12636
13199
  url: '/ticket/v1/repositories',
12637
13200
  ...options
12638
13201
  });
13202
+ /**
13203
+ * Update repositories
13204
+ *
13205
+ * Update repositories 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.
13206
+ */
13207
+ export const ticketPatchRepositoriesId = (options) => (options.client ?? client).patch({
13208
+ security: [{
13209
+ key: 'BearerAuth',
13210
+ scheme: 'bearer',
13211
+ type: 'http'
13212
+ }, {
13213
+ key: 'ApiKeyAuth',
13214
+ name: 'X-API-Key',
13215
+ type: 'apiKey'
13216
+ }],
13217
+ url: '/ticket/v1/repositories/{id}',
13218
+ ...options
13219
+ });