Skip to main content

@auvious/interaction / InteractionService

Class: InteractionService

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new InteractionService(commonSource): InteractionService

Parameters​

NameType
commonSourceObservable<AuviousCommon>

Returns​

InteractionService

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"-
filtersPick<IInteractionFilters, "userIds" | "recording" | "type" | "cobrowseRequestType" | "conferenceId" | "customerId" | "interactionId" | "onHoldDurationGt" | "onHoldDurationLt" | "tags" | "transcriptStatus">{}-

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>