@deepraxis/sdk 0.1.1-dev.e2643d3 → 0.1.1-dev.e2d177f
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 +71 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +135 -13
- package/dist/generated/sdk.gen.js +378 -16
- package/dist/generated/types.gen.d.ts +4905 -85
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +8 -0
- package/dist/operations.generated.js +613 -33
- package/dist/resources.generated.d.ts +562 -1
- package/dist/resources.generated.js +46 -1
- package/package.json +1 -1
|
@@ -934,7 +934,7 @@ export const listSessionRequests = (options) => (options.client ?? client).get({
|
|
|
934
934
|
*
|
|
935
935
|
* Open a dictation stream for a session and get the address to push microphone audio to.
|
|
936
936
|
*
|
|
937
|
-
* Own-face extension. The body is optional: hotwords (at most 50 words the recogniser should favour). Returns 201 { id, push_url, expires_at }: id is the stream id (mst_...), push_url a wss address, expires_at when the address stops accepting a new connection. The speech-to-text model is the agent's dictation_model, or the platform default when it names none. Once connected to push_url, send one text frame {"type":"start","format":"pcm_s16le","sample_rate":16000,"channels":1}, then binary PCM frames of at most 64 KiB, then {"type":"stop"}; the text frames you receive are partial, final, done (with audio_seconds and cost_usd) and error. push_url carries a short-lived capability: treat it as a secret and do not store or log it. A session that is missing or not yours returns 404; a model that cannot transcribe a live stream returns 409 DICTATION_UNCONFIGURED; dictation not available in this environment returns 503 DICTATION_UNAVAILABLE; more than 50 hotwords or an unsupported field returns 400.
|
|
937
|
+
* Own-face extension. The body is optional: hotwords (at most 50 words the recogniser should favour). Returns 201 { id, push_url, expires_at }: id is the stream id (mst_...), push_url a wss address, expires_at when the address stops accepting a new connection. The speech-to-text model is the agent's dictation_model, or the platform default when it names none. Once connected to push_url, send one text frame {"type":"start","format":"pcm_s16le","sample_rate":16000,"channels":1}, then binary PCM frames of at most 64 KiB, then {"type":"stop"}; the text frames you receive are partial, final, done (with audio_seconds and cost_usd) and error. Each final carries end_ms, where that sentence ends in the audio you sent: if the connection drops, send what comes after the last end_ms to a new dictation. You may connect ahead of time: the stream waits up to 5 minutes for start; after start it closes after 30 s without a frame, and it carries at most 10 minutes of audio. push_url carries a short-lived capability: treat it as a secret and do not store or log it. A session that is missing or not yours returns 404; a model that cannot transcribe a live stream returns 409 DICTATION_UNCONFIGURED; dictation not available in this environment returns 503 DICTATION_UNAVAILABLE; more than 50 hotwords or an unsupported field returns 400.
|
|
938
938
|
*/
|
|
939
939
|
export const createSessionDictation = (options) => (options.client ?? client).post({
|
|
940
940
|
security: [{
|
|
@@ -1162,7 +1162,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
|
|
|
1162
1162
|
/**
|
|
1163
1163
|
* 创建浏览器会话
|
|
1164
1164
|
*
|
|
1165
|
-
* 创建云端 Chrome,返回自带凭证的 connectUrl
|
|
1165
|
+
* 创建云端 Chrome,返回自带凭证的 connectUrl;它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
|
|
1166
1166
|
*/
|
|
1167
1167
|
export const browserCreateSession = (options) => (options.client ?? client).post({
|
|
1168
1168
|
security: [{
|
|
@@ -1212,7 +1212,7 @@ export const browserCloseSession = (options) => (options.client ?? client).post(
|
|
|
1212
1212
|
/**
|
|
1213
1213
|
* 读取调试地址
|
|
1214
1214
|
*
|
|
1215
|
-
* 读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages
|
|
1215
|
+
* 读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages 为空,返回地址不代表会话仍可连接——会话结束后(进入释放或已释放),用返回的 wsUrl 建立 CDP 连接会得到 409 SESSION_ENDED。
|
|
1216
1216
|
*/
|
|
1217
1217
|
export const browserGetDebug = (options) => (options.client ?? client).get({
|
|
1218
1218
|
security: [{
|
|
@@ -1240,7 +1240,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
|
|
|
1240
1240
|
/**
|
|
1241
1241
|
* 执行页面动作
|
|
1242
1242
|
*
|
|
1243
|
-
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab
|
|
1243
|
+
* 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
|
|
1244
1244
|
*/
|
|
1245
1245
|
export const browserRunPageAction = (options) => (options.client ?? client).post({
|
|
1246
1246
|
security: [{
|
|
@@ -1400,7 +1400,7 @@ export const browserUpdateContext = (options) => (options.client ?? client).put(
|
|
|
1400
1400
|
/**
|
|
1401
1401
|
* 连接云端浏览器
|
|
1402
1402
|
*
|
|
1403
|
-
* CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。
|
|
1403
|
+
* CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。这是完整 CDP 连接:真手指或指针事件(Emulation.setTouchEmulationEnabled 加 Input.dispatchTouchEvent、拖拽用的 Input.dispatchMouseEvent)只能从这里发,页面动作接口只做按 ref 的语义动作。要挂指定登录态,可用 context 参数,或直接连接 sessions.create 返回的 connectUrl。
|
|
1404
1404
|
*/
|
|
1405
1405
|
export const browserConnect = (options) => (options?.client ?? client).get({
|
|
1406
1406
|
security: [{
|
|
@@ -1766,6 +1766,292 @@ export const metaDocsRetrieve = (options) => (options.client ?? client).get({ ur
|
|
|
1766
1766
|
* Find guides and references by keyword before reading them with praxis.meta.docs.retrieve. Public; no API key required. Matches documentation titles, headings and page text without case sensitivity; all query words must occur. q is required; limit defaults to 20 and accepts 1–50. lang defaults to zh or use en for English. Returns paths, page titles, canonical URLs and short matching snippets; no matches returns an empty array.
|
|
1767
1767
|
*/
|
|
1768
1768
|
export const metaDocsSearch = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/search', ...options });
|
|
1769
|
+
/**
|
|
1770
|
+
* List streams
|
|
1771
|
+
*
|
|
1772
|
+
* List the streams of your organization, newest first, to find a stream id or to see which are active; to read one stream use streams.retrieve. Pages hold limit streams (1 to 100, default 20); when has_more is true pass the id of the last stream you received as starting_after to get the next page. A stream that is deleted leaves the list at once. The list never shows another organization's streams. Example: GET /media/v1/streams?limit=20.
|
|
1773
|
+
*/
|
|
1774
|
+
export const listMediaStreams = (options) => (options?.client ?? client).get({
|
|
1775
|
+
security: [{
|
|
1776
|
+
key: 'BearerAuth',
|
|
1777
|
+
scheme: 'bearer',
|
|
1778
|
+
type: 'http'
|
|
1779
|
+
}, {
|
|
1780
|
+
key: 'ApiKeyAuth',
|
|
1781
|
+
name: 'X-API-Key',
|
|
1782
|
+
type: 'apiKey'
|
|
1783
|
+
}],
|
|
1784
|
+
url: '/media/v1/streams',
|
|
1785
|
+
...options
|
|
1786
|
+
});
|
|
1787
|
+
/**
|
|
1788
|
+
* Create a stream
|
|
1789
|
+
*
|
|
1790
|
+
* Register one live source and get its id; use it before anything else on this face, and use streams.update instead to change a stream you already have. Send input as {kind: pull, url} to have Praxis pull an https, http, rtmp or rtmps address (an HLS .m3u8 or HTTP-FLV playlist, or an RTMP URL; SRT is not supported and answers 400), or as {kind: push} to receive a push address: the response then carries push {url, token, expires_at}, and the token is shown only in this response and in streams.resetToken.create because only its hash is kept. The new stream is idle; nothing is pulled or charged until a source goes active. reconnect_window_s (0 to 1800, default 60) is how long a source that drops may come back and continue the same broadcast; max_continuous_duration_s (60 to 43200, default 43200) ends a broadcast that runs that long. recording defaults to off. The owner is your organization (and the agent and session when a session token calls); the body cannot set it and unknown fields answer 400. Example: {"input":{"kind":"pull","url":"https://live.example.com/room/index.m3u8"},"recording":{"mode":"automatic","rendition":"source"}}.
|
|
1791
|
+
*/
|
|
1792
|
+
export const createMediaStream = (options) => (options.client ?? client).post({
|
|
1793
|
+
security: [{
|
|
1794
|
+
key: 'BearerAuth',
|
|
1795
|
+
scheme: 'bearer',
|
|
1796
|
+
type: 'http'
|
|
1797
|
+
}, {
|
|
1798
|
+
key: 'ApiKeyAuth',
|
|
1799
|
+
name: 'X-API-Key',
|
|
1800
|
+
type: 'apiKey'
|
|
1801
|
+
}],
|
|
1802
|
+
url: '/media/v1/streams',
|
|
1803
|
+
...options,
|
|
1804
|
+
headers: {
|
|
1805
|
+
'Content-Type': 'application/json',
|
|
1806
|
+
...options.headers
|
|
1807
|
+
}
|
|
1808
|
+
});
|
|
1809
|
+
/**
|
|
1810
|
+
* Delete a stream
|
|
1811
|
+
*
|
|
1812
|
+
* Delete a stream and its event log for good; only an idle or disabled stream can be deleted, so stop a live one first with streams.disable.create. The stream leaves the list at once and gives back any slot it held. Recordings it already made are Media assets and stay. Deleting is not undone and the id is not reused. Example: DELETE /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec.
|
|
1813
|
+
*/
|
|
1814
|
+
export const deleteMediaStream = (options) => (options.client ?? client).delete({
|
|
1815
|
+
security: [{
|
|
1816
|
+
key: 'BearerAuth',
|
|
1817
|
+
scheme: 'bearer',
|
|
1818
|
+
type: 'http'
|
|
1819
|
+
}, {
|
|
1820
|
+
key: 'ApiKeyAuth',
|
|
1821
|
+
name: 'X-API-Key',
|
|
1822
|
+
type: 'apiKey'
|
|
1823
|
+
}],
|
|
1824
|
+
url: '/media/v1/streams/{stream_id}',
|
|
1825
|
+
...options
|
|
1826
|
+
});
|
|
1827
|
+
/**
|
|
1828
|
+
* Retrieve a stream
|
|
1829
|
+
*
|
|
1830
|
+
* Read one stream: its status, input, reconnect and duration limits, recording settings, pipeline, the asset of the current broadcast and the recent ones. Use it to check whether a stream is idle, waiting, active or disabled; to follow what happened to it read streams.events.list instead. The push token is never returned here, only in the create and reset-token responses. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec.
|
|
1831
|
+
*/
|
|
1832
|
+
export const getMediaStream = (options) => (options.client ?? client).get({
|
|
1833
|
+
security: [{
|
|
1834
|
+
key: 'BearerAuth',
|
|
1835
|
+
scheme: 'bearer',
|
|
1836
|
+
type: 'http'
|
|
1837
|
+
}, {
|
|
1838
|
+
key: 'ApiKeyAuth',
|
|
1839
|
+
name: 'X-API-Key',
|
|
1840
|
+
type: 'apiKey'
|
|
1841
|
+
}],
|
|
1842
|
+
url: '/media/v1/streams/{stream_id}',
|
|
1843
|
+
...options
|
|
1844
|
+
});
|
|
1845
|
+
/**
|
|
1846
|
+
* Update a stream
|
|
1847
|
+
*
|
|
1848
|
+
* Change the settings of a stream you own; send only the fields to change. reconnect_window_s and max_continuous_duration_s take the same ranges as on create. recording is merged onto the current settings (send {rendition: sd} to change only the rendition; a null optional field such as library_id clears it). pipeline_id is stored as given (null clears it). input can change only the url of a pull stream and only while it is idle or disabled; a push stream has no address to change and a live pull stream answers 409. An empty patch, an unknown field or an invalid value answers 400. Example: {"reconnect_window_s":120,"recording":{"mode":"automatic"}}.
|
|
1849
|
+
*/
|
|
1850
|
+
export const updateMediaStream = (options) => (options.client ?? client).patch({
|
|
1851
|
+
security: [{
|
|
1852
|
+
key: 'BearerAuth',
|
|
1853
|
+
scheme: 'bearer',
|
|
1854
|
+
type: 'http'
|
|
1855
|
+
}, {
|
|
1856
|
+
key: 'ApiKeyAuth',
|
|
1857
|
+
name: 'X-API-Key',
|
|
1858
|
+
type: 'apiKey'
|
|
1859
|
+
}],
|
|
1860
|
+
url: '/media/v1/streams/{stream_id}',
|
|
1861
|
+
...options,
|
|
1862
|
+
headers: {
|
|
1863
|
+
'Content-Type': 'application/json',
|
|
1864
|
+
...options.headers
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
/**
|
|
1868
|
+
* Enable a stream
|
|
1869
|
+
*
|
|
1870
|
+
* Bring a disabled stream back to idle so a source may drive it again; it does not start anything by itself. Only a disabled stream can be enabled; an idle, waiting or active stream answers 409. Use streams.disable.create to stop a stream. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/enable with no body.
|
|
1871
|
+
*/
|
|
1872
|
+
export const enableMediaStream = (options) => (options.client ?? client).post({
|
|
1873
|
+
security: [{
|
|
1874
|
+
key: 'BearerAuth',
|
|
1875
|
+
scheme: 'bearer',
|
|
1876
|
+
type: 'http'
|
|
1877
|
+
}, {
|
|
1878
|
+
key: 'ApiKeyAuth',
|
|
1879
|
+
name: 'X-API-Key',
|
|
1880
|
+
type: 'apiKey'
|
|
1881
|
+
}],
|
|
1882
|
+
url: '/media/v1/streams/{stream_id}/enable',
|
|
1883
|
+
...options
|
|
1884
|
+
});
|
|
1885
|
+
/**
|
|
1886
|
+
* Disable a stream
|
|
1887
|
+
*
|
|
1888
|
+
* Stop a stream from any status: a live stream is closed out (its log records stream.disconnected and stream.idle), it gives back its active slot, and a source can no longer drive it until streams.enable.create. Disabling a disabled stream changes nothing and answers 200. Use it before deleting a live stream or to switch a source off without losing the stream. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/disable with no body.
|
|
1889
|
+
*/
|
|
1890
|
+
export const disableMediaStream = (options) => (options.client ?? client).post({
|
|
1891
|
+
security: [{
|
|
1892
|
+
key: 'BearerAuth',
|
|
1893
|
+
scheme: 'bearer',
|
|
1894
|
+
type: 'http'
|
|
1895
|
+
}, {
|
|
1896
|
+
key: 'ApiKeyAuth',
|
|
1897
|
+
name: 'X-API-Key',
|
|
1898
|
+
type: 'apiKey'
|
|
1899
|
+
}],
|
|
1900
|
+
url: '/media/v1/streams/{stream_id}/disable',
|
|
1901
|
+
...options
|
|
1902
|
+
});
|
|
1903
|
+
/**
|
|
1904
|
+
* Get the address and capability to subscribe to a stream's events
|
|
1905
|
+
*
|
|
1906
|
+
* Mint a subscribe capability for the stream's event socket: a WebSocket that sends every event after a sequence number, then each new event as it is written. Use it for live delivery to an app or a dashboard; to read the log in pages without holding a socket use streams.events.list, and to receive events at your server use a webhook element of a pipeline. The response carries {url, token, expires_at}: open the url as a WebSocket and append &after=<seq> with the highest seq you have already seen (omit it, or use 0, to read from the start). A subscriber that was away comes back with its last seq and is sent every event it missed, then the live ones; the same event can arrive again, so de-duplicate on the event id. The token opens the socket and nothing else, is valid for one hour, may be held by any number of subscribers at once and is shown only in this response; mint a new one to reconnect after it expires. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/subscribe-token with no body.
|
|
1907
|
+
*/
|
|
1908
|
+
export const createMediaStreamSubscription = (options) => (options.client ?? client).post({
|
|
1909
|
+
security: [{
|
|
1910
|
+
key: 'BearerAuth',
|
|
1911
|
+
scheme: 'bearer',
|
|
1912
|
+
type: 'http'
|
|
1913
|
+
}, {
|
|
1914
|
+
key: 'ApiKeyAuth',
|
|
1915
|
+
name: 'X-API-Key',
|
|
1916
|
+
type: 'apiKey'
|
|
1917
|
+
}],
|
|
1918
|
+
url: '/media/v1/streams/{stream_id}/subscribe-token',
|
|
1919
|
+
...options
|
|
1920
|
+
});
|
|
1921
|
+
/**
|
|
1922
|
+
* Reset the push token of a stream
|
|
1923
|
+
*
|
|
1924
|
+
* Mint a new push token for a push stream and invalidate the old one, for example when the token leaked or has expired (a token is valid for 24 hours). The response carries the new push {url, token, expires_at}; the token is shown only here. A pull stream has no token and answers 409. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/reset-token with no body.
|
|
1925
|
+
*/
|
|
1926
|
+
export const resetMediaStreamToken = (options) => (options.client ?? client).post({
|
|
1927
|
+
security: [{
|
|
1928
|
+
key: 'BearerAuth',
|
|
1929
|
+
scheme: 'bearer',
|
|
1930
|
+
type: 'http'
|
|
1931
|
+
}, {
|
|
1932
|
+
key: 'ApiKeyAuth',
|
|
1933
|
+
name: 'X-API-Key',
|
|
1934
|
+
type: 'apiKey'
|
|
1935
|
+
}],
|
|
1936
|
+
url: '/media/v1/streams/{stream_id}/reset-token',
|
|
1937
|
+
...options
|
|
1938
|
+
});
|
|
1939
|
+
/**
|
|
1940
|
+
* List the events of a stream
|
|
1941
|
+
*
|
|
1942
|
+
* Read the stream's event log in order, to follow what the stream did or to catch up after a disconnect: pass after set to the highest seq you have seen and you receive every later event, oldest first, up to limit (1 to 100, default 100). Events are delivered at least once and each has a stable id, so a repeat is the same event. Kinds are stream.waiting, stream.connected, stream.active, stream.disconnected and stream.idle (recording.ready follows with recordings). at is wall-clock time and at_source says whether it came from the source (program_date_time) or was the time Praxis received it; offset_ms is the position inside the stream when known. Events are kept at least 24 hours. When has_more is false next_after is the seq to pass next time. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/events?after=12&limit=50.
|
|
1943
|
+
*/
|
|
1944
|
+
export const listMediaStreamEvents = (options) => (options.client ?? client).get({
|
|
1945
|
+
security: [{
|
|
1946
|
+
key: 'BearerAuth',
|
|
1947
|
+
scheme: 'bearer',
|
|
1948
|
+
type: 'http'
|
|
1949
|
+
}, {
|
|
1950
|
+
key: 'ApiKeyAuth',
|
|
1951
|
+
name: 'X-API-Key',
|
|
1952
|
+
type: 'apiKey'
|
|
1953
|
+
}],
|
|
1954
|
+
url: '/media/v1/streams/{stream_id}/events',
|
|
1955
|
+
...options
|
|
1956
|
+
});
|
|
1957
|
+
/**
|
|
1958
|
+
* List pipelines
|
|
1959
|
+
*
|
|
1960
|
+
* List the pipelines of your organization, newest first, to find a pipeline id; to read one use pipelines.retrieve. Pages hold limit pipelines (1 to 100, default 20); when has_more is true pass the id of the last pipeline you received as starting_after to get the next page. Example: GET /media/v1/pipelines?limit=20.
|
|
1961
|
+
*/
|
|
1962
|
+
export const listMediaPipelines = (options) => (options?.client ?? client).get({
|
|
1963
|
+
security: [{
|
|
1964
|
+
key: 'BearerAuth',
|
|
1965
|
+
scheme: 'bearer',
|
|
1966
|
+
type: 'http'
|
|
1967
|
+
}, {
|
|
1968
|
+
key: 'ApiKeyAuth',
|
|
1969
|
+
name: 'X-API-Key',
|
|
1970
|
+
type: 'apiKey'
|
|
1971
|
+
}],
|
|
1972
|
+
url: '/media/v1/pipelines',
|
|
1973
|
+
...options
|
|
1974
|
+
});
|
|
1975
|
+
/**
|
|
1976
|
+
* Create a pipeline
|
|
1977
|
+
*
|
|
1978
|
+
* Describe what to run while a stream is live, once, and attach it to as many streams as you like with pipeline_id. A pipeline is an ordered list of elements: processors that read the broadcast and sinks that receive the results. transcribe {language?, hot_words?} turns the speech into transcript.partial and transcript.final events (each carries offset_ms in the stream, end_ms and the wall-clock time at, which is the source's own PROGRAM-DATE-TIME when it has one and the time received otherwise). describe_frames {interval_s 5 to 300 default 10, prompt?, model?} describes one keyframe every interval_s as a frame.described event; a slow description skips the frames in between, it never queues them. match_keywords {keywords} and the sinks webhook {url} and agent {session_id} are stored and checked here and delivered by the alerting side; the events sink is always on. A processor appears once; webhook and agent sinks up to five each. alert_rules holds keyword_match {keywords} and model_judgment {prompt}. A stream runs the pipeline as it was when the broadcast began: editing it changes the next broadcast, not the one on air. Example: {"name":"jewellery room","elements":[{"type":"transcribe","language":"zh"},{"type":"describe_frames","interval_s":20}]}.
|
|
1979
|
+
*/
|
|
1980
|
+
export const createMediaPipeline = (options) => (options.client ?? client).post({
|
|
1981
|
+
security: [{
|
|
1982
|
+
key: 'BearerAuth',
|
|
1983
|
+
scheme: 'bearer',
|
|
1984
|
+
type: 'http'
|
|
1985
|
+
}, {
|
|
1986
|
+
key: 'ApiKeyAuth',
|
|
1987
|
+
name: 'X-API-Key',
|
|
1988
|
+
type: 'apiKey'
|
|
1989
|
+
}],
|
|
1990
|
+
url: '/media/v1/pipelines',
|
|
1991
|
+
...options,
|
|
1992
|
+
headers: {
|
|
1993
|
+
'Content-Type': 'application/json',
|
|
1994
|
+
...options.headers
|
|
1995
|
+
}
|
|
1996
|
+
});
|
|
1997
|
+
/**
|
|
1998
|
+
* Delete a pipeline
|
|
1999
|
+
*
|
|
2000
|
+
* Delete a pipeline that no stream names. A stream that still has it as its pipeline_id keeps the deletion from happening, so detach it first with streams.update (pipeline_id: null) or delete the stream. Deleting is not undone and the id is not reused. Example: DELETE /media/v1/pipelines/msp_zpnqd7a2kxwg3vhr5tj4bfm6ec.
|
|
2001
|
+
*/
|
|
2002
|
+
export const deleteMediaPipeline = (options) => (options.client ?? client).delete({
|
|
2003
|
+
security: [{
|
|
2004
|
+
key: 'BearerAuth',
|
|
2005
|
+
scheme: 'bearer',
|
|
2006
|
+
type: 'http'
|
|
2007
|
+
}, {
|
|
2008
|
+
key: 'ApiKeyAuth',
|
|
2009
|
+
name: 'X-API-Key',
|
|
2010
|
+
type: 'apiKey'
|
|
2011
|
+
}],
|
|
2012
|
+
url: '/media/v1/pipelines/{pipeline_id}',
|
|
2013
|
+
...options
|
|
2014
|
+
});
|
|
2015
|
+
/**
|
|
2016
|
+
* Retrieve a pipeline
|
|
2017
|
+
*
|
|
2018
|
+
* Read one pipeline: its name, elements and alert rules, as a stream that names it will run them. Example: GET /media/v1/pipelines/msp_zpnqd7a2kxwg3vhr5tj4bfm6ec.
|
|
2019
|
+
*/
|
|
2020
|
+
export const getMediaPipeline = (options) => (options.client ?? client).get({
|
|
2021
|
+
security: [{
|
|
2022
|
+
key: 'BearerAuth',
|
|
2023
|
+
scheme: 'bearer',
|
|
2024
|
+
type: 'http'
|
|
2025
|
+
}, {
|
|
2026
|
+
key: 'ApiKeyAuth',
|
|
2027
|
+
name: 'X-API-Key',
|
|
2028
|
+
type: 'apiKey'
|
|
2029
|
+
}],
|
|
2030
|
+
url: '/media/v1/pipelines/{pipeline_id}',
|
|
2031
|
+
...options
|
|
2032
|
+
});
|
|
2033
|
+
/**
|
|
2034
|
+
* Update a pipeline
|
|
2035
|
+
*
|
|
2036
|
+
* Change a pipeline's name, elements or alert_rules; each field you send replaces the whole of that field (elements is a list, not a merge) and a field you leave out stays. A stream that is live keeps the pipeline it began its broadcast with; the change takes effect from its next broadcast. An empty body answers 400. Example: {"elements":[{"type":"transcribe"}]}.
|
|
2037
|
+
*/
|
|
2038
|
+
export const updateMediaPipeline = (options) => (options.client ?? client).patch({
|
|
2039
|
+
security: [{
|
|
2040
|
+
key: 'BearerAuth',
|
|
2041
|
+
scheme: 'bearer',
|
|
2042
|
+
type: 'http'
|
|
2043
|
+
}, {
|
|
2044
|
+
key: 'ApiKeyAuth',
|
|
2045
|
+
name: 'X-API-Key',
|
|
2046
|
+
type: 'apiKey'
|
|
2047
|
+
}],
|
|
2048
|
+
url: '/media/v1/pipelines/{pipeline_id}',
|
|
2049
|
+
...options,
|
|
2050
|
+
headers: {
|
|
2051
|
+
'Content-Type': 'application/json',
|
|
2052
|
+
...options.headers
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
1769
2055
|
/**
|
|
1770
2056
|
* List Models
|
|
1771
2057
|
*
|
|
@@ -3393,7 +3679,7 @@ export const listOrganizationDepartments = (options) => (options?.client ?? clie
|
|
|
3393
3679
|
/**
|
|
3394
3680
|
* Establish a department
|
|
3395
3681
|
*
|
|
3396
|
-
* Creates a department under an existing active parent department; use it to grow the tree, and use reorganize to rename or move one that already exists. order defaults to one after the last active sibling. The new department has no head position
|
|
3682
|
+
* Creates a department under an existing active parent department; use it to grow the tree, and use reorganize to rename or move one that already exists. order defaults to one after the last active sibling. The new department has no head position: open a position in it, then designate that position as head. Requires an organization owner or admin, or the head of the parent department or of a department above it. Errors: 400 INVALID_PARAMS for a missing or empty name, a name over 100 characters, an unknown body field or an active sibling with the same name; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND when the parent does not exist; 409 DEPARTMENT_DISSOLVED when the parent is dissolved. Example body: {"parent_id":"dept_123","name":"Support"}.
|
|
3397
3683
|
*/
|
|
3398
3684
|
export const establishOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3399
3685
|
security: [{
|
|
@@ -3415,7 +3701,7 @@ export const establishOrganizationDepartment = (options) => (options.client ?? c
|
|
|
3415
3701
|
/**
|
|
3416
3702
|
* Get a department
|
|
3417
3703
|
*
|
|
3418
|
-
* Reads one department with its head position id
|
|
3704
|
+
* Reads one department with its head position id. A department's charter is the document of its spec (GET /workforce/v1/specs/department/{id}), not a field of the department. Read-only. Errors: 404 DEPARTMENT_NOT_FOUND when the id is not a department of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
3419
3705
|
*/
|
|
3420
3706
|
export const getOrganizationDepartment = (options) => (options.client ?? client).get({
|
|
3421
3707
|
security: [{
|
|
@@ -3471,9 +3757,11 @@ export const dissolveOrganizationDepartment = (options) => (options.client ?? cl
|
|
|
3471
3757
|
...options
|
|
3472
3758
|
});
|
|
3473
3759
|
/**
|
|
3474
|
-
* Amend a department charter
|
|
3760
|
+
* Amend a department charter (gone)
|
|
3761
|
+
*
|
|
3762
|
+
* Deprecated: use PUT /workforce/v1/specs/department/{id} instead; this path stops working on 2026-11-28. A department's charter is now the `document` of its spec, not a field of the department: read it at GET /workforce/v1/specs/department/{id} and replace it with PUT /workforce/v1/specs/department/{id} sending metadata.revision and spec.document. The root department's charter is the organization's own spec at /workforce/v1/specs/organization/{organization_id}. Until then this path answers 410 with code DEPARTMENT_CHARTER_GONE and the same instruction.
|
|
3475
3763
|
*
|
|
3476
|
-
*
|
|
3764
|
+
* @deprecated
|
|
3477
3765
|
*/
|
|
3478
3766
|
export const amendOrganizationDepartmentCharter = (options) => (options.client ?? client).put({
|
|
3479
3767
|
security: [{
|
|
@@ -3486,11 +3774,7 @@ export const amendOrganizationDepartmentCharter = (options) => (options.client ?
|
|
|
3486
3774
|
type: 'apiKey'
|
|
3487
3775
|
}],
|
|
3488
3776
|
url: '/workforce/v1/departments/{id}/charter',
|
|
3489
|
-
...options
|
|
3490
|
-
headers: {
|
|
3491
|
-
'Content-Type': 'application/json',
|
|
3492
|
-
...options.headers
|
|
3493
|
-
}
|
|
3777
|
+
...options
|
|
3494
3778
|
});
|
|
3495
3779
|
/**
|
|
3496
3780
|
* List jobs
|
|
@@ -4029,7 +4313,7 @@ export const listOrganizationActors = (options) => (options?.client ?? client).g
|
|
|
4029
4313
|
/**
|
|
4030
4314
|
* Get the position chain of an actor
|
|
4031
4315
|
*
|
|
4032
|
-
* Reads where an actor, person or agent, sits in the organization: its primary position and its concurrent positions, each with the department path from the root down
|
|
4316
|
+
* Reads where an actor, person or agent, sits in the organization: its primary position and its concurrent positions, each with the department path from the root down (ids and names; a department's charter is its spec's document, read through /workforce/v1/specs), the job, title and level name, the manager (the first filled position up the reporting line), the position's own duties and methods, and objectives. Use it to answer who this actor is and what it is responsible for. An actor that holds no position is not an error: primary is null and concurrent is empty. Read-only. Errors: 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
|
|
4033
4317
|
*/
|
|
4034
4318
|
export const getOrganizationActor = (options) => (options.client ?? client).get({
|
|
4035
4319
|
security: [{
|
|
@@ -7707,6 +7991,84 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
|
|
|
7707
7991
|
...options.headers
|
|
7708
7992
|
}
|
|
7709
7993
|
});
|
|
7994
|
+
/**
|
|
7995
|
+
* Publish canvas library
|
|
7996
|
+
*
|
|
7997
|
+
* Freeze the reusable components of a canvas as the next numbered library version, so other canvases can use them; the first publish turns the canvas into a library. Supply a canvas_id from canvases.list or create after marking frames as components. The result lists which components were added, changed (compared by content) or removed since the previous version, and whether variables or themes changed. A removed component stays readable in the new version, marked removed. Publishing is not an edit, so the canvas version does not change. Component libraries are available only to organizations where the canvas-libraries feature is enabled; others receive FEATURE_DISABLED.
|
|
7998
|
+
*/
|
|
7999
|
+
export const canvasPublishLibrary = (options) => (options.client ?? client).post({
|
|
8000
|
+
security: [{
|
|
8001
|
+
key: 'canvas-bearerAuth',
|
|
8002
|
+
scheme: 'bearer',
|
|
8003
|
+
type: 'http'
|
|
8004
|
+
}],
|
|
8005
|
+
url: '/canvas/v1/canvases/{canvas_id}:publish',
|
|
8006
|
+
...options,
|
|
8007
|
+
headers: {
|
|
8008
|
+
'Content-Type': 'application/json',
|
|
8009
|
+
...options.headers
|
|
8010
|
+
}
|
|
8011
|
+
});
|
|
8012
|
+
/**
|
|
8013
|
+
* List library versions
|
|
8014
|
+
*
|
|
8015
|
+
* Read the release history of a library canvas, newest first, including each version's description and what it added, changed or removed. Supply a canvas_id of a canvas that has been published at least once; a canvas that never was answers NOT_A_LIBRARY. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. Library versions are never pruned. Listing does not change the canvas. Available only to organizations where the canvas-libraries feature is enabled.
|
|
8016
|
+
*/
|
|
8017
|
+
export const canvasListLibraryVersions = (options) => (options.client ?? client).get({
|
|
8018
|
+
security: [{
|
|
8019
|
+
key: 'canvas-bearerAuth',
|
|
8020
|
+
scheme: 'bearer',
|
|
8021
|
+
type: 'http'
|
|
8022
|
+
}],
|
|
8023
|
+
url: '/canvas/v1/canvases/{canvas_id}/library_versions',
|
|
8024
|
+
...options
|
|
8025
|
+
});
|
|
8026
|
+
/**
|
|
8027
|
+
* List libraries
|
|
8028
|
+
*
|
|
8029
|
+
* Discover the component libraries of the API key's organization, most recently published first. A library is a canvas that has been published at least once; each item gives its latest version, component count and how many live canvases use it. query keeps only libraries whose name contains the text, ignoring case. limit is 1–100 and defaults to 50; pass next_cursor as cursor until it is null. Deleted canvases are not listed. Available only to organizations where the canvas-libraries feature is enabled.
|
|
8030
|
+
*/
|
|
8031
|
+
export const canvasListLibraries = (options) => (options?.client ?? client).get({
|
|
8032
|
+
security: [{
|
|
8033
|
+
key: 'canvas-bearerAuth',
|
|
8034
|
+
scheme: 'bearer',
|
|
8035
|
+
type: 'http'
|
|
8036
|
+
}],
|
|
8037
|
+
url: '/canvas/v1/libraries',
|
|
8038
|
+
...options
|
|
8039
|
+
});
|
|
8040
|
+
/**
|
|
8041
|
+
* Import canvas library
|
|
8042
|
+
*
|
|
8043
|
+
* Make a published library's components usable in this canvas under an alias, or move an existing alias to another library version. Supply this canvas's canvas_id and the library's canvas id from libraries.list; the library must have been published at least once, and a library cannot itself import another library. After importing, reference a component as alias:component_id (for example ref ui:btn in a script) and a library variable as $alias:name; library nodes are read-only here. Moving an alias to a newer version keeps every instance and its overrides. The import is one new canvas version, so restoring an earlier version also restores the library versions it used. Importing the same alias and version again changes nothing. Component libraries are available only to organizations where the canvas-libraries feature is enabled.
|
|
8044
|
+
*/
|
|
8045
|
+
export const canvasSetImport = (options) => (options.client ?? client).post({
|
|
8046
|
+
security: [{
|
|
8047
|
+
key: 'canvas-bearerAuth',
|
|
8048
|
+
scheme: 'bearer',
|
|
8049
|
+
type: 'http'
|
|
8050
|
+
}],
|
|
8051
|
+
url: '/canvas/v1/canvases/{canvas_id}/imports',
|
|
8052
|
+
...options,
|
|
8053
|
+
headers: {
|
|
8054
|
+
'Content-Type': 'application/json',
|
|
8055
|
+
...options.headers
|
|
8056
|
+
}
|
|
8057
|
+
});
|
|
8058
|
+
/**
|
|
8059
|
+
* Remove canvas library import
|
|
8060
|
+
*
|
|
8061
|
+
* Stop using an imported library in this canvas. Supply this canvas's canvas_id and the alias it was imported under, as listed in imports of retrieve. The import is refused while any node still instantiates one of the library's components (the count is in error.details.instances, and retrieve lists them per component), so delete or replace those nodes first. The removal is one new canvas version. Component libraries are available only to organizations where the canvas-libraries feature is enabled.
|
|
8062
|
+
*/
|
|
8063
|
+
export const canvasDeleteImport = (options) => (options.client ?? client).delete({
|
|
8064
|
+
security: [{
|
|
8065
|
+
key: 'canvas-bearerAuth',
|
|
8066
|
+
scheme: 'bearer',
|
|
8067
|
+
type: 'http'
|
|
8068
|
+
}],
|
|
8069
|
+
url: '/canvas/v1/canvases/{canvas_id}/imports/{alias}',
|
|
8070
|
+
...options
|
|
8071
|
+
});
|
|
7710
8072
|
/**
|
|
7711
8073
|
* List contents
|
|
7712
8074
|
*
|
|
@@ -11941,7 +12303,7 @@ export const devopsUnitsConnect = (options) => (options.client ?? client).post({
|
|
|
11941
12303
|
/**
|
|
11942
12304
|
* Run a command inside a unit
|
|
11943
12305
|
*
|
|
11944
|
-
* Run one command inside the unit's own machine, and answer what it printed: exitCode, stdout and stderr, verbatim (the sandbox already caps their length). This is the door for a caller that holds no reach of the machine on its own — an agent whose credential opens development units — and it goes through the unit, the way `gh codespace ssh` goes through the codespace rather than the VM underneath. The command's environment carries the caller's signature — GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL are the caller's principal id and its noreply address — so a commit made here is signed by whoever ran it, and a checkout that has no user.email of its own is configured with the change's initiator when the unit is created. cwd defaults to the unit's repository directory. timeoutMs defaults to 120000 milliseconds and may not exceed 600000. A non-zero exit code is a result, not an error: it comes back in exitCode and is recorded on the unit's transitions as EXIT_<code> with the first line of stderr. The unit must be available with a machine, or the call answers 409 UNIT_INVALID_STATE — start it first; a unit of another organization answers 404 UNIT_NOT_FOUND, exactly as an unknown id does. The machine holds no git credential, so a commit made here still reaches the remote through devops.units.push; a command that fails to run at all answers 500 EXECUTION_FAILED and the machine's own words are in the unit's transitions.
|
|
12306
|
+
* Run one command inside the unit's own machine, and answer what it printed: exitCode, stdout and stderr, verbatim (the sandbox already caps their length). This is the door for a caller that holds no reach of the machine on its own — an agent whose credential opens development units — and it goes through the unit, the way `gh codespace ssh` goes through the codespace rather than the VM underneath. The command's environment carries the caller's signature — GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL are the caller's principal id and its noreply address — so a commit made here is signed by whoever ran it, and a checkout that has no user.email of its own is configured with the change's initiator when the unit is created. cwd defaults to the unit's repository directory. timeoutMs defaults to 120000 milliseconds and may not exceed 600000, and that 600000 ceiling is fixed: a task that needs longer than 240 seconds is not run by raising it — start it in the background and poll for its result, because a foreground call that long outlives the caller's own patience, and when the caller disconnects the command used to keep running on the machine with nobody collecting it (the reclaimer that ends that is #4404). When a command is stopped at its budget the answer is exitCode 124 with whatever it had already printed in stdout and stderr, so a stopped command shows its output instead of an empty result. A non-zero exit code is a result, not an error: it comes back in exitCode and is recorded on the unit's transitions as EXIT_<code> with the first line of stderr. The unit must be available with a machine, or the call answers 409 UNIT_INVALID_STATE — start it first; a unit of another organization answers 404 UNIT_NOT_FOUND, exactly as an unknown id does. The machine holds no git credential, so a commit made here still reaches the remote through devops.units.push; a command that fails to run at all answers 500 EXECUTION_FAILED and the machine's own words are in the unit's transitions.
|
|
11945
12307
|
*/
|
|
11946
12308
|
export const devopsUnitsExec = (options) => (options.client ?? client).post({
|
|
11947
12309
|
security: [{
|