Skip to main content

InteractionService

@auvious/interaction / Exports / InteractionService

Class: InteractionService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new InteractionService(commonSource)

Parameters

NameType
commonSourceObservable<AuviousCommon>

Properties

apiResource

Private apiResource: ApiResource

Methods

create

create(interactionId, type, data): Promise<string>

Creates an interaction on the Auvious platform.

Parameters

NameTypeDescription
interactionIdstringinteractionId, can be null if you want the server to create one.
typestringtype of interaction can be any string
dataInteractionDatadata 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

NameTypeDescription
interactionIdstringid 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

NameTypeDefault valueDescription
startDateundefinedstart date
endDateundefinedend date
pagenumberundefinedpage number
pageSizenumberundefinedpage size
sortstring"createdAt,desc"-
filtersObject{}-
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

NameTypeDescription
interactionIdstringid of interaction to update
typestringif not null, type will be updated to this type
dataInteractionDataif not null, data will be set to this value

Returns

Promise<void>