Interface SocketSubscriptionEntitlementData

interface SocketSubscriptionEntitlementData {
    active: boolean;
    subscription:
        | null
        | {
            cancelAtPeriodEnd?: boolean;
            capabilities?: null
            | Record<string, boolean>;
            fairUse?: null | SocketSubscriptionFairUseState;
            graceEnd: number;
            paymentPending?: null | boolean;
            periodEnd: number;
            periodStart: number;
            provider: null | string;
            scheduledChangeAt?: null | number;
            scheduledTerm?: null | string;
            scheduledTier?: null | string;
            status: null | string;
            term: null | string;
            tier: null | string;
            trialEnd: number;
            version: null | string;
        };
    trialCapped: boolean;
    trialing: boolean;
}

Properties

active: boolean
subscription:
    | null
    | {
        cancelAtPeriodEnd?: boolean;
        capabilities?: null
        | Record<string, boolean>;
        fairUse?: null | SocketSubscriptionFairUseState;
        graceEnd: number;
        paymentPending?: null | boolean;
        periodEnd: number;
        periodStart: number;
        provider: null | string;
        scheduledChangeAt?: null | number;
        scheduledTerm?: null | string;
        scheduledTier?: null | string;
        status: null | string;
        term: null | string;
        tier: null | string;
        trialEnd: number;
        version: null | string;
    }

Type declaration

  • null
  • {
        cancelAtPeriodEnd?: boolean;
        capabilities?: null | Record<string, boolean>;
        fairUse?: null | SocketSubscriptionFairUseState;
        graceEnd: number;
        paymentPending?: null | boolean;
        periodEnd: number;
        periodStart: number;
        provider: null | string;
        scheduledChangeAt?: null | number;
        scheduledTerm?: null | string;
        scheduledTier?: null | string;
        status: null | string;
        term: null | string;
        tier: null | string;
        trialEnd: number;
        version: null | string;
    }
    • OptionalcancelAtPeriodEnd?: boolean

      Whether the subscription is set to end when the current period ends. Carried by newer socket builds only; when absent the SDK falls back to inferring it from status === 'cancelled'.

    • Optionalcapabilities?: null | Record<string, boolean>

      Capability flags enabled by this subscription, when provided by the server. When absent the SDK derives a minimal local map.

    • OptionalfairUse?: null | SocketSubscriptionFairUseState

      Monthly Fast-network fair-use state, when currently active.

    • graceEnd: number
    • OptionalpaymentPending?: null | boolean

      Whether a deferred payment is awaiting confirmation. Not emitted by the backend socket publisher today (the REST snapshot is the source); typed here so the mapper can pass it through if a future build adds it.

    • periodEnd: number
    • periodStart: number
    • provider: null | string
    • OptionalscheduledChangeAt?: null | number

      Epoch milliseconds when the scheduled plan/term change takes effect. Carried by newer socket builds only; null when no change is pending.

    • OptionalscheduledTerm?: null | string

      Billing term the plan switches to at the next renewal when a change is scheduled. Carried by newer socket builds only; null when no change is pending.

    • OptionalscheduledTier?: null | string

      Tier the plan switches to at the next renewal when a change is scheduled. Carried by newer socket builds only; null when no change is pending.

    • status: null | string
    • term: null | string
    • tier: null | string
    • trialEnd: number
    • version: null | string
trialCapped: boolean
trialing: boolean