Skip to content

Function: unbrandCredentials()

Makaio Framework


Makaio Framework / contracts/config / unbrandCredentials

unbrandCredentials(credentials): Record<string, string> | undefined

Defined in: ../../../packages/contracts/src/config/credential-ref.ts:217

Strip the CredentialRef brand from a credential map for use in a ProviderConfigInput upsert.

CredentialRef is a type-level brand only — at runtime the values are plain ref strings (e.g. stored:providerConfig:xxx:apiKey). The storage tier stores and re-brands them on read; this helper makes the type system aware of the cast without changing values.

Record<string, string & $brand<"CredentialRef">> | undefined

Branded credential map from a storage record, or undefined.

Record<string, string> | undefined

Plain string credential map, or undefined when absent.