← Public packages
@cameronpak/box
Full Box Public API v1 client: lifecycle, prompts, files, commands, snapshots, environments, webhooks, desktop, hosting, and account.
src/get-secrets.ts
15 lines · 479 B · TypeScriptimport { boxRequest, type Result } from './client.ts'
import type { SecretFile } from './types.ts'
export type SecretsOutput = {
success: boolean
environmentId?: string
envContents?: string
secretFiles?: Array<SecretFile>
pushed?: Record<string, unknown>
}
/** Returns the environment variables and secret files configured for Boxes. */
export default async function getSecrets(): Promise<Result<SecretsOutput>> {
return boxRequest<SecretsOutput>({ path: '/secrets' })
}