freestyle-sandboxes 0.0.3 → 0.0.4

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.
@@ -1,5 +1,5 @@
1
1
  import * as ai from 'ai';
2
- import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-BoJEFWW-.js';
2
+ import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-CKNcEsUr.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as ai from 'ai';
2
- import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-BoJEFWW-.js';
2
+ import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-CKNcEsUr.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
- import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse } from './types.gen-BoJEFWW-.js';
1
+ import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse } from './types.gen-CKNcEsUr.js';
2
+ export { g as FreestyleCloudstateDeployConfiguration, h as FreestyleCloudstateDeployErrorResponse, i as FreestyleDeployWebErrorResponse, j as FreestyleDeployWebPayload, k as FreestyleExecureScriptResultError, l as FreestyleExecuteScriptParams, m as FreestyleLogResponseObject, q as HandleBackupCloudstateError, n as HandleDeployCloudstateData, p as HandleDeployCloudstateError, o as HandleDeployCloudstateResponse, u as HandleDeployWebData, w as HandleDeployWebError, v as HandleDeployWebResponse, r as HandleExecuteScriptData, t as HandleExecuteScriptError, s as HandleExecuteScriptResponse, x as HandleGetLogsError } from './types.gen-CKNcEsUr.js';
2
3
 
3
4
  declare class FreestyleSandboxes {
4
5
  private client;
@@ -40,4 +41,4 @@ declare class FreestyleSandboxes {
40
41
  getWebLogs(id: string): Promise<HandleGetLogsResponse>;
41
42
  }
42
43
 
43
- export { FreestyleSandboxes };
44
+ export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecureScriptResultSuccess, FreestyleExecuteScriptParamsConfiguration, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleGetLogsResponse };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse } from './types.gen-BoJEFWW-.js';
1
+ import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecureScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse } from './types.gen-CKNcEsUr.js';
2
+ export { g as FreestyleCloudstateDeployConfiguration, h as FreestyleCloudstateDeployErrorResponse, i as FreestyleDeployWebErrorResponse, j as FreestyleDeployWebPayload, k as FreestyleExecureScriptResultError, l as FreestyleExecuteScriptParams, m as FreestyleLogResponseObject, q as HandleBackupCloudstateError, n as HandleDeployCloudstateData, p as HandleDeployCloudstateError, o as HandleDeployCloudstateResponse, u as HandleDeployWebData, w as HandleDeployWebError, v as HandleDeployWebResponse, r as HandleExecuteScriptData, t as HandleExecuteScriptError, s as HandleExecuteScriptResponse, x as HandleGetLogsError } from './types.gen-CKNcEsUr.js';
2
3
 
3
4
  declare class FreestyleSandboxes {
4
5
  private client;
@@ -40,4 +41,4 @@ declare class FreestyleSandboxes {
40
41
  getWebLogs(id: string): Promise<HandleGetLogsResponse>;
41
42
  }
42
43
 
43
- export { FreestyleSandboxes };
44
+ export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecureScriptResultSuccess, FreestyleExecuteScriptParamsConfiguration, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleGetLogsResponse };
@@ -0,0 +1,128 @@
1
+ type FreestyleCloudstateDeployConfiguration = {
2
+ /**
3
+ * ID of the project to deploy, if not provided will create a new project
4
+ */
5
+ projectId?: string | null;
6
+ /**
7
+ * The environment variables that the cloudstate deploy can access
8
+ */
9
+ envVars?: {
10
+ [key: string]: string;
11
+ };
12
+ };
13
+ type FreestyleCloudstateDeployErrorResponse = {
14
+ message: string;
15
+ };
16
+ type FreestyleCloudstateDeployRequest = {
17
+ classes: string;
18
+ config?: FreestyleCloudstateDeployConfiguration;
19
+ };
20
+ type FreestyleCloudstateDeploySuccessResponse = {
21
+ /**
22
+ * The id of the project deployed to
23
+ */
24
+ projectId: string;
25
+ };
26
+ type FreestyleDeployWebConfiguration = {
27
+ /**
28
+ * The entrypoint file for the website
29
+ */
30
+ entrypoint?: string | null;
31
+ /**
32
+ * The custom domains for the website, eg. [\"subdomain.yourwebsite.com\"]. You may not include *.style.dev domains here, those are reserved for projectIds
33
+ */
34
+ domains?: Array<string> | null;
35
+ /**
36
+ * The project id to deploy to, if not provided will create a new project, may be used to provision a new project with a specific id if that id is available
37
+ */
38
+ projectId?: string | null;
39
+ /**
40
+ * Node Modules to install for the website, a map of package names to versions, e.g. { \"express\": \"4.17.1\" }. If this and a package-lock.json are provided, the package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock is also provided, the versions here will override the versions in those lock files.
41
+ */
42
+ nodeModules?: {
43
+ [key: string]: string;
44
+ } | null;
45
+ /**
46
+ * The environment variables that the website can access
47
+ * e.g. { \"RESEND_API_KEY\": \"re_123456789\" }
48
+ */
49
+ envVars?: {
50
+ [key: string]: string;
51
+ } | null;
52
+ };
53
+ type FreestyleDeployWebErrorResponse = {
54
+ message: string;
55
+ };
56
+ type FreestyleDeployWebPayload = {
57
+ /**
58
+ * The files to deploy, a map of file paths to file contents, e.g. { \"index.js\": \"your main", \"file2.js\": \"your helper\" }
59
+ *
60
+ * **Do not include node modules in this bundle, they will not work**. Instead, includes a package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock, the node modules for the project will be installed from that lock file, or use the node_modules field in the configuration to specify the node modules to install.
61
+ */
62
+ files: {
63
+ [key: string]: string;
64
+ };
65
+ config?: FreestyleDeployWebConfiguration;
66
+ };
67
+ type FreestyleDeployWebSuccessResponse = {
68
+ projectId: string;
69
+ };
70
+ type FreestyleExecureScriptResultError = {
71
+ error: string;
72
+ };
73
+ type FreestyleExecureScriptResultSuccess = {
74
+ result: unknown;
75
+ };
76
+ type FreestyleExecuteScriptParams = {
77
+ /**
78
+ * The JavaScript or TypeScript script to execute
79
+ */
80
+ script: string;
81
+ config?: FreestyleExecuteScriptParamsConfiguration;
82
+ };
83
+ type FreestyleExecuteScriptParamsConfiguration = {
84
+ /**
85
+ * The environment variables to set for the script
86
+ */
87
+ envVars?: {
88
+ [key: string]: string;
89
+ };
90
+ /**
91
+ * The node modules to install for the script
92
+ */
93
+ nodeModules?: {
94
+ [key: string]: string;
95
+ };
96
+ /**
97
+ * Tags for you to organize your scripts, useful for tracking what you're running
98
+ */
99
+ tags?: Array<string>;
100
+ /**
101
+ * The script timeout
102
+ */
103
+ timeout?: string | null;
104
+ };
105
+ type FreestyleLogResponseObject = {
106
+ message: string;
107
+ };
108
+ type HandleDeployCloudstateData = {
109
+ body: FreestyleCloudstateDeployRequest;
110
+ };
111
+ type HandleDeployCloudstateResponse = FreestyleCloudstateDeploySuccessResponse;
112
+ type HandleDeployCloudstateError = FreestyleCloudstateDeployErrorResponse;
113
+ type HandleBackupCloudstateResponse = Array<number>;
114
+ type HandleBackupCloudstateError = unknown;
115
+ type HandleExecuteScriptData = {
116
+ body: FreestyleExecuteScriptParams;
117
+ };
118
+ type HandleExecuteScriptResponse = FreestyleExecureScriptResultSuccess;
119
+ type HandleExecuteScriptError = FreestyleExecureScriptResultError;
120
+ type HandleDeployWebData = {
121
+ body: FreestyleDeployWebPayload;
122
+ };
123
+ type HandleDeployWebResponse = FreestyleDeployWebSuccessResponse;
124
+ type HandleDeployWebError = FreestyleDeployWebErrorResponse;
125
+ type HandleGetLogsResponse = Array<FreestyleLogResponseObject>;
126
+ type HandleGetLogsError = unknown;
127
+
128
+ export type { FreestyleExecuteScriptParamsConfiguration as F, HandleBackupCloudstateResponse as H, FreestyleExecureScriptResultSuccess as a, FreestyleDeployWebConfiguration as b, FreestyleDeployWebSuccessResponse as c, FreestyleCloudstateDeployRequest as d, FreestyleCloudstateDeploySuccessResponse as e, HandleGetLogsResponse as f, FreestyleCloudstateDeployConfiguration as g, FreestyleCloudstateDeployErrorResponse as h, FreestyleDeployWebErrorResponse as i, FreestyleDeployWebPayload as j, FreestyleExecureScriptResultError as k, FreestyleExecuteScriptParams as l, FreestyleLogResponseObject as m, HandleDeployCloudstateData as n, HandleDeployCloudstateResponse as o, HandleDeployCloudstateError as p, HandleBackupCloudstateError as q, HandleExecuteScriptData as r, HandleExecuteScriptResponse as s, HandleExecuteScriptError as t, HandleDeployWebData as u, HandleDeployWebResponse as v, HandleDeployWebError as w, HandleGetLogsError as x };
@@ -1,153 +1,155 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  export type FreestyleCloudstateDeployConfiguration = {
4
- /**
5
- * ID of the project to deploy, if not provided will create a new project
6
- */
7
- projectId?: (string) | null;
8
- /**
9
- * The environment variables that the cloudstate deploy can access
10
- */
11
- envVars?: {
12
- [key: string]: (string);
13
- };
4
+ /**
5
+ * ID of the project to deploy, if not provided will create a new project
6
+ */
7
+ projectId?: string | null;
8
+ /**
9
+ * The environment variables that the cloudstate deploy can access
10
+ */
11
+ envVars?: {
12
+ [key: string]: string;
13
+ };
14
14
  };
15
15
 
16
16
  export type FreestyleCloudstateDeployErrorResponse = {
17
- message: string;
17
+ message: string;
18
18
  };
19
19
 
20
20
  export type FreestyleCloudstateDeployRequest = {
21
- classes: string;
22
- config?: FreestyleCloudstateDeployConfiguration;
21
+ classes: string;
22
+ config?: FreestyleCloudstateDeployConfiguration;
23
23
  };
24
24
 
25
25
  export type FreestyleCloudstateDeploySuccessResponse = {
26
- /**
27
- * The id of the project deployed to
28
- */
29
- projectId: string;
26
+ /**
27
+ * The id of the project deployed to
28
+ */
29
+ projectId: string;
30
30
  };
31
31
 
32
32
  export type FreestyleDeployWebConfiguration = {
33
- /**
34
- * The entrypoint file for the website
35
- */
36
- entrypoint?: (string) | null;
37
- /**
38
- * The custom domains for the website, eg. [\"subdomain.yourwebsite.com\"]. You may not include *.style.dev domains here, those are reserved for projectIds
39
- */
40
- domains?: Array<(string)> | null;
41
- /**
42
- * The project id to deploy to, if not provided will create a new project, may be used to provision a new project with a specific id if that id is available
43
- */
44
- projectId?: (string) | null;
45
- /**
46
- * Node Modules to install for the website, a map of package names to versions, e.g. { \"express\": \"4.17.1\" }. If this and a package-lock.json are provided, the package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock is also provided, the versions here will override the versions in those lock files.
47
- */
48
- nodeModules?: {
49
- [key: string]: (string);
50
- } | null;
51
- /**
52
- * The environment variables that the website can access
53
- * e.g. { \"RESEND_API_KEY\": \"re_123456789\" }
54
- */
55
- envVars?: {
56
- [key: string]: (string);
57
- } | null;
33
+ /**
34
+ * The entrypoint file for the website
35
+ */
36
+ entrypoint?: string | null;
37
+ /**
38
+ * The custom domains for the website, eg. [\"subdomain.yourwebsite.com\"]. You may not include *.style.dev domains here, those are reserved for projectIds
39
+ */
40
+ domains?: Array<string> | null;
41
+ /**
42
+ * The project id to deploy to, if not provided will create a new project, may be used to provision a new project with a specific id if that id is available
43
+ */
44
+ projectId?: string | null;
45
+ /**
46
+ * Node Modules to install for the website, a map of package names to versions, e.g. { \"express\": \"4.17.1\" }. If this and a package-lock.json are provided, the package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock is also provided, the versions here will override the versions in those lock files.
47
+ */
48
+ nodeModules?: {
49
+ [key: string]: string;
50
+ } | null;
51
+ /**
52
+ * The environment variables that the website can access
53
+ * e.g. { \"RESEND_API_KEY\": \"re_123456789\" }
54
+ */
55
+ envVars?: {
56
+ [key: string]: string;
57
+ } | null;
58
58
  };
59
59
 
60
60
  export type FreestyleDeployWebErrorResponse = {
61
- message: string;
61
+ message: string;
62
62
  };
63
63
 
64
64
  export type FreestyleDeployWebPayload = {
65
- /**
66
- * The files to deploy, a map of file paths to file contents, e.g. { \"index.js\": \"your main", \"file2.js\": \"your helper\" }
67
- *
68
- * **Do not include node modules in this bundle, they will not work**. Instead, includes a package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock, the node modules for the project will be installed from that lock file, or use the node_modules field in the configuration to specify the node modules to install.
69
- */
70
- files: {
71
- [key: string]: (string);
72
- };
73
- config?: FreestyleDeployWebConfiguration;
65
+ /**
66
+ * The files to deploy, a map of file paths to file contents, e.g. { \"index.js\": \"your main", \"file2.js\": \"your helper\" }
67
+ *
68
+ * **Do not include node modules in this bundle, they will not work**. Instead, includes a package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock, the node modules for the project will be installed from that lock file, or use the node_modules field in the configuration to specify the node modules to install.
69
+ */
70
+ files: {
71
+ [key: string]: string;
72
+ };
73
+ config?: FreestyleDeployWebConfiguration;
74
74
  };
75
75
 
76
76
  export type FreestyleDeployWebSuccessResponse = {
77
- projectId: string;
77
+ projectId: string;
78
78
  };
79
79
 
80
80
  export type FreestyleExecureScriptResultError = {
81
- error: string;
81
+ error: string;
82
82
  };
83
83
 
84
84
  export type FreestyleExecureScriptResultSuccess = {
85
- result: unknown;
85
+ result: unknown;
86
86
  };
87
87
 
88
88
  export type FreestyleExecuteScriptParams = {
89
- /**
90
- * The JavaScript or TypeScript script to execute
91
- */
92
- script: string;
93
- config?: FreestyleExecuteScriptParamsConfiguration;
89
+ /**
90
+ * The JavaScript or TypeScript script to execute
91
+ */
92
+ script: string;
93
+ config?: FreestyleExecuteScriptParamsConfiguration;
94
94
  };
95
95
 
96
96
  export type FreestyleExecuteScriptParamsConfiguration = {
97
- /**
98
- * The environment variables to set for the script
99
- */
100
- envVars?: {
101
- [key: string]: (string);
102
- };
103
- /**
104
- * The node modules to install for the script
105
- */
106
- nodeModules?: {
107
- [key: string]: (string);
108
- };
109
- /**
110
- * Tags for you to organize your scripts, useful for tracking what you're running
111
- */
112
- tags?: Array<(string)>;
113
- /**
114
- * The script timeout
115
- */
116
- timeout?: (string) | null;
97
+ /**
98
+ * The environment variables to set for the script
99
+ */
100
+ envVars?: {
101
+ [key: string]: string;
102
+ };
103
+ /**
104
+ * The node modules to install for the script
105
+ */
106
+ nodeModules?: {
107
+ [key: string]: string;
108
+ };
109
+ /**
110
+ * Tags for you to organize your scripts, useful for tracking what you're running
111
+ */
112
+ tags?: Array<string>;
113
+ /**
114
+ * The script timeout
115
+ */
116
+ timeout?: string | null;
117
117
  };
118
118
 
119
119
  export type FreestyleLogResponseObject = {
120
- message: string;
120
+ message: string;
121
121
  };
122
122
 
123
123
  export type HandleDeployCloudstateData = {
124
- body: FreestyleCloudstateDeployRequest;
124
+ body: FreestyleCloudstateDeployRequest;
125
125
  };
126
126
 
127
- export type HandleDeployCloudstateResponse = (FreestyleCloudstateDeploySuccessResponse);
127
+ export type HandleDeployCloudstateResponse =
128
+ FreestyleCloudstateDeploySuccessResponse;
128
129
 
129
- export type HandleDeployCloudstateError = (FreestyleCloudstateDeployErrorResponse);
130
+ export type HandleDeployCloudstateError =
131
+ FreestyleCloudstateDeployErrorResponse;
130
132
 
131
- export type HandleBackupCloudstateResponse = (Array<(number)>);
133
+ export type HandleBackupCloudstateResponse = Array<number>;
132
134
 
133
- export type HandleBackupCloudstateError = (unknown);
135
+ export type HandleBackupCloudstateError = unknown;
134
136
 
135
137
  export type HandleExecuteScriptData = {
136
- body: FreestyleExecuteScriptParams;
138
+ body: FreestyleExecuteScriptParams;
137
139
  };
138
140
 
139
- export type HandleExecuteScriptResponse = (FreestyleExecureScriptResultSuccess);
141
+ export type HandleExecuteScriptResponse = FreestyleExecureScriptResultSuccess;
140
142
 
141
- export type HandleExecuteScriptError = (FreestyleExecureScriptResultError);
143
+ export type HandleExecuteScriptError = FreestyleExecureScriptResultError;
142
144
 
143
145
  export type HandleDeployWebData = {
144
- body: FreestyleDeployWebPayload;
146
+ body: FreestyleDeployWebPayload;
145
147
  };
146
148
 
147
- export type HandleDeployWebResponse = (FreestyleDeployWebSuccessResponse);
149
+ export type HandleDeployWebResponse = FreestyleDeployWebSuccessResponse;
148
150
 
149
- export type HandleDeployWebError = (FreestyleDeployWebErrorResponse);
151
+ export type HandleDeployWebError = FreestyleDeployWebErrorResponse;
150
152
 
151
- export type HandleGetLogsResponse = (Array<FreestyleLogResponseObject>);
153
+ export type HandleGetLogsResponse = Array<FreestyleLogResponseObject>;
152
154
 
153
- export type HandleGetLogsError = unknown;
155
+ export type HandleGetLogsError = unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -126,3 +126,5 @@ export class FreestyleSandboxes {
126
126
  }
127
127
  }
128
128
  }
129
+
130
+ export * from "../openapi/types.gen.ts";