@distilled.cloud/daytona 0.0.0-placeholder → 1.0.0-rc.13

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 (203) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/lib/credentials.d.ts +46 -0
  4. package/lib/credentials.d.ts.map +1 -0
  5. package/lib/credentials.js +67 -0
  6. package/lib/credentials.js.map +1 -0
  7. package/lib/endpoints.d.ts +15 -0
  8. package/lib/endpoints.d.ts.map +1 -0
  9. package/lib/endpoints.js +28 -0
  10. package/lib/endpoints.js.map +1 -0
  11. package/lib/errors.d.ts +53 -0
  12. package/lib/errors.d.ts.map +1 -0
  13. package/lib/errors.js +30 -0
  14. package/lib/errors.js.map +1 -0
  15. package/lib/index.d.ts +30 -0
  16. package/lib/index.d.ts.map +1 -0
  17. package/lib/index.js +30 -0
  18. package/lib/index.js.map +1 -0
  19. package/lib/pagination.d.ts +10 -0
  20. package/lib/pagination.d.ts.map +1 -0
  21. package/lib/pagination.js +10 -0
  22. package/lib/pagination.js.map +1 -0
  23. package/lib/protocol.d.ts +18 -0
  24. package/lib/protocol.d.ts.map +1 -0
  25. package/lib/protocol.js +75 -0
  26. package/lib/protocol.js.map +1 -0
  27. package/lib/response-validation.test.d.ts +4 -0
  28. package/lib/response-validation.test.d.ts.map +1 -0
  29. package/lib/response-validation.test.js +31 -0
  30. package/lib/response-validation.test.js.map +1 -0
  31. package/lib/retry.d.ts +50 -0
  32. package/lib/retry.d.ts.map +1 -0
  33. package/lib/retry.js +43 -0
  34. package/lib/retry.js.map +1 -0
  35. package/lib/services/api_keys.d.ts +120 -0
  36. package/lib/services/api_keys.d.ts.map +1 -0
  37. package/lib/services/api_keys.js +126 -0
  38. package/lib/services/api_keys.js.map +1 -0
  39. package/lib/services/audit.d.ts +159 -0
  40. package/lib/services/audit.d.ts.map +1 -0
  41. package/lib/services/audit.js +126 -0
  42. package/lib/services/audit.js.map +1 -0
  43. package/lib/services/computer_use.d.ts +484 -0
  44. package/lib/services/computer_use.d.ts.map +1 -0
  45. package/lib/services/computer_use.js +672 -0
  46. package/lib/services/computer_use.js.map +1 -0
  47. package/lib/services/config.d.ts +138 -0
  48. package/lib/services/config.d.ts.map +1 -0
  49. package/lib/services/config.js +88 -0
  50. package/lib/services/config.js.map +1 -0
  51. package/lib/services/docker_registry.d.ts +126 -0
  52. package/lib/services/docker_registry.d.ts.map +1 -0
  53. package/lib/services/docker_registry.js +135 -0
  54. package/lib/services/docker_registry.js.map +1 -0
  55. package/lib/services/file_system.d.ts +203 -0
  56. package/lib/services/file_system.d.ts.map +1 -0
  57. package/lib/services/file_system.js +255 -0
  58. package/lib/services/file_system.js.map +1 -0
  59. package/lib/services/git.d.ts +338 -0
  60. package/lib/services/git.d.ts.map +1 -0
  61. package/lib/services/git.js +417 -0
  62. package/lib/services/git.js.map +1 -0
  63. package/lib/services/health.d.ts +41 -0
  64. package/lib/services/health.d.ts.map +1 -0
  65. package/lib/services/health.js +49 -0
  66. package/lib/services/health.js.map +1 -0
  67. package/lib/services/index.d.ts +31 -0
  68. package/lib/services/index.d.ts.map +1 -0
  69. package/lib/services/index.js +32 -0
  70. package/lib/services/index.js.map +1 -0
  71. package/lib/services/info.d.ts +37 -0
  72. package/lib/services/info.d.ts.map +1 -0
  73. package/lib/services/info.js +55 -0
  74. package/lib/services/info.js.map +1 -0
  75. package/lib/services/interpreter.d.ts +56 -0
  76. package/lib/services/interpreter.d.ts.map +1 -0
  77. package/lib/services/interpreter.js +83 -0
  78. package/lib/services/interpreter.js.map +1 -0
  79. package/lib/services/jobs.d.ts +104 -0
  80. package/lib/services/jobs.d.ts.map +1 -0
  81. package/lib/services/jobs.js +94 -0
  82. package/lib/services/jobs.js.map +1 -0
  83. package/lib/services/lsp.d.ts +137 -0
  84. package/lib/services/lsp.d.ts.map +1 -0
  85. package/lib/services/lsp.js +160 -0
  86. package/lib/services/lsp.js.map +1 -0
  87. package/lib/services/object_storage.d.ts +31 -0
  88. package/lib/services/object_storage.d.ts.map +1 -0
  89. package/lib/services/object_storage.js +33 -0
  90. package/lib/services/object_storage.js.map +1 -0
  91. package/lib/services/organizations.d.ts +963 -0
  92. package/lib/services/organizations.d.ts.map +1 -0
  93. package/lib/services/organizations.js +1143 -0
  94. package/lib/services/organizations.js.map +1 -0
  95. package/lib/services/port.d.ts +29 -0
  96. package/lib/services/port.d.ts.map +1 -0
  97. package/lib/services/port.js +41 -0
  98. package/lib/services/port.js.map +1 -0
  99. package/lib/services/preview.d.ts +73 -0
  100. package/lib/services/preview.d.ts.map +1 -0
  101. package/lib/services/preview.js +125 -0
  102. package/lib/services/preview.js.map +1 -0
  103. package/lib/services/process.d.ts +329 -0
  104. package/lib/services/process.d.ts.map +1 -0
  105. package/lib/services/process.js +421 -0
  106. package/lib/services/process.js.map +1 -0
  107. package/lib/services/regions.d.ts +41 -0
  108. package/lib/services/regions.d.ts.map +1 -0
  109. package/lib/services/regions.js +36 -0
  110. package/lib/services/regions.js.map +1 -0
  111. package/lib/services/runners.d.ts +358 -0
  112. package/lib/services/runners.d.ts.map +1 -0
  113. package/lib/services/runners.js +316 -0
  114. package/lib/services/runners.js.map +1 -0
  115. package/lib/services/sandbox.d.ts +1276 -0
  116. package/lib/services/sandbox.d.ts.map +1 -0
  117. package/lib/services/sandbox.js +1218 -0
  118. package/lib/services/sandbox.js.map +1 -0
  119. package/lib/services/secret.d.ts +120 -0
  120. package/lib/services/secret.d.ts.map +1 -0
  121. package/lib/services/secret.js +113 -0
  122. package/lib/services/secret.js.map +1 -0
  123. package/lib/services/server.d.ts +44 -0
  124. package/lib/services/server.d.ts.map +1 -0
  125. package/lib/services/server.js +46 -0
  126. package/lib/services/server.js.map +1 -0
  127. package/lib/services/snapshots.d.ts +208 -0
  128. package/lib/services/snapshots.d.ts.map +1 -0
  129. package/lib/services/snapshots.js +189 -0
  130. package/lib/services/snapshots.js.map +1 -0
  131. package/lib/services/system.d.ts +24 -0
  132. package/lib/services/system.d.ts.map +1 -0
  133. package/lib/services/system.js +31 -0
  134. package/lib/services/system.js.map +1 -0
  135. package/lib/services/telemetry.d.ts +141 -0
  136. package/lib/services/telemetry.d.ts.map +1 -0
  137. package/lib/services/telemetry.js +165 -0
  138. package/lib/services/telemetry.js.map +1 -0
  139. package/lib/services/usage.d.ts +111 -0
  140. package/lib/services/usage.d.ts.map +1 -0
  141. package/lib/services/usage.js +146 -0
  142. package/lib/services/usage.js.map +1 -0
  143. package/lib/services/users.d.ts +125 -0
  144. package/lib/services/users.d.ts.map +1 -0
  145. package/lib/services/users.js +172 -0
  146. package/lib/services/users.js.map +1 -0
  147. package/lib/services/volumes.d.ts +83 -0
  148. package/lib/services/volumes.d.ts.map +1 -0
  149. package/lib/services/volumes.js +96 -0
  150. package/lib/services/volumes.js.map +1 -0
  151. package/lib/services/warm_pools.d.ts +79 -0
  152. package/lib/services/warm_pools.d.ts.map +1 -0
  153. package/lib/services/warm_pools.js +90 -0
  154. package/lib/services/warm_pools.js.map +1 -0
  155. package/lib/services/webhooks.d.ts +67 -0
  156. package/lib/services/webhooks.d.ts.map +1 -0
  157. package/lib/services/webhooks.js +103 -0
  158. package/lib/services/webhooks.js.map +1 -0
  159. package/lib/traits.d.ts +10 -0
  160. package/lib/traits.d.ts.map +1 -0
  161. package/lib/traits.js +11 -0
  162. package/lib/traits.js.map +1 -0
  163. package/package.json +78 -7
  164. package/src/credentials.ts +135 -0
  165. package/src/endpoints.ts +28 -0
  166. package/src/errors.ts +85 -0
  167. package/src/index.ts +33 -0
  168. package/src/pagination.ts +9 -0
  169. package/src/protocol.ts +108 -0
  170. package/src/response-validation.test.ts +45 -0
  171. package/src/retry.ts +74 -0
  172. package/src/services/api_keys.ts +378 -0
  173. package/src/services/audit.ts +416 -0
  174. package/src/services/computer_use.ts +1496 -0
  175. package/src/services/config.ts +256 -0
  176. package/src/services/docker_registry.ts +325 -0
  177. package/src/services/file_system.ts +575 -0
  178. package/src/services/git.ts +928 -0
  179. package/src/services/health.ts +116 -0
  180. package/src/services/index.ts +31 -0
  181. package/src/services/info.ts +116 -0
  182. package/src/services/interpreter.ts +182 -0
  183. package/src/services/jobs.ts +249 -0
  184. package/src/services/lsp.ts +367 -0
  185. package/src/services/object_storage.ts +75 -0
  186. package/src/services/organizations.ts +2712 -0
  187. package/src/services/port.ts +87 -0
  188. package/src/services/preview.ts +256 -0
  189. package/src/services/process.ts +948 -0
  190. package/src/services/regions.ts +90 -0
  191. package/src/services/runners.ts +811 -0
  192. package/src/services/sandbox.ts +3158 -0
  193. package/src/services/secret.ts +289 -0
  194. package/src/services/server.ts +111 -0
  195. package/src/services/snapshots.ts +508 -0
  196. package/src/services/system.ts +64 -0
  197. package/src/services/telemetry.ts +385 -0
  198. package/src/services/usage.ts +316 -0
  199. package/src/services/users.ts +380 -0
  200. package/src/services/volumes.ts +233 -0
  201. package/src/services/warm_pools.ts +209 -0
  202. package/src/services/webhooks.ts +214 -0
  203. package/src/traits.ts +44 -0
@@ -0,0 +1,75 @@
1
+ /**
2
+ * DaytonaProtocol — the shared bearer-REST protocol instantiated for Daytona.
3
+ *
4
+ * Daytona speaks plain JSON with no success envelope. FAILURES carry a
5
+ * `{ message }` body (toolbox `ErrorResponse`) or an untyped NestJS
6
+ * `{ message, statusCode, error }` page (platform). The factory's default
7
+ * envelope already reads `message`.
8
+ *
9
+ * Daytona serves THREE endpoints, and the route picks between them:
10
+ *
11
+ * • `/organization/…` → analytics (`analyticsBaseUrl`)
12
+ * • toolbox roots (`/files`, `/process`, `/git`, `/computeruse`, …) →
13
+ * `toolboxBaseUrl` with `{sandboxId}` substituted
14
+ * • everything else → platform (`apiBaseUrl`)
15
+ *
16
+ * A toolbox call without a configured sandbox (when the toolbox URL still
17
+ * contains `{sandboxId}`) fails with `ConfigError`.
18
+ */
19
+ import * as Effect from "effect/Effect";
20
+ import * as Redacted from "effect/Redacted";
21
+ import { ConfigError } from "@distilled.cloud/core/errors";
22
+ import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
23
+ import { Credentials } from "./credentials.js";
24
+ import { UnknownDaytonaError, DaytonaParseError, } from "./errors.js";
25
+ import { ANALYTICS_PREFIX, TOOLBOX_ROOTS } from "./endpoints.js";
26
+ const TOOLBOX_ROOT_SET = new Set(TOOLBOX_ROOTS);
27
+ const firstSegment = (uri) => uri.split("/").filter(Boolean)[0] ?? "";
28
+ const isAnalytics = (uri) => uri === "/organization" || uri.startsWith(ANALYTICS_PREFIX);
29
+ const isToolbox = (uri) => TOOLBOX_ROOT_SET.has(firstSegment(uri));
30
+ const baseUrlFor = (creds, uri) => {
31
+ if (isAnalytics(uri))
32
+ return creds.analyticsBaseUrl;
33
+ if (!isToolbox(uri))
34
+ return creds.apiBaseUrl;
35
+ if (!creds.toolboxBaseUrl.includes("{sandboxId}")) {
36
+ return creds.toolboxBaseUrl;
37
+ }
38
+ if (creds.sandboxId === undefined || creds.sandboxId === "") {
39
+ throw new ConfigError({
40
+ message: `Daytona operation on ${uri} is toolbox-scoped (${creds.toolboxBaseUrl}) — ` +
41
+ `configure a sandbox (DAYTONA_SANDBOX_ID or credentials({ sandboxId })) to call it`,
42
+ });
43
+ }
44
+ return creds.toolboxBaseUrl.replaceAll("{sandboxId}", creds.sandboxId);
45
+ };
46
+ export const DaytonaProtocol = makeRestProtocol({
47
+ // Resolved on the CALLING fiber per request (the layer is memoized per
48
+ // process); the Credentials service holds an effect, so a key rotated
49
+ // between calls is picked up without rebuilding the layer.
50
+ credentials: Effect.gen(function* () {
51
+ const resolve = yield* Credentials;
52
+ return yield* resolve;
53
+ }),
54
+ baseUrl: (creds, target) => baseUrlFor(creds, target.uri),
55
+ headers: (creds) => {
56
+ const headers = {
57
+ Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
58
+ };
59
+ if (creds.organizationId !== undefined && creds.organizationId !== "") {
60
+ headers["X-Daytona-Organization-ID"] = creds.organizationId;
61
+ }
62
+ return headers;
63
+ },
64
+ unknownError: ({ code, message, body }) => new UnknownDaytonaError({
65
+ code: typeof code === "string"
66
+ ? code
67
+ : code !== undefined
68
+ ? String(code)
69
+ : undefined,
70
+ message,
71
+ body,
72
+ }),
73
+ parseError: ({ body, cause }) => new DaytonaParseError({ body, cause }),
74
+ });
75
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EAEnB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAgBjE,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;AAErE,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE,CAC3C,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAE1C,MAAM,WAAW,GAAG,CAAC,GAAW,EAAW,EAAE,CAC3C,GAAG,KAAK,eAAe,IAAI,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAE9D,MAAM,SAAS,GAAG,CAAC,GAAW,EAAW,EAAE,CACzC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1C,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,GAAW,EAAU,EAAE;IACxD,IAAI,WAAW,CAAC,GAAG,CAAC;QAAE,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GAAG,KAAK,CAAC,cAAc,CAAC;QAC9D,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CACxC,IAAI,mBAAmB,CAAC;QACtB,IAAI,EACF,OAAO,IAAI,KAAK,QAAQ;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,IAAI,KAAK,SAAS;gBAClB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;gBACd,CAAC,CAAC,SAAS;QACjB,OAAO;QACP,IAAI;KACL,CAAC;IACJ,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;CACxE,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { DaytonaParseError } from "./errors.ts";
2
+ import type { DaytonaOpError } from "./protocol.ts";
3
+ export declare const parseErrorIsDeclared: [DaytonaParseError] extends [DaytonaOpError] ? true : false;
4
+ //# sourceMappingURL=response-validation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-validation.test.d.ts","sourceRoot":"","sources":["../src/response-validation.test.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAmCpD,eAAO,MAAM,oBAAoB,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,cAAc,CAAC,GAC3E,IAAI,GACJ,KAAY,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { runValidationModes } from "@distilled.cloud/core/testing";
3
+ import * as Effect from "effect/Effect";
4
+ import { credentials } from "./credentials.js";
5
+ import { DaytonaParseError } from "./errors.js";
6
+ import * as Retry from "./retry.js";
7
+ import { getSnapshotBuildLogsUrl } from "./services/snapshots.js";
8
+ // getSnapshotBuildLogsUrl declares `{ url: string }`.
9
+ const run = (body) => runValidationModes(getSnapshotBuildLogsUrl({ id: "snap-1" }).pipe(Retry.none, Effect.provide(credentials({ apiKey: "test" }))), { body });
10
+ describe("Daytona response validation", () => {
11
+ test("a matching body succeeds unchanged in both modes", async () => {
12
+ const body = { url: "https://logs.example/snap-1" };
13
+ const { lenient, strict } = await run(JSON.stringify(body));
14
+ expect(lenient).toMatchObject({ _tag: "Success", success: body });
15
+ expect(strict).toMatchObject({ _tag: "Success", success: body });
16
+ });
17
+ test("a body missing required members: lenient returns it, strict fails", async () => {
18
+ const { lenient, strict } = await run("{}");
19
+ expect(lenient).toMatchObject({ _tag: "Success", success: {} });
20
+ expect(strict._tag).toBe("Failure");
21
+ expect(strict.failure).toBeInstanceOf(DaytonaParseError);
22
+ });
23
+ test("a non-JSON body: lenient returns the text, strict fails", async () => {
24
+ const { lenient, strict } = await run("not json");
25
+ expect(lenient).toMatchObject({ _tag: "Success", success: "not json" });
26
+ expect(strict.failure).toBeInstanceOf(DaytonaParseError);
27
+ });
28
+ });
29
+ // DaytonaParseError is part of every operation's declared error type.
30
+ export const parseErrorIsDeclared = true;
31
+ //# sourceMappingURL=response-validation.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-validation.test.js","sourceRoot":"","sources":["../src/response-validation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;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AC;IACpE,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;QACzE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC;QAClD,MAAM,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QACxE,MAAM,CAAE,MAAc,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAErB,IAAI,CAAC"}
package/lib/retry.d.ts ADDED
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Daytona retry surface — a veneer over `@distilled.cloud/core/retry`.
3
+ *
4
+ * The `Retry` service tag is threaded into every generated operation via
5
+ * `API.make({ retry: Retry })`, so a caller-installed policy applies to all
6
+ * Daytona calls below it and core's `makeDefault` is the fallback when none
7
+ * is provided.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import * as Daytona from "@distilled.cloud/daytona";
12
+ *
13
+ * myEffect.pipe(Daytona.Retry.transient);
14
+ * ```
15
+ */
16
+ import * as Context from "effect/Context";
17
+ import * as Effect from "effect/Effect";
18
+ import * as Retries from "@distilled.cloud/core/retry";
19
+ export type Options = Retries.Options;
20
+ export type Factory = Retries.Factory;
21
+ export type Policy = Retries.Policy;
22
+ declare const Retry_base: Context.ServiceClass<Retry, "DaytonaRetry", Retries.Policy>;
23
+ /** Context tag for configuring retry behavior of Daytona API calls. */
24
+ export declare class Retry extends Retry_base {
25
+ }
26
+ /** Provides a custom retry policy to every Daytona API call below it. */
27
+ export declare const policy: {
28
+ (options: Options): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
29
+ (factory: Factory): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
30
+ };
31
+ /** Disables all automatic retries. */
32
+ export declare const none: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
33
+ /**
34
+ * The default retry policy (core's): transient/throttling/retryable errors,
35
+ * capped exponential backoff with jitter, server `retryAfter` hints honored
36
+ * with precedence.
37
+ */
38
+ export declare const makeDefault: Factory;
39
+ export declare const jittered: <Error, Env>(self: import("effect/Schedule").Schedule<unknown, unknown, Error, Env>) => import("effect/Schedule").Schedule<unknown, unknown, Error, Env>;
40
+ export declare const capped: (max: import("effect/Duration").Duration) => <Error, Env>(self: import("effect/Schedule").Schedule<unknown, unknown, Error, Env>) => import("effect/Schedule").Schedule<unknown, unknown, Error, Env>;
41
+ /** Retry options that retry all throttling errors indefinitely. */
42
+ export declare const throttlingOptions: Options;
43
+ /** Retries all throttling errors indefinitely (honoring server hints). */
44
+ export declare const throttling: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
45
+ /** Retry options that retry all transient errors indefinitely. */
46
+ export declare const transientOptions: Options;
47
+ /** Retries all transient errors indefinitely. */
48
+ export declare const transient: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
49
+ export {};
50
+ //# sourceMappingURL=retry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,MAAM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C,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAqC,CAAC;AAEhF,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,EAAE,OAAkC,CAAC;AAElE,iDAAiD;AACjD,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAoC,CAAC"}
package/lib/retry.js ADDED
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Daytona retry surface — a veneer over `@distilled.cloud/core/retry`.
3
+ *
4
+ * The `Retry` service tag is threaded into every generated operation via
5
+ * `API.make({ retry: Retry })`, so a caller-installed policy applies to all
6
+ * Daytona calls below it and core's `makeDefault` is the fallback when none
7
+ * is provided.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import * as Daytona from "@distilled.cloud/daytona";
12
+ *
13
+ * myEffect.pipe(Daytona.Retry.transient);
14
+ * ```
15
+ */
16
+ import * as Context from "effect/Context";
17
+ import * as Effect from "effect/Effect";
18
+ import * as Layer from "effect/Layer";
19
+ import * as Retries from "@distilled.cloud/core/retry";
20
+ /** Context tag for configuring retry behavior of Daytona API calls. */
21
+ export class Retry extends Context.Service()("DaytonaRetry") {
22
+ }
23
+ /** Provides a custom retry policy to every Daytona API call below it. */
24
+ export const policy = (optionsOrFactory) => Effect.provide(Layer.succeed(Retry, optionsOrFactory));
25
+ /** Disables all automatic retries. */
26
+ export const none = Effect.provide(Layer.succeed(Retry, { while: () => false }));
27
+ /**
28
+ * The default retry policy (core's): transient/throttling/retryable errors,
29
+ * capped exponential backoff with jitter, server `retryAfter` hints honored
30
+ * with precedence.
31
+ */
32
+ export const makeDefault = Retries.makeDefault;
33
+ export const jittered = Retries.jittered;
34
+ export const capped = Retries.capped;
35
+ /** Retry options that retry all throttling errors indefinitely. */
36
+ export const throttlingOptions = Retries.throttlingOptions;
37
+ /** Retries all throttling errors indefinitely (honoring server hints). */
38
+ export const throttling = policy(Retries.throttlingFactory);
39
+ /** Retry options that retry all transient errors indefinitely. */
40
+ export const transientOptions = Retries.transientOptions;
41
+ /** Retries all transient errors indefinitely. */
42
+ export const transient = policy(Retries.transientFactory);
43
+ //# sourceMappingURL=retry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AAMvD,uEAAuE;AACvE,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,cAAc,CAAC;CAAG;AAE9E,yEAAyE;AACzE,MAAM,CAAC,MAAM,MAAM,GAWf,CAAC,gBAAmC,EAAE,EAAE,CAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAE6B,MAAM,CAAC,OAAO,CAC1D,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAY,OAAO,CAAC,WAAW,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AACzC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AAErC,mEAAmE;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAY,OAAO,CAAC,iBAAiB,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,UAAU,GAEuB,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhF,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAY,OAAO,CAAC,gBAAgB,CAAC;AAElE,iDAAiD;AACjD,MAAM,CAAC,MAAM,SAAS,GAEwB,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,120 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type DaytonaOpError, type DaytonaOpContext } from "../protocol.ts";
4
+ export type { DaytonaOpError, DaytonaOpContext };
5
+ export type CreateApiKeyRequestPermissionsItem = "write:registries" | "delete:registries" | "write:snapshots" | "delete:snapshots" | "write:sandboxes" | "delete:sandboxes" | "read:volumes" | "write:volumes" | "delete:volumes" | "write:regions" | "delete:regions" | "read:runners" | "write:runners" | "delete:runners" | "read:audit_logs" | "manage:api_keys" | "manage:secrets" | "read:limits" | "manage:sso" | "read:billing" | "manage:billing";
6
+ export declare const CreateApiKeyRequestPermissionsItem: any;
7
+ /** The list of organization resource permissions explicitly assigned to the API key */
8
+ export type CreateApiKeyRequestPermissionsList = Array<CreateApiKeyRequestPermissionsItem | (string & {})>;
9
+ export declare const CreateApiKeyRequestPermissionsList: S.Schema<CreateApiKeyRequestPermissionsList>;
10
+ export interface CreateApiKeyRequest {
11
+ /** Use with JWT to specify the organization ID */
12
+ xDaytonaOrganizationID?: string;
13
+ /** The name of the API key */
14
+ name: string;
15
+ /** The list of organization resource permissions explicitly assigned to the API key */
16
+ permissions: CreateApiKeyRequestPermissionsList;
17
+ /** When the API key expires */
18
+ expiresAt?: string | null;
19
+ }
20
+ export declare const CreateApiKeyRequest: S.Schema<CreateApiKeyRequest>;
21
+ export type ApiKeyResponsePermissionsItem = "write:registries" | "delete:registries" | "write:snapshots" | "delete:snapshots" | "write:sandboxes" | "delete:sandboxes" | "read:volumes" | "write:volumes" | "delete:volumes" | "write:regions" | "delete:regions" | "read:runners" | "write:runners" | "delete:runners" | "read:audit_logs" | "manage:api_keys" | "manage:secrets" | "read:limits" | "manage:sso" | "read:billing" | "manage:billing";
22
+ export declare const ApiKeyResponsePermissionsItem: any;
23
+ /** The list of organization resource permissions assigned to the API key */
24
+ export type ApiKeyResponsePermissionsList = Array<ApiKeyResponsePermissionsItem>;
25
+ export declare const ApiKeyResponsePermissionsList: S.Schema<ApiKeyResponsePermissionsList>;
26
+ export interface ApiKeyResponse {
27
+ /** The name of the API key */
28
+ name: string;
29
+ /** The API key value */
30
+ value: string;
31
+ /** When the API key was created */
32
+ createdAt: string;
33
+ /** The list of organization resource permissions assigned to the API key */
34
+ permissions: ApiKeyResponsePermissionsList;
35
+ /** When the API key expires */
36
+ expiresAt: string | null;
37
+ }
38
+ export declare const ApiKeyResponse: S.Schema<ApiKeyResponse>;
39
+ export interface DeleteApiKeyRequest {
40
+ name: string;
41
+ /** Use with JWT to specify the organization ID */
42
+ xDaytonaOrganizationID?: string;
43
+ }
44
+ export declare const DeleteApiKeyRequest: S.Schema<DeleteApiKeyRequest>;
45
+ export interface DeleteApiKeyResponse {
46
+ }
47
+ export declare const DeleteApiKeyResponse: S.Schema<DeleteApiKeyResponse>;
48
+ export interface DeleteApiKeyForUserRequest {
49
+ userId: string;
50
+ name: string;
51
+ /** Use with JWT to specify the organization ID */
52
+ xDaytonaOrganizationID?: string;
53
+ }
54
+ export declare const DeleteApiKeyForUserRequest: S.Schema<DeleteApiKeyForUserRequest>;
55
+ export interface DeleteApiKeyForUserResponse {
56
+ }
57
+ export declare const DeleteApiKeyForUserResponse: S.Schema<DeleteApiKeyForUserResponse>;
58
+ export interface GetApiKeyRequest {
59
+ name: string;
60
+ /** Use with JWT to specify the organization ID */
61
+ xDaytonaOrganizationID?: string;
62
+ }
63
+ export declare const GetApiKeyRequest: S.Schema<GetApiKeyRequest>;
64
+ export type ApiKeyListPermissionsItem = "write:registries" | "delete:registries" | "write:snapshots" | "delete:snapshots" | "write:sandboxes" | "delete:sandboxes" | "read:volumes" | "write:volumes" | "delete:volumes" | "write:regions" | "delete:regions" | "read:runners" | "write:runners" | "delete:runners" | "read:audit_logs" | "manage:api_keys" | "manage:secrets" | "read:limits" | "manage:sso" | "read:billing" | "manage:billing";
65
+ export declare const ApiKeyListPermissionsItem: any;
66
+ /** The list of organization resource permissions assigned to the API key */
67
+ export type ApiKeyListPermissionsList = Array<ApiKeyListPermissionsItem>;
68
+ export declare const ApiKeyListPermissionsList: S.Schema<ApiKeyListPermissionsList>;
69
+ export interface ApiKeyList {
70
+ /** The name of the API key */
71
+ name: string;
72
+ /** The masked API key value */
73
+ value: string;
74
+ /** When the API key was created */
75
+ createdAt: string;
76
+ /** The list of organization resource permissions assigned to the API key */
77
+ permissions: ApiKeyListPermissionsList;
78
+ /** When the API key was last used */
79
+ lastUsedAt: string | null;
80
+ /** When the API key expires */
81
+ expiresAt: string | null;
82
+ /** The user ID of the user who created the API key */
83
+ userId: string;
84
+ /** The organization ID associated with the API key */
85
+ organizationId?: string;
86
+ }
87
+ export declare const ApiKeyList: S.Schema<ApiKeyList>;
88
+ export interface GetCurrentApiKeyRequest {
89
+ /** Use with JWT to specify the organization ID */
90
+ xDaytonaOrganizationID?: string;
91
+ }
92
+ export declare const GetCurrentApiKeyRequest: S.Schema<GetCurrentApiKeyRequest>;
93
+ export interface ListApiKeysRequest {
94
+ /** Use with JWT to specify the organization ID */
95
+ xDaytonaOrganizationID?: string;
96
+ }
97
+ export declare const ListApiKeysRequest: S.Schema<ListApiKeysRequest>;
98
+ export type ListApiKeysResponseBodyList = Array<ApiKeyList>;
99
+ export declare const ListApiKeysResponseBodyList: S.Schema<ListApiKeysResponseBodyList>;
100
+ export type ListApiKeysResponse = ListApiKeysResponseBodyList;
101
+ export declare const ListApiKeysResponse: S.Schema<ListApiKeysResponse>;
102
+ export type CreateApiKeyError = DaytonaOpError;
103
+ /** Create API key */
104
+ export declare const createApiKey: API.OperationMethod<CreateApiKeyRequest, ApiKeyResponse, CreateApiKeyError, DaytonaOpContext>;
105
+ export type DeleteApiKeyError = DaytonaOpError;
106
+ /** Delete API key */
107
+ export declare const deleteApiKey: API.OperationMethod<DeleteApiKeyRequest, DeleteApiKeyResponse, DeleteApiKeyError, DaytonaOpContext>;
108
+ export type DeleteApiKeyForUserError = DaytonaOpError;
109
+ /** Delete API key for user */
110
+ export declare const deleteApiKeyForUser: API.OperationMethod<DeleteApiKeyForUserRequest, DeleteApiKeyForUserResponse, DeleteApiKeyForUserError, DaytonaOpContext>;
111
+ export type GetApiKeyError = DaytonaOpError;
112
+ /** Get API key */
113
+ export declare const getApiKey: API.OperationMethod<GetApiKeyRequest, ApiKeyList, GetApiKeyError, DaytonaOpContext>;
114
+ export type GetCurrentApiKeyError = DaytonaOpError;
115
+ /** Get current API key's details */
116
+ export declare const getCurrentApiKey: API.OperationMethod<GetCurrentApiKeyRequest, ApiKeyList, GetCurrentApiKeyError, DaytonaOpContext>;
117
+ export type ListApiKeysError = DaytonaOpError;
118
+ /** List API keys */
119
+ export declare const listApiKeys: API.OperationMethod<ListApiKeysRequest, ListApiKeysResponse, ListApiKeysError, DaytonaOpContext>;
120
+ //# sourceMappingURL=api_keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api_keys.d.ts","sourceRoot":"","sources":["../../src/services/api_keys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,cAAc,EAAE,gBAAgB,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,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAC9C,oBAAoB;AACpB,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,eAAe,CAC3C,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,CAOf,CAAC"}
@@ -0,0 +1,126 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-daytona/specs/{openapi,toolbox-openapi,analytics-openapi}.json). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { DaytonaProtocol, } from "../protocol.js";
6
+ import { UnknownDaytonaError } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export const CreateApiKeyRequestPermissionsItem = S.String;
9
+ export const CreateApiKeyRequestPermissionsList = /*@__PURE__*/ S.Array(CreateApiKeyRequestPermissionsItem);
10
+ export const CreateApiKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
11
+ xDaytonaOrganizationID: S.optional(S.String.pipe(T.Header("X-Daytona-Organization-ID"))),
12
+ name: S.String,
13
+ permissions: CreateApiKeyRequestPermissionsList,
14
+ expiresAt: S.optional(S.NullOr(S.String)),
15
+ }).pipe(T.Http({ method: "POST", uri: "/api-keys", code: 200 }))).annotate({
16
+ identifier: "CreateApiKeyRequest",
17
+ });
18
+ export const ApiKeyResponsePermissionsItem = S.String;
19
+ export const ApiKeyResponsePermissionsList = /*@__PURE__*/ S.Array(ApiKeyResponsePermissionsItem);
20
+ export const ApiKeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
21
+ name: S.String,
22
+ value: S.String,
23
+ createdAt: S.String,
24
+ permissions: ApiKeyResponsePermissionsList,
25
+ expiresAt: S.NullOr(S.String),
26
+ })).annotate({ identifier: "ApiKeyResponse" });
27
+ export const DeleteApiKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
28
+ name: S.String.pipe(T.Label()),
29
+ xDaytonaOrganizationID: S.optional(S.String.pipe(T.Header("X-Daytona-Organization-ID"))),
30
+ }).pipe(T.Http({ method: "DELETE", uri: "/api-keys/{name}", code: 200 }))).annotate({
31
+ identifier: "DeleteApiKeyRequest",
32
+ });
33
+ export const DeleteApiKeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
34
+ identifier: "DeleteApiKeyResponse",
35
+ });
36
+ export const DeleteApiKeyForUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
37
+ userId: S.String.pipe(T.Label()),
38
+ name: S.String.pipe(T.Label()),
39
+ xDaytonaOrganizationID: S.optional(S.String.pipe(T.Header("X-Daytona-Organization-ID"))),
40
+ }).pipe(T.Http({ method: "DELETE", uri: "/api-keys/{userId}/{name}", code: 200 }))).annotate({
41
+ identifier: "DeleteApiKeyForUserRequest",
42
+ });
43
+ export const DeleteApiKeyForUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
44
+ identifier: "DeleteApiKeyForUserResponse",
45
+ });
46
+ export const GetApiKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
47
+ name: S.String.pipe(T.Label()),
48
+ xDaytonaOrganizationID: S.optional(S.String.pipe(T.Header("X-Daytona-Organization-ID"))),
49
+ }).pipe(T.Http({ method: "GET", uri: "/api-keys/{name}", code: 200 }))).annotate({
50
+ identifier: "GetApiKeyRequest",
51
+ });
52
+ export const ApiKeyListPermissionsItem = S.String;
53
+ export const ApiKeyListPermissionsList = /*@__PURE__*/ S.Array(ApiKeyListPermissionsItem);
54
+ export const ApiKeyList = /*@__PURE__*/ S.suspend(() => S.Struct({
55
+ name: S.String,
56
+ value: S.String,
57
+ createdAt: S.String,
58
+ permissions: ApiKeyListPermissionsList,
59
+ lastUsedAt: S.NullOr(S.String),
60
+ expiresAt: S.NullOr(S.String),
61
+ userId: S.String,
62
+ organizationId: S.optional(S.String),
63
+ })).annotate({ identifier: "ApiKeyList" });
64
+ export const GetCurrentApiKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
65
+ xDaytonaOrganizationID: S.optional(S.String.pipe(T.Header("X-Daytona-Organization-ID"))),
66
+ }).pipe(T.Http({ method: "GET", uri: "/api-keys/current", code: 200 }))).annotate({
67
+ identifier: "GetCurrentApiKeyRequest",
68
+ });
69
+ export const ListApiKeysRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
70
+ xDaytonaOrganizationID: S.optional(S.String.pipe(T.Header("X-Daytona-Organization-ID"))),
71
+ }).pipe(T.Http({ method: "GET", uri: "/api-keys", code: 200 }))).annotate({
72
+ identifier: "ListApiKeysRequest",
73
+ });
74
+ export const ListApiKeysResponseBodyList = /*@__PURE__*/ S.Array(ApiKeyList);
75
+ export const ListApiKeysResponse = /*@__PURE__*/ S.suspend(() => ListApiKeysResponseBodyList.pipe(T.RawResponseRoot())).annotate({
76
+ identifier: "ListApiKeysResponse",
77
+ });
78
+ /** Create API key */
79
+ export const createApiKey = /*@__PURE__*/ API.make(() => ({
80
+ input: CreateApiKeyRequest,
81
+ output: ApiKeyResponse,
82
+ errors: [UnknownDaytonaError],
83
+ protocol: DaytonaProtocol,
84
+ retry: Retry.Retry,
85
+ }));
86
+ /** Delete API key */
87
+ export const deleteApiKey = /*@__PURE__*/ API.make(() => ({
88
+ input: DeleteApiKeyRequest,
89
+ output: DeleteApiKeyResponse,
90
+ errors: [UnknownDaytonaError],
91
+ protocol: DaytonaProtocol,
92
+ retry: Retry.Retry,
93
+ }));
94
+ /** Delete API key for user */
95
+ export const deleteApiKeyForUser = /*@__PURE__*/ API.make(() => ({
96
+ input: DeleteApiKeyForUserRequest,
97
+ output: DeleteApiKeyForUserResponse,
98
+ errors: [UnknownDaytonaError],
99
+ protocol: DaytonaProtocol,
100
+ retry: Retry.Retry,
101
+ }));
102
+ /** Get API key */
103
+ export const getApiKey = /*@__PURE__*/ API.make(() => ({
104
+ input: GetApiKeyRequest,
105
+ output: ApiKeyList,
106
+ errors: [UnknownDaytonaError],
107
+ protocol: DaytonaProtocol,
108
+ retry: Retry.Retry,
109
+ }));
110
+ /** Get current API key's details */
111
+ export const getCurrentApiKey = /*@__PURE__*/ API.make(() => ({
112
+ input: GetCurrentApiKeyRequest,
113
+ output: ApiKeyList,
114
+ errors: [UnknownDaytonaError],
115
+ protocol: DaytonaProtocol,
116
+ retry: Retry.Retry,
117
+ }));
118
+ /** List API keys */
119
+ export const listApiKeys = /*@__PURE__*/ API.make(() => ({
120
+ input: ListApiKeysRequest,
121
+ output: ListApiKeysResponse,
122
+ errors: [UnknownDaytonaError],
123
+ protocol: DaytonaProtocol,
124
+ retry: Retry.Retry,
125
+ }));
126
+ //# sourceMappingURL=api_keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api_keys.js","sourceRoot":"","sources":["../../src/services/api_keys.ts"],"names":[],"mappings":"AAAA,+JAA+J;AAC/J,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,eAAe,GAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AA0BrC,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;AAM3D,MAAM,CAAC,MAAM,kCAAkC,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CACrE,kCAAkC,CACoB,CAAC;AAYzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC9D,CAAC,CAAC,MAAM,CAAC;IACP,sBAAsB,EAAE,CAAC,CAAC,QAAQ,CAChC,CAAC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