Appearance
Rule.io SDK / client/src / resolvePreferredBrandStyle
Function: resolvePreferredBrandStyle()
resolvePreferredBrandStyle(
client,brandStyleId?):Promise<ResolvePreferredBrandStyleResult>
Defined in: client/src/resolve-preferred-brand-style.ts:51
Resolve the preferred brand style for an account.
Fetches all brand styles and returns the one marked isDefault. If none is marked default, falls back to the first in the list. Throws if the account has no brand styles.
Parameters
client
A RuleClient instance.
brandStyleId?
number
Optional: if provided, look up and return this specific brand style ID instead of auto-resolving the default.
Returns
Promise<ResolvePreferredBrandStyleResult>
Example
typescript
const { id: brandStyleId } = await resolvePreferredBrandStyle(client);