Options
All
  • Public
  • Public/Protected
  • All
Menu

trace-search - v0.0.5

Index

Type aliases

ConfidenceRating

ConfidenceRating: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

Rating from 0-10 with 10 being highly confident.

Variables

Const DEFAULT_COLOR_SCHEME

DEFAULT_COLOR_SCHEME: ProfilePageColorSchema = ...

Const DiscoveredAccount

DiscoveredAccount: typeof RegisteredAccount = ...
deprecated

Use RegisteredAccount instead.

Const DiscoveredAccountAction

DiscoveredAccountAction: typeof AutoSearchAccountAction = ...
deprecated

Use AutoSearchAccountAction instead.

Const EXTENSION_MIN_VERSION

EXTENSION_MIN_VERSION: "0.0.1" = '0.0.1'

Let EXTENSION_VERSION

EXTENSION_VERSION: string

Const VERSION

VERSION: string = ...

Const accounts

accounts: {} = ...

DEPRECATED

deprecated

Use ThirdPartyAccount.accountCache instead.

Collection of accounts that have already been pulled out of the database.

Type declaration

Const allSites

allSites: SiteList = ...

Contains all sites, including unsupported ones.

Const pages

pages: {} = ...

DEPRECATED

deprecated

Use ProfilePage.cache instead.

Collection of profile pages that have already been pulled out of the database.

Type declaration

Const privacyRatings

privacyRatings: PrivacyRatingList = ...

All privacy ratings available for TRACE sites.

Const searchDefinitions

searchDefinitions: {} = ...

DEPRECATED

deprecated

Use SearchDefinition.cache instead.

Collection of search definitions that have already been pulled out of the database.

Type declaration

Const searchResults

searchResults: {} = ...

DEPRECATED

deprecated

Use ThirdPartyAccount.resultCache instead.

Collection of search results that have already been pulled out of the database.

Type declaration

Const searches

searches: {} = ...

DEPRECATED

deprecated

Use Search.cache instead.

Collection of searches that have already been pulled out of the database.

Type declaration

Const supportedSites

supportedSites: SiteList = ...

Const tags

tags: string[] = ...

All tags available on TRACE sites.

Const unsupportedSites

unsupportedSites: SiteList = ...

Functions

Const checkExtensionVersion

  • checkExtensionVersion(): void

Const closeDb

  • closeDb(): Promise<void>
  • Close the local database connection.

    This creates a new instance of the singleton on the next call to getDb().

    Returns Promise<void>

Const closeRemoteDb

  • closeRemoteDb(): Promise<void>
  • Close the remote database connection.

    This creates a new instance of the singleton on the next call to getRemoteDb().

    Returns Promise<void>

Const destroyDb

  • destroyDb(): Promise<void>
  • Destroy the local database connection.

    This creates a new instance of the singleton on the next call to getDb().

    This also removed the user's encryption key.

    Returns Promise<void>

Const destroyLocalDb

  • destroyLocalDb(): Promise<void>
  • deprecated

    Use destroyDb instead.

    Returns Promise<void>

Const destroyRemoteDb

  • destroyRemoteDb(): Promise<void>
  • Destroy the remote database connection.

    This creates a new instance of the singleton on the next call to getRemoteDb().

    Returns Promise<void>

Const disableSync

  • disableSync(): Promise<void>
  • Turn off sync and remember that it's off.

    Returns Promise<void>

Const enableSync

  • enableSync(): Promise<{ TODO_replication: Sync<any> }>
  • Turn on sync and remember that it's on.

    Returns Promise<{ TODO_replication: Sync<any> }>

Const exportToCsv

  • exportToCsv(): Promise<string>
  • Export all accounts to CSV.

    Returns Promise<string>

Const exportToJson

  • exportToJson(): Promise<string>
  • Serialize and export all dashboard accounts and searches to JSON.

    This format can be re-imported to TRACE sometime in the future.

    Returns Promise<string>

Const exportToReadableJson

  • exportToReadableJson(): Promise<string>
  • Export all dashboard accounts and searches to a more verbose JSON that is more human readable.

    TODO: This might not even work because some of the objects are recursive.

    Returns Promise<string>

filterSitesByTags

  • filterSitesByTags(sites: SiteList, tagsToInclude: string[]): Site[]

Const findAccount

  • This function sends a request to the website to search for a specified username. The format of the request is based off of the fields in the site JSON argument Returns a JSON with fields denoting whether the account is found or not)

    Parameters

    • site: Site

      JSON with data corresponding to the site currently being searched

    • username: string

      username to search for

    • Optional search: Search

      Parent search object

    Returns Promise<AutoSearchAccount>

Const generateEncryptionKey

  • generateEncryptionKey(password: string, cognitoID: string): Promise<void>
  • Based off of the password passed in, encryption key is stored in localStorage

    Parameters

    • password: string
    • cognitoID: string

    Returns Promise<void>

Const getDb

  • getDb(): Promise<Database<{}>>
  • Initialize or return the PouchDB instance.

    Returns Promise<Database<{}>>

Const getEncryptionKey

  • getEncryptionKey(): string
  • Compute current user's encryption key, if they are logged in If not logged in, error is thrown

    Returns string

Const getRemoteDb

  • getRemoteDb(): Promise<Database<{}>>
  • Initialize or return the remote database instance (i.e. CouchDB).

    Passing userId sets the

    Returns Promise<Database<{}>>

Const removeEncryptionKey

  • removeEncryptionKey(): void
  • Remove encryption key from localStorage

    Returns void

Const resetDb

  • resetDb(): Promise<void>
  • Remove all data in the local database and re-run setup.

    This also clears the in-memory cache of all objects.

    Returns Promise<void>

Const resetRemoteDb

  • resetRemoteDb(): Promise<void>
  • Remove all data from the remote database.

    TODO: Figure out how to propagate this to any other synced devices and to fully remove the old documents from the CouchDB instance

    Returns Promise<void>

Const setRemoteUser

  • setRemoteUser(cognitoUser: null | CognitoUserPartial): Promise<void>
  • Set the remote user that will be used to connect to the remote database.

    Call with null to reset all remote/user-related utilities.

    Parameters

    • cognitoUser: null | CognitoUserPartial

    Returns Promise<void>

Const setupReplication

  • setupReplication(): Promise<{ TODO_replication: Sync<any> }>
  • YOU PROBABLY SHOULD BE USING enableSync.

    Setup replication to and from the remote CouchDB server.

    Returns Promise<{ TODO_replication: Sync<any> }>

Const teardownReplication

  • teardownReplication(): Promise<void>

Const toAccountId

  • toAccountId(site: Site, userName: string, idPrefix?: string): string

Generated using TypeDoc