InteractionService
@auvious/interaction / Exports / InteractionService
Class: InteractionService
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new InteractionService(commonSource)
Parameters
| Name | Type |
|---|---|
commonSource | Observable<AuviousCommon> |
Properties
apiResource
• Private apiResource: ApiResource
Methods
create
▸ create(interactionId, type, data): Promise<string>
Creates an interaction on the Auvious platform.
Parameters
| Name | Type | Description |
|---|---|---|
interactionId | string | interactionId, can be null if you want the server to create one. |
type | string | type of interaction can be any string |
data | InteractionData | data is a map with string keys and values can be anything |
Returns
Promise<string>
the interaction id which should be the same with interactionId param, if it was not null
get
▸ get(interactionId): Promise<Interaction>
Find an interaction by it's id.
Parameters
| Name | Type | Description |
|---|---|---|
interactionId | string | id of interaction to look for |
Returns
Promise<Interaction>
the interaction if found
getPage
▸ getPage(start, end, page, pageSize, sort?, filters?): Promise<PagedCollection<Interaction>>
Get all interactions of the user organization, between start and end date, as a page.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
start | Date | undefined | start date |
end | Date | undefined | end date |
page | number | undefined | page number |
pageSize | number | undefined | page size |
sort | string | "createdAt,desc" | - |
filters | Object | {} | - |
filters.recording? | ("media" | "cobrowse")[] | undefined | - |
filters.type? | ("audio" | "video" | "cobrowse" | "chat")[] | undefined | - |
filters.userIds? | string[] | undefined | - |
Returns
Promise<PagedCollection<Interaction>>
update
▸ update(interactionId, type, data): Promise<void>
Update interaction type and/or data.
Parameters
| Name | Type | Description |
|---|---|---|
interactionId | string | id of interaction to update |
type | string | if not null, type will be updated to this type |
data | InteractionData | if not null, data will be set to this value |
Returns
Promise<void>