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

/**
 * Jobs are tasks that are processed asynchronously by the Intercom system after being enqueued via the API. This allows for efficient handling of operations that may take time to complete, such as data imports or exports. You can check the status of your jobs to monitor their progress and ensure they are completed successfully.
 */
export interface Jobs {
    /** The type of the object */
    type?: "job";
    /** The id of the job that's currently being processed or has completed. */
    id: string;
    /** API endpoint URL to check the job status. */
    url?: string;
    /** The status of the job execution. */
    status?: Jobs.Status;
    /** The type of resource created during job execution. */
    resource_type?: string;
    /** The id of the resource created during job execution (e.g. ticket id) */
    resource_id?: string;
    /** The url of the resource created during job exeuction. Use this url to fetch the resource. */
    resource_url?: string;
}

export namespace Jobs {
    /** The status of the job execution. */
    export const Status = {
        Pending: "pending",
        Success: "success",
        Failed: "failed",
    } as const;
    export type Status = (typeof Status)[keyof typeof Status];
}
