1.4.0 • Published 4 years ago

@raydeck/session-manager v1.4.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

@raydeck/session-manager - v1.4.0

@raydeck/session-manager - v1.4.0

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

LambdaFunctionType

Ƭ LambdaFunctionType: function

Defined in index.ts:87

Type declaration:

▸ (a: any, b?: any, c?: any): any

Parameters:

NameType
aany
b?any
c?any

Variables

Let registry

registry: object

Defined in index.ts:19

Type declaration:


Const schemeRegistry

schemeRegistry: object

Defined in index.ts:18

Type declaration:

Functions

addClass

addClass(newClass: Schemable): Promise‹void›

Defined in index.ts:46

Add a scheme-able class to the session registry

Parameters:

NameTypeDescription
newClassSchemableClass -implementing static scheme property and getFromUri method - to add to the registry for lookups

Returns: Promise‹void›


flushSession

flushSession(): void

Defined in index.ts:84

Flush the session of cached files

Returns: void


getFromId

getFromIdT›(schemeOrClass: string | Schemable, id: string): Promise‹T›

Defined in index.ts:54

Retrieve from the registry, async to permit a load. Uses the class/scheme to limit the lookup

Type parameters:

T

Parameters:

NameTypeDescription
schemeOrClassstring | SchemableScheme (e.g. "myClass") or classname ("MyClass") to look up
idstringid global within the class domain

Returns: Promise‹T›


getFromItem

getFromItemT›(schemeOrClass: string | Schemable, item: object): Promise‹T›

Defined in index.ts:25

Load an item based on map of data (usually from database)

Type parameters:

T

Parameters:

NameTypeDescription
schemeOrClassstring | SchemableScheme (e.g. "myClass") or classname ("MyClass") to look up
itemobjectMap of attributes to load from

Returns: Promise‹T›


getFromUri

getFromUriT›(uri: string): Promise‹T›

Defined in index.ts:72

Retrieve from the registry, async to permit a load if it was not previously saved

Type parameters:

T

Parameters:

NameTypeDescription
uristringURI of object to retrieve

Returns: Promise‹T›


isCached

isCached(uri: string): boolean

Defined in index.ts:149

Determine if an object with this uri is already cached

Parameters:

NameTypeDescription
uristring

Returns: boolean


remove

remove(uri: string): void

Defined in index.ts:142

Removes an instance from the reistry by the uri

Parameters:

NameTypeDescription
uristringURI of the element to remove

Returns: void


set

set(o: Sessionable): void

Defined in index.ts:134

Save an object instance to the session registry

Parameters:

NameTypeDescription
oSessionableinstance to save in registry

Returns: void


withBatch

withBatch(f: LambdaFunctionType): (Anonymous function)

Defined in index.ts:104

Wraps a function to be used in a AWS Appsync Batch invocation

Parameters:

NameTypeDescription
fLambdaFunctionTypefunction to wrap

Returns: (Anonymous function)


Const withSession

withSession(f: LambdaFunctionType): (Anonymous function)

Defined in index.ts:92

Wraps a function to guarantee a new session before it runs

Parameters:

NameTypeDescription
fLambdaFunctionTypefunction to wrap

Returns: (Anonymous function)

@raydeck/session-manager - v1.4.0Schemable

Interface: Schemable

Interface for static elements on a class

Hierarchy

  • Schemable

Index

Properties

Methods

Properties

Optional getFromItem

getFromItem? : undefined | function

Defined in index.ts:10


Optional idToUri

idToUri? : undefined | function

Defined in index.ts:8


scheme

scheme: string

Defined in index.ts:6

Methods

get

get(id: string): Promise‹Sessionable

Defined in index.ts:9

Parameters:

NameType
idstring

Returns: Promise‹Sessionable


getFromUri

getFromUri(uri: string): Promise‹Sessionable

Defined in index.ts:7

Parameters:

NameType
uristring

Returns: Promise‹Sessionable

@raydeck/session-manager - v1.4.0Sessionable

Interface: Sessionable

Interface for instance elements on a class. (Much simpler requirement)

Hierarchy

  • Sessionable

Index

Methods

Methods

getUri

getUri(): string

Defined in index.ts:16

Returns: string

1.4.0

4 years ago

1.2.0

4 years ago

1.3.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago