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

import type * as Intercom from "../../../index.js";

/**
 * Companies allow you to represent organizations using your product. Each company will have its own description and be associated with contacts. You can fetch, create, update and list companies.
 */
export interface Company {
    /** Value is `company` */
    type?: "company";
    /** The Intercom defined id representing the company. */
    id: string;
    /** The name of the company. */
    name: string;
    /** The Intercom defined code of the workspace the company is associated to. */
    app_id: string;
    plan?: Company.Plan;
    /** The company id you have defined for the company. */
    company_id: string;
    /** The time the company was created by you. */
    remote_created_at?: number;
    /** The time the company was added in Intercom. */
    created_at: number;
    /** The last time the company was updated. */
    updated_at: number;
    /** The time the company last recorded making a request. */
    last_request_at?: number;
    /** The number of employees in the company. */
    size?: number;
    /** The URL for the company website. */
    website?: string;
    /** The industry that the company operates in. */
    industry?: string;
    /** How much revenue the company generates for your business. */
    monthly_spend: number;
    /** How many sessions the company has recorded. */
    session_count: number;
    /** The number of users in the company. */
    user_count: number;
    /** The custom attributes you have set on the company. */
    custom_attributes?: Record<string, unknown>;
    /** The list of tags associated with the company */
    tags?: Company.Tags;
    /** The list of segments associated with the company */
    segments?: Company.Segments;
}

export namespace Company {
    export interface Plan {
        /** Value is always "plan" */
        type?: string;
        /** The id of the plan */
        id?: string;
        /** The name of the plan */
        name?: string;
    }

    /**
     * The list of tags associated with the company
     */
    export interface Tags {
        /** The type of the object */
        type?: "tag.list";
        tags?: unknown[];
    }

    /**
     * The list of segments associated with the company
     */
    export interface Segments {
        /** The type of the object */
        type?: "segment.list";
        segments?: Intercom.Segment[];
    }
}
