@deepraxis/sdk 0.1.1-dev.2efda8a → 0.1.1-dev.30a84bf

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: [{
@@ -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: [{
@@ -8904,7 +9136,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
8904
9136
  /**
8905
9137
  * Create speech
8906
9138
  *
8907
- * 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 and voice is required; speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. A voice that names a voice material of this library is refused the same way — voice cloning opens with voices.create. 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 charged through Router and the job records the charge in usage; a request refused before it starts costs nothing. 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.","voice":"alloy"}.
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
9141
  export const mediaCreateSpeech = (options) => (options.client ?? client).post({
8910
9142
  security: [{
@@ -8950,7 +9182,7 @@ export const mediaListUnderstandingsByLibrary = (options) => (options.client ??
8950
9182
  /**
8951
9183
  * List jobs
8952
9184
  *
8953
- * List batch and generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.
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: [{
@@ -8978,7 +9210,7 @@ export const mediaCancelJob = (options) => (options.client ?? client).post({
8978
9210
  /**
8979
9211
  * Get generation capabilities
8980
9212
  *
8981
- * Read what Praxis offers for each kind of generation — image, video and speech — before asking for 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; the video fields beside them 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. 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. Generation is charged per unit and every output is stored in the library.
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.
8982
9214
  */
8983
9215
  export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
8984
9216
  security: [{
@@ -9934,6 +10166,43 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
9934
10166
  url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
9935
10167
  ...options
9936
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
+ });
9937
10206
  /**
9938
10207
  * Start template build (v2)
9939
10208
  *
@@ -10407,7 +10676,7 @@ export const studioWorksList = (options) => (options?.client ?? client).get({
10407
10676
  /**
10408
10677
  * Create a work with its goal
10409
10678
  *
10410
- * 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.
10411
10680
  */
10412
10681
  export const studioWorksCreate = (options) => (options.client ?? client).post({
10413
10682
  security: [{
@@ -10484,28 +10753,6 @@ export const studioWorksUpdate = (options) => (options.client ?? client).patch({
10484
10753
  ...options.headers
10485
10754
  }
10486
10755
  });
10487
- /**
10488
- * Add to or correct the original brief
10489
- *
10490
- * 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.
10491
- */
10492
- export const studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
10493
- security: [{
10494
- key: 'BearerAuth',
10495
- scheme: 'bearer',
10496
- type: 'http'
10497
- }, {
10498
- key: 'ApiKeyAuth',
10499
- name: 'X-API-Key',
10500
- type: 'apiKey'
10501
- }],
10502
- url: '/studio/v1/works/{work}/brief',
10503
- ...options,
10504
- headers: {
10505
- 'Content-Type': 'application/json',
10506
- ...options.headers
10507
- }
10508
- });
10509
10756
  /**
10510
10757
  * List the drafts a work carries
10511
10758
  *
@@ -10586,6 +10833,28 @@ export const studioDraftsUpdate = (options) => (options.client ?? client).patch(
10586
10833
  ...options.headers
10587
10834
  }
10588
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
+ });
10589
10858
  /**
10590
10859
  * Read the whole unit outline as Markdown
10591
10860
  *
@@ -10604,6 +10873,122 @@ export const studioDraftsOutline = (options) => (options.client ?? client).get({
10604
10873
  url: '/studio/v1/works/{work}/drafts/{draft}/outline',
10605
10874
  ...options
10606
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
+ });
10607
10992
  /**
10608
10993
  * Read the computed todo list of a draft
10609
10994
  *
@@ -10851,7 +11236,7 @@ export const studioUnitsContext = (options) => (options.client ?? client).get({
10851
11236
  /**
10852
11237
  * List the reference libraries of this organization
10853
11238
  *
10854
- * 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.
10855
11240
  */
10856
11241
  export const studioCodexesList = (options) => (options?.client ?? client).get({
10857
11242
  security: [{
@@ -10869,7 +11254,7 @@ export const studioCodexesList = (options) => (options?.client ?? client).get({
10869
11254
  /**
10870
11255
  * Create a reference library
10871
11256
  *
10872
- * 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.
10873
11258
  */
10874
11259
  export const studioCodexesCreate = (options) => (options.client ?? client).post({
10875
11260
  security: [{
@@ -10967,7 +11352,7 @@ export const studioEntriesList = (options) => (options.client ?? client).get({
10967
11352
  /**
10968
11353
  * Add an entry to a reference library
10969
11354
  *
10970
- * 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.
10971
11356
  */
10972
11357
  export const studioEntriesCreate = (options) => (options.client ?? client).post({
10973
11358
  security: [{
@@ -11007,7 +11392,7 @@ export const studioEntriesDelete = (options) => (options.client ?? client).delet
11007
11392
  /**
11008
11393
  * Read one reference entry
11009
11394
  *
11010
- * 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.
11011
11396
  */
11012
11397
  export const studioEntriesGet = (options) => (options.client ?? client).get({
11013
11398
  security: [{
@@ -11025,7 +11410,7 @@ export const studioEntriesGet = (options) => (options.client ?? client).get({
11025
11410
  /**
11026
11411
  * Change what a reference entry says
11027
11412
  *
11028
- * 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.
11029
11414
  */
11030
11415
  export const studioEntriesUpdate = (options) => (options.client ?? client).patch({
11031
11416
  security: [{
@@ -11065,7 +11450,7 @@ export const studioStylesList = (options) => (options?.client ?? client).get({
11065
11450
  /**
11066
11451
  * Create a writing style
11067
11452
  *
11068
- * 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.
11069
11454
  */
11070
11455
  export const studioStylesCreate = (options) => (options.client ?? client).post({
11071
11456
  security: [{
@@ -11123,7 +11508,7 @@ export const studioStylesGet = (options) => (options.client ?? client).get({
11123
11508
  /**
11124
11509
  * Change a writing style
11125
11510
  *
11126
- * 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.
11127
11512
  */
11128
11513
  export const studioStylesUpdate = (options) => (options.client ?? client).patch({
11129
11514
  security: [{
@@ -11471,7 +11856,7 @@ export const studioRenditionsContentUrl = (options) => (options.client ?? client
11471
11856
  /**
11472
11857
  * List the blind review rounds of a work
11473
11858
  *
11474
- * List the review rounds of one work, newest round first, each with its draft, round number, status, decision and whether it was appealed. 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.
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.
11475
11860
  */
11476
11861
  export const studioWorksReviewsList = (options) => (options.client ?? client).get({
11477
11862
  security: [{
@@ -11489,7 +11874,7 @@ export const studioWorksReviewsList = (options) => (options.client ?? client).ge
11489
11874
  /**
11490
11875
  * Send a draft to blind review
11491
11876
  *
11492
- * Send one draft of this work to the blind review centre, which freezes the draft's content revision as it is now, draws reviewers for the work's review settings and asks them in. Use it once the draft is written; the centre chooses 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; REVIEWER_POOL_EMPTY means the reviewer library cannot fill the seats under these conditions, so a person registers or re-activates reviewers.
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.
11493
11878
  */
11494
11879
  export const studioWorksReviewsCreate = (options) => (options.client ?? client).post({
11495
11880
  security: [{
@@ -11511,7 +11896,7 @@ export const studioWorksReviewsCreate = (options) => (options.client ?? client).
11511
11896
  /**
11512
11897
  * Read one blind review round
11513
11898
  *
11514
- * 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 every reviewer timed out and no replacement could be drawn. 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.
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.
11515
11900
  */
11516
11901
  export const studioWorksReviewsRetrieve = (options) => (options.client ?? client).get({
11517
11902
  security: [{
@@ -11527,11 +11912,11 @@ export const studioWorksReviewsRetrieve = (options) => (options.client ?? client
11527
11912
  ...options
11528
11913
  });
11529
11914
  /**
11530
- * Appeal a decided review round
11915
+ * Cancel a running review round
11531
11916
  *
11532
- * Appeal the outcome of a round: the centre draws one more reviewer of the same kind and puts that reviewer's answer beside the existing ones, without telling them the earlier outcome. Use it once, when the sender disagrees with the decision; the reason is recorded for the review centre, and the sender cannot choose the new reviewer. The round goes back to status reviewing and its id stays the same, so read it again afterwards. Each round can be appealed once: a second call for the same round answers REVIEW_ALREADY_APPEALED. Only a decided round can be appealed, so a round that is still reviewing or was cancelled answers REVIEW_IN_PROGRESS or stays cancelled. The extra reviewer's session is billed like any other reviewer session.
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.
11533
11918
  */
11534
- export const studioWorksReviewsAppeal = (options) => (options.client ?? client).post({
11919
+ export const studioWorksReviewsCancel = (options) => (options.client ?? client).post({
11535
11920
  security: [{
11536
11921
  key: 'BearerAuth',
11537
11922
  scheme: 'bearer',
@@ -11541,19 +11926,15 @@ export const studioWorksReviewsAppeal = (options) => (options.client ?? client).
11541
11926
  name: 'X-API-Key',
11542
11927
  type: 'apiKey'
11543
11928
  }],
11544
- url: '/studio/v1/works/{work}/reviews/{review}:appeal',
11545
- ...options,
11546
- headers: {
11547
- 'Content-Type': 'application/json',
11548
- ...options.headers
11549
- }
11929
+ url: '/studio/v1/works/{work}/reviews/{review}:cancel',
11930
+ ...options
11550
11931
  });
11551
11932
  /**
11552
- * Cancel a running review round
11933
+ * Read the review settings of a work
11553
11934
  *
11554
- * 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.
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.
11555
11936
  */
11556
- export const studioWorksReviewsCancel = (options) => (options.client ?? client).post({
11937
+ export const studioWorksReviewSettingsRetrieve = (options) => (options.client ?? client).get({
11557
11938
  security: [{
11558
11939
  key: 'BearerAuth',
11559
11940
  scheme: 'bearer',
@@ -11563,15 +11944,15 @@ export const studioWorksReviewsCancel = (options) => (options.client ?? client).
11563
11944
  name: 'X-API-Key',
11564
11945
  type: 'apiKey'
11565
11946
  }],
11566
- url: '/studio/v1/works/{work}/reviews/{review}:cancel',
11947
+ url: '/studio/v1/works/{work}/review-settings',
11567
11948
  ...options
11568
11949
  });
11569
11950
  /**
11570
- * Read the review settings of a work
11951
+ * Change how many rounds a work may take
11571
11952
  *
11572
- * Read how this work is reviewed: the seats that make up its review panel, each naming a reviewer kind, a tag and how many reviewers are drawn for it, the maximum number of rounds, and the revision the settings are at. Read it before sending a round, because a draft whose conditions the reviewer library cannot fill answers REVIEWER_POOL_EMPTY, and read it 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.
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.
11573
11954
  */
11574
- export const studioWorksReviewSettingsRetrieve = (options) => (options.client ?? client).get({
11955
+ export const studioWorksReviewSettingsUpdate = (options) => (options.client ?? client).patch({
11575
11956
  security: [{
11576
11957
  key: 'BearerAuth',
11577
11958
  scheme: 'bearer',
@@ -11582,14 +11963,36 @@ export const studioWorksReviewSettingsRetrieve = (options) => (options.client ??
11582
11963
  type: 'apiKey'
11583
11964
  }],
11584
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',
11585
11988
  ...options
11586
11989
  });
11587
11990
  /**
11588
- * Change the review settings of a work
11991
+ * Add a reviewer to a work
11589
11992
  *
11590
- * Change the review panel of a work: the seats, the maximum number of rounds, or both. 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, because widening who may judge a work is the owner's decision: an agent calling it is refused with PERMISSION_DENIED, which is this operation's answer for a caller without the organization's management identity. 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 settings apply to rounds sent from now on and never rewrite a round already sent.
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.
11591
11994
  */
11592
- export const studioWorksReviewSettingsUpdate = (options) => (options.client ?? client).patch({
11995
+ export const studioWorksReviewersCreate = (options) => (options.client ?? client).post({
11593
11996
  security: [{
11594
11997
  key: 'BearerAuth',
11595
11998
  scheme: 'bearer',
@@ -11599,7 +12002,7 @@ export const studioWorksReviewSettingsUpdate = (options) => (options.client ?? c
11599
12002
  name: 'X-API-Key',
11600
12003
  type: 'apiKey'
11601
12004
  }],
11602
- url: '/studio/v1/works/{work}/review-settings',
12005
+ url: '/studio/v1/works/{work}/reviewers',
11603
12006
  ...options,
11604
12007
  headers: {
11605
12008
  'Content-Type': 'application/json',
@@ -11607,11 +12010,11 @@ export const studioWorksReviewSettingsUpdate = (options) => (options.client ?? c
11607
12010
  }
11608
12011
  });
11609
12012
  /**
11610
- * List the reviewers of the organization
12013
+ * Remove a reviewer from a work
11611
12014
  *
11612
- * List the reviewers this organization can draw on: one entry per reviewer agent, with its kind, its display name, the tags it matches seats on, the model family it runs and whether it is active. Pass kind to see only expert or only audience reviewers. Read it before setting a work's seats, so the seat conditions match reviewers that exist, and after REVIEWER_POOL_EMPTY to see which reviewers are missing or inactive. Entries are the organization's own reviewer agents; a reviewer of another organization is never listed. The answer is one page; keep following next_page_token while it is present.
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.
11613
12016
  */
11614
- export const studioReviewersList = (options) => (options?.client ?? client).get({
12017
+ export const studioWorksReviewersDelete = (options) => (options.client ?? client).delete({
11615
12018
  security: [{
11616
12019
  key: 'BearerAuth',
11617
12020
  scheme: 'bearer',
@@ -11621,15 +12024,15 @@ export const studioReviewersList = (options) => (options?.client ?? client).get(
11621
12024
  name: 'X-API-Key',
11622
12025
  type: 'apiKey'
11623
12026
  }],
11624
- url: '/studio/v1/reviewers',
12027
+ url: '/studio/v1/works/{work}/reviewers/{agent}',
11625
12028
  ...options
11626
12029
  });
11627
12030
  /**
11628
- * Activate or retire a reviewer
12031
+ * Change a reviewer's kind
11629
12032
  *
11630
- * Take one reviewer in or out of the draw: active false keeps it in the library but stops it being drawn for future seats, and active true puts it back. Use it when a reviewer should stop judging, for example when its answers are consistently unusable, and set it back once that is dealt with. A round already sent is not affected, because its assignments were made when it was sent. A person makes this change, and an agent calling it is refused with PERMISSION_DENIED. The reviewer is addressed by the agent value the reviewer list returns; an unknown one answers REVIEWER_NOT_FOUND, which is also the answer for a reviewer of another organization.
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.
11631
12034
  */
11632
- export const studioReviewersUpdate = (options) => (options.client ?? client).patch({
12035
+ export const studioWorksReviewersUpdate = (options) => (options.client ?? client).patch({
11633
12036
  security: [{
11634
12037
  key: 'BearerAuth',
11635
12038
  scheme: 'bearer',
@@ -11639,7 +12042,7 @@ export const studioReviewersUpdate = (options) => (options.client ?? client).pat
11639
12042
  name: 'X-API-Key',
11640
12043
  type: 'apiKey'
11641
12044
  }],
11642
- url: '/studio/v1/reviewers/{agent}',
12045
+ url: '/studio/v1/works/{work}/reviewers/{agent}',
11643
12046
  ...options,
11644
12047
  headers: {
11645
12048
  'Content-Type': 'application/json',
@@ -12796,3 +13199,21 @@ export const ticketGetRepositories = (options) => (options?.client ?? client).ge
12796
13199
  url: '/ticket/v1/repositories',
12797
13200
  ...options
12798
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
+ });