import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Secrets extends APIResource { /** * Lists every secret key set on the function. Plaintext is NEVER returned — only * the last 4 characters of each value, for visual confirmation. * * @example * ```ts * const secrets = await client.functions.secrets.list( * 'functionId', * ); * ``` */ list(functionID: string, options?: RequestOptions): APIPromise; /** * Create or update a secret on a function. Marks the function out-of-sync; the * next `POST /deploy` re-publishes the Lambda with the new env. Keys must match * `[A-Z_][A-Z0-9_]*` (uppercase env-var style) and cannot start with reserved * prefixes (AWS*, LAMBDA*, etc). * * @example * ```ts * const response = await client.functions.secrets.set('key', { * functionId: 'functionId', * value: 'value', * }); * ``` */ set(key: string, params: SecretSetParams, options?: RequestOptions): APIPromise; /** * Remove a secret from a function. Doesn't take effect on the running Lambda until * the next deploy. * * @example * ```ts * await client.functions.secrets.unset('key', { * functionId: 'functionId', * }); * ``` */ unset(key: string, params: SecretUnsetParams, options?: RequestOptions): APIPromise; } export interface SecretListResponse { secrets: Array; } export declare namespace SecretListResponse { interface Secret { id: string; key: string; valueLast4: string; createdAt?: number; syncedToAws?: boolean; updatedAt?: number; } } export type SecretSetResponse = unknown; export interface SecretSetParams { /** * Path param: Zavu Function ID. */ functionId: string; /** * Body param */ value: string; } export interface SecretUnsetParams { /** * Zavu Function ID. */ functionId: string; } export declare namespace Secrets { export { type SecretListResponse as SecretListResponse, type SecretSetResponse as SecretSetResponse, type SecretSetParams as SecretSetParams, type SecretUnsetParams as SecretUnsetParams, }; } //# sourceMappingURL=secrets.d.mts.map