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

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

/**
 * A subscription type lets customers easily opt out of non-essential communications without missing what's important to them.
 */
export interface SubscriptionType {
    /** The type of the object - subscription */
    type?: "subscription";
    /** The unique identifier representing the subscription type. */
    id?: string;
    /** The state of the subscription type. */
    state?: SubscriptionType.State;
    default_translation?: Intercom.Translation;
    /** An array of translations objects with the localised version of the subscription type in each available locale within your translation settings. */
    translations?: Intercom.Translation[];
    /** Describes the type of consent. */
    consent_type?: SubscriptionType.ConsentType;
    /** The message types that this subscription supports - can contain `email` or `sms_message`. */
    content_types?: SubscriptionType.ContentTypes.Item[];
}

export namespace SubscriptionType {
    /** The state of the subscription type. */
    export const State = {
        Live: "live",
        Draft: "draft",
        Archived: "archived",
    } as const;
    export type State = (typeof State)[keyof typeof State];
    /** Describes the type of consent. */
    export const ConsentType = {
        OptOut: "opt_out",
        OptIn: "opt_in",
    } as const;
    export type ConsentType = (typeof ConsentType)[keyof typeof ConsentType];
    export type ContentTypes = ContentTypes.Item[];

    export namespace ContentTypes {
        export const Item = {
            Email: "email",
            SmsMessage: "sms_message",
        } as const;
        export type Item = (typeof Item)[keyof typeof Item];
    }
}
