@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,289 @@
|
|
|
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.ts";
|
|
5
|
+
import {
|
|
6
|
+
DaytonaProtocol,
|
|
7
|
+
type DaytonaOpError,
|
|
8
|
+
type DaytonaOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { UnknownDaytonaError } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { DaytonaOpError, DaytonaOpContext };
|
|
14
|
+
|
|
15
|
+
/** Allowed hosts this secret may be sent to */
|
|
16
|
+
export type CreateSecretRequestHostsList = Array<string>;
|
|
17
|
+
export const CreateSecretRequestHostsList = /*@__PURE__*/ S.Array(
|
|
18
|
+
S.String,
|
|
19
|
+
) as any as S.Schema<CreateSecretRequestHostsList>;
|
|
20
|
+
|
|
21
|
+
export interface CreateSecretRequest {
|
|
22
|
+
/** Use with JWT to specify the organization ID */
|
|
23
|
+
xDaytonaOrganizationID?: string;
|
|
24
|
+
/** Secret name (alphanumeric, hyphens, underscores) */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Secret value */
|
|
27
|
+
value: string;
|
|
28
|
+
/** Optional description of the secret */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Allowed hosts this secret may be sent to */
|
|
31
|
+
hosts?: CreateSecretRequestHostsList;
|
|
32
|
+
}
|
|
33
|
+
export const CreateSecretRequest = /*@__PURE__*/ S.suspend(() =>
|
|
34
|
+
S.Struct({
|
|
35
|
+
xDaytonaOrganizationID: S.optional(
|
|
36
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
37
|
+
),
|
|
38
|
+
name: S.String,
|
|
39
|
+
value: S.String,
|
|
40
|
+
description: S.optional(S.String),
|
|
41
|
+
hosts: S.optional(CreateSecretRequestHostsList),
|
|
42
|
+
}).pipe(T.Http({ method: "POST", uri: "/secret", code: 200 })),
|
|
43
|
+
).annotate({
|
|
44
|
+
identifier: "CreateSecretRequest",
|
|
45
|
+
}) as any as S.Schema<CreateSecretRequest>;
|
|
46
|
+
|
|
47
|
+
/** Allowed hosts this secret may be sent to */
|
|
48
|
+
export type SecretHostsList = Array<string>;
|
|
49
|
+
export const SecretHostsList = /*@__PURE__*/ S.Array(
|
|
50
|
+
S.String,
|
|
51
|
+
) as any as S.Schema<SecretHostsList>;
|
|
52
|
+
|
|
53
|
+
export interface Secret2 {
|
|
54
|
+
/** Secret ID */
|
|
55
|
+
id: string;
|
|
56
|
+
/** Secret name */
|
|
57
|
+
name: string;
|
|
58
|
+
/** Optional description of the secret */
|
|
59
|
+
description?: string;
|
|
60
|
+
/** Creation timestamp */
|
|
61
|
+
createdAt: string;
|
|
62
|
+
/** Opaque placeholder token injected as env var value in sandboxes */
|
|
63
|
+
placeholder: string;
|
|
64
|
+
/** Allowed hosts this secret may be sent to */
|
|
65
|
+
hosts: SecretHostsList;
|
|
66
|
+
/** Last update timestamp */
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
}
|
|
69
|
+
export const Secret2 = /*@__PURE__*/ S.suspend(() =>
|
|
70
|
+
S.Struct({
|
|
71
|
+
id: S.String,
|
|
72
|
+
name: S.String,
|
|
73
|
+
description: S.optional(S.String),
|
|
74
|
+
createdAt: S.String,
|
|
75
|
+
placeholder: S.String,
|
|
76
|
+
hosts: SecretHostsList,
|
|
77
|
+
updatedAt: S.String,
|
|
78
|
+
}),
|
|
79
|
+
).annotate({ identifier: "Secret2" }) as any as S.Schema<Secret2>;
|
|
80
|
+
|
|
81
|
+
export interface DeleteSecretRequest {
|
|
82
|
+
/** ID of the secret */
|
|
83
|
+
secretId: string;
|
|
84
|
+
/** Use with JWT to specify the organization ID */
|
|
85
|
+
xDaytonaOrganizationID?: string;
|
|
86
|
+
}
|
|
87
|
+
export const DeleteSecretRequest = /*@__PURE__*/ S.suspend(() =>
|
|
88
|
+
S.Struct({
|
|
89
|
+
secretId: S.String.pipe(T.Label()),
|
|
90
|
+
xDaytonaOrganizationID: S.optional(
|
|
91
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
92
|
+
),
|
|
93
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/secret/{secretId}", code: 200 })),
|
|
94
|
+
).annotate({
|
|
95
|
+
identifier: "DeleteSecretRequest",
|
|
96
|
+
}) as any as S.Schema<DeleteSecretRequest>;
|
|
97
|
+
|
|
98
|
+
export interface DeleteSecretResponse {}
|
|
99
|
+
export const DeleteSecretResponse = /*@__PURE__*/ S.suspend(() =>
|
|
100
|
+
S.Struct({}),
|
|
101
|
+
).annotate({
|
|
102
|
+
identifier: "DeleteSecretResponse",
|
|
103
|
+
}) as any as S.Schema<DeleteSecretResponse>;
|
|
104
|
+
|
|
105
|
+
export interface GetSecretRequest {
|
|
106
|
+
/** ID of the secret */
|
|
107
|
+
secretId: string;
|
|
108
|
+
/** Use with JWT to specify the organization ID */
|
|
109
|
+
xDaytonaOrganizationID?: string;
|
|
110
|
+
}
|
|
111
|
+
export const GetSecretRequest = /*@__PURE__*/ S.suspend(() =>
|
|
112
|
+
S.Struct({
|
|
113
|
+
secretId: S.String.pipe(T.Label()),
|
|
114
|
+
xDaytonaOrganizationID: S.optional(
|
|
115
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
116
|
+
),
|
|
117
|
+
}).pipe(T.Http({ method: "GET", uri: "/secret/{secretId}", code: 200 })),
|
|
118
|
+
).annotate({
|
|
119
|
+
identifier: "GetSecretRequest",
|
|
120
|
+
}) as any as S.Schema<GetSecretRequest>;
|
|
121
|
+
|
|
122
|
+
export type ListSecretsPaginatedRequestSort =
|
|
123
|
+
| "name"
|
|
124
|
+
| "createdAt"
|
|
125
|
+
| "updatedAt";
|
|
126
|
+
export const ListSecretsPaginatedRequestSort = S.String;
|
|
127
|
+
|
|
128
|
+
export type ListSecretsPaginatedRequestOrder = "asc" | "desc";
|
|
129
|
+
export const ListSecretsPaginatedRequestOrder = S.String;
|
|
130
|
+
|
|
131
|
+
export interface ListSecretsPaginatedRequest {
|
|
132
|
+
/** Pagination cursor from a previous response */
|
|
133
|
+
cursor?: string;
|
|
134
|
+
/** Number of results per page */
|
|
135
|
+
limit?: number;
|
|
136
|
+
/** Filter by partial name match */
|
|
137
|
+
name?: string;
|
|
138
|
+
/** Field to sort by */
|
|
139
|
+
sort?: ListSecretsPaginatedRequestSort | (string & {});
|
|
140
|
+
/** Direction to sort by */
|
|
141
|
+
order?: ListSecretsPaginatedRequestOrder | (string & {});
|
|
142
|
+
/** Use with JWT to specify the organization ID */
|
|
143
|
+
xDaytonaOrganizationID?: string;
|
|
144
|
+
}
|
|
145
|
+
export const ListSecretsPaginatedRequest = /*@__PURE__*/ S.suspend(() =>
|
|
146
|
+
S.Struct({
|
|
147
|
+
cursor: S.optional(S.String.pipe(T.Query())),
|
|
148
|
+
limit: S.optional(S.Number.pipe(T.Query())),
|
|
149
|
+
name: S.optional(S.String.pipe(T.Query())),
|
|
150
|
+
sort: S.optional(ListSecretsPaginatedRequestSort.pipe(T.Query())),
|
|
151
|
+
order: S.optional(ListSecretsPaginatedRequestOrder.pipe(T.Query())),
|
|
152
|
+
xDaytonaOrganizationID: S.optional(
|
|
153
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
154
|
+
),
|
|
155
|
+
}).pipe(T.Http({ method: "GET", uri: "/secret/paginated", code: 200 })),
|
|
156
|
+
).annotate({
|
|
157
|
+
identifier: "ListSecretsPaginatedRequest",
|
|
158
|
+
}) as any as S.Schema<ListSecretsPaginatedRequest>;
|
|
159
|
+
|
|
160
|
+
/** List of results for the current page */
|
|
161
|
+
export type ListSecretsResponseItemsList = Array<Secret2>;
|
|
162
|
+
export const ListSecretsResponseItemsList = /*@__PURE__*/ S.Array(
|
|
163
|
+
Secret2,
|
|
164
|
+
) as any as S.Schema<ListSecretsResponseItemsList>;
|
|
165
|
+
|
|
166
|
+
export interface ListSecretsResponse {
|
|
167
|
+
/** List of results for the current page */
|
|
168
|
+
items: ListSecretsResponseItemsList;
|
|
169
|
+
/** Total number of secrets matching the filters */
|
|
170
|
+
total: number;
|
|
171
|
+
/** Cursor for the next page of results */
|
|
172
|
+
nextCursor: string | null;
|
|
173
|
+
}
|
|
174
|
+
export const ListSecretsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
175
|
+
S.Struct({
|
|
176
|
+
items: ListSecretsResponseItemsList,
|
|
177
|
+
total: S.Number,
|
|
178
|
+
nextCursor: S.NullOr(S.String),
|
|
179
|
+
}),
|
|
180
|
+
).annotate({
|
|
181
|
+
identifier: "ListSecretsResponse",
|
|
182
|
+
}) as any as S.Schema<ListSecretsResponse>;
|
|
183
|
+
|
|
184
|
+
/** Allowed hosts this secret may be sent to */
|
|
185
|
+
export type UpdateSecretRequestHostsList = Array<string>;
|
|
186
|
+
export const UpdateSecretRequestHostsList = /*@__PURE__*/ S.Array(
|
|
187
|
+
S.String,
|
|
188
|
+
) as any as S.Schema<UpdateSecretRequestHostsList>;
|
|
189
|
+
|
|
190
|
+
export interface UpdateSecretRequest {
|
|
191
|
+
/** ID of the secret */
|
|
192
|
+
secretId: string;
|
|
193
|
+
/** Use with JWT to specify the organization ID */
|
|
194
|
+
xDaytonaOrganizationID?: string;
|
|
195
|
+
/** New secret value */
|
|
196
|
+
value?: string;
|
|
197
|
+
/** Optional description of the secret */
|
|
198
|
+
description?: string;
|
|
199
|
+
/** Allowed hosts this secret may be sent to */
|
|
200
|
+
hosts?: UpdateSecretRequestHostsList;
|
|
201
|
+
}
|
|
202
|
+
export const UpdateSecretRequest = /*@__PURE__*/ S.suspend(() =>
|
|
203
|
+
S.Struct({
|
|
204
|
+
secretId: S.String.pipe(T.Label()),
|
|
205
|
+
xDaytonaOrganizationID: S.optional(
|
|
206
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
207
|
+
),
|
|
208
|
+
value: S.optional(S.String),
|
|
209
|
+
description: S.optional(S.String),
|
|
210
|
+
hosts: S.optional(UpdateSecretRequestHostsList),
|
|
211
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/secret/{secretId}", code: 200 })),
|
|
212
|
+
).annotate({
|
|
213
|
+
identifier: "UpdateSecretRequest",
|
|
214
|
+
}) as any as S.Schema<UpdateSecretRequest>;
|
|
215
|
+
|
|
216
|
+
export type CreateSecretError = DaytonaOpError;
|
|
217
|
+
/** Create secret */
|
|
218
|
+
export const createSecret: API.OperationMethod<
|
|
219
|
+
CreateSecretRequest,
|
|
220
|
+
Secret2,
|
|
221
|
+
CreateSecretError,
|
|
222
|
+
DaytonaOpContext
|
|
223
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
224
|
+
input: CreateSecretRequest,
|
|
225
|
+
output: Secret2,
|
|
226
|
+
errors: [UnknownDaytonaError],
|
|
227
|
+
protocol: DaytonaProtocol,
|
|
228
|
+
retry: Retry.Retry,
|
|
229
|
+
}));
|
|
230
|
+
|
|
231
|
+
export type DeleteSecretError = DaytonaOpError;
|
|
232
|
+
/** Delete secret */
|
|
233
|
+
export const deleteSecret: API.OperationMethod<
|
|
234
|
+
DeleteSecretRequest,
|
|
235
|
+
DeleteSecretResponse,
|
|
236
|
+
DeleteSecretError,
|
|
237
|
+
DaytonaOpContext
|
|
238
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
239
|
+
input: DeleteSecretRequest,
|
|
240
|
+
output: DeleteSecretResponse,
|
|
241
|
+
errors: [UnknownDaytonaError],
|
|
242
|
+
protocol: DaytonaProtocol,
|
|
243
|
+
retry: Retry.Retry,
|
|
244
|
+
}));
|
|
245
|
+
|
|
246
|
+
export type GetSecretError = DaytonaOpError;
|
|
247
|
+
/** Get secret */
|
|
248
|
+
export const getSecret: API.OperationMethod<
|
|
249
|
+
GetSecretRequest,
|
|
250
|
+
Secret2,
|
|
251
|
+
GetSecretError,
|
|
252
|
+
DaytonaOpContext
|
|
253
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
254
|
+
input: GetSecretRequest,
|
|
255
|
+
output: Secret2,
|
|
256
|
+
errors: [UnknownDaytonaError],
|
|
257
|
+
protocol: DaytonaProtocol,
|
|
258
|
+
retry: Retry.Retry,
|
|
259
|
+
}));
|
|
260
|
+
|
|
261
|
+
export type ListSecretsPaginatedError = DaytonaOpError;
|
|
262
|
+
/** List secrets with pagination */
|
|
263
|
+
export const listSecretsPaginated: API.OperationMethod<
|
|
264
|
+
ListSecretsPaginatedRequest,
|
|
265
|
+
ListSecretsResponse,
|
|
266
|
+
ListSecretsPaginatedError,
|
|
267
|
+
DaytonaOpContext
|
|
268
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
269
|
+
input: ListSecretsPaginatedRequest,
|
|
270
|
+
output: ListSecretsResponse,
|
|
271
|
+
errors: [UnknownDaytonaError],
|
|
272
|
+
protocol: DaytonaProtocol,
|
|
273
|
+
retry: Retry.Retry,
|
|
274
|
+
}));
|
|
275
|
+
|
|
276
|
+
export type UpdateSecretError = DaytonaOpError;
|
|
277
|
+
/** Update secret */
|
|
278
|
+
export const updateSecret: API.OperationMethod<
|
|
279
|
+
UpdateSecretRequest,
|
|
280
|
+
Secret2,
|
|
281
|
+
UpdateSecretError,
|
|
282
|
+
DaytonaOpContext
|
|
283
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
284
|
+
input: UpdateSecretRequest,
|
|
285
|
+
output: Secret2,
|
|
286
|
+
errors: [UnknownDaytonaError],
|
|
287
|
+
protocol: DaytonaProtocol,
|
|
288
|
+
retry: Retry.Retry,
|
|
289
|
+
}));
|
|
@@ -0,0 +1,111 @@
|
|
|
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.ts";
|
|
5
|
+
import {
|
|
6
|
+
DaytonaProtocol,
|
|
7
|
+
type DaytonaOpError,
|
|
8
|
+
type DaytonaOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { UnknownDaytonaError } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { DaytonaOpError, DaytonaOpContext };
|
|
14
|
+
|
|
15
|
+
export interface InitializeRequest {
|
|
16
|
+
token: string;
|
|
17
|
+
}
|
|
18
|
+
export const InitializeRequest = /*@__PURE__*/ S.suspend(() =>
|
|
19
|
+
S.Struct({
|
|
20
|
+
token: S.String,
|
|
21
|
+
}).pipe(T.Http({ method: "POST", uri: "/init", code: 200 })),
|
|
22
|
+
).annotate({
|
|
23
|
+
identifier: "InitializeRequest",
|
|
24
|
+
}) as any as S.Schema<InitializeRequest>;
|
|
25
|
+
|
|
26
|
+
export type InitializeResponseBodyMap = { [key: string]: string | undefined };
|
|
27
|
+
export const InitializeResponseBodyMap = /*@__PURE__*/ S.Record(
|
|
28
|
+
S.String,
|
|
29
|
+
S.String,
|
|
30
|
+
) as any as S.Schema<InitializeResponseBodyMap>;
|
|
31
|
+
|
|
32
|
+
export type InitializeResponse = InitializeResponseBodyMap;
|
|
33
|
+
export const InitializeResponse = /*@__PURE__*/ S.suspend(() =>
|
|
34
|
+
InitializeResponseBodyMap.pipe(T.RawResponseRoot()),
|
|
35
|
+
).annotate({
|
|
36
|
+
identifier: "InitializeResponse",
|
|
37
|
+
}) as any as S.Schema<InitializeResponse>;
|
|
38
|
+
|
|
39
|
+
/** Set maps env var names to values applied to the daemon's process env, so processes spawned after the call (exec, sessions, PTYs) inherit them. */
|
|
40
|
+
export type UpdateEnvRequestSetMap = { [key: string]: string | undefined };
|
|
41
|
+
export const UpdateEnvRequestSetMap = /*@__PURE__*/ S.Record(
|
|
42
|
+
S.String,
|
|
43
|
+
S.String,
|
|
44
|
+
) as any as S.Schema<UpdateEnvRequestSetMap>;
|
|
45
|
+
|
|
46
|
+
/** Unset lists env var names to remove before Set is applied. */
|
|
47
|
+
export type UpdateEnvRequestUnsetList = Array<string>;
|
|
48
|
+
export const UpdateEnvRequestUnsetList = /*@__PURE__*/ S.Array(
|
|
49
|
+
S.String,
|
|
50
|
+
) as any as S.Schema<UpdateEnvRequestUnsetList>;
|
|
51
|
+
|
|
52
|
+
export interface UpdateEnvRequest {
|
|
53
|
+
/** Set maps env var names to values applied to the daemon's process env, so processes spawned after the call (exec, sessions, PTYs) inherit them. */
|
|
54
|
+
set?: UpdateEnvRequestSetMap;
|
|
55
|
+
/** Unset lists env var names to remove before Set is applied. */
|
|
56
|
+
unset?: UpdateEnvRequestUnsetList;
|
|
57
|
+
/** UnsetValuePrefix removes every env var whose value has this prefix and whose name is not a key of Set, before Set is applied. Used to reconcile secret placeholder vars without the caller knowing the daemon's env. */
|
|
58
|
+
unsetValuePrefix?: string;
|
|
59
|
+
}
|
|
60
|
+
export const UpdateEnvRequest = /*@__PURE__*/ S.suspend(() =>
|
|
61
|
+
S.Struct({
|
|
62
|
+
set: S.optional(UpdateEnvRequestSetMap),
|
|
63
|
+
unset: S.optional(UpdateEnvRequestUnsetList),
|
|
64
|
+
unsetValuePrefix: S.optional(S.String),
|
|
65
|
+
}).pipe(T.Http({ method: "POST", uri: "/env", code: 200 })),
|
|
66
|
+
).annotate({
|
|
67
|
+
identifier: "UpdateEnvRequest",
|
|
68
|
+
}) as any as S.Schema<UpdateEnvRequest>;
|
|
69
|
+
|
|
70
|
+
export type UpdateEnvResponseBodyMap = { [key: string]: string | undefined };
|
|
71
|
+
export const UpdateEnvResponseBodyMap = /*@__PURE__*/ S.Record(
|
|
72
|
+
S.String,
|
|
73
|
+
S.String,
|
|
74
|
+
) as any as S.Schema<UpdateEnvResponseBodyMap>;
|
|
75
|
+
|
|
76
|
+
export type UpdateEnvResponse = UpdateEnvResponseBodyMap;
|
|
77
|
+
export const UpdateEnvResponse = /*@__PURE__*/ S.suspend(() =>
|
|
78
|
+
UpdateEnvResponseBodyMap.pipe(T.RawResponseRoot()),
|
|
79
|
+
).annotate({
|
|
80
|
+
identifier: "UpdateEnvResponse",
|
|
81
|
+
}) as any as S.Schema<UpdateEnvResponse>;
|
|
82
|
+
|
|
83
|
+
export type InitializeError = DaytonaOpError;
|
|
84
|
+
/** Initialize toolbox server Set the auth token and initialize telemetry for the toolbox server */
|
|
85
|
+
export const initialize: API.OperationMethod<
|
|
86
|
+
InitializeRequest,
|
|
87
|
+
InitializeResponse,
|
|
88
|
+
InitializeError,
|
|
89
|
+
DaytonaOpContext
|
|
90
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
91
|
+
input: InitializeRequest,
|
|
92
|
+
output: InitializeResponse,
|
|
93
|
+
errors: [UnknownDaytonaError],
|
|
94
|
+
protocol: DaytonaProtocol,
|
|
95
|
+
retry: Retry.Retry,
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
export type UpdateEnvError = DaytonaOpError;
|
|
99
|
+
/** Update process environment Update the daemon's process environment. Newly spawned processes, sessions and PTYs inherit the change; already-running processes keep their environment. */
|
|
100
|
+
export const updateEnv: API.OperationMethod<
|
|
101
|
+
UpdateEnvRequest,
|
|
102
|
+
UpdateEnvResponse,
|
|
103
|
+
UpdateEnvError,
|
|
104
|
+
DaytonaOpContext
|
|
105
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
106
|
+
input: UpdateEnvRequest,
|
|
107
|
+
output: UpdateEnvResponse,
|
|
108
|
+
errors: [UnknownDaytonaError],
|
|
109
|
+
protocol: DaytonaProtocol,
|
|
110
|
+
retry: Retry.Retry,
|
|
111
|
+
}));
|