Skip to content
View as Markdown

Service for managing project-scoped secrets.

new SecretService(api: AxiosInstance): SecretService;

Parameters:

  • api AxiosInstance

Returns:

  • SecretService
delete(name: string): Promise<void>;

Parameters:

  • name string

Returns:

  • Promise<void>
get(name: string): Promise<SecretMeta>;

Gets one secret’s metadata (never its value).

Parameters:

  • name string

Returns:

  • Promise<SecretMeta>
iter(options: ListSecretsOptions = {}): AsyncIterable<Secret>;

Parameters:

  • options ListSecretsOptions = {}

Returns:

  • AsyncIterable<Secret>
list(options: ListSecretsOptions = {}): Promise<ListResult<Secret>>;

Lists secret metadata for the project (never values).

Parameters:

  • options ListSecretsOptions = {}

Returns:

  • Promise<ListResult<Secret>>
set(name: string, value: string, options: SetSecretOptions): Promise<SecretMeta>;

Creates or updates a secret’s value + metadata.

Parameters:

  • name string
  • value string
  • options SetSecretOptions

Returns:

  • Promise<SecretMeta>

Properties:

  • cursor? string
  • limit? number

type Secret = SecretDto

Secret metadata (never the value).


Options for creating/updating a secret.

Properties:

  • allowedDomains string[] - The hosts where this secret’s value may be sent (exact or *. wildcard), or ["*"] for any verified host. "*" lets the value reach any HTTPS host, including one a compromised sandbox controls.
  • description? string
  • ifNotExists? boolean

Properties:

  • name string
  • allowed_domains string[]
  • description string | null
  • created_at string | null
  • updated_at string | null

type SecretMeta = SecretDto

GET /secrets/{name} detail row — the same SDK shape as the list row.