diff --git a/src/rest/types/fleet.ts b/src/rest/types/fleet.ts index efed50e7..ff5e73e7 100644 --- a/src/rest/types/fleet.ts +++ b/src/rest/types/fleet.ts @@ -112,3 +112,5 @@ export interface NodeIP { */ type: 'ipv4' | 'ipv6'; } + +export type TargetID = Id<'fleet_node'> | Id<'fleet_group'> | null; diff --git a/src/rest/types/ignite.ts b/src/rest/types/ignite.ts index 33171144..2ca11bec 100644 --- a/src/rest/types/ignite.ts +++ b/src/rest/types/ignite.ts @@ -8,6 +8,7 @@ import type { Timestamp, } from '../../util/types.ts'; import type {Endpoint} from '../endpoints.ts'; +import type {TargetID} from './fleet.ts'; /** * All regions that Hop operates in @@ -673,6 +674,11 @@ export interface DeploymentConfig { */ type: RuntimeType; + /** + * Target node for deployment, if its undefined its inferred as Hop + */ + target: DeploymentTarget | undefined; + /** * The version of this config */ @@ -738,6 +744,17 @@ export interface Image { gh_repo: ImageGHRepo | null; } +export interface DeploymentTarget { + /** + * The type of target (Hop, Fleet Node or Fleet Group) + */ + type: 'hop' | 'fleet_node' | 'fleet_group'; + /** + * The ID of the target that the deployment will be deployed to + */ + target_id: TargetID; +} + /** * Docker image registry authorization * @public