@b3os/sdk 0.0.0-stage → 0.0.1

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.
Files changed (242) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +233 -2
  3. package/dist/cjs/core/client.d.ts +165 -0
  4. package/dist/cjs/core/client.js +825 -0
  5. package/dist/cjs/core/client.js.map +1 -0
  6. package/dist/cjs/core/errors.d.ts +101 -0
  7. package/dist/cjs/core/errors.js +249 -0
  8. package/dist/cjs/core/errors.js.map +1 -0
  9. package/dist/cjs/core/index.d.ts +12 -0
  10. package/dist/cjs/core/index.js +42 -0
  11. package/dist/cjs/core/index.js.map +1 -0
  12. package/dist/cjs/core/jobs.d.ts +31 -0
  13. package/dist/cjs/core/jobs.js +72 -0
  14. package/dist/cjs/core/jobs.js.map +1 -0
  15. package/dist/cjs/core/namespace.d.ts +7 -0
  16. package/dist/cjs/core/namespace.js +13 -0
  17. package/dist/cjs/core/namespace.js.map +1 -0
  18. package/dist/cjs/core/op.d.ts +47 -0
  19. package/dist/cjs/core/op.js +5 -0
  20. package/dist/cjs/core/op.js.map +1 -0
  21. package/dist/cjs/core/promise.d.ts +106 -0
  22. package/dist/cjs/core/promise.js +200 -0
  23. package/dist/cjs/core/promise.js.map +1 -0
  24. package/dist/cjs/core/response.d.ts +54 -0
  25. package/dist/cjs/core/response.js +92 -0
  26. package/dist/cjs/core/response.js.map +1 -0
  27. package/dist/cjs/core/sse.d.ts +79 -0
  28. package/dist/cjs/core/sse.js +291 -0
  29. package/dist/cjs/core/sse.js.map +1 -0
  30. package/dist/cjs/core/timing.d.ts +20 -0
  31. package/dist/cjs/core/timing.js +96 -0
  32. package/dist/cjs/core/timing.js.map +1 -0
  33. package/dist/cjs/core/transport.d.ts +80 -0
  34. package/dist/cjs/core/transport.js +472 -0
  35. package/dist/cjs/core/transport.js.map +1 -0
  36. package/dist/cjs/core/util.d.ts +25 -0
  37. package/dist/cjs/core/util.js +142 -0
  38. package/dist/cjs/core/util.js.map +1 -0
  39. package/dist/cjs/core/ws.d.ts +52 -0
  40. package/dist/cjs/core/ws.js +181 -0
  41. package/dist/cjs/core/ws.js.map +1 -0
  42. package/dist/cjs/generated/client.d.ts +62 -0
  43. package/dist/cjs/generated/client.js +130 -0
  44. package/dist/cjs/generated/client.js.map +1 -0
  45. package/dist/cjs/generated/errors.d.ts +4 -0
  46. package/dist/cjs/generated/errors.js +160 -0
  47. package/dist/cjs/generated/errors.js.map +1 -0
  48. package/dist/cjs/generated/ids.d.ts +114 -0
  49. package/dist/cjs/generated/ids.js +47 -0
  50. package/dist/cjs/generated/ids.js.map +1 -0
  51. package/dist/cjs/generated/jobs.d.ts +10 -0
  52. package/dist/cjs/generated/jobs.js +24 -0
  53. package/dist/cjs/generated/jobs.js.map +1 -0
  54. package/dist/cjs/generated/ns/actions.d.ts +161 -0
  55. package/dist/cjs/generated/ns/actions.js +304 -0
  56. package/dist/cjs/generated/ns/actions.js.map +1 -0
  57. package/dist/cjs/generated/ns/infer.d.ts +190 -0
  58. package/dist/cjs/generated/ns/infer.js +253 -0
  59. package/dist/cjs/generated/ns/infer.js.map +1 -0
  60. package/dist/cjs/generated/ns/keys.d.ts +76 -0
  61. package/dist/cjs/generated/ns/keys.js +144 -0
  62. package/dist/cjs/generated/ns/keys.js.map +1 -0
  63. package/dist/cjs/generated/ns/limits.d.ts +22 -0
  64. package/dist/cjs/generated/ns/limits.js +32 -0
  65. package/dist/cjs/generated/ns/limits.js.map +1 -0
  66. package/dist/cjs/generated/ns/orgs.d.ts +38 -0
  67. package/dist/cjs/generated/ns/orgs.js +68 -0
  68. package/dist/cjs/generated/ns/orgs.js.map +1 -0
  69. package/dist/cjs/generated/ns/projects.d.ts +57 -0
  70. package/dist/cjs/generated/ns/projects.js +115 -0
  71. package/dist/cjs/generated/ns/projects.js.map +1 -0
  72. package/dist/cjs/generated/ns/render.d.ts +159 -0
  73. package/dist/cjs/generated/ns/render.js +299 -0
  74. package/dist/cjs/generated/ns/render.js.map +1 -0
  75. package/dist/cjs/generated/ns/requests.d.ts +36 -0
  76. package/dist/cjs/generated/ns/requests.js +54 -0
  77. package/dist/cjs/generated/ns/requests.js.map +1 -0
  78. package/dist/cjs/generated/ns/routines.d.ts +212 -0
  79. package/dist/cjs/generated/ns/routines.js +419 -0
  80. package/dist/cjs/generated/ns/routines.js.map +1 -0
  81. package/dist/cjs/generated/ns/sandboxes.d.ts +318 -0
  82. package/dist/cjs/generated/ns/sandboxes.js +549 -0
  83. package/dist/cjs/generated/ns/sandboxes.js.map +1 -0
  84. package/dist/cjs/generated/ns/usage.d.ts +30 -0
  85. package/dist/cjs/generated/ns/usage.js +49 -0
  86. package/dist/cjs/generated/ns/usage.js.map +1 -0
  87. package/dist/cjs/generated/ns/vault.d.ts +69 -0
  88. package/dist/cjs/generated/ns/vault.js +122 -0
  89. package/dist/cjs/generated/ns/vault.js.map +1 -0
  90. package/dist/cjs/generated/ns/vision.d.ts +376 -0
  91. package/dist/cjs/generated/ns/vision.js +736 -0
  92. package/dist/cjs/generated/ns/vision.js.map +1 -0
  93. package/dist/cjs/generated/ns/webhooks.d.ts +50 -0
  94. package/dist/cjs/generated/ns/webhooks.js +91 -0
  95. package/dist/cjs/generated/ns/webhooks.js.map +1 -0
  96. package/dist/cjs/generated/types.d.ts +4613 -0
  97. package/dist/cjs/generated/types.js +4 -0
  98. package/dist/cjs/generated/types.js.map +1 -0
  99. package/dist/cjs/index.d.ts +22 -0
  100. package/dist/cjs/index.js +81 -0
  101. package/dist/cjs/index.js.map +1 -0
  102. package/dist/cjs/package.json +3 -0
  103. package/dist/cjs/webhooks.d.ts +19 -0
  104. package/dist/cjs/webhooks.js +85 -0
  105. package/dist/cjs/webhooks.js.map +1 -0
  106. package/dist/esm/core/client.d.ts +165 -0
  107. package/dist/esm/core/client.js +821 -0
  108. package/dist/esm/core/client.js.map +1 -0
  109. package/dist/esm/core/errors.d.ts +101 -0
  110. package/dist/esm/core/errors.js +239 -0
  111. package/dist/esm/core/errors.js.map +1 -0
  112. package/dist/esm/core/index.d.ts +12 -0
  113. package/dist/esm/core/index.js +15 -0
  114. package/dist/esm/core/index.js.map +1 -0
  115. package/dist/esm/core/jobs.d.ts +31 -0
  116. package/dist/esm/core/jobs.js +66 -0
  117. package/dist/esm/core/jobs.js.map +1 -0
  118. package/dist/esm/core/namespace.d.ts +7 -0
  119. package/dist/esm/core/namespace.js +9 -0
  120. package/dist/esm/core/namespace.js.map +1 -0
  121. package/dist/esm/core/op.d.ts +47 -0
  122. package/dist/esm/core/op.js +4 -0
  123. package/dist/esm/core/op.js.map +1 -0
  124. package/dist/esm/core/promise.d.ts +106 -0
  125. package/dist/esm/core/promise.js +193 -0
  126. package/dist/esm/core/promise.js.map +1 -0
  127. package/dist/esm/core/response.d.ts +54 -0
  128. package/dist/esm/core/response.js +86 -0
  129. package/dist/esm/core/response.js.map +1 -0
  130. package/dist/esm/core/sse.d.ts +79 -0
  131. package/dist/esm/core/sse.js +286 -0
  132. package/dist/esm/core/sse.js.map +1 -0
  133. package/dist/esm/core/timing.d.ts +20 -0
  134. package/dist/esm/core/timing.js +92 -0
  135. package/dist/esm/core/timing.js.map +1 -0
  136. package/dist/esm/core/transport.d.ts +80 -0
  137. package/dist/esm/core/transport.js +465 -0
  138. package/dist/esm/core/transport.js.map +1 -0
  139. package/dist/esm/core/util.d.ts +25 -0
  140. package/dist/esm/core/util.js +128 -0
  141. package/dist/esm/core/util.js.map +1 -0
  142. package/dist/esm/core/ws.d.ts +52 -0
  143. package/dist/esm/core/ws.js +175 -0
  144. package/dist/esm/core/ws.js.map +1 -0
  145. package/dist/esm/generated/client.d.ts +62 -0
  146. package/dist/esm/generated/client.js +126 -0
  147. package/dist/esm/generated/client.js.map +1 -0
  148. package/dist/esm/generated/errors.d.ts +4 -0
  149. package/dist/esm/generated/errors.js +157 -0
  150. package/dist/esm/generated/errors.js.map +1 -0
  151. package/dist/esm/generated/ids.d.ts +114 -0
  152. package/dist/esm/generated/ids.js +42 -0
  153. package/dist/esm/generated/ids.js.map +1 -0
  154. package/dist/esm/generated/jobs.d.ts +10 -0
  155. package/dist/esm/generated/jobs.js +21 -0
  156. package/dist/esm/generated/jobs.js.map +1 -0
  157. package/dist/esm/generated/ns/actions.d.ts +161 -0
  158. package/dist/esm/generated/ns/actions.js +300 -0
  159. package/dist/esm/generated/ns/actions.js.map +1 -0
  160. package/dist/esm/generated/ns/infer.d.ts +190 -0
  161. package/dist/esm/generated/ns/infer.js +249 -0
  162. package/dist/esm/generated/ns/infer.js.map +1 -0
  163. package/dist/esm/generated/ns/keys.d.ts +76 -0
  164. package/dist/esm/generated/ns/keys.js +140 -0
  165. package/dist/esm/generated/ns/keys.js.map +1 -0
  166. package/dist/esm/generated/ns/limits.d.ts +22 -0
  167. package/dist/esm/generated/ns/limits.js +28 -0
  168. package/dist/esm/generated/ns/limits.js.map +1 -0
  169. package/dist/esm/generated/ns/orgs.d.ts +38 -0
  170. package/dist/esm/generated/ns/orgs.js +64 -0
  171. package/dist/esm/generated/ns/orgs.js.map +1 -0
  172. package/dist/esm/generated/ns/projects.d.ts +57 -0
  173. package/dist/esm/generated/ns/projects.js +111 -0
  174. package/dist/esm/generated/ns/projects.js.map +1 -0
  175. package/dist/esm/generated/ns/render.d.ts +159 -0
  176. package/dist/esm/generated/ns/render.js +295 -0
  177. package/dist/esm/generated/ns/render.js.map +1 -0
  178. package/dist/esm/generated/ns/requests.d.ts +36 -0
  179. package/dist/esm/generated/ns/requests.js +50 -0
  180. package/dist/esm/generated/ns/requests.js.map +1 -0
  181. package/dist/esm/generated/ns/routines.d.ts +212 -0
  182. package/dist/esm/generated/ns/routines.js +415 -0
  183. package/dist/esm/generated/ns/routines.js.map +1 -0
  184. package/dist/esm/generated/ns/sandboxes.d.ts +318 -0
  185. package/dist/esm/generated/ns/sandboxes.js +545 -0
  186. package/dist/esm/generated/ns/sandboxes.js.map +1 -0
  187. package/dist/esm/generated/ns/usage.d.ts +30 -0
  188. package/dist/esm/generated/ns/usage.js +45 -0
  189. package/dist/esm/generated/ns/usage.js.map +1 -0
  190. package/dist/esm/generated/ns/vault.d.ts +69 -0
  191. package/dist/esm/generated/ns/vault.js +118 -0
  192. package/dist/esm/generated/ns/vault.js.map +1 -0
  193. package/dist/esm/generated/ns/vision.d.ts +376 -0
  194. package/dist/esm/generated/ns/vision.js +732 -0
  195. package/dist/esm/generated/ns/vision.js.map +1 -0
  196. package/dist/esm/generated/ns/webhooks.d.ts +50 -0
  197. package/dist/esm/generated/ns/webhooks.js +87 -0
  198. package/dist/esm/generated/ns/webhooks.js.map +1 -0
  199. package/dist/esm/generated/types.d.ts +4613 -0
  200. package/dist/esm/generated/types.js +3 -0
  201. package/dist/esm/generated/types.js.map +1 -0
  202. package/dist/esm/index.d.ts +22 -0
  203. package/dist/esm/index.js +28 -0
  204. package/dist/esm/index.js.map +1 -0
  205. package/dist/esm/webhooks.d.ts +19 -0
  206. package/dist/esm/webhooks.js +79 -0
  207. package/dist/esm/webhooks.js.map +1 -0
  208. package/package.json +98 -4
  209. package/src/core/client.ts +1022 -0
  210. package/src/core/errors.ts +296 -0
  211. package/src/core/index.ts +45 -0
  212. package/src/core/jobs.ts +94 -0
  213. package/src/core/namespace.ts +10 -0
  214. package/src/core/op.ts +53 -0
  215. package/src/core/promise.ts +268 -0
  216. package/src/core/response.ts +115 -0
  217. package/src/core/sse.ts +305 -0
  218. package/src/core/timing.ts +106 -0
  219. package/src/core/transport.ts +489 -0
  220. package/src/core/util.ts +138 -0
  221. package/src/core/ws.ts +215 -0
  222. package/src/generated/client.ts +143 -0
  223. package/src/generated/errors.ts +313 -0
  224. package/src/generated/ids.ts +47 -0
  225. package/src/generated/jobs.ts +25 -0
  226. package/src/generated/ns/actions.ts +353 -0
  227. package/src/generated/ns/infer.ts +332 -0
  228. package/src/generated/ns/keys.ts +152 -0
  229. package/src/generated/ns/limits.ts +35 -0
  230. package/src/generated/ns/orgs.ts +77 -0
  231. package/src/generated/ns/projects.ts +122 -0
  232. package/src/generated/ns/render.ts +348 -0
  233. package/src/generated/ns/requests.ts +61 -0
  234. package/src/generated/ns/routines.ts +474 -0
  235. package/src/generated/ns/sandboxes.ts +671 -0
  236. package/src/generated/ns/usage.ts +56 -0
  237. package/src/generated/ns/vault.ts +136 -0
  238. package/src/generated/ns/vision.ts +836 -0
  239. package/src/generated/ns/webhooks.ts +100 -0
  240. package/src/generated/types.ts +5131 -0
  241. package/src/index.ts +30 -0
  242. package/src/webhooks.ts +100 -0
@@ -0,0 +1,140 @@
1
+ // Generated by packages/sdk/scripts/generate.mjs from packages/spec/dist. Do not edit; run `pnpm generate`.
2
+ import { Namespace } from "../../core/namespace.js";
3
+ const listKeysOp = {
4
+ id: "platformListKeys",
5
+ method: "GET",
6
+ path: "/v1/keys",
7
+ edge: true,
8
+ timeoutMs: 10000,
9
+ scope: "platform:read",
10
+ };
11
+ const createKeyOp = {
12
+ id: "platformCreateKey",
13
+ method: "POST",
14
+ path: "/v1/keys",
15
+ body: "json",
16
+ edge: true,
17
+ idem: true,
18
+ timeoutMs: 10000,
19
+ scope: "platform:write",
20
+ };
21
+ const getCurrentKeyOp = {
22
+ id: "platformGetCurrentKey",
23
+ method: "GET",
24
+ path: "/v1/keys/current",
25
+ edge: true,
26
+ timeoutMs: 5000,
27
+ scope: "authenticated",
28
+ };
29
+ const revokeKeyOp = {
30
+ id: "platformRevokeKey",
31
+ method: "DELETE",
32
+ path: "/v1/keys/{key_id}",
33
+ params: ["key_id"],
34
+ edge: true,
35
+ timeoutMs: 10000,
36
+ scope: "platform:write",
37
+ };
38
+ const getKeyOp = {
39
+ id: "platformGetKey",
40
+ method: "GET",
41
+ path: "/v1/keys/{key_id}",
42
+ params: ["key_id"],
43
+ edge: true,
44
+ timeoutMs: 10000,
45
+ scope: "platform:read",
46
+ };
47
+ const updateKeyOp = {
48
+ id: "platformUpdateKey",
49
+ method: "PATCH",
50
+ path: "/v1/keys/{key_id}",
51
+ params: ["key_id"],
52
+ body: "json",
53
+ edge: true,
54
+ timeoutMs: 10000,
55
+ scope: "platform:write",
56
+ };
57
+ /** Descriptors of every keys operation, keyed by method name (for tooling and custom clients). */
58
+ export const keysOps = {
59
+ listKeys: listKeysOp,
60
+ createKey: createKeyOp,
61
+ getCurrentKey: getCurrentKeyOp,
62
+ revokeKey: revokeKeyOp,
63
+ getKey: getKeyOp,
64
+ updateKey: updateKeyOp,
65
+ };
66
+ /** API keys (`/v1/keys`; served by beta-api.b3os.org). */
67
+ export class KeysAPI extends Namespace {
68
+ /**
69
+ * List API keys
70
+ *
71
+ * Lists the organization's API keys and CLI tokens (secrets are never returned), newest first. `kind` tells
72
+ * them apart; revoke a lost CLI token like any key.
73
+ *
74
+ * `GET /v1/keys` · scope `platform:read` · served by beta-api.b3os.org
75
+ */
76
+ listKeys(params, options) {
77
+ return this._client._list(listKeysOp, { query: params }, options);
78
+ }
79
+ /**
80
+ * Create an API key
81
+ *
82
+ * Creates a key in your project (or `project`, in the same organization). `scopes` and `spend_cap_usd` may not
83
+ * exceed the caller's own, and when the caller expires, `expires_at` must be set and no later than the caller's
84
+ * expiry (`forbidden`, reason `scope_escalation`). The response is the only time `secret` is returned.
85
+ *
86
+ * `POST /v1/keys` · scope `platform:write` · served by beta-api.b3os.org
87
+ */
88
+ createKey(body, options) {
89
+ return this._client._call(createKeyOp, { body }, options);
90
+ }
91
+ /**
92
+ * Describe the calling credential
93
+ *
94
+ * Returns who is calling: the key or CLI token (or dashboard session, or sandbox), its organization and
95
+ * project, scopes, spend cap and expiry. Any valid credential may call it, whatever its scopes.
96
+ *
97
+ * `GET /v1/keys/current` · scope `authenticated` · served by beta-api.b3os.org
98
+ */
99
+ getCurrentKey(options) {
100
+ return this._client._call(getCurrentKeyOp, {}, options);
101
+ }
102
+ /**
103
+ * Revoke an API key
104
+ *
105
+ * Revokes the key. The operations the edge answers itself refuse it at once; every other request refuses it
106
+ * within 10 seconds (the edge keeps a key's record at most 10 seconds after reading it from its primary
107
+ * database, and never reads keys from a replica). The edge also pushes the revocation to nodes, so open
108
+ * streams authenticated by it close within 60 seconds. Routines published with it pause their triggers.
109
+ * Returns the revoked key; it stays listed for audit. Changes made with `PATCH /v1/keys/{key_id}` take effect
110
+ * within the same 10 seconds.
111
+ *
112
+ * `DELETE /v1/keys/{key_id}` · scope `platform:write` · served by beta-api.b3os.org
113
+ */
114
+ revokeKey(keyId, options) {
115
+ return this._client._call(revokeKeyOp, { path: [keyId] }, options);
116
+ }
117
+ /**
118
+ * Get an API key
119
+ *
120
+ * Returns one key's metadata, spend this period and last use. The secret is never returned.
121
+ *
122
+ * `GET /v1/keys/{key_id}` · scope `platform:read` · served by beta-api.b3os.org
123
+ */
124
+ getKey(keyId, options) {
125
+ return this._client._call(getKeyOp, { path: [keyId] }, options);
126
+ }
127
+ /**
128
+ * Update an API key
129
+ *
130
+ * Renames a key or changes its spend cap, expiry or metadata. Scopes cannot change; create a new key instead.
131
+ * A caller with a spend cap or an expiry cannot set a larger cap or a later (or no) expiry than its own
132
+ * (`forbidden`, reason `scope_escalation`).
133
+ *
134
+ * `PATCH /v1/keys/{key_id}` · scope `platform:write` · served by beta-api.b3os.org
135
+ */
136
+ updateKey(keyId, body, options) {
137
+ return this._client._call(updateKeyOp, { path: [keyId], body }, options);
138
+ }
139
+ }
140
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../src/generated/ns/keys.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,UAAU,GAAO;IACrB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,WAAW,GAAO;IACtB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,MAAM;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.ts";
2
+ import { Namespace } from "../../core/namespace.ts";
3
+ import type { Op } from "../../core/op.ts";
4
+ import type { APIPromise } from "../../core/promise.ts";
5
+ import type * as T from "../types.ts";
6
+ /** Descriptors of every limits operation, keyed by method name (for tooling and custom clients). */
7
+ export declare const limitsOps: {
8
+ readonly getLimits: Op;
9
+ };
10
+ /** Limits that apply to the caller (`/v1/limits`; served by beta-api.b3os.org). */
11
+ export declare class LimitsAPI extends Namespace {
12
+ /**
13
+ * Get your limits
14
+ *
15
+ * Returns every limit that applies to the caller with its current usage: concurrency, rates, quotas and size
16
+ * caps per product, plus the key's spend cap. Any valid credential may call it. The IDs match the `limit`
17
+ * member of `429` and `422` problems.
18
+ *
19
+ * `GET /v1/limits` · scope `authenticated` · served by beta-api.b3os.org
20
+ */
21
+ getLimits(options?: RequestOptions): APIPromise<T.Limits>;
22
+ }
@@ -0,0 +1,28 @@
1
+ // Generated by packages/sdk/scripts/generate.mjs from packages/spec/dist. Do not edit; run `pnpm generate`.
2
+ import { Namespace } from "../../core/namespace.js";
3
+ const getLimitsOp = {
4
+ id: "platformGetLimits",
5
+ method: "GET",
6
+ path: "/v1/limits",
7
+ edge: true,
8
+ timeoutMs: 10000,
9
+ scope: "authenticated",
10
+ };
11
+ /** Descriptors of every limits operation, keyed by method name (for tooling and custom clients). */
12
+ export const limitsOps = { getLimits: getLimitsOp };
13
+ /** Limits that apply to the caller (`/v1/limits`; served by beta-api.b3os.org). */
14
+ export class LimitsAPI extends Namespace {
15
+ /**
16
+ * Get your limits
17
+ *
18
+ * Returns every limit that applies to the caller with its current usage: concurrency, rates, quotas and size
19
+ * caps per product, plus the key's spend cap. Any valid credential may call it. The IDs match the `limit`
20
+ * member of `429` and `422` problems.
21
+ *
22
+ * `GET /v1/limits` · scope `authenticated` · served by beta-api.b3os.org
23
+ */
24
+ getLimits(options) {
25
+ return this._client._call(getLimitsOp, {}, options);
26
+ }
27
+ }
28
+ //# sourceMappingURL=limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.js","sourceRoot":"","sources":["../../../../src/generated/ns/limits.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,WAAW,GAAO;IACtB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AAEF,oGAAoG;AACpG,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,SAAS,EAAE,WAAW,EAAW,CAAC;AAE7D,mFAAmF;AACnF,MAAM,OAAO,SAAU,SAAQ,SAAS;IACtC;;;;;;;;OAQG;IACH,SAAS,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAW,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,38 @@
1
+ import type { RequestOptions } from "../../core/client.ts";
2
+ import { Namespace } from "../../core/namespace.ts";
3
+ import type { Op } from "../../core/op.ts";
4
+ import type { APIPromise, ListPromise } from "../../core/promise.ts";
5
+ import type * as T from "../types.ts";
6
+ /** Descriptors of every orgs operation, keyed by method name (for tooling and custom clients). */
7
+ export declare const orgsOps: {
8
+ readonly listOrgs: Op;
9
+ readonly getOrg: Op;
10
+ readonly listMembers: Op;
11
+ };
12
+ /** Organizations and members (`/v1/orgs`; served by beta-api.b3os.org). */
13
+ export declare class OrgsAPI extends Namespace {
14
+ /**
15
+ * List organizations
16
+ *
17
+ * Lists the organizations the caller belongs to (an API key belongs to exactly one).
18
+ *
19
+ * `GET /v1/orgs` · scope `authenticated` · served by beta-api.b3os.org
20
+ */
21
+ listOrgs(options?: RequestOptions): APIPromise<T.OrganizationList>;
22
+ /**
23
+ * Get an organization
24
+ *
25
+ * Returns one organization the caller belongs to, with the caller's role in it.
26
+ *
27
+ * `GET /v1/orgs/{org_id}` · scope `platform:read` · served by beta-api.b3os.org
28
+ */
29
+ getOrg(orgId: string, options?: RequestOptions): APIPromise<T.Organization>;
30
+ /**
31
+ * List members
32
+ *
33
+ * Lists the organization's members and their roles.
34
+ *
35
+ * `GET /v1/orgs/{org_id}/members` · scope `platform:read` · served by beta-api.b3os.org
36
+ */
37
+ listMembers(orgId: string, params?: T.PlatformListMembersParams, options?: RequestOptions): ListPromise<T.MemberList, T.Member>;
38
+ }
@@ -0,0 +1,64 @@
1
+ // Generated by packages/sdk/scripts/generate.mjs from packages/spec/dist. Do not edit; run `pnpm generate`.
2
+ import { Namespace } from "../../core/namespace.js";
3
+ const listOrgsOp = {
4
+ id: "platformListOrgs",
5
+ method: "GET",
6
+ path: "/v1/orgs",
7
+ edge: true,
8
+ timeoutMs: 10000,
9
+ scope: "authenticated",
10
+ };
11
+ const getOrgOp = {
12
+ id: "platformGetOrg",
13
+ method: "GET",
14
+ path: "/v1/orgs/{org_id}",
15
+ params: ["org_id"],
16
+ edge: true,
17
+ timeoutMs: 10000,
18
+ scope: "platform:read",
19
+ };
20
+ const listMembersOp = {
21
+ id: "platformListMembers",
22
+ method: "GET",
23
+ path: "/v1/orgs/{org_id}/members",
24
+ params: ["org_id"],
25
+ edge: true,
26
+ timeoutMs: 10000,
27
+ scope: "platform:read",
28
+ };
29
+ /** Descriptors of every orgs operation, keyed by method name (for tooling and custom clients). */
30
+ export const orgsOps = { listOrgs: listOrgsOp, getOrg: getOrgOp, listMembers: listMembersOp };
31
+ /** Organizations and members (`/v1/orgs`; served by beta-api.b3os.org). */
32
+ export class OrgsAPI extends Namespace {
33
+ /**
34
+ * List organizations
35
+ *
36
+ * Lists the organizations the caller belongs to (an API key belongs to exactly one).
37
+ *
38
+ * `GET /v1/orgs` · scope `authenticated` · served by beta-api.b3os.org
39
+ */
40
+ listOrgs(options) {
41
+ return this._client._call(listOrgsOp, {}, options);
42
+ }
43
+ /**
44
+ * Get an organization
45
+ *
46
+ * Returns one organization the caller belongs to, with the caller's role in it.
47
+ *
48
+ * `GET /v1/orgs/{org_id}` · scope `platform:read` · served by beta-api.b3os.org
49
+ */
50
+ getOrg(orgId, options) {
51
+ return this._client._call(getOrgOp, { path: [orgId] }, options);
52
+ }
53
+ /**
54
+ * List members
55
+ *
56
+ * Lists the organization's members and their roles.
57
+ *
58
+ * `GET /v1/orgs/{org_id}/members` · scope `platform:read` · served by beta-api.b3os.org
59
+ */
60
+ listMembers(orgId, params, options) {
61
+ return this._client._list(listMembersOp, { path: [orgId], query: params }, options);
62
+ }
63
+ }
64
+ //# sourceMappingURL=orgs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orgs.js","sourceRoot":"","sources":["../../../../src/generated/ns/orgs.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,UAAU,GAAO;IACrB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,QAAQ,GAAO;IACnB,EAAE,EAAE,gBAAgB;IACpB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,aAAa,GAAO;IACxB,EAAE,EAAE,qBAAqB;IACzB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,2BAA2B;IACjC,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AAEF,kGAAkG;AAClG,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAW,CAAC;AAEvG,2EAA2E;AAC3E,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAqB,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAiB,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CACT,KAAa,EACb,MAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAyB,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9G,CAAC;CACF"}
@@ -0,0 +1,57 @@
1
+ import type { RequestOptions } from "../../core/client.ts";
2
+ import { Namespace } from "../../core/namespace.ts";
3
+ import type { Op } from "../../core/op.ts";
4
+ import type { APIPromise, ListPromise } from "../../core/promise.ts";
5
+ import type * as T from "../types.ts";
6
+ /** Descriptors of every projects operation, keyed by method name (for tooling and custom clients). */
7
+ export declare const projectsOps: {
8
+ readonly listProjects: Op;
9
+ readonly createProject: Op;
10
+ readonly deleteProject: Op;
11
+ readonly getProject: Op;
12
+ readonly updateProject: Op;
13
+ };
14
+ /** Projects (`/v1/projects`; served by beta-api.b3os.org). */
15
+ export declare class ProjectsAPI extends Namespace {
16
+ /**
17
+ * List projects
18
+ *
19
+ * Lists the projects of the caller's organization.
20
+ *
21
+ * `GET /v1/projects` · scope `platform:read` · served by beta-api.b3os.org
22
+ */
23
+ listProjects(params?: T.PlatformListProjectsParams, options?: RequestOptions): ListPromise<T.ProjectList, T.Project>;
24
+ /**
25
+ * Create a project
26
+ *
27
+ * Creates a project in the caller's organization. Objects, keys, connections and usage are separated per project.
28
+ *
29
+ * `POST /v1/projects` · scope `platform:write` · served by beta-api.b3os.org
30
+ */
31
+ createProject(body: T.ProjectCreateRequest, options?: RequestOptions): APIPromise<T.Project>;
32
+ /**
33
+ * Delete a project
34
+ *
35
+ * Deletes an empty project: it must have no running sandboxes, open browser sessions or active routines
36
+ * (`project_not_empty`), and may not be the organization's last project (`last_project`). Its keys are revoked.
37
+ *
38
+ * `DELETE /v1/projects/{project_id}` · scope `platform:write` · served by beta-api.b3os.org
39
+ */
40
+ deleteProject(projectId: string, options?: RequestOptions): APIPromise<T.Deleted>;
41
+ /**
42
+ * Get a project
43
+ *
44
+ * Returns one project of the caller's organization.
45
+ *
46
+ * `GET /v1/projects/{project_id}` · scope `platform:read` · served by beta-api.b3os.org
47
+ */
48
+ getProject(projectId: string, options?: RequestOptions): APIPromise<T.Project>;
49
+ /**
50
+ * Update a project
51
+ *
52
+ * Renames a project or replaces its metadata.
53
+ *
54
+ * `PATCH /v1/projects/{project_id}` · scope `platform:write` · served by beta-api.b3os.org
55
+ */
56
+ updateProject(projectId: string, body: T.ProjectUpdateRequest, options?: RequestOptions): APIPromise<T.Project>;
57
+ }
@@ -0,0 +1,111 @@
1
+ // Generated by packages/sdk/scripts/generate.mjs from packages/spec/dist. Do not edit; run `pnpm generate`.
2
+ import { Namespace } from "../../core/namespace.js";
3
+ const listProjectsOp = {
4
+ id: "platformListProjects",
5
+ method: "GET",
6
+ path: "/v1/projects",
7
+ edge: true,
8
+ timeoutMs: 10000,
9
+ scope: "platform:read",
10
+ };
11
+ const createProjectOp = {
12
+ id: "platformCreateProject",
13
+ method: "POST",
14
+ path: "/v1/projects",
15
+ body: "json",
16
+ edge: true,
17
+ idem: true,
18
+ timeoutMs: 10000,
19
+ scope: "platform:write",
20
+ };
21
+ const deleteProjectOp = {
22
+ id: "platformDeleteProject",
23
+ method: "DELETE",
24
+ path: "/v1/projects/{project_id}",
25
+ params: ["project_id"],
26
+ edge: true,
27
+ timeoutMs: 15000,
28
+ scope: "platform:write",
29
+ };
30
+ const getProjectOp = {
31
+ id: "platformGetProject",
32
+ method: "GET",
33
+ path: "/v1/projects/{project_id}",
34
+ params: ["project_id"],
35
+ edge: true,
36
+ timeoutMs: 10000,
37
+ scope: "platform:read",
38
+ };
39
+ const updateProjectOp = {
40
+ id: "platformUpdateProject",
41
+ method: "PATCH",
42
+ path: "/v1/projects/{project_id}",
43
+ params: ["project_id"],
44
+ body: "json",
45
+ edge: true,
46
+ timeoutMs: 10000,
47
+ scope: "platform:write",
48
+ };
49
+ /** Descriptors of every projects operation, keyed by method name (for tooling and custom clients). */
50
+ export const projectsOps = {
51
+ listProjects: listProjectsOp,
52
+ createProject: createProjectOp,
53
+ deleteProject: deleteProjectOp,
54
+ getProject: getProjectOp,
55
+ updateProject: updateProjectOp,
56
+ };
57
+ /** Projects (`/v1/projects`; served by beta-api.b3os.org). */
58
+ export class ProjectsAPI extends Namespace {
59
+ /**
60
+ * List projects
61
+ *
62
+ * Lists the projects of the caller's organization.
63
+ *
64
+ * `GET /v1/projects` · scope `platform:read` · served by beta-api.b3os.org
65
+ */
66
+ listProjects(params, options) {
67
+ return this._client._list(listProjectsOp, { query: params }, options);
68
+ }
69
+ /**
70
+ * Create a project
71
+ *
72
+ * Creates a project in the caller's organization. Objects, keys, connections and usage are separated per project.
73
+ *
74
+ * `POST /v1/projects` · scope `platform:write` · served by beta-api.b3os.org
75
+ */
76
+ createProject(body, options) {
77
+ return this._client._call(createProjectOp, { body }, options);
78
+ }
79
+ /**
80
+ * Delete a project
81
+ *
82
+ * Deletes an empty project: it must have no running sandboxes, open browser sessions or active routines
83
+ * (`project_not_empty`), and may not be the organization's last project (`last_project`). Its keys are revoked.
84
+ *
85
+ * `DELETE /v1/projects/{project_id}` · scope `platform:write` · served by beta-api.b3os.org
86
+ */
87
+ deleteProject(projectId, options) {
88
+ return this._client._call(deleteProjectOp, { path: [projectId] }, options);
89
+ }
90
+ /**
91
+ * Get a project
92
+ *
93
+ * Returns one project of the caller's organization.
94
+ *
95
+ * `GET /v1/projects/{project_id}` · scope `platform:read` · served by beta-api.b3os.org
96
+ */
97
+ getProject(projectId, options) {
98
+ return this._client._call(getProjectOp, { path: [projectId] }, options);
99
+ }
100
+ /**
101
+ * Update a project
102
+ *
103
+ * Renames a project or replaces its metadata.
104
+ *
105
+ * `PATCH /v1/projects/{project_id}` · scope `platform:write` · served by beta-api.b3os.org
106
+ */
107
+ updateProject(projectId, body, options) {
108
+ return this._client._call(updateProjectOp, { path: [projectId], body }, options);
109
+ }
110
+ }
111
+ //# sourceMappingURL=projects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../../src/generated/ns/projects.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,cAAc,GAAO;IACzB,EAAE,EAAE,sBAAsB;IAC1B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,eAAe,GAAO;IAC1B,EAAE,EAAE,uBAAuB;IAC3B,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,gBAAgB;CACxB,CAAC;AACF,MAAM,eAAe,GAAO;IAC1B,EAAE,EAAE,uBAAuB;IAC3B,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,2BAA2B;IACjC,MAAM,EAAE,CAAC,YAAY,CAAC;IACtB,IAAI,EAAE,IAAI;I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,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CAAC,SAAiB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAY,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,SAAiB,EAAE,IAA4B,EAAE,OAAwB;QACrF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAY,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9F,CAAC;CACF"}
@@ -0,0 +1,159 @@
1
+ import type { RequestOptions, StreamOptions } from "../../core/client.ts";
2
+ import { Namespace } from "../../core/namespace.ts";
3
+ import type { Op } from "../../core/op.ts";
4
+ import type { APIPromise, JobPromise, ListPromise } from "../../core/promise.ts";
5
+ import type { EventStream } from "../../core/sse.ts";
6
+ import type * as T from "../types.ts";
7
+ /** Descriptors of every render operation, keyed by method name (for tooling and custom clients). */
8
+ export declare const renderOps: {
9
+ readonly getArtifact: Op;
10
+ readonly listPresets: Op;
11
+ readonly listScreenshots: Op;
12
+ readonly createScreenshot: Op;
13
+ readonly deleteScreenshot: Op;
14
+ readonly getScreenshot: Op;
15
+ readonly listVideos: Op;
16
+ readonly createVideo: Op;
17
+ readonly deleteVideo: Op;
18
+ readonly getVideo: Op;
19
+ readonly cancelVideo: Op;
20
+ readonly videoEvents: Op;
21
+ readonly restyleVideo: Op;
22
+ readonly getVideoTimeline: Op;
23
+ };
24
+ /** Styled screenshots and product videos (`/v1/render`). */
25
+ export declare class RenderAPI extends Namespace {
26
+ /**
27
+ * Get an artifact
28
+ *
29
+ * Returns an artifact's metadata with a fresh signed URL (valid for 24 hours). The URL needs no credentials and
30
+ * is safe to embed: it works for anyone who has it until `url_expires_at`, and the bytes are always served with
31
+ * `Content-Security-Policy: sandbox` (URL format: `renderGetArtifactContent`).
32
+ *
33
+ * `GET /v1/render/artifacts/{artifact_id}` · scope `render:read` · served by the node
34
+ */
35
+ getArtifact(artifactId: string, options?: RequestOptions): APIPromise<T.Artifact>;
36
+ /**
37
+ * List style presets
38
+ *
39
+ * Lists the style presets `style` can name (backgrounds, window frames, cursors, caption styles, click effects), with a preview image for each.
40
+ *
41
+ * `GET /v1/render/presets` · scope `render:read` · served by the node
42
+ */
43
+ listPresets(params?: T.RenderListPresetsParams, options?: RequestOptions): APIPromise<T.PresetList>;
44
+ /**
45
+ * List screenshots
46
+ *
47
+ * Lists screenshots in this project, newest first. Screenshots are kept for 7 days.
48
+ *
49
+ * `GET /v1/render/screenshots` · scope `render:read` · served by the node
50
+ */
51
+ listScreenshots(params?: T.RenderListScreenshotsParams, options?: RequestOptions): ListPromise<T.ScreenshotList, T.Screenshot>;
52
+ /**
53
+ * Take a screenshot
54
+ *
55
+ * Loads `url` (or renders `html`) in a warm browser, captures the viewport, the full page or one element, and
56
+ * composes it with a style (background, window frame, padding, shadow). Returns JSON with signed artifact
57
+ * URLs, or the image bytes directly when `Accept` is `image/png`, `image/jpeg` or `image/webp`. `variants`
58
+ * adds extra encodings of the same capture. Bills one `render.screenshot` per capture plus one per variant.
59
+ *
60
+ * `POST /v1/render/screenshots` · scope `render:run` · served by the node
61
+ */
62
+ createScreenshot(body: T.ScreenshotCreateRequest, options: RequestOptions & {
63
+ accept: "image/webp" | "image/png" | "image/jpeg";
64
+ }): APIPromise<Uint8Array>;
65
+ createScreenshot(body: T.ScreenshotCreateRequest, options?: RequestOptions & {
66
+ accept?: "application/json";
67
+ }): APIPromise<T.Screenshot>;
68
+ /**
69
+ * Delete a screenshot
70
+ *
71
+ * Deletes the screenshot and its artifacts. Signed URLs stop working within a minute.
72
+ *
73
+ * `DELETE /v1/render/screenshots/{screenshot_id}` · scope `render:write` · served by the node
74
+ */
75
+ deleteScreenshot(screenshotId: string, options?: RequestOptions): APIPromise<T.Deleted>;
76
+ /**
77
+ * Get a screenshot
78
+ *
79
+ * Returns the screenshot with fresh signed URLs for its artifacts.
80
+ *
81
+ * `GET /v1/render/screenshots/{screenshot_id}` · scope `render:read` · served by the node
82
+ */
83
+ getScreenshot(screenshotId: string, options?: RequestOptions): APIPromise<T.Screenshot>;
84
+ /**
85
+ * List videos
86
+ *
87
+ * Lists videos in this project, newest first. Videos and their artifacts are kept for 7 days.
88
+ *
89
+ * `GET /v1/render/videos` · scope `render:read` · served by the node
90
+ */
91
+ listVideos(params?: T.RenderListVideosParams, options?: RequestOptions): ListPromise<T.VideoList, T.Video>;
92
+ /**
93
+ * Record a video
94
+ *
95
+ * Starts a job that records a scripted demo of `source.url`. Narration (`say`) is synthesized first with
96
+ * `/v1/infer/audio/speech`; the director then places each beat's steps on its narration, plans cursor and
97
+ * camera, records segments in parallel on a virtual clock, composes at the output frame rate and encodes MP4
98
+ * (H.264, BT.709), GIF, poster and captions. Artifacts appear as they finish (`video.artifact` events, poster
99
+ * first). Bills `render.video_s` per second of output.
100
+ *
101
+ * `POST /v1/render/videos` · scope `render:run` · served by the node
102
+ */
103
+ createVideo(body: T.VideoCreateRequest, options?: RequestOptions): JobPromise<T.Video, T.VideoEvent>;
104
+ /**
105
+ * Delete a video
106
+ *
107
+ * Cancels the job if it is still running, then deletes the video, its artifacts and its archived capture.
108
+ *
109
+ * `DELETE /v1/render/videos/{video_id}` · scope `render:write` · served by the node
110
+ */
111
+ deleteVideo(videoId: string, options?: RequestOptions): APIPromise<T.Deleted>;
112
+ /**
113
+ * Get a video
114
+ *
115
+ * Returns the video job; once it succeeded, `result.artifacts` lists its files with fresh signed URLs.
116
+ *
117
+ * `GET /v1/render/videos/{video_id}` · scope `render:read` · served by the node
118
+ */
119
+ getVideo(videoId: string, options?: RequestOptions): APIPromise<T.Video>;
120
+ /**
121
+ * Cancel a video
122
+ *
123
+ * Stops the job. Artifacts already produced are kept; seconds already encoded are billed.
124
+ *
125
+ * `POST /v1/render/videos/{video_id}/cancel` · scope `render:run` · served by the node
126
+ */
127
+ cancelVideo(videoId: string, options?: RequestOptions): APIPromise<T.Video>;
128
+ /**
129
+ * Stream a video's events
130
+ *
131
+ * Server-sent events for the video job: lifecycle events, `video.phase` as the job moves through voice, plan,
132
+ * capture, compose, encode and upload, and `video.artifact` as each file becomes available. Ends after the
133
+ * terminal event; reconnect with `Last-Event-ID` to resume.
134
+ *
135
+ * `GET /v1/render/videos/{video_id}/events` · scope `render:read` · served by the node
136
+ */
137
+ videoEvents(videoId: string, options?: StreamOptions): EventStream<T.VideoEvent>;
138
+ /**
139
+ * Restyle a video
140
+ *
141
+ * Starts a job that re-composes the source video's archived raw capture with a new style, captions, output
142
+ * size or formats. No browser runs and narration is reused, so it takes seconds. Camera moves are not
143
+ * changed. The result is a new video (`restyled_from` names the source). The raw capture is kept as long as
144
+ * the source video (7 days).
145
+ *
146
+ * `POST /v1/render/videos/{video_id}/restyle` · scope `render:run` · served by the node
147
+ */
148
+ restyleVideo(videoId: string, body: T.VideoRestyleRequest, options?: RequestOptions): JobPromise<T.Video, T.VideoEvent>;
149
+ /**
150
+ * Get a video's timeline
151
+ *
152
+ * Returns the compiled timeline of a video that has finished planning: beats, narration with word timings,
153
+ * the timed action list the recorder replayed, cursor path, camera keyframes, captions and style
154
+ * (`timeline.schema.json`). `frames=1` adds the per-frame compositor state (large; for debugging).
155
+ *
156
+ * `GET /v1/render/videos/{video_id}/timeline` · scope `render:read` · served by the node
157
+ */
158
+ getVideoTimeline(videoId: string, params?: T.RenderGetVideoTimelineParams, options?: RequestOptions): APIPromise<T.RenderTimeline>;
159
+ }