UNPKG

wgc

Version:

The official CLI tool to manage the GraphQL Federation Platform Cosmo

31 lines (30 loc) 1.04 kB
import type { BaseCommandOptions } from './types/types.js'; export interface CreateRouterTokenParams { client: BaseCommandOptions['client']; tokenName: string; graphName: string; namespace?: string; } export interface CreateRouterTokenResult { error: Error | null; token?: string; } export interface DeleteRouterTokenParams { client: BaseCommandOptions['client']; tokenName: string; graphName: string; namespace?: string; } export interface DeleteRouterTokenResult { error: Error | null; } /** * Creates a router token for a federated graph. * Never calls program.error() — caller decides how to handle errors. */ export declare function createRouterToken(params: CreateRouterTokenParams): Promise<CreateRouterTokenResult>; /** * Deletes a router token. Idempotent — returns success if token doesn't exist. * Never calls program.error() — caller decides how to handle errors. */ export declare function deleteRouterToken(params: DeleteRouterTokenParams): Promise<DeleteRouterTokenResult>;