Options
All
  • Public
  • Public/Protected
  • All
Menu

@http-samc/hyper

Index

Type aliases

LicenseBodyCreate: { email: string; key?: string; metadata?: {}; plan: string }

Type declaration

  • email: string
  • Optional key?: string
  • Optional metadata?: {}
    • [key: string]: string
  • plan: string
LicenseBodyUpdate: { email?: string; key?: string; metadata?: {}; subscribtion?: { cancel_at_period_end?: boolean; current_period_end?: string; pause_collection?: boolean }; unlocked?: boolean }

Type declaration

  • Optional email?: string
  • Optional key?: string
  • Optional metadata?: {}
    • [key: string]: string
  • Optional subscribtion?: { cancel_at_period_end?: boolean; current_period_end?: string; pause_collection?: boolean }
    • Optional cancel_at_period_end?: boolean
    • Optional current_period_end?: string
    • Optional pause_collection?: boolean
  • Optional unlocked?: boolean
LicenseMetadataUpdate: {}

Type declaration

  • [key: string]: string
LinkBodyCreate: { enable_bot_protection?: boolean; group_buy_guild?: string; initial_fee_amount?: number; max_usages?: number; password?: string; plan: string; start_date?: string; trial_period_days?: number }

Type declaration

  • Optional enable_bot_protection?: boolean
  • Optional group_buy_guild?: string
  • Optional initial_fee_amount?: number
  • Optional max_usages?: number
  • Optional password?: string
  • plan: string
  • Optional start_date?: string
  • Optional trial_period_days?: number
LinkBodyUpdate: { active?: boolean; remaining_stock?: number }

Type declaration

  • Optional active?: boolean
  • Optional remaining_stock?: number
ProductBodyCreate: { amount: number; currency: string; description?: string; image?: string; name: string; recurring?: { interval: "day" | "week" | "month" | "year"; interval_count: number }; rental_period_days?: number; type: "lifetime" | "recurring" | "free" | "rental" }

Type declaration

  • amount: number
  • currency: string
  • Optional description?: string
  • Optional image?: string
  • name: string
  • Optional recurring?: { interval: "day" | "week" | "month" | "year"; interval_count: number }
    • interval: "day" | "week" | "month" | "year"
    • interval_count: number
  • Optional rental_period_days?: number
  • type: "lifetime" | "recurring" | "free" | "rental"
ProductBodyUpdate: { description?: string; image?: string; integrations?: { discord?: { cancel_action: "kick" | "remove_plan_roles" | "remove_all_roles" | "none"; roles: string[] }; telegram?: { cancel_action: "kick" | "none" } }; links?: { href: string; title: string }[]; name?: string; rental_period_days?: number; transfers?: { cooldown_days: number; enabled: boolean } }

Type declaration

  • Optional description?: string
  • Optional image?: string
  • Optional integrations?: { discord?: { cancel_action: "kick" | "remove_plan_roles" | "remove_all_roles" | "none"; roles: string[] }; telegram?: { cancel_action: "kick" | "none" } }
    • Optional discord?: { cancel_action: "kick" | "remove_plan_roles" | "remove_all_roles" | "none"; roles: string[] }
      • cancel_action: "kick" | "remove_plan_roles" | "remove_all_roles" | "none"
      • roles: string[]
    • Optional telegram?: { cancel_action: "kick" | "none" }
      • cancel_action: "kick" | "none"
  • Optional links?: { href: string; title: string }[]
  • Optional name?: string
  • Optional rental_period_days?: number
  • Optional transfers?: { cooldown_days: number; enabled: boolean }
    • cooldown_days: number
    • enabled: boolean

Functions

  • Client(apiKey: string, logger?: (msg: string) => void): HyperApiClient
  • description

    Creates a HyperApiClient, given a secret API key

    example
    import { Client } from 'hyper'

    // Basic usage
    const client = Client('my-api-key')

    // Log calls (to console)
    const client = Client('my-api-key', console.log)

    Parameters

    • apiKey: string

      A Hyper secret API key

    • Optional logger: (msg: string) => void
        • (msg: string): void
        • Parameters

          • msg: string

          Returns void

    Returns HyperApiClient

Generated using TypeDoc