-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
Currently, the type definition of UpdateCompanyRequestBody is the following :
export interface UpdateCompanyRequestBody {
/** The name of the Company */
name?: string;
/** The name of the plan you have associated with the company. */
plan?: string;
/** The number of employees in this company. */
size?: number;
/** The URL for this company's website. Please note that the value specified here is not validated. Accepts any string. */
website?: string;
/** The industry that this company operates in. */
industry?: string;
/** A hash of key/value pairs containing any other data about the company you want Intercom to store. */
custom_attributes?: Record<string, string>;
/** How much revenue the company generates for your business. Note that this will truncate floats. i.e. it only allow for whole integers, 155.98 will be truncated to 155. Note that this has an upper limit of 2**31-1 or 2147483647.. */
monthly_spend?: number;
}custom_attributes type is too restrictive as the record values could also be boolean or number, as stated in the API documentation.
A more correct declaration would be :
custom_attributes?: Record<string, string|number|boolean>;Or even a permissive one as defined in UpdateContactRequest:
custom_attributes?: Record<string, unknown>;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels