Hierarchy

  • StiggClient

Properties

addListener: (<K>(eventName: K, callback: Events[K]) => void)

Type declaration

    • <K>(eventName: K, callback: Events[K]): void
    • Type Parameters

      • K extends keyof Events

      Parameters

      • eventName: K
      • callback: Events[K]

      Returns void

applySubscription: ((params: ApplySubscription) => Promise<ApplySubscriptionResults>)

Type declaration

clearCustomer: (() => void)

Type declaration

    • (): void
    • Returns void

clearResource: (() => void)

Type declaration

    • (): void
    • Returns void

fetchUsageHistory: ((params: FetchUsageHistory) => Promise<undefined | UsageHistoryPoint[]>)

Type declaration

getActiveSubscriptions: ((params?: GetActiveSubscriptions) => Promise<Subscription[]>)

Type declaration

getBooleanEntitlement: ((params: GetBooleanEntitlement) => BooleanEntitlement)

Type declaration

getCheckoutState: ((params: GetCheckoutState) => Promise<GetCheckoutStateResults>)

Type declaration

getCustomer: (() => Promise<Customer>)

Type declaration

getEntitlements: ((resourceId?: string) => Promise<Entitlement[]>)

Type declaration

    • (resourceId?: string): Promise<Entitlement[]>
    • Parameters

      • Optional resourceId: string

      Returns Promise<Entitlement[]>

getMeteredEntitlement: ((params: GetMeteredEntitlement) => MeteredEntitlement)

Type declaration

getNumericEntitlement: ((params: GetNumericEntitlement) => NumericEntitlement)

Type declaration

getPaywall: ((params?: GetPaywall) => Promise<Paywall>)

Type declaration

    • (params?: GetPaywall): Promise<Paywall>
    • Parameters

      Returns Promise<Paywall>

isCustomerLoaded: boolean
isResourceLoaded: boolean
isWidgetWatermarkEnabled: boolean
refresh: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

removeListener: (<K>(eventName: K, callback: Events[K]) => void)

Type declaration

    • <K>(eventName: K, callback: Events[K]): void
    • Type Parameters

      • K extends keyof Events

      Parameters

      • eventName: K
      • callback: Events[K]

      Returns void

setCustomerId: ((customerId: string, customerToken?: null | string, resourceId?: null | string) => Promise<void>)

Type declaration

    • (customerId: string, customerToken?: null | string, resourceId?: null | string): Promise<void>
    • Parameters

      • customerId: string
      • Optional customerToken: null | string
      • Optional resourceId: null | string

      Returns Promise<void>

setResource: ((resourceId: string) => Promise<void>)

Type declaration

    • (resourceId: string): Promise<void>
    • Parameters

      • resourceId: string

      Returns Promise<void>

Methods