@deepraxis/sdk 0.1.1-dev.2809654 → 0.1.1-dev.28b7f8d
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 +160 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +298 -10
- package/dist/generated/sdk.gen.js +855 -51
- package/dist/generated/types.gen.d.ts +4139 -243
- package/dist/operations.generated.js +3184 -1758
- package/dist/resources.generated.d.ts +130 -8
- package/dist/resources.generated.js +101 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { client } from './client.gen.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Read your conversation with an agent
|
|
6
6
|
*
|
|
7
|
-
* Read your conversation with a
|
|
7
|
+
* Read your conversation with a general agent: the events of your own main session with that agent, the same page sessions.events.list returns — same query parameters, same data + next_page envelope, same event shapes. {agent_id} takes the agent_… id, the eight character identity number or the handle; a service or assume agent answers 400. Use it to collect a reply, to find tool calls waiting for approval, or to learn the real session id without ever asking for one.
|
|
8
8
|
*/
|
|
9
9
|
export const listAgentEvents = (options) => (options.client ?? client).get({
|
|
10
10
|
security: [{
|
|
@@ -22,7 +22,7 @@ export const listAgentEvents = (options) => (options.client ?? client).get({
|
|
|
22
22
|
/**
|
|
23
23
|
* Send events to an agent
|
|
24
24
|
*
|
|
25
|
-
* Talk to a
|
|
25
|
+
* Talk to a general agent: the message goes to your own main session with that agent — one entry per person, created on first use and the same every time after — so no session id is needed. This is sessions.events.send addressed by the agent instead of the session: the same body (user.message with exactly one nonempty text block, user.interrupt, user.tool_confirmation, user.custom_tool_result, user.steer, user.withdraw), the same acknowledgement and the same billing. {agent_id} takes the agent_… id, the eight character identity number or the handle. A service or assume agent answers 400 — it has no main session: reach a service agent over A2A, or open a session explicitly with sessions.create. Read the reply with agents.events.list, or follow it while it is produced with agents.events.stream. Example: POST /agent/v1/agents/agent_example/events with {"events":[{"type":"user.message","content":[{"type":"text","text":"你好"}]}]}.
|
|
26
26
|
*/
|
|
27
27
|
export const sendAgentEvents = (options) => (options.client ?? client).post({
|
|
28
28
|
security: [{
|
|
@@ -44,7 +44,7 @@ export const sendAgentEvents = (options) => (options.client ?? client).post({
|
|
|
44
44
|
/**
|
|
45
45
|
* Follow an agent live
|
|
46
46
|
*
|
|
47
|
-
* Follow an agent live over Server-Sent Events. For a
|
|
47
|
+
* Follow an agent live over Server-Sent Events. For a general agent it is the stream of your own main session with that agent, the same stream sessions.events.stream opens, event_deltas[] previews included; read past events with agents.events.list. An assume agent has no main session: its body is its MCP connections, and this stream is its broadcast point, which every live connection of the agent hears at once. It carries two events, each with an SSE id: inbox.letter_delivered { letter_id, sender, sender_name, summary, thread, create_time } when a letter arrives (the letter stays unread; take it with the agent's inbox tool, the body is not in the event), and cognition.ritual_held { ritual, owner, title, engram, create_time } when a domain gives the agent a memory. Reconnect with the Last-Event-ID header to receive what you missed from a short recent buffer (about an hour); a first connection replays nothing, so read agents.inbox.letters.list for mail already waiting. {agent_id} takes the agent_… id, the eight character identity number or the handle; a service agent answers 400. Closing the stream only drops your subscription and does not stop the agent.
|
|
48
48
|
*/
|
|
49
49
|
export const streamAgentEvents = (options) => (options.client ?? client).sse.get({
|
|
50
50
|
security: [{
|
|
@@ -459,7 +459,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
459
459
|
/**
|
|
460
460
|
* Create Computer
|
|
461
461
|
*
|
|
462
|
-
* Create a durable computer: a named machine whose files outlive sessions, for general
|
|
462
|
+
* Create a durable computer: a named machine whose files outlive sessions, for general agents.
|
|
463
463
|
*
|
|
464
464
|
* 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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
|
|
465
465
|
*/
|
|
@@ -965,6 +965,46 @@ export const listSessionCompactions = (options) => (options.client ?? client).ge
|
|
|
965
965
|
url: '/agent/v1/sessions/{session_id}/compactions',
|
|
966
966
|
...options
|
|
967
967
|
});
|
|
968
|
+
/**
|
|
969
|
+
* Upload a File (Extension)
|
|
970
|
+
*
|
|
971
|
+
* Start an upload for an embedded end user, so the browser can PUT the file's bytes straight to the File service and then attach the resulting file id to its own session. Use it only with an end-user token: a grant-bound end_user token uploads for its own agent, and an organization-level customer token must name the agent in the body (agent). A member, robot or user_key credential uses /file/v1 instead and gets 404 here. Body: filename (1–255 characters, its extension decides the blocked-type refusal), bytes (the positive byte length) and content_type (1–255 characters). Returns 201 with the File signed-upload answer: upload_id and expires_at, and url for a small file, or part_size, parts, complete_url and status_url for a large one; the addresses are returned here only and must never be stored or logged. The browser PUTs the bytes to the address (or to each part and then complete_url), which answers the File object and its file_id; then POST the file_id to /agent/v1/sessions/{session_id}/resources, and reference it in the message attachments. Refusals: 403 UPLOADS_DISABLED when uploads are off on the agent, 413 FILE_TOO_LARGE when bytes exceeds its uploads.max_file_bytes, 400 FILE_TYPE_REFUSED for a blocked executable or script extension, and 429 UPLOAD_RATE_LIMITED on the 31st unattached upload from the same user on the same agent within an hour. Example: POST /agent/v1/uploads with {"filename":"report.pdf","bytes":48211,"content_type":"application/pdf"}.
|
|
972
|
+
*/
|
|
973
|
+
export const createAgentUpload = (options) => (options.client ?? client).post({
|
|
974
|
+
security: [{
|
|
975
|
+
key: 'BearerAuth',
|
|
976
|
+
scheme: 'bearer',
|
|
977
|
+
type: 'http'
|
|
978
|
+
}, {
|
|
979
|
+
key: 'ApiKeyAuth',
|
|
980
|
+
name: 'X-API-Key',
|
|
981
|
+
type: 'apiKey'
|
|
982
|
+
}],
|
|
983
|
+
url: '/agent/v1/uploads',
|
|
984
|
+
...options,
|
|
985
|
+
headers: {
|
|
986
|
+
'Content-Type': 'application/json',
|
|
987
|
+
...options.headers
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
/**
|
|
991
|
+
* Create Upload Content URL (Extension)
|
|
992
|
+
*
|
|
993
|
+
* Mint a short-lived read address for one file an embedded end user uploaded, so the page can show or download its own file again. Use it only with an end-user token; file_id is the id the File service returned after the bytes were uploaded. Returns 200 with url (an address that works for 900 seconds) and expires_at; never store or log the address. Only the caller's own upload answers: a file that belongs to someone else, a missing one, or one that did not start as an upload returns 404 FILE_NOT_FOUND, so a stranger cannot learn whether another person's file exists. The request body is empty. Example: POST /agent/v1/uploads/file-Ab12.../content_url.
|
|
994
|
+
*/
|
|
995
|
+
export const createAgentUploadContentUrl = (options) => (options.client ?? client).post({
|
|
996
|
+
security: [{
|
|
997
|
+
key: 'BearerAuth',
|
|
998
|
+
scheme: 'bearer',
|
|
999
|
+
type: 'http'
|
|
1000
|
+
}, {
|
|
1001
|
+
key: 'ApiKeyAuth',
|
|
1002
|
+
name: 'X-API-Key',
|
|
1003
|
+
type: 'apiKey'
|
|
1004
|
+
}],
|
|
1005
|
+
url: '/agent/v1/uploads/{file_id}/content_url',
|
|
1006
|
+
...options
|
|
1007
|
+
});
|
|
968
1008
|
/**
|
|
969
1009
|
* Generate speech
|
|
970
1010
|
*
|
|
@@ -3876,7 +3916,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
3876
3916
|
/**
|
|
3877
3917
|
* List agents
|
|
3878
3918
|
*
|
|
3879
|
-
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general
|
|
3919
|
+
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general for durable-computer agents, kind=service for per-session environments, or kind=assume for external MCP clients. Pass next_page from the response as page to read the next page; a null next_page means the end.
|
|
3880
3920
|
*/
|
|
3881
3921
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
3882
3922
|
security: [{
|
|
@@ -4050,7 +4090,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
|
|
|
4050
4090
|
/**
|
|
4051
4091
|
* List session events
|
|
4052
4092
|
*
|
|
4053
|
-
* Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids; a request nobody answered within 24 hours is settled as unanswered and the session goes idle with stop_reason request_expired, which the /anthropic/v1 face shows as end_turn), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, system.notification_suppressed (pending background notifications that hit the wake quota and started no run), system.notification_recorded, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a
|
|
4093
|
+
* Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids; a request nobody answered within 24 hours is settled as unanswered and the session goes idle with stop_reason request_expired, which the /anthropic/v1 face shows as end_turn), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, system.notification_suppressed (pending background notifications that hit the wake quota and started no run), system.notification_recorded, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a general agent itself, use agents.events.list instead. In the path, session_id may also be `main` (your own main session with that agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.
|
|
4054
4094
|
*/
|
|
4055
4095
|
export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
4056
4096
|
security: [{
|
|
@@ -4068,7 +4108,7 @@ export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
|
4068
4108
|
/**
|
|
4069
4109
|
* Send session events
|
|
4070
4110
|
*
|
|
4071
|
-
* Attach optional praxis_context={items:[{name,value}]} to user.message for untrusted page context on this turn only (maximum 32 items, 4096 UTF-8 JSON bytes). /anthropic/v1 rejects this field. Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.custom_tool_result to return a custom tool result, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects. Both faces accept user.custom_tool_result with custom_tool_use_id from agent.custom_tool_use.id or the requires_action stop_reason.event_ids. Unlike Anthropic, result content accepts only text blocks (omit it for an empty array). Omitted or null is_error means false. The server routes child calls by id; session_thread_id is rejected in this input. Unknown call ids return 400; duplicate results or calls no longer waiting return 409. This operation addresses one session — normally a worker session an agent dispatched; to talk to a
|
|
4111
|
+
* Attach optional praxis_context={items:[{name,value}]} to user.message for untrusted page context on this turn only (maximum 32 items, 4096 UTF-8 JSON bytes). /anthropic/v1 rejects this field. Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.custom_tool_result to return a custom tool result, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects. Both faces accept user.custom_tool_result with custom_tool_use_id from agent.custom_tool_use.id or the requires_action stop_reason.event_ids. Unlike Anthropic, result content accepts only text blocks (omit it for an empty array). Omitted or null is_error means false. The server routes child calls by id; session_thread_id is rejected in this input. Unknown call ids return 400; duplicate results or calls no longer waiting return 409. This operation addresses one session — normally a worker session an agent dispatched; to talk to a general agent itself, use agents.events.send instead. In the path, session_id may also be `main` (your own main session with the agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.
|
|
4072
4112
|
*/
|
|
4073
4113
|
export const sessionsEventsSend = (options) => (options.client ?? client).post({
|
|
4074
4114
|
security: [{
|
|
@@ -4090,7 +4130,7 @@ export const sessionsEventsSend = (options) => (options.client ?? client).post({
|
|
|
4090
4130
|
/**
|
|
4091
4131
|
* Stream session events
|
|
4092
4132
|
*
|
|
4093
|
-
* Open a Server-Sent Events stream of a session's events in real time. Use it to show a reply as it is produced; to read past events use sessions.events.list. Send a message through sessions.events.send in another request while the stream is open. Closing the stream only drops your subscription and does not stop the agent. Pass event_deltas[]=agent.message, agent.thinking or agent.tool_use to also receive event_start / event_delta previews before the final event. This operation addresses one session — normally a worker session an agent dispatched; to follow a
|
|
4133
|
+
* Open a Server-Sent Events stream of a session's events in real time. Use it to show a reply as it is produced; to read past events use sessions.events.list. Send a message through sessions.events.send in another request while the stream is open. Closing the stream only drops your subscription and does not stop the agent. Pass event_deltas[]=agent.message, agent.thinking or agent.tool_use to also receive event_start / event_delta previews before the final event. This operation addresses one session — normally a worker session an agent dispatched; to follow a general agent itself, use agents.events.stream instead. In the path, session_id may also be `main` (your own main session with the agent) or a short session name, and either alias then requires agent_id with the agent_… id, the eight character identity number or the handle; only the own face /agent/v1 accepts an alias, /anthropic/v1 requires a real sesn_… id.
|
|
4094
4134
|
*/
|
|
4095
4135
|
export const sessionsEventsStream = (options) => (options.client ?? client).sse.get({
|
|
4096
4136
|
security: [{
|
|
@@ -4390,7 +4430,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4390
4430
|
/**
|
|
4391
4431
|
* Create deployment
|
|
4392
4432
|
*
|
|
4393
|
-
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general
|
|
4433
|
+
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
4394
4434
|
*/
|
|
4395
4435
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4396
4436
|
security: [{
|
|
@@ -6966,6 +7006,193 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
|
|
|
6966
7006
|
...options.headers
|
|
6967
7007
|
}
|
|
6968
7008
|
});
|
|
7009
|
+
/**
|
|
7010
|
+
* List contents
|
|
7011
|
+
*
|
|
7012
|
+
* Discover the video contents of the API key's organization and obtain the content_id each later call takes. Archived contents stay out of the list unless status is archived; results are ordered by update_time, newest first. Filter with status (draft, published, unpublished or archived), kind (video), asset_id (the Media asset a content was made from) and q (a substring of the title). page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null, keeping the same filters.
|
|
7013
|
+
*/
|
|
7014
|
+
export const contentListContents = (options) => (options?.client ?? client).get({
|
|
7015
|
+
security: [{
|
|
7016
|
+
key: 'BearerAuth',
|
|
7017
|
+
scheme: 'bearer',
|
|
7018
|
+
type: 'http'
|
|
7019
|
+
}, {
|
|
7020
|
+
key: 'ApiKeyAuth',
|
|
7021
|
+
name: 'X-API-Key',
|
|
7022
|
+
type: 'apiKey'
|
|
7023
|
+
}],
|
|
7024
|
+
url: '/content/v1/contents',
|
|
7025
|
+
...options
|
|
7026
|
+
});
|
|
7027
|
+
/**
|
|
7028
|
+
* Create a content
|
|
7029
|
+
*
|
|
7030
|
+
* Create a video content from one asset of a Media library, before publishing it to end users. Send library_id and asset_id from `praxis.media` (assets.create, assets.list or the asset you uploaded return them); the create pins asset_version (default 1) and immediately asks Media to transcode the wanted renditions, so the content reports readiness processing until they are ready. kind is video, the only kind today. settings is optional and its four groups are merged over the service defaults: source (library_id and asset_id required, asset_version 1, follow_new_versions false, renditions 480/720/1080), access (capability_seconds 600 within 100 to 3000, encryption false, allowed_origins empty), player (poster null, show_title true, accent_color null, default_quality auto, speeds 0.75/1/1.25/1.5/2, storyboard true, autoplay false, remember_position true) and description (at most 2000 characters). An unknown field — including mode, which was removed because a content is always signed — is refused by name with 400. Returns the new content with HTTP 201; save its id for publish, versions and playback calls.
|
|
7031
|
+
*/
|
|
7032
|
+
export const contentCreateContent = (options) => (options.client ?? client).post({
|
|
7033
|
+
security: [{
|
|
7034
|
+
key: 'BearerAuth',
|
|
7035
|
+
scheme: 'bearer',
|
|
7036
|
+
type: 'http'
|
|
7037
|
+
}, {
|
|
7038
|
+
key: 'ApiKeyAuth',
|
|
7039
|
+
name: 'X-API-Key',
|
|
7040
|
+
type: 'apiKey'
|
|
7041
|
+
}],
|
|
7042
|
+
url: '/content/v1/contents',
|
|
7043
|
+
...options,
|
|
7044
|
+
headers: {
|
|
7045
|
+
'Content-Type': 'application/json',
|
|
7046
|
+
...options.headers
|
|
7047
|
+
}
|
|
7048
|
+
});
|
|
7049
|
+
/**
|
|
7050
|
+
* Get a content
|
|
7051
|
+
*
|
|
7052
|
+
* Read one content with the settings that decide its playback: the source it publishes, its access settings, its player settings, its description, and the version numbers publish and versions calls need. Use it to see the status and readiness before publishing, or to read the live_version a playback will play. A content of another organization, and an archived or unknown id, all answer 404 CONTENT_NOT_FOUND.
|
|
7053
|
+
*/
|
|
7054
|
+
export const contentGetContent = (options) => (options.client ?? client).get({
|
|
7055
|
+
security: [{
|
|
7056
|
+
key: 'BearerAuth',
|
|
7057
|
+
scheme: 'bearer',
|
|
7058
|
+
type: 'http'
|
|
7059
|
+
}, {
|
|
7060
|
+
key: 'ApiKeyAuth',
|
|
7061
|
+
name: 'X-API-Key',
|
|
7062
|
+
type: 'apiKey'
|
|
7063
|
+
}],
|
|
7064
|
+
url: '/content/v1/contents/{content_id}',
|
|
7065
|
+
...options
|
|
7066
|
+
});
|
|
7067
|
+
/**
|
|
7068
|
+
* Update a content
|
|
7069
|
+
*
|
|
7070
|
+
* Change a content's title, its settings, or both. Send only what changes: each settings group left out keeps its current value, and a group sent is a deep merge, so changing only access.capability_seconds leaves allowed_origins alone. A settings change makes a new version and never touches the live one, except access settings (capability_seconds, encryption, allowed_origins), which a playback reads from the latest version and so take effect at once with no republish (ADR-145 §4). A title-only change makes no version. Changing source (library_id, asset_id, asset_version, library_id, asset_id or renditions) asks Media to transcode again and needs a republish to play. An archived content is final and answers 409 CONTENT_INVALID_STATE.
|
|
7071
|
+
*/
|
|
7072
|
+
export const contentUpdateContent = (options) => (options.client ?? client).patch({
|
|
7073
|
+
security: [{
|
|
7074
|
+
key: 'BearerAuth',
|
|
7075
|
+
scheme: 'bearer',
|
|
7076
|
+
type: 'http'
|
|
7077
|
+
}, {
|
|
7078
|
+
key: 'ApiKeyAuth',
|
|
7079
|
+
name: 'X-API-Key',
|
|
7080
|
+
type: 'apiKey'
|
|
7081
|
+
}],
|
|
7082
|
+
url: '/content/v1/contents/{content_id}',
|
|
7083
|
+
...options,
|
|
7084
|
+
headers: {
|
|
7085
|
+
'Content-Type': 'application/json',
|
|
7086
|
+
...options.headers
|
|
7087
|
+
}
|
|
7088
|
+
});
|
|
7089
|
+
/**
|
|
7090
|
+
* Publish a content
|
|
7091
|
+
*
|
|
7092
|
+
* Make a content playable: publish the latest version, or pin the version you send in version to become the live one. Use it after the content's readiness is ready; publishing a version whose renditions are still transcoding answers 409 SOURCE_NOT_READY, and you retry once Media reports ready. A content that is already published can be published again with another version, which swaps the live one; an archived content answers 409 CONTENT_INVALID_STATE. Returns the content with status published and the new live_version. Only a published content opens a playback session.
|
|
7093
|
+
*/
|
|
7094
|
+
export const contentPublishContent = (options) => (options.client ?? client).post({
|
|
7095
|
+
security: [{
|
|
7096
|
+
key: 'BearerAuth',
|
|
7097
|
+
scheme: 'bearer',
|
|
7098
|
+
type: 'http'
|
|
7099
|
+
}, {
|
|
7100
|
+
key: 'ApiKeyAuth',
|
|
7101
|
+
name: 'X-API-Key',
|
|
7102
|
+
type: 'apiKey'
|
|
7103
|
+
}],
|
|
7104
|
+
url: '/content/v1/contents/{content_id}/publish',
|
|
7105
|
+
...options,
|
|
7106
|
+
headers: {
|
|
7107
|
+
'Content-Type': 'application/json',
|
|
7108
|
+
...options.headers
|
|
7109
|
+
}
|
|
7110
|
+
});
|
|
7111
|
+
/**
|
|
7112
|
+
* Unpublish a content
|
|
7113
|
+
*
|
|
7114
|
+
* Take a published content offline without deleting it or losing a version. No playback opens on it afterwards, while capabilities already issued run out by themselves within their lifetime (at most 3000 seconds). Publishing it again with a version brings it back. Only a published content can be unpublished; any other state answers 409 CONTENT_INVALID_STATE. Returns the content with status unpublished and its live_version kept for the next publish.
|
|
7115
|
+
*/
|
|
7116
|
+
export const contentUnpublishContent = (options) => (options.client ?? client).post({
|
|
7117
|
+
security: [{
|
|
7118
|
+
key: 'BearerAuth',
|
|
7119
|
+
scheme: 'bearer',
|
|
7120
|
+
type: 'http'
|
|
7121
|
+
}, {
|
|
7122
|
+
key: 'ApiKeyAuth',
|
|
7123
|
+
name: 'X-API-Key',
|
|
7124
|
+
type: 'apiKey'
|
|
7125
|
+
}],
|
|
7126
|
+
url: '/content/v1/contents/{content_id}/unpublish',
|
|
7127
|
+
...options
|
|
7128
|
+
});
|
|
7129
|
+
/**
|
|
7130
|
+
* Archive a content
|
|
7131
|
+
*
|
|
7132
|
+
* Close a content permanently when it is no longer published. A published content must be unpublished first, because a live content is never archived directly; archiving a published content answers 409 CONTENT_INVALID_STATE. An archived content is final: it cannot be republished, edited or archived again, it stays out of the list unless status is archived, and no playback opens on it. Returns the content with status archived and archive_time set.
|
|
7133
|
+
*/
|
|
7134
|
+
export const contentArchiveContent = (options) => (options.client ?? client).post({
|
|
7135
|
+
security: [{
|
|
7136
|
+
key: 'BearerAuth',
|
|
7137
|
+
scheme: 'bearer',
|
|
7138
|
+
type: 'http'
|
|
7139
|
+
}, {
|
|
7140
|
+
key: 'ApiKeyAuth',
|
|
7141
|
+
name: 'X-API-Key',
|
|
7142
|
+
type: 'apiKey'
|
|
7143
|
+
}],
|
|
7144
|
+
url: '/content/v1/contents/{content_id}/archive',
|
|
7145
|
+
...options
|
|
7146
|
+
});
|
|
7147
|
+
/**
|
|
7148
|
+
* List versions
|
|
7149
|
+
*
|
|
7150
|
+
* Read the immutable version history of a content, newest version first. Each entry is a snapshot of the settings at the time it was saved, with live telling whether that version is the one a playback plays. Use it to find the version number to pin in publish, or to read the access settings a playback is currently reading (they come from the latest version). page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null.
|
|
7151
|
+
*/
|
|
7152
|
+
export const contentListVersions = (options) => (options.client ?? client).get({
|
|
7153
|
+
security: [{
|
|
7154
|
+
key: 'BearerAuth',
|
|
7155
|
+
scheme: 'bearer',
|
|
7156
|
+
type: 'http'
|
|
7157
|
+
}, {
|
|
7158
|
+
key: 'ApiKeyAuth',
|
|
7159
|
+
name: 'X-API-Key',
|
|
7160
|
+
type: 'apiKey'
|
|
7161
|
+
}],
|
|
7162
|
+
url: '/content/v1/contents/{content_id}/versions',
|
|
7163
|
+
...options
|
|
7164
|
+
});
|
|
7165
|
+
/**
|
|
7166
|
+
* Get a version
|
|
7167
|
+
*
|
|
7168
|
+
* Read one immutable version of a content: the settings exactly as they were saved, the live flag, when it was created and which actor created it. Use it to compare a version with the live one before pinning it in publish, or to check the access settings a playback is currently reading. The version segment is the positive version number from the versions list; an unknown number answers 404 VERSION_NOT_FOUND and an unknown content 404 CONTENT_NOT_FOUND.
|
|
7169
|
+
*/
|
|
7170
|
+
export const contentGetVersion = (options) => (options.client ?? client).get({
|
|
7171
|
+
security: [{
|
|
7172
|
+
key: 'BearerAuth',
|
|
7173
|
+
scheme: 'bearer',
|
|
7174
|
+
type: 'http'
|
|
7175
|
+
}, {
|
|
7176
|
+
key: 'ApiKeyAuth',
|
|
7177
|
+
name: 'X-API-Key',
|
|
7178
|
+
type: 'apiKey'
|
|
7179
|
+
}],
|
|
7180
|
+
url: '/content/v1/contents/{content_id}/versions/{version}',
|
|
7181
|
+
...options
|
|
7182
|
+
});
|
|
7183
|
+
/**
|
|
7184
|
+
* Open a playback session
|
|
7185
|
+
*
|
|
7186
|
+
* Open one playback of a published content for an end user and get the manifest address a player loads. No platform API key is needed: the caller is the end user's own Praxis customer access token carried as `Authorization: Bearer <access_token>`, verified by this door exactly as the customer exchange verifies it. A caller with no token is left to the service, which refuses it RESOURCE_NOT_GRANTED, because a content is always signed and there is no public playback. The organization is taken from the content row, never from the token, and a token that claims another organization is refused. The content must be published (otherwise 403 CONTENT_NOT_PUBLISHED), its allowed_origins must accept the request Origin when the list is not empty (otherwise 403 ORIGIN_NOT_ALLOWED), the token must cover a resource for this content (otherwise 403 RESOURCE_NOT_GRANTED) and the pinned version must be ready (otherwise 409 SOURCE_NOT_READY; retry once readiness is ready). Returns HTTP 201 with the session id, manifest_url (https://content.praxisusercontent.com/{content_id}/{capability}/master.m3u8), expire_time, the renditions, the poster, the title when the player shows it, and the player settings. The playback reads access settings from the content's latest version and source and player from the live version, so a tightened origin or lifetime takes effect without a republish. This door has its own per-IP request budget: over it answers 429 RATE_LIMITED with Retry-After.
|
|
7187
|
+
*/
|
|
7188
|
+
export const contentCreatePlaybackSession = (options) => (options.client ?? client).post({
|
|
7189
|
+
url: '/content/v1/playback/sessions',
|
|
7190
|
+
...options,
|
|
7191
|
+
headers: {
|
|
7192
|
+
'Content-Type': 'application/json',
|
|
7193
|
+
...options.headers
|
|
7194
|
+
}
|
|
7195
|
+
});
|
|
6969
7196
|
/**
|
|
6970
7197
|
* List records
|
|
6971
7198
|
*
|
|
@@ -7557,11 +7784,11 @@ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
|
7557
7784
|
}
|
|
7558
7785
|
});
|
|
7559
7786
|
/**
|
|
7560
|
-
*
|
|
7787
|
+
* Create a grant code
|
|
7561
7788
|
*
|
|
7562
|
-
*
|
|
7789
|
+
* Sign one of your logged-in end users in from your backend, after your own login succeeded, by handing out a one-time grant code that the browser exchanges for an access token. Call it with the organization API key; never from the browser, because the API key must stay on your server. customer_id is your own identifier for the person (an opaque value such as your database user id, not an email address or phone number); a value starting with anon_ is reserved for anonymous visitors. resources name what the sign-in may reach and is required: each entry is a scope string in the form agent:<id>:chat, content:<id>:play or application:<id>:visit, or an object with that scope plus product params this service stores without interpreting; use the id form for one object and * for every object of a type. expires_in shortens the code's life in seconds (900 seconds, fifteen minutes, by default) and max_session_seconds shortens the sign-in's life (7 days by default); merge_customer_id merges an anonymous visitor's record into this person; origin pins the page the sign-in may be made from. The code is single use and unknown, used or expired codes all answer 401 GRANT_CODE_INVALID at the exchange. Returns the code with HTTP 201; pass it to the Kit in the browser and never call this route with it.
|
|
7563
7790
|
*/
|
|
7564
|
-
export const
|
|
7791
|
+
export const customerCreateGrantCode = (options) => (options.client ?? client).post({
|
|
7565
7792
|
security: [{
|
|
7566
7793
|
key: 'BearerAuth',
|
|
7567
7794
|
scheme: 'bearer',
|
|
@@ -7571,15 +7798,62 @@ export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
|
7571
7798
|
name: 'X-API-Key',
|
|
7572
7799
|
type: 'apiKey'
|
|
7573
7800
|
}],
|
|
7574
|
-
url: '/
|
|
7801
|
+
url: '/customer/v1/grant_codes',
|
|
7802
|
+
...options,
|
|
7803
|
+
headers: {
|
|
7804
|
+
'Content-Type': 'application/json',
|
|
7805
|
+
...options.headers
|
|
7806
|
+
}
|
|
7807
|
+
});
|
|
7808
|
+
/**
|
|
7809
|
+
* Exchange a grant code or publishable key
|
|
7810
|
+
*
|
|
7811
|
+
* Turn a grant code, or a publishable key for an anonymous visitor, into the Praxis customer access token that authorizes the Kit's sessions and playbacks. It is PRE-AUTH: no platform API key is needed, because the grant code or the publishable key is the credential; the Kit calls it from the browser, so send the page Origin when the code or key is bound to one. Send exactly one of grant_code or publishable_key — the door refuses any other combination with 400. With grant_code the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, already used, expired and foreign codes all answer 401 GRANT_CODE_INVALID. With publishable_key a new anonymous customer (anon_…) is created and merged into the identified one later if it signs in. The sign-in may be bound to an origin at creation; when the request Origin does not satisfy it, the exchange answers 403 ORIGIN_NOT_ALLOWED, and a blocked end user answers 403 CUSTOMER_BLOCKED. The access token lasts at most two hours and never outlives the sign-in; renew it with praxis.customer.accessTokens.renew before expires_at. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
|
|
7812
|
+
*/
|
|
7813
|
+
export const customerCreateAccessToken = (options) => (options.client ?? client).post({
|
|
7814
|
+
url: '/customer/v1/access_tokens',
|
|
7815
|
+
...options,
|
|
7816
|
+
headers: {
|
|
7817
|
+
'Content-Type': 'application/json',
|
|
7818
|
+
...options.headers
|
|
7819
|
+
}
|
|
7820
|
+
});
|
|
7821
|
+
/**
|
|
7822
|
+
* Renew an access token
|
|
7823
|
+
*
|
|
7824
|
+
* Replace a live access token with a fresh one so a signed-in end user stays signed in without signing in again. It is PRE-AUTH: the credential is the token the caller already carries as `Authorization: Bearer <access_token>`, verified by this door, and the token names the sign-in it renews. Call it before the token's expires_at; the sign-in and its resource scopes stay the same, so what the end user may reach does not change. A missing, unverifiable or foreign token answers 401 ACCESS_TOKEN_EXPIRED, and a sign-in that is over answers 401 SIGN_IN_EXPIRED or SIGN_IN_REVOKED, in which case the end user signs in again through praxis.customer.accessTokens.create. A blocked end user answers 403 CUSTOMER_BLOCKED. When the sign-in itself has ended, the renewal does not extend it. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
|
|
7825
|
+
*/
|
|
7826
|
+
export const customerRenewAccessToken = (options) => (options?.client ?? client).post({ url: '/customer/v1/access_tokens/renew', ...options });
|
|
7827
|
+
/**
|
|
7828
|
+
* Sign out the current token
|
|
7829
|
+
*
|
|
7830
|
+
* Sign out: end the sign-in the caller's token belongs to and revoke every token issued from it, exactly as a logout does. It is PRE-AUTH: the credential is the token the caller carries as `Authorization: Bearer <access_token>`. Use it when the end user asks to sign out, and after it every token of that sign-in stops working and a later session or playback answers 401 SIGN_IN_REVOKED; other sign-ins of the same end user are untouched (revoke every token of one end user, organization-wide, with praxis.customer.customers.revokeTokens). A missing or unverifiable token answers 401 ACCESS_TOKEN_EXPIRED. The call answers 200 with an empty body. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
|
|
7831
|
+
*/
|
|
7832
|
+
export const customerRevokeCurrentTokens = (options) => (options?.client ?? client).delete({ url: '/customer/v1/access_tokens/current', ...options });
|
|
7833
|
+
/**
|
|
7834
|
+
* List end users
|
|
7835
|
+
*
|
|
7836
|
+
* Read the organization's end-user directory and obtain the customer_id the administrative acts take. Results are ordered by last_seen_at, most recently seen first. Filter with type (identified for people who signed in through a grant code, anonymous for visitors admitted with a publishable key), blocked (true or false), resource (one product in the form agent:<id>, content:<id> or application:<id>, giving that product's own view of the directory) and q (a prefix of the customer id). Identified and anonymous end users both appear; an anonymous one that later signs in shows merged_into and its record joins that person. page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null, keeping the same filters.
|
|
7837
|
+
*/
|
|
7838
|
+
export const customerListCustomers = (options) => (options?.client ?? client).get({
|
|
7839
|
+
security: [{
|
|
7840
|
+
key: 'BearerAuth',
|
|
7841
|
+
scheme: 'bearer',
|
|
7842
|
+
type: 'http'
|
|
7843
|
+
}, {
|
|
7844
|
+
key: 'ApiKeyAuth',
|
|
7845
|
+
name: 'X-API-Key',
|
|
7846
|
+
type: 'apiKey'
|
|
7847
|
+
}],
|
|
7848
|
+
url: '/customer/v1/customers',
|
|
7575
7849
|
...options
|
|
7576
7850
|
});
|
|
7577
7851
|
/**
|
|
7578
|
-
*
|
|
7852
|
+
* Delete an end user
|
|
7579
7853
|
*
|
|
7580
|
-
*
|
|
7854
|
+
* Delete one end user on the merchant's own confirmation, for a deletion request the person made to you. The confirm query parameter must repeat the path's customer_id; the door passes it through verbatim and the service refuses any other value with 400 INVALID_PARAMS, so a missing confirm never deletes anything. The deletion is announced on the platform event bus and each product deletes its own sessions, events and files for that person, so the call returns as soon as the directory record is gone, not when every product has finished. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
|
|
7581
7855
|
*/
|
|
7582
|
-
export const
|
|
7856
|
+
export const customerDeleteCustomer = (options) => (options.client ?? client).delete({
|
|
7583
7857
|
security: [{
|
|
7584
7858
|
key: 'BearerAuth',
|
|
7585
7859
|
scheme: 'bearer',
|
|
@@ -7589,19 +7863,15 @@ export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
|
7589
7863
|
name: 'X-API-Key',
|
|
7590
7864
|
type: 'apiKey'
|
|
7591
7865
|
}],
|
|
7592
|
-
url: '/
|
|
7593
|
-
...options
|
|
7594
|
-
headers: {
|
|
7595
|
-
'Content-Type': 'application/json',
|
|
7596
|
-
...options.headers
|
|
7597
|
-
}
|
|
7866
|
+
url: '/customer/v1/customers/{customer_id}',
|
|
7867
|
+
...options
|
|
7598
7868
|
});
|
|
7599
7869
|
/**
|
|
7600
|
-
*
|
|
7870
|
+
* Get an end user
|
|
7601
7871
|
*
|
|
7602
|
-
*
|
|
7872
|
+
* Read one end user of the organization: the id, its kind, whether it is blocked, its metadata and when it was first and last seen. Add expand=products,sign_ins,usage (comma separated, any combination) to also receive the products it has used with their counts, its sign-ins with their resource scopes, and its recorded usage over the whole time. An unknown id, and an id of another organization, answer 404 CUSTOMER_NOT_FOUND.
|
|
7603
7873
|
*/
|
|
7604
|
-
export const
|
|
7874
|
+
export const customerGetCustomer = (options) => (options.client ?? client).get({
|
|
7605
7875
|
security: [{
|
|
7606
7876
|
key: 'BearerAuth',
|
|
7607
7877
|
scheme: 'bearer',
|
|
@@ -7611,15 +7881,15 @@ export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
|
7611
7881
|
name: 'X-API-Key',
|
|
7612
7882
|
type: 'apiKey'
|
|
7613
7883
|
}],
|
|
7614
|
-
url: '/
|
|
7884
|
+
url: '/customer/v1/customers/{customer_id}',
|
|
7615
7885
|
...options
|
|
7616
7886
|
});
|
|
7617
7887
|
/**
|
|
7618
|
-
*
|
|
7888
|
+
* Read end-user usage
|
|
7619
7889
|
*
|
|
7620
|
-
*
|
|
7890
|
+
* Read what one end user has cost the organization, per product and per day. The directory stores no cost itself: this reads billing by the customerId dimension shared by every product, so it is the money figure the platform charged for that person. Send from and/or to as RFC 3339 times to narrow the window; omit both for everything recorded. Returns the total, the per-product breakdown and the per-day breakdown. An unknown id answers 404 CUSTOMER_NOT_FOUND.
|
|
7621
7891
|
*/
|
|
7622
|
-
export const
|
|
7892
|
+
export const customerGetUsage = (options) => (options.client ?? client).get({
|
|
7623
7893
|
security: [{
|
|
7624
7894
|
key: 'BearerAuth',
|
|
7625
7895
|
scheme: 'bearer',
|
|
@@ -7629,15 +7899,15 @@ export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
|
7629
7899
|
name: 'X-API-Key',
|
|
7630
7900
|
type: 'apiKey'
|
|
7631
7901
|
}],
|
|
7632
|
-
url: '/
|
|
7902
|
+
url: '/customer/v1/customers/{customer_id}/usage',
|
|
7633
7903
|
...options
|
|
7634
7904
|
});
|
|
7635
7905
|
/**
|
|
7636
|
-
*
|
|
7906
|
+
* Block an end user
|
|
7637
7907
|
*
|
|
7638
|
-
*
|
|
7908
|
+
* Block one end user across every product of the organization. From then on no grant code, sign-in, renewal or new session and no playback is accepted for this id — each product's admission door refuses it at once. A stream already running and a playback capability already issued ride out their own token, at most two hours and 3000 seconds; they are not cut off. Send reason to record why, and the response's blocked field carries the block time, the reason and the actor. Blocking an already blocked end user is idempotent: the first block time is kept. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
|
|
7639
7909
|
*/
|
|
7640
|
-
export const
|
|
7910
|
+
export const customerBlockCustomer = (options) => (options.client ?? client).post({
|
|
7641
7911
|
security: [{
|
|
7642
7912
|
key: 'BearerAuth',
|
|
7643
7913
|
scheme: 'bearer',
|
|
@@ -7647,7 +7917,7 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
|
7647
7917
|
name: 'X-API-Key',
|
|
7648
7918
|
type: 'apiKey'
|
|
7649
7919
|
}],
|
|
7650
|
-
url: '/
|
|
7920
|
+
url: '/customer/v1/customers/{customer_id}/block',
|
|
7651
7921
|
...options,
|
|
7652
7922
|
headers: {
|
|
7653
7923
|
'Content-Type': 'application/json',
|
|
@@ -7655,11 +7925,11 @@ export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
|
7655
7925
|
}
|
|
7656
7926
|
});
|
|
7657
7927
|
/**
|
|
7658
|
-
*
|
|
7928
|
+
* Unblock an end user
|
|
7659
7929
|
*
|
|
7660
|
-
*
|
|
7930
|
+
* Lift a block from one end user, so the products accept its grant codes, sign-ins, renewals and new sessions again. Tokens that were revoked to enforce the block are not restored: the end user signs in again for a fresh sign-in. Unblocking an end user that is not blocked is idempotent and returns it unchanged. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
|
|
7661
7931
|
*/
|
|
7662
|
-
export const
|
|
7932
|
+
export const customerUnblockCustomer = (options) => (options.client ?? client).post({
|
|
7663
7933
|
security: [{
|
|
7664
7934
|
key: 'BearerAuth',
|
|
7665
7935
|
scheme: 'bearer',
|
|
@@ -7669,25 +7939,217 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7669
7939
|
name: 'X-API-Key',
|
|
7670
7940
|
type: 'apiKey'
|
|
7671
7941
|
}],
|
|
7672
|
-
url: '/
|
|
7942
|
+
url: '/customer/v1/customers/{customer_id}/unblock',
|
|
7673
7943
|
...options
|
|
7674
7944
|
});
|
|
7675
7945
|
/**
|
|
7676
|
-
*
|
|
7677
|
-
*
|
|
7678
|
-
*
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7946
|
+
* Revoke every token of an end user
|
|
7947
|
+
*
|
|
7948
|
+
* End every sign-in of one end user at once, everything of the organization's, not one product's and not one token's. Use it when credentials may have leaked and the end user must not be trusted until it signs in again; a single sign-in is ended instead with praxis.customer.accessTokens.revoke. After it every token of that end user stops working and a new session or playback answers 401 SIGN_IN_REVOKED, while the end user itself stays in the directory and may sign in again. The response counts how many sign-ins were revoked. An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
|
|
7949
|
+
*/
|
|
7950
|
+
export const customerRevokeTokens = (options) => (options.client ?? client).post({
|
|
7951
|
+
security: [{
|
|
7952
|
+
key: 'BearerAuth',
|
|
7953
|
+
scheme: 'bearer',
|
|
7954
|
+
type: 'http'
|
|
7955
|
+
}, {
|
|
7956
|
+
key: 'ApiKeyAuth',
|
|
7957
|
+
name: 'X-API-Key',
|
|
7958
|
+
type: 'apiKey'
|
|
7959
|
+
}],
|
|
7960
|
+
url: '/customer/v1/customers/{customer_id}/revoke_tokens',
|
|
7961
|
+
...options
|
|
7962
|
+
});
|
|
7963
|
+
/**
|
|
7964
|
+
* List publishable keys
|
|
7965
|
+
*
|
|
7966
|
+
* List the organization's publishable keys, newest first, so you can see which anonymous admittance is open and what each one may reach. A publishable key is public by design (it ships in the browser page); use it from the Kit to admit anonymous visitors, and never expose an API key this way. The plaintext value is not in this list: it is returned once, by the create call, and only its hash is stored. page_size is 1 to 100 and defaults to 50; copy next_page into page_token until it is null.
|
|
7967
|
+
*/
|
|
7968
|
+
export const customerListPublishableKeys = (options) => (options?.client ?? client).get({
|
|
7969
|
+
security: [{
|
|
7970
|
+
key: 'BearerAuth',
|
|
7971
|
+
scheme: 'bearer',
|
|
7972
|
+
type: 'http'
|
|
7973
|
+
}, {
|
|
7974
|
+
key: 'ApiKeyAuth',
|
|
7975
|
+
name: 'X-API-Key',
|
|
7976
|
+
type: 'apiKey'
|
|
7977
|
+
}],
|
|
7978
|
+
url: '/customer/v1/publishable_keys',
|
|
7979
|
+
...options
|
|
7980
|
+
});
|
|
7981
|
+
/**
|
|
7982
|
+
* Create a publishable key
|
|
7983
|
+
*
|
|
7984
|
+
* Mint a publishable key so a page can admit anonymous visitors without you signing each one in from your backend. name labels the key for the console and the key list. resources is required and names what an anonymous visitor may reach, in the same form as the grant-code scopes: agent:<id>:chat, content:<id>:play or application:<id>:visit, with * for every object of one type; give it only what the anonymous experience needs, because any visitor who has the page can use the key. The response carries the plaintext key once, in key, and the store keeps only its hash — save it then, because no later call returns it. Returns HTTP 201; the exchange that consumes it is praxis.customer.accessTokens.create with publishable_key.
|
|
7985
|
+
*/
|
|
7986
|
+
export const customerCreatePublishableKey = (options) => (options.client ?? client).post({
|
|
7987
|
+
security: [{
|
|
7988
|
+
key: 'BearerAuth',
|
|
7989
|
+
scheme: 'bearer',
|
|
7990
|
+
type: 'http'
|
|
7991
|
+
}, {
|
|
7992
|
+
key: 'ApiKeyAuth',
|
|
7993
|
+
name: 'X-API-Key',
|
|
7994
|
+
type: 'apiKey'
|
|
7995
|
+
}],
|
|
7996
|
+
url: '/customer/v1/publishable_keys',
|
|
7997
|
+
...options,
|
|
7998
|
+
headers: {
|
|
7999
|
+
'Content-Type': 'application/json',
|
|
8000
|
+
...options.headers
|
|
8001
|
+
}
|
|
8002
|
+
});
|
|
8003
|
+
/**
|
|
8004
|
+
* Delete a publishable key
|
|
8005
|
+
*
|
|
8006
|
+
* Delete a publishable key, closing that anonymous admittance for good. A page that still carries the plaintext key can no longer exchange it; any anonymous sign-ins it already made keep working until their own sign-in expires, so end users already admitted are not signed out by this call. Get the key id from the publishable key list, not from the plaintext value (only its hash is stored). An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
|
|
8007
|
+
*/
|
|
8008
|
+
export const customerDeletePublishableKey = (options) => (options.client ?? client).delete({
|
|
8009
|
+
security: [{
|
|
8010
|
+
key: 'BearerAuth',
|
|
8011
|
+
scheme: 'bearer',
|
|
8012
|
+
type: 'http'
|
|
8013
|
+
}, {
|
|
8014
|
+
key: 'ApiKeyAuth',
|
|
8015
|
+
name: 'X-API-Key',
|
|
8016
|
+
type: 'apiKey'
|
|
8017
|
+
}],
|
|
8018
|
+
url: '/customer/v1/publishable_keys/{key_id}',
|
|
8019
|
+
...options
|
|
8020
|
+
});
|
|
8021
|
+
/**
|
|
8022
|
+
* List projects
|
|
8023
|
+
*
|
|
8024
|
+
* Discover projects owned by the API key organization and obtain project_id values. Results default to active projects ordered by updateTime descending; use filter state = "deleted" to find retained deleted projects for undelete. Continue with next_page_token as page_token until the token is absent.
|
|
8025
|
+
*/
|
|
8026
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
8027
|
+
security: [{
|
|
8028
|
+
key: 'BearerAuth',
|
|
8029
|
+
scheme: 'bearer',
|
|
8030
|
+
type: 'http'
|
|
8031
|
+
}, {
|
|
8032
|
+
key: 'ApiKeyAuth',
|
|
8033
|
+
name: 'X-API-Key',
|
|
8034
|
+
type: 'apiKey'
|
|
8035
|
+
}],
|
|
8036
|
+
url: '/cut/v1/projects',
|
|
8037
|
+
...options
|
|
8038
|
+
});
|
|
8039
|
+
/**
|
|
8040
|
+
* Create project
|
|
8041
|
+
*
|
|
8042
|
+
* Create a blank editing project in the API key organization before writing a script. First obtain accessible library ids from praxis.media; bindings must include exactly one read_write library with default_upload true. Each call creates a new project and returns HTTP 201; save its id for execute, state and timeline calls. All editing positions use seconds.
|
|
8043
|
+
*/
|
|
8044
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
8045
|
+
security: [{
|
|
8046
|
+
key: 'BearerAuth',
|
|
8047
|
+
scheme: 'bearer',
|
|
8048
|
+
type: 'http'
|
|
8049
|
+
}, {
|
|
8050
|
+
key: 'ApiKeyAuth',
|
|
8051
|
+
name: 'X-API-Key',
|
|
8052
|
+
type: 'apiKey'
|
|
8053
|
+
}],
|
|
8054
|
+
url: '/cut/v1/projects',
|
|
8055
|
+
...options,
|
|
8056
|
+
headers: {
|
|
8057
|
+
'Content-Type': 'application/json',
|
|
8058
|
+
...options.headers
|
|
8059
|
+
}
|
|
8060
|
+
});
|
|
8061
|
+
/**
|
|
8062
|
+
* Delete project
|
|
8063
|
+
*
|
|
8064
|
+
* Soft-delete a project selected from projects.list. The project is retained for seven days until purge_time and can be restored with undelete before that deadline. Deleted projects cannot be edited; list with filter state = "deleted" to locate retained projects.
|
|
8065
|
+
*/
|
|
8066
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
8067
|
+
security: [{
|
|
8068
|
+
key: 'BearerAuth',
|
|
8069
|
+
scheme: 'bearer',
|
|
8070
|
+
type: 'http'
|
|
8071
|
+
}, {
|
|
8072
|
+
key: 'ApiKeyAuth',
|
|
8073
|
+
name: 'X-API-Key',
|
|
8074
|
+
type: 'apiKey'
|
|
8075
|
+
}],
|
|
8076
|
+
url: '/cut/v1/projects/{project_id}',
|
|
8077
|
+
...options
|
|
8078
|
+
});
|
|
8079
|
+
/**
|
|
8080
|
+
* Retrieve project
|
|
8081
|
+
*
|
|
8082
|
+
* Inspect project metadata, settings and library bindings before editing. Copy id from projects.create or list; expand=timeline,exports,versions includes selected related resources. The expanded timeline uses seconds and the returned revision can guard a later execute call with expected_revision.
|
|
8083
|
+
*/
|
|
8084
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
8085
|
+
security: [{
|
|
8086
|
+
key: 'BearerAuth',
|
|
8087
|
+
scheme: 'bearer',
|
|
8088
|
+
type: 'http'
|
|
8089
|
+
}, {
|
|
8090
|
+
key: 'ApiKeyAuth',
|
|
8091
|
+
name: 'X-API-Key',
|
|
8092
|
+
type: 'apiKey'
|
|
8093
|
+
}],
|
|
8094
|
+
url: '/cut/v1/projects/{project_id}',
|
|
8095
|
+
...options
|
|
8096
|
+
});
|
|
8097
|
+
/**
|
|
8098
|
+
* Update project metadata
|
|
8099
|
+
*
|
|
8100
|
+
* Change the project display name or replace its labels by naming those fields in update_mask. Use execute for clip or track edits. Each successful update commits a new revision; labels are replaced as a whole when selected, so read and merge existing labels before overwriting them.
|
|
8101
|
+
*/
|
|
8102
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
8103
|
+
security: [{
|
|
8104
|
+
key: 'BearerAuth',
|
|
8105
|
+
scheme: 'bearer',
|
|
8106
|
+
type: 'http'
|
|
8107
|
+
}, {
|
|
8108
|
+
key: 'ApiKeyAuth',
|
|
8109
|
+
name: 'X-API-Key',
|
|
8110
|
+
type: 'apiKey'
|
|
8111
|
+
}],
|
|
8112
|
+
url: '/cut/v1/projects/{project_id}',
|
|
8113
|
+
...options,
|
|
8114
|
+
headers: {
|
|
8115
|
+
'Content-Type': 'application/json',
|
|
8116
|
+
...options.headers
|
|
8117
|
+
}
|
|
8118
|
+
});
|
|
8119
|
+
/**
|
|
8120
|
+
* Restore deleted project
|
|
8121
|
+
*
|
|
8122
|
+
* Return a retained deleted project to active state before its purge_time. Obtain project_id from projects.list filtered to deleted projects. This restores the project, not an older timeline revision; use versions.restore when reverting editing content.
|
|
8123
|
+
*/
|
|
8124
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
8125
|
+
security: [{
|
|
8126
|
+
key: 'BearerAuth',
|
|
8127
|
+
scheme: 'bearer',
|
|
8128
|
+
type: 'http'
|
|
8129
|
+
}, {
|
|
8130
|
+
key: 'ApiKeyAuth',
|
|
8131
|
+
name: 'X-API-Key',
|
|
8132
|
+
type: 'apiKey'
|
|
8133
|
+
}],
|
|
8134
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
8135
|
+
...options
|
|
8136
|
+
});
|
|
8137
|
+
/**
|
|
8138
|
+
* Execute editing script
|
|
8139
|
+
*
|
|
8140
|
+
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`
|
|
8141
|
+
*
|
|
8142
|
+
* <!-- cut-reference:start -->
|
|
8143
|
+
* ### Script function, field and error reference
|
|
8144
|
+
*
|
|
8145
|
+
* Every script function, clip field and error code has its own section, read one at a time:
|
|
7684
8146
|
*
|
|
7685
8147
|
* ```
|
|
7686
|
-
* codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
|
|
7687
|
-
* codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
|
|
7688
|
-
* codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
|
|
7689
|
-
* codemode.describe("praxis.cut.script") // names, one page at a time
|
|
7690
|
-
* ```
|
|
8148
|
+
* codemode.describe("praxis.cut.script.<Name>") // one function: signature, arguments, return, errors, example
|
|
8149
|
+
* codemode.describe("praxis.cut.fields.<name>") // one field: type, unit, range, default, where writable
|
|
8150
|
+
* codemode.describe("praxis.cut.errors.<CODE>") // one code: meaning, causes, fix
|
|
8151
|
+
* codemode.describe("praxis.cut.script") // names, one page at a time
|
|
8152
|
+
* ```
|
|
7691
8153
|
*
|
|
7692
8154
|
* Published at https://docs.deepraxis.com/docs/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
|
|
7693
8155
|
*
|
|
@@ -8807,6 +9269,20 @@ export const devopsTestReportsUpload = (options) => (options.client ?? client).p
|
|
|
8807
9269
|
...options.headers
|
|
8808
9270
|
}
|
|
8809
9271
|
});
|
|
9272
|
+
/**
|
|
9273
|
+
* Retrieve the merge gate's test plan at a commit
|
|
9274
|
+
*
|
|
9275
|
+
* Ask what the merge gate would require at one commit before running anything: the packages the base...commit diff affects, each package's input hash at that commit's own tree, and whether evidence already answers it. Read a package as passed when a recorded run covered every case the package has at the gate's sizes and they passed, failed when the newest evidence at its input hash failed, and missing when no run has a row for that (package, input hash). Use it before running tests — `praxis devops test --gate` asks this and runs exactly the missing and failed packages — or to explain a gate verdict, because it is the same required set and the same (package, input hash) lookup the gate itself decides on. The call is read-only: it starts no run, runs no case and writes nothing. The commit must already be pushed, since the hashes are recomputed from the tree GitHub holds; a commit whose tree cannot be read answers COMMIT_NOT_FOUND instead of an empty plan. A selection of nothing means every changed path belongs to no test package, which is a pass and not a failure.
|
|
9276
|
+
*/
|
|
9277
|
+
export const devopsTestPlanGet = (options) => (options.client ?? client).get({
|
|
9278
|
+
security: [{
|
|
9279
|
+
key: 'devops-bearerAuth',
|
|
9280
|
+
scheme: 'bearer',
|
|
9281
|
+
type: 'http'
|
|
9282
|
+
}],
|
|
9283
|
+
url: '/devops/v1/projects/{project}/test-plan',
|
|
9284
|
+
...options
|
|
9285
|
+
});
|
|
8810
9286
|
/**
|
|
8811
9287
|
* List projects
|
|
8812
9288
|
*
|
|
@@ -9533,6 +10009,24 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
9533
10009
|
...options.headers
|
|
9534
10010
|
}
|
|
9535
10011
|
});
|
|
10012
|
+
/**
|
|
10013
|
+
* Open a change's pull request
|
|
10014
|
+
*
|
|
10015
|
+
* 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. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
10016
|
+
*/
|
|
10017
|
+
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
10018
|
+
security: [{
|
|
10019
|
+
key: 'devops-bearerAuth',
|
|
10020
|
+
scheme: 'bearer',
|
|
10021
|
+
type: 'http'
|
|
10022
|
+
}],
|
|
10023
|
+
url: '/devops/v1/changes/{id}:openPullRequest',
|
|
10024
|
+
...options,
|
|
10025
|
+
headers: {
|
|
10026
|
+
'Content-Type': 'application/json',
|
|
10027
|
+
...options.headers
|
|
10028
|
+
}
|
|
10029
|
+
});
|
|
9536
10030
|
/**
|
|
9537
10031
|
* List a project's pull requests
|
|
9538
10032
|
*
|
|
@@ -11001,6 +11495,38 @@ export const mediaAlignAsset = (options) => (options.client ?? client).post({
|
|
|
11001
11495
|
...options.headers
|
|
11002
11496
|
}
|
|
11003
11497
|
});
|
|
11498
|
+
/**
|
|
11499
|
+
* Get HLS renditions
|
|
11500
|
+
*
|
|
11501
|
+
* Read how ready a video asset’s on-demand ladder is, rung by rung, without building anything. Use library_id and asset_id as everywhere else. The answer names the asset, its current version, the asset’s own facts (resource_type, is_audio and duration) and one entry per recorded rung — name, height, the first indexed piece’s width, the rung’s bitrate and stored bytes, and its state (processing while pieces run, ready when every piece is ready, failed when a piece gave up). A ladder that was never requested, and an asset that is not a video, answer an empty renditions rather than an error. This read mints no capability and signs nothing, so play the ladder through the content service, which issues the short-lived play address for the current version. Example: GET /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls.
|
|
11502
|
+
*/
|
|
11503
|
+
export const mediaGetHlsRenditions = (options) => (options.client ?? client).get({
|
|
11504
|
+
security: [{
|
|
11505
|
+
key: 'media-BearerAuth',
|
|
11506
|
+
scheme: 'bearer',
|
|
11507
|
+
type: 'http'
|
|
11508
|
+
}],
|
|
11509
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11510
|
+
...options
|
|
11511
|
+
});
|
|
11512
|
+
/**
|
|
11513
|
+
* Request HLS renditions
|
|
11514
|
+
*
|
|
11515
|
+
* Build a video asset’s adaptive HLS ladder for its current version, so one asset plays at several clarities on an ordinary player. Use library_id from creation or listing and the asset_id of a video asset; the ladder belongs to the version the asset has now, and a later version gets its own. heights names the rungs to build: a non-empty subset of 480, 720 and 1080 with no repeats, or omitted to build all three. The ladder never upscales — a rung above the source’s short side is dropped, and a list entirely above it keeps its lowest rung. The call is asynchronous and starts paid transcoding: the work runs as the video-transcode-hls model, one piece per rung per ten minutes of source, and it is charged per output minute at that model’s published price to the organization that owns the asset (ADR-146 §5) — a rung the source cannot carry, and a failed rung, are not charged. A source longer than eight hours (28800 seconds) is refused with SOURCE_TOO_LONG before anything is planned. Repeating the call is safe: a rung already processing, ready or failed is left as it is and is never encoded twice. The response is 202 with the asset_id, its current version and one entry per rung — name, height, width, bitrate, bytes and state, where processing means the rung is still being encoded, ready means it plays and failed means it gave up and can be retried by asking again. Poll GET /media/v1/libraries/{library_id}/assets/{asset_id}/hls until every rung is ready, then play the ladder through the content service, which mints the short-lived play address. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls with {"heights":[480,720,1080]}.
|
|
11516
|
+
*/
|
|
11517
|
+
export const mediaRequestHlsRenditions = (options) => (options.client ?? client).post({
|
|
11518
|
+
security: [{
|
|
11519
|
+
key: 'media-BearerAuth',
|
|
11520
|
+
scheme: 'bearer',
|
|
11521
|
+
type: 'http'
|
|
11522
|
+
}],
|
|
11523
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11524
|
+
...options,
|
|
11525
|
+
headers: {
|
|
11526
|
+
'Content-Type': 'application/json',
|
|
11527
|
+
...options.headers
|
|
11528
|
+
}
|
|
11529
|
+
});
|
|
11004
11530
|
/**
|
|
11005
11531
|
* List types
|
|
11006
11532
|
*
|
|
@@ -11243,6 +11769,284 @@ export const ontologySearch = (options) => (options.client ?? client).post({
|
|
|
11243
11769
|
...options.headers
|
|
11244
11770
|
}
|
|
11245
11771
|
});
|
|
11772
|
+
/**
|
|
11773
|
+
* List repositories
|
|
11774
|
+
*
|
|
11775
|
+
* 列出这个组织现有的库,默认库也在其中。库很少,一页通常装得下;用 next_cursor 翻页。先在这里拿到 repository_id,再用它列出或发布包。
|
|
11776
|
+
*/
|
|
11777
|
+
export const registryRepositoriesList = (options) => (options?.client ?? client).get({
|
|
11778
|
+
security: [{
|
|
11779
|
+
key: 'registry-bearerAuth',
|
|
11780
|
+
scheme: 'bearer',
|
|
11781
|
+
type: 'http'
|
|
11782
|
+
}],
|
|
11783
|
+
url: '/registry/v1/repositories',
|
|
11784
|
+
...options
|
|
11785
|
+
});
|
|
11786
|
+
/**
|
|
11787
|
+
* Create repository
|
|
11788
|
+
*
|
|
11789
|
+
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
|
|
11790
|
+
*/
|
|
11791
|
+
export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
|
|
11792
|
+
security: [{
|
|
11793
|
+
key: 'registry-bearerAuth',
|
|
11794
|
+
scheme: 'bearer',
|
|
11795
|
+
type: 'http'
|
|
11796
|
+
}],
|
|
11797
|
+
url: '/registry/v1/repositories',
|
|
11798
|
+
...options,
|
|
11799
|
+
headers: {
|
|
11800
|
+
'Content-Type': 'application/json',
|
|
11801
|
+
...options.headers
|
|
11802
|
+
}
|
|
11803
|
+
});
|
|
11804
|
+
/**
|
|
11805
|
+
* Delete repository
|
|
11806
|
+
*
|
|
11807
|
+
* 删一个空的库。默认库不能删(FAILED_PRECONDITION);库里还有包时也不能删,先把包删掉或改用别的库。删除请求重发会 404,所以删除前先读一次确认。
|
|
11808
|
+
*/
|
|
11809
|
+
export const registryRepositoriesDelete = (options) => (options.client ?? client).delete({
|
|
11810
|
+
security: [{
|
|
11811
|
+
key: 'registry-bearerAuth',
|
|
11812
|
+
scheme: 'bearer',
|
|
11813
|
+
type: 'http'
|
|
11814
|
+
}],
|
|
11815
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11816
|
+
...options
|
|
11817
|
+
});
|
|
11818
|
+
/**
|
|
11819
|
+
* Retrieve repository
|
|
11820
|
+
*
|
|
11821
|
+
* 读一个库的名称、说明、包数量和默认标记。repository_id 来自 repositories.list 或 repositories.create;另一个组织的库或不存在的库一律 404,不区分两者。
|
|
11822
|
+
*/
|
|
11823
|
+
export const registryRepositoriesRetrieve = (options) => (options.client ?? client).get({
|
|
11824
|
+
security: [{
|
|
11825
|
+
key: 'registry-bearerAuth',
|
|
11826
|
+
scheme: 'bearer',
|
|
11827
|
+
type: 'http'
|
|
11828
|
+
}],
|
|
11829
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11830
|
+
...options
|
|
11831
|
+
});
|
|
11832
|
+
/**
|
|
11833
|
+
* Update repository
|
|
11834
|
+
*
|
|
11835
|
+
* 改库的 display_name 或 description。只送要改的字段,省略的保持原值;name 建库之后不能改,它标识库。一个字段都不送会 400。
|
|
11836
|
+
*/
|
|
11837
|
+
export const registryRepositoriesUpdate = (options) => (options.client ?? client).patch({
|
|
11838
|
+
security: [{
|
|
11839
|
+
key: 'registry-bearerAuth',
|
|
11840
|
+
scheme: 'bearer',
|
|
11841
|
+
type: 'http'
|
|
11842
|
+
}],
|
|
11843
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11844
|
+
...options,
|
|
11845
|
+
headers: {
|
|
11846
|
+
'Content-Type': 'application/json',
|
|
11847
|
+
...options.headers
|
|
11848
|
+
}
|
|
11849
|
+
});
|
|
11850
|
+
/**
|
|
11851
|
+
* List packages
|
|
11852
|
+
*
|
|
11853
|
+
* 列出一个库里的包,可按种类筛、按名字搜、按最近更新或下载量排序。kind=skill 只看技能,kind=plugin 只看插件,省略则两类都返回。q 在 name、title 和 description 上做子串匹配。sort 默认 updated;downloads 按累计下载量降序,用来找这个库最常用的资源。
|
|
11854
|
+
*/
|
|
11855
|
+
export const registryRepositoriesPackagesList = (options) => (options.client ?? client).get({
|
|
11856
|
+
security: [{
|
|
11857
|
+
key: 'registry-bearerAuth',
|
|
11858
|
+
scheme: 'bearer',
|
|
11859
|
+
type: 'http'
|
|
11860
|
+
}],
|
|
11861
|
+
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
11862
|
+
...options
|
|
11863
|
+
});
|
|
11864
|
+
/**
|
|
11865
|
+
* Publish a package
|
|
11866
|
+
*
|
|
11867
|
+
* 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
|
|
11868
|
+
*/
|
|
11869
|
+
export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
|
|
11870
|
+
...formDataBodySerializer,
|
|
11871
|
+
security: [{
|
|
11872
|
+
key: 'registry-bearerAuth',
|
|
11873
|
+
scheme: 'bearer',
|
|
11874
|
+
type: 'http'
|
|
11875
|
+
}],
|
|
11876
|
+
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
11877
|
+
...options,
|
|
11878
|
+
headers: {
|
|
11879
|
+
'Content-Type': null,
|
|
11880
|
+
...options.headers
|
|
11881
|
+
}
|
|
11882
|
+
});
|
|
11883
|
+
/**
|
|
11884
|
+
* Retrieve package
|
|
11885
|
+
*
|
|
11886
|
+
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。
|
|
11887
|
+
*/
|
|
11888
|
+
export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
|
|
11889
|
+
security: [{
|
|
11890
|
+
key: 'registry-bearerAuth',
|
|
11891
|
+
scheme: 'bearer',
|
|
11892
|
+
type: 'http'
|
|
11893
|
+
}],
|
|
11894
|
+
url: '/registry/v1/packages/{package_id}',
|
|
11895
|
+
...options
|
|
11896
|
+
});
|
|
11897
|
+
/**
|
|
11898
|
+
* List versions
|
|
11899
|
+
*
|
|
11900
|
+
* 列出一个包的所有版本,含已撤回的。撤回的版本仍在列表里(它占着版本号),withdrawn 为 true,并带 withdraw_time。按发布顺序返回。
|
|
11901
|
+
*/
|
|
11902
|
+
export const registryPackagesVersionsList = (options) => (options.client ?? client).get({
|
|
11903
|
+
security: [{
|
|
11904
|
+
key: 'registry-bearerAuth',
|
|
11905
|
+
scheme: 'bearer',
|
|
11906
|
+
type: 'http'
|
|
11907
|
+
}],
|
|
11908
|
+
url: '/registry/v1/packages/{package_id}/versions',
|
|
11909
|
+
...options
|
|
11910
|
+
});
|
|
11911
|
+
/**
|
|
11912
|
+
* Publish a version
|
|
11913
|
+
*
|
|
11914
|
+
* 给一个已有的包发新版本。请求体与 packages.create 相同(multipart:version 必填,archive 或 files 给内容),但种类和名字沿用这个包,不再从上传内容重判。version 必须比已发布的最高版本高(撤回的版本也占号,不能复用);比它低或相等返回 FAILED_PRECONDITION。title、description、tags 不填就沿用这个包现在显示的,不会被新版本里 SKILL.md 或 plugin.json 的描述覆盖;要改就在这次请求里给。作者不随新版本改变。
|
|
11915
|
+
*/
|
|
11916
|
+
export const registryPackagesVersionsCreate = (options) => (options.client ?? client).post({
|
|
11917
|
+
...formDataBodySerializer,
|
|
11918
|
+
security: [{
|
|
11919
|
+
key: 'registry-bearerAuth',
|
|
11920
|
+
scheme: 'bearer',
|
|
11921
|
+
type: 'http'
|
|
11922
|
+
}],
|
|
11923
|
+
url: '/registry/v1/packages/{package_id}/versions',
|
|
11924
|
+
...options,
|
|
11925
|
+
headers: {
|
|
11926
|
+
'Content-Type': null,
|
|
11927
|
+
...options.headers
|
|
11928
|
+
}
|
|
11929
|
+
});
|
|
11930
|
+
/**
|
|
11931
|
+
* List version contents
|
|
11932
|
+
*
|
|
11933
|
+
* 列出一个版本解压后的文件清单(路径和大小),用来在不下载整个包的前提下看它包含什么。路径是相对包根的,例如 SKILL.md 或 plugin/skills/review.md。已撤回的版本仍可读清单。
|
|
11934
|
+
*/
|
|
11935
|
+
export const registryPackagesVersionsContents = (options) => (options.client ?? client).get({
|
|
11936
|
+
security: [{
|
|
11937
|
+
key: 'registry-bearerAuth',
|
|
11938
|
+
scheme: 'bearer',
|
|
11939
|
+
type: 'http'
|
|
11940
|
+
}],
|
|
11941
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/contents',
|
|
11942
|
+
...options
|
|
11943
|
+
});
|
|
11944
|
+
/**
|
|
11945
|
+
* Download a file
|
|
11946
|
+
*
|
|
11947
|
+
* 下载一个版本里的单个文件,返回原始字节。path 是 contents 给出的路径,可以含斜杠(例如 plugin/skills/review.md)。用它按文件取内容,装到磁盘上时保留这个相对路径。不计入 downloads。
|
|
11948
|
+
*/
|
|
11949
|
+
export const registryPackagesVersionsFilesRetrieve = (options) => (options.client ?? client).get({
|
|
11950
|
+
security: [{
|
|
11951
|
+
key: 'registry-bearerAuth',
|
|
11952
|
+
scheme: 'bearer',
|
|
11953
|
+
type: 'http'
|
|
11954
|
+
}],
|
|
11955
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/files/{path}',
|
|
11956
|
+
...options
|
|
11957
|
+
});
|
|
11958
|
+
/**
|
|
11959
|
+
* Download version archive
|
|
11960
|
+
*
|
|
11961
|
+
* 下载一个版本的完整 zip 归档,用来整包安装或转存。每次调用都计入这个包的 downloads,所以不要为了看内容而反复拉 archive——先读 contents,只取需要的文件用 files 下载。
|
|
11962
|
+
*/
|
|
11963
|
+
export const registryPackagesVersionsArchive = (options) => (options.client ?? client).get({
|
|
11964
|
+
security: [{
|
|
11965
|
+
key: 'registry-bearerAuth',
|
|
11966
|
+
scheme: 'bearer',
|
|
11967
|
+
type: 'http'
|
|
11968
|
+
}],
|
|
11969
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/archive',
|
|
11970
|
+
...options
|
|
11971
|
+
});
|
|
11972
|
+
/**
|
|
11973
|
+
* Withdraw a version
|
|
11974
|
+
*
|
|
11975
|
+
* 撤回一个版本。撤回后它不再是 latest、不能被新装;已经装好的照常可用。版本号仍被占着,不能再用它发新版本。已经撤回的版本再撤回会返回 FAILED_PRECONDITION。撤回是不可逆的:要重新提供这个版本,用更高的版本号重新发布。
|
|
11976
|
+
*/
|
|
11977
|
+
export const registryPackagesVersionsWithdraw = (options) => (options.client ?? client).post({
|
|
11978
|
+
security: [{
|
|
11979
|
+
key: 'registry-bearerAuth',
|
|
11980
|
+
scheme: 'bearer',
|
|
11981
|
+
type: 'http'
|
|
11982
|
+
}],
|
|
11983
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}:withdraw',
|
|
11984
|
+
...options
|
|
11985
|
+
});
|
|
11986
|
+
/**
|
|
11987
|
+
* List installations
|
|
11988
|
+
*
|
|
11989
|
+
* 列出这个包装在哪些智能体和电脑上。每次读取都会和目标那边对账,以目标现在的实际情况为准,所以每条记录的 state 是读取这一刻的结论:installed 表示目标上有它且版本与记录一致;drifted 表示目标上有它但版本不同,此时 version 显示目标上的版本;missing 表示目标上已经没有它(被人在智能体或电脑那边删掉了),记录仍保留,可以用 installations.delete 清掉,或用 installations.update 重新装回;unknown 表示这次问不到目标,不代表没装,稍后重读。withdrawn 表示这条记录的版本已被撤回。一次返回全部记录,没有分页,按创建时间排序。
|
|
11990
|
+
*/
|
|
11991
|
+
export const registryPackagesInstallationsList = (options) => (options.client ?? client).get({
|
|
11992
|
+
security: [{
|
|
11993
|
+
key: 'registry-bearerAuth',
|
|
11994
|
+
scheme: 'bearer',
|
|
11995
|
+
type: 'http'
|
|
11996
|
+
}],
|
|
11997
|
+
url: '/registry/v1/packages/{package_id}/installations',
|
|
11998
|
+
...options
|
|
11999
|
+
});
|
|
12000
|
+
/**
|
|
12001
|
+
* Install a package
|
|
12002
|
+
*
|
|
12003
|
+
* 把一个包装到目标上:技能装到智能体(agent_ids),插件装到电脑(computer_ids),一次最多 50 个目标;目标种类给错会被拒(400),包的种类可从 packages.retrieve 的 kind 得知。技能装的是具体版本,version 省略时装最新版,之后不会自动升级,要换版本用 installations.update。插件只能装库里的最新版本,version 若给了就必须等于最新版,否则 FAILED_PRECONDITION。撤回的版本不能新装。同一目标重复装同一个包不会报错,而是把它移到这个版本。技能被拒的情形:智能体上已有同名的另一个技能(名字冲突),或这个智能体已经有 20 个技能。各目标独立处理:只要有一个成功就返回 201,成功的在 data 里,失败的目标在 errors 里逐个列出 target_id、code 和 message,按消息修正后只对失败的目标重发;全部失败时不返回 201,而是按第一个失败返回错误状态。装到智能体或电脑上要求调用者本人有权限,权限不足会出现在该目标的 errors 里。
|
|
12004
|
+
*/
|
|
12005
|
+
export const registryPackagesInstallationsCreate = (options) => (options.client ?? client).post({
|
|
12006
|
+
security: [{
|
|
12007
|
+
key: 'registry-bearerAuth',
|
|
12008
|
+
scheme: 'bearer',
|
|
12009
|
+
type: 'http'
|
|
12010
|
+
}],
|
|
12011
|
+
url: '/registry/v1/packages/{package_id}/installations',
|
|
12012
|
+
...options,
|
|
12013
|
+
headers: {
|
|
12014
|
+
'Content-Type': 'application/json',
|
|
12015
|
+
...options.headers
|
|
12016
|
+
}
|
|
12017
|
+
});
|
|
12018
|
+
/**
|
|
12019
|
+
* Update an installation
|
|
12020
|
+
*
|
|
12021
|
+
* 把一条安装记录换到另一个版本。技能可以换到任何未撤回的版本(升级或回退),version 省略时换到最新版;插件只能换到库里的最新版本,version 给了也必须等于最新版。撤回的版本不能换过去。对账为 missing 的记录用它可以重新装回去。同名冲突和 20 个技能上限的规则与安装时相同。
|
|
12022
|
+
*/
|
|
12023
|
+
export const registryInstallationsUpdate = (options) => (options.client ?? client).post({
|
|
12024
|
+
security: [{
|
|
12025
|
+
key: 'registry-bearerAuth',
|
|
12026
|
+
scheme: 'bearer',
|
|
12027
|
+
type: 'http'
|
|
12028
|
+
}],
|
|
12029
|
+
url: '/registry/v1/installations/{installation_id}:update',
|
|
12030
|
+
...options,
|
|
12031
|
+
headers: {
|
|
12032
|
+
'Content-Type': 'application/json',
|
|
12033
|
+
...options.headers
|
|
12034
|
+
}
|
|
12035
|
+
});
|
|
12036
|
+
/**
|
|
12037
|
+
* Remove an installation
|
|
12038
|
+
*
|
|
12039
|
+
* 把包从目标上卸下来,并删掉这条安装记录:技能从智能体的技能列表里移除,插件从电脑上卸载。目标那边已经没有它时也算完成。包本身和它的版本不受影响,之后可以重新安装。记录删除后重发会 404,所以删除前先用 installations.list 确认。
|
|
12040
|
+
*/
|
|
12041
|
+
export const registryInstallationsDelete = (options) => (options.client ?? client).delete({
|
|
12042
|
+
security: [{
|
|
12043
|
+
key: 'registry-bearerAuth',
|
|
12044
|
+
scheme: 'bearer',
|
|
12045
|
+
type: 'http'
|
|
12046
|
+
}],
|
|
12047
|
+
url: '/registry/v1/installations/{installation_id}',
|
|
12048
|
+
...options
|
|
12049
|
+
});
|
|
11246
12050
|
/**
|
|
11247
12051
|
* List sandboxes (v2)
|
|
11248
12052
|
*
|