Options
All
  • Public
  • Public/Protected
  • All
Menu

AWS Amplify Package - aws-amplify

AWS Amplify is a JavaScript library for frontend and mobile developers building cloud-enabled applications. The library is a declarative interface across different categories of operations in order to make common tasks easier to add into your application. The default implementation works with Amazon Web Services (AWS) resources but is designed to be open and pluggable for usage with other cloud services that wish to provide an implementation or custom backends.

aws-amplify is the AWS Amplify core library. Documentation is available here

Index

Classes

Interfaces

Variables

Functions

Object literals

Variables

Const API

API: APIClass = _instance

Const Analytics

Analytics: AnalyticsClass = _instance

Const AsyncStorage

AsyncStorage: Storage = window.localStorage

Const Auth

Auth: AuthClass = _instance

AuthenticationDetails

AuthenticationDetails: any

Const BUFFER_SIZE

BUFFER_SIZE: 1000 = 1000

CognitoAuth

CognitoAuth: any

CognitoUser

CognitoUser: any

CognitoUserAttribute

CognitoUserAttribute: any

CognitoUserPool

CognitoUserPool: any

CookieStorage

CookieStorage: any

Const DEFAULT_ALGORITHM

DEFAULT_ALGORITHM: "AWS4-HMAC-SHA256" = "AWS4-HMAC-SHA256"

Const FLUSH_INTERVAL

FLUSH_INTERVAL: number = 5*1000

Const FLUSH_SIZE

FLUSH_SIZE: 100 = 100

Const Hub

Hub: HubClass = new HubClass('__default__')

Const Linking

Linking: object

Type declaration

Const MIME_MAP

MIME_MAP: object[] = [{ type: 'text/plain', ext: 'txt' },{ type: 'text/html', ext: 'html' },{ type: 'text/javascript', ext: 'js' },{ type: 'text/css', ext: 'css' },{ type: 'text/csv', ext: 'csv' },{ type: 'text/yaml', ext: 'yml' },{ type: 'text/yaml', ext: 'yaml' },{ type: 'text/calendar', ext: 'ics' },{ type: 'text/calendar', ext: 'ical' },{ type: 'image/png', ext: 'png' },{ type: 'image/gif', ext: 'gif' },{ type: 'image/jpeg', ext: 'jpg' },{ type: 'image/jpeg', ext: 'jpeg' },{ type: 'image/bmp', ext: 'bmp' },{ type: 'image/x-icon', ext: 'ico' },{ type: 'image/tiff', ext: 'tif' },{ type: 'image/tiff', ext: 'tiff' },{ type: 'image/svg+xml', ext: 'svg' },{ type: 'application/json', ext: 'json' },{ type: 'application/xml', ext: 'xml' },{ type: 'application/x-sh', ext: 'sh' },{ type: 'application/zip', ext: 'zip' },{ type: 'application/x-rar-compressed', ext: 'rar' },{ type: 'application/x-tar', ext: 'tar' },{ type: 'application/x-bzip', ext: 'bz' },{ type: 'application/x-bzip2', ext: 'bz2' },{ type: 'application/pdf', ext: 'pdf' },{ type: 'application/java-archive', ext: 'jar' },{ type: 'application/msword', ext: 'doc' },{ type: 'application/vnd.ms-excel', ext: 'xls' },{ type: 'application/vnd.ms-excel', ext: 'xlsx' },{ type: 'message/rfc822', ext: 'eml' }]

Const NON_RETRYABLE_EXCEPTIONS

NON_RETRYABLE_EXCEPTIONS: string[] = ['BadRequestException', 'SerializationException', 'ValidationException']

OS

OS: any

Const RESEND_LIMIT

RESEND_LIMIT: 5 = 5

Const SERVICE_NAME

SERVICE_NAME: "iotdevicegateway" = "iotdevicegateway"

Const Storage

Storage: StorageClass = _instance

Const StorageHelper

StorageHelper: any = AsyncStorage

Let _config

_config: any = null

Let _i18n

_i18n: any = null

Let _instance

_instance: StorageClass = null

Const actions

actions: string[] = ['mousemove', 'keydown', 'scroll']

Let analyticsConfigured

analyticsConfigured: boolean = false

Let authConfigured

authConfigured: boolean = false

Const crypto

crypto: any = AWS['util'].crypto

Const date

date: Date = new Date()

Const expireTime

expireTime: number = 30*60*1000

Const instance

instance: Credentials = new Credentials(null)

Const logger

logger: any = new Logger('Storage')

Let preInteract

preInteract: number = date.getTime()

Let startsessionRecorded

startsessionRecorded: boolean = false

Const url

url: any = require('url')

Const urlLib

urlLib: any = require('url')

Const waitForInit

waitForInit: any = new Promise((res, rej) => {const ga = window['gapi'] && window['gapi'].auth2 ? window['gapi'].auth2 : null;if (ga) {logger.debug('google api already loaded');res();} else {setTimeout(() => {res();},2000);}})

Functions

_isInteger

  • _isInteger(value: any): boolean

Const analyticsEvent

  • analyticsEvent(payload: any): void

Const authEvent

  • authEvent(payload: any): void

Const autoSessionRecord

  • autoSessionRecord(): void

browserClientInfo

  • browserClientInfo(): object | object

browserTimezone

  • browserTimezone(): string

browserType

  • browserType(userAgent: any): object

Private Const canonical_headers

  • canonical_headers(headers: any): string

Private Const canonical_request

  • canonical_request(request: any): string

Const clientInfo

  • clientInfo(): object
  • clientInfo(): object

Const credential_scope

  • credential_scope(d_str: any, region: any, service: any): string

dimToMake

  • dimToMake(dim: any): object

dimension

  • dimension(): object

Const dispatchAnalyticsEvent

  • dispatchAnalyticsEvent(event: any, data: any): void

Const dispatchAppStateEvent

  • dispatchAppStateEvent(event: any, data: any): void

Const dispatchAuthEvent

  • dispatchAuthEvent(event: any, data: any): void

Const dispatchStorageEvent

  • dispatchStorageEvent(track: any, attrs: any, metrics: any): void

Const encrypt

  • encrypt(key: any, src: any, encoding?: any): any
  • Parameters

    • key: any
    • src: any
    • Optional encoding: any

    Returns any

getByteLength

  • getByteLength(str: string): number

getCurrTime

  • getCurrTime(): number

Private Const get_authorization_header

  • get_authorization_header(algorithm: any, access_key: any, scope: any, signed_headers: any, signature: any): string
  • Parameters

    • algorithm: any
    • access_key: any
    • scope: any
    • signed_headers: any
    • signature: any

    Returns string

Const get_signature

  • get_signature(signing_key: any, str_to_sign: any): any

Private Const get_signing_key

  • get_signing_key(secret_key: any, d_str: any, service_info: any): any
  • Parameters

    • secret_key: any
    • d_str: any
    • service_info: any

    Returns any

Const graphqlOperation

  • graphqlOperation(query: any, variables?: object): object
  • Parameters

    • query: any
    • Default value variables: object = {}

    Returns object

    • query: any
    • variables: object

Const hash

  • hash(src: any): any

invalidParameter

  • invalidParameter(name: any): Error

isInteger

  • isInteger(value: any): boolean

missingConfig

  • missingConfig(name: any): Error

Const parse_service_info

  • parse_service_info(request: any): object

Const sign

  • sign(request: any, access_info: any, service_info?: any): any
  • Sign a HTTP request, add 'Authorization' header to request param

    Parameters

    • request: any

      HTTP request object

      request: {
      method: GET | POST | PUT ...
      url: ...,
      headers: {
      header1: ...
      },
      data: data
      }
      
    • access_info: any

      AWS access credential info

      access_info: {
      access_key: ...,
      secret_key: ...,
      session_token: ...
      }
      
    • Default value service_info: any = null

    Returns any

    Signed HTTP request

Const signUrl

  • signUrl(urlToSign: String, accessInfo: any, serviceInfo?: any, expiration?: Number): any
  • Parameters

    • urlToSign: String
    • accessInfo: any
    • Optional serviceInfo: any
    • Optional expiration: Number

    Returns any

Const signed_headers

  • signed_headers(headers: any): string
  • List of header keys included in the canonical headers.

    Parameters

    • headers: any

    Returns string

Const storageEvent

  • storageEvent(payload: any): void

Private Const string_to_sign

  • string_to_sign(algorithm: any, canonical_request: any, dt_str: any, scope: any): string
  • Parameters

    • algorithm: any
    • canonical_request: any
    • dt_str: any
    • scope: any

    Returns string

Object literals

Const AppState

AppState: object

addEventListener

  • addEventListener(action: any, handler: any): void

Const Constants

Constants: object

userAgent

userAgent: any = Platform.userAgent

Const LOG_LEVELS

LOG_LEVELS: object

DEBUG

DEBUG: number = 2

ERROR

ERROR: number = 5

INFO

INFO: number = 3

VERBOSE

VERBOSE: number = 1

WARN

WARN: number = 4

Const Platform

Platform: object

isReactNative

isReactNative: boolean = false

navigator

navigator: null = null

product

product: string = ""

userAgent

userAgent: string = "aws-amplify/0.4.x js"

Const defaultConfig

defaultConfig: object

Default cache config

capacityInBytes

capacityInBytes: number = 1048576

defaultPriority

defaultPriority: number = 5

defaultTTL

defaultTTL: number = 259200000

itemMaxSize

itemMaxSize: number = 210000

keyPrefix

keyPrefix: string = "aws-amplify-cache"

storage

storage: Storage = (typeof window === 'undefined') ? null : window.localStorage

warningThreshold

warningThreshold: number = 0.8

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc