diff --git a/api/apps.ts b/api/apps.ts new file mode 100644 index 0000000..87a7224 --- /dev/null +++ b/api/apps.ts @@ -0,0 +1,7 @@ +import { client } from "./client.ts"; + +export const apps = { + create: client("/apps").post, + delete: client("/apps/{id}").delete, + get: client("/apps/{id}").get, +}; diff --git a/api/openapi.ts b/api/openapi.ts index f9bb1d8..58e5910 100644 --- a/api/openapi.ts +++ b/api/openapi.ts @@ -12,6 +12,11 @@ export interface paths { post: operations["apps-create"]; }; "/apps/{id}": { + /** + * Get an app + * @description Fetches an app. + */ + get: operations["apps-get"]; /** * Delete an app * @description Deletes an app. This will delete all resources associated with the app. @@ -118,64 +123,6 @@ export interface paths { */ get: operations["containerRegistries-testConnection"]; }; - "/datasets": { - /** - * List datasets - * @description List datasets - */ - get: operations["datasets-list"]; - /** - * Create a dataset - * @description Create a dataset - */ - post: operations["datasets-create"]; - }; - "/datasets/{datasetId}/versions": { - /** - * List dataset versions - * @description List dataset versions - */ - get: operations["datasetVersions-list"]; - /** - * Create a dataset version - * @description Create a dataset version - */ - post: operations["datasetVersions-create"]; - }; - "/datasets/{datasetId}/versions/{version}": { - /** - * Get a dataset version - * @description Get a dataset version - */ - get: operations["datasetVersions-get"]; - /** - * Update a dataset version - * @description Update a dataset version - */ - put: operations["datasetVersions-update"]; - /** - * Delete a dataset version - * @description Delete a dataset version - */ - delete: operations["datasetVersions-delete"]; - }; - "/datasets/{id}": { - /** - * Get a dataset - * @description Get a dataset - */ - get: operations["datasets-get"]; - /** - * Update a dataset - * @description Update a dataset - */ - put: operations["datasets-update"]; - /** - * Delete a dataset - * @description Delete a dataset - */ - delete: operations["datasets-delete"]; - }; "/deployments": { /** * List deployments @@ -330,30 +277,6 @@ export interface paths { */ patch: operations["machines-stop"]; }; - "/models": { - /** - * List models - * @description List models - */ - get: operations["models-list"]; - /** - * Create a model - * @description Create a model - */ - post: operations["models-create"]; - }; - "/models/{id}": { - /** - * Get a model - * @description Get a model - */ - get: operations["models-get"]; - /** - * Delete a model - * @description Delete a model - */ - delete: operations["models-delete"]; - }; "/notebooks": { /** * List notebooks @@ -427,6 +350,13 @@ export interface paths { */ get: operations["projectActivity-list"]; }; + "/projects/{id}/apps": { + /** + * List a project's apps + * @description Fetches a list of apps for a project. + */ + get: operations["projectApps-list"]; + }; "/projects/{id}/collaborators": { /** * List a project's collaborators @@ -451,7 +381,7 @@ export interface paths { * List a project's deployments * @description Fetches a list of deployments for a project. */ - get: operations["projectsDeployments-list"]; + get: operations["projectDeployments-list"]; }; "/projects/{id}/models": { /** @@ -460,6 +390,39 @@ export interface paths { */ get: operations["projectModels-list"]; }; + "/projects/{id}/models/{modelId}": { + /** + * Add a model to a project + * @description Adds a model to a project. + */ + post: operations["projectModels-add"]; + /** + * Remove a model from project + * @description Remove a model from project. + */ + delete: operations["projectModels-remove"]; + }; + "/projects/{id}/notebook/{notebookId}": { + /** + * Remove a notebook from a project + * @description Remove a notebook from a project. + */ + delete: operations["projectNotebooks-remove"]; + }; + "/projects/{id}/notebooks": { + /** + * List a project's notebooks + * @description Fetches a list of notebooks for a project. + */ + get: operations["projectNotebooks-list"]; + }; + "/projects/{id}/notebooks/{notebookId}": { + /** + * Add a notebook to a project + * @description Adds a notebook to a project. + */ + post: operations["projectNotebooks-add"]; + }; "/projects/{id}/secrets": { /** * List a project's secrets @@ -763,7 +726,8 @@ export interface operations { readonly config: | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -1026,6 +990,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -1047,23 +1018,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -1234,6 +1190,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -1255,23 +1218,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -1302,54 +1250,6 @@ export interface operations { }; }; }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The ID of the app */ - readonly id: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Delete an app - * @description Deletes an app. This will delete all resources associated with the app. - */ - "apps-delete": { - parameters: { - readonly path: { - /** @description The ID of the app to delete */ - id: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The ID of the app that was deleted */ - readonly id: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Disable an app - * @description Disables an app that is currently enabled. This will stop the app's deployments and make it unavailable to users. - */ - "apps-disable": { - parameters: { - readonly path: { - /** @description The ID of the app to disable */ - id: string; - }; - }; responses: { /** @description Successful response */ 200: { @@ -1359,7 +1259,8 @@ export interface operations { readonly config: | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -1622,6 +1523,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -1643,23 +1551,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -1830,6 +1723,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -1851,23 +1751,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -1904,13 +1789,13 @@ export interface operations { }; }; /** - * Enable an app - * @description Enables an app that has been previously disabled. This will start the app and make it available to users. + * Get an app + * @description Fetches an app. */ - "apps-enable": { + "apps-get": { parameters: { readonly path: { - /** @description The ID of the app to enable */ + /** @description The ID of the app to fetch */ id: string; }; }; @@ -1923,7 +1808,8 @@ export interface operations { readonly config: | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -2186,6 +2072,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -2207,23 +2100,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -2394,6 +2272,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -2415,23 +2300,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -2468,33 +2338,23 @@ export interface operations { }; }; /** - * Update an app's name - * @description Change the name of an app + * Delete an app + * @description Deletes an app. This will delete all resources associated with the app. */ - "apps-updateName": { + "apps-delete": { parameters: { readonly path: { - /** @description The ID of the app to update */ + /** @description The ID of the app to delete */ id: string; }; }; - readonly requestBody: { - readonly content: { - readonly "application/json": { - /** @description The new name of the app */ - readonly name: string; - }; - }; - }; responses: { /** @description Successful response */ 200: { content: { readonly "application/json": { - /** @description The ID of the app */ + /** @description The ID of the app that was deleted */ readonly id: string; - /** @description The name of the app */ - readonly name: string; }; }; }; @@ -2502,275 +2362,548 @@ export interface operations { }; }; /** - * Get the current session - * @description Get the current session. If a user is not logged in, this will be null. Otherwise, it will contain the current team and user. + * Disable an app + * @description Disables an app that is currently enabled. This will stop the app's deployments and make it unavailable to users. */ - "auth-session": { + "apps-disable": { + parameters: { + readonly path: { + /** @description The ID of the app to disable */ + id: string; + }; + }; responses: { /** @description Successful response */ 200: { content: { - readonly "application/json": - | ({ - readonly team: { - /** @description An internal, numeric ID for the team */ - readonly analyticsId: number; - /** @description A unique ID for the team */ - readonly id: string; - /** @description Whether the team is private or not */ - readonly isPrivate: boolean; - /** @description The maximum number of machines */ - readonly maxMachines: number; - /** @description The namespace for the team */ - readonly namespace: string; - }; - readonly user: { - /** @description An internal, numeric ID for the user */ - readonly analyticsId: number; - /** - * Format: date-time - * @description The date the account was confirmed - */ - readonly dtConfirmed: Date; - /** - * Format: date-time - * @description The date the user was created - */ - readonly dtCreated: Date; - /** @description The user's email address */ - readonly email: string; - /** @description The user's first name */ - readonly firstName: string | null; - /** @description A unique ID for the user */ - readonly id: string; - /** @description Whether the user has a password set */ - readonly isPasswordAuthEnabled: boolean; - /** @description Whether the user's phone number has been verified */ - readonly isPhoneVerified: boolean; - /** @description Whether the user has a QR code based MFA confirmed */ - readonly isQrCodeBasedMfaConfirmed: boolean; - /** @description Whether the user has a QR code based MFA enabled */ - readonly isQrCodeBasedMfaEnabled: boolean; - /** @description The user's last name */ - readonly lastName: string | null; - /** @description Metadata about the user */ - readonly metadata: { - /** - * @description Core survey question-answer pairs - * @default null - */ - readonly coreSurvey?: - | ({ - [key: string]: string | undefined; - }) - | null; - /** - * @description Gradient survey question-answer pairs - * @default null - */ - readonly gradientSurvey?: - | ({ - [key: string]: string | undefined; - }) - | null; - /** - * @description Whether the user has accepted the Graphcore terms of service - * @default false - */ - readonly graphcoreTermsAccepted?: boolean; - /** - * @description Tags for the user - * @default null - */ - readonly tags?: string | null; - }; - /** @description The teams this user is a member of */ - readonly teamMemberships: readonly ({ - /** @description Whether the user is an admin of the team */ - readonly isAdmin: boolean; - /** @description Whether the user is the owner of the team */ - readonly isOwner: boolean; - /** @description The team the user is a member of */ - readonly team: { - /** - * Format: date-time - * @description The date the team was created - */ - readonly dtCreated: Date; - /** @description The ID of the team */ - readonly id: string; - /** @description Whether the team is the user's team */ - readonly isUserTeam: boolean; - /** @description The name of the team */ + readonly "application/json": { + /** @description The new deployment configuration. */ + readonly config: + | ( + | ({ + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ readonly name: string; - /** @description The namespace of the team */ - readonly namespace: string; - /** - * @description The URL of the team's profile image. - * @default null - */ - readonly publicProfileImageUrl?: string | null; + readonly value: string; + })[]; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; }; - })[]; - }; - }) - | null; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * List autoscaling groups - * @description List autoscaling groups and filter by machine type. - */ - "autoscalingGroups-list": { - parameters: { - readonly query: { - /** @description Fetch the next page of results after this cursor. */ - after?: string; - /** @description The number of items to fetch after this page. */ - limit?: number; - /** @description Order results by one of these fields. */ - orderBy?: "dtCreated" | "name"; - /** @description The order to sort the results by. */ - order?: "asc" | "desc"; - /** @description Cluster the autoscaling group is for. */ - clusterId?: string; - /** @description Machine type used for machiens in the autoscaling group. */ - machineType?: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description Whether there are more pages of results available. */ - readonly hasMore: boolean; - /** @description The items on this page. */ - readonly items: readonly ({ - /** @description The ID of the cluster the autoscaling group is for. */ - readonly clusterId: string; - /** @description The current number of machines in the autoscaling group. */ - readonly current: number; - /** - * Format: date-time - * @description The date the autoscaling group was created. - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the autoscaling group was deleted. - */ - readonly dtDeleted: Date; - /** - * Format: date-time - * @description The date the autoscaling group was last modified. - */ - readonly dtModified: Date; - /** @description The ID of the autoscaling group. */ - readonly id: string; - /** @description The ID of the user who last edited the autoscaling group. */ - readonly lastEditedByUserId: string | null; - /** @description The machine type used by machines in the autoscaling group. */ - readonly machineType: string; - /** @description The maximum number of machines in the autoscaling group. */ - readonly max: number; - /** @description The minimum number of machines in the autoscaling group. */ - readonly min: number; - /** @description The name of the autoscaling group. */ - readonly name: string; - /** @description The ID of the network used by machines in the autoscaling group. */ - readonly networkId: string; - /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ - readonly provisioningTimeout: number | null; - /** @description The ID of the startup script used by machines in the autoscaling group. */ - readonly startupScriptId: string | null; - /** @description The ID of the template used by machines in the autoscaling group. */ - readonly templateId: string; - })[]; - /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ - readonly nextPage?: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Create an autoscaling group - * @description Create an autoscaling group. - */ - "autoscalingGroups-create": { - readonly requestBody: { - readonly content: { - readonly "application/json": { - /** @description The cluster the autoscaling group is for. */ - readonly clusterId: string; - /** @description The machine type used for machines in the autoscaling group. */ - readonly machineType: string; - /** @description The maximum number of machines in the autoscaling group. */ - readonly max: number; - /** @description The minimum number of machines in the autoscaling group. */ - readonly min: number; - /** @description The name of the autoscaling group. */ - readonly name: string; - /** @description The network the autoscaling group is in. */ - readonly networkId: string; - /** @description The timeout for provisioning machines in the autoscaling group. */ - readonly provisioningTimeout?: number; - /** @description The startup script used for machines in the autoscaling group. */ - readonly startupScriptId?: string; - /** @description The template used for machines in the autoscaling group. */ - readonly templateId: string; - }; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The ID of the cluster the autoscaling group is for. */ - readonly clusterId: string; - /** @description The current number of machines in the autoscaling group. */ - readonly current: number; - /** - * Format: date-time - * @description The date the autoscaling group was created. - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the autoscaling group was deleted. - */ - readonly dtDeleted: Date; - /** - * Format: date-time - * @description The date the autoscaling group was last modified. - */ - readonly dtModified: Date; - /** @description The ID of the autoscaling group. */ + readonly image: string; + readonly models?: readonly ({ + readonly id: string; + readonly path?: string; + })[]; + readonly name: string; + /** @default 80 */ + readonly port?: number; + readonly region?: string; + readonly repositories?: { + readonly dataset: string; + readonly mountPath?: string; + readonly repositories: readonly ({ + readonly name: string; + readonly password?: string; + readonly ref?: string; + readonly url: string; + readonly username?: string; + })[]; + }; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly instanceType: string; + /** @default 1 */ + readonly replicas?: number; + }; + }) + | ({ + /** @enum {string} */ + readonly apiVersion: "v0alpha1"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthchecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { + readonly accessKeyId: string; + readonly endpoint?: string; + readonly name: string; + readonly path?: string; + readonly region?: string; + readonly secretAccessKey: string; + /** @enum {string} */ + readonly type: "s3"; + readonly url: string; + } | { + readonly name: string; + /** @enum {string} */ + readonly type: "volume"; + } | { + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly machineType: string; + readonly ports: readonly (number)[]; + /** @default 1 */ + readonly replicas?: number; + }; + }) + ) + | ({ + readonly apiVersion: "v1" | "latest"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthchecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { + readonly accessKeyId: string; + readonly endpoint?: string; + readonly name: string; + readonly path?: string; + readonly region?: string; + readonly secretAccessKey: string; + /** @enum {string} */ + readonly type: "s3"; + readonly url: string; + } | { + readonly name: string; + /** @enum {string} */ + readonly type: "volume"; + } | { + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly machineType: string; + readonly ports: readonly (number)[]; + /** @default 1 */ + readonly replicas?: number; + }; + }); + /** @description The ID of the app */ readonly id: string; - /** @description The ID of the user who last edited the autoscaling group. */ - readonly lastEditedByUserId: string | null; - /** @description The machine type used by machines in the autoscaling group. */ - readonly machineType: string; - /** @description The maximum number of machines in the autoscaling group. */ - readonly max: number; - /** @description The minimum number of machines in the autoscaling group. */ - readonly min: number; - /** @description The name of the autoscaling group. */ - readonly name: string; - /** @description The ID of the network used by machines in the autoscaling group. */ - readonly networkId: string; - /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ - readonly provisioningTimeout: number | null; - /** @description The ID of the startup script used by machines in the autoscaling group. */ - readonly startupScriptId: string | null; - /** @description The ID of the template used by machines in the autoscaling group. */ - readonly templateId: string; }; }; }; @@ -2778,13 +2911,13 @@ export interface operations { }; }; /** - * Get an autoscaling group - * @description Fetches a single autoscaling group by id. + * Enable an app + * @description Enables an app that has been previously disabled. This will start the app and make it available to users. */ - "autoscalingGroups-get": { + "apps-enable": { parameters: { readonly path: { - /** @description The ID of the autoscaling group to fetch. */ + /** @description The ID of the app to enable */ id: string; }; }; @@ -2793,45 +2926,533 @@ export interface operations { 200: { content: { readonly "application/json": { - /** @description The ID of the cluster the autoscaling group is for. */ - readonly clusterId: string; - /** @description The current number of machines in the autoscaling group. */ - readonly current: number; - /** - * Format: date-time - * @description The date the autoscaling group was created. - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the autoscaling group was deleted. - */ - readonly dtDeleted: Date; - /** - * Format: date-time - * @description The date the autoscaling group was last modified. - */ - readonly dtModified: Date; - /** @description The ID of the autoscaling group. */ + /** @description The new deployment configuration. */ + readonly config: + | ( + | ({ + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly models?: readonly ({ + readonly id: string; + readonly path?: string; + })[]; + readonly name: string; + /** @default 80 */ + readonly port?: number; + readonly region?: string; + readonly repositories?: { + readonly dataset: string; + readonly mountPath?: string; + readonly repositories: readonly ({ + readonly name: string; + readonly password?: string; + readonly ref?: string; + readonly url: string; + readonly username?: string; + })[]; + }; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly instanceType: string; + /** @default 1 */ + readonly replicas?: number; + }; + }) + | ({ + /** @enum {string} */ + readonly apiVersion: "v0alpha1"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthchecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { + readonly accessKeyId: string; + readonly endpoint?: string; + readonly name: string; + readonly path?: string; + readonly region?: string; + readonly secretAccessKey: string; + /** @enum {string} */ + readonly type: "s3"; + readonly url: string; + } | { + readonly name: string; + /** @enum {string} */ + readonly type: "volume"; + } | { + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly machineType: string; + readonly ports: readonly (number)[]; + /** @default 1 */ + readonly replicas?: number; + }; + }) + ) + | ({ + readonly apiVersion: "v1" | "latest"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthchecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { + readonly accessKeyId: string; + readonly endpoint?: string; + readonly name: string; + readonly path?: string; + readonly region?: string; + readonly secretAccessKey: string; + /** @enum {string} */ + readonly type: "s3"; + readonly url: string; + } | { + readonly name: string; + /** @enum {string} */ + readonly type: "volume"; + } | { + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly machineType: string; + readonly ports: readonly (number)[]; + /** @default 1 */ + readonly replicas?: number; + }; + }); + /** @description The ID of the app */ readonly id: string; - /** @description The ID of the user who last edited the autoscaling group. */ - readonly lastEditedByUserId: string | null; - /** @description The machine type used by machines in the autoscaling group. */ - readonly machineType: string; - /** @description The maximum number of machines in the autoscaling group. */ - readonly max: number; - /** @description The minimum number of machines in the autoscaling group. */ - readonly min: number; - /** @description The name of the autoscaling group. */ - readonly name: string; - /** @description The ID of the network used by machines in the autoscaling group. */ - readonly networkId: string; - /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ - readonly provisioningTimeout: number | null; - /** @description The ID of the startup script used by machines in the autoscaling group. */ - readonly startupScriptId: string | null; - /** @description The ID of the template used by machines in the autoscaling group. */ - readonly templateId: string; }; }; }; @@ -2839,39 +3460,21 @@ export interface operations { }; }; /** - * Update an autoscaling group - * @description Update an autoscaling group. + * Update an app's name + * @description Change the name of an app */ - "autoscalingGroups-update": { + "apps-updateName": { parameters: { readonly path: { - /** @description The id of the autoscaling group. */ + /** @description The ID of the app to update */ id: string; }; }; readonly requestBody: { readonly content: { readonly "application/json": { - /** @description The cluster the autoscaling group is for. */ - readonly clusterId?: string; - /** @description The target number of machines in the autoscaling group. */ - readonly current?: number; - /** @description The machine type used for machines in the autoscaling group. */ - readonly machineType?: string; - /** @description The maximum number of machines in the autoscaling group. */ - readonly max?: number; - /** @description The minimum number of machines in the autoscaling group. */ - readonly min?: number; - /** @description The name of the autoscaling group. */ - readonly name?: string; - /** @description The network the autoscaling group is in. */ - readonly networkId?: string; - /** @description The timeout for provisioning machines in the autoscaling group. */ - readonly provisioningTimeout?: number; - /** @description The startup script used for machines in the autoscaling group. */ - readonly startupScriptId?: string; - /** @description The template used for machines in the autoscaling group. */ - readonly templateId?: string; + /** @description The new name of the app */ + readonly name: string; }; }; }; @@ -2880,69 +3483,10 @@ export interface operations { 200: { content: { readonly "application/json": { - /** @description The ID of the cluster the autoscaling group is for. */ - readonly clusterId: string; - /** @description The current number of machines in the autoscaling group. */ - readonly current: number; - /** - * Format: date-time - * @description The date the autoscaling group was created. - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the autoscaling group was deleted. - */ - readonly dtDeleted: Date; - /** - * Format: date-time - * @description The date the autoscaling group was last modified. - */ - readonly dtModified: Date; - /** @description The ID of the autoscaling group. */ + /** @description The ID of the app */ readonly id: string; - /** @description The ID of the user who last edited the autoscaling group. */ - readonly lastEditedByUserId: string | null; - /** @description The machine type used by machines in the autoscaling group. */ - readonly machineType: string; - /** @description The maximum number of machines in the autoscaling group. */ - readonly max: number; - /** @description The minimum number of machines in the autoscaling group. */ - readonly min: number; - /** @description The name of the autoscaling group. */ + /** @description The name of the app */ readonly name: string; - /** @description The ID of the network used by machines in the autoscaling group. */ - readonly networkId: string; - /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ - readonly provisioningTimeout: number | null; - /** @description The ID of the startup script used by machines in the autoscaling group. */ - readonly startupScriptId: string | null; - /** @description The ID of the template used by machines in the autoscaling group. */ - readonly templateId: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Delete an autoscaling group - * @description Delete an autoscaling group. - */ - "autoscalingGroups-delete": { - parameters: { - readonly path: { - /** @description The id of the autoscaling group. */ - id: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The id of the autoscaling group. */ - readonly id: string; }; }; }; @@ -2950,30 +3494,143 @@ export interface operations { }; }; /** - * Get account standing - * @description Check whether the current team account is in good standing. If not, send back a message explaining why. + * Get the current session + * @description Get the current session. If a user is not logged in, this will be null. Otherwise, it will contain the current team and user. */ - "billingAccountStanding-get": { + "auth-session": { responses: { /** @description Successful response */ 200: { content: { - readonly "application/json": { - /** @description Whether the account is in good standing */ - readonly isInGoodStanding: boolean; - /** @description If the account is not in good standing, these are messages explaining why. */ - readonly messages: readonly (string)[]; - }; + readonly "application/json": + | ({ + readonly team: { + /** @description An internal, numeric ID for the team */ + readonly analyticsId: number; + /** @description A unique ID for the team */ + readonly id: string; + /** @description Whether the team is private or not */ + readonly isPrivate: boolean; + /** @description The maximum number of machines */ + readonly maxMachines: number; + /** @description The namespace for the team */ + readonly namespace: string; + }; + readonly user: { + /** @description An internal, numeric ID for the user */ + readonly analyticsId: number; + /** + * Format: date-time + * @description The date the account was confirmed + */ + readonly dtConfirmed: Date; + /** + * Format: date-time + * @description The date the user was created + */ + readonly dtCreated: Date; + /** @description The user's email address */ + readonly email: string; + /** @description The user's first name */ + readonly firstName: string | null; + /** @description A unique ID for the user */ + readonly id: string; + /** @description Whether the user has a password set */ + readonly isPasswordAuthEnabled: boolean; + /** @description Whether the user's phone number has been verified */ + readonly isPhoneVerified: boolean; + /** @description Whether the user has a QR code based MFA confirmed */ + readonly isQrCodeBasedMfaConfirmed: boolean; + /** @description Whether the user has a QR code based MFA enabled */ + readonly isQrCodeBasedMfaEnabled: boolean; + /** @description The user's last name */ + readonly lastName: string | null; + /** @description Metadata about the user */ + readonly metadata: { + /** + * @description Core survey question-answer pairs + * @default null + */ + readonly coreSurvey?: + | ({ + [key: string]: string | undefined; + }) + | null; + /** + * @description Gradient survey question-answer pairs + * @default null + */ + readonly gradientSurvey?: + | ({ + [key: string]: string | undefined; + }) + | null; + /** + * @description Whether the user has accepted the Graphcore terms of service + * @default false + */ + readonly graphcoreTermsAccepted?: boolean; + /** + * @description Tags for the user + * @default null + */ + readonly tags?: string | null; + }; + /** + * @description The user's preferences + * @default null + */ + readonly preferences?: + | ({ + readonly defaultProduct?: string | null; + readonly defaultTeamId?: string | null; + readonly disableHotkeys?: boolean | null; + readonly fontSize?: number | null; + /** @enum {string|null} */ + readonly theme?: "light" | "dark" | null; + }) + | null; + /** @description The teams this user is a member of */ + readonly teamMemberships: readonly ({ + /** @description Whether the user is an admin of the team */ + readonly isAdmin: boolean; + /** @description Whether the user is the owner of the team */ + readonly isOwner: boolean; + /** @description The team the user is a member of */ + readonly team: { + /** + * Format: date-time + * @description The date the team was created + */ + readonly dtCreated: Date; + /** @description The ID of the team */ + readonly id: string; + /** @description Whether the team is the user's team */ + readonly isUserTeam: boolean; + /** @description The name of the team */ + readonly name: string; + /** @description The namespace of the team */ + readonly namespace: string; + /** + * @description The URL of the team's profile image. + * @default null + */ + readonly publicProfileImageUrl?: string | null; + }; + })[]; + }; + }) + | null; }; }; default: components["responses"]["error"]; }; }; /** - * List container registries - * @description Lists container registries for the current team. + * List autoscaling groups + * @description List autoscaling groups and filter by machine type. */ - "containerRegistries-list": { + "autoscalingGroups-list": { parameters: { readonly query: { /** @description Fetch the next page of results after this cursor. */ @@ -2981,9 +3638,13 @@ export interface operations { /** @description The number of items to fetch after this page. */ limit?: number; /** @description Order results by one of these fields. */ - orderBy?: "dtCreated"; + orderBy?: "dtCreated" | "name"; /** @description The order to sort the results by. */ order?: "asc" | "desc"; + /** @description Cluster the autoscaling group is for. */ + clusterId?: string; + /** @description Machine type used for machiens in the autoscaling group. */ + machineType?: string; }; }; responses: { @@ -2995,26 +3656,45 @@ export interface operations { readonly hasMore: boolean; /** @description The items on this page. */ readonly items: readonly ({ + /** @description The ID of the cluster the autoscaling group is for. */ + readonly clusterId: string; + /** @description The current number of machines in the autoscaling group. */ + readonly current: number; /** * Format: date-time - * @description The date the container registry was created + * @description The date the autoscaling group was created. */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the container registry was last modified + * @description The date the autoscaling group was deleted. + */ + readonly dtDeleted: Date; + /** + * Format: date-time + * @description The date the autoscaling group was last modified. */ readonly dtModified: Date; - /** @description The id of the container registry */ + /** @description The ID of the autoscaling group. */ readonly id: string; - /** @description The name of the container registry */ + /** @description The ID of the user who last edited the autoscaling group. */ + readonly lastEditedByUserId: string | null; + /** @description The machine type used by machines in the autoscaling group. */ + readonly machineType: string; + /** @description The maximum number of machines in the autoscaling group. */ + readonly max: number; + /** @description The minimum number of machines in the autoscaling group. */ + readonly min: number; + /** @description The name of the autoscaling group. */ readonly name: string; - /** @description The namespace of the container registry */ - readonly namespace: string; - /** @description The URL of the container registry */ - readonly url: string; - /** @description A username for the container registry */ - readonly username: string; + /** @description The ID of the network used by machines in the autoscaling group. */ + readonly networkId: string; + /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ + readonly provisioningTimeout: number | null; + /** @description The ID of the startup script used by machines in the autoscaling group. */ + readonly startupScriptId: string | null; + /** @description The ID of the template used by machines in the autoscaling group. */ + readonly templateId: string; })[]; /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ readonly nextPage?: string; @@ -3025,129 +3705,31 @@ export interface operations { }; }; /** - * Create a container registry - * @description Creates a container registry for the current team. - */ - "containerRegistries-create": { - readonly requestBody: { - readonly content: { - readonly "application/json": { - /** @description The name of the container registry */ - readonly name: string; - /** @description The namespace of the container registry */ - readonly namespace: string; - /** @description The password for the registry */ - readonly password: string; - /** - * Format: uri - * @description The URL of the container registry - */ - readonly url: string; - /** @description A username for the container registry */ - readonly username: string; - }; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** - * Format: date-time - * @description The date the container registry was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the container registry was last modified - */ - readonly dtModified: Date; - /** @description The id of the container registry */ - readonly id: string; - /** @description The name of the container registry */ - readonly name: string; - /** @description The namespace of the container registry */ - readonly namespace: string; - /** @description The URL of the container registry */ - readonly url: string; - /** @description A username for the container registry */ - readonly username: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * List container registries - * @description Lists container registries for the current team. - */ - "containerRegistries-get": { - parameters: { - readonly path: { - /** @description The id of the container registry */ - id: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** - * Format: date-time - * @description The date the container registry was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the container registry was last modified - */ - readonly dtModified: Date; - /** @description The id of the container registry */ - readonly id: string; - /** @description The name of the container registry */ - readonly name: string; - /** @description The namespace of the container registry */ - readonly namespace: string; - /** @description The URL of the container registry */ - readonly url: string; - /** @description A username for the container registry */ - readonly username: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Update a container registry - * @description Updates a container registry for the current team. + * Create an autoscaling group + * @description Create an autoscaling group. */ - "containerRegistries-update": { - parameters: { - readonly path: { - /** @description The id of the container registry */ - id: string; - }; - }; + "autoscalingGroups-create": { readonly requestBody: { readonly content: { readonly "application/json": { - /** @description The name of the container registry */ - readonly name?: string; - /** @description The namespace of the container registry */ - readonly namespace?: string; - /** @description An updated password for the registry */ - readonly password?: string; - /** - * Format: uri - * @description The URL of the container registry - */ - readonly url?: string; - /** @description A username for the container registry */ - readonly username?: string; + /** @description The cluster the autoscaling group is for. */ + readonly clusterId: string; + /** @description The machine type used for machines in the autoscaling group. */ + readonly machineType: string; + /** @description The maximum number of machines in the autoscaling group. */ + readonly max: number; + /** @description The minimum number of machines in the autoscaling group. */ + readonly min: number; + /** @description The name of the autoscaling group. */ + readonly name: string; + /** @description The network the autoscaling group is in. */ + readonly networkId: string; + /** @description The timeout for provisioning machines in the autoscaling group. */ + readonly provisioningTimeout?: number; + /** @description The startup script used for machines in the autoscaling group. */ + readonly startupScriptId?: string; + /** @description The template used for machines in the autoscaling group. */ + readonly templateId: string; }; }; }; @@ -3156,26 +3738,45 @@ export interface operations { 200: { content: { readonly "application/json": { + /** @description The ID of the cluster the autoscaling group is for. */ + readonly clusterId: string; + /** @description The current number of machines in the autoscaling group. */ + readonly current: number; /** * Format: date-time - * @description The date the container registry was created + * @description The date the autoscaling group was created. */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the container registry was last modified + * @description The date the autoscaling group was deleted. + */ + readonly dtDeleted: Date; + /** + * Format: date-time + * @description The date the autoscaling group was last modified. */ readonly dtModified: Date; - /** @description The id of the container registry */ + /** @description The ID of the autoscaling group. */ readonly id: string; - /** @description The name of the container registry */ + /** @description The ID of the user who last edited the autoscaling group. */ + readonly lastEditedByUserId: string | null; + /** @description The machine type used by machines in the autoscaling group. */ + readonly machineType: string; + /** @description The maximum number of machines in the autoscaling group. */ + readonly max: number; + /** @description The minimum number of machines in the autoscaling group. */ + readonly min: number; + /** @description The name of the autoscaling group. */ readonly name: string; - /** @description The namespace of the container registry */ - readonly namespace: string; - /** @description The URL of the container registry */ - readonly url: string; - /** @description A username for the container registry */ - readonly username: string; + /** @description The ID of the network used by machines in the autoscaling group. */ + readonly networkId: string; + /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ + readonly provisioningTimeout: number | null; + /** @description The ID of the startup script used by machines in the autoscaling group. */ + readonly startupScriptId: string | null; + /** @description The ID of the template used by machines in the autoscaling group. */ + readonly templateId: string; }; }; }; @@ -3183,13 +3784,13 @@ export interface operations { }; }; /** - * Delete a container registry - * @description Deletes a container registry for the current team. + * Get an autoscaling group + * @description Fetches a single autoscaling group by id. */ - "containerRegistries-delete": { + "autoscalingGroups-get": { parameters: { readonly path: { - /** @description The id of the container registry */ + /** @description The ID of the autoscaling group to fetch. */ id: string; }; }; @@ -3198,26 +3799,45 @@ export interface operations { 200: { content: { readonly "application/json": { + /** @description The ID of the cluster the autoscaling group is for. */ + readonly clusterId: string; + /** @description The current number of machines in the autoscaling group. */ + readonly current: number; /** * Format: date-time - * @description The date the container registry was created + * @description The date the autoscaling group was created. */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the container registry was last modified + * @description The date the autoscaling group was deleted. + */ + readonly dtDeleted: Date; + /** + * Format: date-time + * @description The date the autoscaling group was last modified. */ readonly dtModified: Date; - /** @description The id of the container registry */ + /** @description The ID of the autoscaling group. */ readonly id: string; - /** @description The name of the container registry */ + /** @description The ID of the user who last edited the autoscaling group. */ + readonly lastEditedByUserId: string | null; + /** @description The machine type used by machines in the autoscaling group. */ + readonly machineType: string; + /** @description The maximum number of machines in the autoscaling group. */ + readonly max: number; + /** @description The minimum number of machines in the autoscaling group. */ + readonly min: number; + /** @description The name of the autoscaling group. */ readonly name: string; - /** @description The namespace of the container registry */ - readonly namespace: string; - /** @description The URL of the container registry */ - readonly url: string; - /** @description A username for the container registry */ - readonly username: string; + /** @description The ID of the network used by machines in the autoscaling group. */ + readonly networkId: string; + /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ + readonly provisioningTimeout: number | null; + /** @description The ID of the startup script used by machines in the autoscaling group. */ + readonly startupScriptId: string | null; + /** @description The ID of the template used by machines in the autoscaling group. */ + readonly templateId: string; }; }; }; @@ -3225,25 +3845,86 @@ export interface operations { }; }; /** - * Test a container registry connection - * @description Validate that a container registry can be connected to using the provided credentials. + * Update an autoscaling group + * @description Update an autoscaling group. */ - "containerRegistries-testConnection": { + "autoscalingGroups-update": { parameters: { readonly path: { - /** @description The id of the container registry */ + /** @description The id of the autoscaling group. */ id: string; }; }; + readonly requestBody: { + readonly content: { + readonly "application/json": { + /** @description The cluster the autoscaling group is for. */ + readonly clusterId?: string; + /** @description The target number of machines in the autoscaling group. */ + readonly current?: number; + /** @description The machine type used for machines in the autoscaling group. */ + readonly machineType?: string; + /** @description The maximum number of machines in the autoscaling group. */ + readonly max?: number; + /** @description The minimum number of machines in the autoscaling group. */ + readonly min?: number; + /** @description The name of the autoscaling group. */ + readonly name?: string; + /** @description The network the autoscaling group is in. */ + readonly networkId?: string; + /** @description The timeout for provisioning machines in the autoscaling group. */ + readonly provisioningTimeout?: number; + /** @description The startup script used for machines in the autoscaling group. */ + readonly startupScriptId?: string; + /** @description The template used for machines in the autoscaling group. */ + readonly templateId?: string; + }; + }; + }; responses: { /** @description Successful response */ 200: { content: { readonly "application/json": { - /** @description The error message, if any */ - readonly error?: string; - /** @description Whether the connection was successful */ - readonly success: boolean; + /** @description The ID of the cluster the autoscaling group is for. */ + readonly clusterId: string; + /** @description The current number of machines in the autoscaling group. */ + readonly current: number; + /** + * Format: date-time + * @description The date the autoscaling group was created. + */ + readonly dtCreated: Date; + /** + * Format: date-time + * @description The date the autoscaling group was deleted. + */ + readonly dtDeleted: Date; + /** + * Format: date-time + * @description The date the autoscaling group was last modified. + */ + readonly dtModified: Date; + /** @description The ID of the autoscaling group. */ + readonly id: string; + /** @description The ID of the user who last edited the autoscaling group. */ + readonly lastEditedByUserId: string | null; + /** @description The machine type used by machines in the autoscaling group. */ + readonly machineType: string; + /** @description The maximum number of machines in the autoscaling group. */ + readonly max: number; + /** @description The minimum number of machines in the autoscaling group. */ + readonly min: number; + /** @description The name of the autoscaling group. */ + readonly name: string; + /** @description The ID of the network used by machines in the autoscaling group. */ + readonly networkId: string; + /** @description The timeout for provisioning machines in the autoscaling group, in minutes. */ + readonly provisioningTimeout: number | null; + /** @description The ID of the startup script used by machines in the autoscaling group. */ + readonly startupScriptId: string | null; + /** @description The ID of the template used by machines in the autoscaling group. */ + readonly templateId: string; }; }; }; @@ -3251,22 +3932,14 @@ export interface operations { }; }; /** - * List datasets - * @description List datasets + * Delete an autoscaling group + * @description Delete an autoscaling group. */ - "datasets-list": { + "autoscalingGroups-delete": { parameters: { - readonly query: { - /** @description Fetch the next page of results after this cursor. */ - after?: string; - /** @description The number of items to fetch after this page. */ - limit?: number; - /** @description Order results by one of these fields. */ - orderBy?: "dtCreated"; - /** @description The order to sort the results by. */ - order?: "asc" | "desc"; - teamId?: string; - privacy?: Record | ("PUBLIC" | "PRIVATE"); + readonly path: { + /** @description The id of the autoscaling group. */ + id: string; }; }; responses: { @@ -3274,35 +3947,8 @@ export interface operations { 200: { content: { readonly "application/json": { - /** @description Whether there are more pages of results available. */ - readonly hasMore: boolean; - /** @description The items on this page. */ - readonly items: readonly ({ - /** @description The description of the dataset */ - readonly description: string | null; - /** - * Format: date-time - * @description The date the dataset was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the dataset was last modified - */ - readonly dtModified: Date; - /** @description The ID of the dataset */ - readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; - })[]; - /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ - readonly nextPage?: string; + /** @description The id of the autoscaling group. */ + readonly id: string; }; }; }; @@ -3310,51 +3956,19 @@ export interface operations { }; }; /** - * Create a dataset - * @description Create a dataset - */ - "datasets-create": { - readonly requestBody: { - readonly content: { - readonly "application/json": { - /** @description The description of the dataset */ - readonly description?: (Record | string) | null; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string; - /** @description The ID of the storage provider */ - readonly storageProviderId?: string; - }; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The description of the dataset */ - readonly description: string | null; - /** - * Format: date-time - * @description The date the dataset was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the dataset was last modified - */ - readonly dtModified: Date; - /** @description The ID of the dataset */ - readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; + * Get account standing + * @description Check whether the current team account is in good standing. If not, send back a message explaining why. + */ + "billingAccountStanding-get": { + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** @description Whether the account is in good standing */ + readonly isInGoodStanding: boolean; + /** @description If the account is not in good standing, these are messages explaining why. */ + readonly messages: readonly (string)[]; }; }; }; @@ -3362,10 +3976,10 @@ export interface operations { }; }; /** - * List dataset versions - * @description List dataset versions + * List container registries + * @description Lists container registries for the current team. */ - "datasetVersions-list": { + "containerRegistries-list": { parameters: { readonly query: { /** @description Fetch the next page of results after this cursor. */ @@ -3376,11 +3990,6 @@ export interface operations { orderBy?: "dtCreated"; /** @description The order to sort the results by. */ order?: "asc" | "desc"; - tags?: string; - }; - readonly path: { - /** @description The ID of the dataset */ - datasetId: string; }; }; responses: { @@ -3392,38 +4001,26 @@ export interface operations { readonly hasMore: boolean; /** @description The items on this page. */ readonly items: readonly ({ - /** @description The ID of the dataset */ - readonly datasetId: string; /** * Format: date-time - * @description The date the version was created + * @description The date the container registry was created */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the version was last modified + * @description The date the container registry was last modified */ readonly dtModified: Date; - /** @description Whether the version is committed */ - readonly isCommitted: boolean; - /** @description The description of the dataset version */ - readonly message: string | null; - /** @description Metadata for the version. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The tags for the version */ - readonly tags: readonly (string)[]; - /** @description The URL of the version */ - readonly url: string | null; - /** @description The size of the dataset at this version in bytes */ - readonly usageBytes: string | null; - /** @description The ID of the user that created the version */ - readonly userId: string | null; - /** @description The version of the dataset */ - readonly version: string; + /** @description The id of the container registry */ + readonly id: string; + /** @description The name of the container registry */ + readonly name: string; + /** @description The namespace of the container registry */ + readonly namespace: string; + /** @description The URL of the container registry */ + readonly url: string; + /** @description A username for the container registry */ + readonly username: string; })[]; /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ readonly nextPage?: string; @@ -3434,27 +4031,26 @@ export interface operations { }; }; /** - * Create a dataset version - * @description Create a dataset version + * Create a container registry + * @description Creates a container registry for the current team. */ - "datasetVersions-create": { - parameters: { - readonly path: { - /** @description The ID of the dataset */ - datasetId: string; - }; - }; + "containerRegistries-create": { readonly requestBody: { readonly content: { readonly "application/json": { - /** @description The description of the dataset version */ - readonly message?: string; - /** @description Metadata for the version. */ - readonly metadata?: { - [key: string]: unknown | undefined; - }; - /** @description The tags for the version, comma-delimited */ - readonly tags?: string; + /** @description The name of the container registry */ + readonly name: string; + /** @description The namespace of the container registry */ + readonly namespace: string; + /** @description The password for the registry */ + readonly password: string; + /** + * Format: uri + * @description The URL of the container registry + */ + readonly url: string; + /** @description A username for the container registry */ + readonly username: string; }; }; }; @@ -3463,38 +4059,26 @@ export interface operations { 200: { content: { readonly "application/json": { - /** @description The ID of the dataset */ - readonly datasetId: string; /** * Format: date-time - * @description The date the version was created + * @description The date the container registry was created */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the version was last modified + * @description The date the container registry was last modified */ readonly dtModified: Date; - /** @description Whether the version is committed */ - readonly isCommitted: boolean; - /** @description The description of the dataset version */ - readonly message: string | null; - /** @description Metadata for the version. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The tags for the version */ - readonly tags: readonly (string)[]; - /** @description The URL of the version */ - readonly url: string | null; - /** @description The size of the dataset at this version in bytes */ - readonly usageBytes: string | null; - /** @description The ID of the user that created the version */ - readonly userId: string | null; - /** @description The version of the dataset */ - readonly version: string; + /** @description The id of the container registry */ + readonly id: string; + /** @description The name of the container registry */ + readonly name: string; + /** @description The namespace of the container registry */ + readonly namespace: string; + /** @description The URL of the container registry */ + readonly url: string; + /** @description A username for the container registry */ + readonly username: string; }; }; }; @@ -3502,16 +4086,14 @@ export interface operations { }; }; /** - * Get a dataset version - * @description Get a dataset version + * List container registries + * @description Lists container registries for the current team. */ - "datasetVersions-get": { + "containerRegistries-get": { parameters: { readonly path: { - /** @description The ID of the dataset */ - datasetId: string; - /** @description The version of the dataset */ - version: string; + /** @description The id of the container registry */ + id: string; }; }; responses: { @@ -3519,38 +4101,26 @@ export interface operations { 200: { content: { readonly "application/json": { - /** @description The ID of the dataset */ - readonly datasetId: string; /** * Format: date-time - * @description The date the version was created + * @description The date the container registry was created */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the version was last modified + * @description The date the container registry was last modified */ readonly dtModified: Date; - /** @description Whether the version is committed */ - readonly isCommitted: boolean; - /** @description The description of the dataset version */ - readonly message: string | null; - /** @description Metadata for the version. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The tags for the version */ - readonly tags: readonly (string)[]; - /** @description The URL of the version */ - readonly url: string | null; - /** @description The size of the dataset at this version in bytes */ - readonly usageBytes: string | null; - /** @description The ID of the user that created the version */ - readonly userId: string | null; - /** @description The version of the dataset */ - readonly version: string; + /** @description The id of the container registry */ + readonly id: string; + /** @description The name of the container registry */ + readonly name: string; + /** @description The namespace of the container registry */ + readonly namespace: string; + /** @description The URL of the container registry */ + readonly url: string; + /** @description A username for the container registry */ + readonly username: string; }; }; }; @@ -3558,143 +4128,60 @@ export interface operations { }; }; /** - * Update a dataset version - * @description Update a dataset version + * Update a container registry + * @description Updates a container registry for the current team. */ - "datasetVersions-update": { + "containerRegistries-update": { parameters: { readonly path: { - /** @description The ID of the dataset */ - datasetId: string; - /** @description The version of the dataset */ - version: string; + /** @description The id of the container registry */ + id: string; }; }; readonly requestBody: { readonly content: { readonly "application/json": { - /** @description Whether the version is committed */ - readonly isCommitted?: boolean; - /** @description The description of the dataset version */ - readonly message?: string; - /** @description Metadata for the version. */ - readonly metadata?: { - [key: string]: unknown | undefined; - }; - /** @description The tags for the version, comma-delimited */ - readonly tags?: string; - }; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The ID of the dataset */ - readonly datasetId: string; - /** - * Format: date-time - * @description The date the version was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the version was last modified - */ - readonly dtModified: Date; - /** @description Whether the version is committed */ - readonly isCommitted: boolean; - /** @description The description of the dataset version */ - readonly message: string | null; - /** @description Metadata for the version. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The tags for the version */ - readonly tags: readonly (string)[]; - /** @description The URL of the version */ - readonly url: string | null; - /** @description The size of the dataset at this version in bytes */ - readonly usageBytes: string | null; - /** @description The ID of the user that created the version */ - readonly userId: string | null; - /** @description The version of the dataset */ - readonly version: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Delete a dataset version - * @description Delete a dataset version - */ - "datasetVersions-delete": { - parameters: { - readonly path: { - /** @description The ID of the dataset */ - datasetId: string; - /** @description The version of the dataset */ - version: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The ID of the dataset */ - readonly datasetId: string; - /** @description The version of the dataset */ - readonly version: string; - }; + /** @description The name of the container registry */ + readonly name?: string; + /** @description The namespace of the container registry */ + readonly namespace?: string; + /** @description An updated password for the registry */ + readonly password?: string; + /** + * Format: uri + * @description The URL of the container registry + */ + readonly url?: string; + /** @description A username for the container registry */ + readonly username?: string; }; }; - default: components["responses"]["error"]; - }; - }; - /** - * Get a dataset - * @description Get a dataset - */ - "datasets-get": { - parameters: { - readonly path: { - /** @description The ID of the dataset */ - id: string; - }; }; responses: { /** @description Successful response */ 200: { content: { readonly "application/json": { - /** @description The description of the dataset */ - readonly description: string | null; /** * Format: date-time - * @description The date the dataset was created + * @description The date the container registry was created */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the dataset was last modified + * @description The date the container registry was last modified */ readonly dtModified: Date; - /** @description The ID of the dataset */ + /** @description The id of the container registry */ readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; + /** @description The name of the container registry */ + readonly name: string; + /** @description The namespace of the container registry */ + readonly namespace: string; + /** @description The URL of the container registry */ + readonly url: string; + /** @description A username for the container registry */ + readonly username: string; }; }; }; @@ -3702,53 +4189,41 @@ export interface operations { }; }; /** - * Update a dataset - * @description Update a dataset + * Delete a container registry + * @description Deletes a container registry for the current team. */ - "datasets-update": { + "containerRegistries-delete": { parameters: { readonly path: { - /** @description The ID of the dataset */ + /** @description The id of the container registry */ id: string; }; }; - readonly requestBody: { - readonly content: { - readonly "application/json": { - /** @description The description of the dataset */ - readonly description?: (Record | string) | null; - /** @description The name of the dataset */ - readonly name?: string; - }; - }; - }; responses: { /** @description Successful response */ 200: { content: { readonly "application/json": { - /** @description The description of the dataset */ - readonly description: string | null; /** * Format: date-time - * @description The date the dataset was created + * @description The date the container registry was created */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the dataset was last modified + * @description The date the container registry was last modified */ readonly dtModified: Date; - /** @description The ID of the dataset */ + /** @description The id of the container registry */ readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; + /** @description The name of the container registry */ + readonly name: string; + /** @description The namespace of the container registry */ + readonly namespace: string; + /** @description The URL of the container registry */ + readonly url: string; + /** @description A username for the container registry */ + readonly username: string; }; }; }; @@ -3756,13 +4231,13 @@ export interface operations { }; }; /** - * Delete a dataset - * @description Delete a dataset + * Test a container registry connection + * @description Validate that a container registry can be connected to using the provided credentials. */ - "datasets-delete": { + "containerRegistries-testConnection": { parameters: { readonly path: { - /** @description The ID of the dataset */ + /** @description The id of the container registry */ id: string; }; }; @@ -3771,8 +4246,10 @@ export interface operations { 200: { content: { readonly "application/json": { - /** @description The ID of the dataset */ - readonly id: string; + /** @description The error message, if any */ + readonly error?: string; + /** @description Whether the connection was successful */ + readonly success: boolean; }; }; }; @@ -3825,7 +4302,8 @@ export interface operations { | ( | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -4088,6 +4566,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -4102,30 +4587,15 @@ export interface operations { /** @enum {string} */ readonly type: "volume"; } | { - readonly name: string; - readonly path?: string; - /** @enum {string} */ - readonly type: "git-lfs"; - /** Format: uri */ - readonly url: string; - })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; - readonly name: string; - readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -4296,6 +4766,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -4317,23 +4794,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -4436,7 +4898,8 @@ export interface operations { readonly config: | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -4699,6 +5162,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -4720,23 +5190,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -4907,6 +5362,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -4928,23 +5390,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -5031,7 +5478,8 @@ export interface operations { | ( | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -5294,6 +5742,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -5315,23 +5770,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -5502,6 +5942,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -5523,23 +5970,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -5686,7 +6118,8 @@ export interface operations { | ( | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -5949,6 +6382,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -5970,23 +6410,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -6157,6 +6582,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -6178,23 +6610,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -6754,12 +7171,14 @@ export interface operations { readonly items: readonly ({ /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -6803,31 +7222,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -6972,12 +7367,14 @@ export interface operations { readonly data: { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -7021,31 +7418,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -7187,12 +7560,14 @@ export interface operations { readonly "application/json": { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -7236,31 +7611,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -7394,12 +7745,14 @@ export interface operations { readonly data: { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -7443,31 +7796,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -7611,12 +7940,14 @@ export interface operations { readonly data: { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -7660,31 +7991,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -8109,12 +8416,14 @@ export interface operations { readonly data: { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -8158,31 +8467,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -8326,12 +8611,14 @@ export interface operations { readonly data: { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -8375,31 +8662,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -8543,12 +8806,14 @@ export interface operations { readonly data: { /** @description The accelerators of the machine. */ readonly accelerators?: - | readonly ({ + | (readonly ({ /** @description The number of accelerators of this type. */ readonly count: number; + /** @description The amount of memory the accelerator has, if applicable. */ + readonly memory: number | null; /** @description The name of the accelerator. */ readonly name: string; - })[] + })[]) | null; /** @description The agent type of the machine. */ readonly agentType: string; @@ -8592,31 +8857,7 @@ export interface operations { /** @description The ID of the machine. */ readonly id: string; /** @description The type of the machine. */ - readonly machineType: { - /** @description The number of CPUs. */ - readonly cpus: number; - /** @description The name of the GPU. */ - readonly gpu: string | null; - /** @description The label of the machine type. */ - readonly label: string; - /** @description Metadata for the machine type. */ - readonly metadata: - | ({ - [key: string]: unknown | undefined; - }) - | null; - /** @description The name of the NVLink GPU. */ - readonly nvlinkGpu: string | null; - /** @description The number of NVLink GPUs. */ - readonly nvlinkGpuCount: number | null; - /** - * Format: int64 - * @description The amount of RAM in bytes. - */ - readonly ram: number; - /** @description Whether the machine type supports NVLink. */ - readonly supportsNvlink: boolean; - }; + readonly machineType: string; /** @description The name of the machine. */ readonly name: string; /** @description The ID of the network the machine is on. */ @@ -8724,202 +8965,16 @@ export interface operations { | "vm-shutdown-force" | "vm-upgrade"; /** - * @description The state of the event, e.g. "done". - * @enum {string} - */ - readonly state: - | "new" - | "in progress" - | "done" - | "error" - | "cancelled"; - }; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * List models - * @description List models - */ - "models-list": { - parameters: { - readonly query: { - /** @description Fetch the next page of results after this cursor. */ - after?: string; - /** @description The number of items to fetch after this page. */ - limit?: number; - /** @description Order results by one of these fields. */ - orderBy?: "dtCreated"; - /** @description The order to sort the results by. */ - order?: "asc" | "desc"; - projectId?: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description Whether there are more pages of results available. */ - readonly hasMore: boolean; - /** @description The items on this page. */ - readonly items: readonly ({ - /** @description The description of the dataset */ - readonly description: string | null; - /** - * Format: date-time - * @description The date the dataset was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the dataset was last modified + * @description The state of the event, e.g. "done". + * @enum {string} */ - readonly dtModified: Date; - /** @description The ID of the dataset */ - readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string; - /** @description The ID of the project */ - readonly projectId: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; - })[]; - /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ - readonly nextPage?: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Create a model - * @description Create a model - */ - "models-create": { - readonly requestBody: { - readonly content: { - readonly "application/json": { - /** @description The description of the model */ - readonly description?: (Record | string) | null; - /** @description Whether the model is public */ - readonly isPublic: boolean; - /** @description The name of the model */ - readonly name: string; - /** @description The ID of the project */ - readonly projectId?: string; - /** @description The ID of the storage provider */ - readonly storageProviderId?: string; - }; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The description of the dataset */ - readonly description: string | null; - /** - * Format: date-time - * @description The date the dataset was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the dataset was last modified - */ - readonly dtModified: Date; - /** @description The ID of the dataset */ - readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the project */ - readonly projectId: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Get a model - * @description Get a model - */ - "models-get": { - parameters: { - readonly path: { - /** @description The ID of the model */ - id: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The description of the dataset */ - readonly description: string | null; - /** - * Format: date-time - * @description The date the dataset was created - */ - readonly dtCreated: Date; - /** - * Format: date-time - * @description The date the dataset was last modified - */ - readonly dtModified: Date; - /** @description The ID of the dataset */ - readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the project */ - readonly projectId: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; - }; - }; - }; - default: components["responses"]["error"]; - }; - }; - /** - * Delete a model - * @description Delete a model - */ - "models-delete": { - parameters: { - readonly path: { - /** @description The ID of the model */ - id: string; - }; - }; - responses: { - /** @description Successful response */ - 200: { - content: { - readonly "application/json": { - /** @description The ID of the model */ - readonly id: string; + readonly state: + | "new" + | "in progress" + | "done" + | "error" + | "cancelled"; + }; }; }; }; @@ -9155,25 +9210,27 @@ export interface operations { /** @description Successful response */ 200: { content: { - readonly "application/json": { - /** - * Format: date-time - * @description The date the private network was created. - */ - readonly dtCreated: Date; - /** @description The date the private network was deleted. */ - readonly dtDeleted?: (Record | Date) | null; - /** @description The ID of the private network. */ - readonly id: string; - /** @description The name of the private network. */ - readonly name: string; - /** @description The subnet mask of the private network. */ - readonly netmask: string; - /** @description The network prefix of the private network. */ - readonly network: string; - /** @description The region the private network is in. */ - readonly region: string; - }; + readonly "application/json": + | ({ + /** + * Format: date-time + * @description The date the private network was created. + */ + readonly dtCreated: Date; + /** @description The date the private network was deleted. */ + readonly dtDeleted?: (Record | Date) | null; + /** @description The ID of the private network. */ + readonly id: string; + /** @description The name of the private network. */ + readonly name: string; + /** @description The subnet mask of the private network. */ + readonly netmask: string; + /** @description The network prefix of the private network. */ + readonly network: string; + /** @description The region the private network is in. */ + readonly region: string; + }) + | null; }; }; default: components["responses"]["error"]; @@ -9579,56 +9636,692 @@ export interface operations { | "deployment.autoscaling.enabled" | "deployment.autoscaling.disabled"; /** - * @description The actor that performed the action. Either a use or system. + * @description The actor that performed the action. Either a use or system. + * @default null + */ + readonly actor?: + | ({ + /** + * @description The avatar URL of the actor + * @default null + */ + readonly avatarUrl?: string | null; + /** + * @description The email of the actor + * @default null + */ + readonly email?: string | null; + /** + * @description The full name of the actor (e.g. "John Doe") + * @default null + */ + readonly fullName?: string | null; + }) + | null; + /** + * @description The data associated with the activity item + * @default null + */ + readonly data?: { + readonly from: number; + readonly to: number; + } | null; + /** + * @description The deployment associated with the activity item + * @default null + */ + readonly deployment?: { + /** @description The ID of the deployment */ + readonly id: string; + /** @description The name of the deployment */ + readonly name: string; + } | null; + /** + * Format: date-time + * @description The date the activity item was created + */ + readonly dtCreated: Date; + /** + * Format: uuid + * @description ID of the activity item + */ + readonly id: string; + })[]; + /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ + readonly nextPage?: string; + }; + }; + }; + default: components["responses"]["error"]; + }; + }; + /** + * List a project's apps + * @description Fetches a list of apps for a project. + */ + "projectApps-list": { + parameters: { + readonly query: { + /** @description Fetch the next page of results after this cursor. */ + after?: string; + /** @description The number of items to fetch after this page. */ + limit?: number; + /** @description Order results by one of these fields. */ + orderBy?: "dtCreated"; + /** @description The order to sort the results by. */ + order?: "asc" | "desc"; + /** @description The name of the app to filter by */ + name?: string; + }; + readonly path: { + /** @description The ID of the project to fetch apps for */ + id: string; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** @description Whether there are more pages of results available. */ + readonly hasMore: boolean; + /** @description The items on this page. */ + readonly items: readonly ({ + /** + * Format: date-time + * @description The date the deployment was created + */ + readonly dtCreated: Date; + /** @description The unique endpoint for the deployment */ + readonly endpoint: string; + /** @description The ID of the deployment */ + readonly id: string; + /** + * @description The latest deployment configuration. If invalid, null is returned. * @default null */ - readonly actor?: + readonly latestSpec?: | ({ + /** @description The data for the deployment spec */ + readonly data?: + | ( + | ( + | ({ + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly models?: readonly ({ + readonly id: string; + readonly path?: string; + })[]; + readonly name: string; + /** @default 80 */ + readonly port?: number; + readonly region?: string; + readonly repositories?: { + readonly dataset: string; + readonly mountPath?: string; + readonly repositories: readonly ({ + readonly name: string; + readonly password?: string; + readonly ref?: string; + readonly url: string; + readonly username?: string; + })[]; + }; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly instanceType: string; + /** @default 1 */ + readonly replicas?: number; + }; + }) + | ({ + /** @enum {string} */ + readonly apiVersion: "v0alpha1"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthchecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { + readonly accessKeyId: string; + readonly endpoint?: string; + readonly name: string; + readonly path?: string; + readonly region?: string; + readonly secretAccessKey: string; + /** @enum {string} */ + readonly type: "s3"; + readonly url: string; + } | { + readonly name: string; + /** @enum {string} */ + readonly type: "volume"; + } | { + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly machineType: string; + readonly ports: readonly (number)[]; + /** @default 1 */ + readonly replicas?: number; + }; + }) + ) + | ({ + readonly apiVersion: "v1" | "latest"; + readonly command?: readonly (string)[]; + readonly containerRegistry?: string; + /** @default true */ + readonly enabled?: boolean; + readonly env?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly healthchecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly healthChecks?: { + readonly liveness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly readiness?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + readonly startup?: { + readonly failureThreshold?: number; + readonly headers?: readonly ({ + readonly name: string; + readonly value: string; + })[]; + readonly host?: string; + readonly initialDelaySeconds?: number; + readonly path: string; + readonly periodSeconds?: number; + readonly port?: number; + readonly timeoutSeconds?: number; + } | { + readonly exec: { + readonly command: readonly (string)[]; + }; + readonly failureThreshold?: number; + readonly initialDelaySeconds?: number; + readonly periodSeconds?: number; + readonly timeoutSeconds?: number; + }; + }; + readonly image: string; + readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { + readonly accessKeyId: string; + readonly endpoint?: string; + readonly name: string; + readonly path?: string; + readonly region?: string; + readonly secretAccessKey: string; + /** @enum {string} */ + readonly type: "s3"; + readonly url: string; + } | { + readonly name: string; + /** @enum {string} */ + readonly type: "volume"; + } | { + readonly name: string; + readonly path?: string; + /** @enum {string} */ + readonly type: "git-lfs"; + /** Format: uri */ + readonly url: string; + })[]; + readonly name: string; + readonly region?: string; + readonly resources: { + readonly autoscaling?: { + readonly enabled?: boolean; + readonly maxReplicas: number; + readonly metrics: readonly ( + | { + /** @enum {string} */ + readonly metric: "requestDuration"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + } + | ({ + /** @enum {string} */ + readonly metric: "cpu" | "memory"; + /** @enum {string} */ + readonly summary: "average"; + readonly value: number; + }) + )[]; + }; + readonly machineType: string; + readonly ports: readonly (number)[]; + /** @default 1 */ + readonly replicas?: number; + }; + }) + ) + | null; + /** @description The ID of the deployment the spec belongs to */ + readonly deploymentId: string; /** - * @description The avatar URL of the actor + * Format: date-time + * @description The date the deployment was marked "healthy" * @default null */ - readonly avatarUrl?: string | null; + readonly dtHealthy?: Date; /** - * @description The email of the actor + * @description The fatal configuration error. Only present if the cluster was unable to apply the entire deployment configuration. This is not the same as an instance error. * @default null */ - readonly email?: string | null; + readonly error?: string | null; /** - * @description The full name of the actor (e.g. "John Doe") + * Format: date-time + * @description The date the deployment configuration was applied to the cluster * @default null */ - readonly fullName?: string | null; + readonly externalApplied?: Date; + /** @description The ID of the deployment spec */ + readonly id: string; + /** + * @description Metadata about the source of the configuration + * @default null + */ + readonly metadata?: + | ({ + readonly gitHeaders?: { + readonly "x-git-actor": string; + readonly "x-git-host": "github" | "gitlab"; + readonly "x-git-owner": string; + readonly "x-git-ref": string; + readonly "x-git-repo": string; + readonly "x-git-sha": string; + }; + }) + | null; + /** @description The ID of the user the deployment belongs to */ + readonly userId: string; }) | null; /** - * @description The data associated with the activity item - * @default null - */ - readonly data?: { - readonly from: number; - readonly to: number; - } | null; - /** - * @description The deployment associated with the activity item + * @description The last version hash for the deployment * @default null */ - readonly deployment?: { - /** @description The ID of the deployment */ - readonly id: string; - /** @description The name of the deployment */ - readonly name: string; - } | null; - /** - * Format: date-time - * @description The date the activity item was created - */ - readonly dtCreated: Date; - /** - * Format: uuid - * @description ID of the activity item - */ - readonly id: string; + readonly latestSpecHash?: string | null; + /** @description The name of the deployment */ + readonly name: string; + /** @description The ID of the project the deployment belongs to */ + readonly projectId: string; + /** @description The ID of the team the deployment belongs to */ + readonly teamId: string; })[]; /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ readonly nextPage?: string; @@ -9809,7 +10502,7 @@ export interface operations { * List a project's deployments * @description Fetches a list of deployments for a project. */ - "projectsDeployments-list": { + "projectDeployments-list": { parameters: { readonly query: { /** @description Fetch the next page of results after this cursor. */ @@ -9820,7 +10513,7 @@ export interface operations { orderBy?: "dtCreated"; /** @description The order to sort the results by. */ order?: "asc" | "desc"; - /** @description The name of the deployment to filter by */ + /** @description The name of the app to filter by */ name?: string; }; readonly path: { @@ -9857,7 +10550,8 @@ export interface operations { | ( | ( | ({ - readonly apiVersion: "v0alpha0" | "latest"; + /** @enum {string} */ + readonly apiVersion: "v0alpha0"; readonly command?: readonly (string)[]; readonly containerRegistry?: string; /** @default true */ @@ -10120,6 +10814,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -10141,23 +10842,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -10328,6 +11014,13 @@ export interface operations { }; readonly image: string; readonly integrations?: readonly ({ + readonly id: string; + readonly name: string; + /** @default /opt/models */ + readonly path?: string; + /** @enum {string} */ + readonly type: "model"; + } | { readonly accessKeyId: string; readonly endpoint?: string; readonly name: string; @@ -10349,23 +11042,8 @@ export interface operations { /** Format: uri */ readonly url: string; })[]; - readonly models?: readonly ({ - readonly id: string; - readonly path?: string; - })[]; readonly name: string; readonly region?: string; - readonly repositories?: { - readonly dataset: string; - readonly mountPath?: string; - readonly repositories: readonly ({ - readonly name: string; - readonly password?: string; - readonly ref?: string; - readonly url: string; - readonly username?: string; - })[]; - }; readonly resources: { readonly autoscaling?: { readonly enabled?: boolean; @@ -10437,19 +11115,268 @@ export interface operations { }) | null; /** - * @description The last version hash for the deployment + * @description The last version hash for the deployment + * @default null + */ + readonly latestSpecHash?: string | null; + /** @description The name of the deployment */ + readonly name: string; + /** @description The ID of the project the deployment belongs to */ + readonly projectId: string; + /** @description The ID of the team the deployment belongs to */ + readonly teamId: string; + })[]; + /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ + readonly nextPage?: string; + }; + }; + }; + default: components["responses"]["error"]; + }; + }; + /** + * List a project's models + * @description Fetches a list of models for a project. + */ + "projectModels-list": { + parameters: { + readonly query: { + /** @description Fetch the next page of results after this cursor. */ + after?: string; + /** @description The number of items to fetch after this page. */ + limit?: number; + /** @description Order results by one of these fields. */ + orderBy?: "dtCreated"; + /** @description The order to sort the results by. */ + order?: "asc" | "desc"; + /** @description The name of the model to filter by */ + name?: string; + }; + readonly path: { + /** @description The ID of the project to fetch models for */ + id: string; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** @description Whether there are more pages of results available. */ + readonly hasMore: boolean; + /** @description The items on this page. */ + readonly items: readonly ({ + /** @description The description of the dataset */ + readonly description: string | null; + /** + * Format: date-time + * @description The date the dataset was created + */ + readonly dtCreated: Date; + /** + * Format: date-time + * @description The date the dataset was last modified + */ + readonly dtModified: Date; + /** @description The ID of the dataset */ + readonly id: string; + /** @description Whether the dataset is public */ + readonly isPublic: boolean; + /** @description The name of the dataset */ + readonly name: string; + /** @description The ID of the project */ + readonly projectId: string | null; + /** @description The ID of the storage provider */ + readonly storageProviderId: string | null; + /** @description The ID of the team that owns the dataset */ + readonly teamId: string; + })[]; + /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ + readonly nextPage?: string; + }; + }; + }; + default: components["responses"]["error"]; + }; + }; + /** + * Add a model to a project + * @description Adds a model to a project. + */ + "projectModels-add": { + parameters: { + readonly path: { + /** @description The ID of the project to add the model to */ + id: string; + /** @description The ID of the model to add to the project */ + modelId: string; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** @description The description of the dataset */ + readonly description: string | null; + /** + * Format: date-time + * @description The date the dataset was created + */ + readonly dtCreated: Date; + /** + * Format: date-time + * @description The date the dataset was last modified + */ + readonly dtModified: Date; + /** @description The ID of the dataset */ + readonly id: string; + /** @description Whether the dataset is public */ + readonly isPublic: boolean; + /** @description The name of the dataset */ + readonly name: string; + /** @description The ID of the project */ + readonly projectId: string | null; + /** @description The ID of the storage provider */ + readonly storageProviderId: string | null; + /** @description The ID of the team that owns the dataset */ + readonly teamId: string; + }; + }; + }; + default: components["responses"]["error"]; + }; + }; + /** + * Remove a model from project + * @description Remove a model from project. + */ + "projectModels-remove": { + parameters: { + readonly path: { + /** @description The ID of the project to remove the model from */ + id: string; + /** @description The ID of the model to remove from the project */ + modelId: string; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** @description The description of the dataset */ + readonly description: string | null; + /** + * Format: date-time + * @description The date the dataset was created + */ + readonly dtCreated: Date; + /** + * Format: date-time + * @description The date the dataset was last modified + */ + readonly dtModified: Date; + /** @description The ID of the dataset */ + readonly id: string; + /** @description Whether the dataset is public */ + readonly isPublic: boolean; + /** @description The name of the dataset */ + readonly name: string; + /** @description The ID of the project */ + readonly projectId: string | null; + /** @description The ID of the storage provider */ + readonly storageProviderId: string | null; + /** @description The ID of the team that owns the dataset */ + readonly teamId: string; + }; + }; + }; + default: components["responses"]["error"]; + }; + }; + /** + * Remove a notebook from a project + * @description Remove a notebook from a project. + */ + "projectNotebooks-remove": { + parameters: { + readonly path: { + /** @description The ID of the project to remove the notebook from */ + id: string; + /** @description The ID of the notebook to remove from the project */ + notebookId: string; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** + * Format: date-time + * @description The date the notebook was created + */ + readonly dtCreated: Date; + /** + * Format: date-time + * @description The date the notebook was last modified + */ + readonly dtModified: Date; + /** + * Format: date-time + * @description The date the notebook was last started + */ + readonly dtStarted: Date; + /** @description The ID of the notebook */ + readonly id: string; + /** @description The type of the machine the notebook is running on */ + readonly machineType: string | null; + /** @description The name of the notebook */ + readonly name: string; + /** @description The notebook repo ID */ + readonly notebookRepoId: string | null; + /** @description The project ID */ + readonly projectId: string; + /** @description The last user to start the notebook */ + readonly startedByUser: { + /** + * Format: email + * @description The email address of the user + */ + readonly email: string; + /** + * @description The first name of the user * @default null */ - readonly latestSpecHash?: string | null; - /** @description The name of the deployment */ - readonly name: string; - /** @description The ID of the project the deployment belongs to */ - readonly projectId: string; - /** @description The ID of the team the deployment belongs to */ - readonly teamId: string; - })[]; - /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ - readonly nextPage?: string; + readonly firstName?: string | null; + /** @description The ID of the user */ + readonly id: string; + /** + * @description The last name of the user + * @default null + */ + readonly lastName?: string | null; + /** + * @description The URL of the team's profile image. + * @default null + */ + readonly publicProfileImageUrl?: string | null; + }; + /** + * @description The state of the notebook. + * @enum {string} + */ + readonly state: + | "Cancel" + | "Cancelled" + | "Error" + | "Failed" + | "Pending" + | "Preempted" + | "Provisioned" + | "Running" + | "Stopped"; }; }; }; @@ -10457,10 +11384,10 @@ export interface operations { }; }; /** - * List a project's models - * @description Fetches a list of models for a project. + * List a project's notebooks + * @description Fetches a list of notebooks for a project. */ - "projectModels-list": { + "projectNotebooks-list": { parameters: { readonly query: { /** @description Fetch the next page of results after this cursor. */ @@ -10468,14 +11395,25 @@ export interface operations { /** @description The number of items to fetch after this page. */ limit?: number; /** @description Order results by one of these fields. */ - orderBy?: "dtCreated"; + orderBy?: "dtCreated" | "name"; /** @description The order to sort the results by. */ order?: "asc" | "desc"; - /** @description The name of the model to filter by */ + /** @description The notebook name to filter by */ name?: string; + /** @description The state of the notebook. */ + state?: + | "Cancel" + | "Cancelled" + | "Error" + | "Failed" + | "Pending" + | "Preempted" + | "Provisioned" + | "Running" + | "Stopped"; }; readonly path: { - /** @description The ID of the project to fetch models for */ + /** @description The ID of the project to fetch notebooks for */ id: string; }; }; @@ -10488,30 +11426,70 @@ export interface operations { readonly hasMore: boolean; /** @description The items on this page. */ readonly items: readonly ({ - /** @description The description of the dataset */ - readonly description: string | null; /** * Format: date-time - * @description The date the dataset was created + * @description The date the notebook was created */ readonly dtCreated: Date; /** * Format: date-time - * @description The date the dataset was last modified + * @description The date the notebook was last modified */ readonly dtModified: Date; - /** @description The ID of the dataset */ + /** + * Format: date-time + * @description The date the notebook was last started + */ + readonly dtStarted: Date; + /** @description The ID of the notebook */ readonly id: string; - /** @description Whether the dataset is public */ - readonly isPublic: boolean; - /** @description The name of the dataset */ - readonly name: string | null; - /** @description The ID of the project */ - readonly projectId: string | null; - /** @description The ID of the storage provider */ - readonly storageProviderId: string | null; - /** @description The ID of the team that owns the dataset */ - readonly teamId: string; + /** @description The type of the machine the notebook is running on */ + readonly machineType: string | null; + /** @description The name of the notebook */ + readonly name: string; + /** @description The notebook repo ID */ + readonly notebookRepoId: string | null; + /** @description The project ID */ + readonly projectId: string; + /** @description The last user to start the notebook */ + readonly startedByUser: { + /** + * Format: email + * @description The email address of the user + */ + readonly email: string; + /** + * @description The first name of the user + * @default null + */ + readonly firstName?: string | null; + /** @description The ID of the user */ + readonly id: string; + /** + * @description The last name of the user + * @default null + */ + readonly lastName?: string | null; + /** + * @description The URL of the team's profile image. + * @default null + */ + readonly publicProfileImageUrl?: string | null; + }; + /** + * @description The state of the notebook. + * @enum {string} + */ + readonly state: + | "Cancel" + | "Cancelled" + | "Error" + | "Failed" + | "Pending" + | "Preempted" + | "Provisioned" + | "Running" + | "Stopped"; })[]; /** @description The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page. */ readonly nextPage?: string; @@ -10521,6 +11499,94 @@ export interface operations { default: components["responses"]["error"]; }; }; + /** + * Add a notebook to a project + * @description Adds a notebook to a project. + */ + "projectNotebooks-add": { + parameters: { + readonly path: { + /** @description The ID of the project to add the notebook to */ + id: string; + /** @description The ID of the notebook to add to the project */ + notebookId: string; + }; + }; + responses: { + /** @description Successful response */ + 200: { + content: { + readonly "application/json": { + /** + * Format: date-time + * @description The date the notebook was created + */ + readonly dtCreated: Date; + /** + * Format: date-time + * @description The date the notebook was last modified + */ + readonly dtModified: Date; + /** + * Format: date-time + * @description The date the notebook was last started + */ + readonly dtStarted: Date; + /** @description The ID of the notebook */ + readonly id: string; + /** @description The type of the machine the notebook is running on */ + readonly machineType: string | null; + /** @description The name of the notebook */ + readonly name: string; + /** @description The notebook repo ID */ + readonly notebookRepoId: string | null; + /** @description The project ID */ + readonly projectId: string; + /** @description The last user to start the notebook */ + readonly startedByUser: { + /** + * Format: email + * @description The email address of the user + */ + readonly email: string; + /** + * @description The first name of the user + * @default null + */ + readonly firstName?: string | null; + /** @description The ID of the user */ + readonly id: string; + /** + * @description The last name of the user + * @default null + */ + readonly lastName?: string | null; + /** + * @description The URL of the team's profile image. + * @default null + */ + readonly publicProfileImageUrl?: string | null; + }; + /** + * @description The state of the notebook. + * @enum {string} + */ + readonly state: + | "Cancel" + | "Cancelled" + | "Error" + | "Failed" + | "Pending" + | "Preempted" + | "Provisioned" + | "Running" + | "Stopped"; + }; + }; + }; + default: components["responses"]["error"]; + }; + }; /** * List a project's secrets * @description Fetches a list of secrets for a project. diff --git a/commands/init/mod.ts b/commands/init/mod.ts index c51df90..ed98981 100644 --- a/commands/init/mod.ts +++ b/commands/init/mod.ts @@ -10,6 +10,8 @@ import { asserts } from "../../lib/asserts.ts"; import { config } from "../../config.ts"; import { paths } from "../../api/openapi.ts"; import { logger } from "../../logger.ts"; +import { apps } from "../../api/apps.ts"; +import { find } from "../../lib/app-config.ts"; /** * This variable is automatically generated by `zcli add`. Do not remove this @@ -95,24 +97,35 @@ export const init = command("init", { ); const existingLinks = await config.get("projects"); - let app: paths["/projects/{id}"]["get"]["responses"]["200"]["content"][ + let app: paths["/apps/{id}"]["get"]["responses"]["200"]["content"][ "application/json" ]; const link = existingLinks[dest]; if (!link) { + const config = await find({}); + logger.info(`Project doesn't exist. Creating a new one.`); - const res = await loading(projects.create({ name: appName }), { - text: "Creating app", - enabled: !flags.json, - }); + + const res = await loading( + apps.create({ + config: { + ...config, + name: appName, + }, + }), + { + text: "Creating app", + enabled: !flags.json, + }, + ); asserts(res.ok, res); app = res.data; } else { logger.info( `Project already exists, skipping creation. (link: ${link.id})`, ); - const res = await projects.get({ id: link.id }); + const res = await apps.get({ id: link.id }); asserts(res.ok, res); app = res.data; } @@ -127,11 +140,11 @@ export const init = command("init", { }); if (!flags.json) { - yield `✨ Created app "${app.name}"`; + yield `✨ Created app "${app.config.name}"`; yield ""; yield fmt.colors.bold("Console URL"); yield new URL( - `/${team}/projects/${app.id}/apps`, + `/${team}/apps/${app.id}`, env.get("PAPERSPACE_CONSOLE_URL"), ) + ""; yield "";