@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.
- package/LICENSE +201 -0
- package/README.md +34 -0
- package/lib/credentials.d.ts +46 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +67 -0
- package/lib/credentials.js.map +1 -0
- package/lib/endpoints.d.ts +15 -0
- package/lib/endpoints.d.ts.map +1 -0
- package/lib/endpoints.js +28 -0
- package/lib/endpoints.js.map +1 -0
- package/lib/errors.d.ts +53 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +30 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +30 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +10 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +10 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +75 -0
- package/lib/protocol.js.map +1 -0
- package/lib/response-validation.test.d.ts +4 -0
- package/lib/response-validation.test.d.ts.map +1 -0
- package/lib/response-validation.test.js +31 -0
- package/lib/response-validation.test.js.map +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +43 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/api_keys.d.ts +120 -0
- package/lib/services/api_keys.d.ts.map +1 -0
- package/lib/services/api_keys.js +126 -0
- package/lib/services/api_keys.js.map +1 -0
- package/lib/services/audit.d.ts +159 -0
- package/lib/services/audit.d.ts.map +1 -0
- package/lib/services/audit.js +126 -0
- package/lib/services/audit.js.map +1 -0
- package/lib/services/computer_use.d.ts +484 -0
- package/lib/services/computer_use.d.ts.map +1 -0
- package/lib/services/computer_use.js +672 -0
- package/lib/services/computer_use.js.map +1 -0
- package/lib/services/config.d.ts +138 -0
- package/lib/services/config.d.ts.map +1 -0
- package/lib/services/config.js +88 -0
- package/lib/services/config.js.map +1 -0
- package/lib/services/docker_registry.d.ts +126 -0
- package/lib/services/docker_registry.d.ts.map +1 -0
- package/lib/services/docker_registry.js +135 -0
- package/lib/services/docker_registry.js.map +1 -0
- package/lib/services/file_system.d.ts +203 -0
- package/lib/services/file_system.d.ts.map +1 -0
- package/lib/services/file_system.js +255 -0
- package/lib/services/file_system.js.map +1 -0
- package/lib/services/git.d.ts +338 -0
- package/lib/services/git.d.ts.map +1 -0
- package/lib/services/git.js +417 -0
- package/lib/services/git.js.map +1 -0
- package/lib/services/health.d.ts +41 -0
- package/lib/services/health.d.ts.map +1 -0
- package/lib/services/health.js +49 -0
- package/lib/services/health.js.map +1 -0
- package/lib/services/index.d.ts +31 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +32 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/info.d.ts +37 -0
- package/lib/services/info.d.ts.map +1 -0
- package/lib/services/info.js +55 -0
- package/lib/services/info.js.map +1 -0
- package/lib/services/interpreter.d.ts +56 -0
- package/lib/services/interpreter.d.ts.map +1 -0
- package/lib/services/interpreter.js +83 -0
- package/lib/services/interpreter.js.map +1 -0
- package/lib/services/jobs.d.ts +104 -0
- package/lib/services/jobs.d.ts.map +1 -0
- package/lib/services/jobs.js +94 -0
- package/lib/services/jobs.js.map +1 -0
- package/lib/services/lsp.d.ts +137 -0
- package/lib/services/lsp.d.ts.map +1 -0
- package/lib/services/lsp.js +160 -0
- package/lib/services/lsp.js.map +1 -0
- package/lib/services/object_storage.d.ts +31 -0
- package/lib/services/object_storage.d.ts.map +1 -0
- package/lib/services/object_storage.js +33 -0
- package/lib/services/object_storage.js.map +1 -0
- package/lib/services/organizations.d.ts +963 -0
- package/lib/services/organizations.d.ts.map +1 -0
- package/lib/services/organizations.js +1143 -0
- package/lib/services/organizations.js.map +1 -0
- package/lib/services/port.d.ts +29 -0
- package/lib/services/port.d.ts.map +1 -0
- package/lib/services/port.js +41 -0
- package/lib/services/port.js.map +1 -0
- package/lib/services/preview.d.ts +73 -0
- package/lib/services/preview.d.ts.map +1 -0
- package/lib/services/preview.js +125 -0
- package/lib/services/preview.js.map +1 -0
- package/lib/services/process.d.ts +329 -0
- package/lib/services/process.d.ts.map +1 -0
- package/lib/services/process.js +421 -0
- package/lib/services/process.js.map +1 -0
- package/lib/services/regions.d.ts +41 -0
- package/lib/services/regions.d.ts.map +1 -0
- package/lib/services/regions.js +36 -0
- package/lib/services/regions.js.map +1 -0
- package/lib/services/runners.d.ts +358 -0
- package/lib/services/runners.d.ts.map +1 -0
- package/lib/services/runners.js +316 -0
- package/lib/services/runners.js.map +1 -0
- package/lib/services/sandbox.d.ts +1276 -0
- package/lib/services/sandbox.d.ts.map +1 -0
- package/lib/services/sandbox.js +1218 -0
- package/lib/services/sandbox.js.map +1 -0
- package/lib/services/secret.d.ts +120 -0
- package/lib/services/secret.d.ts.map +1 -0
- package/lib/services/secret.js +113 -0
- package/lib/services/secret.js.map +1 -0
- package/lib/services/server.d.ts +44 -0
- package/lib/services/server.d.ts.map +1 -0
- package/lib/services/server.js +46 -0
- package/lib/services/server.js.map +1 -0
- package/lib/services/snapshots.d.ts +208 -0
- package/lib/services/snapshots.d.ts.map +1 -0
- package/lib/services/snapshots.js +189 -0
- package/lib/services/snapshots.js.map +1 -0
- package/lib/services/system.d.ts +24 -0
- package/lib/services/system.d.ts.map +1 -0
- package/lib/services/system.js +31 -0
- package/lib/services/system.js.map +1 -0
- package/lib/services/telemetry.d.ts +141 -0
- package/lib/services/telemetry.d.ts.map +1 -0
- package/lib/services/telemetry.js +165 -0
- package/lib/services/telemetry.js.map +1 -0
- package/lib/services/usage.d.ts +111 -0
- package/lib/services/usage.d.ts.map +1 -0
- package/lib/services/usage.js +146 -0
- package/lib/services/usage.js.map +1 -0
- package/lib/services/users.d.ts +125 -0
- package/lib/services/users.d.ts.map +1 -0
- package/lib/services/users.js +172 -0
- package/lib/services/users.js.map +1 -0
- package/lib/services/volumes.d.ts +83 -0
- package/lib/services/volumes.d.ts.map +1 -0
- package/lib/services/volumes.js +96 -0
- package/lib/services/volumes.js.map +1 -0
- package/lib/services/warm_pools.d.ts +79 -0
- package/lib/services/warm_pools.d.ts.map +1 -0
- package/lib/services/warm_pools.js +90 -0
- package/lib/services/warm_pools.js.map +1 -0
- package/lib/services/webhooks.d.ts +67 -0
- package/lib/services/webhooks.d.ts.map +1 -0
- package/lib/services/webhooks.js +103 -0
- package/lib/services/webhooks.js.map +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +11 -0
- package/lib/traits.js.map +1 -0
- package/package.json +78 -7
- package/src/credentials.ts +135 -0
- package/src/endpoints.ts +28 -0
- package/src/errors.ts +85 -0
- package/src/index.ts +33 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +108 -0
- package/src/response-validation.test.ts +45 -0
- package/src/retry.ts +74 -0
- package/src/services/api_keys.ts +378 -0
- package/src/services/audit.ts +416 -0
- package/src/services/computer_use.ts +1496 -0
- package/src/services/config.ts +256 -0
- package/src/services/docker_registry.ts +325 -0
- package/src/services/file_system.ts +575 -0
- package/src/services/git.ts +928 -0
- package/src/services/health.ts +116 -0
- package/src/services/index.ts +31 -0
- package/src/services/info.ts +116 -0
- package/src/services/interpreter.ts +182 -0
- package/src/services/jobs.ts +249 -0
- package/src/services/lsp.ts +367 -0
- package/src/services/object_storage.ts +75 -0
- package/src/services/organizations.ts +2712 -0
- package/src/services/port.ts +87 -0
- package/src/services/preview.ts +256 -0
- package/src/services/process.ts +948 -0
- package/src/services/regions.ts +90 -0
- package/src/services/runners.ts +811 -0
- package/src/services/sandbox.ts +3158 -0
- package/src/services/secret.ts +289 -0
- package/src/services/server.ts +111 -0
- package/src/services/snapshots.ts +508 -0
- package/src/services/system.ts +64 -0
- package/src/services/telemetry.ts +385 -0
- package/src/services/usage.ts +316 -0
- package/src/services/users.ts +380 -0
- package/src/services/volumes.ts +233 -0
- package/src/services/warm_pools.ts +209 -0
- package/src/services/webhooks.ts +214 -0
- package/src/traits.ts +44 -0
|
@@ -0,0 +1,256 @@
|
|
|
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 Redacted from "effect/Redacted";
|
|
4
|
+
import * as API from "@distilled.cloud/core/api";
|
|
5
|
+
import * as T from "../traits.ts";
|
|
6
|
+
import {
|
|
7
|
+
DaytonaProtocol,
|
|
8
|
+
type DaytonaOpError,
|
|
9
|
+
type DaytonaOpContext,
|
|
10
|
+
} from "../protocol.ts";
|
|
11
|
+
import { UnknownDaytonaError } from "../errors.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
|
|
14
|
+
export type { DaytonaOpError, DaytonaOpContext };
|
|
15
|
+
|
|
16
|
+
export interface GetConfigControllerConfigRequest {}
|
|
17
|
+
export const GetConfigControllerConfigRequest = /*@__PURE__*/ S.suspend(() =>
|
|
18
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/config", code: 200 })),
|
|
19
|
+
).annotate({
|
|
20
|
+
identifier: "GetConfigControllerConfigRequest",
|
|
21
|
+
}) as any as S.Schema<GetConfigControllerConfigRequest>;
|
|
22
|
+
|
|
23
|
+
export interface PosthogConfig {
|
|
24
|
+
/** PostHog API key */
|
|
25
|
+
apiKey: string | Redacted.Redacted<string>;
|
|
26
|
+
/** PostHog host URL */
|
|
27
|
+
host: string;
|
|
28
|
+
}
|
|
29
|
+
export const PosthogConfig = /*@__PURE__*/ S.suspend(() =>
|
|
30
|
+
S.Struct({
|
|
31
|
+
apiKey: S.String.pipe(T.SensitiveValue({})),
|
|
32
|
+
host: S.String,
|
|
33
|
+
}),
|
|
34
|
+
).annotate({ identifier: "PosthogConfig" }) as any as S.Schema<PosthogConfig>;
|
|
35
|
+
|
|
36
|
+
/** Which identity provider the advertised issuer above belongs to. The dashboard needs this because provider-specific logout URLs are not discoverable from the issuer alone: ending an Auth0 session uses its proprietary /v2/logout, which does not exist on WorkOS AuthKit. Anything that branches on provider behaviour must read this rather than pattern-matching the issuer hostname. */
|
|
37
|
+
export type OidcConfigProvider = "auth0" | "workos";
|
|
38
|
+
export const OidcConfigProvider = S.String;
|
|
39
|
+
|
|
40
|
+
export interface OidcConfig {
|
|
41
|
+
/** OIDC issuer */
|
|
42
|
+
issuer: string;
|
|
43
|
+
/** OIDC client ID */
|
|
44
|
+
clientId: string;
|
|
45
|
+
/** OIDC audience */
|
|
46
|
+
audience: string;
|
|
47
|
+
/** Which identity provider the advertised issuer above belongs to. The dashboard needs this because provider-specific logout URLs are not discoverable from the issuer alone: ending an Auth0 session uses its proprietary /v2/logout, which does not exist on WorkOS AuthKit. Anything that branches on provider behaviour must read this rather than pattern-matching the issuer hostname. */
|
|
48
|
+
provider: OidcConfigProvider;
|
|
49
|
+
/** WorkOS "Authentication API" custom domain the dashboard's client-side SDK should call instead of api.workos.com, so the refresh-token cookie is first-party. Present only when the provider is workos and a custom domain is configured (WorkOS production environments only); absent means the SDK runs in devMode and keeps the refresh token in localStorage. */
|
|
50
|
+
authApiHostname?: string;
|
|
51
|
+
}
|
|
52
|
+
export const OidcConfig = /*@__PURE__*/ S.suspend(() =>
|
|
53
|
+
S.Struct({
|
|
54
|
+
issuer: S.String,
|
|
55
|
+
clientId: S.String,
|
|
56
|
+
audience: S.String,
|
|
57
|
+
provider: OidcConfigProvider,
|
|
58
|
+
authApiHostname: S.optional(S.String),
|
|
59
|
+
}),
|
|
60
|
+
).annotate({ identifier: "OidcConfig" }) as any as S.Schema<OidcConfig>;
|
|
61
|
+
|
|
62
|
+
export interface SsoOidcConfig {
|
|
63
|
+
/** OIDC issuer for org-SSO logins (Daytona Auth) */
|
|
64
|
+
issuer: string;
|
|
65
|
+
/** OIDC client ID for org-SSO logins */
|
|
66
|
+
clientId: string;
|
|
67
|
+
}
|
|
68
|
+
export const SsoOidcConfig = /*@__PURE__*/ S.suspend(() =>
|
|
69
|
+
S.Struct({
|
|
70
|
+
issuer: S.String,
|
|
71
|
+
clientId: S.String,
|
|
72
|
+
}),
|
|
73
|
+
).annotate({ identifier: "SsoOidcConfig" }) as any as S.Schema<SsoOidcConfig>;
|
|
74
|
+
|
|
75
|
+
/** Feature flags forced on for this deployment regardless of PostHog targeting. Lets environments without PostHog (previews, local dev) enable flag-gated dashboard features. */
|
|
76
|
+
export type DaytonaConfigurationForcedFeatureFlagsList = Array<string>;
|
|
77
|
+
export const DaytonaConfigurationForcedFeatureFlagsList = /*@__PURE__*/ S.Array(
|
|
78
|
+
S.String,
|
|
79
|
+
) as any as S.Schema<DaytonaConfigurationForcedFeatureFlagsList>;
|
|
80
|
+
|
|
81
|
+
export interface Announcement {
|
|
82
|
+
/** The announcement text */
|
|
83
|
+
text: string;
|
|
84
|
+
/** URL to learn more about the announcement */
|
|
85
|
+
learnMoreUrl?: string;
|
|
86
|
+
}
|
|
87
|
+
export const Announcement = /*@__PURE__*/ S.suspend(() =>
|
|
88
|
+
S.Struct({
|
|
89
|
+
text: S.String,
|
|
90
|
+
learnMoreUrl: S.optional(S.String),
|
|
91
|
+
}),
|
|
92
|
+
).annotate({ identifier: "Announcement" }) as any as S.Schema<Announcement>;
|
|
93
|
+
|
|
94
|
+
/** System announcements */
|
|
95
|
+
export type DaytonaConfigurationAnnouncementsMap = {
|
|
96
|
+
[key: string]: Announcement | undefined;
|
|
97
|
+
};
|
|
98
|
+
export const DaytonaConfigurationAnnouncementsMap = /*@__PURE__*/ S.Record(
|
|
99
|
+
S.String,
|
|
100
|
+
Announcement,
|
|
101
|
+
) as any as S.Schema<DaytonaConfigurationAnnouncementsMap>;
|
|
102
|
+
|
|
103
|
+
/** SSH host public keys presented by the SSH Gateway, as OpenSSH public key lines (`<type> <base64>`). To build a known_hosts entry, prefix each with `sshGatewayHost` when `sshGatewayPort` is 22, or with `[sshGatewayHost]:sshGatewayPort` otherwise. */
|
|
104
|
+
export type DaytonaConfigurationSshGatewayHostKeysList = Array<string>;
|
|
105
|
+
export const DaytonaConfigurationSshGatewayHostKeysList = /*@__PURE__*/ S.Array(
|
|
106
|
+
S.String,
|
|
107
|
+
) as any as S.Schema<DaytonaConfigurationSshGatewayHostKeysList>;
|
|
108
|
+
|
|
109
|
+
/** SHA256 fingerprints of sshGatewayHostKeys, in the same order, in `ssh-keygen -lf` format. Compare against the fingerprint published at https://github.com/daytona/.github/blob/main/SECURITY.md#ssh-host-key-verification */
|
|
110
|
+
export type DaytonaConfigurationSshGatewayHostKeyFingerprintsList =
|
|
111
|
+
Array<string>;
|
|
112
|
+
export const DaytonaConfigurationSshGatewayHostKeyFingerprintsList =
|
|
113
|
+
/*@__PURE__*/ S.Array(
|
|
114
|
+
S.String,
|
|
115
|
+
) as any as S.Schema<DaytonaConfigurationSshGatewayHostKeyFingerprintsList>;
|
|
116
|
+
|
|
117
|
+
export interface RateLimitEntry {
|
|
118
|
+
/** Rate limit TTL in seconds */
|
|
119
|
+
ttl?: number;
|
|
120
|
+
/** Rate limit max requests */
|
|
121
|
+
limit?: number;
|
|
122
|
+
}
|
|
123
|
+
export const RateLimitEntry = /*@__PURE__*/ S.suspend(() =>
|
|
124
|
+
S.Struct({
|
|
125
|
+
ttl: S.optional(S.Number),
|
|
126
|
+
limit: S.optional(S.Number),
|
|
127
|
+
}),
|
|
128
|
+
).annotate({ identifier: "RateLimitEntry" }) as any as S.Schema<RateLimitEntry>;
|
|
129
|
+
|
|
130
|
+
export interface RateLimitConfig {
|
|
131
|
+
/** Failed authentication rate limit */
|
|
132
|
+
failedAuth?: RateLimitEntry;
|
|
133
|
+
/** Authenticated rate limit */
|
|
134
|
+
authenticated?: RateLimitEntry;
|
|
135
|
+
/** Sandbox create rate limit */
|
|
136
|
+
sandboxCreate?: RateLimitEntry;
|
|
137
|
+
/** Sandbox lifecycle rate limit */
|
|
138
|
+
sandboxLifecycle?: RateLimitEntry;
|
|
139
|
+
/** Sandbox list rate limit */
|
|
140
|
+
sandboxList?: RateLimitEntry;
|
|
141
|
+
}
|
|
142
|
+
export const RateLimitConfig = /*@__PURE__*/ S.suspend(() =>
|
|
143
|
+
S.Struct({
|
|
144
|
+
failedAuth: S.optional(RateLimitEntry),
|
|
145
|
+
authenticated: S.optional(RateLimitEntry),
|
|
146
|
+
sandboxCreate: S.optional(RateLimitEntry),
|
|
147
|
+
sandboxLifecycle: S.optional(RateLimitEntry),
|
|
148
|
+
sandboxList: S.optional(RateLimitEntry),
|
|
149
|
+
}),
|
|
150
|
+
).annotate({
|
|
151
|
+
identifier: "RateLimitConfig",
|
|
152
|
+
}) as any as S.Schema<RateLimitConfig>;
|
|
153
|
+
|
|
154
|
+
export interface DaytonaConfiguration {
|
|
155
|
+
/** Daytona version */
|
|
156
|
+
version: string;
|
|
157
|
+
/** Commit sha of the source the app was built from */
|
|
158
|
+
buildSha?: string;
|
|
159
|
+
/** PostHog configuration */
|
|
160
|
+
posthog?: PosthogConfig;
|
|
161
|
+
/** OIDC configuration */
|
|
162
|
+
oidc: OidcConfig;
|
|
163
|
+
/** OIDC configuration for org-SSO logins (Daytona Auth issuer). Present only when the secondary (org-SSO) issuer is configured; the dashboard uses it as its authority when entered via an organization SSO link. */
|
|
164
|
+
ssoOidc?: SsoOidcConfig;
|
|
165
|
+
/** Feature flags forced on for this deployment regardless of PostHog targeting. Lets environments without PostHog (previews, local dev) enable flag-gated dashboard features. */
|
|
166
|
+
forcedFeatureFlags?: DaytonaConfigurationForcedFeatureFlagsList;
|
|
167
|
+
/** Whether linked accounts are enabled */
|
|
168
|
+
linkedAccountsEnabled: boolean;
|
|
169
|
+
/** System announcements */
|
|
170
|
+
announcements: DaytonaConfigurationAnnouncementsMap;
|
|
171
|
+
/** Pylon application ID */
|
|
172
|
+
pylonAppId?: string;
|
|
173
|
+
/** Proxy template URL */
|
|
174
|
+
proxyTemplateUrl: string;
|
|
175
|
+
/** Toolbox template URL */
|
|
176
|
+
proxyToolboxUrl: string;
|
|
177
|
+
/** Default snapshot for sandboxes */
|
|
178
|
+
defaultSnapshot: string;
|
|
179
|
+
/** Dashboard URL */
|
|
180
|
+
dashboardUrl: string;
|
|
181
|
+
/** Maximum auto-archive interval in minutes */
|
|
182
|
+
maxAutoArchiveInterval: number;
|
|
183
|
+
/** Whether maintenance mode is enabled */
|
|
184
|
+
maintananceMode: boolean;
|
|
185
|
+
/** Current environment */
|
|
186
|
+
environment: string;
|
|
187
|
+
/** Billing API URL */
|
|
188
|
+
billingApiUrl?: string;
|
|
189
|
+
/** Analytics API URL */
|
|
190
|
+
analyticsApiUrl?: string;
|
|
191
|
+
/** Stripe publishable key for client-side Stripe.js */
|
|
192
|
+
stripePublishableKey?: string;
|
|
193
|
+
/** SSH Gateway command */
|
|
194
|
+
sshGatewayCommand?: string;
|
|
195
|
+
/** Base64 encoded SSH Gateway public key */
|
|
196
|
+
sshGatewayPublicKey?: string;
|
|
197
|
+
/** Hostname of the SSH Gateway that sandbox SSH connections terminate at */
|
|
198
|
+
sshGatewayHost?: string;
|
|
199
|
+
/** TCP port of the SSH Gateway */
|
|
200
|
+
sshGatewayPort?: number;
|
|
201
|
+
/** SSH host public keys presented by the SSH Gateway, as OpenSSH public key lines (`<type> <base64>`). To build a known_hosts entry, prefix each with `sshGatewayHost` when `sshGatewayPort` is 22, or with `[sshGatewayHost]:sshGatewayPort` otherwise. */
|
|
202
|
+
sshGatewayHostKeys?: DaytonaConfigurationSshGatewayHostKeysList;
|
|
203
|
+
/** SHA256 fingerprints of sshGatewayHostKeys, in the same order, in `ssh-keygen -lf` format. Compare against the fingerprint published at https://github.com/daytona/.github/blob/main/SECURITY.md#ssh-host-key-verification */
|
|
204
|
+
sshGatewayHostKeyFingerprints?: DaytonaConfigurationSshGatewayHostKeyFingerprintsList;
|
|
205
|
+
/** Rate limit configuration */
|
|
206
|
+
rateLimit?: RateLimitConfig;
|
|
207
|
+
}
|
|
208
|
+
export const DaytonaConfiguration = /*@__PURE__*/ S.suspend(() =>
|
|
209
|
+
S.Struct({
|
|
210
|
+
version: S.String,
|
|
211
|
+
buildSha: S.optional(S.String),
|
|
212
|
+
posthog: S.optional(PosthogConfig),
|
|
213
|
+
oidc: OidcConfig,
|
|
214
|
+
ssoOidc: S.optional(SsoOidcConfig),
|
|
215
|
+
forcedFeatureFlags: S.optional(DaytonaConfigurationForcedFeatureFlagsList),
|
|
216
|
+
linkedAccountsEnabled: S.Boolean,
|
|
217
|
+
announcements: DaytonaConfigurationAnnouncementsMap,
|
|
218
|
+
pylonAppId: S.optional(S.String),
|
|
219
|
+
proxyTemplateUrl: S.String,
|
|
220
|
+
proxyToolboxUrl: S.String,
|
|
221
|
+
defaultSnapshot: S.String,
|
|
222
|
+
dashboardUrl: S.String,
|
|
223
|
+
maxAutoArchiveInterval: S.Number,
|
|
224
|
+
maintananceMode: S.Boolean,
|
|
225
|
+
environment: S.String,
|
|
226
|
+
billingApiUrl: S.optional(S.String),
|
|
227
|
+
analyticsApiUrl: S.optional(S.String),
|
|
228
|
+
stripePublishableKey: S.optional(S.String),
|
|
229
|
+
sshGatewayCommand: S.optional(S.String),
|
|
230
|
+
sshGatewayPublicKey: S.optional(S.String),
|
|
231
|
+
sshGatewayHost: S.optional(S.String),
|
|
232
|
+
sshGatewayPort: S.optional(S.Number),
|
|
233
|
+
sshGatewayHostKeys: S.optional(DaytonaConfigurationSshGatewayHostKeysList),
|
|
234
|
+
sshGatewayHostKeyFingerprints: S.optional(
|
|
235
|
+
DaytonaConfigurationSshGatewayHostKeyFingerprintsList,
|
|
236
|
+
),
|
|
237
|
+
rateLimit: S.optional(RateLimitConfig),
|
|
238
|
+
}),
|
|
239
|
+
).annotate({
|
|
240
|
+
identifier: "DaytonaConfiguration",
|
|
241
|
+
}) as any as S.Schema<DaytonaConfiguration>;
|
|
242
|
+
|
|
243
|
+
export type GetConfigControllerConfigError = DaytonaOpError;
|
|
244
|
+
/** Get config */
|
|
245
|
+
export const getConfigControllerConfig: API.OperationMethod<
|
|
246
|
+
GetConfigControllerConfigRequest,
|
|
247
|
+
DaytonaConfiguration,
|
|
248
|
+
GetConfigControllerConfigError,
|
|
249
|
+
DaytonaOpContext
|
|
250
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
251
|
+
input: GetConfigControllerConfigRequest,
|
|
252
|
+
output: DaytonaConfiguration,
|
|
253
|
+
errors: [UnknownDaytonaError],
|
|
254
|
+
protocol: DaytonaProtocol,
|
|
255
|
+
retry: Retry.Retry,
|
|
256
|
+
}));
|
|
@@ -0,0 +1,325 @@
|
|
|
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 Redacted from "effect/Redacted";
|
|
4
|
+
import * as API from "@distilled.cloud/core/api";
|
|
5
|
+
import * as T from "../traits.ts";
|
|
6
|
+
import {
|
|
7
|
+
DaytonaProtocol,
|
|
8
|
+
type DaytonaOpError,
|
|
9
|
+
type DaytonaOpContext,
|
|
10
|
+
} from "../protocol.ts";
|
|
11
|
+
import { UnknownDaytonaError } from "../errors.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
|
|
14
|
+
export type { DaytonaOpError, DaytonaOpContext };
|
|
15
|
+
|
|
16
|
+
export interface CreateRegistryRequest {
|
|
17
|
+
/** Use with JWT to specify the organization ID */
|
|
18
|
+
xDaytonaOrganizationID?: string;
|
|
19
|
+
/** Registry name */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Registry URL */
|
|
22
|
+
url: string;
|
|
23
|
+
/** Registry username */
|
|
24
|
+
username: string;
|
|
25
|
+
/** Registry password */
|
|
26
|
+
password: string | Redacted.Redacted<string>;
|
|
27
|
+
/** Registry project */
|
|
28
|
+
project?: string;
|
|
29
|
+
}
|
|
30
|
+
export const CreateRegistryRequest = /*@__PURE__*/ S.suspend(() =>
|
|
31
|
+
S.Struct({
|
|
32
|
+
xDaytonaOrganizationID: S.optional(
|
|
33
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
34
|
+
),
|
|
35
|
+
name: S.String,
|
|
36
|
+
url: S.String,
|
|
37
|
+
username: S.String,
|
|
38
|
+
password: S.String.pipe(T.SensitiveValue({})),
|
|
39
|
+
project: S.optional(S.String),
|
|
40
|
+
}).pipe(T.Http({ method: "POST", uri: "/docker-registry", code: 200 })),
|
|
41
|
+
).annotate({
|
|
42
|
+
identifier: "CreateRegistryRequest",
|
|
43
|
+
}) as any as S.Schema<CreateRegistryRequest>;
|
|
44
|
+
|
|
45
|
+
/** Registry type */
|
|
46
|
+
export type DockerRegistryRegistryType =
|
|
47
|
+
| "internal"
|
|
48
|
+
| "organization"
|
|
49
|
+
| "transient"
|
|
50
|
+
| "backup";
|
|
51
|
+
export const DockerRegistryRegistryType = S.String;
|
|
52
|
+
|
|
53
|
+
export interface DockerRegistry2 {
|
|
54
|
+
/** Registry ID */
|
|
55
|
+
id: string;
|
|
56
|
+
/** Registry name */
|
|
57
|
+
name: string;
|
|
58
|
+
/** Registry URL */
|
|
59
|
+
url: string;
|
|
60
|
+
/** Registry username */
|
|
61
|
+
username: string;
|
|
62
|
+
/** Registry project */
|
|
63
|
+
project: string;
|
|
64
|
+
/** Registry type */
|
|
65
|
+
registryType: DockerRegistryRegistryType;
|
|
66
|
+
/** Creation timestamp */
|
|
67
|
+
createdAt: string;
|
|
68
|
+
/** Last update timestamp */
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
}
|
|
71
|
+
export const DockerRegistry2 = /*@__PURE__*/ S.suspend(() =>
|
|
72
|
+
S.Struct({
|
|
73
|
+
id: S.String,
|
|
74
|
+
name: S.String,
|
|
75
|
+
url: S.String,
|
|
76
|
+
username: S.String,
|
|
77
|
+
project: S.String,
|
|
78
|
+
registryType: DockerRegistryRegistryType,
|
|
79
|
+
createdAt: S.String,
|
|
80
|
+
updatedAt: S.String,
|
|
81
|
+
}),
|
|
82
|
+
).annotate({
|
|
83
|
+
identifier: "DockerRegistry2",
|
|
84
|
+
}) as any as S.Schema<DockerRegistry2>;
|
|
85
|
+
|
|
86
|
+
export interface DeleteRegistryRequest {
|
|
87
|
+
/** ID of the docker registry */
|
|
88
|
+
id: string;
|
|
89
|
+
/** Use with JWT to specify the organization ID */
|
|
90
|
+
xDaytonaOrganizationID?: string;
|
|
91
|
+
}
|
|
92
|
+
export const DeleteRegistryRequest = /*@__PURE__*/ S.suspend(() =>
|
|
93
|
+
S.Struct({
|
|
94
|
+
id: S.String.pipe(T.Label()),
|
|
95
|
+
xDaytonaOrganizationID: S.optional(
|
|
96
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
97
|
+
),
|
|
98
|
+
}).pipe(
|
|
99
|
+
T.Http({ method: "DELETE", uri: "/docker-registry/{id}", code: 200 }),
|
|
100
|
+
),
|
|
101
|
+
).annotate({
|
|
102
|
+
identifier: "DeleteRegistryRequest",
|
|
103
|
+
}) as any as S.Schema<DeleteRegistryRequest>;
|
|
104
|
+
|
|
105
|
+
export interface DeleteRegistryResponse {}
|
|
106
|
+
export const DeleteRegistryResponse = /*@__PURE__*/ S.suspend(() =>
|
|
107
|
+
S.Struct({}),
|
|
108
|
+
).annotate({
|
|
109
|
+
identifier: "DeleteRegistryResponse",
|
|
110
|
+
}) as any as S.Schema<DeleteRegistryResponse>;
|
|
111
|
+
|
|
112
|
+
export interface GetRegistryRequest {
|
|
113
|
+
/** ID of the docker registry */
|
|
114
|
+
id: string;
|
|
115
|
+
/** Use with JWT to specify the organization ID */
|
|
116
|
+
xDaytonaOrganizationID?: string;
|
|
117
|
+
}
|
|
118
|
+
export const GetRegistryRequest = /*@__PURE__*/ S.suspend(() =>
|
|
119
|
+
S.Struct({
|
|
120
|
+
id: S.String.pipe(T.Label()),
|
|
121
|
+
xDaytonaOrganizationID: S.optional(
|
|
122
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
123
|
+
),
|
|
124
|
+
}).pipe(T.Http({ method: "GET", uri: "/docker-registry/{id}", code: 200 })),
|
|
125
|
+
).annotate({
|
|
126
|
+
identifier: "GetRegistryRequest",
|
|
127
|
+
}) as any as S.Schema<GetRegistryRequest>;
|
|
128
|
+
|
|
129
|
+
export interface GetTransientPushAccessRequest {
|
|
130
|
+
/** ID of the region where the snapshot will be available (defaults to organization default region) */
|
|
131
|
+
regionId?: string;
|
|
132
|
+
/** Use with JWT to specify the organization ID */
|
|
133
|
+
xDaytonaOrganizationID?: string;
|
|
134
|
+
}
|
|
135
|
+
export const GetTransientPushAccessRequest = /*@__PURE__*/ S.suspend(() =>
|
|
136
|
+
S.Struct({
|
|
137
|
+
regionId: S.optional(S.String.pipe(T.Query())),
|
|
138
|
+
xDaytonaOrganizationID: S.optional(
|
|
139
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
140
|
+
),
|
|
141
|
+
}).pipe(
|
|
142
|
+
T.Http({
|
|
143
|
+
method: "GET",
|
|
144
|
+
uri: "/docker-registry/registry-push-access",
|
|
145
|
+
code: 200,
|
|
146
|
+
}),
|
|
147
|
+
),
|
|
148
|
+
).annotate({
|
|
149
|
+
identifier: "GetTransientPushAccessRequest",
|
|
150
|
+
}) as any as S.Schema<GetTransientPushAccessRequest>;
|
|
151
|
+
|
|
152
|
+
export interface RegistryPushAccessDto {
|
|
153
|
+
/** Temporary username for registry authentication */
|
|
154
|
+
username: string;
|
|
155
|
+
/** Temporary secret for registry authentication */
|
|
156
|
+
secret: string | Redacted.Redacted<string>;
|
|
157
|
+
/** Registry URL */
|
|
158
|
+
registryUrl: string;
|
|
159
|
+
/** Registry ID */
|
|
160
|
+
registryId: string;
|
|
161
|
+
/** Registry project ID */
|
|
162
|
+
project: string;
|
|
163
|
+
/** Token expiration time in ISO format */
|
|
164
|
+
expiresAt: string;
|
|
165
|
+
}
|
|
166
|
+
export const RegistryPushAccessDto = /*@__PURE__*/ S.suspend(() =>
|
|
167
|
+
S.Struct({
|
|
168
|
+
username: S.String,
|
|
169
|
+
secret: S.String.pipe(T.SensitiveValue({})),
|
|
170
|
+
registryUrl: S.String,
|
|
171
|
+
registryId: S.String,
|
|
172
|
+
project: S.String,
|
|
173
|
+
expiresAt: S.String,
|
|
174
|
+
}),
|
|
175
|
+
).annotate({
|
|
176
|
+
identifier: "RegistryPushAccessDto",
|
|
177
|
+
}) as any as S.Schema<RegistryPushAccessDto>;
|
|
178
|
+
|
|
179
|
+
export interface ListRegistriesRequest {
|
|
180
|
+
/** Use with JWT to specify the organization ID */
|
|
181
|
+
xDaytonaOrganizationID?: string;
|
|
182
|
+
}
|
|
183
|
+
export const ListRegistriesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
184
|
+
S.Struct({
|
|
185
|
+
xDaytonaOrganizationID: S.optional(
|
|
186
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
187
|
+
),
|
|
188
|
+
}).pipe(T.Http({ method: "GET", uri: "/docker-registry", code: 200 })),
|
|
189
|
+
).annotate({
|
|
190
|
+
identifier: "ListRegistriesRequest",
|
|
191
|
+
}) as any as S.Schema<ListRegistriesRequest>;
|
|
192
|
+
|
|
193
|
+
export type ListRegistriesResponseBodyList = Array<DockerRegistry2>;
|
|
194
|
+
export const ListRegistriesResponseBodyList = /*@__PURE__*/ S.Array(
|
|
195
|
+
DockerRegistry2,
|
|
196
|
+
) as any as S.Schema<ListRegistriesResponseBodyList>;
|
|
197
|
+
|
|
198
|
+
export type ListRegistriesResponse = ListRegistriesResponseBodyList;
|
|
199
|
+
export const ListRegistriesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
200
|
+
ListRegistriesResponseBodyList.pipe(T.RawResponseRoot()),
|
|
201
|
+
).annotate({
|
|
202
|
+
identifier: "ListRegistriesResponse",
|
|
203
|
+
}) as any as S.Schema<ListRegistriesResponse>;
|
|
204
|
+
|
|
205
|
+
export interface UpdateRegistryRequest {
|
|
206
|
+
/** ID of the docker registry */
|
|
207
|
+
id: string;
|
|
208
|
+
/** Use with JWT to specify the organization ID */
|
|
209
|
+
xDaytonaOrganizationID?: string;
|
|
210
|
+
/** Registry name */
|
|
211
|
+
name: string;
|
|
212
|
+
/** Registry URL */
|
|
213
|
+
url: string;
|
|
214
|
+
/** Registry username */
|
|
215
|
+
username: string;
|
|
216
|
+
/** Registry password */
|
|
217
|
+
password?: string | Redacted.Redacted<string>;
|
|
218
|
+
/** Registry project */
|
|
219
|
+
project?: string;
|
|
220
|
+
}
|
|
221
|
+
export const UpdateRegistryRequest = /*@__PURE__*/ S.suspend(() =>
|
|
222
|
+
S.Struct({
|
|
223
|
+
id: S.String.pipe(T.Label()),
|
|
224
|
+
xDaytonaOrganizationID: S.optional(
|
|
225
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
226
|
+
),
|
|
227
|
+
name: S.String,
|
|
228
|
+
url: S.String,
|
|
229
|
+
username: S.String,
|
|
230
|
+
password: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
231
|
+
project: S.optional(S.String),
|
|
232
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/docker-registry/{id}", code: 200 })),
|
|
233
|
+
).annotate({
|
|
234
|
+
identifier: "UpdateRegistryRequest",
|
|
235
|
+
}) as any as S.Schema<UpdateRegistryRequest>;
|
|
236
|
+
|
|
237
|
+
export type CreateRegistryError = DaytonaOpError;
|
|
238
|
+
/** Create registry */
|
|
239
|
+
export const createRegistry: API.OperationMethod<
|
|
240
|
+
CreateRegistryRequest,
|
|
241
|
+
DockerRegistry2,
|
|
242
|
+
CreateRegistryError,
|
|
243
|
+
DaytonaOpContext
|
|
244
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
245
|
+
input: CreateRegistryRequest,
|
|
246
|
+
output: DockerRegistry2,
|
|
247
|
+
errors: [UnknownDaytonaError],
|
|
248
|
+
protocol: DaytonaProtocol,
|
|
249
|
+
retry: Retry.Retry,
|
|
250
|
+
}));
|
|
251
|
+
|
|
252
|
+
export type DeleteRegistryError = DaytonaOpError;
|
|
253
|
+
/** Delete registry */
|
|
254
|
+
export const deleteRegistry: API.OperationMethod<
|
|
255
|
+
DeleteRegistryRequest,
|
|
256
|
+
DeleteRegistryResponse,
|
|
257
|
+
DeleteRegistryError,
|
|
258
|
+
DaytonaOpContext
|
|
259
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
260
|
+
input: DeleteRegistryRequest,
|
|
261
|
+
output: DeleteRegistryResponse,
|
|
262
|
+
errors: [UnknownDaytonaError],
|
|
263
|
+
protocol: DaytonaProtocol,
|
|
264
|
+
retry: Retry.Retry,
|
|
265
|
+
}));
|
|
266
|
+
|
|
267
|
+
export type GetRegistryError = DaytonaOpError;
|
|
268
|
+
/** Get registry */
|
|
269
|
+
export const getRegistry: API.OperationMethod<
|
|
270
|
+
GetRegistryRequest,
|
|
271
|
+
DockerRegistry2,
|
|
272
|
+
GetRegistryError,
|
|
273
|
+
DaytonaOpContext
|
|
274
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
275
|
+
input: GetRegistryRequest,
|
|
276
|
+
output: DockerRegistry2,
|
|
277
|
+
errors: [UnknownDaytonaError],
|
|
278
|
+
protocol: DaytonaProtocol,
|
|
279
|
+
retry: Retry.Retry,
|
|
280
|
+
}));
|
|
281
|
+
|
|
282
|
+
export type GetTransientPushAccessError = DaytonaOpError;
|
|
283
|
+
/** Get temporary registry access for pushing snapshots */
|
|
284
|
+
export const getTransientPushAccess: API.OperationMethod<
|
|
285
|
+
GetTransientPushAccessRequest,
|
|
286
|
+
RegistryPushAccessDto,
|
|
287
|
+
GetTransientPushAccessError,
|
|
288
|
+
DaytonaOpContext
|
|
289
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
290
|
+
input: GetTransientPushAccessRequest,
|
|
291
|
+
output: RegistryPushAccessDto,
|
|
292
|
+
errors: [UnknownDaytonaError],
|
|
293
|
+
protocol: DaytonaProtocol,
|
|
294
|
+
retry: Retry.Retry,
|
|
295
|
+
}));
|
|
296
|
+
|
|
297
|
+
export type ListRegistriesError = DaytonaOpError;
|
|
298
|
+
/** List registries */
|
|
299
|
+
export const listRegistries: API.OperationMethod<
|
|
300
|
+
ListRegistriesRequest,
|
|
301
|
+
ListRegistriesResponse,
|
|
302
|
+
ListRegistriesError,
|
|
303
|
+
DaytonaOpContext
|
|
304
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
305
|
+
input: ListRegistriesRequest,
|
|
306
|
+
output: ListRegistriesResponse,
|
|
307
|
+
errors: [UnknownDaytonaError],
|
|
308
|
+
protocol: DaytonaProtocol,
|
|
309
|
+
retry: Retry.Retry,
|
|
310
|
+
}));
|
|
311
|
+
|
|
312
|
+
export type UpdateRegistryError = DaytonaOpError;
|
|
313
|
+
/** Update registry */
|
|
314
|
+
export const updateRegistry: API.OperationMethod<
|
|
315
|
+
UpdateRegistryRequest,
|
|
316
|
+
DockerRegistry2,
|
|
317
|
+
UpdateRegistryError,
|
|
318
|
+
DaytonaOpContext
|
|
319
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
320
|
+
input: UpdateRegistryRequest,
|
|
321
|
+
output: DockerRegistry2,
|
|
322
|
+
errors: [UnknownDaytonaError],
|
|
323
|
+
protocol: DaytonaProtocol,
|
|
324
|
+
retry: Retry.Retry,
|
|
325
|
+
}));
|