declare const POSSIBLE_EVENTS: { readonly Ignite: readonly [{ readonly id: "ignite.deployment.created"; readonly name: "Deployment Created"; }, { readonly id: "ignite.deployment.updated"; readonly name: "Deployment Updated"; }, { readonly id: "ignite.deployment.deleted"; readonly name: "Deployment Deleted"; }, { readonly id: "ignite.deployment.build.created"; readonly name: "Build Created"; }, { readonly id: "ignite.deployment.build.started"; readonly name: "Build Started"; }, { readonly id: "ignite.deployment.build.updated"; readonly name: "Build Updated"; }, { readonly id: "ignite.deployment.build.completed"; readonly name: "Build Completed"; }, { readonly id: "ignite.deployment.build.failed"; readonly name: "Build Failed"; }, { readonly id: "ignite.deployment.build.cancelled"; readonly name: "Build Cancelled"; }, { readonly id: "ignite.deployment.rollout.created"; readonly name: "Rollout Created"; }, { readonly id: "ignite.deployment.rollout.updated"; readonly name: "Rollout Updated"; }, { readonly id: "ignite.deployment.container.created"; readonly name: "Container Created"; }, { readonly id: "ignite.deployment.container.updated"; readonly name: "Container Updated"; }, { readonly id: "ignite.deployment.container.metrics_update"; readonly name: "Container Metrics Update"; }, { readonly id: "ignite.deployment.container.deleted"; readonly name: "Container Deleted"; }, { readonly id: "ignite.deployment.healthcheck.created"; readonly name: "Healthcheck Created"; }, { readonly id: "ignite.deployment.healthcheck.updated"; readonly name: "Healthcheck Updated"; }, { readonly id: "ignite.deployment.healthcheck.deleted"; readonly name: "Healthcheck Deleted"; }, { readonly id: "ignite.deployment.healthcheck.events.failed"; readonly name: "Healthcheck Events Failed"; }, { readonly id: "ignite.deployment.healthcheck.events.succeeded"; readonly name: "Healthcheck Events Succeeded"; }, { readonly id: "ignite.deployment.gateway.created"; readonly name: "Gateway Created"; }, { readonly id: "ignite.deployment.gateway.updated"; readonly name: "Gateway Updated"; }, { readonly id: "ignite.deployment.gateway.deleted"; readonly name: "Gateway Deleted"; }]; readonly Project: readonly [{ readonly id: "project.updated"; readonly name: "Updated"; }, { readonly id: "project.member.created"; readonly name: "Member Created"; }, { readonly id: "project.member.updated"; readonly name: "Member Updated"; }, { readonly id: "project.member.deleted"; readonly name: "Member Deleted"; }, { readonly id: "project.tokens.created"; readonly name: "Token Created"; }, { readonly id: "project.tokens.deleted"; readonly name: "Token Deleted"; }, { readonly id: "project.secrets.created"; readonly name: "Secret Created"; }, { readonly id: "project.secrets.updated"; readonly name: "Secret Updated"; }, { readonly id: "project.secrets.deleted"; readonly name: "Secret Deleted"; }, { readonly id: "project.finance.transaction"; readonly name: "Finance Transaction"; }]; }; /** * Utility function to verify hmac signatures * * @param body The stringed body received from the request * @param signature The signature from the X-Hop-Hooks-Signature * @param secret The secret provided upon webhook creation to verify the signature. (e.x: whsec_xxxxx) */ declare function verifyHmac(body: string, signature: string, secret: string): Promise; /** * Utility function that returns a type-safe webhook event, throws if signature is invalid. * * @param body The stringed body received from the request * @param signature The signature from the X-Hop-Hooks-Signature * @param secret The secret provided upon webhook creation to verify the signature. (e.x: whsec_xxxxx) */ declare function constructEvent(body: string, signature: string, secret: string): Promise; /** * All methods the Hop API accepts * @public */ type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; /** * An empty response type * @public */ type Empty = void; /** * Makes individual properties optional in a type * @public */ type MakeOptional = Omit & Partial>; /** * Tag a type to make it unique * @public */ type Tag = T & { /** * Mark a type as having a specific name in the API * @internal */ ___tag: Name; }; /** * An ISO 8601 date strings * @public */ type Timestamp = Tag; /** * Creates a record of params required for a given URL/path * @public */ type ExtractRouteParams = string extends T ? Record : T extends `${string}:${infer Param}/${infer Rest}` ? { [k in Param | keyof ExtractRouteParams]: string | number; } : T extends `${string}:${infer Param}` ? { [k in Param]: string | number; } : {}; /** * An array of all IDs that can be used in the API * @public */ declare const ID_PREFIXES: readonly [{ readonly prefix: "user"; readonly description: "Users"; }, { readonly prefix: "project"; readonly description: "Project"; }, { readonly prefix: "pm"; readonly description: "Project Members"; }, { readonly prefix: "role"; readonly description: "Roles"; }, { readonly prefix: "pi"; readonly description: "Project Invite"; }, { readonly prefix: "ptk"; readonly description: "Project token"; }, { readonly prefix: "pat"; readonly description: "User personal access token"; }, { readonly prefix: "container"; readonly description: "Ignite container"; }, { readonly prefix: "pipe_room"; readonly description: "Pipe room"; }, { readonly prefix: "deployment"; readonly description: "Ignite deployment"; }, { readonly prefix: "bearer"; readonly description: "Users bearer token"; }, { readonly prefix: "ptkid"; readonly description: "Project token ID"; }, { readonly prefix: "secret"; readonly description: "Project secret ID"; }, { readonly prefix: "gateway"; readonly description: "Gateway"; }, { readonly prefix: "domain"; readonly description: "Domain for a gateway"; }, { readonly prefix: "leap_token"; readonly description: "Token for connecting to leap as a client"; }, { readonly prefix: "build"; readonly description: "Build ID for build logs"; }, { readonly prefix: "rollout"; readonly description: "Rollout ID for rollouts."; }, { readonly prefix: "health_check"; readonly description: "Health check ID for health checks."; }, { readonly prefix: "session"; readonly description: "Session ID for sessions on your account."; }, { readonly prefix: "webhook"; readonly description: "Webhook ID for webhooks on a project."; }, { readonly prefix: "deployment_group"; readonly description: "Group ID for Ignite deployments"; }, { readonly prefix: "fleet_group"; readonly description: "Group ID for fleet nodes"; }, { readonly prefix: "event"; readonly description: "Event ID for events sent by webhooks on a project."; }, { readonly prefix: "fleet_node"; readonly description: "Node ID for a fleet node"; }]; /** * A union of all ID prefixes used within the API * @public */ type IdPrefixes = (typeof ID_PREFIXES)[number]['prefix']; /** * A Hop ID is a string that starts with a prefix and a underscore, followed by some unique text. * It is a Pika ID — https://github.com/hopinc/pika * @public */ type Id = `${T}_${string}`; /** * A hop.sh domain (*.hop.sh) * @public */ type HopShDomain = `${string}.hop.sh`; /** * A domain used with internal gateways (*.hop.sh) * @public */ type InternalHopDomain = `${string}.hop`; /** * Any/all IDs that are used within the API * @public */ type AnyId = Id; /** * A union of all possible webhook groups */ type PossibleWebhookGroups = keyof typeof POSSIBLE_EVENTS; /** * A union of all possible webhook event IDs */ type PossibleWebhookIDs = (typeof POSSIBLE_EVENTS)[PossibleWebhookGroups][number]['id']; /** * Checks if a string is a valid Hop ID prefix * * @public * @param prefix - A string that is a potential prefix * @param expect - An expected prefix to check against * @returns - Whether the prefix is valid */ declare function validateIdPrefix(prefix: string, expect?: T): prefix is T; /** * Validates that a string is a valid ID * * @public * @param maybeId - A string that might be an id * @param prefix - Optionally an id prefix to check against * @returns true if the string is an id */ declare function validateId(maybeId: string | undefined | null, prefix?: T | T[]): maybeId is Id; /** * Gets the prefix of an ID * * @public * @param id - A full ID to extract the prefix from * @param expect - An expected prefix to check against * @returns - The prefix of the ID */ declare function getIdPrefix(id: string, expect?: T): T; /** * Casts a string to an ID and asserts that it is of the correct type. * This function will throw if the string is not a valid ID. * * @public * @param maybeId - Cast and assert that a string is an id * @param prefix - Optionally an prefix or array of prefixes to check against * @returns - The ID cast to the correct type */ declare function id(maybeId: string | undefined | null, prefix?: T | T[]): Id; /** * Asserts that a string is a valid ID * @public * @param maybeId - A string that is possibly an ID * @param prefix - A prefix or array of prefixes to check against * @param message - An error message to throw if the ID is invalid */ declare function assertId(maybeId: string | undefined | null, prefix?: T | T[], message?: string): asserts maybeId is Id; /** * API parsable byte size units strings * @public */ declare const byteUnits: readonly ["GB", "MB", "KB", "B"]; /** * Byte size unit type * @public */ type ByteUnit = (typeof byteUnits)[number]; /** * A string representing a byte size * @public */ type ByteSizeString = `${number}${ByteUnit}`; /** * @deprecated Use {@link ByteSizeString} instead * @public */ type ByteString = ByteSizeString; /** * Validates if a string is a valid byte size string * @param value - A string to validate if it is a valid byte size string * @returns If the string is a valid byte size string * @public */ declare function isValidByteString(value: string): value is ByteSizeString; /** * Helper function to converts a numerical size to a valid byte size string * @param size - A size to convert to a valid byte size string * @param unit - An optional unit to as the size unit. Defaults to B * @returns a byte size string * @public */ declare function bytes(size: number, unit?: ByteUnit): ByteSizeString; /** * Converts a kilobyte size to a byte size string * @param size - Kilobytes to convert to a byte size string * @returns a byte size string * @public */ declare function kilobytes(size: number): ByteSizeString; /** * Converts a megabyte size to a byte size string * @param size - Megabytes to convert to a byte size string * @returns a byte size string * @public */ declare function megabytes(size: number): ByteSizeString; /** * Converts a gigabyte size to a byte size string * @param size - Gigabytes to convert to a byte size string * @returns a byte size string * @public */ declare function gigabytes(size: number): ByteSizeString; /** * Parses a byte size string into bytes * @param size - The size of anything in gigabytes, megabytes, kilobytes or bytes * @public */ declare function parseSize(size: string): number; /** * @deprecated Use {@link byteUnits} instead * @public */ declare const units: readonly ["GB", "MB", "KB", "B"]; /** * All regions that Hop operates in * @public */ declare enum Regions { US_EAST_1 = "us-east-1" } /** * Runtime types are used to describe the type of a deployment or container * @public */ declare enum RuntimeType { /** * Ephemeral deployments/containers are sort of fire and forget. Containers won't restart if they exit but they can still be terminated programatically. */ EPHEMERAL = "ephemeral", /** * Persistent deployments/containers will restart if they exit. They can also be started and stopped programmatically. */ PERSISTENT = "persistent", /** * Stateful deployments/containers can only run one container at a time, and will have a persistent volume attached. */ STATEFUL = "stateful" } /** * An enum of states a container can be in * @public */ declare enum ContainerState { /** * The container is pending creation */ PENDING = "pending", /** * The container is running */ RUNNING = "running", /** * The container is stopped */ STOPPED = "stopped", /** * The container's entrypoint failed (e.g. exited with a non-zero exit code) */ FAILED = "failed", /** * The container is being deleted */ TERMINATING = "terminating", /** * The container exited (e.g. with a zero exit code) */ EXITED = "exited" } /** * Rollout state for deployments * @public */ declare enum RolloutState { PENDING = "pending", FINISHED = "finished", FAILED = "failed" } /** * Restart policy for deployments * @public */ declare enum RestartPolicy { NEVER = "never", ALWAYS = "always", ON_FAILURE = "on-failure" } /** * Formats of volumes * @public */ declare enum VolumeFormat { EXT4 = "ext4", XFS = "xfs" } /** * A definition of a volume * @public */ interface VolumeDefinition { /** * The format of the volume */ fs: VolumeFormat; /** * The size of the volume in bytes */ size: ByteSizeString; /** * The mount point of the volume */ mount_path: string; } interface ContainerMetrics { cpu_usage_percent: number; memory_usage_percent: number; memory_usage_bytes: number; } /** * The definition of a container * @public */ interface Container { /** * The ID of the container */ id: Id<'container'>; /** * The time this container was created */ created_at: Timestamp; /** * The region this container runs in */ region: Regions; /** * Information about uptime/downtime for this container */ uptime: { /** * The last time this container was started at */ last_start: Timestamp; }; /** * Metrics for this container */ metrics: ContainerMetrics | null; /** * Information about the container */ metadata: { /** * The last exit code */ last_exit_code?: number; }; /** * Overrides that were provided manually to the container */ overrides: { resources?: Partial; } | null; /** * The type of this container */ type: RuntimeType; /** * The volume definition for this container */ volume: VolumeDefinition | null; /** * The internal IP of the container */ internal_ip: string; /** * The ID of the deployment this container is associated with */ deployment_id: Id<'deployment'>; /** * The state this container is in */ state: ContainerState; } /** * A definition of a deployment * @public */ interface Deployment { /** * The ID of the deployment */ id: Id<'deployment'>; /** * The name of the deployment */ name: string; /** * The amount of containers this deployment is currently running */ container_count: number; /** * The time this deployment was created at */ created_at: Timestamp; /** * The config for this deployment */ config: Omit; /** * Current active rollout for deployment * @deprecated Use {@link Deployment.latest_rollout} instead */ active_rollout: DeploymentRollout | null; /** * Current active build for deployment */ active_build: Build | null; /** * The ID of the build currently being used in production by this deployment. * This will change if another build has been promoted to production. */ build_id: Build['id'] | null; /** * Current active rollout for deployment */ latest_rollout: DeploymentRollout | null; /** * The amount of containers in the running state */ running_container_count: number; /** * The target amount of containers a deployment should run */ target_container_count: number; /** * Metadata for deployment */ metadata: DeploymentMetadata | null; /** * Build cache settings for deployment */ build_cache_enabled: boolean; /** * Build settings for deployment */ build_settings?: BuildSettings; /** * The group the deployment belongs in */ group_id: Id<'deployment_group'> | null; /** * Target node for deployment, if its undefined its inferred as Hop */ target?: DeploymentTarget | undefined; } /** * A definition of a build's settings * @public */ interface BuildSettings { /** * Root directory for build */ root_directory?: string; /** * Specifies where the dockerfile is located */ dockerfile?: string; } /** * Deployment metadata * @public */ interface DeploymentMetadata { /** * Ports that have been found by container's runtime. */ container_port_mappings: Record, string[]>; /** * Whether a user has ignored the onboarding process. */ ignored_boarding?: boolean; /** * Whether the deployment was created from a preset. */ created_from_preset?: string; /** * Whether a gateway has been created for the deployment. */ created_first_gateway?: boolean; /** * Whether a user has acknowledged the ports that have been found by container's runtime. */ ports_acked?: string[]; } /** * Deployment metadata * @deprecated Use {@link DeploymentMetadata} instead * @public */ type DeploymentMetaData = DeploymentMetadata; /** * Metadata attached to a build * @public */ interface BuildMetadata { /** * Account type of repo owner */ account_type?: 'user' | 'organization'; /** * Author information about build */ author?: { /** * Author's Pfp */ avatar_url: string; /** * Author's username */ username: string; }; /** * Repo ID for build */ repo_id: number; /** * Repo name for build */ repo_name: string; /** * Repo branch for build */ branch: string; /** * commit SHA for build */ commit_sha: string; /** * commit message for build */ commit_msg: string; /** * commit URL for build */ commit_url?: string; } /** * Metadata attached to a build * @deprecated Use {@link BuildMetadata} instead * @public */ type BuildMetaData = BuildMetadata; /** * The inferred environment type of a build * @public */ declare enum BuildEnvironmentType { NIXPACKS = "nixpacks", DOCKERFILE = "dockerfile" } /** * The validated nixpacks plan for this build * @public */ interface NixPlan { language: string | null; pkgs: string[] | null; cmds: { build: string | null; start: string | null; install: string | null; }; } /** * Build environment contians information about the * language and build commands used to build the deployment * @public */ interface BuildEnvironment { type: BuildEnvironmentType; nix_plan?: NixPlan | null; } /** * Why the uploaded build content was rejected * @public */ interface ValidationFailure { reason: string; help_link: string | null; } /** * A build is a single build of a deployment * @public */ interface Build { /** * ID of the build */ id: Id<'build'>; /** * Deployment ID for build */ deployment_id: Id<'deployment'>; /** * Metadata pertaining to build (mostly for GitHub) */ metadata: BuildMetadata | null; /** * Build method (GitHub or CLI) */ method: BuildMethod; /** * Timestamp of when the build was created/queued */ created_at?: Timestamp; /** * Timestamp of when the build has started */ started_at: Timestamp | null; /** * Timestamp of when the build has finished */ finished_at: Timestamp | null; /** * Digest for image */ digest: string | null; /** * State of the build */ state: BuildState; /** * Environment for build */ environment: BuildEnvironment | null; /** * Validation failure for build; present if build state is VALIDATION_FAILED */ validation_failure: ValidationFailure | null; } /** * Information about a deployment's health check configuration * @public */ type HealthCheck = { /** * The ID of health check */ id: Id<'health_check'>; /** * Protocol for health check */ protocol: 'http'; /** * Path for health check */ path: string; /** * Port for health check */ port: number; /** * Interval for health check. This is how often the health check will be performed in seconds */ interval: number; /** * How long to wait for a response before considering the health check failed in milliseconds */ timeout: number; /** * How long we should wait when the container starts before performing the first health check. * This is useful for containers that take a while to start up, for example when running migrations. * This value is in seconds */ initial_delay: number; /** * Maximum number of consecutive failures before the container is considered unhealthy */ max_retries: number; /** * When the health check was created */ created_at: Timestamp; }; type Group = { /** * The ID of the group */ id: Id<'deployment_group'>; /** * The name of the group */ name: string; /** * The ID of the project the group belongs to */ project_id: Id<'project'>; /** * The position of the group in the list */ position: number; /** * The date the group was created */ created_at: Timestamp; }; /** * A deployment rollout * @public */ type DeploymentRollout = { /** * The rollout ID for rollout */ id: Id<'rollout'>; /** * The deployment ID for rollout */ deployment_id: Id<'deployment'>; /** * How many containers are being recreated */ count: number; /** * When the rollout took place */ created_at: Timestamp; /** * The state of the rollout */ state: RolloutState; /** * The build that triggered the rollout */ build: Build | null; /** * Container ID that the rollout is pertaining to */ init_container_id: string | null; /** * If a health check failed (causing the rollout to fail) */ health_check_failed: boolean; /** * Last time latest rollout was updated */ last_updated_at: Timestamp; /** * Has the rollout been acknowledged by a user */ acknowledged: boolean; }; /** * Data required to create a deployment * @internal */ type CreateDeploymentConfig = MakeOptional; /** * The strategy for scaling multiple containers. * @public */ declare enum ContainerStrategy { /** * Add containers yourself with the API or Console */ MANUAL = "manual" } /** * A deployment's config * @public */ interface DeploymentConfig { /** * The name of the deployment */ name: string; /** * The strategy for scaling multiple containers. */ container_strategy: ContainerStrategy; /** * The type of this deployment */ type: RuntimeType; /** * The version of this config */ version: '12-12-2022'; /** * Entrypoint command for the image */ cmd?: string[]; /** * The docker image config for this deployment */ image: Image; /** * Environment variables for this deployment */ env: Record; /** * Resources allocated to this deployment */ resources: Resources; /** * Restart policy for this deployment */ restart_policy: RestartPolicy; /** * The volume definition for this deployment * * This can only be used when .type is 'stateful' */ volume?: VolumeDefinition; /** * Entrypoint for this deployment */ entrypoint?: string[]; /** * Target node for deployment, if its undefined its inferred as Hop */ target?: DeploymentTarget | undefined; } /** * Docker image config * @public */ interface Image { /** * The name of the docker image */ name: string | null; /** * Authorization required for the registry to access this image * This is not required if you use Hop's own registry. */ auth: Auth | null; /** * GitHub repo information (if applicable) */ gh_repo: ImageGHRepo | null; } interface DeploymentTarget { /** * The type of target (Hop, Fleet Node) (fleet group coming later) */ type: 'hop' | 'fleet_node'; /** * The data of the target */ data: Node | null; } /** * Docker image registry authorization * @public */ interface Auth { username: string; password: string; } /** * GitHub repo type sent from API (NOT USED IN IMAGES) * @public */ interface GHRepo { id: number; full_name: string; private: boolean; default_branch: string; account_name: string; } /** * GitHub repo partial used for images * @public */ interface ImageGHRepo { repo_id: number; full_name: string; branch: string; } /** * Resources allocated to a deployment * @public */ interface Resources { /** * Amount of vCPU to allocate */ vcpu: number; /** * Amount of memory to allocate in a readible format * You can use the `parseSize` function to convert this to bytes. */ ram: ByteSizeString; } /** * Logs from a container * @public */ interface ContainerLog { /** * The timestamp of the log */ timestamp: Timestamp; /** * The log message */ message: string; /** * The ID of the document in elasticsearch. You probably won't have to use this, but * it might be useful for React keys, for example, as they are unique. */ nonce: string; /** * The level of the log * * ("error" and "log" are for backwards compatibility, new logs will be "stdout" and "stderr") */ level: 'stdout' | 'stderr' | 'error' | 'info'; } /** * Types of build methods supported by Hop * @public */ declare enum BuildMethod { GITHUB = "github", CLI = "cli" } /** * Types of gateways supported by Hop * @public */ declare enum GatewayType { /** * The gateway can only be accessed inside of a project's network */ INTERNAL = "internal", /** * The gateway can be accessed from the internet */ EXTERNAL = "external" } /** * Gateways are used to connect services to the internet or a private network * @public */ interface Gateway { /** * The ID of the gateway */ id: Id<'gateway'>; /** * The type of the gateway */ type: GatewayType; /** * The name of the gateway */ name: string; /** * The protocol for this gateway (Only for external) * * @alpha Currently, hop only supports HTTP. This will eventually change to an enum */ protocol: 'http' | null; /** * The deployment this gateway is associated with */ deployment_id: Id<'deployment'>; /** * The date this gateway was created */ created_at: Timestamp; /** * Domain automatically assigned by Hop */ hopsh_domain: HopShDomain | null; /** * Determines if the hop.sh domain is current active. */ hopsh_domain_enabled: boolean; /** * Internal domain assigned by user upon gateway creation */ internal_domain: InternalHopDomain | null; /** * Port the Gateway targets (Only for external gateways) */ target_port: number | null; /** * Domains associated with this gateway */ domains: Domain[]; } /** * An enum of states a domain can be in * @public */ declare enum DomainState { PENDING = "pending", VALID_CNAME = "valid_cname", SSL_ACTIVE = "ssl_active" } /** * An enum of states a build can be in * @public */ declare enum BuildState { VALIDATING = "validating", PENDING = "pending", FAILED = "failed", SUCCEEDED = "succeeded", CANCELLED = "cancelled", VALIDATION_FAILED = "validation_failed" } /** * A domain is a DNS record that points to a gateway * @public */ interface Domain { /** * The ID of the domain */ id: Id<'domain'>; /** * The domain name */ domain: string; /** * The domain state */ state: DomainState; /** * The date this domain was created */ created_at: Timestamp; /** * Where the domain redirects to and its status code, null if N/A */ redirect: DomainRedirect | null; } /** * A redirect setup for a domain * @public */ interface DomainRedirect { url: string; status_code: 301 | 302 | 307 | 308; } /** * All endpoints for the Ignite API * @public */ type IgniteEndpoints = Endpoint<'GET', '/v1/ignite/deployments', { deployments: Deployment[]; groups: Group[]; }> | Endpoint<'GET', '/v1/ignite/deployments/:deployment_id/containers', { containers: Container[]; }> | Endpoint<'POST', '/v1/ignite/deployments/:deployment_id/containers', { container: Container; }> | Endpoint<'POST', '/v1/ignite/deployments/:deployment_id/containers/:container_id', never, { /** * The ID of the deployment */ deployment_id: Id<'deployment'>; /** * The ID of the container */ container_id: Id<'container'>; }> | Endpoint<'POST', '/v1/ignite/deployments', { deployment: Deployment; }, CreateDeploymentConfig> | Endpoint<'DELETE', '/v1/ignite/deployments/:deployment_id', Empty> | Endpoint<'DELETE', '/v1/ignite/containers/:container_id', Empty | { container: Container; }> | Endpoint<'GET', '/v1/ignite/containers/:container_id/logs', { logs: ContainerLog[]; }> | Endpoint<'GET', '/v1/ignite/deployments/search', { deployment: Deployment; }> | Endpoint<'GET', '/v1/ignite/deployments/:deployment_id', { deployment: Deployment; }> | Endpoint<'PUT', '/v1/ignite/containers/:container_id/state', Empty, { /** * The state to update the container to */ preferred_state: ContainerState.STOPPED | ContainerState.RUNNING; }> | Endpoint<'POST', '/v1/ignite/gateways/:gateway_id/domains', Empty, { domain: string; }> | Endpoint<'GET', '/v1/ignite/gateways/:gateway_id', { gateway: Gateway; }> | Endpoint<'GET', '/v1/ignite/deployments/:deployment_id/gateways', { gateways: Gateway[]; }> | Endpoint<'POST', '/v1/ignite/deployments/:deployment_id/gateways', { gateway: Gateway; }, { type: GatewayType; target_port: number; protocol: Gateway['protocol']; name: string; }> | Endpoint<'PATCH', '/v1/ignite/deployments/:deployment_id', { deployment: Deployment; }, Partial> | Endpoint<'PATCH', '/v1/ignite/deployments/:deployment_id/metadata', { deployment: Deployment; }, Partial> | Endpoint<'POST', '/v1/ignite/deployments/:deployment_id/rollouts', { rollout: DeploymentRollout; }> | Endpoint<'POST', '/v1/ignite/deployments/:deployment_id/health-check', { health_check: HealthCheck; }, Omit> | Endpoint<'GET', '/v1/ignite/deployments/:deployment_id/storage', Record<'volume' | 'build_cache', Record<'provisioned_size' | 'used_size', number> | null>> | Endpoint<'PATCH', '/v1/ignite/deployments/:deployment_id/health-check', { health_check: HealthCheck; }, Partial>> | Endpoint<'DELETE', '/v1/ignite/domains/:domain_id', Empty> | Endpoint<'GET', '/v1/ignite/domains/:domain_id', { domain: Domain; }> | Endpoint<'POST', '/v1/ignite/groups', { group: Group; }, { name: string; deployment_ids: Id<'deployment'>[]; position?: number | undefined; }> | Endpoint<'PATCH', '/v1/ignite/groups/:group_id', { group: Group; }, { name?: string | undefined; position?: number | undefined; }> | Endpoint<'PUT', '/v1/ignite/groups/:group_id/deployments/:deployment_id', { group: Group; }> | Endpoint<'DELETE', '/v1/ignite/groups/:group_id', Empty> | Endpoint<'DELETE', '/v1/ignite/deployments/:deployment_id/group', Empty>; type ignite_Auth = Auth; type ignite_Build = Build; type ignite_BuildEnvironment = BuildEnvironment; type ignite_BuildEnvironmentType = BuildEnvironmentType; declare const ignite_BuildEnvironmentType: typeof BuildEnvironmentType; type ignite_BuildMetaData = BuildMetaData; type ignite_BuildMetadata = BuildMetadata; type ignite_BuildMethod = BuildMethod; declare const ignite_BuildMethod: typeof BuildMethod; type ignite_BuildSettings = BuildSettings; type ignite_BuildState = BuildState; declare const ignite_BuildState: typeof BuildState; type ignite_Container = Container; type ignite_ContainerLog = ContainerLog; type ignite_ContainerMetrics = ContainerMetrics; type ignite_ContainerState = ContainerState; declare const ignite_ContainerState: typeof ContainerState; type ignite_ContainerStrategy = ContainerStrategy; declare const ignite_ContainerStrategy: typeof ContainerStrategy; type ignite_CreateDeploymentConfig = CreateDeploymentConfig; type ignite_Deployment = Deployment; type ignite_DeploymentConfig = DeploymentConfig; type ignite_DeploymentMetaData = DeploymentMetaData; type ignite_DeploymentMetadata = DeploymentMetadata; type ignite_DeploymentRollout = DeploymentRollout; type ignite_DeploymentTarget = DeploymentTarget; type ignite_Domain = Domain; type ignite_DomainRedirect = DomainRedirect; type ignite_DomainState = DomainState; declare const ignite_DomainState: typeof DomainState; type ignite_GHRepo = GHRepo; type ignite_Gateway = Gateway; type ignite_GatewayType = GatewayType; declare const ignite_GatewayType: typeof GatewayType; type ignite_Group = Group; type ignite_HealthCheck = HealthCheck; type ignite_IgniteEndpoints = IgniteEndpoints; type ignite_Image = Image; type ignite_ImageGHRepo = ImageGHRepo; type ignite_NixPlan = NixPlan; type ignite_Regions = Regions; declare const ignite_Regions: typeof Regions; type ignite_Resources = Resources; type ignite_RestartPolicy = RestartPolicy; declare const ignite_RestartPolicy: typeof RestartPolicy; type ignite_RolloutState = RolloutState; declare const ignite_RolloutState: typeof RolloutState; type ignite_RuntimeType = RuntimeType; declare const ignite_RuntimeType: typeof RuntimeType; type ignite_ValidationFailure = ValidationFailure; type ignite_VolumeDefinition = VolumeDefinition; type ignite_VolumeFormat = VolumeFormat; declare const ignite_VolumeFormat: typeof VolumeFormat; declare namespace ignite { export { ignite_Auth as Auth, ignite_Build as Build, ignite_BuildEnvironment as BuildEnvironment, ignite_BuildEnvironmentType as BuildEnvironmentType, ignite_BuildMetaData as BuildMetaData, ignite_BuildMetadata as BuildMetadata, ignite_BuildMethod as BuildMethod, ignite_BuildSettings as BuildSettings, ignite_BuildState as BuildState, ignite_Container as Container, ignite_ContainerLog as ContainerLog, ignite_ContainerMetrics as ContainerMetrics, ignite_ContainerState as ContainerState, ignite_ContainerStrategy as ContainerStrategy, ignite_CreateDeploymentConfig as CreateDeploymentConfig, ignite_Deployment as Deployment, ignite_DeploymentConfig as DeploymentConfig, ignite_DeploymentMetaData as DeploymentMetaData, ignite_DeploymentMetadata as DeploymentMetadata, ignite_DeploymentRollout as DeploymentRollout, ignite_DeploymentTarget as DeploymentTarget, ignite_Domain as Domain, ignite_DomainRedirect as DomainRedirect, ignite_DomainState as DomainState, ignite_GHRepo as GHRepo, ignite_Gateway as Gateway, ignite_GatewayType as GatewayType, ignite_Group as Group, ignite_HealthCheck as HealthCheck, ignite_IgniteEndpoints as IgniteEndpoints, ignite_Image as Image, ignite_ImageGHRepo as ImageGHRepo, ignite_NixPlan as NixPlan, ignite_Regions as Regions, ignite_Resources as Resources, ignite_RestartPolicy as RestartPolicy, ignite_RolloutState as RolloutState, ignite_RuntimeType as RuntimeType, ignite_ValidationFailure as ValidationFailure, ignite_VolumeDefinition as VolumeDefinition, ignite_VolumeFormat as VolumeFormat, }; } /** * A protocol that can be used to deliver a stream * @public */ type DeliveryProtocol = 'webrtc' | 'hls'; /** * A room that you can stream to * @public */ interface Room { /** * The ID of this stream */ id: Id<'pipe_room'>; /** * The name of this room */ name: string; /** * The unix timestamp of when this stream was created */ created_at: Timestamp; /** * Protocol you can stream with */ ingest_protocol: 'rtmp'; /** * Protocols that are supported by this room to the client */ delivery_protocols: DeliveryProtocol[]; /** * A join token to subscribe into this room */ join_token: string; /** * The region that the stream url is located in */ ingest_region: Regions; /** * The URL that you can stream to */ ingest_endpoint: string; /** * The state of the stream currently */ state: 'live' | 'offline'; } /** * The endpoints for the pipe API * @public */ type PipeEndpoints = Endpoint<'GET', '/v1/pipe/rooms', { rooms: Room[]; }> | Endpoint<'POST', '/v1/pipe/rooms', { room: Room; }, { /** * The name of the stream */ name: string; ingest_protocol: 'rtmp' | 'rtp'; delivery_protocols: DeliveryProtocol[]; region: Regions; ephemeral: boolean; llhls_config?: { wcl_delay: number; artificial_delay: number; max_playout_bitrate_preset: string; } | undefined; }> | Endpoint<'DELETE', '/v1/pipe/rooms/:room_id', Empty>; type pipe_DeliveryProtocol = DeliveryProtocol; type pipe_PipeEndpoints = PipeEndpoints; type pipe_Room = Room; declare namespace pipe { export { pipe_DeliveryProtocol as DeliveryProtocol, pipe_PipeEndpoints as PipeEndpoints, pipe_Room as Room, }; } /** * A user object * @public */ interface User { /** * The ID of the user */ id: Id<'user'>; /** * The name of the user. Think of this as a display name */ name: string; /** * A unqiue username for the user */ username: string; /** * The email of the user */ email: string; /** * The date the user was created */ created_at: Timestamp; } /** * Self User Object * @public */ interface SelfUser extends User { /** * If user has verified their email */ email_verified: boolean; /** * If user has enabled totp authentication */ totp_enabled: boolean; /** * If user has enabled webauthn authentication */ webauthn_enabled: boolean; /** * If user has enabled mfa authentication */ mfa_enabled: boolean; /** * If user is an admin */ admin: boolean; } /** * A personal access token * @public */ interface PAT { /** * The ID of the pat */ id: Id<'pat'>; /** * The name of the pat */ name: string | null; /** * The pat token * * @alpha This value will be partially censored if it */ pat: string; /** * The date the pat was created */ created_at: Timestamp; } /** * All user endpoints * @public */ type UserEndpoints = Endpoint<'GET', '/v1/users/@me', { projects: Project[]; user: SelfUser; project_member_role_map: Record, MemberRole>; leap_token: string | null; }> | Endpoint<'POST', '/v1/users/@me/pats', { pat: PAT; }, { name: string; }> | Endpoint<'GET', '/v1/users/@me/pats', { pats: PAT[]; }> | Endpoint<'DELETE', '/v1/users/@me/pats/:pat_id', Empty>; type users_PAT = PAT; type users_SelfUser = SelfUser; type users_User = User; type users_UserEndpoints = UserEndpoints; declare namespace users { export { users_PAT as PAT, users_SelfUser as SelfUser, users_User as User, users_UserEndpoints as UserEndpoints, }; } /** * A member is a partial user with information about their membership in a project * @public */ type Member = Omit & { /** * The ID of the project member */ id: Id<'pm'>; /** * The role that this member has in a project */ role: MemberRole; /** * If user has multi-factor authentication enabled. */ mfa_enabled: boolean; /** * The date that this member joined the project */ joined_at: Timestamp; }; /** * A project tier * @public */ declare enum ProjectTier { FREE = "free", PAID = "paid" } /** * A role that a member can have in a project * @public */ interface MemberRole { /** * The ID of the role */ id: Id<'role'>; /** * The name of the role */ name: string; /** * The flags for this role */ flags: number; } /** * A project token for a project * @public */ interface ProjectToken { /** * The Id of the project token */ id: Id<'ptkid'>; /** * The key value. This will likely have half of the key obfuscated */ token: Id<'ptk'>; /** * The time this project token was created */ created_at: Timestamp; /** * Permissions and flags that this project token can perform */ flags: number; } /** * Type of a project * @public */ declare enum ProjectType { /** * A standard project type */ REGULAR = "regular", /** * A personal project are created when you register an account */ PERSONAL = "personal" } /** * A project on Hop * @public */ interface Project { /** * The ID of the project */ id: Id<'project'>; /** * The name of the project */ name: string; /** * The tier this project is */ tier: ProjectTier; /** * The time this project was created at */ created_at: Timestamp; /** * An icon for this project */ icon: string | null; /** * The registry namespace for this project */ namespace: string; /** * The type of this project. Either regular or personal */ type: ProjectType; default_quotas: DefaultQuotas; quota_overrides: QuotaOverrides; quota_usage: QuotaUsage; } /** * Default quotas for a project * @public */ interface DefaultQuotas { vcpu: number; ram: number; volume: number; } /** * Quota overrides for a project * @public */ interface QuotaOverrides { } /** * Current usage of a quota for a project * @public */ interface QuotaUsage { vcpu: number; ram: number; volume: number; } /** * A secret is a key/value pair that can be used to store sensitive information * @public */ interface Secret { /** * The ID of the secret */ id: Id<'secret'>; /** * The name of the secret */ name: string; /** * A digest hash of the secret */ digest: string; /** * The time this secret was created at */ created_at: Timestamp; /** * Deployment IDs this secret is used by */ in_use_by: Id<'deployment'>[]; } /** * Webhooks are used to send an event to an endpoint when something within Hop happens. * @public */ interface Webhook { /** * The time this webhook was created at */ created_at: Timestamp; /** * The events that this webhook is subscribed to */ events: PossibleWebhookIDs[]; /** * The ID of the webhook */ id: Id<'webhook'>; /** * The ID of the project this webhook is for */ project_id: Id<'project'>; /** * The secret for this webhook * @warning This is censored after creation * @example whsec_xxxxxxxx */ secret: string; /** * The type of the webhook */ type: 'http'; /** * The URL that this webhook will send events to, acts as an endpoint */ webhook_url: string; } /** * An event is sent from a webhook to an endpoint */ interface HealthCheckEventUpdate { state: 'failed' | 'succeeded' | 'pending'; container_id: string; deployment_id: string; } type EventDataMap = { 'ignite.deployment.container.updated': Container; 'ignite.deployment.container.created': Container; 'ignite.deployment.container.deleted': Container; 'ignite.deployment.created': Deployment; 'ignite.deployment.updated': Deployment; 'ignite.deployment.deleted': Deployment; 'ignite.deployment.build.created': Build; 'ignite.deployment.build.updated': Build; 'ignite.deployment.rollout.created': DeploymentRollout; 'ignite.deployment.rollout.updated': DeploymentRollout; 'ignite.deployment.container.metrics_update': ContainerMetrics; 'ignite.deployment.healthcheck.created': HealthCheck; 'ignite.deployment.healthcheck.updated': HealthCheck; 'ignite.deployment.healthcheck.deleted': HealthCheck; 'ignite.deployment.healthcheck.events.failed': HealthCheckEventUpdate; 'ignite.deployment.healthcheck.events.succeeded': HealthCheckEventUpdate; 'ignite.deployment.gateway.created': Gateway; 'ignite.deployment.gateway.updated': Gateway; 'ignite.deployment.gateway.deleted': Gateway; 'project.updated': Project; 'project.member.created': Member; 'project.member.updated': Member; 'project.member.deleted': Member; 'project.tokens.created': ProjectToken; 'project.tokens.deleted': ProjectToken; 'project.secrets.created': Secret; 'project.secrets.updated': Secret; 'project.secrets.deleted': Secret; [key: string]: unknown; }; type Events = E[keyof E]; type Event = Events<{ [Key in PossibleWebhookIDs]: { webhook_id: Id<'webhook'>; /** * The ID of the project that this event is for */ project_id: Id<'project'>; /** * The time this event occurred at */ occurred_at: string; /** * The ID of the event */ id: Id<'event'>; /** * The event that occurred */ event: Key; /** * The data the belongs to the event */ data: EventDataMap[Key]; }; }>; type ProjectsEndpoints = Endpoint<'DELETE', '/v1/projects/:project_id/tokens/:project_token_id', Empty> | Endpoint<'DELETE', '/v1/projects/@this/tokens/:project_token_id', Empty> | Endpoint<'GET', '/v1/projects/:project_id/members/@me', { project_member: Member; }> | Endpoint<'GET', '/v1/projects/:project_id/tokens', { project_tokens: ProjectToken[]; }> | Endpoint<'GET', '/v1/projects/@this/tokens', { project_tokens: ProjectToken[]; }> | Endpoint<'GET', '/v1/projects/:project_id/members', { members: Member[]; }> | Endpoint<'GET', '/v1/projects/@this/members', { members: Member[]; }> | Endpoint<'POST', '/v1/projects/:project_id/tokens', { project_token: ProjectToken & { project: Project; }; }, { flags: number; }> | Endpoint<'POST', '/v1/projects/@this/tokens', { project_token: ProjectToken & { project: Project; }; }, { flags: number; }> | Endpoint<'PUT', '/v1/projects/:project_id/secrets/:name', { secret: Secret; }, string> | Endpoint<'PUT', '/v1/projects/@this/secrets/:name', { secret: Secret; }, string> | Endpoint<'GET', '/v1/projects/:project_id/secrets', { secrets: Secret[]; }> | Endpoint<'GET', '/v1/projects/@this/secrets', { secrets: Secret[]; }> | Endpoint<'DELETE', '/v1/projects/:project_id/secrets/:secret_id', Empty> | Endpoint<'DELETE', '/v1/projects/@this/secrets/:secret_id', Empty> | Endpoint<'GET', '/v1/projects/:project_id/webhooks', { webhooks: Webhook[]; }> | Endpoint<'GET', '/v1/projects/@this/webhooks', { webhooks: Webhook[]; }> | Endpoint<'POST', '/v1/projects/:project_id/webhooks', { webhook: Webhook; }, { webhook_url: string; events: PossibleWebhookIDs[]; }> | Endpoint<'POST', '/v1/projects/@this/webhooks', { webhook: Webhook; }, { webhook_url: string; events: PossibleWebhookIDs[]; }> | Endpoint<'PATCH', '/v1/projects/:project_id/webhooks/:webhook_id', { webhook: Webhook; }, { webhook_url: string | undefined; events: PossibleWebhookIDs[] | undefined; }> | Endpoint<'PATCH', '/v1/projects/@this/webhooks/:webhook_id', { webhook: Webhook; }, { webhook_url: string | undefined; events: PossibleWebhookIDs[] | undefined; }> | Endpoint<'DELETE', '/v1/projects/:project_id/webhooks/:webhook_id', Empty> | Endpoint<'DELETE', '/v1/projects/@this/webhooks/:webhook_id', Empty> | Endpoint<'POST', '/v1/projects/:project_id/webhooks/:webhook_id/regenerate', { secret: Webhook['secret']; }> | Endpoint<'POST', '/v1/projects/@this/webhooks/:webhook_id/regenerate', { secret: Webhook['secret']; }>; type projects_DefaultQuotas = DefaultQuotas; type projects_Event = Event; type projects_EventDataMap = EventDataMap; type projects_HealthCheckEventUpdate = HealthCheckEventUpdate; type projects_Member = Member; type projects_MemberRole = MemberRole; type projects_Project = Project; type projects_ProjectTier = ProjectTier; declare const projects_ProjectTier: typeof ProjectTier; type projects_ProjectToken = ProjectToken; type projects_ProjectType = ProjectType; declare const projects_ProjectType: typeof ProjectType; type projects_ProjectsEndpoints = ProjectsEndpoints; type projects_QuotaOverrides = QuotaOverrides; type projects_QuotaUsage = QuotaUsage; type projects_Secret = Secret; type projects_Webhook = Webhook; declare namespace projects { export { projects_DefaultQuotas as DefaultQuotas, projects_Event as Event, projects_EventDataMap as EventDataMap, projects_HealthCheckEventUpdate as HealthCheckEventUpdate, projects_Member as Member, projects_MemberRole as MemberRole, projects_Project as Project, projects_ProjectTier as ProjectTier, projects_ProjectToken as ProjectToken, projects_ProjectType as ProjectType, projects_ProjectsEndpoints as ProjectsEndpoints, projects_QuotaOverrides as QuotaOverrides, projects_QuotaUsage as QuotaUsage, projects_Secret as Secret, projects_Webhook as Webhook, }; } /** * All endpoints for Hop's Docker registry * @public */ type RegistryEndpoints = Endpoint<'DELETE', '/v1/registry/images/:image', Empty> | Endpoint<'GET', '/v1/registry/images', { images: string[]; }> | Endpoint<'GET', '/v1/registry/images/:image/manifests', { manifests: { digest: { digest: string; size: number; uploaded: string; }; tag: string | null; }[]; }>; type registry_RegistryEndpoints = RegistryEndpoints; declare namespace registry { export { registry_RegistryEndpoints as RegistryEndpoints, }; } /** * Fleet scheduling state (schedulable/unschedulable) */ declare enum FleetSchedulingState { SCHEDULABLE = "schedulable", UNSCHEDULABLE = "unschedulable" } /** * Fleet status (online/offline) */ declare enum FleetStatus { ONLINE = "online", OFFLINE = "offline" } /** * Fleet node */ interface Node { /** * Node ID * * @example "fleet_node_xxx" */ id: Id<'fleet_node'>; /** * Project ID containing the node * * @example "project_xxx" */ project_id: Id<'project'>; /** * Fleet group ID containing the node * * @example "fleet_group_xxx" */ fleet_group: Id<'fleet_group'> | null; /** * Node name shown in the dashboard */ name: string; /** * Scheduling state of the node (schedulable/unschedulable) */ scheduling_state: FleetSchedulingState; /** * Status of the node (online/offline) */ status: FleetStatus; /** * The last time the node sent a heartbeat (Used to determine if the node is alive) */ last_heartbeat: Timestamp; /** * Node metadata */ metadata: NodeMetadata | null; /** * Whether if the node is bootstrapped and initialized */ bootstrapped: boolean; /** * When the node was created */ created_at: Timestamp; } interface NodeMetadata { /** * The node's public IP addresses (includes IPv4 and IPv6) */ public_ips: NodeIP[]; /** * The country the node is located in */ country: string; /** * The hostname of the node */ hostname: string; /** * The node's architecture * * @example "x86_64" */ arch: string; /** * The node's operating system version */ os: string; /** * The engine used to run deployments on the node * * @example "podman" */ engine: 'podman'; } interface NodeIP { /** * IP Address */ ip: string; /** * IP Address Type */ type: 'ipv4' | 'ipv6'; } type TargetID = Id<'fleet_node'> | Id<'fleet_group'> | null; type FleetEndpoints = Endpoint<'GET', '/v1/fleet/nodes', { nodes: Node[]; }> | Endpoint<'POST', '/v1/fleet/nodes', { node: Node; token: string; }, { name: string; scheduling_state: FleetSchedulingState; }> | Endpoint<'POST', '/v1/fleet/nodes/:node_id/token', { token: string; }> | Endpoint<'DELETE', '/v1/fleet/nodes/:node_id', Empty> | Endpoint<'PATCH', '/v1/fleet/nodes/:node_id', { node: Node; }, { scheduling_state: FleetSchedulingState; }>; /** * A successful response from an API endpoint * @public */ type SuccessfulAPIResponse = { success: true; data: T; }; /** * An error response from an API endpoint * @public */ type ErroredAPIResponse = { success: false; error: { code: string; message: string; }; }; /** * The response from an API endpoint * @public */ type APIResponse = SuccessfulAPIResponse | ErroredAPIResponse; /** * A successful response from an API endpoint * @public */ type Endpoint = { method: M; path: Path; res: Res; body: Body; }; /** * A successful response from an API endpoint * @public */ type Endpoints = IgniteEndpoints | RegistryEndpoints | UserEndpoints | ProjectsEndpoints | PipeEndpoints | ChannelEndpoints | FleetEndpoints; /** * Types that a channel can be * @public */ declare enum ChannelType { PRIVATE = "private", PUBLIC = "public", UNPROTECTED = "unprotected" } /** * Generic state type of a channel * @public */ type AnyStateObject = Record; /** * @deprecated Use {@link AnyStateObject} instead * @public */ type State = AnyStateObject; /** * Definition of a channel * @public */ interface Channel { /** * The ID of the channel */ id: string; /** * The project it is associated with */ project: Project; /** * State metadata */ state: AnyStateObject; /** * Capabilities of the channel */ capabilities: number; /** * When this channel was created */ created_at: Timestamp; /** * The type of this channel */ type: ChannelType; } /** * A token for a channel * @public */ interface ChannelToken { /** * The ID for the token */ id: Id<'leap_token'>; /** * State for this token */ state: AnyStateObject; /** * The project this channel token is associated with */ project_id: Id<'project'>; /** * If this token is currently online (e.g. active heartbeat and connected to leap) */ is_online: boolean; } /** * Endpoints for channels * @public */ type ChannelEndpoints = Endpoint<'POST', '/v1/channels', { channel: Channel; }, { type: ChannelType; state: Record | null; }> | Endpoint<'PUT', '/v1/channels/:channel_id', { channel: Channel; }, { type: ChannelType; state: Record | null; }> | Endpoint<'POST', '/v1/channels/tokens', { token: ChannelToken; }, { state: AnyStateObject; }> | Endpoint<'DELETE', '/v1/channels/:channel_id', Empty> | Endpoint<'GET', '/v1/channels/:channel_id', { channel: Channel; }> | Endpoint<'GET', '/v1/channels/:channel_id/tokens', { tokens: ChannelToken[]; }> | Endpoint<'POST', '/v1/channels/tokens/:token/messages', Empty, { e: string; d: unknown; }> | Endpoint<'PUT', '/v1/channels/:channel_id/subscribers/:token', Empty> | Endpoint<'DELETE', '/v1/channels/:channel_id/subscribers/:token', Empty> | Endpoint<'PATCH', '/v1/channels/:channel_id/state', Empty, AnyStateObject> | Endpoint<'PUT', '/v1/channels/:channel_id/state', Empty, AnyStateObject> | Endpoint<'GET', '/v1/channels/:channel_id/state', { state: AnyStateObject; }> | Endpoint<'POST', '/v1/channels/:channel_id/messages', Empty, { e: string; d: unknown; }> | Endpoint<'GET', '/v1/channels', { channels: Channel[]; }> | Endpoint<'GET', '/v1/channels/tokens/:token', { token: ChannelToken; }> | Endpoint<'PATCH', '/v1/channels/tokens/:token', { token: ChannelToken; }, { expiresAt?: Timestamp | null; state: ChannelToken['state']; }> | Endpoint<'DELETE', '/v1/channels/tokens/:token', Empty> | Endpoint<'GET', '/v1/channels/:channel_id/stats', { stats: { online_count: number; }; }>; type channels_AnyStateObject = AnyStateObject; type channels_Channel = Channel; type channels_ChannelEndpoints = ChannelEndpoints; type channels_ChannelToken = ChannelToken; type channels_ChannelType = ChannelType; declare const channels_ChannelType: typeof ChannelType; type channels_State = State; declare namespace channels { export { channels_AnyStateObject as AnyStateObject, channels_Channel as Channel, channels_ChannelEndpoints as ChannelEndpoints, channels_ChannelToken as ChannelToken, channels_ChannelType as ChannelType, channels_State as State, }; } export { SuccessfulAPIResponse as $, AnyStateObject as A, DeploymentConfig as B, Container as C, Deployment as D, Endpoints as E, FleetSchedulingState as F, Group as G, HealthCheck as H, Id as I, DeploymentMetadata as J, constructEvent as K, PossibleWebhookIDs as L, Method as M, Node as N, BuildMethod as O, Project as P, BuildState as Q, Room as R, SelfUser as S, Timestamp as T, DomainState as U, RestartPolicy as V, Webhook as W, RolloutState as X, RuntimeType as Y, VolumeFormat as Z, BuildEnvironment as _, projects as a, parseSize as a$, APIResponse as a0, State as a1, ChannelEndpoints as a2, VolumeDefinition as a3, ContainerMetrics as a4, BuildSettings as a5, DeploymentMetaData as a6, BuildMetadata as a7, BuildMetaData as a8, BuildEnvironmentType as a9, PipeEndpoints as aA, ProjectTier as aB, ProjectType as aC, DefaultQuotas as aD, QuotaOverrides as aE, QuotaUsage as aF, HealthCheckEventUpdate as aG, EventDataMap as aH, Event as aI, ProjectsEndpoints as aJ, RegistryEndpoints as aK, User as aL, UserEndpoints as aM, FleetStatus as aN, NodeMetadata as aO, NodeIP as aP, TargetID as aQ, FleetEndpoints as aR, byteUnits as aS, ByteUnit as aT, ByteSizeString as aU, ByteString as aV, isValidByteString as aW, bytes as aX, kilobytes as aY, megabytes as aZ, gigabytes as a_, NixPlan as aa, ValidationFailure as ab, Build as ac, ContainerStrategy as ad, Image as ae, DeploymentTarget as af, Auth as ag, GHRepo as ah, ImageGHRepo as ai, Resources as aj, DomainRedirect as ak, IgniteEndpoints as al, Empty as am, MakeOptional as an, Tag as ao, ID_PREFIXES as ap, IdPrefixes as aq, HopShDomain as ar, InternalHopDomain as as, AnyId as at, PossibleWebhookGroups as au, validateIdPrefix as av, validateId as aw, getIdPrefix as ax, id as ay, assertId as az, ErroredAPIResponse as b, units as b0, POSSIBLE_EVENTS as b1, verifyHmac as b2, channels as c, ExtractRouteParams as d, Endpoint as e, MemberRole as f, PAT as g, ContainerLog as h, ignite as i, Gateway as j, Domain as k, Member as l, ProjectToken as m, Secret as n, Channel as o, pipe as p, ChannelToken as q, registry as r, DeliveryProtocol as s, Regions as t, users as u, CreateDeploymentConfig as v, GatewayType as w, DeploymentRollout as x, ChannelType as y, ContainerState as z };