Sask Vaccine Guide Code Docs
    Preparing search index...

    Manages stored clinics.

    interface default {
        emptyStorage(): Promise<void>;
        getClinics(): Promise<ClinicArray>;
        getTextColumns(): Promise<string[]>;
        getTimeStamp(): Promise<Date>;
        isStorageEmpty(): Promise<boolean>;
        isValidTextColumn(columnName: string): Promise<boolean>;
        searchClinics(input: string, column?: string): Promise<ClinicArray>;
        storeClinics(clinics: ClinicArray): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Gets a list of all clinics stored on device.

      Returns Promise<ClinicArray>

      An object with all the clinic's data, with a timestamp of the last time it was updated or null if no data is stored.

      EmptyStorageError If no clinics are stored.

    • Gets a list of text column names.

      Returns Promise<string[]>

      A list of text column names.

    • Gets the time the clinic data was created

      Returns Promise<Date>

      The time the data was created

      EmptyStorageError If no clinics are stored.

    • Checks if the clinic data storage is empty.

      Returns Promise<boolean>

      true no clinics are stored, false otherwise.

    • Checks if a string is a valid text column name.

      Parameters

      • columnName: string

        Name of the column to validate

      Returns Promise<boolean>

      true if column is valid, false otherwise.

    • Search for clinics that are stored on device.

      Parameters

      • input: string

        The value to search for.

      • Optionalcolumn: string

        The text column to search in, if left blank all column are searched.

      Returns Promise<ClinicArray>

      An array of all of the clinics containing input.

      EmptyStorageError If no clinics are stored.

      InvalidArgumentError If column is not a valid column. Use Clinicdata.getTextColumns() to get a list of valid columns.