@deepraxis/sdk 0.1.1-dev.3c2e98e → 0.1.1-dev.3cf8882
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 +57 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +100 -7
- package/dist/generated/sdk.gen.js +248 -11
- package/dist/generated/types.gen.d.ts +1503 -222
- package/dist/operations.generated.js +383 -20
- package/dist/resources.generated.d.ts +108 -10
- package/dist/resources.generated.js +36 -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
|
*
|
|
@@ -629,11 +647,7 @@ export const computersFilesConvert = (options) => (options.client ?? client).pos
|
|
|
629
647
|
type: 'apiKey'
|
|
630
648
|
}],
|
|
631
649
|
url: '/agent/v1/computers/{computer_id}/files/convert',
|
|
632
|
-
...options
|
|
633
|
-
headers: {
|
|
634
|
-
'Content-Type': 'application/json',
|
|
635
|
-
...options.headers
|
|
636
|
-
}
|
|
650
|
+
...options
|
|
637
651
|
});
|
|
638
652
|
/**
|
|
639
653
|
* Connect computer
|
|
@@ -763,6 +777,70 @@ export const forkSession = (options) => (options.client ?? client).post({
|
|
|
763
777
|
...options.headers
|
|
764
778
|
}
|
|
765
779
|
});
|
|
780
|
+
/**
|
|
781
|
+
* List Session Artifacts (Extension)
|
|
782
|
+
*
|
|
783
|
+
* List the files this session delivered; an end-customer token reads its own session.
|
|
784
|
+
*
|
|
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.
|
|
786
|
+
*/
|
|
787
|
+
export const listSessionArtifacts = (options) => (options.client ?? client).get({
|
|
788
|
+
security: [{
|
|
789
|
+
key: 'BearerAuth',
|
|
790
|
+
scheme: 'bearer',
|
|
791
|
+
type: 'http'
|
|
792
|
+
}, {
|
|
793
|
+
key: 'ApiKeyAuth',
|
|
794
|
+
name: 'X-API-Key',
|
|
795
|
+
type: 'apiKey'
|
|
796
|
+
}],
|
|
797
|
+
url: '/agent/v1/sessions/{session_id}/artifacts',
|
|
798
|
+
...options
|
|
799
|
+
});
|
|
800
|
+
/**
|
|
801
|
+
* Create Artifact Content URL (Extension)
|
|
802
|
+
*
|
|
803
|
+
* Mint a short-lived download address for one file of an artifact.
|
|
804
|
+
*
|
|
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.
|
|
806
|
+
*/
|
|
807
|
+
export const createSessionArtifactContentUrl = (options) => (options.client ?? client).post({
|
|
808
|
+
security: [{
|
|
809
|
+
key: 'BearerAuth',
|
|
810
|
+
scheme: 'bearer',
|
|
811
|
+
type: 'http'
|
|
812
|
+
}, {
|
|
813
|
+
key: 'ApiKeyAuth',
|
|
814
|
+
name: 'X-API-Key',
|
|
815
|
+
type: 'apiKey'
|
|
816
|
+
}],
|
|
817
|
+
url: '/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url',
|
|
818
|
+
...options,
|
|
819
|
+
headers: {
|
|
820
|
+
'Content-Type': 'application/json',
|
|
821
|
+
...options.headers
|
|
822
|
+
}
|
|
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
|
+
});
|
|
766
844
|
/**
|
|
767
845
|
* List Session Background Tasks (Extension)
|
|
768
846
|
*
|
|
@@ -1726,6 +1804,60 @@ export const createChatCompletion = (options) => (options.client ?? client).post
|
|
|
1726
1804
|
...options.headers
|
|
1727
1805
|
}
|
|
1728
1806
|
});
|
|
1807
|
+
/**
|
|
1808
|
+
* Disable Model Access
|
|
1809
|
+
*
|
|
1810
|
+
* Disable one model for your organization by deleting its grant, so the next call to a model that requires access is refused again with 403 MODEL_ACCESS_REQUIRED. Pass any id enableModelAccess accepts, including creator prefixes; the model may be enabled again later, and the new grant records whoever enabled it then. A model that is not currently enabled is already disabled, so deleting a grant that does not exist also answers 200 with revoked true; only an id no catalog model carries answers 404 MODEL_NOT_FOUND.
|
|
1811
|
+
*/
|
|
1812
|
+
export const disableModelAccess = (options) => (options.client ?? client).delete({
|
|
1813
|
+
security: [{
|
|
1814
|
+
key: 'BearerAuth',
|
|
1815
|
+
scheme: 'bearer',
|
|
1816
|
+
type: 'http'
|
|
1817
|
+
}, {
|
|
1818
|
+
key: 'ApiKeyAuth',
|
|
1819
|
+
name: 'X-API-Key',
|
|
1820
|
+
type: 'apiKey'
|
|
1821
|
+
}],
|
|
1822
|
+
url: '/model/v1/models/{model}/access',
|
|
1823
|
+
...options
|
|
1824
|
+
});
|
|
1825
|
+
/**
|
|
1826
|
+
* Enable Model Access
|
|
1827
|
+
*
|
|
1828
|
+
* Enable one model for your organization so a call to it is allowed. Call it when an inference request was refused with 403 MODEL_ACCESS_REQUIRED, or ahead of time for a model the catalog marks access_required: true; the refusal message and praxis.model.models.list name the model id to pass here. The id resolves exactly as a chat call resolves it, including any creator prefix such as deepseek/deepseek-v4-pro, and an id no catalog model carries answers 404 MODEL_NOT_FOUND. Enabling is organization-wide and needs no approval, and it is idempotent: a second call returns the first grant unchanged, keeping its author, its timestamp and the USD-per-million-token price snapshot it recorded then. Enabling a model that does not require access is allowed and makes no difference to gating.
|
|
1829
|
+
*/
|
|
1830
|
+
export const enableModelAccess = (options) => (options.client ?? client).put({
|
|
1831
|
+
security: [{
|
|
1832
|
+
key: 'BearerAuth',
|
|
1833
|
+
scheme: 'bearer',
|
|
1834
|
+
type: 'http'
|
|
1835
|
+
}, {
|
|
1836
|
+
key: 'ApiKeyAuth',
|
|
1837
|
+
name: 'X-API-Key',
|
|
1838
|
+
type: 'apiKey'
|
|
1839
|
+
}],
|
|
1840
|
+
url: '/model/v1/models/{model}/access',
|
|
1841
|
+
...options
|
|
1842
|
+
});
|
|
1843
|
+
/**
|
|
1844
|
+
* List Model Access
|
|
1845
|
+
*
|
|
1846
|
+
* List the models your organization must enable before use, together with the grants it already has. Read it to check whether a model is enabled before an inference call, or to show which marked models still need enabling; use each item's model as the id for enableModelAccess or disableModelAccess (PUT or DELETE /model/v1/models/{model}/access). Items cover every model the catalog marks access_required, granted or not, so the gated class stays discoverable, plus any other model this organization has enabled, one item per model. access_required says whether the catalog gates the model; granted says whether your organization has a grant; the prices are the model's current sell prices, what the next call costs, not the price recorded when the grant was created.
|
|
1847
|
+
*/
|
|
1848
|
+
export const listModelAccess = (options) => (options?.client ?? client).get({
|
|
1849
|
+
security: [{
|
|
1850
|
+
key: 'BearerAuth',
|
|
1851
|
+
scheme: 'bearer',
|
|
1852
|
+
type: 'http'
|
|
1853
|
+
}, {
|
|
1854
|
+
key: 'ApiKeyAuth',
|
|
1855
|
+
name: 'X-API-Key',
|
|
1856
|
+
type: 'apiKey'
|
|
1857
|
+
}],
|
|
1858
|
+
url: '/model/v1/model-access',
|
|
1859
|
+
...options
|
|
1860
|
+
});
|
|
1729
1861
|
/**
|
|
1730
1862
|
* Get Generation
|
|
1731
1863
|
*
|
|
@@ -3918,7 +4050,7 @@ export const sessionsArchive = (options) => (options.client ?? client).post({
|
|
|
3918
4050
|
/**
|
|
3919
4051
|
* List session events
|
|
3920
4052
|
*
|
|
3921
|
-
* 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.
|
|
3922
4054
|
*/
|
|
3923
4055
|
export const sessionsEventsList = (options) => (options.client ?? client).get({
|
|
3924
4056
|
security: [{
|
|
@@ -7587,6 +7719,12 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7587
7719
|
* - `RippleDeleteRange` — Cut a time range and close the gap.
|
|
7588
7720
|
* - `DeleteWords` — Cut transcript words and ripple every track, keeping a breath.
|
|
7589
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.
|
|
7590
7728
|
* - `AddTrack` — Add a video, audio or caption track.
|
|
7591
7729
|
* - `MoveTrack` — Move a track between layers; 0 is the topmost.
|
|
7592
7730
|
* - `UpdateTrack` — Change a track's name, lock, gain or role.
|
|
@@ -7690,6 +7828,9 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
7690
7828
|
* - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
|
|
7691
7829
|
* - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
|
|
7692
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.
|
|
7693
7834
|
* - `FRAME_OUT_OF_RANGE` — The preview time is outside the project.
|
|
7694
7835
|
* - `PROJECT_TOO_LARGE` — The project exceeds the size limit.
|
|
7695
7836
|
* - `RESPONSE_TOO_LARGE` — The response would exceed its budget.
|
|
@@ -9046,6 +9187,24 @@ export const devopsFlagsCreate = (options) => (options.client ?? client).post({
|
|
|
9046
9187
|
...options.headers
|
|
9047
9188
|
}
|
|
9048
9189
|
});
|
|
9190
|
+
/**
|
|
9191
|
+
* Report a project's flag code references
|
|
9192
|
+
*
|
|
9193
|
+
* Store one code-reference scan for a project in a single call: send the commit the scan read (scannedCommit, the checkout's `git rev-parse HEAD`) and, for every flag key the scan knows, the places code reads it ({path, line, snippet}). Send every key the checkout still expects to be referenced, including the ones found nowhere: a project flag with no entry in refs is stored with zero references, and zero is what lets `archive` see the code that named the flag is gone. A key that matches no live flag of the project — one already archived, or from another project — is returned in unknownKeys and stores nothing; reporting it is not an error. updated is how many flags were written, which is every live flag of the project because each gets a row. This is the write side of the archive gate: `POST /v1/flags/{id}:archive` refuses with FLAG_STILL_REFERENCED while the stored count is above zero, and the count it reads is exactly the one stored here. Staleness is not corrected for — the stored scannedCommit and count are used as they stand. At most 500 references are stored per flag; a longer list is truncated for storage while count still reports the true number. Reporting changes no flag's runtime behaviour.
|
|
9194
|
+
*/
|
|
9195
|
+
export const devopsFlagsReportCodeRefs = (options) => (options.client ?? client).post({
|
|
9196
|
+
security: [{
|
|
9197
|
+
key: 'devops-bearerAuth',
|
|
9198
|
+
scheme: 'bearer',
|
|
9199
|
+
type: 'http'
|
|
9200
|
+
}],
|
|
9201
|
+
url: '/devops/v1/projects/{project}/flags/code-refs',
|
|
9202
|
+
...options,
|
|
9203
|
+
headers: {
|
|
9204
|
+
'Content-Type': 'application/json',
|
|
9205
|
+
...options.headers
|
|
9206
|
+
}
|
|
9207
|
+
});
|
|
9049
9208
|
/**
|
|
9050
9209
|
* Retrieve a flag
|
|
9051
9210
|
*
|
|
@@ -9117,7 +9276,7 @@ export const devopsFlagsConclude = (options) => (options.client ?? client).post(
|
|
|
9117
9276
|
/**
|
|
9118
9277
|
* Archive a flag
|
|
9119
9278
|
*
|
|
9120
|
-
* Archive a flag whose code is gone: it stops evaluating in every environment, leaves the ordinary flag list and keeps its key and history. Archiving
|
|
9279
|
+
* Archive a flag whose code is gone: it stops evaluating in every environment, leaves the ordinary flag list and keeps its key and history. Archiving is the delete, and the platform refuses it while the last reported scan still finds the key in code or while the flag is on in an environment: a flag whose codeRefs.count is above zero is refused with FLAG_STILL_REFERENCED, and a flag whose on state is true in any environment is refused with FLAG_HAS_LIVE_RULES, so archiving succeeds only once the code that names the key is deployed away and every environment is off. The gate reads the stored scan as it stands — an out-of-date scannedCommit is not corrected for — and there is no force flag. It is irreversible through the API: there is no unarchive call, an archived flag cannot be updated or configured, and its key stays reserved, so a later create with the same key is refused; archiving an archived flag just answers it again. A flag that may come back is turned off in its environment instead. The order is: open the flag fully (`praxis api devops flag environment update`), delete the code that names the key and deploy that, run `praxis devops flag remove <key>` (local, lists the references still naming the key), then `praxis api devops flag archive <id>`, then `praxis devops flag sync` so the local registry drops it. There is no separate delete call.
|
|
9121
9280
|
*/
|
|
9122
9281
|
export const devopsFlagsArchive = (options) => (options.client ?? client).post({
|
|
9123
9282
|
security: [{
|
|
@@ -9745,7 +9904,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
|
|
|
9745
9904
|
/**
|
|
9746
9905
|
* Push a unit's branch
|
|
9747
9906
|
*
|
|
9748
|
-
* 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.
|
|
9749
9908
|
*/
|
|
9750
9909
|
export const devopsUnitsPush = (options) => (options.client ?? client).post({
|
|
9751
9910
|
security: [{
|
|
@@ -10671,7 +10830,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
10671
10830
|
/**
|
|
10672
10831
|
* Edit asset
|
|
10673
10832
|
*
|
|
10674
|
-
* 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
|
|
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"}}.
|
|
10675
10834
|
*/
|
|
10676
10835
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
10677
10836
|
security: [{
|
|
@@ -10824,6 +10983,24 @@ export const mediaGetGenerationCapabilities = (options) => (options?.client ?? c
|
|
|
10824
10983
|
url: '/media/v1/generation/capabilities',
|
|
10825
10984
|
...options
|
|
10826
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
|
+
});
|
|
10827
11004
|
/**
|
|
10828
11005
|
* List types
|
|
10829
11006
|
*
|
|
@@ -12186,6 +12363,66 @@ export const searchMap = (options) => (options.client ?? client).post({
|
|
|
12186
12363
|
...options.headers
|
|
12187
12364
|
}
|
|
12188
12365
|
});
|
|
12366
|
+
/**
|
|
12367
|
+
* List shares
|
|
12368
|
+
*
|
|
12369
|
+
* 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.
|
|
12370
|
+
*/
|
|
12371
|
+
export const shareListPermissions = (options) => (options?.client ?? client).get({
|
|
12372
|
+
security: [{
|
|
12373
|
+
key: 'share-bearerAuth',
|
|
12374
|
+
scheme: 'bearer',
|
|
12375
|
+
type: 'http'
|
|
12376
|
+
}],
|
|
12377
|
+
url: '/share/v1/permissions',
|
|
12378
|
+
...options
|
|
12379
|
+
});
|
|
12380
|
+
/**
|
|
12381
|
+
* Create share
|
|
12382
|
+
*
|
|
12383
|
+
* 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.
|
|
12384
|
+
*/
|
|
12385
|
+
export const shareCreatePermission = (options) => (options.client ?? client).post({
|
|
12386
|
+
security: [{
|
|
12387
|
+
key: 'share-bearerAuth',
|
|
12388
|
+
scheme: 'bearer',
|
|
12389
|
+
type: 'http'
|
|
12390
|
+
}],
|
|
12391
|
+
url: '/share/v1/permissions',
|
|
12392
|
+
...options,
|
|
12393
|
+
headers: {
|
|
12394
|
+
'Content-Type': 'application/json',
|
|
12395
|
+
...options.headers
|
|
12396
|
+
}
|
|
12397
|
+
});
|
|
12398
|
+
/**
|
|
12399
|
+
* Delete share
|
|
12400
|
+
*
|
|
12401
|
+
* 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.
|
|
12402
|
+
*/
|
|
12403
|
+
export const shareDeletePermission = (options) => (options.client ?? client).delete({
|
|
12404
|
+
security: [{
|
|
12405
|
+
key: 'share-bearerAuth',
|
|
12406
|
+
scheme: 'bearer',
|
|
12407
|
+
type: 'http'
|
|
12408
|
+
}],
|
|
12409
|
+
url: '/share/v1/permissions/{id}',
|
|
12410
|
+
...options
|
|
12411
|
+
});
|
|
12412
|
+
/**
|
|
12413
|
+
* Retrieve share
|
|
12414
|
+
*
|
|
12415
|
+
* 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.
|
|
12416
|
+
*/
|
|
12417
|
+
export const shareRetrievePermission = (options) => (options.client ?? client).get({
|
|
12418
|
+
security: [{
|
|
12419
|
+
key: 'share-bearerAuth',
|
|
12420
|
+
scheme: 'bearer',
|
|
12421
|
+
type: 'http'
|
|
12422
|
+
}],
|
|
12423
|
+
url: '/share/v1/permissions/{id}',
|
|
12424
|
+
...options
|
|
12425
|
+
});
|
|
12189
12426
|
/**
|
|
12190
12427
|
* List the genres Studio can write
|
|
12191
12428
|
*
|