flexadminportal
    Preparing search index...

    A class that contains methods for interacting with the Amplify API

    Hierarchy (View Summary)

    Index

    ctx

    _errorFunction: (errors: string[] | number[] | object[]) => void = console.error
    • set errorFunction(error: (errors: string[] | number[] | object[]) => void): void

      Parameters

      • error: (errors: string[] | number[] | object[]) => void

      Returns void

    • Parameters

      • errors: string[] | number[] | object[]

      Returns void

    • Averages an array of numbers

      Parameters

      • arr: number[]

        an array of numbers to average

      Returns number

      the average of the elements in the array

    • Generate a random string of characters to be used as a unique id

      Returns string | number[]

      the result of the call to the uuid function

    • Parameters

      • path: string
      • handleError: (errors: string[] | number[] | object[]) => void = ...

      Returns Promise<boolean>

    • Executes a lambda function

      Parameters

      • functionName: string

        The name of the lambda function to execute

      • functionArgs: any

        The arguments to pass to the lambda function

      Returns Promise<{ logs: string; result: string }>

      • The API response or error
    • Get all the parameters for a lambda function

      Parameters

      • functionName: string

        The name of the lambda function to execute

      Returns Promise<{ logs: string; result: string }>

      this.executeLambda

    • Parameters

      • path: string
      • handleError: (errors: string[] | number[] | object[]) => void = ...

      Returns Promise<string>

    • Parameters

      • path: string

      Returns Promise<ListPaginateWithPathOutput>

    • Loads a text file from S3

      Parameters

      • path: string

        The S3 path to the file

      • handleError: (error: string | number | object) => void = ...

        The error handler

      Returns Promise<string>

      • The file contents