Brand

Brand: how your product appears on the pages and emails NoClick sends for you, and the OAuth apps your users connect with.

class Brand

One per account; rendered on /h/ pages and human emails. oauth_apps names your own OAuth app per provider, as {provider: secret id}. oauth_redirect_urls has the redirect URI to register with your app at every provider you can bring one for, as {provider: url}: you need it to create the app, before it is named here.

Attributes
namestring | null
logoUrlstring | null
colorstring | null
supportUrlstring | null
emailFromNamestring | null
rawJsonObject

The response JSON exactly as the API sent it.

isDefaultboolean

True while nothing is set (the defaults are shown).

domainstring | null

Invite-only beta. The host your approval, question and hand-off pages are served from.

oauthAppsRecord<string, string>

Your own OAuth app per provider, as { provider: secret id }.

oauthRedirectUrlsRecord<string, string>

The redirect URI to register with your app at every provider you can bring one for, as { provider: url }: you need it to create the app, before it is named in oauthApps.

resetstatic

static reset(options?: { client?: NoClick }): Promise<Brand>

Remove the account's brand: pages and emails go back to the defaults (returned, isDefault true).

Parameters
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

NoClick's default brand, with is_default True.

getstatic

static get(options?: { client?: NoClick }): Promise<Brand>

Read the account's brand.

Parameters
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The brand your pages and emails show now; is_default is True while you haven't set one.

setstatic

static set(fields: BrandFields, options?: { client?: NoClick }): Promise<Brand>

Replace the brand: fields left out are cleared. To change one field, use update.

Parameters
fieldsBrandFieldsrequired
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The saved brand, with color lowercased and is_default False. A field you left out is now empty.

updatestatic

static update(
  fields: BrandFields,
  options?: { client?: NoClick },
): Promise<Brand>

Change only the fields you pass; the rest stay as they are. null clears a field. Before you've set a brand, it changes NoClick's default one: the name stays NoClick until you give it yours.

Parameters
fieldsBrandFieldsrequired
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The saved brand. A field you left out is unchanged.