@deepraxis/sdk 0.1.1-dev.c1d925b → 0.1.1-dev.c29cb4f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/METHODS.md +45 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +78 -20
- package/dist/generated/sdk.gen.js +173 -19
- package/dist/generated/types.gen.d.ts +2997 -126
- package/dist/operations.generated.js +386 -35
- package/dist/resources.generated.d.ts +821 -232
- package/dist/resources.generated.js +23 -0
- package/package.json +1 -1
|
@@ -360,7 +360,7 @@ export const getAgentAppearance = (options) => (options.client ?? client).get({
|
|
|
360
360
|
/**
|
|
361
361
|
* Get agent embed policy
|
|
362
362
|
*
|
|
363
|
-
* Read a service agent's embed settings: the pages allowed to open its Kit chat (allowed_origins), the development switch (allow_localhost)
|
|
363
|
+
* Read a service agent's embed settings: the pages allowed to open its Kit chat (allowed_origins), the development switch (allow_localhost), what an embedded end user may upload (uploads) and whether the agent may be shared by link with the daily caps its visitors count against (share_links). The allow list decides where the agent can be embedded at all, so after deploying an application, add that application's URL origin here (scheme, host and port, never a path) before the page loads the agent — otherwise its Kit chat answers ORIGIN_NOT_ALLOWED. Budgets, monthly caps and token lifetime are set in the console and are not part of this API. An agent of another organization answers 404; an agent that is not a service agent answers 400.
|
|
364
364
|
*/
|
|
365
365
|
export const getAgentEmbedPolicy = (options) => (options.client ?? client).get({
|
|
366
366
|
security: [{
|
|
@@ -378,7 +378,7 @@ export const getAgentEmbedPolicy = (options) => (options.client ?? client).get({
|
|
|
378
378
|
/**
|
|
379
379
|
* Update agent embed policy
|
|
380
380
|
*
|
|
381
|
-
* Change some of a service agent's embed settings. Only the fields you send change: everything you leave out, including the budgets and the token lifetime set in the console, is kept exactly as it was. Send allowed_origins so the pages that load the agent are allowed — an application's URL origin must be in the list before the application can embed the agent, or its Kit chat answers ORIGIN_NOT_ALLOWED. Send allow_localhost while developing on http://localhost, and uploads to open, close or bound file attachments for the embedded end user. Values are checked by the service: an origin is normalized and must be https, and at most one leading wildcard label may match a single subdomain level. max_file_bytes is 1 to 104857600 bytes and max_files_per_session is 1 to 100. Example: POST /agent/v1/agents/{agent_id}/embed_policy with {"allowed_origins": ["https://my-app.example.com"]}.
|
|
381
|
+
* Change some of a service agent's embed settings. Only the fields you send change: everything you leave out, including the budgets and the token lifetime set in the console, is kept exactly as it was. Send allowed_origins so the pages that load the agent are allowed — an application's URL origin must be in the list before the application can embed the agent, or its Kit chat answers ORIGIN_NOT_ALLOWED. Send allow_localhost while developing on http://localhost, and uploads to open, close or bound file attachments for the embedded end user. Send share_links to let the agent be shared by link and to set the daily session and spending caps its share links count against; turning it on is refused unless the agent has an identity number. Values are checked by the service: an origin is normalized and must be https, and at most one leading wildcard label may match a single subdomain level. max_file_bytes is 1 to 104857600 bytes and max_files_per_session is 1 to 100. Example: POST /agent/v1/agents/{agent_id}/embed_policy with {"allowed_origins": ["https://my-app.example.com"]}.
|
|
382
382
|
*/
|
|
383
383
|
export const updateAgentEmbedPolicy = (options) => (options.client ?? client).post({
|
|
384
384
|
security: [{
|
|
@@ -402,7 +402,7 @@ export const updateAgentEmbedPolicy = (options) => (options.client ?? client).po
|
|
|
402
402
|
*
|
|
403
403
|
* List the computers of your organization, archived ones included.
|
|
404
404
|
*
|
|
405
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
405
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
406
406
|
*/
|
|
407
407
|
export const computersList = (options) => (options?.client ?? client).get({
|
|
408
408
|
security: [{
|
|
@@ -422,7 +422,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
422
422
|
*
|
|
423
423
|
* Create a durable computer: a named machine whose files outlive sessions, for general agents.
|
|
424
424
|
*
|
|
425
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
425
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
426
426
|
*/
|
|
427
427
|
export const computersCreate = (options) => (options.client ?? client).post({
|
|
428
428
|
security: [{
|
|
@@ -466,7 +466,7 @@ export const computersDelete = (options) => (options.client ?? client).delete({
|
|
|
466
466
|
*
|
|
467
467
|
* Read one computer's status, storage use and sandbox id.
|
|
468
468
|
*
|
|
469
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
469
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
470
470
|
*/
|
|
471
471
|
export const computersRetrieve = (options) => (options.client ?? client).get({
|
|
472
472
|
security: [{
|
|
@@ -486,7 +486,7 @@ export const computersRetrieve = (options) => (options.client ?? client).get({
|
|
|
486
486
|
*
|
|
487
487
|
* Rename a computer.
|
|
488
488
|
*
|
|
489
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
489
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
490
490
|
*/
|
|
491
491
|
export const computersUpdate = (options) => (options.client ?? client).post({
|
|
492
492
|
security: [{
|
|
@@ -510,7 +510,7 @@ export const computersUpdate = (options) => (options.client ?? client).post({
|
|
|
510
510
|
*
|
|
511
511
|
* Archive a computer: its files stay readable but new sessions cannot use it.
|
|
512
512
|
*
|
|
513
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
513
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers. A computer an active agent holds is refused with 409 COMPUTER_IN_USE; archive the agent first.
|
|
514
514
|
*/
|
|
515
515
|
export const computersArchive = (options) => (options.client ?? client).post({
|
|
516
516
|
security: [{
|
|
@@ -555,7 +555,7 @@ export const computersAttachmentsCreate = (options) => (options.client ?? client
|
|
|
555
555
|
*
|
|
556
556
|
* List the entries of one directory on a computer.
|
|
557
557
|
*
|
|
558
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
558
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
559
559
|
*/
|
|
560
560
|
export const computersFilesList = (options) => (options.client ?? client).get({
|
|
561
561
|
security: [{
|
|
@@ -575,7 +575,7 @@ export const computersFilesList = (options) => (options.client ?? client).get({
|
|
|
575
575
|
*
|
|
576
576
|
* Download the bytes of one file on a computer, up to 16 MiB, with single-range support.
|
|
577
577
|
*
|
|
578
|
-
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference;
|
|
578
|
+
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
|
|
579
579
|
*/
|
|
580
580
|
export const computersFilesContent = (options) => (options.client ?? client).get({
|
|
581
581
|
security: [{
|
|
@@ -590,6 +590,24 @@ export const computersFilesContent = (options) => (options.client ?? client).get
|
|
|
590
590
|
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
591
591
|
...options
|
|
592
592
|
});
|
|
593
|
+
/**
|
|
594
|
+
* Preview a computer file
|
|
595
|
+
*
|
|
596
|
+
* The preview product of one version of one computer file: an image becomes a 1600 px WebP, an Office document a linearized PDF, text and source the first 64 KiB, and PDF, xlsx, epub, GIF, SVG and unknown types their original bytes. Products live in the File service and are keyed by computer, path, size, mtime, variant and format version. A request that pins `v` answers from that registry without stat'ing or waking the computer; without `v` the file is read and the product generated once. A file over the size threshold, or a deployment without the File service, answers `fallback: "content"` so the caller keeps the ordinary content door.
|
|
597
|
+
*/
|
|
598
|
+
export const previewComputerFile = (options) => (options.client ?? client).get({
|
|
599
|
+
security: [{
|
|
600
|
+
key: 'BearerAuth',
|
|
601
|
+
scheme: 'bearer',
|
|
602
|
+
type: 'http'
|
|
603
|
+
}, {
|
|
604
|
+
key: 'ApiKeyAuth',
|
|
605
|
+
name: 'X-API-Key',
|
|
606
|
+
type: 'apiKey'
|
|
607
|
+
}],
|
|
608
|
+
url: '/agent/v1/computers/{computer_id}/files/preview',
|
|
609
|
+
...options
|
|
610
|
+
});
|
|
593
611
|
/**
|
|
594
612
|
* Convert a Computer Document to PDF
|
|
595
613
|
*
|
|
@@ -738,6 +756,30 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
738
756
|
...options.headers
|
|
739
757
|
}
|
|
740
758
|
});
|
|
759
|
+
/**
|
|
760
|
+
* Rename Session (Extension)
|
|
761
|
+
*
|
|
762
|
+
* Give a session a short, branch-like name; the main session is always main and cannot be renamed.
|
|
763
|
+
*
|
|
764
|
+
* Available only on /agent/v1. The name is normalized first (surrounding whitespace trimmed, upper case folded to lowercase, runs of whitespace become one hyphen, characters the rule does not admit dropped, and no hyphen left hanging at either end) and then validated: non-empty, at most 32 display columns wide (a Han character counts as two), made only of Han characters, lowercase ASCII letters, digits and hyphens, and never the reserved word main. A name another of the caller's own sessions already holds is not an error: the answer carries a numeric suffix (base-2, base-3, …). Renaming the main session returns 400; a missing session, one that belongs to another caller, or one the caller cannot write returns 404. Returns 200 with the same Session shape as retrieval, name set to the new name; one rename writes a session.renamed event. Example: POST /agent/v1/sessions/sesn_login/name with body {"name":"login-fix"}.
|
|
765
|
+
*/
|
|
766
|
+
export const renameSession = (options) => (options.client ?? client).post({
|
|
767
|
+
security: [{
|
|
768
|
+
key: 'BearerAuth',
|
|
769
|
+
scheme: 'bearer',
|
|
770
|
+
type: 'http'
|
|
771
|
+
}, {
|
|
772
|
+
key: 'ApiKeyAuth',
|
|
773
|
+
name: 'X-API-Key',
|
|
774
|
+
type: 'apiKey'
|
|
775
|
+
}],
|
|
776
|
+
url: '/agent/v1/sessions/{session_id}/name',
|
|
777
|
+
...options,
|
|
778
|
+
headers: {
|
|
779
|
+
'Content-Type': 'application/json',
|
|
780
|
+
...options.headers
|
|
781
|
+
}
|
|
782
|
+
});
|
|
741
783
|
/**
|
|
742
784
|
* Update session agent version
|
|
743
785
|
*
|
|
@@ -3919,7 +3961,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
3919
3961
|
/**
|
|
3920
3962
|
* Create agent
|
|
3921
3963
|
*
|
|
3922
|
-
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation.
|
|
3964
|
+
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. Omit kind to create a service agent (Managed Agents behaviour: a fresh environment per session). Pass kind: "general" for an employee-style agent with its own computer, created with it; size and template come from the agent's computers configuration. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. A general or assume agent created without computer_id gets a new computer registered in the same request, named after the agent; a service agent with computer_id returns 400. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
3923
3965
|
*/
|
|
3924
3966
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
3925
3967
|
security: [{
|
|
@@ -8205,8 +8247,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8205
8247
|
* - `transform` — Position, scale, rotation, opacity, crop, blur.
|
|
8206
8248
|
* - `fit` — contain, cover, fill or none.
|
|
8207
8249
|
* - `blend` — Layer blend mode; null clears.
|
|
8208
|
-
* - `style` — Text styling: font,
|
|
8209
|
-
* - `style.
|
|
8250
|
+
* - `style` — Text styling in Shotstack's rich shape: font, gradient, stroke, shadow, box, border, align, per-word animation.
|
|
8251
|
+
* - `style.align.vertical` — top, middle or bottom; omit it, never null.
|
|
8210
8252
|
* - `playback` — Rate, direction, audio policy, or freeze.
|
|
8211
8253
|
* - `volumeDb` — Audio level in dB; 0 is source level.
|
|
8212
8254
|
* - `gain` — Keyframed audio level in dB.
|
|
@@ -8227,6 +8269,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8227
8269
|
* - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
|
|
8228
8270
|
* - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
|
|
8229
8271
|
* - `INVALID_STYLE` — A style value is out of range.
|
|
8272
|
+
* - `UNSUPPORTED_STYLE_FIELD` — A Shotstack style field this platform cannot render yet.
|
|
8273
|
+
* - `STYLE_LEGACY_FIELDS` — A style written in the old flat shape; it still works.
|
|
8230
8274
|
* - `INVALID_MASK` — A mask definition is malformed.
|
|
8231
8275
|
* - `MASK_IN_USE` — The edit would break a live mask.
|
|
8232
8276
|
* - `TOO_MANY_MASKS` — At most 16 masks per project.
|
|
@@ -9961,7 +10005,7 @@ export const devopsChangesGet = (options) => (options.client ?? client).get({
|
|
|
9961
10005
|
/**
|
|
9962
10006
|
* Abandon a change
|
|
9963
10007
|
*
|
|
9964
|
-
* 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).
|
|
10008
|
+
* 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 it has not merged are closed with it: each one is closed on GitHub with a note naming the change and this reason, so an abandoned change never leaves an open pull request behind for someone else to clean up — a change with no open pull request makes no GitHub call at all. That close happens BEFORE the change is marked, so an abandon that cannot close them is refused with GITHUB_UNAVAILABLE and nothing has changed; send it again. 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). Repeating the call on a change that is already abandoned answers the change as it stands instead of refusing it: the first abandon is the fact, and a caller that lost the answer gets it back.
|
|
9965
10009
|
*/
|
|
9966
10010
|
export const devopsChangesAbandon = (options) => (options.client ?? client).post({
|
|
9967
10011
|
security: [{
|
|
@@ -9997,7 +10041,7 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
9997
10041
|
/**
|
|
9998
10042
|
* Open a change's pull request
|
|
9999
10043
|
*
|
|
10000
|
-
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and
|
|
10044
|
+
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.
|
|
10001
10045
|
*/
|
|
10002
10046
|
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
10003
10047
|
security: [{
|
|
@@ -10104,6 +10148,24 @@ export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? c
|
|
|
10104
10148
|
...options.headers
|
|
10105
10149
|
}
|
|
10106
10150
|
});
|
|
10151
|
+
/**
|
|
10152
|
+
* Close a pull request without merging it
|
|
10153
|
+
*
|
|
10154
|
+
* End a pull request that will never land, without abandoning the change it belongs to. DevOps closes it on GitHub through the project's own App installation, after writing this reason on the pull request, so it leaves the review queue instead of waiting for a merge that is not coming and whoever finds it later sees who ended it and why. Use it when one slice of a change is dropped while the change continues; abandoning the CHANGE closes its unmerged pull requests on its own and needs no second call. Only an open pull request can be closed: a merged one is refused with PULL_REQUEST_NOT_OPEN, because closing does not undo a merge and GitHub will not move a merged pull request back to closed, and one that is already closed answers itself unchanged, so repeating the call is safe. A pull request GitHub no longer has open is refused the same way — nothing was closed, and the platform's record catches up with GitHub on its next delivery.
|
|
10155
|
+
*/
|
|
10156
|
+
export const devopsPullRequestsClose = (options) => (options.client ?? client).post({
|
|
10157
|
+
security: [{
|
|
10158
|
+
key: 'devops-bearerAuth',
|
|
10159
|
+
scheme: 'bearer',
|
|
10160
|
+
type: 'http'
|
|
10161
|
+
}],
|
|
10162
|
+
url: '/devops/v1/pull-requests/{id}:close',
|
|
10163
|
+
...options,
|
|
10164
|
+
headers: {
|
|
10165
|
+
'Content-Type': 'application/json',
|
|
10166
|
+
...options.headers
|
|
10167
|
+
}
|
|
10168
|
+
});
|
|
10107
10169
|
/**
|
|
10108
10170
|
* List connections
|
|
10109
10171
|
*
|
|
@@ -11195,7 +11257,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
11195
11257
|
/**
|
|
11196
11258
|
* Get job
|
|
11197
11259
|
*
|
|
11198
|
-
* Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video
|
|
11260
|
+
* Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video a few minutes; an edit of a video took about four). status: queued is waiting (queue_reason says why, queue_position its place in line; provider_queue means the model’s supplier holds the task in its own queue, which can take hours when it is busy — the job keeps waiting for as long as the supplier keeps the task, and only past the supplier’s own task lifetime fails with detail_code UPSTREAM_WAIT_EXCEEDED, uncharged); in_progress or running is generating; completed means every output succeeded; completed_with_errors means some did; failed means none did; canceled or cancelled means it was stopped. Read the result output by output. A succeeded entry of outputs[] has asset_id and viewer_url, because the output is already a library asset: give viewer_url to the person. Its seed is present only when the model reports one (Doubao Seedance 2.x neither takes nor reports a seed); where present, send it back as seed with an adjusted prompt to vary that take. A failed entry has its reason in the failures[] entry with the same index: code is the error to branch on, for example CONTENT_REJECTED when the model's moderation refused an input or the result (a real human face in a reference is one cause; change the prompt or the reference, because retrying unchanged fails again) or GENERATION_FAILED when the model call failed (retrying may succeed); detail_code is the model's finer reason and model_request_id the model call to trace. usage is what the job has cost so far and is final at a terminal status; failed and refused outputs are not charged, so usage counts succeeded outputs only, and it is absent when nothing was charged.
|
|
11199
11261
|
*/
|
|
11200
11262
|
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
11201
11263
|
security: [{
|
|
@@ -11305,7 +11367,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
|
11305
11367
|
/**
|
|
11306
11368
|
* Generate video
|
|
11307
11369
|
*
|
|
11308
|
-
* Generate videos into a library: from a prompt, from frames, from reference pictures or videos, or by editing an existing video. {library_id} also accepts default, the organization’s default library. mode picks the anchor: text (prompt only); image (animates first_frame); first_last (between first_frame and last_frame); reference (1 to 9 references: pictures with role subject or style keep a person, product or look consistent, and video assets with role video give the camera and motion to follow; an element id expands into its pictures and description); edit (keeps the video named by source, at least 4 s, and changes what the prompt says, such as replacing its person with a subject picture; the output is as long as the source). Frames and references are assets of the same library; in the prompt call them @video1 and @image1, @image2… in request order. Read GET /media/v1/generation/capabilities first: a model takes only the modes it lists. To draw several takes of one shot and keep the best, send n (1 to 4); 480p is the cheapest way to compare takes. Charges are per output second at the model API prices and appear in the Job’s usage; a job with an input video is metered on input plus output seconds, so it
|
|
11370
|
+
* Generate videos into a library: from a prompt, from frames, from reference pictures or videos, or by editing an existing video. {library_id} also accepts default, the organization’s default library. mode picks the anchor: text (prompt only); image (animates first_frame); first_last (between first_frame and last_frame); reference (1 to 9 references: pictures with role subject or style keep a person, product or look consistent, and video assets with role video give the camera and motion to follow; an element id expands into its pictures and description); edit (keeps the video named by source, at least 4 s, and changes what the prompt says, such as replacing its person with a subject picture; the output is as long as the source). Frames and references are assets of the same library; in the prompt call them @video1 and @image1, @image2… in request order. Read GET /media/v1/generation/capabilities first: a model takes only the modes it lists. To draw several takes of one shot and keep the best, send n (1 to 4); 480p is the cheapest way to compare takes. Charges are per output second at the model API prices and appear in the Job’s usage; a job with an input video is metered on input plus output seconds, so it costs more than the output length suggests (a 5 s edit of a 5 s source bills about 6 s); a refused or failed output costs nothing, and so does a request refused before the job starts. A real human face in a source or reference is refused by the model with CONTENT_REJECTED. Refused before any charge: output gif (OPERATION_NOT_SUPPORTED), negative_prompt, references outside reference and edit, and an unknown mode. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
11309
11371
|
*/
|
|
11310
11372
|
export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
11311
11373
|
security: [{
|
|
@@ -11323,7 +11385,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
11323
11385
|
/**
|
|
11324
11386
|
* Edit asset
|
|
11325
11387
|
*
|
|
11326
|
-
* Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background and
|
|
11388
|
+
* Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background, upscale and talking_avatar (the portrait speaks a recording of the same library); on a video, upscale, reframe, redact, trim, mute, crop, extract_audio (pulls the sound out of a video as its own audio asset), erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person), lip_sync (re-syncs the lips to a recording of the same library), animate_person (an image of the same library performs the video’s motion), edit_video (the video changed by a one-line instruction, optionally guided by one image of the same library) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model; extract_audio takes no model, it has exactly one function); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.
|
|
11327
11389
|
*/
|
|
11328
11390
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
11329
11391
|
security: [{
|
|
@@ -11526,6 +11588,42 @@ export const mediaRequestHlsRenditions = (options) => (options.client ?? client)
|
|
|
11526
11588
|
...options.headers
|
|
11527
11589
|
}
|
|
11528
11590
|
});
|
|
11591
|
+
/**
|
|
11592
|
+
* Create voice
|
|
11593
|
+
*
|
|
11594
|
+
* Create a voice for this library and start the clone that makes it speakable. Send exactly one of the two shapes: consent_id with samples (a real person’s recordings, a consented voice) or design_asset_id (a preview the voice-design run produced in this library, a generated voice). Sending both, or neither, is refused with INVALID_PARAMS, and origin is written by the platform only. Answers 202 with a job to poll; the voice exists as soon as the job is created and its clone follows.
|
|
11595
|
+
*/
|
|
11596
|
+
export const mediaCreateVoice = (options) => (options.client ?? client).post({
|
|
11597
|
+
security: [{
|
|
11598
|
+
key: 'media-BearerAuth',
|
|
11599
|
+
scheme: 'bearer',
|
|
11600
|
+
type: 'http'
|
|
11601
|
+
}],
|
|
11602
|
+
url: '/media/v1/libraries/{library_id}/voices',
|
|
11603
|
+
...options,
|
|
11604
|
+
headers: {
|
|
11605
|
+
'Content-Type': 'application/json',
|
|
11606
|
+
...options.headers
|
|
11607
|
+
}
|
|
11608
|
+
});
|
|
11609
|
+
/**
|
|
11610
|
+
* Design a voice
|
|
11611
|
+
*
|
|
11612
|
+
* Design a voice from a text description. The model makes count preview recordings (default 3), each stored in this library as an audio asset; listen, then create a voice whose design_asset_id names the preview you chose. Send description (1 to 500 characters), preview_text (15 to 200 characters, the line each preview speaks), language (zh or en) and optionally count (1 to 3). A description that fails review fails the slot with CONTENT_REJECTED and is never retried, so changing the words is the fix. Answers 202 with a job to poll.
|
|
11613
|
+
*/
|
|
11614
|
+
export const mediaDesignVoice = (options) => (options.client ?? client).post({
|
|
11615
|
+
security: [{
|
|
11616
|
+
key: 'media-BearerAuth',
|
|
11617
|
+
scheme: 'bearer',
|
|
11618
|
+
type: 'http'
|
|
11619
|
+
}],
|
|
11620
|
+
url: '/media/v1/libraries/{library_id}/voices/designs',
|
|
11621
|
+
...options,
|
|
11622
|
+
headers: {
|
|
11623
|
+
'Content-Type': 'application/json',
|
|
11624
|
+
...options.headers
|
|
11625
|
+
}
|
|
11626
|
+
});
|
|
11529
11627
|
/**
|
|
11530
11628
|
* List types
|
|
11531
11629
|
*
|
|
@@ -11882,7 +11980,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
|
|
|
11882
11980
|
/**
|
|
11883
11981
|
* Retrieve package
|
|
11884
11982
|
*
|
|
11885
|
-
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404
|
|
11983
|
+
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。软删期间这个包一律 404,恢复后才重新出现。
|
|
11886
11984
|
*/
|
|
11887
11985
|
export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
|
|
11888
11986
|
security: [{
|
|
@@ -11926,6 +12024,62 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
|
|
|
11926
12024
|
...options.headers
|
|
11927
12025
|
}
|
|
11928
12026
|
});
|
|
12027
|
+
/**
|
|
12028
|
+
* List commits
|
|
12029
|
+
*
|
|
12030
|
+
* 列出一个 git 包的提交历史,最新的在前。ref 不给就是包的默认分支;limit 与 offset 分页,has_more 为 true 表示还有下一页。只读:提交只能通过 git 协议推送(clone 地址在包的 clone_url)。OCI 包没有 git 读接口,返回 404。
|
|
12031
|
+
*/
|
|
12032
|
+
export const registryGitLog = (options) => (options.client ?? client).get({
|
|
12033
|
+
security: [{
|
|
12034
|
+
key: 'registry-bearerAuth',
|
|
12035
|
+
scheme: 'bearer',
|
|
12036
|
+
type: 'http'
|
|
12037
|
+
}],
|
|
12038
|
+
url: '/registry/v1/packages/{package_id}/git/log',
|
|
12039
|
+
...options
|
|
12040
|
+
});
|
|
12041
|
+
/**
|
|
12042
|
+
* Read a commit
|
|
12043
|
+
*
|
|
12044
|
+
* 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。
|
|
12045
|
+
*/
|
|
12046
|
+
export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
|
|
12047
|
+
security: [{
|
|
12048
|
+
key: 'registry-bearerAuth',
|
|
12049
|
+
scheme: 'bearer',
|
|
12050
|
+
type: 'http'
|
|
12051
|
+
}],
|
|
12052
|
+
url: '/registry/v1/packages/{package_id}/git/commits/{sha}',
|
|
12053
|
+
...options
|
|
12054
|
+
});
|
|
12055
|
+
/**
|
|
12056
|
+
* List a tree
|
|
12057
|
+
*
|
|
12058
|
+
* 读一个树对象(或一个提交的根树)的条目:名字、类型(blob / tree / commit)、模式、对象 id,以及已知时的大小。只列这一层,不递归。
|
|
12059
|
+
*/
|
|
12060
|
+
export const registryGitTreesRetrieve = (options) => (options.client ?? client).get({
|
|
12061
|
+
security: [{
|
|
12062
|
+
key: 'registry-bearerAuth',
|
|
12063
|
+
scheme: 'bearer',
|
|
12064
|
+
type: 'http'
|
|
12065
|
+
}],
|
|
12066
|
+
url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
|
|
12067
|
+
...options
|
|
12068
|
+
});
|
|
12069
|
+
/**
|
|
12070
|
+
* Download a file from a ref
|
|
12071
|
+
*
|
|
12072
|
+
* 按引用读一个文件的原始字节。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。文件超过 4 MiB 返回 413,改用 git 协议取。路径不是文件或引用不存在返回 404。
|
|
12073
|
+
*/
|
|
12074
|
+
export const registryGitFilesRetrieve = (options) => (options.client ?? client).get({
|
|
12075
|
+
security: [{
|
|
12076
|
+
key: 'registry-bearerAuth',
|
|
12077
|
+
scheme: 'bearer',
|
|
12078
|
+
type: 'http'
|
|
12079
|
+
}],
|
|
12080
|
+
url: '/registry/v1/packages/{package_id}/git/files/{path}',
|
|
12081
|
+
...options
|
|
12082
|
+
});
|
|
11929
12083
|
/**
|
|
11930
12084
|
* List version contents
|
|
11931
12085
|
*
|
|
@@ -13183,7 +13337,7 @@ export const shareListPermissions = (options) => (options?.client ?? client).get
|
|
|
13183
13337
|
/**
|
|
13184
13338
|
* Create share
|
|
13185
13339
|
*
|
|
13186
|
-
* Make one
|
|
13340
|
+
* Make one object readable by anyone holding a link, before sending the link to a person or embedding it. Name the object as resource {type, id} — a file id from the File API, a canvas id, a media asset's library_id/asset_id, or an agent id (agent_...) of a service agent whose owner turned share links on. The response is 201 and is the only time link.web_url is returned; store it, because later reads omit it and a lost address means creating another share (the old one keeps working until you delete it). Opening a file or media link signs a short-lived read address; opening a canvas link shows a snapshot rendered at that moment; opening an agent link starts a Hosted conversation with that agent as the visitor, so each browser keeps its own history. The link is anonymous, and for every type so far read-only. A type that cannot be shared answers 400 RESOURCE_TYPE_UNSUPPORTED; an agent whose share links are switched off answers 400 RESOURCE_NOT_SHAREABLE and its owner turns them on in the agent's embed settings (share_links), which also requires the agent to have a short number; an object that is missing or outside your organization answers 404 RESOURCE_NOT_FOUND.
|
|
13187
13341
|
*/
|
|
13188
13342
|
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
13189
13343
|
security: [{
|