import type { components } from "../generated/api-types"; import type { Job } from "../jobs/types"; /** * Discriminator distinguishing a data plane the calling company owns from one * shared with it. */ export type DataPlaneType = DataPlane["type"]; /** Lifecycle status of a data plane. */ export type DataPlaneStatus = DataPlane["status"]; export type AwsRegion = components["schemas"]["AwsRegion"]; export type AzureRegion = components["schemas"]["AzureRegion"]; export type GcpRegion = components["schemas"]["GcpRegion"]; /** * The region a data plane runs in. A discriminated object rather than the bare * region code a caller might expect: `{ type: "region_aws", id: "us-east-1" }`. */ export type DataPlaneRegion = components["schemas"]["Region"]; export type AwsPlatform = components["schemas"]["AwsPlatform"]; /** * Snowflake platform details for a data plane the calling company owns. * * `region` is informational. Provisioning the Snowflake Native App can fail to * parse a region, and the response then carries an explicit `null` rather than * omitting the key. */ export type SnowflakePlatform = components["schemas"]["SnowflakePlatform"]; /** Platform details returned for a data plane the calling company owns. */ export type DataPlanePlatform = components["schemas"]["Platform"]; export type AwsSharedPlatform = components["schemas"]["AwsSharedResponse"]; /** `region` is informational for the same reason as on {@link SnowflakePlatform}. */ export type SnowflakeSharedPlatform = components["schemas"]["SnowflakeSharedResponse"]; /** * Platform details returned for a data plane shared with the calling company. * Account identifiers are omitted for planes the company does not own. */ export type DataPlaneSharedPlatform = components["schemas"]["PlatformSharedResponse"]; /** * The `platform.type` discriminator of any data plane, owned or shared. Owned and * shared platforms are modelled as separate unions, so this is the flat set of * wire literals across both. */ export type DataPlanePlatformType = DataPlanePlatform["type"] | DataPlaneSharedPlatform["type"]; export type DataPlaneCollaborators = components["schemas"]["DataPlaneCollaborators"]; /** * A data plane the calling company owns. Includes full details such as the * external id and collaborators. * * `compute_pools` is always present, and empty when the plane has no pools. * `description`, `tags`, `last_heartbeat_at` and `default_compute_pool_id` arrive * as an explicit `null` when absent rather than being omitted, so a consumer that * checks for `undefined` will not see one. A plane with no tags sends * `tags: null` rather than `[]`. */ export type DataPlaneOwnedResponse = components["schemas"]["DataPlaneOwnedResponse"]; /** * A data plane shared with the calling company. Omits details like the external * id and collaborators that are only exposed to the owner. `compute_pools` and * the four nullable fields behave as they do on {@link DataPlaneOwnedResponse}. */ export type DataPlaneSharedResponse = components["schemas"]["DataPlaneSharedResponse"]; /** Discriminated union of the owned/shared data plane response shapes. */ export type DataPlane = components["schemas"]["DataPlaneResponse"]; export type HealthCheckRequest = components["schemas"]["EnqueueHealthCheckRequest"]; /** * The backend enqueues a `health_check` job and returns the full job record (201 * Created), not just its id. * * This one name stays on the SDK's own {@link Job} rather than the spec's * `JobResponse`. The spec types a job's `type` as an open string with opaque * `input` and `result`, while `Job` is a discriminated union over the known job * types that `isKnownJob` narrows. */ export type HealthCheckJobResponse = Job;