freestyle-sandboxes 0.0.75 → 0.0.77

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.0.75",
3
+ "version": "0.0.77",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -70,6 +70,34 @@ export type {
70
70
  DeploymentBuildOptions,
71
71
  } from "../openapi/index.ts";
72
72
 
73
+ /**
74
+ * Create a new git repository with a single commit from a static import.
75
+ */
76
+ type CreateGitRepositoryImport = {
77
+ /**
78
+ * Create a new git repository with a single commit from a static import.
79
+ */
80
+ import: sandbox_openapi.CreateRepoImport;
81
+ /**
82
+ * Create a git repository from another git reopsitory
83
+ */
84
+ source?: never;
85
+ };
86
+
87
+ /**
88
+ * Create a git repository from another git reopsitory
89
+ */
90
+ type CreateGitRepositorySource = {
91
+ /**
92
+ * Create a git repository from another git reopsitory
93
+ */
94
+ source: sandbox_openapi.CreateRepoSource;
95
+ /**
96
+ * Create a new git repository with a single commit from a static import.
97
+ */
98
+ import?: never;
99
+ };
100
+
73
101
  type Options = {
74
102
  /**
75
103
  * The base URL for the API.
@@ -405,22 +433,21 @@ export class FreestyleSandboxes {
405
433
  name,
406
434
  public: pub = false,
407
435
  source,
436
+ import: _import,
408
437
  }: {
409
- name: string;
438
+ name?: string;
410
439
  public?: boolean;
411
- source?: {
412
- type: "git";
413
- url: string;
414
- branch?: string;
415
- depth?: number;
416
- };
417
- }): Promise<CreateRepositoryResponseSuccess> {
440
+ } & (
441
+ | CreateGitRepositorySource
442
+ | CreateGitRepositoryImport
443
+ )): Promise<CreateRepositoryResponseSuccess> {
418
444
  const response = await sandbox_openapi.handleCreateRepo({
419
445
  client: this.client,
420
446
  body: {
421
447
  name,
422
448
  public: pub,
423
449
  source,
450
+ import: _import,
424
451
  },
425
452
  });
426
453