@deepraxis/sdk 0.1.1-dev.3aab976 → 0.1.1-dev.3ab122a
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 +37 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +74 -9
- package/dist/generated/sdk.gen.js +165 -8
- package/dist/generated/types.gen.d.ts +1154 -149
- package/dist/operations.generated.js +297 -10
- package/dist/resources.generated.d.ts +50 -0
- package/dist/resources.generated.js +26 -0
- package/package.json +1 -1
|
@@ -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 personal or 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
|
*
|
|
@@ -764,7 +782,7 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
764
782
|
*
|
|
765
783
|
* List the files this session delivered; an end-customer token reads its own session.
|
|
766
784
|
*
|
|
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.
|
|
785
|
+
* 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
786
|
*/
|
|
769
787
|
export const listSessionArtifacts = (options) => (options.client ?? client).get({
|
|
770
788
|
security: [{
|
|
@@ -784,7 +802,7 @@ export const listSessionArtifacts = (options) => (options.client ?? client).get(
|
|
|
784
802
|
*
|
|
785
803
|
* Mint a short-lived download address for one file of an artifact.
|
|
786
804
|
*
|
|
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.
|
|
805
|
+
* 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
806
|
*/
|
|
789
807
|
export const createSessionArtifactContentUrl = (options) => (options.client ?? client).post({
|
|
790
808
|
security: [{
|
|
@@ -803,6 +821,26 @@ export const createSessionArtifactContentUrl = (options) => (options.client ?? c
|
|
|
803
821
|
...options.headers
|
|
804
822
|
}
|
|
805
823
|
});
|
|
824
|
+
/**
|
|
825
|
+
* List Session Requests (Extension)
|
|
826
|
+
*
|
|
827
|
+
* List the requests a session is waiting on; an end-customer token reads its own session.
|
|
828
|
+
*
|
|
829
|
+
* 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.
|
|
830
|
+
*/
|
|
831
|
+
export const listSessionRequests = (options) => (options.client ?? client).get({
|
|
832
|
+
security: [{
|
|
833
|
+
key: 'BearerAuth',
|
|
834
|
+
scheme: 'bearer',
|
|
835
|
+
type: 'http'
|
|
836
|
+
}, {
|
|
837
|
+
key: 'ApiKeyAuth',
|
|
838
|
+
name: 'X-API-Key',
|
|
839
|
+
type: 'apiKey'
|
|
840
|
+
}],
|
|
841
|
+
url: '/agent/v1/sessions/{session_id}/requests',
|
|
842
|
+
...options
|
|
843
|
+
});
|
|
806
844
|
/**
|
|
807
845
|
* List Session Background Tasks (Extension)
|
|
808
846
|
*
|
|
@@ -1460,7 +1498,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
|
1460
1498
|
/**
|
|
1461
1499
|
* Create a one-time upload URL
|
|
1462
1500
|
*
|
|
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
|
|
1501
|
+
* 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
1502
|
*/
|
|
1465
1503
|
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1466
1504
|
security: [{
|
|
@@ -4012,7 +4050,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
|
|
|
4012
4050
|
/**
|
|
4013
4051
|
* List session events
|
|
4014
4052
|
*
|
|
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 personal or 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.
|
|
4053
|
+
* Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids; a request nobody answered within 24 hours is settled as unanswered and the session goes idle with stop_reason request_expired, which the /anthropic/v1 face shows as end_turn), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, system.notification_suppressed (pending background notifications that hit the wake quota and started no run), system.notification_recorded, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter. This operation addresses one session — normally a worker session an agent dispatched; to talk to a personal or 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
4054
|
*/
|
|
4017
4055
|
export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
4018
4056
|
security: [{
|
|
@@ -7681,6 +7719,12 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7681
7719
|
* - `RippleDeleteRange` — Cut a time range and close the gap.
|
|
7682
7720
|
* - `DeleteWords` — Cut transcript words and ripple every track, keeping a breath.
|
|
7683
7721
|
* - `RemoveFillers` — List and delete filler words by media's own labels; dryRun first.
|
|
7722
|
+
* - `Matte` — Replace the clip's background with media's matte of its source, read as a luma mask.
|
|
7723
|
+
* - `EnhanceVoice` — Replace a clip's sound with media's enhanced speech on its own audio track.
|
|
7724
|
+
* - `AlignByAudio` — Line two recordings of the same sound up by media's measurement of their offset.
|
|
7725
|
+
* - `Reframe` — Swap the clip's media for media's reframed take at the aspect you ask for.
|
|
7726
|
+
* - `Upscale` — Swap the clip's media for media's upscaled take at the height you ask for.
|
|
7727
|
+
* - `Redact` — Pixelate the faces, QR codes or text media marks, leaving the rest of the frame plain.
|
|
7684
7728
|
* - `AddTrack` — Add a video, audio or caption track.
|
|
7685
7729
|
* - `MoveTrack` — Move a track between layers; 0 is the topmost.
|
|
7686
7730
|
* - `UpdateTrack` — Change a track's name, lock, gain or role.
|
|
@@ -7784,6 +7828,9 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7784
7828
|
* - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
|
|
7785
7829
|
* - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
|
|
7786
7830
|
* - `MEDIA_IMPORT_FAILED` — Importing media failed.
|
|
7831
|
+
* - `MEDIA_PROCESSING` — Media is still processing the clip; wait for the job and rerun.
|
|
7832
|
+
* - `MEDIA_PROCESSING_FAILED` — Media's processing job failed; nothing changed.
|
|
7833
|
+
* - `ALIGNMENT_UNCERTAIN` — `AlignByAudio` confidence too low; nothing changed.
|
|
7787
7834
|
* - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
|
|
7788
7835
|
* - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
|
|
7789
7836
|
* - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
|
|
@@ -9857,7 +9904,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
|
|
|
9857
9904
|
/**
|
|
9858
9905
|
* Push a unit's branch
|
|
9859
9906
|
*
|
|
9860
|
-
* 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
|
|
9907
|
+
* 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.
|
|
9861
9908
|
*/
|
|
9862
9909
|
export const devopsUnitsPush = (options) => (options.client ?? client).post({
|
|
9863
9910
|
security: [{
|
|
@@ -10783,7 +10830,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
10783
10830
|
/**
|
|
10784
10831
|
* Edit asset
|
|
10785
10832
|
*
|
|
10786
|
-
* Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks mask (a black-and-white matte as a small H.264 video, person white and background black: use it as a Cut track mask with channel luma under the original video to lay a lecturer over slides — the choice for compositing) or alpha (the default: the person on a transparent background as ProRes 4444, which is very large, about 870 MB per 15 seconds of 1080p, so ask for it only when a transparent file itself is the deliverable), and model picks the matting model from types.matting.models of the generation capabilities — read it first, because a request that names none takes the first available matting model and a video is refused with OPERATION_NOT_SUPPORTED, in the model field, when the platform has published none. output and model mean nothing for an image source and are refused with INVALID_PARAMS naming the field rather than ignored. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
|
|
10833
|
+
* Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe and redact through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe and redact on a video), and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. The processing lane takes its model from the platform model catalogue, judged by the operation’s capability and overridable with operation.model, and bills per second of input; each edit is idempotent on the source, the operation and the parameters, so a second request that would make the same asset answers the asset already made instead of paying again, and an operation whose catalogue list is empty is refused with OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks mask (a black-and-white matte as a small H.264 video, person white and background black: use it as a Cut track mask with channel luma under the original video to lay a lecturer over slides — the choice for compositing) or alpha (the default: the person on a transparent background as ProRes 4444, which is very large, about 870 MB per 15 seconds of 1080p, so ask for it only when a transparent file itself is the deliverable), and model picks the matting model from types.matting.models of the generation capabilities — read it first, because a request that names none takes the first available matting model and a video is refused with OPERATION_NOT_SUPPORTED, in the model field, when the platform has published none. output and model mean nothing for an image source and are refused with INVALID_PARAMS naming the field rather than ignored. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
|
|
10787
10834
|
*/
|
|
10788
10835
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
10789
10836
|
security: [{
|
|
@@ -10936,6 +10983,56 @@ export const mediaGetGenerationCapabilities = (options) => (options?.client ?? c
|
|
|
10936
10983
|
url: '/media/v1/generation/capabilities',
|
|
10937
10984
|
...options
|
|
10938
10985
|
});
|
|
10986
|
+
/**
|
|
10987
|
+
* Align asset
|
|
10988
|
+
*
|
|
10989
|
+
* 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}.
|
|
10990
|
+
*/
|
|
10991
|
+
export const mediaAlignAsset = (options) => (options.client ?? client).post({
|
|
10992
|
+
security: [{
|
|
10993
|
+
key: 'media-BearerAuth',
|
|
10994
|
+
scheme: 'bearer',
|
|
10995
|
+
type: 'http'
|
|
10996
|
+
}],
|
|
10997
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/align',
|
|
10998
|
+
...options,
|
|
10999
|
+
headers: {
|
|
11000
|
+
'Content-Type': 'application/json',
|
|
11001
|
+
...options.headers
|
|
11002
|
+
}
|
|
11003
|
+
});
|
|
11004
|
+
/**
|
|
11005
|
+
* Get HLS renditions
|
|
11006
|
+
*
|
|
11007
|
+
* 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.
|
|
11008
|
+
*/
|
|
11009
|
+
export const mediaGetHlsRenditions = (options) => (options.client ?? client).get({
|
|
11010
|
+
security: [{
|
|
11011
|
+
key: 'media-BearerAuth',
|
|
11012
|
+
scheme: 'bearer',
|
|
11013
|
+
type: 'http'
|
|
11014
|
+
}],
|
|
11015
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11016
|
+
...options
|
|
11017
|
+
});
|
|
11018
|
+
/**
|
|
11019
|
+
* Request HLS renditions
|
|
11020
|
+
*
|
|
11021
|
+
* 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]}.
|
|
11022
|
+
*/
|
|
11023
|
+
export const mediaRequestHlsRenditions = (options) => (options.client ?? client).post({
|
|
11024
|
+
security: [{
|
|
11025
|
+
key: 'media-BearerAuth',
|
|
11026
|
+
scheme: 'bearer',
|
|
11027
|
+
type: 'http'
|
|
11028
|
+
}],
|
|
11029
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
|
|
11030
|
+
...options,
|
|
11031
|
+
headers: {
|
|
11032
|
+
'Content-Type': 'application/json',
|
|
11033
|
+
...options.headers
|
|
11034
|
+
}
|
|
11035
|
+
});
|
|
10939
11036
|
/**
|
|
10940
11037
|
* List types
|
|
10941
11038
|
*
|
|
@@ -12298,6 +12395,66 @@ export const searchMap = (options) => (options.client ?? client).post({
|
|
|
12298
12395
|
...options.headers
|
|
12299
12396
|
}
|
|
12300
12397
|
});
|
|
12398
|
+
/**
|
|
12399
|
+
* List shares
|
|
12400
|
+
*
|
|
12401
|
+
* 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.
|
|
12402
|
+
*/
|
|
12403
|
+
export const shareListPermissions = (options) => (options?.client ?? client).get({
|
|
12404
|
+
security: [{
|
|
12405
|
+
key: 'share-bearerAuth',
|
|
12406
|
+
scheme: 'bearer',
|
|
12407
|
+
type: 'http'
|
|
12408
|
+
}],
|
|
12409
|
+
url: '/share/v1/permissions',
|
|
12410
|
+
...options
|
|
12411
|
+
});
|
|
12412
|
+
/**
|
|
12413
|
+
* Create share
|
|
12414
|
+
*
|
|
12415
|
+
* 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.
|
|
12416
|
+
*/
|
|
12417
|
+
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
12418
|
+
security: [{
|
|
12419
|
+
key: 'share-bearerAuth',
|
|
12420
|
+
scheme: 'bearer',
|
|
12421
|
+
type: 'http'
|
|
12422
|
+
}],
|
|
12423
|
+
url: '/share/v1/permissions',
|
|
12424
|
+
...options,
|
|
12425
|
+
headers: {
|
|
12426
|
+
'Content-Type': 'application/json',
|
|
12427
|
+
...options.headers
|
|
12428
|
+
}
|
|
12429
|
+
});
|
|
12430
|
+
/**
|
|
12431
|
+
* Delete share
|
|
12432
|
+
*
|
|
12433
|
+
* 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.
|
|
12434
|
+
*/
|
|
12435
|
+
export const shareDeletePermission = (options) => (options.client ?? client).delete({
|
|
12436
|
+
security: [{
|
|
12437
|
+
key: 'share-bearerAuth',
|
|
12438
|
+
scheme: 'bearer',
|
|
12439
|
+
type: 'http'
|
|
12440
|
+
}],
|
|
12441
|
+
url: '/share/v1/permissions/{id}',
|
|
12442
|
+
...options
|
|
12443
|
+
});
|
|
12444
|
+
/**
|
|
12445
|
+
* Retrieve share
|
|
12446
|
+
*
|
|
12447
|
+
* 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.
|
|
12448
|
+
*/
|
|
12449
|
+
export const shareRetrievePermission = (options) => (options.client ?? client).get({
|
|
12450
|
+
security: [{
|
|
12451
|
+
key: 'share-bearerAuth',
|
|
12452
|
+
scheme: 'bearer',
|
|
12453
|
+
type: 'http'
|
|
12454
|
+
}],
|
|
12455
|
+
url: '/share/v1/permissions/{id}',
|
|
12456
|
+
...options
|
|
12457
|
+
});
|
|
12301
12458
|
/**
|
|
12302
12459
|
* List the genres Studio can write
|
|
12303
12460
|
*
|