Documentation
    Preparing search index...

    A class that contains methods for interacting with the Amplify API

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ctx

    Accessors

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

      Parameters

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

      Returns void

    Methods

    • Analyze the runs and display the modal window

      Parameters

      • selectedIDs: number[]

        The indices of the selected runs

      Returns Promise<boolean>

      selectedIDs - The indices of the selected runs

    • Averages an array of numbers

      Parameters

      • arr: number[]

        an array of numbers to average

      Returns number

      the average of the elements in the array

    • Delete a run by ID

      Parameters

      • runID: number

        The ID of the run to delete

      Returns Promise<boolean>

      true if the run was deleted, false otherwise

    • Parameters

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

            Parameters

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

            Returns 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
    • Generate stats on run data (similar to column stats on desktop)

      Parameters

      • data: Run[]

        the runs to be analyzed

      Returns (string | number | boolean)[][]

      the statistics for each column

    • 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 = ...
          • (errors: string[] | number[] | object[]): void
            • Protected Members **

            Parameters

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

            Returns void

      Returns Promise<string>

    • Parameters

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

            Parameters

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

            Returns void

      Returns Promise<string>

    • Load runs from the database

      Parameters

      • fieldID: number = 0

        The ID of the field to filter by

      • teamFieldID: number = 0

        The ID of the team field to filter by

      • deviceID: number = 0

        The ID of the device to filter by

      Returns Promise<RunConnection>

      the list of runs

    • Parameters

      • fileObject: { file: object; key: string }

      Returns Promise<{ file: { name: string }; key: string }>

    • Check if runs have been loaded for the current page

      Parameters

      • page: number

        The current page

      • itemsPerPage: number

        The number of items per page

      Returns boolean

      true if the runs have been loaded, false otherwise

    • Uses the RunDataTools Lambda to calculate irregularity for a set of runs

      Parameters

      • needle: string

        The search term to filter runs by

      • filters: string[]

        The filters to apply to the search (Run columns)

      • fieldID: number

      Returns LambdaResponse

      the result of the irregularity calculation and run IDs