Options
All
  • Public
  • Public/Protected
  • All
Menu
deprecated

Use RestApi or GraphQLAPI to reduce your application bundle size Export Cloud Logic APIs

Hierarchy

Index

Constructors

constructor

Properties

Auth

Auth: AuthClass = Auth

Cache

Cache: ICache = Cache

Credentials

Credentials: CredentialsClass = Credentials

Methods

cancel

  • cancel(request: Promise<any>, message?: string): boolean

configure

  • configure(options: any): any

del

  • del(apiName: string, path: string, init: object): Promise<any>
  • Make a DEL request

    Parameters

    • apiName: string

      The api name of the request

    • path: string

      The path of the request

    • init: object
      • [key: string]: any

    Returns Promise<any>

    A promise that resolves to an object with response status and JSON data, if successful.

endpoint

  • endpoint(apiName: string): Promise<string>

get

  • get(apiName: string, path: string, init: object): Promise<any>
  • Make a GET request

    Parameters

    • apiName: string

      The api name of the request

    • path: string

      The path of the request

    • init: object
      • [key: string]: any

    Returns Promise<any>

    A promise that resolves to an object with response status and JSON data, if successful.

getGraphqlOperationType

getModuleName

  • getModuleName(): string

graphql

  • graphql<T>(options: GraphQLOptions, additionalHeaders?: object, customUserAgentDetails?: CustomUserAgentDetails): T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<object> : Promise<GraphQLResult<any>> | Observable<object>
  • Executes a GraphQL operation

    Type parameters

    • T

    Parameters

    • options: GraphQLOptions

      GraphQL Options

    • Optional additionalHeaders: object
      • [key: string]: string
    • Optional customUserAgentDetails: CustomUserAgentDetails

    Returns T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<object> : Promise<GraphQLResult<any>> | Observable<object>

    An Observable if queryType is 'subscription', else a promise of the graphql result from the query.

head

  • head(apiName: string, path: string, init: object): Promise<any>
  • Make a HEAD request

    Parameters

    • apiName: string

      The api name of the request

    • path: string

      The path of the request

    • init: object
      • [key: string]: any

    Returns Promise<any>

    A promise that resolves to an object with response status and JSON data, if successful.

isCancel

  • isCancel(error: any): boolean
  • Checks to see if an error thrown is from an api request cancellation

    Parameters

    • error: any

      Any error

    Returns boolean

    If the error was from an api request cancellation

patch

  • patch(apiName: string, path: string, init: object): Promise<any>
  • Make a PATCH request

    Parameters

    • apiName: string

      The api name of the request

    • path: string

      The path of the request

    • init: object
      • [key: string]: any

    Returns Promise<any>

    A promise that resolves to an object with response status and JSON data, if successful.

post

  • post(apiName: string, path: string, init: object): Promise<any>
  • Make a POST request

    Parameters

    • apiName: string

      The api name of the request

    • path: string

      The path of the request

    • init: object
      • [key: string]: any

    Returns Promise<any>

    A promise that resolves to an object with response status and JSON data, if successful.

put

  • put(apiName: string, path: string, init: object): Promise<any>
  • Make a PUT request

    Parameters

    • apiName: string

      The api name of the request

    • path: string

      The path of the request

    • init: object
      • [key: string]: any

    Returns Promise<any>

    A promise that resolves to an object with response status and JSON data, if successful.