@raydeck/session-manager v1.4.0
@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:
Name | Type |
---|---|
a | any |
b? | any |
c? | any |
Variables
Let
registry
• registry: object
Defined in index.ts:19
Type declaration:
- [ url: string]: Sessionable
Const
schemeRegistry
• schemeRegistry: object
Defined in index.ts:18
Type declaration:
- [ scheme: string]: Schemable
Functions
addClass
▸ addClass(newClass
: Schemable): Promise‹void›
Defined in index.ts:46
Add a scheme-able class to the session registry
Parameters:
Name | Type | Description |
---|---|---|
newClass | Schemable | Class -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
▸ getFromId‹T›(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:
Name | Type | Description |
---|---|---|
schemeOrClass | string | Schemable | Scheme (e.g. "myClass") or classname ("MyClass") to look up |
id | string | id global within the class domain |
Returns: Promise‹T›
getFromItem
▸ getFromItem‹T›(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:
Name | Type | Description |
---|---|---|
schemeOrClass | string | Schemable | Scheme (e.g. "myClass") or classname ("MyClass") to look up |
item | object | Map of attributes to load from |
Returns: Promise‹T›
getFromUri
▸ getFromUri‹T›(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:
Name | Type | Description |
---|---|---|
uri | string | URI 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:
Name | Type | Description |
---|---|---|
uri | string |
Returns: boolean
remove
▸ remove(uri
: string): void
Defined in index.ts:142
Removes an instance from the reistry by the uri
Parameters:
Name | Type | Description |
---|---|---|
uri | string | URI 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:
Name | Type | Description |
---|---|---|
o | Sessionable | instance 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:
Name | Type | Description |
---|---|---|
f | LambdaFunctionType | function 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:
Name | Type | Description |
---|---|---|
f | LambdaFunctionType | function to wrap |
Returns: (Anonymous function)
@raydeck/session-manager - v1.4.0 › Schemable
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:
Name | Type |
---|---|
id | string |
Returns: Promise‹Sessionable›
getFromUri
▸ getFromUri(uri
: string): Promise‹Sessionable›
Defined in index.ts:7
Parameters:
Name | Type |
---|---|
uri | string |
Returns: Promise‹Sessionable›
@raydeck/session-manager - v1.4.0 › Sessionable
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