Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WesjetClient

Hierarchy

  • WesjetClient

Index

Constructors

Properties

Methods

Constructors

  • new WesjetClient(url: string, __namedParameters?: { customFetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>); headers?: Record<string, string> }): WesjetClient
  • Parameters

    • url: string
    • __namedParameters: { customFetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>); headers?: Record<string, string> } = {}
      • Optional customFetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>)
          • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
          • Parameters

            • input: RequestInfo | URL
            • Optional init: RequestInit

            Returns Promise<Response>

      • Optional headers?: Record<string, string>

    Returns WesjetClient

Properties

fetch: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>)

Type declaration

    • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

headers: Record<string, string>
url: string

Methods

  • invoke<T>(functionName: string, invokeOptions?: WesjetInvokeOptions): Promise<WesjetResponse<T>>
  • Invokes a function

    Type Parameters

    • T = any

    Parameters

    • functionName: string

      the name of the function to invoke

    • invokeOptions: WesjetInvokeOptions = {}

    Returns Promise<WesjetResponse<T>>

  • setAuth(token: string): void
  • Updates the authorization header

    Parameters

    • token: string

      the new jwt token sent in the authorisation header

    Returns void

Generated using TypeDoc