@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,209 @@
|
|
|
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 CreateWarmPoolRequest {
|
|
16
|
+
/** Use with JWT to specify the organization ID */
|
|
17
|
+
xDaytonaOrganizationID?: string;
|
|
18
|
+
/** The snapshot (id or name) to keep warm sandboxes for. A pool only serves sandbox creates that use this snapshot with the default OS user and no custom env, volumes or secrets. */
|
|
19
|
+
snapshot: string;
|
|
20
|
+
/** Number of warm sandboxes to keep ready (capped by the organization quota) */
|
|
21
|
+
pool: number;
|
|
22
|
+
/** Target region for the warm pool. Defaults to the organization default region. */
|
|
23
|
+
target?: string;
|
|
24
|
+
}
|
|
25
|
+
export const CreateWarmPoolRequest = /*@__PURE__*/ S.suspend(() =>
|
|
26
|
+
S.Struct({
|
|
27
|
+
xDaytonaOrganizationID: S.optional(
|
|
28
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
29
|
+
),
|
|
30
|
+
snapshot: S.String,
|
|
31
|
+
pool: S.Number,
|
|
32
|
+
target: S.optional(S.String),
|
|
33
|
+
}).pipe(T.Http({ method: "POST", uri: "/warm-pools", code: 200 })),
|
|
34
|
+
).annotate({
|
|
35
|
+
identifier: "CreateWarmPoolRequest",
|
|
36
|
+
}) as any as S.Schema<CreateWarmPoolRequest>;
|
|
37
|
+
|
|
38
|
+
export type WarmPoolEnvMap = { [key: string]: string | undefined };
|
|
39
|
+
export const WarmPoolEnvMap = /*@__PURE__*/ S.Record(
|
|
40
|
+
S.String,
|
|
41
|
+
S.String,
|
|
42
|
+
) as any as S.Schema<WarmPoolEnvMap>;
|
|
43
|
+
|
|
44
|
+
export interface WarmPool {
|
|
45
|
+
id: string;
|
|
46
|
+
organizationId: string;
|
|
47
|
+
snapshot: string;
|
|
48
|
+
target: string;
|
|
49
|
+
/** Desired number of warm sandboxes */
|
|
50
|
+
pool: number;
|
|
51
|
+
/** Current number of ready warm sandboxes in the pool */
|
|
52
|
+
currentSize: number;
|
|
53
|
+
cpu: number;
|
|
54
|
+
mem: number;
|
|
55
|
+
disk: number;
|
|
56
|
+
osUser: string;
|
|
57
|
+
env: WarmPoolEnvMap;
|
|
58
|
+
errorReason?: string | null;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
}
|
|
62
|
+
export const WarmPool = /*@__PURE__*/ S.suspend(() =>
|
|
63
|
+
S.Struct({
|
|
64
|
+
id: S.String,
|
|
65
|
+
organizationId: S.String,
|
|
66
|
+
snapshot: S.String,
|
|
67
|
+
target: S.String,
|
|
68
|
+
pool: S.Number,
|
|
69
|
+
currentSize: S.Number,
|
|
70
|
+
cpu: S.Number,
|
|
71
|
+
mem: S.Number,
|
|
72
|
+
disk: S.Number,
|
|
73
|
+
osUser: S.String,
|
|
74
|
+
env: WarmPoolEnvMap,
|
|
75
|
+
errorReason: S.optional(S.NullOr(S.String)),
|
|
76
|
+
createdAt: S.String,
|
|
77
|
+
updatedAt: S.String,
|
|
78
|
+
}),
|
|
79
|
+
).annotate({ identifier: "WarmPool" }) as any as S.Schema<WarmPool>;
|
|
80
|
+
|
|
81
|
+
export interface DeleteWarmPoolRequest {
|
|
82
|
+
/** Warm pool ID */
|
|
83
|
+
id: string;
|
|
84
|
+
/** Use with JWT to specify the organization ID */
|
|
85
|
+
xDaytonaOrganizationID?: string;
|
|
86
|
+
}
|
|
87
|
+
export const DeleteWarmPoolRequest = /*@__PURE__*/ S.suspend(() =>
|
|
88
|
+
S.Struct({
|
|
89
|
+
id: 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: "/warm-pools/{id}", code: 200 })),
|
|
94
|
+
).annotate({
|
|
95
|
+
identifier: "DeleteWarmPoolRequest",
|
|
96
|
+
}) as any as S.Schema<DeleteWarmPoolRequest>;
|
|
97
|
+
|
|
98
|
+
export interface DeleteWarmPoolResponse {}
|
|
99
|
+
export const DeleteWarmPoolResponse = /*@__PURE__*/ S.suspend(() =>
|
|
100
|
+
S.Struct({}),
|
|
101
|
+
).annotate({
|
|
102
|
+
identifier: "DeleteWarmPoolResponse",
|
|
103
|
+
}) as any as S.Schema<DeleteWarmPoolResponse>;
|
|
104
|
+
|
|
105
|
+
export interface ListWarmPoolsRequest {
|
|
106
|
+
/** Use with JWT to specify the organization ID */
|
|
107
|
+
xDaytonaOrganizationID?: string;
|
|
108
|
+
}
|
|
109
|
+
export const ListWarmPoolsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
110
|
+
S.Struct({
|
|
111
|
+
xDaytonaOrganizationID: S.optional(
|
|
112
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
113
|
+
),
|
|
114
|
+
}).pipe(T.Http({ method: "GET", uri: "/warm-pools", code: 200 })),
|
|
115
|
+
).annotate({
|
|
116
|
+
identifier: "ListWarmPoolsRequest",
|
|
117
|
+
}) as any as S.Schema<ListWarmPoolsRequest>;
|
|
118
|
+
|
|
119
|
+
export type ListWarmPoolsResponseBodyList = Array<WarmPool>;
|
|
120
|
+
export const ListWarmPoolsResponseBodyList = /*@__PURE__*/ S.Array(
|
|
121
|
+
WarmPool,
|
|
122
|
+
) as any as S.Schema<ListWarmPoolsResponseBodyList>;
|
|
123
|
+
|
|
124
|
+
export type ListWarmPoolsResponse = ListWarmPoolsResponseBodyList;
|
|
125
|
+
export const ListWarmPoolsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
126
|
+
ListWarmPoolsResponseBodyList.pipe(T.RawResponseRoot()),
|
|
127
|
+
).annotate({
|
|
128
|
+
identifier: "ListWarmPoolsResponse",
|
|
129
|
+
}) as any as S.Schema<ListWarmPoolsResponse>;
|
|
130
|
+
|
|
131
|
+
export interface UpdateWarmPoolRequest {
|
|
132
|
+
/** Warm pool ID */
|
|
133
|
+
id: string;
|
|
134
|
+
/** Use with JWT to specify the organization ID */
|
|
135
|
+
xDaytonaOrganizationID?: string;
|
|
136
|
+
/** New desired number of warm sandboxes (0 drains the pool) */
|
|
137
|
+
pool: number;
|
|
138
|
+
}
|
|
139
|
+
export const UpdateWarmPoolRequest = /*@__PURE__*/ S.suspend(() =>
|
|
140
|
+
S.Struct({
|
|
141
|
+
id: S.String.pipe(T.Label()),
|
|
142
|
+
xDaytonaOrganizationID: S.optional(
|
|
143
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
144
|
+
),
|
|
145
|
+
pool: S.Number,
|
|
146
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/warm-pools/{id}", code: 200 })),
|
|
147
|
+
).annotate({
|
|
148
|
+
identifier: "UpdateWarmPoolRequest",
|
|
149
|
+
}) as any as S.Schema<UpdateWarmPoolRequest>;
|
|
150
|
+
|
|
151
|
+
export type CreateWarmPoolError = DaytonaOpError;
|
|
152
|
+
/** Create a warm pool */
|
|
153
|
+
export const createWarmPool: API.OperationMethod<
|
|
154
|
+
CreateWarmPoolRequest,
|
|
155
|
+
WarmPool,
|
|
156
|
+
CreateWarmPoolError,
|
|
157
|
+
DaytonaOpContext
|
|
158
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
159
|
+
input: CreateWarmPoolRequest,
|
|
160
|
+
output: WarmPool,
|
|
161
|
+
errors: [UnknownDaytonaError],
|
|
162
|
+
protocol: DaytonaProtocol,
|
|
163
|
+
retry: Retry.Retry,
|
|
164
|
+
}));
|
|
165
|
+
|
|
166
|
+
export type DeleteWarmPoolError = DaytonaOpError;
|
|
167
|
+
/** Delete a warm pool */
|
|
168
|
+
export const deleteWarmPool: API.OperationMethod<
|
|
169
|
+
DeleteWarmPoolRequest,
|
|
170
|
+
DeleteWarmPoolResponse,
|
|
171
|
+
DeleteWarmPoolError,
|
|
172
|
+
DaytonaOpContext
|
|
173
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
174
|
+
input: DeleteWarmPoolRequest,
|
|
175
|
+
output: DeleteWarmPoolResponse,
|
|
176
|
+
errors: [UnknownDaytonaError],
|
|
177
|
+
protocol: DaytonaProtocol,
|
|
178
|
+
retry: Retry.Retry,
|
|
179
|
+
}));
|
|
180
|
+
|
|
181
|
+
export type ListWarmPoolsError = DaytonaOpError;
|
|
182
|
+
/** List warm pools for the organization */
|
|
183
|
+
export const listWarmPools: API.OperationMethod<
|
|
184
|
+
ListWarmPoolsRequest,
|
|
185
|
+
ListWarmPoolsResponse,
|
|
186
|
+
ListWarmPoolsError,
|
|
187
|
+
DaytonaOpContext
|
|
188
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
189
|
+
input: ListWarmPoolsRequest,
|
|
190
|
+
output: ListWarmPoolsResponse,
|
|
191
|
+
errors: [UnknownDaytonaError],
|
|
192
|
+
protocol: DaytonaProtocol,
|
|
193
|
+
retry: Retry.Retry,
|
|
194
|
+
}));
|
|
195
|
+
|
|
196
|
+
export type UpdateWarmPoolError = DaytonaOpError;
|
|
197
|
+
/** Update a warm pool size */
|
|
198
|
+
export const updateWarmPool: API.OperationMethod<
|
|
199
|
+
UpdateWarmPoolRequest,
|
|
200
|
+
WarmPool,
|
|
201
|
+
UpdateWarmPoolError,
|
|
202
|
+
DaytonaOpContext
|
|
203
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
204
|
+
input: UpdateWarmPoolRequest,
|
|
205
|
+
output: WarmPool,
|
|
206
|
+
errors: [UnknownDaytonaError],
|
|
207
|
+
protocol: DaytonaProtocol,
|
|
208
|
+
retry: Retry.Retry,
|
|
209
|
+
}));
|
|
@@ -0,0 +1,214 @@
|
|
|
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 GetWebhookControllerAppPortalAccessRequest {
|
|
16
|
+
organizationId: string;
|
|
17
|
+
/** Use with JWT to specify the organization ID */
|
|
18
|
+
xDaytonaOrganizationID?: string;
|
|
19
|
+
}
|
|
20
|
+
export const GetWebhookControllerAppPortalAccessRequest =
|
|
21
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
22
|
+
S.Struct({
|
|
23
|
+
organizationId: S.String.pipe(T.Label()),
|
|
24
|
+
xDaytonaOrganizationID: S.optional(
|
|
25
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
26
|
+
),
|
|
27
|
+
}).pipe(
|
|
28
|
+
T.Http({
|
|
29
|
+
method: "POST",
|
|
30
|
+
uri: "/webhooks/organizations/{organizationId}/app-portal-access",
|
|
31
|
+
code: 200,
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
).annotate({
|
|
35
|
+
identifier: "GetWebhookControllerAppPortalAccessRequest",
|
|
36
|
+
}) as any as S.Schema<GetWebhookControllerAppPortalAccessRequest>;
|
|
37
|
+
|
|
38
|
+
export interface WebhookAppPortalAccess {
|
|
39
|
+
/** The authentication token for the Svix consumer app portal */
|
|
40
|
+
token: string;
|
|
41
|
+
/** The URL to the webhook app portal */
|
|
42
|
+
url: string;
|
|
43
|
+
}
|
|
44
|
+
export const WebhookAppPortalAccess = /*@__PURE__*/ S.suspend(() =>
|
|
45
|
+
S.Struct({
|
|
46
|
+
token: S.String,
|
|
47
|
+
url: S.String,
|
|
48
|
+
}),
|
|
49
|
+
).annotate({
|
|
50
|
+
identifier: "WebhookAppPortalAccess",
|
|
51
|
+
}) as any as S.Schema<WebhookAppPortalAccess>;
|
|
52
|
+
|
|
53
|
+
export interface GetWebhookControllerInitializationStatusRequest {
|
|
54
|
+
organizationId: string;
|
|
55
|
+
/** Use with JWT to specify the organization ID */
|
|
56
|
+
xDaytonaOrganizationID?: string;
|
|
57
|
+
}
|
|
58
|
+
export const GetWebhookControllerInitializationStatusRequest =
|
|
59
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
60
|
+
S.Struct({
|
|
61
|
+
organizationId: S.String.pipe(T.Label()),
|
|
62
|
+
xDaytonaOrganizationID: S.optional(
|
|
63
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
64
|
+
),
|
|
65
|
+
}).pipe(
|
|
66
|
+
T.Http({
|
|
67
|
+
method: "GET",
|
|
68
|
+
uri: "/webhooks/organizations/{organizationId}/initialization-status",
|
|
69
|
+
code: 200,
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
).annotate({
|
|
73
|
+
identifier: "GetWebhookControllerInitializationStatusRequest",
|
|
74
|
+
}) as any as S.Schema<GetWebhookControllerInitializationStatusRequest>;
|
|
75
|
+
|
|
76
|
+
export interface WebhookInitializationStatus {
|
|
77
|
+
/** Organization ID */
|
|
78
|
+
organizationId: string;
|
|
79
|
+
/** The ID of the Svix application */
|
|
80
|
+
svixApplicationId: string | null;
|
|
81
|
+
/** The error reason for the last initialization attempt */
|
|
82
|
+
lastError: string | null;
|
|
83
|
+
/** The number of times the initialization has been attempted */
|
|
84
|
+
retryCount: number;
|
|
85
|
+
/** When the webhook initialization was created */
|
|
86
|
+
createdAt: string;
|
|
87
|
+
/** When the webhook initialization was last updated */
|
|
88
|
+
updatedAt: string;
|
|
89
|
+
}
|
|
90
|
+
export const WebhookInitializationStatus = /*@__PURE__*/ S.suspend(() =>
|
|
91
|
+
S.Struct({
|
|
92
|
+
organizationId: S.String,
|
|
93
|
+
svixApplicationId: S.NullOr(S.String),
|
|
94
|
+
lastError: S.NullOr(S.String),
|
|
95
|
+
retryCount: S.Number,
|
|
96
|
+
createdAt: S.String,
|
|
97
|
+
updatedAt: S.String,
|
|
98
|
+
}),
|
|
99
|
+
).annotate({
|
|
100
|
+
identifier: "WebhookInitializationStatus",
|
|
101
|
+
}) as any as S.Schema<WebhookInitializationStatus>;
|
|
102
|
+
|
|
103
|
+
export interface RefreshWebhookControllerEndpointsRequest {
|
|
104
|
+
organizationId: string;
|
|
105
|
+
/** Use with JWT to specify the organization ID */
|
|
106
|
+
xDaytonaOrganizationID?: string;
|
|
107
|
+
}
|
|
108
|
+
export const RefreshWebhookControllerEndpointsRequest = /*@__PURE__*/ S.suspend(
|
|
109
|
+
() =>
|
|
110
|
+
S.Struct({
|
|
111
|
+
organizationId: S.String.pipe(T.Label()),
|
|
112
|
+
xDaytonaOrganizationID: S.optional(
|
|
113
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
114
|
+
),
|
|
115
|
+
}).pipe(
|
|
116
|
+
T.Http({
|
|
117
|
+
method: "POST",
|
|
118
|
+
uri: "/webhooks/organizations/{organizationId}/refresh-endpoints",
|
|
119
|
+
code: 200,
|
|
120
|
+
}),
|
|
121
|
+
),
|
|
122
|
+
).annotate({
|
|
123
|
+
identifier: "RefreshWebhookControllerEndpointsRequest",
|
|
124
|
+
}) as any as S.Schema<RefreshWebhookControllerEndpointsRequest>;
|
|
125
|
+
|
|
126
|
+
export interface RefreshWebhookControllerEndpointsResponse {}
|
|
127
|
+
export const RefreshWebhookControllerEndpointsResponse =
|
|
128
|
+
/*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
129
|
+
identifier: "RefreshWebhookControllerEndpointsResponse",
|
|
130
|
+
}) as any as S.Schema<RefreshWebhookControllerEndpointsResponse>;
|
|
131
|
+
|
|
132
|
+
export interface WebhookControllerInitializeWebhooksRequest {
|
|
133
|
+
/** Organization ID */
|
|
134
|
+
organizationId: string;
|
|
135
|
+
/** Use with JWT to specify the organization ID */
|
|
136
|
+
xDaytonaOrganizationID?: string;
|
|
137
|
+
}
|
|
138
|
+
export const WebhookControllerInitializeWebhooksRequest =
|
|
139
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
140
|
+
S.Struct({
|
|
141
|
+
organizationId: S.String.pipe(T.Label()),
|
|
142
|
+
xDaytonaOrganizationID: S.optional(
|
|
143
|
+
S.String.pipe(T.Header("X-Daytona-Organization-ID")),
|
|
144
|
+
),
|
|
145
|
+
}).pipe(
|
|
146
|
+
T.Http({
|
|
147
|
+
method: "POST",
|
|
148
|
+
uri: "/webhooks/organizations/{organizationId}/initialize",
|
|
149
|
+
code: 200,
|
|
150
|
+
}),
|
|
151
|
+
),
|
|
152
|
+
).annotate({
|
|
153
|
+
identifier: "WebhookControllerInitializeWebhooksRequest",
|
|
154
|
+
}) as any as S.Schema<WebhookControllerInitializeWebhooksRequest>;
|
|
155
|
+
|
|
156
|
+
export type GetWebhookControllerAppPortalAccessError = DaytonaOpError;
|
|
157
|
+
/** Get Svix Consumer App Portal access for an organization */
|
|
158
|
+
export const getWebhookControllerAppPortalAccess: API.OperationMethod<
|
|
159
|
+
GetWebhookControllerAppPortalAccessRequest,
|
|
160
|
+
WebhookAppPortalAccess,
|
|
161
|
+
GetWebhookControllerAppPortalAccessError,
|
|
162
|
+
DaytonaOpContext
|
|
163
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
164
|
+
input: GetWebhookControllerAppPortalAccessRequest,
|
|
165
|
+
output: WebhookAppPortalAccess,
|
|
166
|
+
errors: [UnknownDaytonaError],
|
|
167
|
+
protocol: DaytonaProtocol,
|
|
168
|
+
retry: Retry.Retry,
|
|
169
|
+
}));
|
|
170
|
+
|
|
171
|
+
export type GetWebhookControllerInitializationStatusError = DaytonaOpError;
|
|
172
|
+
/** Get webhook initialization status for an organization */
|
|
173
|
+
export const getWebhookControllerInitializationStatus: API.OperationMethod<
|
|
174
|
+
GetWebhookControllerInitializationStatusRequest,
|
|
175
|
+
WebhookInitializationStatus,
|
|
176
|
+
GetWebhookControllerInitializationStatusError,
|
|
177
|
+
DaytonaOpContext
|
|
178
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
179
|
+
input: GetWebhookControllerInitializationStatusRequest,
|
|
180
|
+
output: WebhookInitializationStatus,
|
|
181
|
+
errors: [UnknownDaytonaError],
|
|
182
|
+
protocol: DaytonaProtocol,
|
|
183
|
+
retry: Retry.Retry,
|
|
184
|
+
}));
|
|
185
|
+
|
|
186
|
+
export type RefreshWebhookControllerEndpointsError = DaytonaOpError;
|
|
187
|
+
/** Refresh cached endpoint presence flag for an organization */
|
|
188
|
+
export const refreshWebhookControllerEndpoints: API.OperationMethod<
|
|
189
|
+
RefreshWebhookControllerEndpointsRequest,
|
|
190
|
+
RefreshWebhookControllerEndpointsResponse,
|
|
191
|
+
RefreshWebhookControllerEndpointsError,
|
|
192
|
+
DaytonaOpContext
|
|
193
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
194
|
+
input: RefreshWebhookControllerEndpointsRequest,
|
|
195
|
+
output: RefreshWebhookControllerEndpointsResponse,
|
|
196
|
+
errors: [UnknownDaytonaError],
|
|
197
|
+
protocol: DaytonaProtocol,
|
|
198
|
+
retry: Retry.Retry,
|
|
199
|
+
}));
|
|
200
|
+
|
|
201
|
+
export type WebhookControllerInitializeWebhooksError = DaytonaOpError;
|
|
202
|
+
/** Initialize webhooks for an organization */
|
|
203
|
+
export const webhookControllerInitializeWebhooks: API.OperationMethod<
|
|
204
|
+
WebhookControllerInitializeWebhooksRequest,
|
|
205
|
+
WebhookInitializationStatus,
|
|
206
|
+
WebhookControllerInitializeWebhooksError,
|
|
207
|
+
DaytonaOpContext
|
|
208
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
209
|
+
input: WebhookControllerInitializeWebhooksRequest,
|
|
210
|
+
output: WebhookInitializationStatus,
|
|
211
|
+
errors: [UnknownDaytonaError],
|
|
212
|
+
protocol: DaytonaProtocol,
|
|
213
|
+
retry: Retry.Retry,
|
|
214
|
+
}));
|
package/src/traits.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daytona SDK trait surface — hand-written.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the generic protocol traits from core so generated operations
|
|
5
|
+
* import everything from one place. Daytona speaks plain bearer-REST JSON
|
|
6
|
+
* with no success envelope, so there are no provider-specific traits.
|
|
7
|
+
*/
|
|
8
|
+
export {
|
|
9
|
+
Body,
|
|
10
|
+
Header,
|
|
11
|
+
Query,
|
|
12
|
+
Label,
|
|
13
|
+
Http,
|
|
14
|
+
ResponseCode,
|
|
15
|
+
HttpBody,
|
|
16
|
+
FormDataFile,
|
|
17
|
+
KeyDictionary,
|
|
18
|
+
UnionCases,
|
|
19
|
+
applyErrorMatchers,
|
|
20
|
+
getErrorMatchers,
|
|
21
|
+
type HttpTrait,
|
|
22
|
+
type ErrorMatcher,
|
|
23
|
+
bodySymbol,
|
|
24
|
+
headerSymbol,
|
|
25
|
+
querySymbol,
|
|
26
|
+
labelSymbol,
|
|
27
|
+
httpSymbol,
|
|
28
|
+
responseCodeSymbol,
|
|
29
|
+
httpBodySymbol,
|
|
30
|
+
formDataFileSymbol,
|
|
31
|
+
keyDictionarySymbol,
|
|
32
|
+
unionCasesSymbol,
|
|
33
|
+
errorMatchersSymbol,
|
|
34
|
+
} from "@distilled.cloud/core/trait";
|
|
35
|
+
|
|
36
|
+
// Bearer-REST protocol traits (sensitive strings, bare-payload responses).
|
|
37
|
+
export {
|
|
38
|
+
SensitiveValue,
|
|
39
|
+
RawResponse,
|
|
40
|
+
RawResponseRoot,
|
|
41
|
+
sensitiveValueSymbol,
|
|
42
|
+
rawResponseSymbol,
|
|
43
|
+
rawResponseRootSymbol,
|
|
44
|
+
} from "@distilled.cloud/core/protocol-rest";
|