// This file was auto-generated by Fern from our API Definition.

/**
 * Data Attributes are metadata used to describe your contact, company and conversation models. These include standard and custom attributes. By using the data attributes endpoint, you can get the global list of attributes for your workspace, as well as create and archive custom attributes.
 */
export interface DataAttribute {
    /** Value is `data_attribute`. */
    type: "data_attribute";
    /** The unique identifier for the data attribute which is given by Intercom. Only available for custom attributes. */
    id?: number;
    /** Value is `contact` for user/lead attributes and `company` for company attributes. */
    model?: DataAttribute.Model;
    /** Name of the attribute. */
    name: string;
    /** Full name of the attribute. Should match the name unless it's a nested attribute. We can split full_name on `.` to access nested user object values. */
    full_name: string;
    /** Readable name of the attribute (i.e. name you see in the UI) */
    label: string;
    /** Readable description of the attribute. */
    description?: string;
    /** The data type of the attribute. */
    data_type: DataAttribute.DataType;
    /** List of predefined options for attribute value. */
    options?: string[];
    /** Can this attribute be updated through API */
    api_writable?: boolean;
    /** Can this attribute be updated by the Messenger */
    messenger_writable?: boolean;
    /** Can this attribute be updated in the UI */
    ui_writable?: boolean;
    /** Set to true if this is a CDA */
    custom?: boolean;
    /** Is this attribute archived. (Only applicable to CDAs) */
    archived?: boolean;
    /** The time the attribute was created as a UTC Unix timestamp */
    created_at?: number;
    /** The time the attribute was last updated as a UTC Unix timestamp */
    updated_at?: number;
    /** Teammate who created the attribute. Only applicable to CDAs */
    admin_id?: string;
}

export namespace DataAttribute {
    /** Value is `contact` for user/lead attributes and `company` for company attributes. */
    export const Model = {
        Contact: "contact",
        Company: "company",
    } as const;
    export type Model = (typeof Model)[keyof typeof Model];
    /** The data type of the attribute. */
    export const DataType = {
        String: "string",
        Integer: "integer",
        Float: "float",
        Boolean: "boolean",
        Date: "date",
    } as const;
    export type DataType = (typeof DataType)[keyof typeof DataType];
}
