@solarisdk/runloop-compat 0.0.0-stage → 0.1.0

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 (58) hide show
  1. package/COMPAT.md +110 -0
  2. package/LICENSE +17 -0
  3. package/LICENSE-RUNLOOP +7 -0
  4. package/NOTICE +14 -0
  5. package/README.md +46 -2
  6. package/dist/blueprint-types.d.ts +522 -0
  7. package/dist/blueprint-types.d.ts.map +1 -0
  8. package/dist/blueprint-types.js +4 -0
  9. package/dist/blueprint-types.js.map +1 -0
  10. package/dist/blueprints.d.ts +71 -0
  11. package/dist/blueprints.d.ts.map +1 -0
  12. package/dist/blueprints.js +233 -0
  13. package/dist/blueprints.js.map +1 -0
  14. package/dist/client.d.ts +290 -0
  15. package/dist/client.d.ts.map +1 -0
  16. package/dist/client.js +924 -0
  17. package/dist/client.js.map +1 -0
  18. package/dist/context.d.ts +42 -0
  19. package/dist/context.d.ts.map +1 -0
  20. package/dist/context.js +198 -0
  21. package/dist/context.js.map +1 -0
  22. package/dist/dockerfile.d.ts +36 -0
  23. package/dist/dockerfile.d.ts.map +1 -0
  24. package/dist/dockerfile.js +338 -0
  25. package/dist/dockerfile.js.map +1 -0
  26. package/dist/errors.d.ts +67 -0
  27. package/dist/errors.d.ts.map +1 -0
  28. package/dist/errors.js +171 -0
  29. package/dist/errors.js.map +1 -0
  30. package/dist/image-ref.d.ts +35 -0
  31. package/dist/image-ref.d.ts.map +1 -0
  32. package/dist/image-ref.js +97 -0
  33. package/dist/image-ref.js.map +1 -0
  34. package/dist/index.d.ts +16 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +20 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/mapping.d.ts +49 -0
  39. package/dist/mapping.d.ts.map +1 -0
  40. package/dist/mapping.js +204 -0
  41. package/dist/mapping.js.map +1 -0
  42. package/dist/sdk.d.ts +182 -0
  43. package/dist/sdk.d.ts.map +1 -0
  44. package/dist/sdk.js +356 -0
  45. package/dist/sdk.js.map +1 -0
  46. package/dist/secrets.d.ts +41 -0
  47. package/dist/secrets.d.ts.map +1 -0
  48. package/dist/secrets.js +58 -0
  49. package/dist/secrets.js.map +1 -0
  50. package/dist/shared-types.d.ts +440 -0
  51. package/dist/shared-types.d.ts.map +1 -0
  52. package/dist/shared-types.js +4 -0
  53. package/dist/shared-types.js.map +1 -0
  54. package/dist/types.d.ts +920 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/types.js +4 -0
  57. package/dist/types.js.map +1 -0
  58. package/package.json +48 -4
@@ -0,0 +1,522 @@
1
+ import type * as Shared from './shared-types.js';
2
+ import type { CursorIDPageParams } from './types.js';
3
+ export type BlueprintsCursorIDPageParams = CursorIDPageParams;
4
+ export interface BlueprintBuildLog {
5
+ /**
6
+ * Log line severity level.
7
+ */
8
+ level: string;
9
+ /**
10
+ * Log line message.
11
+ */
12
+ message: string;
13
+ /**
14
+ * Time of log (Unix timestamp milliseconds).
15
+ */
16
+ timestamp_ms: number;
17
+ }
18
+ export interface BlueprintBuildLogsListView {
19
+ /**
20
+ * ID of the Blueprint.
21
+ */
22
+ blueprint_id: string;
23
+ /**
24
+ * List of logs generated during Blueprint build.
25
+ */
26
+ logs: Array<BlueprintBuildLog>;
27
+ }
28
+ export interface BlueprintBuildParameters {
29
+ /**
30
+ * Name of the Blueprint.
31
+ */
32
+ name: string;
33
+ /**
34
+ * (Optional) ID of previously built blueprint to use as a base blueprint for this
35
+ * build.
36
+ */
37
+ base_blueprint_id?: string | null;
38
+ /**
39
+ * (Optional) Name of previously built blueprint to use as a base blueprint for
40
+ * this build. When set, this will load the latest successfully built Blueprint
41
+ * with the given name. Only one of (base_blueprint_id, base_blueprint_name) should
42
+ * be specified.
43
+ */
44
+ base_blueprint_name?: string | null;
45
+ /**
46
+ * (Optional) Arbitrary Docker build args to pass during build.
47
+ */
48
+ build_args?: {
49
+ [key: string]: string;
50
+ } | null;
51
+ /**
52
+ * A build context backed by an Object.
53
+ */
54
+ build_context?: BlueprintBuildParameters.BuildContext | null;
55
+ /**
56
+ * A list of code mounts to be included in the Blueprint.
57
+ */
58
+ code_mounts?: Array<Shared.CodeMountParameters> | null;
59
+ /**
60
+ * Dockerfile contents to be used to build the Blueprint.
61
+ */
62
+ dockerfile?: string | null;
63
+ /**
64
+ * (Optional) Map of paths and file contents to write before setup..
65
+ */
66
+ file_mounts?: {
67
+ [key: string]: string;
68
+ } | null;
69
+ /**
70
+ * LaunchParameters enable you to customize the resources available to your Devbox
71
+ * as well as the environment set up that should be completed before the Devbox is
72
+ * marked as 'running'.
73
+ */
74
+ launch_parameters?: Shared.LaunchParameters | null;
75
+ /**
76
+ * (Optional) User defined metadata for the Blueprint.
77
+ */
78
+ metadata?: {
79
+ [key: string]: string;
80
+ } | null;
81
+ /**
82
+ * (Optional) ID of the network policy to apply during blueprint build. This
83
+ * restricts network access during the build process. This does not affect devboxes
84
+ * created from this blueprint; if you want devboxes created from this blueprint to
85
+ * inherit the network policy, set the network_policy_id on the blueprint launch
86
+ * parameters.
87
+ */
88
+ network_policy_id?: string | null;
89
+ /**
90
+ * (Optional) Map of mount IDs/environment variable names to secret names. Secrets
91
+ * will be available to commands during the build. Secrets are NOT stored in the
92
+ * blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret
93
+ * 'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
94
+ */
95
+ secrets?: {
96
+ [key: string]: string;
97
+ } | null;
98
+ /**
99
+ * (Optional) List of containerized services to include in the Blueprint. These
100
+ * services will be pre-pulled during the build phase for optimized startup
101
+ * performance.
102
+ */
103
+ services?: Array<BlueprintBuildParameters.Service> | null;
104
+ /**
105
+ * A list of commands to run to set up your system.
106
+ */
107
+ system_setup_commands?: Array<string> | null;
108
+ }
109
+ export declare namespace BlueprintBuildParameters {
110
+ /**
111
+ * A build context backed by an Object.
112
+ */
113
+ export interface BuildContext {
114
+ /**
115
+ * The ID of an object, whose contents are to be used as a build context.
116
+ */
117
+ object_id: string;
118
+ type: 'object';
119
+ }
120
+ export interface Service {
121
+ /**
122
+ * The image of the container service.
123
+ */
124
+ image: string;
125
+ /**
126
+ * The name of the container service.
127
+ */
128
+ name: string;
129
+ /**
130
+ * The credentials of the container service.
131
+ */
132
+ credentials?: Service.Credentials | null;
133
+ /**
134
+ * The environment variables of the container service.
135
+ */
136
+ env?: {
137
+ [key: string]: string;
138
+ } | null;
139
+ /**
140
+ * Additional Docker container create options.
141
+ */
142
+ options?: string | null;
143
+ /**
144
+ * The port mappings of the container service. Port mappings are in the format of
145
+ * <host_port>:<container_port>.
146
+ */
147
+ port_mappings?: Array<string> | null;
148
+ }
149
+ namespace Service {
150
+ /**
151
+ * The credentials of the container service.
152
+ */
153
+ interface Credentials {
154
+ /**
155
+ * The password of the container service.
156
+ */
157
+ password: string;
158
+ /**
159
+ * The username of the container service.
160
+ */
161
+ username: string;
162
+ }
163
+ }
164
+ export {};
165
+ }
166
+ export interface BlueprintListView {
167
+ /**
168
+ * List of blueprints matching filter.
169
+ */
170
+ blueprints: Array<BlueprintView>;
171
+ has_more: boolean;
172
+ total_count?: number | null;
173
+ }
174
+ export interface BlueprintPreviewView {
175
+ /**
176
+ * The Dockerfile contents that will built.
177
+ */
178
+ dockerfile: string;
179
+ }
180
+ /**
181
+ * Blueprints are ways to create customized starting points for Devboxes. They
182
+ * allow you to define custom starting points for Devboxes such that environment
183
+ * set up can be cached to improve Devbox boot times.
184
+ *
185
+ * @category Blueprint Types
186
+ */
187
+ export interface BlueprintView {
188
+ /**
189
+ * The id of the Blueprint.
190
+ */
191
+ id: string;
192
+ /**
193
+ * Creation time of the Blueprint (Unix timestamp milliseconds).
194
+ */
195
+ create_time_ms: number;
196
+ /**
197
+ * The name of the Blueprint.
198
+ */
199
+ name: string;
200
+ /**
201
+ * The parameters used to create Blueprint.
202
+ */
203
+ parameters: BlueprintBuildParameters;
204
+ /**
205
+ * The state of the Blueprint.
206
+ */
207
+ state: 'created' | 'deleted';
208
+ /**
209
+ * The status of the Blueprint build.
210
+ */
211
+ status: 'queued' | 'provisioning' | 'building' | 'awaiting_upload' | 'failed' | 'build_complete';
212
+ /**
213
+ * The ID of the base Blueprint.
214
+ */
215
+ base_blueprint_id?: string | null;
216
+ /**
217
+ * Build completion time of the Blueprint (Unix timestamp milliseconds).
218
+ */
219
+ build_finish_time_ms?: number | null;
220
+ /**
221
+ * List of ContainerizedServices available in the Blueprint. Services can be
222
+ * explicitly started when creating a Devbox.
223
+ */
224
+ containerized_services?: Array<BlueprintView.ContainerizedService> | null;
225
+ /**
226
+ * Capabilities that will be available on Devbox.
227
+ */
228
+ devbox_capabilities?: Array<'unknown' | 'docker_in_docker'> | null;
229
+ /**
230
+ * The cause of the failure of the Blueprint build.
231
+ *
232
+ * out_of_memory: The build has run out of memory. Contact support if this is
233
+ * unexpected. out_of_disk: The build has run out of disk. Contact support if this
234
+ * is unexpected. build_failed: The build has failed. Use the dashboard to look at
235
+ * Blueprint build logs for more info.
236
+ */
237
+ failure_reason?: 'out_of_memory' | 'out_of_disk' | 'build_failed' | null;
238
+ /**
239
+ * Whether this Blueprint is publicly accessible to all users.
240
+ */
241
+ is_public?: boolean;
242
+ /**
243
+ * User defined metadata associated with the blueprint.
244
+ */
245
+ metadata?: {
246
+ [key: string]: string;
247
+ } | null;
248
+ }
249
+ export declare namespace BlueprintView {
250
+ export interface ContainerizedService {
251
+ /**
252
+ * The image of the container service.
253
+ */
254
+ image: string;
255
+ /**
256
+ * The name of the container service.
257
+ */
258
+ name: string;
259
+ /**
260
+ * The credentials of the container service.
261
+ */
262
+ credentials?: ContainerizedService.Credentials | null;
263
+ /**
264
+ * The environment variables of the container service.
265
+ */
266
+ env?: {
267
+ [key: string]: string;
268
+ } | null;
269
+ /**
270
+ * Additional Docker container create options.
271
+ */
272
+ options?: string | null;
273
+ /**
274
+ * The port mappings of the container service. Port mappings are in the format of
275
+ * <host_port>:<container_port>.
276
+ */
277
+ port_mappings?: Array<string> | null;
278
+ }
279
+ namespace ContainerizedService {
280
+ /**
281
+ * The credentials of the container service.
282
+ */
283
+ interface Credentials {
284
+ /**
285
+ * The password of the container service.
286
+ */
287
+ password: string;
288
+ /**
289
+ * The username of the container service.
290
+ */
291
+ username: string;
292
+ }
293
+ }
294
+ export {};
295
+ }
296
+ export type BlueprintDeleteResponse = unknown;
297
+ /**
298
+ * Parameters for creating a new Blueprint.
299
+ *
300
+ * @category Blueprint Types
301
+ */
302
+ export interface BlueprintCreateParams {
303
+ /**
304
+ * Name of the Blueprint.
305
+ */
306
+ name: string;
307
+ /**
308
+ * (Optional) ID of previously built blueprint to use as a base blueprint for this
309
+ * build.
310
+ */
311
+ base_blueprint_id?: string | null;
312
+ /**
313
+ * (Optional) Name of previously built blueprint to use as a base blueprint for
314
+ * this build. When set, this will load the latest successfully built Blueprint
315
+ * with the given name. Only one of (base_blueprint_id, base_blueprint_name) should
316
+ * be specified.
317
+ */
318
+ base_blueprint_name?: string | null;
319
+ /**
320
+ * (Optional) Arbitrary Docker build args to pass during build.
321
+ */
322
+ build_args?: {
323
+ [key: string]: string;
324
+ } | null;
325
+ /**
326
+ * A build context backed by an Object.
327
+ */
328
+ build_context?: BlueprintCreateParams.BuildContext | null;
329
+ /**
330
+ * A list of code mounts to be included in the Blueprint.
331
+ */
332
+ code_mounts?: Array<Shared.CodeMountParameters> | null;
333
+ /**
334
+ * Dockerfile contents to be used to build the Blueprint.
335
+ */
336
+ dockerfile?: string | null;
337
+ /**
338
+ * (Optional) Map of paths and file contents to write before setup.
339
+ */
340
+ file_mounts?: {
341
+ [key: string]: string;
342
+ } | null;
343
+ /**
344
+ * LaunchParameters enable you to customize the resources available to your Devbox
345
+ * as well as the environment set up that should be completed before the Devbox is
346
+ * marked as 'running'.
347
+ */
348
+ launch_parameters?: Shared.LaunchParameters | null;
349
+ /**
350
+ * (Optional) User defined metadata for the Blueprint.
351
+ */
352
+ metadata?: {
353
+ [key: string]: string;
354
+ } | null;
355
+ /**
356
+ * (Optional) ID of the network policy to apply during blueprint build. This
357
+ * restricts network access during the build process. This does not affect devboxes
358
+ * created from this blueprint; if you want devboxes created from this blueprint to
359
+ * inherit the network policy, set the network_policy_id on the blueprint launch
360
+ * parameters.
361
+ */
362
+ network_policy_id?: string | null;
363
+ /**
364
+ * (Optional) Map of mount IDs/environment variable names to secret names. Secrets
365
+ * will be available to commands during the build. Secrets are NOT stored in the
366
+ * blueprint image. Example: {"DB_PASS": "DATABASE_PASSWORD"} makes the secret
367
+ * 'DATABASE_PASSWORD' available as environment variable 'DB_PASS'.
368
+ */
369
+ secrets?: {
370
+ [key: string]: string;
371
+ } | null;
372
+ /**
373
+ * (Optional) List of containerized services to include in the Blueprint. These
374
+ * services will be pre-pulled during the build phase for optimized startup
375
+ * performance.
376
+ */
377
+ services?: Array<BlueprintCreateParams.Service> | null;
378
+ /**
379
+ * A list of commands to run to set up your system.
380
+ */
381
+ system_setup_commands?: Array<string> | null;
382
+ }
383
+ export declare namespace BlueprintCreateParams {
384
+ /**
385
+ * A build context backed by an Object.
386
+ */
387
+ export interface BuildContext {
388
+ /**
389
+ * The ID of an object, whose contents are to be used as a build context.
390
+ */
391
+ object_id: string;
392
+ type: 'object';
393
+ }
394
+ export interface Service {
395
+ /**
396
+ * The image of the container service.
397
+ */
398
+ image: string;
399
+ /**
400
+ * The name of the container service.
401
+ */
402
+ name: string;
403
+ /**
404
+ * The credentials of the container service.
405
+ */
406
+ credentials?: Service.Credentials | null;
407
+ /**
408
+ * The environment variables of the container service.
409
+ */
410
+ env?: {
411
+ [key: string]: string;
412
+ } | null;
413
+ /**
414
+ * Additional Docker container create options.
415
+ */
416
+ options?: string | null;
417
+ /**
418
+ * The port mappings of the container service. Port mappings are in the format of
419
+ * <host_port>:<container_port>.
420
+ */
421
+ port_mappings?: Array<string> | null;
422
+ }
423
+ namespace Service {
424
+ /**
425
+ * The credentials of the container service.
426
+ */
427
+ interface Credentials {
428
+ /**
429
+ * The password of the container service.
430
+ */
431
+ password: string;
432
+ /**
433
+ * The username of the container service.
434
+ */
435
+ username: string;
436
+ }
437
+ }
438
+ export {};
439
+ }
440
+ export interface BlueprintListParams extends BlueprintsCursorIDPageParams {
441
+ /**
442
+ * If true (default), includes total_count in the response. Set to false to skip
443
+ * the count query for better performance on large datasets.
444
+ */
445
+ include_total_count?: boolean;
446
+ /**
447
+ * Filter by name
448
+ */
449
+ name?: string;
450
+ /**
451
+ * Filter by build status (queued, provisioning, building, failed, build_complete)
452
+ */
453
+ status?: string;
454
+ }
455
+ export interface BlueprintListPublicParams extends BlueprintsCursorIDPageParams {
456
+ /**
457
+ * If true (default), includes total_count in the response. Set to false to skip
458
+ * the count query for better performance on large datasets.
459
+ */
460
+ include_total_count?: boolean;
461
+ /**
462
+ * Filter by name
463
+ */
464
+ name?: string;
465
+ /**
466
+ * Filter by build status (queued, provisioning, building, failed, build_complete)
467
+ */
468
+ status?: string;
469
+ }
470
+ export interface DevboxLogsListView {
471
+ /**
472
+ * List of logs for the given devbox.
473
+ */
474
+ logs: Array<DevboxLogsListView.Log>;
475
+ }
476
+ export declare namespace DevboxLogsListView {
477
+ interface Log {
478
+ /**
479
+ * Log line severity level.
480
+ */
481
+ level: string;
482
+ /**
483
+ * The source of the log.
484
+ */
485
+ source: 'setup_commands' | 'entrypoint' | 'exec' | 'files' | 'stats' | 'kmsg';
486
+ /**
487
+ * Time of log (Unix timestamp milliseconds).
488
+ */
489
+ timestamp_ms: number;
490
+ /**
491
+ * The Command Executed
492
+ */
493
+ cmd?: string | null;
494
+ /**
495
+ * Identifier of the associated command the log is sourced from.
496
+ */
497
+ cmd_id?: string | null;
498
+ /**
499
+ * The Exit Code of the command
500
+ */
501
+ exit_code?: number | null;
502
+ /**
503
+ * Log line message.
504
+ */
505
+ message?: string | null;
506
+ /**
507
+ * The Shell name the cmd executed in.
508
+ */
509
+ shell_name?: string | null;
510
+ }
511
+ }
512
+ export interface LogListParams {
513
+ /**
514
+ * ID of execution to filter logs by.
515
+ */
516
+ execution_id?: string;
517
+ /**
518
+ * Shell Name to filter logs by.
519
+ */
520
+ shell_name?: string;
521
+ }
522
+ //# sourceMappingURL=blueprint-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint-types.d.ts","sourceRoot":"","sources":["../src/blueprint-types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CAClC;AACD,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE;QACT,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACzB,GAAG,IAAI,CAAC;IACT;;OAEG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7D;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;IACvD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MA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;AACD,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,4 @@
1
+ // Type definitions derived from @runloop/api-client 2.0.0 (https://github.com/runloopai/api-client-ts),
2
+ // Copyright 2026 runloop, MIT licence. See NOTICE. Not affiliated with Runloop.
3
+ export {};
4
+ //# sourceMappingURL=blueprint-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint-types.js","sourceRoot":"","sources":["../src/blueprint-types.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,gFAAgF"}
@@ -0,0 +1,71 @@
1
+ import type { BlueprintBuildLogsListView, BlueprintListView, BlueprintView } from "./blueprint-types.js";
2
+ import type { Runloop, RequestOptions } from "./client.js";
3
+ import type { DevboxCreateParams } from "./types.js";
4
+ import type { Devbox } from "./sdk.js";
5
+ export interface BlueprintCreateInput {
6
+ name: string;
7
+ dockerfile?: string | null;
8
+ system_setup_commands?: string[] | null;
9
+ file_mounts?: Record<string, string> | null;
10
+ base_blueprint_name?: string | null;
11
+ base_blueprint_id?: string | null;
12
+ build_args?: Record<string, string> | null;
13
+ /** A storage object from `sdk.storageObject.uploadFromDir`, or its `asBuildContext()` value. */
14
+ build_context?: {
15
+ type: "object";
16
+ object_id: string;
17
+ } | {
18
+ id: string;
19
+ asBuildContext(): {
20
+ type: "object";
21
+ object_id: string;
22
+ };
23
+ } | null;
24
+ launch_parameters?: DevboxCreateParams["launch_parameters"];
25
+ metadata?: Record<string, string> | null;
26
+ [k: string]: unknown;
27
+ }
28
+ export declare class Blueprints {
29
+ private readonly client;
30
+ constructor(client: Runloop);
31
+ /** A template name or id → the id/name `POST /sandboxes` takes: built-ins pass through, custom names resolve to the newest matching `tpl_` id. */
32
+ resolveTemplate(nameOrId: string): Promise<string>;
33
+ private listTemplates;
34
+ create(params: BlueprintCreateInput, _options?: RequestOptions): Promise<BlueprintView>;
35
+ /** Delete a template once its (unwanted) build has finished; a building template cannot be deleted. Best effort. */
36
+ private discardWhenDone;
37
+ retrieve(id: string, _options?: RequestOptions): Promise<BlueprintView>;
38
+ list(_params?: {
39
+ limit?: number;
40
+ name?: string;
41
+ }, _options?: RequestOptions): Promise<BlueprintListView>;
42
+ delete(id: string, _options?: RequestOptions): Promise<unknown>;
43
+ logs(id: string, _options?: RequestOptions): Promise<BlueprintBuildLogsListView>;
44
+ awaitBuildComplete(id: string, options?: RequestOptions): Promise<BlueprintView>;
45
+ createAndAwaitBuildComplete(params: BlueprintCreateInput, options?: RequestOptions): Promise<BlueprintView>;
46
+ }
47
+ /** Object-layer handle for a blueprint. */
48
+ export declare class Blueprint {
49
+ private readonly client;
50
+ private readonly _id;
51
+ private readonly makeDevbox;
52
+ constructor(client: Runloop, _id: string, makeDevbox: (params: DevboxCreateParams) => Promise<Devbox>);
53
+ get id(): string;
54
+ getInfo(options?: RequestOptions): Promise<BlueprintView>;
55
+ logs(options?: RequestOptions): Promise<BlueprintBuildLogsListView>;
56
+ delete(options?: RequestOptions): Promise<unknown>;
57
+ createDevbox(params?: DevboxCreateParams): Promise<Devbox>;
58
+ }
59
+ export declare class BlueprintOps {
60
+ private readonly client;
61
+ private readonly makeDevbox;
62
+ constructor(client: Runloop, makeDevbox: (params: DevboxCreateParams) => Promise<Devbox>);
63
+ /** Build a blueprint and wait for it (deleted again if the build fails). */
64
+ create(params: BlueprintCreateInput, options?: RequestOptions): Promise<Blueprint>;
65
+ fromId(id: string): Blueprint;
66
+ list(params?: {
67
+ limit?: number;
68
+ name?: string;
69
+ }): Promise<Blueprint[]>;
70
+ }
71
+ //# sourceMappingURL=blueprints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprints.d.ts","sourceRoot":"","sources":["../src/blueprints.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,C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