@deepraxis/sdk 0.1.1-dev.80dd587 → 0.1.1-dev.842dfd1
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 +199 -20
- package/dist/core/credentials.d.ts +16 -6
- package/dist/core/credentials.js +24 -5
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +383 -55
- package/dist/generated/sdk.gen.js +1100 -179
- package/dist/generated/types.gen.d.ts +10034 -2685
- package/dist/operations.generated.js +2619 -960
- package/dist/resources.generated.d.ts +1245 -294
- package/dist/resources.generated.js +129 -12
- 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: [{
|
|
@@ -42,9 +42,9 @@ export const sendAgentEvents = (options) => (options.client ?? client).post({
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
45
|
-
* Follow
|
|
45
|
+
* Follow an agent live
|
|
46
46
|
*
|
|
47
|
-
* Follow
|
|
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: [{
|
|
@@ -99,6 +99,24 @@ export const getAgentConsolidation = (options) => (options.client ?? client).get
|
|
|
99
99
|
url: '/agent/v1/agents/{agent_id}/consolidations/{consolidation_id}',
|
|
100
100
|
...options
|
|
101
101
|
});
|
|
102
|
+
/**
|
|
103
|
+
* List an assume agent's waiting letters
|
|
104
|
+
*
|
|
105
|
+
* Check whether mail waits for an assume agent without taking it: answers unread, the count of delivered letters the agent has not read, and letters, the newest unread ones (id, sender address, summary, thread, create_time; never the body). Nothing is marked read, so calling it again answers the same until the agent reads its mail with its own inbox tool (praxis_assume_inbox, action "read"). Use it when something outside the agent has to learn that mail arrived: the local `praxis agent events wait` reads it once on start and after every reconnect to its agent's event stream, so no letter that arrived while nothing listened is missed. {agent_id} takes the agent_… id, the eight character identity number or the handle of an assume agent in your organization; any other kind answers 400 ASSUME_AGENT_REQUIRED. To read or answer the letters, use the agent's inbox tool, not this read. Example: GET /agent/v1/agents/R1M9TQ2X/inbox/letters?unread=true&limit=5.
|
|
106
|
+
*/
|
|
107
|
+
export const listAgentInboxLetters = (options) => (options.client ?? client).get({
|
|
108
|
+
security: [{
|
|
109
|
+
key: 'BearerAuth',
|
|
110
|
+
scheme: 'bearer',
|
|
111
|
+
type: 'http'
|
|
112
|
+
}, {
|
|
113
|
+
key: 'ApiKeyAuth',
|
|
114
|
+
name: 'X-API-Key',
|
|
115
|
+
type: 'apiKey'
|
|
116
|
+
}],
|
|
117
|
+
url: '/agent/v1/agents/{agent_id}/inbox/letters',
|
|
118
|
+
...options
|
|
119
|
+
});
|
|
102
120
|
/**
|
|
103
121
|
* Apply Agent Version
|
|
104
122
|
*
|
|
@@ -340,52 +358,11 @@ export const getAgentAppearance = (options) => (options.client ?? client).get({
|
|
|
340
358
|
...options
|
|
341
359
|
});
|
|
342
360
|
/**
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* Sign your logged-in customer in to a service agent from your backend with a one-time grant code that Agent Kit exchanges for a customer access token.
|
|
346
|
-
*
|
|
347
|
-
* Call this from your backend with your API key after your own login succeeds, then pass the returned code to Agent Kit in the browser; never call it from the browser. Customer authorization follows Shopify Storefront customer access tokens (Multipass-style sign-in, a short-lived token, renewal and logout), so that experience applies. customer_id is your own identifier for the customer: use an opaque id such as your database user id, not an email address or phone number. The value auth is reserved, and ids starting with anon_ are reserved for anonymous customers. The code works once and expires after expires_in seconds (default 900). The sign-in it starts lasts max_session_seconds (default 7 days); version, budget (US dollars, at most 2 decimals), system_message, agent_override and metadata apply to every token of the sign-in. Unlike Shopify, origin binds the whole sign-in to one page origin, and anonymous_access_token merges the conversations of the anonymous visitor who chatted before signing in into this customer. Example body: {"customer_id":"cus_8f2a91","origin":"https://shop.example.com"}.
|
|
348
|
-
*/
|
|
349
|
-
export const createCustomerGrantCode = (options) => (options.client ?? client).post({
|
|
350
|
-
security: [{
|
|
351
|
-
key: 'BearerAuth',
|
|
352
|
-
scheme: 'bearer',
|
|
353
|
-
type: 'http'
|
|
354
|
-
}, {
|
|
355
|
-
key: 'ApiKeyAuth',
|
|
356
|
-
name: 'X-API-Key',
|
|
357
|
-
type: 'apiKey'
|
|
358
|
-
}],
|
|
359
|
-
url: '/agent/v1/agents/{agent_id}/customers/auth/grant_codes',
|
|
360
|
-
...options,
|
|
361
|
-
headers: {
|
|
362
|
-
'Content-Type': 'application/json',
|
|
363
|
-
...options.headers
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
/**
|
|
367
|
-
* Create customer access token
|
|
368
|
-
*
|
|
369
|
-
* Exchange a grant code, or the agent's publishable key for an anonymous visitor, for a customer access token that authorizes the agent's embedded sessions.
|
|
370
|
-
*
|
|
371
|
-
* No Authorization header is required: the grant code or the publishable key is the credential. Agent Kit calls this from the browser, so send the page Origin. With grant_code, the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, used, expired and other-agent codes all return the same 401 GRANT_CODE_INVALID. The sign-in starts now and lasts the code's max_session_seconds. Unlike Shopify, a visitor without an account gets a token too: send publishable_key instead and a new anonymous customer (anon_…) is created, bound to the request Origin, for 7 days. The access token lasts at most two hours and never outlives the sign-in; renew it with access_tokens/renew before expires_at. Both forms share the per-IP minute limit of anonymous issuance (default 20). Example body: {"grant_code":"cgc_…"}.
|
|
372
|
-
*/
|
|
373
|
-
export const createCustomerAccessToken = (options) => (options.client ?? client).post({
|
|
374
|
-
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens',
|
|
375
|
-
...options,
|
|
376
|
-
headers: {
|
|
377
|
-
'Content-Type': 'application/json',
|
|
378
|
-
...options.headers
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
/**
|
|
382
|
-
* Renew customer access token
|
|
383
|
-
*
|
|
384
|
-
* Get a fresh customer access token in the same sign-in, authenticated with the current one.
|
|
361
|
+
* Get agent embed policy
|
|
385
362
|
*
|
|
386
|
-
*
|
|
363
|
+
* Read a service agent's embed settings: the pages allowed to open its Kit chat (allowed_origins), the development switch (allow_localhost) and what an embedded end user may upload (uploads). 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.
|
|
387
364
|
*/
|
|
388
|
-
export const
|
|
365
|
+
export const getAgentEmbedPolicy = (options) => (options.client ?? client).get({
|
|
389
366
|
security: [{
|
|
390
367
|
key: 'BearerAuth',
|
|
391
368
|
scheme: 'bearer',
|
|
@@ -395,17 +372,15 @@ export const renewCustomerAccessToken = (options) => (options.client ?? client).
|
|
|
395
372
|
name: 'X-API-Key',
|
|
396
373
|
type: 'apiKey'
|
|
397
374
|
}],
|
|
398
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
375
|
+
url: '/agent/v1/agents/{agent_id}/embed_policy',
|
|
399
376
|
...options
|
|
400
377
|
});
|
|
401
378
|
/**
|
|
402
|
-
*
|
|
379
|
+
* Update agent embed policy
|
|
403
380
|
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* Send the current customer access token as the Bearer credential, with no body, when the customer logs out of your site. Every token of the sign-in, including renewed ones, stops working, and their live event streams close; the customer's conversations are kept. Returns 204. Calling it again with the same token returns 401 ACCESS_TOKEN_REVOKED, so treat that as already logged out.
|
|
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"]}.
|
|
407
382
|
*/
|
|
408
|
-
export const
|
|
383
|
+
export const updateAgentEmbedPolicy = (options) => (options.client ?? client).post({
|
|
409
384
|
security: [{
|
|
410
385
|
key: 'BearerAuth',
|
|
411
386
|
scheme: 'bearer',
|
|
@@ -415,8 +390,12 @@ export const deleteCurrentCustomerAccessToken = (options) => (options.client ??
|
|
|
415
390
|
name: 'X-API-Key',
|
|
416
391
|
type: 'apiKey'
|
|
417
392
|
}],
|
|
418
|
-
url: '/agent/v1/agents/{agent_id}/
|
|
419
|
-
...options
|
|
393
|
+
url: '/agent/v1/agents/{agent_id}/embed_policy',
|
|
394
|
+
...options,
|
|
395
|
+
headers: {
|
|
396
|
+
'Content-Type': 'application/json',
|
|
397
|
+
...options.headers
|
|
398
|
+
}
|
|
420
399
|
});
|
|
421
400
|
/**
|
|
422
401
|
* List Computers
|
|
@@ -441,7 +420,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
441
420
|
/**
|
|
442
421
|
* Create Computer
|
|
443
422
|
*
|
|
444
|
-
* Create a durable computer: a named machine whose files outlive sessions, for general
|
|
423
|
+
* Create a durable computer: a named machine whose files outlive sessions, for general agents.
|
|
445
424
|
*
|
|
446
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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
|
|
447
426
|
*/
|
|
@@ -700,7 +679,7 @@ export const releaseComputerLease = (options) => (options.client ?? client).dele
|
|
|
700
679
|
/**
|
|
701
680
|
* List Toolsets
|
|
702
681
|
*
|
|
703
|
-
* Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write,
|
|
682
|
+
* Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write, ask_user_question and goal_read, which are listed so they can be switched off. Native additions require bash enabled; codemode requires bash (enabling it with bash disabled returns 400; keep bash enabled with permission_policy always_ask to restrict it); send_message also requires agent. To keep only some tools, set default_config.enabled to false and enable the wanted tools in configs; unlisted tools follow default_config. The catalog includes plugin names and versions. Sessions created through /anthropic/v1 expose only the eight official tools.
|
|
704
683
|
*/
|
|
705
684
|
export const listToolsets = (options) => (options?.client ?? client).get({
|
|
706
685
|
security: [{
|
|
@@ -759,12 +738,36 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
759
738
|
...options.headers
|
|
760
739
|
}
|
|
761
740
|
});
|
|
741
|
+
/**
|
|
742
|
+
* Update session agent version
|
|
743
|
+
*
|
|
744
|
+
* Move one session to a version of its agent
|
|
745
|
+
*
|
|
746
|
+
* Without `version`, the session moves to the agent's active version — the version new sessions get now, which is not necessarily the newest saved one. With `version`, it moves to that existing version. The change is idempotent: asking for the version the session is already on answers the session and writes nothing, so the call may be repeated freely. A session that is running a turn answers 409 SESSION_CONFLICT and changes nothing, because a turn finishes on the version it started with; ask again once it is idle. The move writes a `session.updated` event carrying the agent version and the caller as its actor, so every version change is attributable. Main sessions additionally follow their agent's active version at the start of a person-started turn; this endpoint is the same move made explicitly, and it works on every kind of session, including worker sessions that never follow on their own.
|
|
747
|
+
*/
|
|
748
|
+
export const updateSessionAgentVersion = (options) => (options.client ?? client).post({
|
|
749
|
+
security: [{
|
|
750
|
+
key: 'BearerAuth',
|
|
751
|
+
scheme: 'bearer',
|
|
752
|
+
type: 'http'
|
|
753
|
+
}, {
|
|
754
|
+
key: 'ApiKeyAuth',
|
|
755
|
+
name: 'X-API-Key',
|
|
756
|
+
type: 'apiKey'
|
|
757
|
+
}],
|
|
758
|
+
url: '/agent/v1/sessions/{session_id}/agent_version',
|
|
759
|
+
...options,
|
|
760
|
+
headers: {
|
|
761
|
+
'Content-Type': 'application/json',
|
|
762
|
+
...options.headers
|
|
763
|
+
}
|
|
764
|
+
});
|
|
762
765
|
/**
|
|
763
766
|
* List Session Artifacts (Extension)
|
|
764
767
|
*
|
|
765
768
|
* List the files this session delivered; an end-customer token reads its own session.
|
|
766
769
|
*
|
|
767
|
-
* Own-face extension. Returns { data: Artifact[] } ordered by create_time. Each artifact is one file in the session outputs directory with id, name, version, parts, source_hrefs, create_time and update_time. Delivering the same path again keeps the id and adds one to version. Files are captured seconds after the turn ends, so artifacts appear after session.status_idle; also watch the agent.artifact_delivered event. Whoever may read the session may read its artifacts; a session that is missing or not yours returns 404.
|
|
770
|
+
* Own-face extension. Returns { data: Artifact[] } ordered by create_time. Each artifact is one file in the session outputs directory, or one canvas or media asset the reply pointed at (a part with kind object carrying object_type, object_id and href; one artifact per object, pointing at it again adds no version), with id, name, version, parts, source_hrefs, create_time and update_time. Delivering the same path again keeps the id and adds one to version. Files are captured seconds after the turn ends, so artifacts appear after session.status_idle; also watch the agent.artifact_delivered event. Whoever may read the session may read its artifacts; a session that is missing or not yours returns 404.
|
|
768
771
|
*/
|
|
769
772
|
export const listSessionArtifacts = (options) => (options.client ?? client).get({
|
|
770
773
|
security: [{
|
|
@@ -784,7 +787,7 @@ export const listSessionArtifacts = (options) => (options.client ?? client).get(
|
|
|
784
787
|
*
|
|
785
788
|
* Mint a short-lived download address for one file of an artifact.
|
|
786
789
|
*
|
|
787
|
-
* Own-face extension. The body is optional: part (index into the artifact parts, default 0) and ttl_seconds (60 to 300, default 300). Returns { url, expire_time }. The address works for minutes; do not store or log it. An unknown artifact or an out-of-range part returns 404 ARTIFACT_NOT_FOUND, a session that is missing or not yours returns 404, and a ttl_seconds outside 60 to 300 returns 400.
|
|
790
|
+
* Own-face extension. The body is optional: part (index into the artifact parts, default 0) and ttl_seconds (60 to 300, default 300). Returns { url, expire_time }. The address works for minutes; do not store or log it. For an object part the address serves a snapshot picture of a canvas or the own bytes of the asset; an object that no longer exists returns 404 ARTIFACT_NOT_FOUND and a failing share service returns 502. An unknown artifact or an out-of-range part returns 404 ARTIFACT_NOT_FOUND, a session that is missing or not yours returns 404, and a ttl_seconds outside 60 to 300 returns 400.
|
|
788
791
|
*/
|
|
789
792
|
export const createSessionArtifactContentUrl = (options) => (options.client ?? client).post({
|
|
790
793
|
security: [{
|
|
@@ -803,6 +806,26 @@ export const createSessionArtifactContentUrl = (options) => (options.client ?? c
|
|
|
803
806
|
...options.headers
|
|
804
807
|
}
|
|
805
808
|
});
|
|
809
|
+
/**
|
|
810
|
+
* List Session Requests (Extension)
|
|
811
|
+
*
|
|
812
|
+
* List the requests a session is waiting on; an end-customer token reads its own session.
|
|
813
|
+
*
|
|
814
|
+
* Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (question for the ask_user_question tool, approval for any other tool that waits for permission), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.
|
|
815
|
+
*/
|
|
816
|
+
export const listSessionRequests = (options) => (options.client ?? client).get({
|
|
817
|
+
security: [{
|
|
818
|
+
key: 'BearerAuth',
|
|
819
|
+
scheme: 'bearer',
|
|
820
|
+
type: 'http'
|
|
821
|
+
}, {
|
|
822
|
+
key: 'ApiKeyAuth',
|
|
823
|
+
name: 'X-API-Key',
|
|
824
|
+
type: 'apiKey'
|
|
825
|
+
}],
|
|
826
|
+
url: '/agent/v1/sessions/{session_id}/requests',
|
|
827
|
+
...options
|
|
828
|
+
});
|
|
806
829
|
/**
|
|
807
830
|
* List Session Background Tasks (Extension)
|
|
808
831
|
*
|
|
@@ -927,6 +950,46 @@ export const listSessionCompactions = (options) => (options.client ?? client).ge
|
|
|
927
950
|
url: '/agent/v1/sessions/{session_id}/compactions',
|
|
928
951
|
...options
|
|
929
952
|
});
|
|
953
|
+
/**
|
|
954
|
+
* Upload a File (Extension)
|
|
955
|
+
*
|
|
956
|
+
* 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"}.
|
|
957
|
+
*/
|
|
958
|
+
export const createAgentUpload = (options) => (options.client ?? client).post({
|
|
959
|
+
security: [{
|
|
960
|
+
key: 'BearerAuth',
|
|
961
|
+
scheme: 'bearer',
|
|
962
|
+
type: 'http'
|
|
963
|
+
}, {
|
|
964
|
+
key: 'ApiKeyAuth',
|
|
965
|
+
name: 'X-API-Key',
|
|
966
|
+
type: 'apiKey'
|
|
967
|
+
}],
|
|
968
|
+
url: '/agent/v1/uploads',
|
|
969
|
+
...options,
|
|
970
|
+
headers: {
|
|
971
|
+
'Content-Type': 'application/json',
|
|
972
|
+
...options.headers
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
/**
|
|
976
|
+
* Create Upload Content URL (Extension)
|
|
977
|
+
*
|
|
978
|
+
* 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.
|
|
979
|
+
*/
|
|
980
|
+
export const createAgentUploadContentUrl = (options) => (options.client ?? client).post({
|
|
981
|
+
security: [{
|
|
982
|
+
key: 'BearerAuth',
|
|
983
|
+
scheme: 'bearer',
|
|
984
|
+
type: 'http'
|
|
985
|
+
}, {
|
|
986
|
+
key: 'ApiKeyAuth',
|
|
987
|
+
name: 'X-API-Key',
|
|
988
|
+
type: 'apiKey'
|
|
989
|
+
}],
|
|
990
|
+
url: '/agent/v1/uploads/{file_id}/content_url',
|
|
991
|
+
...options
|
|
992
|
+
});
|
|
930
993
|
/**
|
|
931
994
|
* Generate speech
|
|
932
995
|
*
|
|
@@ -1460,7 +1523,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
|
1460
1523
|
/**
|
|
1461
1524
|
* Create a one-time upload URL
|
|
1462
1525
|
*
|
|
1463
|
-
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid
|
|
1526
|
+
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid or cross-organization URLs return 404, and so does a link whose upload record no longer exists. A URL that is authentic but names another action returns 403 CAPABILITY_MISMATCH: a status link posted to complete_url answers it, and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1464
1527
|
*/
|
|
1465
1528
|
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1466
1529
|
security: [{
|
|
@@ -2990,7 +3053,7 @@ export const designateOrganizationPositionHead = (options) => (options.client ??
|
|
|
2990
3053
|
/**
|
|
2991
3054
|
* Hire into a position
|
|
2992
3055
|
*
|
|
2993
|
-
* Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {"candidate":{"kind":"member","actor":"human:usr_123"},"request_id":"hire-support-1"}.
|
|
3056
|
+
* Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. An agent created moments ago may not be in the organization roster yet (agents enter it asynchronously): that answers 503 ACTOR_SYNCING with a Retry-After header and retryable true, and the same call succeeds after that wait. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {"candidate":{"kind":"member","actor":"human:usr_123"},"request_id":"hire-support-1"}.
|
|
2994
3057
|
*/
|
|
2995
3058
|
export const hireOrganizationPosition = (options) => (options.client ?? client).post({
|
|
2996
3059
|
security: [{
|
|
@@ -3798,7 +3861,7 @@ export const sessionsDelete = (options) => (options.client ?? client).delete({
|
|
|
3798
3861
|
/**
|
|
3799
3862
|
* Get session
|
|
3800
3863
|
*
|
|
3801
|
-
* Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on
|
|
3864
|
+
* Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on the agent version's default environment, node22.
|
|
3802
3865
|
*/
|
|
3803
3866
|
export const sessionsRetrieve = (options) => (options.client ?? client).get({
|
|
3804
3867
|
security: [{
|
|
@@ -3838,7 +3901,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
3838
3901
|
/**
|
|
3839
3902
|
* List agents
|
|
3840
3903
|
*
|
|
3841
|
-
* 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
|
|
3904
|
+
* 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.
|
|
3842
3905
|
*/
|
|
3843
3906
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
3844
3907
|
security: [{
|
|
@@ -3856,7 +3919,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
3856
3919
|
/**
|
|
3857
3920
|
* Create agent
|
|
3858
3921
|
*
|
|
3859
|
-
* 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,
|
|
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. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
3860
3923
|
*/
|
|
3861
3924
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
3862
3925
|
security: [{
|
|
@@ -3972,7 +4035,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
3972
4035
|
/**
|
|
3973
4036
|
* Create session
|
|
3974
4037
|
*
|
|
3975
|
-
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (
|
|
4038
|
+
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired "light" returns 400 naming the two forms that work: "node22", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
|
|
3976
4039
|
*/
|
|
3977
4040
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
3978
4041
|
security: [{
|
|
@@ -4012,7 +4075,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
|
|
|
4012
4075
|
/**
|
|
4013
4076
|
* List session events
|
|
4014
4077
|
*
|
|
4015
|
-
* 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), 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, 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
|
|
4078
|
+
* 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.
|
|
4016
4079
|
*/
|
|
4017
4080
|
export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
4018
4081
|
security: [{
|
|
@@ -4030,7 +4093,7 @@ export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
|
4030
4093
|
/**
|
|
4031
4094
|
* Send session events
|
|
4032
4095
|
*
|
|
4033
|
-
* 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
|
|
4096
|
+
* 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.
|
|
4034
4097
|
*/
|
|
4035
4098
|
export const sessionsEventsSend = (options) => (options.client ?? client).post({
|
|
4036
4099
|
security: [{
|
|
@@ -4052,7 +4115,7 @@ export const sessionsEventsSend = (options) => (options.client ?? client).post({
|
|
|
4052
4115
|
/**
|
|
4053
4116
|
* Stream session events
|
|
4054
4117
|
*
|
|
4055
|
-
* 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
|
|
4118
|
+
* 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.
|
|
4056
4119
|
*/
|
|
4057
4120
|
export const sessionsEventsStream = (options) => (options.client ?? client).sse.get({
|
|
4058
4121
|
security: [{
|
|
@@ -4352,7 +4415,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
4352
4415
|
/**
|
|
4353
4416
|
* Create deployment
|
|
4354
4417
|
*
|
|
4355
|
-
* 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
|
|
4418
|
+
* 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.
|
|
4356
4419
|
*/
|
|
4357
4420
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
4358
4421
|
security: [{
|
|
@@ -6929,36 +6992,39 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
|
|
|
6929
6992
|
}
|
|
6930
6993
|
});
|
|
6931
6994
|
/**
|
|
6932
|
-
* List
|
|
6995
|
+
* List contents
|
|
6933
6996
|
*
|
|
6934
|
-
*
|
|
6997
|
+
* 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.
|
|
6935
6998
|
*/
|
|
6936
|
-
export const
|
|
6937
|
-
querySerializer: { parameters: {
|
|
6938
|
-
associations: { array: { explode: false } },
|
|
6939
|
-
properties: { array: { explode: false } },
|
|
6940
|
-
propertiesWithHistory: { array: { explode: false } }
|
|
6941
|
-
} },
|
|
6999
|
+
export const contentListContents = (options) => (options?.client ?? client).get({
|
|
6942
7000
|
security: [{
|
|
6943
|
-
key: '
|
|
7001
|
+
key: 'BearerAuth',
|
|
6944
7002
|
scheme: 'bearer',
|
|
6945
7003
|
type: 'http'
|
|
7004
|
+
}, {
|
|
7005
|
+
key: 'ApiKeyAuth',
|
|
7006
|
+
name: 'X-API-Key',
|
|
7007
|
+
type: 'apiKey'
|
|
6946
7008
|
}],
|
|
6947
|
-
url: '/
|
|
7009
|
+
url: '/content/v1/contents',
|
|
6948
7010
|
...options
|
|
6949
7011
|
});
|
|
6950
7012
|
/**
|
|
6951
|
-
* Create
|
|
7013
|
+
* Create a content
|
|
6952
7014
|
*
|
|
6953
|
-
* Create a
|
|
7015
|
+
* 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.
|
|
6954
7016
|
*/
|
|
6955
|
-
export const
|
|
7017
|
+
export const contentCreateContent = (options) => (options.client ?? client).post({
|
|
6956
7018
|
security: [{
|
|
6957
|
-
key: '
|
|
7019
|
+
key: 'BearerAuth',
|
|
6958
7020
|
scheme: 'bearer',
|
|
6959
7021
|
type: 'http'
|
|
7022
|
+
}, {
|
|
7023
|
+
key: 'ApiKeyAuth',
|
|
7024
|
+
name: 'X-API-Key',
|
|
7025
|
+
type: 'apiKey'
|
|
6960
7026
|
}],
|
|
6961
|
-
url: '/
|
|
7027
|
+
url: '/content/v1/contents',
|
|
6962
7028
|
...options,
|
|
6963
7029
|
headers: {
|
|
6964
7030
|
'Content-Type': 'application/json',
|
|
@@ -6966,50 +7032,39 @@ export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
|
6966
7032
|
}
|
|
6967
7033
|
});
|
|
6968
7034
|
/**
|
|
6969
|
-
*
|
|
6970
|
-
*
|
|
6971
|
-
* Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
6972
|
-
*/
|
|
6973
|
-
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
6974
|
-
security: [{
|
|
6975
|
-
key: 'crm-bearerAuth',
|
|
6976
|
-
scheme: 'bearer',
|
|
6977
|
-
type: 'http'
|
|
6978
|
-
}],
|
|
6979
|
-
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
6980
|
-
...options
|
|
6981
|
-
});
|
|
6982
|
-
/**
|
|
6983
|
-
* Retrieve record
|
|
7035
|
+
* Get a content
|
|
6984
7036
|
*
|
|
6985
|
-
* Read one
|
|
7037
|
+
* 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.
|
|
6986
7038
|
*/
|
|
6987
|
-
export const
|
|
6988
|
-
querySerializer: { parameters: {
|
|
6989
|
-
associations: { array: { explode: false } },
|
|
6990
|
-
properties: { array: { explode: false } },
|
|
6991
|
-
propertiesWithHistory: { array: { explode: false } }
|
|
6992
|
-
} },
|
|
7039
|
+
export const contentGetContent = (options) => (options.client ?? client).get({
|
|
6993
7040
|
security: [{
|
|
6994
|
-
key: '
|
|
7041
|
+
key: 'BearerAuth',
|
|
6995
7042
|
scheme: 'bearer',
|
|
6996
7043
|
type: 'http'
|
|
7044
|
+
}, {
|
|
7045
|
+
key: 'ApiKeyAuth',
|
|
7046
|
+
name: 'X-API-Key',
|
|
7047
|
+
type: 'apiKey'
|
|
6997
7048
|
}],
|
|
6998
|
-
url: '/
|
|
7049
|
+
url: '/content/v1/contents/{content_id}',
|
|
6999
7050
|
...options
|
|
7000
7051
|
});
|
|
7001
7052
|
/**
|
|
7002
|
-
* Update
|
|
7053
|
+
* Update a content
|
|
7003
7054
|
*
|
|
7004
|
-
* Change only
|
|
7055
|
+
* 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.
|
|
7005
7056
|
*/
|
|
7006
|
-
export const
|
|
7057
|
+
export const contentUpdateContent = (options) => (options.client ?? client).patch({
|
|
7007
7058
|
security: [{
|
|
7008
|
-
key: '
|
|
7059
|
+
key: 'BearerAuth',
|
|
7009
7060
|
scheme: 'bearer',
|
|
7010
7061
|
type: 'http'
|
|
7062
|
+
}, {
|
|
7063
|
+
key: 'ApiKeyAuth',
|
|
7064
|
+
name: 'X-API-Key',
|
|
7065
|
+
type: 'apiKey'
|
|
7011
7066
|
}],
|
|
7012
|
-
url: '/
|
|
7067
|
+
url: '/content/v1/contents/{content_id}',
|
|
7013
7068
|
...options,
|
|
7014
7069
|
headers: {
|
|
7015
7070
|
'Content-Type': 'application/json',
|
|
@@ -7017,17 +7072,21 @@ export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
|
7017
7072
|
}
|
|
7018
7073
|
});
|
|
7019
7074
|
/**
|
|
7020
|
-
*
|
|
7075
|
+
* Publish a content
|
|
7021
7076
|
*
|
|
7022
|
-
*
|
|
7077
|
+
* 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.
|
|
7023
7078
|
*/
|
|
7024
|
-
export const
|
|
7079
|
+
export const contentPublishContent = (options) => (options.client ?? client).post({
|
|
7025
7080
|
security: [{
|
|
7026
|
-
key: '
|
|
7081
|
+
key: 'BearerAuth',
|
|
7027
7082
|
scheme: 'bearer',
|
|
7028
7083
|
type: 'http'
|
|
7084
|
+
}, {
|
|
7085
|
+
key: 'ApiKeyAuth',
|
|
7086
|
+
name: 'X-API-Key',
|
|
7087
|
+
type: 'apiKey'
|
|
7029
7088
|
}],
|
|
7030
|
-
url: '/
|
|
7089
|
+
url: '/content/v1/contents/{content_id}/publish',
|
|
7031
7090
|
...options,
|
|
7032
7091
|
headers: {
|
|
7033
7092
|
'Content-Type': 'application/json',
|
|
@@ -7035,71 +7094,84 @@ export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
|
7035
7094
|
}
|
|
7036
7095
|
});
|
|
7037
7096
|
/**
|
|
7038
|
-
*
|
|
7097
|
+
* Unpublish a content
|
|
7039
7098
|
*
|
|
7040
|
-
*
|
|
7099
|
+
* 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.
|
|
7041
7100
|
*/
|
|
7042
|
-
export const
|
|
7101
|
+
export const contentUnpublishContent = (options) => (options.client ?? client).post({
|
|
7043
7102
|
security: [{
|
|
7044
|
-
key: '
|
|
7103
|
+
key: 'BearerAuth',
|
|
7045
7104
|
scheme: 'bearer',
|
|
7046
7105
|
type: 'http'
|
|
7106
|
+
}, {
|
|
7107
|
+
key: 'ApiKeyAuth',
|
|
7108
|
+
name: 'X-API-Key',
|
|
7109
|
+
type: 'apiKey'
|
|
7047
7110
|
}],
|
|
7048
|
-
url: '/
|
|
7049
|
-
...options
|
|
7050
|
-
headers: {
|
|
7051
|
-
'Content-Type': 'application/json',
|
|
7052
|
-
...options.headers
|
|
7053
|
-
}
|
|
7111
|
+
url: '/content/v1/contents/{content_id}/unpublish',
|
|
7112
|
+
...options
|
|
7054
7113
|
});
|
|
7055
7114
|
/**
|
|
7056
|
-
*
|
|
7115
|
+
* Archive a content
|
|
7057
7116
|
*
|
|
7058
|
-
*
|
|
7117
|
+
* 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.
|
|
7059
7118
|
*/
|
|
7060
|
-
export const
|
|
7119
|
+
export const contentArchiveContent = (options) => (options.client ?? client).post({
|
|
7061
7120
|
security: [{
|
|
7062
|
-
key: '
|
|
7121
|
+
key: 'BearerAuth',
|
|
7063
7122
|
scheme: 'bearer',
|
|
7064
7123
|
type: 'http'
|
|
7124
|
+
}, {
|
|
7125
|
+
key: 'ApiKeyAuth',
|
|
7126
|
+
name: 'X-API-Key',
|
|
7127
|
+
type: 'apiKey'
|
|
7065
7128
|
}],
|
|
7066
|
-
url: '/
|
|
7067
|
-
...options
|
|
7068
|
-
headers: {
|
|
7069
|
-
'Content-Type': 'application/json',
|
|
7070
|
-
...options.headers
|
|
7071
|
-
}
|
|
7129
|
+
url: '/content/v1/contents/{content_id}/archive',
|
|
7130
|
+
...options
|
|
7072
7131
|
});
|
|
7073
7132
|
/**
|
|
7074
|
-
*
|
|
7133
|
+
* List versions
|
|
7075
7134
|
*
|
|
7076
|
-
*
|
|
7135
|
+
* 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.
|
|
7077
7136
|
*/
|
|
7078
|
-
export const
|
|
7137
|
+
export const contentListVersions = (options) => (options.client ?? client).get({
|
|
7079
7138
|
security: [{
|
|
7080
|
-
key: '
|
|
7139
|
+
key: 'BearerAuth',
|
|
7081
7140
|
scheme: 'bearer',
|
|
7082
7141
|
type: 'http'
|
|
7142
|
+
}, {
|
|
7143
|
+
key: 'ApiKeyAuth',
|
|
7144
|
+
name: 'X-API-Key',
|
|
7145
|
+
type: 'apiKey'
|
|
7083
7146
|
}],
|
|
7084
|
-
url: '/
|
|
7085
|
-
...options
|
|
7086
|
-
headers: {
|
|
7087
|
-
'Content-Type': 'application/json',
|
|
7088
|
-
...options.headers
|
|
7089
|
-
}
|
|
7147
|
+
url: '/content/v1/contents/{content_id}/versions',
|
|
7148
|
+
...options
|
|
7090
7149
|
});
|
|
7091
7150
|
/**
|
|
7092
|
-
*
|
|
7151
|
+
* Get a version
|
|
7093
7152
|
*
|
|
7094
|
-
*
|
|
7153
|
+
* 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.
|
|
7095
7154
|
*/
|
|
7096
|
-
export const
|
|
7155
|
+
export const contentGetVersion = (options) => (options.client ?? client).get({
|
|
7097
7156
|
security: [{
|
|
7098
|
-
key: '
|
|
7157
|
+
key: 'BearerAuth',
|
|
7099
7158
|
scheme: 'bearer',
|
|
7100
7159
|
type: 'http'
|
|
7160
|
+
}, {
|
|
7161
|
+
key: 'ApiKeyAuth',
|
|
7162
|
+
name: 'X-API-Key',
|
|
7163
|
+
type: 'apiKey'
|
|
7101
7164
|
}],
|
|
7102
|
-
url: '/
|
|
7165
|
+
url: '/content/v1/contents/{content_id}/versions/{version}',
|
|
7166
|
+
...options
|
|
7167
|
+
});
|
|
7168
|
+
/**
|
|
7169
|
+
* Open a playback session
|
|
7170
|
+
*
|
|
7171
|
+
* 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.
|
|
7172
|
+
*/
|
|
7173
|
+
export const contentCreatePlaybackSession = (options) => (options.client ?? client).post({
|
|
7174
|
+
url: '/content/v1/playback/sessions',
|
|
7103
7175
|
...options,
|
|
7104
7176
|
headers: {
|
|
7105
7177
|
'Content-Type': 'application/json',
|
|
@@ -7107,7 +7179,185 @@ export const crmObjectsBatchUpsert = (options) => (options.client ?? client).pos
|
|
|
7107
7179
|
}
|
|
7108
7180
|
});
|
|
7109
7181
|
/**
|
|
7110
|
-
*
|
|
7182
|
+
* List records
|
|
7183
|
+
*
|
|
7184
|
+
* Browse records of one object type and obtain ids for retrieval or edits. Discover objectType with schemas.list; select properties by internal names from properties.list. Omit after for the first page, then copy paging.next.after until no next page is returned. archived defaults to false; use objects.search for property filters.
|
|
7185
|
+
*/
|
|
7186
|
+
export const crmObjectsList = (options) => (options.client ?? client).get({
|
|
7187
|
+
querySerializer: { parameters: {
|
|
7188
|
+
associations: { array: { explode: false } },
|
|
7189
|
+
properties: { array: { explode: false } },
|
|
7190
|
+
propertiesWithHistory: { array: { explode: false } }
|
|
7191
|
+
} },
|
|
7192
|
+
security: [{
|
|
7193
|
+
key: 'crm-bearerAuth',
|
|
7194
|
+
scheme: 'bearer',
|
|
7195
|
+
type: 'http'
|
|
7196
|
+
}],
|
|
7197
|
+
url: '/crm/v1/objects/{objectType}',
|
|
7198
|
+
...options
|
|
7199
|
+
});
|
|
7200
|
+
/**
|
|
7201
|
+
* Create record
|
|
7202
|
+
*
|
|
7203
|
+
* Create a customer record with property values and optional initial associations. Discover objectType with schemas.list and allowed property names with properties.list; save the returned id for subsequent calls. Each call creates a record. Example for contacts: {"properties":{"email":"person@example.com"}}. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
7204
|
+
*/
|
|
7205
|
+
export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
7206
|
+
security: [{
|
|
7207
|
+
key: 'crm-bearerAuth',
|
|
7208
|
+
scheme: 'bearer',
|
|
7209
|
+
type: 'http'
|
|
7210
|
+
}],
|
|
7211
|
+
url: '/crm/v1/objects/{objectType}',
|
|
7212
|
+
...options,
|
|
7213
|
+
headers: {
|
|
7214
|
+
'Content-Type': 'application/json',
|
|
7215
|
+
...options.headers
|
|
7216
|
+
}
|
|
7217
|
+
});
|
|
7218
|
+
/**
|
|
7219
|
+
* Archive record
|
|
7220
|
+
*
|
|
7221
|
+
* Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
7222
|
+
*/
|
|
7223
|
+
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
7224
|
+
security: [{
|
|
7225
|
+
key: 'crm-bearerAuth',
|
|
7226
|
+
scheme: 'bearer',
|
|
7227
|
+
type: 'http'
|
|
7228
|
+
}],
|
|
7229
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
7230
|
+
...options
|
|
7231
|
+
});
|
|
7232
|
+
/**
|
|
7233
|
+
* Retrieve record
|
|
7234
|
+
*
|
|
7235
|
+
* Read one record by id from objects.list, objects.search or objects.create. Select property names with properties and associated object types with associations; use idProperty only when objectId is a value of that unique property. Use archived=true to inspect an archived record.
|
|
7236
|
+
*/
|
|
7237
|
+
export const crmObjectsRetrieve = (options) => (options.client ?? client).get({
|
|
7238
|
+
querySerializer: { parameters: {
|
|
7239
|
+
associations: { array: { explode: false } },
|
|
7240
|
+
properties: { array: { explode: false } },
|
|
7241
|
+
propertiesWithHistory: { array: { explode: false } }
|
|
7242
|
+
} },
|
|
7243
|
+
security: [{
|
|
7244
|
+
key: 'crm-bearerAuth',
|
|
7245
|
+
scheme: 'bearer',
|
|
7246
|
+
type: 'http'
|
|
7247
|
+
}],
|
|
7248
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
7249
|
+
...options
|
|
7250
|
+
});
|
|
7251
|
+
/**
|
|
7252
|
+
* Update record
|
|
7253
|
+
*
|
|
7254
|
+
* Change only the supplied properties of a record selected from objects.list or objects.search. Omitted properties retain their values. Use property names from properties.list and valid stage ids from pipelines.retrieve. Stage-entry requirements must be satisfied by the resulting record; inspect 400 errors before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
7255
|
+
*/
|
|
7256
|
+
export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
7257
|
+
security: [{
|
|
7258
|
+
key: 'crm-bearerAuth',
|
|
7259
|
+
scheme: 'bearer',
|
|
7260
|
+
type: 'http'
|
|
7261
|
+
}],
|
|
7262
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
7263
|
+
...options,
|
|
7264
|
+
headers: {
|
|
7265
|
+
'Content-Type': 'application/json',
|
|
7266
|
+
...options.headers
|
|
7267
|
+
}
|
|
7268
|
+
});
|
|
7269
|
+
/**
|
|
7270
|
+
* Search records
|
|
7271
|
+
*
|
|
7272
|
+
* Find records using text query, property filters and sort order rather than scanning a list. Obtain objectType from schemas.list and filter propertyName values from properties.list. Supply filterGroups, sorts, properties, limit and after; use empty arrays for no filters, sorts or property selection, and an empty after for the first page. Copy paging.next.after with the same query to continue. This operation reads records without changing them.
|
|
7273
|
+
*/
|
|
7274
|
+
export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
7275
|
+
security: [{
|
|
7276
|
+
key: 'crm-bearerAuth',
|
|
7277
|
+
scheme: 'bearer',
|
|
7278
|
+
type: 'http'
|
|
7279
|
+
}],
|
|
7280
|
+
url: '/crm/v1/objects/{objectType}/search',
|
|
7281
|
+
...options,
|
|
7282
|
+
headers: {
|
|
7283
|
+
'Content-Type': 'application/json',
|
|
7284
|
+
...options.headers
|
|
7285
|
+
}
|
|
7286
|
+
});
|
|
7287
|
+
/**
|
|
7288
|
+
* Batch read records
|
|
7289
|
+
*
|
|
7290
|
+
* Read a set of known record ids in one call; use objects.search to discover ids first. Supply inputs with ids plus requested properties; set idProperty only when the inputs use unique-property values rather than record ids.
|
|
7291
|
+
*/
|
|
7292
|
+
export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
|
|
7293
|
+
security: [{
|
|
7294
|
+
key: 'crm-bearerAuth',
|
|
7295
|
+
scheme: 'bearer',
|
|
7296
|
+
type: 'http'
|
|
7297
|
+
}],
|
|
7298
|
+
url: '/crm/v1/objects/{objectType}/batch/read',
|
|
7299
|
+
...options,
|
|
7300
|
+
headers: {
|
|
7301
|
+
'Content-Type': 'application/json',
|
|
7302
|
+
...options.headers
|
|
7303
|
+
}
|
|
7304
|
+
});
|
|
7305
|
+
/**
|
|
7306
|
+
* Batch create records
|
|
7307
|
+
*
|
|
7308
|
+
* Create several records of one object type using inputs with properties and optional associations. Obtain property names from properties.list; each successful input creates a record, so inspect per-item errors before resubmitting failed inputs. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
7309
|
+
*/
|
|
7310
|
+
export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
|
|
7311
|
+
security: [{
|
|
7312
|
+
key: 'crm-bearerAuth',
|
|
7313
|
+
scheme: 'bearer',
|
|
7314
|
+
type: 'http'
|
|
7315
|
+
}],
|
|
7316
|
+
url: '/crm/v1/objects/{objectType}/batch/create',
|
|
7317
|
+
...options,
|
|
7318
|
+
headers: {
|
|
7319
|
+
'Content-Type': 'application/json',
|
|
7320
|
+
...options.headers
|
|
7321
|
+
}
|
|
7322
|
+
});
|
|
7323
|
+
/**
|
|
7324
|
+
* Batch update records
|
|
7325
|
+
*
|
|
7326
|
+
* Apply distinct property patches to existing records identified by inputs[].id. Obtain ids from objects.list or objects.search and property names from properties.list. Omitted properties retain their values; inspect results and errors for each input. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
7327
|
+
*/
|
|
7328
|
+
export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
|
|
7329
|
+
security: [{
|
|
7330
|
+
key: 'crm-bearerAuth',
|
|
7331
|
+
scheme: 'bearer',
|
|
7332
|
+
type: 'http'
|
|
7333
|
+
}],
|
|
7334
|
+
url: '/crm/v1/objects/{objectType}/batch/update',
|
|
7335
|
+
...options,
|
|
7336
|
+
headers: {
|
|
7337
|
+
'Content-Type': 'application/json',
|
|
7338
|
+
...options.headers
|
|
7339
|
+
}
|
|
7340
|
+
});
|
|
7341
|
+
/**
|
|
7342
|
+
* Batch upsert records
|
|
7343
|
+
*
|
|
7344
|
+
* Create records that do not yet exist or update matches using a unique property. Provide idProperty and its value in each input, plus properties; choose a property with hasUniqueValue from properties.list. Inspect each result to determine whether it was newly created. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
7345
|
+
*/
|
|
7346
|
+
export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
|
|
7347
|
+
security: [{
|
|
7348
|
+
key: 'crm-bearerAuth',
|
|
7349
|
+
scheme: 'bearer',
|
|
7350
|
+
type: 'http'
|
|
7351
|
+
}],
|
|
7352
|
+
url: '/crm/v1/objects/{objectType}/batch/upsert',
|
|
7353
|
+
...options,
|
|
7354
|
+
headers: {
|
|
7355
|
+
'Content-Type': 'application/json',
|
|
7356
|
+
...options.headers
|
|
7357
|
+
}
|
|
7358
|
+
});
|
|
7359
|
+
/**
|
|
7360
|
+
* Batch archive records
|
|
7111
7361
|
*
|
|
7112
7362
|
* Archive known records of one object type using inputs[].id from objects.list or objects.search. Archived records leave active lists but retain their history; confirm all ids before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
7113
7363
|
*/
|
|
@@ -7518,6 +7768,241 @@ export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
|
7518
7768
|
...options.headers
|
|
7519
7769
|
}
|
|
7520
7770
|
});
|
|
7771
|
+
/**
|
|
7772
|
+
* Create a grant code
|
|
7773
|
+
*
|
|
7774
|
+
* 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. When the browser still holds that visitor's own access token, send it as anonymous_access_token instead of merge_customer_id: the door verifies it and merges the visitor it names, which is the usual way a merchant continues a session the browser already began. 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.
|
|
7775
|
+
*/
|
|
7776
|
+
export const customerCreateGrantCode = (options) => (options.client ?? client).post({
|
|
7777
|
+
security: [{
|
|
7778
|
+
key: 'BearerAuth',
|
|
7779
|
+
scheme: 'bearer',
|
|
7780
|
+
type: 'http'
|
|
7781
|
+
}, {
|
|
7782
|
+
key: 'ApiKeyAuth',
|
|
7783
|
+
name: 'X-API-Key',
|
|
7784
|
+
type: 'apiKey'
|
|
7785
|
+
}],
|
|
7786
|
+
url: '/customer/v1/grant_codes',
|
|
7787
|
+
...options,
|
|
7788
|
+
headers: {
|
|
7789
|
+
'Content-Type': 'application/json',
|
|
7790
|
+
...options.headers
|
|
7791
|
+
}
|
|
7792
|
+
});
|
|
7793
|
+
/**
|
|
7794
|
+
* Exchange a grant code or publishable key
|
|
7795
|
+
*
|
|
7796
|
+
* 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.
|
|
7797
|
+
*/
|
|
7798
|
+
export const customerCreateAccessToken = (options) => (options.client ?? client).post({
|
|
7799
|
+
url: '/customer/v1/access_tokens',
|
|
7800
|
+
...options,
|
|
7801
|
+
headers: {
|
|
7802
|
+
'Content-Type': 'application/json',
|
|
7803
|
+
...options.headers
|
|
7804
|
+
}
|
|
7805
|
+
});
|
|
7806
|
+
/**
|
|
7807
|
+
* Renew an access token
|
|
7808
|
+
*
|
|
7809
|
+
* 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.
|
|
7810
|
+
*/
|
|
7811
|
+
export const customerRenewAccessToken = (options) => (options?.client ?? client).post({ url: '/customer/v1/access_tokens/renew', ...options });
|
|
7812
|
+
/**
|
|
7813
|
+
* Sign out the current token
|
|
7814
|
+
*
|
|
7815
|
+
* 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.
|
|
7816
|
+
*/
|
|
7817
|
+
export const customerRevokeCurrentTokens = (options) => (options?.client ?? client).delete({ url: '/customer/v1/access_tokens/current', ...options });
|
|
7818
|
+
/**
|
|
7819
|
+
* List end users
|
|
7820
|
+
*
|
|
7821
|
+
* 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.
|
|
7822
|
+
*/
|
|
7823
|
+
export const customerListCustomers = (options) => (options?.client ?? client).get({
|
|
7824
|
+
security: [{
|
|
7825
|
+
key: 'BearerAuth',
|
|
7826
|
+
scheme: 'bearer',
|
|
7827
|
+
type: 'http'
|
|
7828
|
+
}, {
|
|
7829
|
+
key: 'ApiKeyAuth',
|
|
7830
|
+
name: 'X-API-Key',
|
|
7831
|
+
type: 'apiKey'
|
|
7832
|
+
}],
|
|
7833
|
+
url: '/customer/v1/customers',
|
|
7834
|
+
...options
|
|
7835
|
+
});
|
|
7836
|
+
/**
|
|
7837
|
+
* Delete an end user
|
|
7838
|
+
*
|
|
7839
|
+
* 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.
|
|
7840
|
+
*/
|
|
7841
|
+
export const customerDeleteCustomer = (options) => (options.client ?? client).delete({
|
|
7842
|
+
security: [{
|
|
7843
|
+
key: 'BearerAuth',
|
|
7844
|
+
scheme: 'bearer',
|
|
7845
|
+
type: 'http'
|
|
7846
|
+
}, {
|
|
7847
|
+
key: 'ApiKeyAuth',
|
|
7848
|
+
name: 'X-API-Key',
|
|
7849
|
+
type: 'apiKey'
|
|
7850
|
+
}],
|
|
7851
|
+
url: '/customer/v1/customers/{customer_id}',
|
|
7852
|
+
...options
|
|
7853
|
+
});
|
|
7854
|
+
/**
|
|
7855
|
+
* Get an end user
|
|
7856
|
+
*
|
|
7857
|
+
* 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.
|
|
7858
|
+
*/
|
|
7859
|
+
export const customerGetCustomer = (options) => (options.client ?? client).get({
|
|
7860
|
+
security: [{
|
|
7861
|
+
key: 'BearerAuth',
|
|
7862
|
+
scheme: 'bearer',
|
|
7863
|
+
type: 'http'
|
|
7864
|
+
}, {
|
|
7865
|
+
key: 'ApiKeyAuth',
|
|
7866
|
+
name: 'X-API-Key',
|
|
7867
|
+
type: 'apiKey'
|
|
7868
|
+
}],
|
|
7869
|
+
url: '/customer/v1/customers/{customer_id}',
|
|
7870
|
+
...options
|
|
7871
|
+
});
|
|
7872
|
+
/**
|
|
7873
|
+
* Read end-user usage
|
|
7874
|
+
*
|
|
7875
|
+
* 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.
|
|
7876
|
+
*/
|
|
7877
|
+
export const customerGetUsage = (options) => (options.client ?? client).get({
|
|
7878
|
+
security: [{
|
|
7879
|
+
key: 'BearerAuth',
|
|
7880
|
+
scheme: 'bearer',
|
|
7881
|
+
type: 'http'
|
|
7882
|
+
}, {
|
|
7883
|
+
key: 'ApiKeyAuth',
|
|
7884
|
+
name: 'X-API-Key',
|
|
7885
|
+
type: 'apiKey'
|
|
7886
|
+
}],
|
|
7887
|
+
url: '/customer/v1/customers/{customer_id}/usage',
|
|
7888
|
+
...options
|
|
7889
|
+
});
|
|
7890
|
+
/**
|
|
7891
|
+
* Block an end user
|
|
7892
|
+
*
|
|
7893
|
+
* 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.
|
|
7894
|
+
*/
|
|
7895
|
+
export const customerBlockCustomer = (options) => (options.client ?? client).post({
|
|
7896
|
+
security: [{
|
|
7897
|
+
key: 'BearerAuth',
|
|
7898
|
+
scheme: 'bearer',
|
|
7899
|
+
type: 'http'
|
|
7900
|
+
}, {
|
|
7901
|
+
key: 'ApiKeyAuth',
|
|
7902
|
+
name: 'X-API-Key',
|
|
7903
|
+
type: 'apiKey'
|
|
7904
|
+
}],
|
|
7905
|
+
url: '/customer/v1/customers/{customer_id}/block',
|
|
7906
|
+
...options,
|
|
7907
|
+
headers: {
|
|
7908
|
+
'Content-Type': 'application/json',
|
|
7909
|
+
...options.headers
|
|
7910
|
+
}
|
|
7911
|
+
});
|
|
7912
|
+
/**
|
|
7913
|
+
* Unblock an end user
|
|
7914
|
+
*
|
|
7915
|
+
* 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.
|
|
7916
|
+
*/
|
|
7917
|
+
export const customerUnblockCustomer = (options) => (options.client ?? client).post({
|
|
7918
|
+
security: [{
|
|
7919
|
+
key: 'BearerAuth',
|
|
7920
|
+
scheme: 'bearer',
|
|
7921
|
+
type: 'http'
|
|
7922
|
+
}, {
|
|
7923
|
+
key: 'ApiKeyAuth',
|
|
7924
|
+
name: 'X-API-Key',
|
|
7925
|
+
type: 'apiKey'
|
|
7926
|
+
}],
|
|
7927
|
+
url: '/customer/v1/customers/{customer_id}/unblock',
|
|
7928
|
+
...options
|
|
7929
|
+
});
|
|
7930
|
+
/**
|
|
7931
|
+
* Revoke every token of an end user
|
|
7932
|
+
*
|
|
7933
|
+
* 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.
|
|
7934
|
+
*/
|
|
7935
|
+
export const customerRevokeTokens = (options) => (options.client ?? client).post({
|
|
7936
|
+
security: [{
|
|
7937
|
+
key: 'BearerAuth',
|
|
7938
|
+
scheme: 'bearer',
|
|
7939
|
+
type: 'http'
|
|
7940
|
+
}, {
|
|
7941
|
+
key: 'ApiKeyAuth',
|
|
7942
|
+
name: 'X-API-Key',
|
|
7943
|
+
type: 'apiKey'
|
|
7944
|
+
}],
|
|
7945
|
+
url: '/customer/v1/customers/{customer_id}/revoke_tokens',
|
|
7946
|
+
...options
|
|
7947
|
+
});
|
|
7948
|
+
/**
|
|
7949
|
+
* List publishable keys
|
|
7950
|
+
*
|
|
7951
|
+
* 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.
|
|
7952
|
+
*/
|
|
7953
|
+
export const customerListPublishableKeys = (options) => (options?.client ?? client).get({
|
|
7954
|
+
security: [{
|
|
7955
|
+
key: 'BearerAuth',
|
|
7956
|
+
scheme: 'bearer',
|
|
7957
|
+
type: 'http'
|
|
7958
|
+
}, {
|
|
7959
|
+
key: 'ApiKeyAuth',
|
|
7960
|
+
name: 'X-API-Key',
|
|
7961
|
+
type: 'apiKey'
|
|
7962
|
+
}],
|
|
7963
|
+
url: '/customer/v1/publishable_keys',
|
|
7964
|
+
...options
|
|
7965
|
+
});
|
|
7966
|
+
/**
|
|
7967
|
+
* Create a publishable key
|
|
7968
|
+
*
|
|
7969
|
+
* 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.
|
|
7970
|
+
*/
|
|
7971
|
+
export const customerCreatePublishableKey = (options) => (options.client ?? client).post({
|
|
7972
|
+
security: [{
|
|
7973
|
+
key: 'BearerAuth',
|
|
7974
|
+
scheme: 'bearer',
|
|
7975
|
+
type: 'http'
|
|
7976
|
+
}, {
|
|
7977
|
+
key: 'ApiKeyAuth',
|
|
7978
|
+
name: 'X-API-Key',
|
|
7979
|
+
type: 'apiKey'
|
|
7980
|
+
}],
|
|
7981
|
+
url: '/customer/v1/publishable_keys',
|
|
7982
|
+
...options,
|
|
7983
|
+
headers: {
|
|
7984
|
+
'Content-Type': 'application/json',
|
|
7985
|
+
...options.headers
|
|
7986
|
+
}
|
|
7987
|
+
});
|
|
7988
|
+
/**
|
|
7989
|
+
* Delete a publishable key
|
|
7990
|
+
*
|
|
7991
|
+
* 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.
|
|
7992
|
+
*/
|
|
7993
|
+
export const customerDeletePublishableKey = (options) => (options.client ?? client).delete({
|
|
7994
|
+
security: [{
|
|
7995
|
+
key: 'BearerAuth',
|
|
7996
|
+
scheme: 'bearer',
|
|
7997
|
+
type: 'http'
|
|
7998
|
+
}, {
|
|
7999
|
+
key: 'ApiKeyAuth',
|
|
8000
|
+
name: 'X-API-Key',
|
|
8001
|
+
type: 'apiKey'
|
|
8002
|
+
}],
|
|
8003
|
+
url: '/customer/v1/publishable_keys/{key_id}',
|
|
8004
|
+
...options
|
|
8005
|
+
});
|
|
7521
8006
|
/**
|
|
7522
8007
|
* List projects
|
|
7523
8008
|
*
|
|
@@ -7720,8 +8205,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7720
8205
|
* - `transform` — Position, scale, rotation, opacity, crop, blur.
|
|
7721
8206
|
* - `fit` — contain, cover, fill or none.
|
|
7722
8207
|
* - `blend` — Layer blend mode; null clears.
|
|
7723
|
-
* - `style` — Text styling: font,
|
|
7724
|
-
* - `style.
|
|
8208
|
+
* - `style` — Text styling in Shotstack's rich shape: font, gradient, stroke, shadow, box, align, highlight.
|
|
8209
|
+
* - `style.align.vertical` — top, middle or bottom; omit it, never null.
|
|
7725
8210
|
* - `playback` — Rate, direction, audio policy, or freeze.
|
|
7726
8211
|
* - `volumeDb` — Audio level in dB; 0 is source level.
|
|
7727
8212
|
* - `gain` — Keyframed audio level in dB.
|
|
@@ -7742,6 +8227,8 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7742
8227
|
* - `JOIN_CONFLICT` — A join is invalid or blocks this edit.
|
|
7743
8228
|
* - `INVALID_TRANSITION` — Bad transition kind, parameter or length.
|
|
7744
8229
|
* - `INVALID_STYLE` — A style value is out of range.
|
|
8230
|
+
* - `UNSUPPORTED_STYLE_FIELD` — A Shotstack style field this platform cannot render yet.
|
|
8231
|
+
* - `STYLE_LEGACY_FIELDS` — A style written in the old flat shape; it still works.
|
|
7745
8232
|
* - `INVALID_MASK` — A mask definition is malformed.
|
|
7746
8233
|
* - `MASK_IN_USE` — The edit would break a live mask.
|
|
7747
8234
|
* - `TOO_MANY_MASKS` — At most 16 masks per project.
|
|
@@ -8769,6 +9256,20 @@ export const devopsTestReportsUpload = (options) => (options.client ?? client).p
|
|
|
8769
9256
|
...options.headers
|
|
8770
9257
|
}
|
|
8771
9258
|
});
|
|
9259
|
+
/**
|
|
9260
|
+
* Retrieve the merge gate's test plan at a commit
|
|
9261
|
+
*
|
|
9262
|
+
* 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.
|
|
9263
|
+
*/
|
|
9264
|
+
export const devopsTestPlanGet = (options) => (options.client ?? client).get({
|
|
9265
|
+
security: [{
|
|
9266
|
+
key: 'devops-bearerAuth',
|
|
9267
|
+
scheme: 'bearer',
|
|
9268
|
+
type: 'http'
|
|
9269
|
+
}],
|
|
9270
|
+
url: '/devops/v1/projects/{project}/test-plan',
|
|
9271
|
+
...options
|
|
9272
|
+
});
|
|
8772
9273
|
/**
|
|
8773
9274
|
* List projects
|
|
8774
9275
|
*
|
|
@@ -9495,6 +9996,38 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
9495
9996
|
...options.headers
|
|
9496
9997
|
}
|
|
9497
9998
|
});
|
|
9999
|
+
/**
|
|
10000
|
+
* Open a change's pull request
|
|
10001
|
+
*
|
|
10002
|
+
* 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 its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
10003
|
+
*/
|
|
10004
|
+
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
10005
|
+
security: [{
|
|
10006
|
+
key: 'devops-bearerAuth',
|
|
10007
|
+
scheme: 'bearer',
|
|
10008
|
+
type: 'http'
|
|
10009
|
+
}],
|
|
10010
|
+
url: '/devops/v1/changes/{id}:openPullRequest',
|
|
10011
|
+
...options,
|
|
10012
|
+
headers: {
|
|
10013
|
+
'Content-Type': 'application/json',
|
|
10014
|
+
...options.headers
|
|
10015
|
+
}
|
|
10016
|
+
});
|
|
10017
|
+
/**
|
|
10018
|
+
* Get a change workspace's read-only git credential
|
|
10019
|
+
*
|
|
10020
|
+
* A read-only git credential for the repository a change's project is bound to: a GitHub App installation token limited to that one repository with contents read, which GitHub expires within an hour. It exists for git's credential helper inside the change's cloud workspace (`praxis devops change git-credential`, installed by DevOps when it clones the repository), so `git fetch`, history and lazily fetched file contents work there; the helper hands the token to that one git request and keeps nothing. Writing is never possible with it: commits reach the branch only through the unit push. You do not need to call this yourself. Anyone who can read the change can read its repository already through the code reads, so this grants no new access. An abandoned change is refused with INVALID_ARGUMENT and a project without a repository with SOURCE_NOT_CONFIGURED. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
10021
|
+
*/
|
|
10022
|
+
export const devopsChangesGitCredential = (options) => (options.client ?? client).post({
|
|
10023
|
+
security: [{
|
|
10024
|
+
key: 'devops-bearerAuth',
|
|
10025
|
+
scheme: 'bearer',
|
|
10026
|
+
type: 'http'
|
|
10027
|
+
}],
|
|
10028
|
+
url: '/devops/v1/changes/{id}:gitCredential',
|
|
10029
|
+
...options
|
|
10030
|
+
});
|
|
9498
10031
|
/**
|
|
9499
10032
|
* List a project's pull requests
|
|
9500
10033
|
*
|
|
@@ -9866,7 +10399,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
|
|
|
9866
10399
|
/**
|
|
9867
10400
|
* Push a unit's branch
|
|
9868
10401
|
*
|
|
9869
|
-
* Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that
|
|
10402
|
+
* Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.
|
|
9870
10403
|
*/
|
|
9871
10404
|
export const devopsUnitsPush = (options) => (options.client ?? client).post({
|
|
9872
10405
|
security: [{
|
|
@@ -10664,7 +11197,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
10664
11197
|
/**
|
|
10665
11198
|
* Get job
|
|
10666
11199
|
*
|
|
10667
|
-
* Read
|
|
11200
|
+
* 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); 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.
|
|
10668
11201
|
*/
|
|
10669
11202
|
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
10670
11203
|
security: [{
|
|
@@ -10756,7 +11289,7 @@ export const mediaGetAssetLineage = (options) => (options.client ?? client).get(
|
|
|
10756
11289
|
/**
|
|
10757
11290
|
* Generate image
|
|
10758
11291
|
*
|
|
10759
|
-
* Generate
|
|
11292
|
+
* Generate images into a library from a prompt, optionally guided by existing pictures. {library_id} also accepts default, the organization’s default library. prompt is required; n (1 to 10), size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Name size, not an aspect ratio. Set output to sticker for a cut-out with a transparent background. references attach pictures of the same library with a role: subject keeps a person, product or scene consistent (several subjects put several characters in one picture), edit_target is the picture to change, style is the look to follow, structure the composition. Only a model whose modes in GET /media/v1/generation/capabilities include image takes references; any other answers INVALID_PARAMS naming the models that do, and a role a model cannot honour answers REFERENCE_TYPE_MISMATCH, both before anything is charged. A reference may be an element id (a character, product, scene or brand from the materials endpoints), which expands into its pictures and appends its description to the prompt. To draw several candidates of one key frame, send n and keep the ones you want; delete the rest. Charges are per image at the model API prices and appear in the Job’s usage; a refused or failed image costs nothing. 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.
|
|
10760
11293
|
*/
|
|
10761
11294
|
export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
10762
11295
|
security: [{
|
|
@@ -10774,7 +11307,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
|
10774
11307
|
/**
|
|
10775
11308
|
* Generate video
|
|
10776
11309
|
*
|
|
10777
|
-
* Generate
|
|
11310
|
+
* 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.
|
|
10778
11311
|
*/
|
|
10779
11312
|
export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
10780
11313
|
security: [{
|
|
@@ -10792,7 +11325,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
10792
11325
|
/**
|
|
10793
11326
|
* Edit asset
|
|
10794
11327
|
*
|
|
10795
|
-
*
|
|
11328
|
+
* 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 upscale; on a video, upscale, reframe, redact, trim, mute, crop, 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) 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); 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.
|
|
10796
11329
|
*/
|
|
10797
11330
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
10798
11331
|
security: [{
|
|
@@ -10894,56 +11427,106 @@ export const mediaUnderstandingFailureSummary = (options) => (options.client ??
|
|
|
10894
11427
|
*
|
|
10895
11428
|
* Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
|
|
10896
11429
|
*/
|
|
10897
|
-
export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
|
|
11430
|
+
export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
|
|
11431
|
+
security: [{
|
|
11432
|
+
key: 'media-BearerAuth',
|
|
11433
|
+
scheme: 'bearer',
|
|
11434
|
+
type: 'http'
|
|
11435
|
+
}],
|
|
11436
|
+
url: '/media/v1/libraries/{library_id}/understandings',
|
|
11437
|
+
...options
|
|
11438
|
+
});
|
|
11439
|
+
/**
|
|
11440
|
+
* List jobs
|
|
11441
|
+
*
|
|
11442
|
+
* List the batch and generation jobs of a library, newest first, to find a job whose id you lost or to watch several takes at once. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Each entry is the same Job that GET /media/v1/libraries/{library_id}/jobs/{job_id} returns, with outputs, failures and usage.
|
|
11443
|
+
*/
|
|
11444
|
+
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
11445
|
+
security: [{
|
|
11446
|
+
key: 'media-BearerAuth',
|
|
11447
|
+
scheme: 'bearer',
|
|
11448
|
+
type: 'http'
|
|
11449
|
+
}],
|
|
11450
|
+
url: '/media/v1/libraries/{library_id}/jobs',
|
|
11451
|
+
...options
|
|
11452
|
+
});
|
|
11453
|
+
/**
|
|
11454
|
+
* Cancel job
|
|
11455
|
+
*
|
|
11456
|
+
* Stop a generation job you no longer need, for example after the first takes of a draw show the prompt is wrong. Outputs that are queued are cancelled and never charged; outputs already produced stay in the library and stay charged. A video cannot be stopped once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and that output still finishes, is saved to the library and is charged. Read the returned Job, or poll it, to see which outputs ended.
|
|
11457
|
+
*/
|
|
11458
|
+
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
11459
|
+
security: [{
|
|
11460
|
+
key: 'media-BearerAuth',
|
|
11461
|
+
scheme: 'bearer',
|
|
11462
|
+
type: 'http'
|
|
11463
|
+
}],
|
|
11464
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
|
|
11465
|
+
...options
|
|
11466
|
+
});
|
|
11467
|
+
/**
|
|
11468
|
+
* Get generation capabilities
|
|
11469
|
+
*
|
|
11470
|
+
* Read what Praxis offers for each kind of generation — image, video and speech — before asking for one, and read a speech model’s voices here before naming one. Every type answers the models available for it, the model it uses when a request names none, and what each model costs per unit; a speech model the platform publishes voices for also carries default_voice and voices there, each voice with an id, a name, a gender, a language and a style — so a request for "a gentle female voice" is answered by matching the style and gender rather than by guessing an identifier. Pass a voice id back verbatim as voice, or omit voice to take default_voice; a voice that is neither one of those nor a voice material of the library is refused with INVALID_PARAMS before any job is created. OpenAI voice names such as alloy and aura are not valid here. The video fields beside the types keep their original meaning (intents, default model, duration and aspect-ratio limits, per-library concurrency). The models come from the platform model catalogue, and an id listed here is accepted verbatim as the model field of that type’s generation request. A video model additionally carries the modes it can be driven in and the durations, aspect ratios and resolutions the catalogue has registered for it — modes, duration_seconds, aspect_ratios and resolutions — so read them before requesting video and choose a mode and a value this model lists; an empty list means the platform has not registered that option yet, and then omit the field rather than assume a value. price.amount is a decimal string with its currency; video models that charge by resolution also carry price.by_resolution, whose amount is then the cheapest tier. A model the catalogue cannot route right now is still listed, with available false, so a caller can show it as temporarily unavailable instead of hiding it. When the catalogue cannot be read the endpoint still answers: every type comes back with an empty models list and its real default_model, and the voices a speech model carries are absent rather than empty, because the voices come from the platform and not from the catalogue. Generation is charged per unit and every output is stored in the library.
|
|
11471
|
+
*/
|
|
11472
|
+
export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
10898
11473
|
security: [{
|
|
10899
11474
|
key: 'media-BearerAuth',
|
|
10900
11475
|
scheme: 'bearer',
|
|
10901
11476
|
type: 'http'
|
|
10902
11477
|
}],
|
|
10903
|
-
url: '/media/v1/
|
|
11478
|
+
url: '/media/v1/generation/capabilities',
|
|
10904
11479
|
...options
|
|
10905
11480
|
});
|
|
10906
11481
|
/**
|
|
10907
|
-
*
|
|
11482
|
+
* Align asset
|
|
10908
11483
|
*
|
|
10909
|
-
*
|
|
11484
|
+
* Align two recordings by their sound and learn how they line up, without producing an asset. The route names the source asset; the body names the reference to compare against it. Both must be audio or a video, of the same library; anything else is refused with REFERENCE_TYPE_MISMATCH before a job exists. The call is an analysis: it decides and charges nothing else, bills per second of input, and stores no asset — the completed job carries the answer in result, offset_seconds saying how many seconds later the reference starts (so a caller holding both recordings knows which one to slide) and confidence how sure the correlation is. The analysis is idempotent on the source, the reference and the parameters: asking again with the same pair answers the completed job and its result instead of analysing and charging again. A max_offset_seconds caps how far apart the two may be; alignment needs an alignment model from the platform model catalogue, and with none published the request is refused with OPERATION_NOT_SUPPORTED, 尚未上架. Send Idempotency-Key, or idempotency_key in the body, to retry without analysing twice. The response is 202 with a queued Job whose operation is align; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read result. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/align with {"reference_asset_id":"3f2a9c1e5b7d4e6f8a0b1c2d3e4f5a6b","max_offset_seconds":30}.
|
|
10910
11485
|
*/
|
|
10911
|
-
export const
|
|
11486
|
+
export const mediaAlignAsset = (options) => (options.client ?? client).post({
|
|
10912
11487
|
security: [{
|
|
10913
11488
|
key: 'media-BearerAuth',
|
|
10914
11489
|
scheme: 'bearer',
|
|
10915
11490
|
type: 'http'
|
|
10916
11491
|
}],
|
|
10917
|
-
url: '/media/v1/libraries/{library_id}/
|
|
10918
|
-
...options
|
|
11492
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/align',
|
|
11493
|
+
...options,
|
|
11494
|
+
headers: {
|
|
11495
|
+
'Content-Type': 'application/json',
|
|
11496
|
+
...options.headers
|
|
11497
|
+
}
|
|
10919
11498
|
});
|
|
10920
11499
|
/**
|
|
10921
|
-
*
|
|
11500
|
+
* Get HLS renditions
|
|
10922
11501
|
*
|
|
10923
|
-
*
|
|
11502
|
+
* 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.
|
|
10924
11503
|
*/
|
|
10925
|
-
export const
|
|
11504
|
+
export const mediaGetHlsRenditions = (options) => (options.client ?? client).get({
|
|
10926
11505
|
security: [{
|
|
10927
11506
|
key: 'media-BearerAuth',
|
|
10928
11507
|
scheme: 'bearer',
|
|
10929
11508
|
type: 'http'
|
|
10930
11509
|
}],
|
|
10931
|
-
url: '/media/v1/libraries/{library_id}/
|
|
11510
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
10932
11511
|
...options
|
|
10933
11512
|
});
|
|
10934
11513
|
/**
|
|
10935
|
-
*
|
|
11514
|
+
* Request HLS renditions
|
|
10936
11515
|
*
|
|
10937
|
-
*
|
|
11516
|
+
* 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]}.
|
|
10938
11517
|
*/
|
|
10939
|
-
export const
|
|
11518
|
+
export const mediaRequestHlsRenditions = (options) => (options.client ?? client).post({
|
|
10940
11519
|
security: [{
|
|
10941
11520
|
key: 'media-BearerAuth',
|
|
10942
11521
|
scheme: 'bearer',
|
|
10943
11522
|
type: 'http'
|
|
10944
11523
|
}],
|
|
10945
|
-
url: '/media/v1/
|
|
10946
|
-
...options
|
|
11524
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11525
|
+
...options,
|
|
11526
|
+
headers: {
|
|
11527
|
+
'Content-Type': 'application/json',
|
|
11528
|
+
...options.headers
|
|
11529
|
+
}
|
|
10947
11530
|
});
|
|
10948
11531
|
/**
|
|
10949
11532
|
* List types
|
|
@@ -11187,6 +11770,284 @@ export const ontologySearch = (options) => (options.client ?? client).post({
|
|
|
11187
11770
|
...options.headers
|
|
11188
11771
|
}
|
|
11189
11772
|
});
|
|
11773
|
+
/**
|
|
11774
|
+
* List repositories
|
|
11775
|
+
*
|
|
11776
|
+
* 列出这个组织现有的库,默认库也在其中。库很少,一页通常装得下;用 next_cursor 翻页。先在这里拿到 repository_id,再用它列出或发布包。
|
|
11777
|
+
*/
|
|
11778
|
+
export const registryRepositoriesList = (options) => (options?.client ?? client).get({
|
|
11779
|
+
security: [{
|
|
11780
|
+
key: 'registry-bearerAuth',
|
|
11781
|
+
scheme: 'bearer',
|
|
11782
|
+
type: 'http'
|
|
11783
|
+
}],
|
|
11784
|
+
url: '/registry/v1/repositories',
|
|
11785
|
+
...options
|
|
11786
|
+
});
|
|
11787
|
+
/**
|
|
11788
|
+
* Create repository
|
|
11789
|
+
*
|
|
11790
|
+
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
|
|
11791
|
+
*/
|
|
11792
|
+
export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
|
|
11793
|
+
security: [{
|
|
11794
|
+
key: 'registry-bearerAuth',
|
|
11795
|
+
scheme: 'bearer',
|
|
11796
|
+
type: 'http'
|
|
11797
|
+
}],
|
|
11798
|
+
url: '/registry/v1/repositories',
|
|
11799
|
+
...options,
|
|
11800
|
+
headers: {
|
|
11801
|
+
'Content-Type': 'application/json',
|
|
11802
|
+
...options.headers
|
|
11803
|
+
}
|
|
11804
|
+
});
|
|
11805
|
+
/**
|
|
11806
|
+
* Delete repository
|
|
11807
|
+
*
|
|
11808
|
+
* 删一个空的库。默认库不能删(FAILED_PRECONDITION);库里还有包时也不能删,先把包删掉或改用别的库。删除请求重发会 404,所以删除前先读一次确认。
|
|
11809
|
+
*/
|
|
11810
|
+
export const registryRepositoriesDelete = (options) => (options.client ?? client).delete({
|
|
11811
|
+
security: [{
|
|
11812
|
+
key: 'registry-bearerAuth',
|
|
11813
|
+
scheme: 'bearer',
|
|
11814
|
+
type: 'http'
|
|
11815
|
+
}],
|
|
11816
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11817
|
+
...options
|
|
11818
|
+
});
|
|
11819
|
+
/**
|
|
11820
|
+
* Retrieve repository
|
|
11821
|
+
*
|
|
11822
|
+
* 读一个库的名称、说明、包数量和默认标记。repository_id 来自 repositories.list 或 repositories.create;另一个组织的库或不存在的库一律 404,不区分两者。
|
|
11823
|
+
*/
|
|
11824
|
+
export const registryRepositoriesRetrieve = (options) => (options.client ?? client).get({
|
|
11825
|
+
security: [{
|
|
11826
|
+
key: 'registry-bearerAuth',
|
|
11827
|
+
scheme: 'bearer',
|
|
11828
|
+
type: 'http'
|
|
11829
|
+
}],
|
|
11830
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11831
|
+
...options
|
|
11832
|
+
});
|
|
11833
|
+
/**
|
|
11834
|
+
* Update repository
|
|
11835
|
+
*
|
|
11836
|
+
* 改库的 display_name 或 description。只送要改的字段,省略的保持原值;name 建库之后不能改,它标识库。一个字段都不送会 400。
|
|
11837
|
+
*/
|
|
11838
|
+
export const registryRepositoriesUpdate = (options) => (options.client ?? client).patch({
|
|
11839
|
+
security: [{
|
|
11840
|
+
key: 'registry-bearerAuth',
|
|
11841
|
+
scheme: 'bearer',
|
|
11842
|
+
type: 'http'
|
|
11843
|
+
}],
|
|
11844
|
+
url: '/registry/v1/repositories/{repository_id}',
|
|
11845
|
+
...options,
|
|
11846
|
+
headers: {
|
|
11847
|
+
'Content-Type': 'application/json',
|
|
11848
|
+
...options.headers
|
|
11849
|
+
}
|
|
11850
|
+
});
|
|
11851
|
+
/**
|
|
11852
|
+
* List packages
|
|
11853
|
+
*
|
|
11854
|
+
* 列出一个库里的包,可按种类筛、按名字搜、按最近更新或下载量排序。kind=skill 只看技能,kind=plugin 只看插件,省略则两类都返回。q 在 name、title 和 description 上做子串匹配。sort 默认 updated;downloads 按累计下载量降序,用来找这个库最常用的资源。
|
|
11855
|
+
*/
|
|
11856
|
+
export const registryRepositoriesPackagesList = (options) => (options.client ?? client).get({
|
|
11857
|
+
security: [{
|
|
11858
|
+
key: 'registry-bearerAuth',
|
|
11859
|
+
scheme: 'bearer',
|
|
11860
|
+
type: 'http'
|
|
11861
|
+
}],
|
|
11862
|
+
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
11863
|
+
...options
|
|
11864
|
+
});
|
|
11865
|
+
/**
|
|
11866
|
+
* Publish a package
|
|
11867
|
+
*
|
|
11868
|
+
* 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 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 发布。
|
|
11869
|
+
*/
|
|
11870
|
+
export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
|
|
11871
|
+
...formDataBodySerializer,
|
|
11872
|
+
security: [{
|
|
11873
|
+
key: 'registry-bearerAuth',
|
|
11874
|
+
scheme: 'bearer',
|
|
11875
|
+
type: 'http'
|
|
11876
|
+
}],
|
|
11877
|
+
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
11878
|
+
...options,
|
|
11879
|
+
headers: {
|
|
11880
|
+
'Content-Type': null,
|
|
11881
|
+
...options.headers
|
|
11882
|
+
}
|
|
11883
|
+
});
|
|
11884
|
+
/**
|
|
11885
|
+
* Retrieve package
|
|
11886
|
+
*
|
|
11887
|
+
* 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。
|
|
11888
|
+
*/
|
|
11889
|
+
export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
|
|
11890
|
+
security: [{
|
|
11891
|
+
key: 'registry-bearerAuth',
|
|
11892
|
+
scheme: 'bearer',
|
|
11893
|
+
type: 'http'
|
|
11894
|
+
}],
|
|
11895
|
+
url: '/registry/v1/packages/{package_id}',
|
|
11896
|
+
...options
|
|
11897
|
+
});
|
|
11898
|
+
/**
|
|
11899
|
+
* List versions
|
|
11900
|
+
*
|
|
11901
|
+
* 列出一个包的所有版本,含已撤回的。撤回的版本仍在列表里(它占着版本号),withdrawn 为 true,并带 withdraw_time。按发布顺序返回。
|
|
11902
|
+
*/
|
|
11903
|
+
export const registryPackagesVersionsList = (options) => (options.client ?? client).get({
|
|
11904
|
+
security: [{
|
|
11905
|
+
key: 'registry-bearerAuth',
|
|
11906
|
+
scheme: 'bearer',
|
|
11907
|
+
type: 'http'
|
|
11908
|
+
}],
|
|
11909
|
+
url: '/registry/v1/packages/{package_id}/versions',
|
|
11910
|
+
...options
|
|
11911
|
+
});
|
|
11912
|
+
/**
|
|
11913
|
+
* Publish a version
|
|
11914
|
+
*
|
|
11915
|
+
* 给一个已有的包发新版本。请求体与 packages.create 相同(multipart:version 必填,archive 或 files 给内容),但种类和名字沿用这个包,不再从上传内容重判。version 必须比已发布的最高版本高(撤回的版本也占号,不能复用);比它低或相等返回 FAILED_PRECONDITION。title、description、tags 不填就沿用这个包现在显示的,不会被新版本里 SKILL.md 或 plugin.json 的描述覆盖;要改就在这次请求里给。作者不随新版本改变。
|
|
11916
|
+
*/
|
|
11917
|
+
export const registryPackagesVersionsCreate = (options) => (options.client ?? client).post({
|
|
11918
|
+
...formDataBodySerializer,
|
|
11919
|
+
security: [{
|
|
11920
|
+
key: 'registry-bearerAuth',
|
|
11921
|
+
scheme: 'bearer',
|
|
11922
|
+
type: 'http'
|
|
11923
|
+
}],
|
|
11924
|
+
url: '/registry/v1/packages/{package_id}/versions',
|
|
11925
|
+
...options,
|
|
11926
|
+
headers: {
|
|
11927
|
+
'Content-Type': null,
|
|
11928
|
+
...options.headers
|
|
11929
|
+
}
|
|
11930
|
+
});
|
|
11931
|
+
/**
|
|
11932
|
+
* List version contents
|
|
11933
|
+
*
|
|
11934
|
+
* 列出一个版本解压后的文件清单(路径和大小),用来在不下载整个包的前提下看它包含什么。路径是相对包根的,例如 SKILL.md 或 plugin/skills/review.md。已撤回的版本仍可读清单。
|
|
11935
|
+
*/
|
|
11936
|
+
export const registryPackagesVersionsContents = (options) => (options.client ?? client).get({
|
|
11937
|
+
security: [{
|
|
11938
|
+
key: 'registry-bearerAuth',
|
|
11939
|
+
scheme: 'bearer',
|
|
11940
|
+
type: 'http'
|
|
11941
|
+
}],
|
|
11942
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/contents',
|
|
11943
|
+
...options
|
|
11944
|
+
});
|
|
11945
|
+
/**
|
|
11946
|
+
* Download a file
|
|
11947
|
+
*
|
|
11948
|
+
* 下载一个版本里的单个文件,返回原始字节。path 是 contents 给出的路径,可以含斜杠(例如 plugin/skills/review.md)。用它按文件取内容,装到磁盘上时保留这个相对路径。不计入 downloads。
|
|
11949
|
+
*/
|
|
11950
|
+
export const registryPackagesVersionsFilesRetrieve = (options) => (options.client ?? client).get({
|
|
11951
|
+
security: [{
|
|
11952
|
+
key: 'registry-bearerAuth',
|
|
11953
|
+
scheme: 'bearer',
|
|
11954
|
+
type: 'http'
|
|
11955
|
+
}],
|
|
11956
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/files/{path}',
|
|
11957
|
+
...options
|
|
11958
|
+
});
|
|
11959
|
+
/**
|
|
11960
|
+
* Download version archive
|
|
11961
|
+
*
|
|
11962
|
+
* 下载一个版本的完整 zip 归档,用来整包安装或转存。每次调用都计入这个包的 downloads,所以不要为了看内容而反复拉 archive——先读 contents,只取需要的文件用 files 下载。
|
|
11963
|
+
*/
|
|
11964
|
+
export const registryPackagesVersionsArchive = (options) => (options.client ?? client).get({
|
|
11965
|
+
security: [{
|
|
11966
|
+
key: 'registry-bearerAuth',
|
|
11967
|
+
scheme: 'bearer',
|
|
11968
|
+
type: 'http'
|
|
11969
|
+
}],
|
|
11970
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}/archive',
|
|
11971
|
+
...options
|
|
11972
|
+
});
|
|
11973
|
+
/**
|
|
11974
|
+
* Withdraw a version
|
|
11975
|
+
*
|
|
11976
|
+
* 撤回一个版本。撤回后它不再是 latest、不能被新装;已经装好的照常可用。版本号仍被占着,不能再用它发新版本。已经撤回的版本再撤回会返回 FAILED_PRECONDITION。撤回是不可逆的:要重新提供这个版本,用更高的版本号重新发布。
|
|
11977
|
+
*/
|
|
11978
|
+
export const registryPackagesVersionsWithdraw = (options) => (options.client ?? client).post({
|
|
11979
|
+
security: [{
|
|
11980
|
+
key: 'registry-bearerAuth',
|
|
11981
|
+
scheme: 'bearer',
|
|
11982
|
+
type: 'http'
|
|
11983
|
+
}],
|
|
11984
|
+
url: '/registry/v1/packages/{package_id}/versions/{version}:withdraw',
|
|
11985
|
+
...options
|
|
11986
|
+
});
|
|
11987
|
+
/**
|
|
11988
|
+
* List installations
|
|
11989
|
+
*
|
|
11990
|
+
* 列出这个包装在哪些智能体和电脑上。每次读取都会和目标那边对账,以目标现在的实际情况为准,所以每条记录的 state 是读取这一刻的结论:installed 表示目标上有它且版本与记录一致;drifted 表示目标上有它但版本不同,此时 version 显示目标上的版本;missing 表示目标上已经没有它(被人在智能体或电脑那边删掉了),记录仍保留,可以用 installations.delete 清掉,或用 installations.update 重新装回;unknown 表示这次问不到目标,不代表没装,稍后重读。withdrawn 表示这条记录的版本已被撤回。一次返回全部记录,没有分页,按创建时间排序。
|
|
11991
|
+
*/
|
|
11992
|
+
export const registryPackagesInstallationsList = (options) => (options.client ?? client).get({
|
|
11993
|
+
security: [{
|
|
11994
|
+
key: 'registry-bearerAuth',
|
|
11995
|
+
scheme: 'bearer',
|
|
11996
|
+
type: 'http'
|
|
11997
|
+
}],
|
|
11998
|
+
url: '/registry/v1/packages/{package_id}/installations',
|
|
11999
|
+
...options
|
|
12000
|
+
});
|
|
12001
|
+
/**
|
|
12002
|
+
* Install a package
|
|
12003
|
+
*
|
|
12004
|
+
* 把一个包装到目标上:技能装到智能体(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 里。
|
|
12005
|
+
*/
|
|
12006
|
+
export const registryPackagesInstallationsCreate = (options) => (options.client ?? client).post({
|
|
12007
|
+
security: [{
|
|
12008
|
+
key: 'registry-bearerAuth',
|
|
12009
|
+
scheme: 'bearer',
|
|
12010
|
+
type: 'http'
|
|
12011
|
+
}],
|
|
12012
|
+
url: '/registry/v1/packages/{package_id}/installations',
|
|
12013
|
+
...options,
|
|
12014
|
+
headers: {
|
|
12015
|
+
'Content-Type': 'application/json',
|
|
12016
|
+
...options.headers
|
|
12017
|
+
}
|
|
12018
|
+
});
|
|
12019
|
+
/**
|
|
12020
|
+
* Update an installation
|
|
12021
|
+
*
|
|
12022
|
+
* 把一条安装记录换到另一个版本。技能可以换到任何未撤回的版本(升级或回退),version 省略时换到最新版;插件只能换到库里的最新版本,version 给了也必须等于最新版。撤回的版本不能换过去。对账为 missing 的记录用它可以重新装回去。同名冲突和 20 个技能上限的规则与安装时相同。
|
|
12023
|
+
*/
|
|
12024
|
+
export const registryInstallationsUpdate = (options) => (options.client ?? client).post({
|
|
12025
|
+
security: [{
|
|
12026
|
+
key: 'registry-bearerAuth',
|
|
12027
|
+
scheme: 'bearer',
|
|
12028
|
+
type: 'http'
|
|
12029
|
+
}],
|
|
12030
|
+
url: '/registry/v1/installations/{installation_id}:update',
|
|
12031
|
+
...options,
|
|
12032
|
+
headers: {
|
|
12033
|
+
'Content-Type': 'application/json',
|
|
12034
|
+
...options.headers
|
|
12035
|
+
}
|
|
12036
|
+
});
|
|
12037
|
+
/**
|
|
12038
|
+
* Remove an installation
|
|
12039
|
+
*
|
|
12040
|
+
* 把包从目标上卸下来,并删掉这条安装记录:技能从智能体的技能列表里移除,插件从电脑上卸载。目标那边已经没有它时也算完成。包本身和它的版本不受影响,之后可以重新安装。记录删除后重发会 404,所以删除前先用 installations.list 确认。
|
|
12041
|
+
*/
|
|
12042
|
+
export const registryInstallationsDelete = (options) => (options.client ?? client).delete({
|
|
12043
|
+
security: [{
|
|
12044
|
+
key: 'registry-bearerAuth',
|
|
12045
|
+
scheme: 'bearer',
|
|
12046
|
+
type: 'http'
|
|
12047
|
+
}],
|
|
12048
|
+
url: '/registry/v1/installations/{installation_id}',
|
|
12049
|
+
...options
|
|
12050
|
+
});
|
|
11190
12051
|
/**
|
|
11191
12052
|
* List sandboxes (v2)
|
|
11192
12053
|
*
|
|
@@ -11228,7 +12089,7 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
11228
12089
|
/**
|
|
11229
12090
|
* Create sandbox (v2)
|
|
11230
12091
|
*
|
|
11231
|
-
* Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox.
|
|
12092
|
+
* Create a sandbox from a template. Every sandbox declares its lifecycle at creation. On the own face (X-Praxis-Face: own-v1) send ephemeral: true for an ephemeral sandbox (never pauses, cannot be snapshotted, deleted when it ends; for jobs such as transcodes, scripts and builds) or ephemeral: false for a persistent one (pauses and resumes, snapshots, mounts volumes, kept after it stops; for long-lived computers). Leaving ephemeral out returns INVALID_PARAMS. autoPause: true, onExpire: pause, autoPauseMemory, autoResume, idleTimeout, retention and volumes belong to persistent sandboxes and need ephemeral: false. Choose persistent only for long-lived computers. On the E2B-compatible face autoPause is the declaration: true is persistent, false or absent is ephemeral and ends at its timeout. Responses carry ephemeral. When a sandbox's machine has ended (timeout, kill, retention, provider loss), reaching it returns SANDBOX_EXPIRED (410) with terminationReason in the message: its files are gone, create a new sandbox. To keep results, declare outputs: [{ path }] on the own face (up to eight absolute paths, a directory or a file): when the sandbox ends for any reason except provider loss or a failed start, each path is packed as .tar.gz and stored in File, and the killed event of GET /sandbox/v1/events/sandboxes/{sandboxID} lists each fileId or the reason it was not kept. Paths not declared are not kept. The E2B face refuses outputs.
|
|
11232
12093
|
*/
|
|
11233
12094
|
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
11234
12095
|
security: [
|
|
@@ -12307,6 +13168,66 @@ export const searchMap = (options) => (options.client ?? client).post({
|
|
|
12307
13168
|
...options.headers
|
|
12308
13169
|
}
|
|
12309
13170
|
});
|
|
13171
|
+
/**
|
|
13172
|
+
* List shares
|
|
13173
|
+
*
|
|
13174
|
+
* Find the shares of this organization, newest first, for example every link that exposes one file before you decide which to revoke. Filter by resource_type, resource_id and status; filters combine with AND. Continue with next_page_token as page_token until next_page_token is null. Records never include link.web_url. A credential bound to specific files must pass resource_type and resource_id of a bound file, and an unbound file answers 404.
|
|
13175
|
+
*/
|
|
13176
|
+
export const shareListPermissions = (options) => (options?.client ?? client).get({
|
|
13177
|
+
security: [{
|
|
13178
|
+
key: 'share-bearerAuth',
|
|
13179
|
+
scheme: 'bearer',
|
|
13180
|
+
type: 'http'
|
|
13181
|
+
}],
|
|
13182
|
+
url: '/share/v1/permissions',
|
|
13183
|
+
...options
|
|
13184
|
+
});
|
|
13185
|
+
/**
|
|
13186
|
+
* Create share
|
|
13187
|
+
*
|
|
13188
|
+
* Make one file readable by anyone holding a link, before sending the link to a person or embedding it. Name the object as resource {type, id}, with the file id from the File API. 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). The link is anonymous and read-only. A type other than file answers 400 RESOURCE_TYPE_UNSUPPORTED, and a file that is missing or outside your organization answers 404 RESOURCE_NOT_FOUND.
|
|
13189
|
+
*/
|
|
13190
|
+
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
13191
|
+
security: [{
|
|
13192
|
+
key: 'share-bearerAuth',
|
|
13193
|
+
scheme: 'bearer',
|
|
13194
|
+
type: 'http'
|
|
13195
|
+
}],
|
|
13196
|
+
url: '/share/v1/permissions',
|
|
13197
|
+
...options,
|
|
13198
|
+
headers: {
|
|
13199
|
+
'Content-Type': 'application/json',
|
|
13200
|
+
...options.headers
|
|
13201
|
+
}
|
|
13202
|
+
});
|
|
13203
|
+
/**
|
|
13204
|
+
* Delete share
|
|
13205
|
+
*
|
|
13206
|
+
* Take a link back so nobody can open it again. This revokes the share, the record stays readable with status revoked, and opening the link answers 410. Repeating the call on a revoked share is harmless and answers 204 again. Content addresses already signed when the link was opened expire on their own within five minutes. Take the id from shares.create or shares.list.
|
|
13207
|
+
*/
|
|
13208
|
+
export const shareDeletePermission = (options) => (options.client ?? client).delete({
|
|
13209
|
+
security: [{
|
|
13210
|
+
key: 'share-bearerAuth',
|
|
13211
|
+
scheme: 'bearer',
|
|
13212
|
+
type: 'http'
|
|
13213
|
+
}],
|
|
13214
|
+
url: '/share/v1/permissions/{id}',
|
|
13215
|
+
...options
|
|
13216
|
+
});
|
|
13217
|
+
/**
|
|
13218
|
+
* Retrieve share
|
|
13219
|
+
*
|
|
13220
|
+
* Read one share to see whether its link is still active, when it expires, and how many times it was opened. Take the id from shares.create or shares.list. The record never includes link.web_url, because the address is shown once at creation. A share that does not exist or belongs to another organization answers 404 PERMISSION_NOT_FOUND.
|
|
13221
|
+
*/
|
|
13222
|
+
export const shareRetrievePermission = (options) => (options.client ?? client).get({
|
|
13223
|
+
security: [{
|
|
13224
|
+
key: 'share-bearerAuth',
|
|
13225
|
+
scheme: 'bearer',
|
|
13226
|
+
type: 'http'
|
|
13227
|
+
}],
|
|
13228
|
+
url: '/share/v1/permissions/{id}',
|
|
13229
|
+
...options
|
|
13230
|
+
});
|
|
12310
13231
|
/**
|
|
12311
13232
|
* List the genres Studio can write
|
|
12312
13233
|
*
|