sandbox0 0.3.5 → 0.3.7
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/dist/apispec/src/apis/FunctionsApi.d.ts +87 -0
- package/dist/apispec/src/apis/FunctionsApi.d.ts.map +1 -0
- package/dist/apispec/src/apis/FunctionsApi.js +231 -0
- package/dist/apispec/src/apis/SandboxesApi.d.ts +28 -1
- package/dist/apispec/src/apis/SandboxesApi.d.ts.map +1 -1
- package/dist/apispec/src/apis/SandboxesApi.js +76 -1
- package/dist/apispec/src/apis/index.d.ts +1 -0
- package/dist/apispec/src/apis/index.d.ts.map +1 -1
- package/dist/apispec/src/apis/index.js +1 -0
- package/dist/apispec/src/models/Function.d.ts +81 -0
- package/dist/apispec/src/models/Function.d.ts.map +1 -0
- package/dist/apispec/src/models/Function.js +71 -0
- package/dist/apispec/src/models/FunctionAlias.d.ts +63 -0
- package/dist/apispec/src/models/FunctionAlias.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionAlias.js +61 -0
- package/dist/apispec/src/models/FunctionAliasUpdateRequest.d.ts +33 -0
- package/dist/apispec/src/models/FunctionAliasUpdateRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionAliasUpdateRequest.js +43 -0
- package/dist/apispec/src/models/FunctionCreateRequest.d.ts +40 -0
- package/dist/apispec/src/models/FunctionCreateRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionCreateRequest.js +46 -0
- package/dist/apispec/src/models/FunctionRecord.d.ts +93 -0
- package/dist/apispec/src/models/FunctionRecord.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionRecord.js +79 -0
- package/dist/apispec/src/models/FunctionRestoreMount.d.ts +39 -0
- package/dist/apispec/src/models/FunctionRestoreMount.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionRestoreMount.js +47 -0
- package/dist/apispec/src/models/FunctionRevision.d.ts +113 -0
- package/dist/apispec/src/models/FunctionRevision.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionRevision.js +87 -0
- package/dist/apispec/src/models/FunctionRevisionCreateRequest.d.ts +40 -0
- package/dist/apispec/src/models/FunctionRevisionCreateRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionRevisionCreateRequest.js +46 -0
- package/dist/apispec/src/models/FunctionSourceRequest.d.ts +39 -0
- package/dist/apispec/src/models/FunctionSourceRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/FunctionSourceRequest.js +47 -0
- package/dist/apispec/src/models/Sandbox.d.ts +14 -0
- package/dist/apispec/src/models/Sandbox.d.ts.map +1 -1
- package/dist/apispec/src/models/Sandbox.js +6 -0
- package/dist/apispec/src/models/SandboxAppService.d.ts +66 -0
- package/dist/apispec/src/models/SandboxAppService.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxAppService.js +60 -0
- package/dist/apispec/src/models/SandboxAppServiceHealth.d.ts +33 -0
- package/dist/apispec/src/models/SandboxAppServiceHealth.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxAppServiceHealth.js +41 -0
- package/dist/apispec/src/models/SandboxAppServiceIngress.d.ts +40 -0
- package/dist/apispec/src/models/SandboxAppServiceIngress.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxAppServiceIngress.js +46 -0
- package/dist/apispec/src/models/SandboxAppServiceRoute.d.ts +84 -0
- package/dist/apispec/src/models/SandboxAppServiceRoute.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxAppServiceRoute.js +64 -0
- package/dist/apispec/src/models/SandboxAppServiceRuntime.d.ts +68 -0
- package/dist/apispec/src/models/SandboxAppServiceRuntime.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxAppServiceRuntime.js +59 -0
- package/dist/apispec/src/models/SandboxAppServiceView.d.ts +78 -0
- package/dist/apispec/src/models/SandboxAppServiceView.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxAppServiceView.js +66 -0
- package/dist/apispec/src/models/SandboxConfig.d.ts +7 -0
- package/dist/apispec/src/models/SandboxConfig.d.ts.map +1 -1
- package/dist/apispec/src/models/SandboxConfig.js +3 -0
- package/dist/apispec/src/models/SandboxServicesUpdateRequest.d.ts +34 -0
- package/dist/apispec/src/models/SandboxServicesUpdateRequest.d.ts.map +1 -0
- package/dist/apispec/src/models/SandboxServicesUpdateRequest.js +44 -0
- package/dist/apispec/src/models/SandboxUpdateConfig.d.ts +7 -0
- package/dist/apispec/src/models/SandboxUpdateConfig.d.ts.map +1 -1
- package/dist/apispec/src/models/SandboxUpdateConfig.js +3 -0
- package/dist/apispec/src/models/SuccessFunctionAliasResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionAliasResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionAliasResponse.js +46 -0
- package/dist/apispec/src/models/SuccessFunctionAliasResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessFunctionAliasResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionAliasResponseAllOfData.js +44 -0
- package/dist/apispec/src/models/SuccessFunctionCreateResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionCreateResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionCreateResponse.js +46 -0
- package/dist/apispec/src/models/SuccessFunctionCreateResponseAllOfData.d.ts +48 -0
- package/dist/apispec/src/models/SuccessFunctionCreateResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionCreateResponseAllOfData.js +54 -0
- package/dist/apispec/src/models/SuccessFunctionListResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionListResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionListResponse.js +46 -0
- package/dist/apispec/src/models/SuccessFunctionListResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessFunctionListResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionListResponseAllOfData.js +44 -0
- package/dist/apispec/src/models/SuccessFunctionResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionResponse.js +46 -0
- package/dist/apispec/src/models/SuccessFunctionResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessFunctionResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionResponseAllOfData.js +44 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionCreateResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionCreateResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionCreateResponse.js +46 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionCreateResponseAllOfData.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionCreateResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionCreateResponseAllOfData.js +48 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionListResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionListResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionListResponse.js +46 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionListResponseAllOfData.d.ts +34 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionListResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessFunctionRevisionListResponseAllOfData.js +44 -0
- package/dist/apispec/src/models/SuccessSandboxServicesResponse.d.ts +40 -0
- package/dist/apispec/src/models/SuccessSandboxServicesResponse.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessSandboxServicesResponse.js +46 -0
- package/dist/apispec/src/models/SuccessSandboxServicesResponseAllOfData.d.ts +40 -0
- package/dist/apispec/src/models/SuccessSandboxServicesResponseAllOfData.d.ts.map +1 -0
- package/dist/apispec/src/models/SuccessSandboxServicesResponseAllOfData.js +48 -0
- package/dist/apispec/src/models/WarmProcessSpec.d.ts +2 -2
- package/dist/apispec/src/models/WarmProcessSpec.js +2 -2
- package/dist/apispec/src/models/index.d.ts +30 -0
- package/dist/apispec/src/models/index.d.ts.map +1 -1
- package/dist/apispec/src/models/index.js +30 -0
- package/dist/apispec_compat.d.ts +1535 -1
- package/dist/apispec_compat.d.ts.map +1 -1
- package/dist/apispec_compat.js +10 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/models.d.ts +5 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/resources/functions.d.ts +31 -0
- package/dist/resources/functions.d.ts.map +1 -0
- package/dist/resources/functions.js +79 -0
- package/dist/sandbox_services.d.ts +10 -0
- package/dist/sandbox_services.d.ts.map +1 -0
- package/dist/sandbox_services.js +30 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apispec_compat.d.ts","sourceRoot":"","sources":["../src/apispec_compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,aAAa,MAAM,uBAAuB,CAAC;AAUvD,eAAO,MAAM,OAAO,sBAA8B,CAAC;AACnD,eAAO,MAAM,IAAI,mBAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"apispec_compat.d.ts","sourceRoot":"","sources":["../src/apispec_compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,aAAa,MAAM,uBAAuB,CAAC;AAUvD,eAAO,MAAM,OAAO,sBAA8B,CAAC;AACnD,eAAO,MAAM,IAAI,mBAA2B,CAAC;AAK7C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOlB,CAAC"}
|
package/dist/apispec_compat.js
CHANGED
|
@@ -7,4 +7,13 @@ function unwrapModule(mod) {
|
|
|
7
7
|
}
|
|
8
8
|
export const runtime = unwrapModule(runtimeImport);
|
|
9
9
|
export const apis = unwrapModule(apisImport);
|
|
10
|
-
|
|
10
|
+
const rawModels = unwrapModule(modelsImport);
|
|
11
|
+
const warmProcessSpecTypeEnum = rawModels.WarmProcessSpecTypeEnum;
|
|
12
|
+
export const models = {
|
|
13
|
+
...rawModels,
|
|
14
|
+
WarmProcessSpecTypeEnum: {
|
|
15
|
+
...warmProcessSpecTypeEnum,
|
|
16
|
+
Repl: warmProcessSpecTypeEnum.Repl ?? warmProcessSpecTypeEnum.WarmProcessSpecTypeRepl,
|
|
17
|
+
Cmd: warmProcessSpecTypeEnum.Cmd ?? warmProcessSpecTypeEnum.WarmProcessSpecTypeCmd,
|
|
18
|
+
},
|
|
19
|
+
};
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as runtimeTypes from "./apispec/src/runtime.js";
|
|
2
2
|
import type * as apisTypes from "./apispec/src/apis/index.js";
|
|
3
3
|
import { CredentialSources } from "./resources/credential_sources.js";
|
|
4
|
+
import { Functions } from "./resources/functions.js";
|
|
4
5
|
import { Sandboxes } from "./resources/sandboxes.js";
|
|
5
6
|
import { Templates } from "./resources/templates.js";
|
|
6
7
|
import { Volumes } from "./resources/volumes.js";
|
|
@@ -28,11 +29,13 @@ export declare class Client {
|
|
|
28
29
|
snapshots: apisTypes.SnapshotsApi;
|
|
29
30
|
templates: apisTypes.TemplatesApi;
|
|
30
31
|
credentialSources: apisTypes.CredentialSourcesApi;
|
|
32
|
+
functions: apisTypes.FunctionsApi;
|
|
31
33
|
};
|
|
32
34
|
readonly sandboxes: Sandboxes;
|
|
33
35
|
readonly templates: Templates;
|
|
34
36
|
readonly volumes: Volumes;
|
|
35
37
|
readonly credentialSources: CredentialSources;
|
|
38
|
+
readonly functions: Functions;
|
|
36
39
|
constructor(options: ClientOptions);
|
|
37
40
|
sandbox(id: string): Sandbox;
|
|
38
41
|
getSandboxLogs(sandboxId: string, options?: SandboxLogsOptions): Promise<SandboxLogs>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,YAAY,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,KAAK,SAAS,MAAM,0BAA0B,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,iB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BAAoB,CAAC;QAClD,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC;KACnC,CAAC;IAEF,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;gBAElB,OAAO,EAAE,aAAa;IAoClC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAItB,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,WAAW,CAAC;IAiBjB,iBAAiB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC;IA6B7B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAc5B,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAWpC,QAAQ;CAiCvB"}
|
package/dist/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { apis, runtime } from "./apispec_compat.js";
|
|
2
2
|
import { normalizeNullMapMiddleware } from "./response_normalize.js";
|
|
3
3
|
import { CredentialSources } from "./resources/credential_sources.js";
|
|
4
|
+
import { Functions } from "./resources/functions.js";
|
|
4
5
|
import { Sandboxes } from "./resources/sandboxes.js";
|
|
5
6
|
import { Templates } from "./resources/templates.js";
|
|
6
7
|
import { Volumes } from "./resources/volumes.js";
|
|
@@ -25,6 +26,7 @@ export class Client {
|
|
|
25
26
|
templates;
|
|
26
27
|
volumes;
|
|
27
28
|
credentialSources;
|
|
29
|
+
functions;
|
|
28
30
|
constructor(options) {
|
|
29
31
|
const headers = {
|
|
30
32
|
...(options.headers ?? {}),
|
|
@@ -49,11 +51,13 @@ export class Client {
|
|
|
49
51
|
snapshots: new apis.SnapshotsApi(this.configuration),
|
|
50
52
|
templates: new apis.TemplatesApi(this.configuration),
|
|
51
53
|
credentialSources: new apis.CredentialSourcesApi(this.configuration),
|
|
54
|
+
functions: new apis.FunctionsApi(this.configuration),
|
|
52
55
|
};
|
|
53
56
|
this.sandboxes = new Sandboxes(this);
|
|
54
57
|
this.templates = new Templates(this);
|
|
55
58
|
this.volumes = new Volumes(this);
|
|
56
59
|
this.credentialSources = new CredentialSources(this);
|
|
60
|
+
this.functions = new Functions(this);
|
|
57
61
|
}
|
|
58
62
|
sandbox(id) {
|
|
59
63
|
return new Sandbox({ id, client: this });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { Client, type ClientOptions, DEFAULT_BASE_URL } from "./client.js";
|
|
2
2
|
export { Sandbox } from "./sandbox.js";
|
|
3
3
|
export { APIError } from "./errors.js";
|
|
4
|
+
export { Functions, functionSource } from "./resources/functions.js";
|
|
5
|
+
export type { CreateFunctionFromSandboxOptions, CreateFunctionRevisionFromSandboxOptions, FunctionCreateResult, FunctionRevisionCreateResult, } from "./resources/functions.js";
|
|
4
6
|
export { verifyWebhookSignature } from "./webhook_signature.js";
|
|
5
7
|
export * from "./template_helpers.js";
|
|
6
8
|
export * from "./models.js";
|
|
@@ -10,6 +12,7 @@ export * as apispec from "./apispec_compat.js";
|
|
|
10
12
|
import "./sandbox_contexts.js";
|
|
11
13
|
import "./sandbox_files.js";
|
|
12
14
|
import "./sandbox_network.js";
|
|
15
|
+
import "./sandbox_services.js";
|
|
13
16
|
import "./sandbox_public_gateway.js";
|
|
14
17
|
import "./sandbox_logs.js";
|
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA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OAAO,iBAAiB,CAAC;AACzB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,0BAA0B,CAAC;AAClC,OAAO,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Client, DEFAULT_BASE_URL } from "./client.js";
|
|
2
2
|
export { Sandbox } from "./sandbox.js";
|
|
3
3
|
export { APIError } from "./errors.js";
|
|
4
|
+
export { Functions, functionSource } from "./resources/functions.js";
|
|
4
5
|
export { verifyWebhookSignature } from "./webhook_signature.js";
|
|
5
6
|
export * from "./template_helpers.js";
|
|
6
7
|
export * from "./models.js";
|
|
@@ -10,5 +11,6 @@ export * as apispec from "./apispec_compat.js";
|
|
|
10
11
|
import "./sandbox_contexts.js";
|
|
11
12
|
import "./sandbox_files.js";
|
|
12
13
|
import "./sandbox_network.js";
|
|
14
|
+
import "./sandbox_services.js";
|
|
13
15
|
import "./sandbox_public_gateway.js";
|
|
14
16
|
import "./sandbox_logs.js";
|
package/dist/models.d.ts
CHANGED
|
@@ -30,12 +30,16 @@ export interface StreamDone {
|
|
|
30
30
|
exitCode?: number;
|
|
31
31
|
state?: string;
|
|
32
32
|
}
|
|
33
|
-
import type { PublicGatewayConfig } from "./apispec/src/models/index.js";
|
|
33
|
+
import type { PublicGatewayConfig, SandboxAppServiceView } from "./apispec/src/models/index.js";
|
|
34
34
|
export interface PublicGatewayResponse {
|
|
35
35
|
sandboxId: string;
|
|
36
36
|
publicGateway: PublicGatewayConfig;
|
|
37
37
|
exposureDomain?: string;
|
|
38
38
|
}
|
|
39
|
+
export interface SandboxServicesResponse {
|
|
40
|
+
sandboxId: string;
|
|
41
|
+
services: SandboxAppServiceView[];
|
|
42
|
+
}
|
|
39
43
|
export interface FileWatchResponse {
|
|
40
44
|
type: string;
|
|
41
45
|
watchId?: string;
|
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAA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kB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FunctionAlias, FunctionCreateRequest, FunctionRecord, FunctionRevision, FunctionRevisionCreateRequest, FunctionSourceRequest } from "../apispec/src/models/index.js";
|
|
2
|
+
import type { Client } from "../client.js";
|
|
3
|
+
export interface FunctionCreateResult {
|
|
4
|
+
function: FunctionRecord;
|
|
5
|
+
revision: FunctionRevision;
|
|
6
|
+
alias: FunctionAlias;
|
|
7
|
+
}
|
|
8
|
+
export interface FunctionRevisionCreateResult {
|
|
9
|
+
revision: FunctionRevision;
|
|
10
|
+
promoted: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateFunctionFromSandboxOptions {
|
|
13
|
+
name?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateFunctionRevisionFromSandboxOptions {
|
|
16
|
+
promote?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function functionSource(sandboxId: string, serviceId: string): FunctionSourceRequest;
|
|
19
|
+
export declare class Functions {
|
|
20
|
+
private readonly client;
|
|
21
|
+
constructor(client: Client);
|
|
22
|
+
list(): Promise<FunctionRecord[]>;
|
|
23
|
+
get(functionId: string): Promise<FunctionRecord>;
|
|
24
|
+
create(request: FunctionCreateRequest): Promise<FunctionCreateResult>;
|
|
25
|
+
createFromSandbox(sandboxId: string, serviceId: string, options?: CreateFunctionFromSandboxOptions): Promise<FunctionCreateResult>;
|
|
26
|
+
listRevisions(functionId: string): Promise<FunctionRevision[]>;
|
|
27
|
+
createRevision(functionId: string, request: FunctionRevisionCreateRequest): Promise<FunctionRevisionCreateResult>;
|
|
28
|
+
createRevisionFromSandbox(functionId: string, sandboxId: string, serviceId: string, options?: CreateFunctionRevisionFromSandboxOptions): Promise<FunctionRevisionCreateResult>;
|
|
29
|
+
setAlias(functionId: string, alias: string, revisionNumber: number): Promise<FunctionAlias>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/resources/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB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CAA6C,GACrD,OAAO,CAAC,4BAA4B,CAAC;IAOlC,QAAQ,CACZ,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC;CAc1B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ensureData } from "../response.js";
|
|
2
|
+
import { wrapApiCall } from "../errors.js";
|
|
3
|
+
export function functionSource(sandboxId, serviceId) {
|
|
4
|
+
return {
|
|
5
|
+
sandboxId,
|
|
6
|
+
serviceId,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export class Functions {
|
|
10
|
+
client;
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
async list() {
|
|
15
|
+
const response = await wrapApiCall(() => this.client.apispec.functions.apiV1FunctionsGet());
|
|
16
|
+
const data = ensureData(response, "list functions returned empty response");
|
|
17
|
+
return data.functions ?? [];
|
|
18
|
+
}
|
|
19
|
+
async get(functionId) {
|
|
20
|
+
const response = await wrapApiCall(() => this.client.apispec.functions.apiV1FunctionsIdGet({ id: functionId }));
|
|
21
|
+
const data = ensureData(response, "get function returned empty response");
|
|
22
|
+
return data._function;
|
|
23
|
+
}
|
|
24
|
+
async create(request) {
|
|
25
|
+
const response = await wrapApiCall(() => this.client.apispec.functions.apiV1FunctionsPost({
|
|
26
|
+
functionCreateRequest: request,
|
|
27
|
+
}));
|
|
28
|
+
return toFunctionCreateResult(ensureData(response, "create function returned empty response"));
|
|
29
|
+
}
|
|
30
|
+
async createFromSandbox(sandboxId, serviceId, options = {}) {
|
|
31
|
+
return this.create({
|
|
32
|
+
name: options.name,
|
|
33
|
+
source: functionSource(sandboxId, serviceId),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async listRevisions(functionId) {
|
|
37
|
+
const response = await wrapApiCall(() => this.client.apispec.functions.apiV1FunctionsIdRevisionsGet({ id: functionId }));
|
|
38
|
+
const data = ensureData(response, "list function revisions returned empty response");
|
|
39
|
+
return data.revisions ?? [];
|
|
40
|
+
}
|
|
41
|
+
async createRevision(functionId, request) {
|
|
42
|
+
const response = await wrapApiCall(() => this.client.apispec.functions.apiV1FunctionsIdRevisionsPost({
|
|
43
|
+
id: functionId,
|
|
44
|
+
functionRevisionCreateRequest: request,
|
|
45
|
+
}));
|
|
46
|
+
return toFunctionRevisionCreateResult(ensureData(response, "create function revision returned empty response"));
|
|
47
|
+
}
|
|
48
|
+
async createRevisionFromSandbox(functionId, sandboxId, serviceId, options = {}) {
|
|
49
|
+
return this.createRevision(functionId, {
|
|
50
|
+
source: functionSource(sandboxId, serviceId),
|
|
51
|
+
promote: options.promote,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async setAlias(functionId, alias, revisionNumber) {
|
|
55
|
+
const request = {
|
|
56
|
+
revisionNumber,
|
|
57
|
+
};
|
|
58
|
+
const response = await wrapApiCall(() => this.client.apispec.functions.apiV1FunctionsIdAliasesAliasPut({
|
|
59
|
+
id: functionId,
|
|
60
|
+
alias,
|
|
61
|
+
functionAliasUpdateRequest: request,
|
|
62
|
+
}));
|
|
63
|
+
const data = ensureData(response, "set function alias returned empty response");
|
|
64
|
+
return data.alias;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function toFunctionCreateResult(data) {
|
|
68
|
+
return {
|
|
69
|
+
function: data._function,
|
|
70
|
+
revision: data.revision,
|
|
71
|
+
alias: data.alias,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function toFunctionRevisionCreateResult(data) {
|
|
75
|
+
return {
|
|
76
|
+
revision: data.revision,
|
|
77
|
+
promoted: data.promoted,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SandboxAppService } from "./apispec/src/models/index.js";
|
|
2
|
+
import type { SandboxServicesResponse } from "./models.js";
|
|
3
|
+
declare module "./sandbox" {
|
|
4
|
+
interface Sandbox {
|
|
5
|
+
getServices(): Promise<SandboxServicesResponse>;
|
|
6
|
+
updateServices(services: SandboxAppService[]): Promise<SandboxServicesResponse>;
|
|
7
|
+
clearServices(): Promise<SandboxServicesResponse>;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=sandbox_services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox_services.d.ts","sourceRoot":"","sources":["../src/sandbox_services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAQxD,OAAO,QAAQ,WAAW,CAAC;IACzB,UAAU,OAAO;QACf,WAAW,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;QAChD,cAAc,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;QAChF,aAAa,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;KACnD;CACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { wrapApiCall } from "./errors.js";
|
|
2
|
+
import { ensureData } from "./response.js";
|
|
3
|
+
import { Sandbox } from "./sandbox.js";
|
|
4
|
+
function getClient(sandbox) {
|
|
5
|
+
return sandbox.client;
|
|
6
|
+
}
|
|
7
|
+
Sandbox.prototype.getServices = async function () {
|
|
8
|
+
const client = getClient(this);
|
|
9
|
+
const response = await wrapApiCall(() => client.apispec.sandboxes.apiV1SandboxesIdServicesGet({ id: this.id }));
|
|
10
|
+
const data = ensureData(response, "get sandbox services returned empty response");
|
|
11
|
+
return toSandboxServicesResponse(data);
|
|
12
|
+
};
|
|
13
|
+
Sandbox.prototype.updateServices = async function (services) {
|
|
14
|
+
const client = getClient(this);
|
|
15
|
+
const response = await wrapApiCall(() => client.apispec.sandboxes.apiV1SandboxesIdServicesPut({
|
|
16
|
+
id: this.id,
|
|
17
|
+
sandboxServicesUpdateRequest: { services: services ?? [] },
|
|
18
|
+
}));
|
|
19
|
+
const data = ensureData(response, "update sandbox services returned empty response");
|
|
20
|
+
return toSandboxServicesResponse(data);
|
|
21
|
+
};
|
|
22
|
+
Sandbox.prototype.clearServices = async function () {
|
|
23
|
+
return this.updateServices([]);
|
|
24
|
+
};
|
|
25
|
+
function toSandboxServicesResponse(data) {
|
|
26
|
+
return {
|
|
27
|
+
sandboxId: data.sandboxId,
|
|
28
|
+
services: data.services ?? [],
|
|
29
|
+
};
|
|
30
|
+
}
|