Skip to Content

ResourceWithSecretSchema

const ResourceWithSecretSchema: ZodObject<{ api: ZodOptional<ZodObject<{ links: ZodOptional<ZodRecord<ZodString, ZodObject<{ href: ZodString; }, $strip>>>; redactions: ZodOptional<ZodArray<ZodObject<{ path: ZodString; reason: ZodEnum<{ internal: ...; secret: ...; }>; }, $strip>>>; }, $strip>>; client: ZodNullable<ZodObject<{ device: ZodNullable<ZodString>; id: ZodEnum<{ "modem-cli": "modem-cli"; }>; }, $strip>>; createdAt: ZodISODateTime; expiresAt: ZodNullable<ZodISODateTime>; id: ZodUUID; lastUsedAt: ZodNullable<ZodISODateTime>; modes: ZodArray<ZodEnum<{ live: "live"; sandbox: "sandbox"; }>>; name: ZodString; object: ZodLiteral<"admin_api_key">; permissions: ZodArray<ZodEnum<{ "accounts:read": "accounts:read"; "accounts:write": "accounts:write"; "api-keys:read": "api-keys:read"; "api-keys:write": "api-keys:write"; "backups:read": "backups:read"; "backups:write": "backups:write"; "customers:read": "customers:read"; "customers:write": "customers:write"; full: "full"; "logs:read": "logs:read"; "products:read": "products:read"; "products:write": "products:write"; "projects:read": "projects:read"; "projects:write": "projects:write"; read: "read"; "secrets-integrations:read": "secrets-integrations:read"; "secrets-integrations:write": "secrets-integrations:write"; "starred-items:read": "starred-items:read"; "starred-items:write": "starred-items:write"; "subscription-sign-ins:read": "subscription-sign-ins:read"; "subscription-sign-ins:write": "subscription-sign-ins:write"; }>>; previousSecretExpiresAt: ZodNullable<ZodISODateTime>; projects: ZodUnion<readonly [ZodLiteral<"all">, ZodArray<ZodUUID>]>; rotatedAt: ZodNullable<ZodISODateTime>; secret: ZodString; secretPreview: ZodString; }, $strip>;

The only shape that carries a secret: the responses that create or rotate a key.

Last updated on