@raydeck/session-manager - v1.4.0
Ƭ LambdaFunctionType: function
Defined in index.ts:87
▸ (a
: any, b?
: any, c?
: any): any
Parameters:
Name | Type |
---|---|
a |
any |
b? |
any |
c? |
any |
• registry: object
Defined in index.ts:19
- [ url: string]: Sessionable
• schemeRegistry: object
Defined in index.ts:18
- [ scheme: string]: Schemable
▸ 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(): void
Defined in index.ts:84
Flush the session of cached files
Returns: void
▸ 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‹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‹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(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(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(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(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)
▸ 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 for static elements on a class
- Schemable
• getFromItem? : undefined | function
Defined in index.ts:10
• idToUri? : undefined | function
Defined in index.ts:8
• scheme: string
Defined in index.ts:6
▸ get(id
: string): Promise‹Sessionable›
Defined in index.ts:9
Parameters:
Name | Type |
---|---|
id |
string |
Returns: Promise‹Sessionable›
▸ 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 for instance elements on a class. (Much simpler requirement)
- Sessionable
▸ getUri(): string
Defined in index.ts:16
Returns: string