Skip to main content
@smokeballdev/smokeball-client-sdk

Interface: Api

Entry point for matters to Smokeball.

Methods

create()

create(request): Promise<Matter>
Opens a matter window with a newly created matter or lead and returns the matter.

Parameters

request
CreateMatterRequest the create request.

Returns

Promise<Matter> the created matter.

Example


get()

get(matterId?): Promise<Matter>
Gets the matter associated to the current context or the specified matter id if provided.

Parameters

matterId?
string the matter to retrieve, use null for the matter in the current context.

Returns

Promise<Matter> the specified matter.

Example


getMany()

getMany(request): Promise<GetMattersResponse>
Get matters associated with matter ids provided.

Parameters

request
GetMattersRequest the matters to retrieve.

Returns

Promise<GetMattersResponse> specified matters.

Example


observe()

observe(callback, matterId?): void
Creates a subscription for the matter associated to the current context or the specified matter id if provided. Only one subscription will be made per session. Regardless of how many times this function is called, the last registered callback will be used.

Parameters

callback
(matter) => void the function to execute when a change is made to matter(s) in Smokeball.
matterId?
string the matter to subscribe to.

Returns

void

Example


open()

open(matterId?): void
Opens the matter associated to the current context (brings it into view) or the specified matter id if provided.

Parameters

matterId?
string the matter to open, use null for the matter in the current context.

Returns

void

Example


select()

select(): Promise<string>
Opens a matter picker to select a matter. Returns the selected matter id.

Returns

Promise<string>

Example