Skip to content

Class: PhoneClient

@kortexya/reasoninglayer


@kortexya/reasoninglayer / PhoneClient

Defined in: src/resources/phone.ts:35

Native phone administration. Saved private tests remain readable/erasable independently of whether opening new test calls is enabled.

Uses the SDK’s shared authenticated HTTP transport. The server derives the history owner from the original person, tenant, line and test; clients cannot supply an independent history owner or bypass project permissions.

eraseRehearsalHistory(lineId, sessionId, requestOptions?): Promise<void>

Defined in: src/resources/phone.ts:109

Erase a private test and fence further writes from its live session.

string

Native phone line identity.

string

Saved test identity.

RequestOptions

Cancellation, timeout and transport options.

Promise<void>

Only after the native server confirms erasure with 204. A repeated erase is idempotent.

A storage failure remains retryable; no successful local erasure is inferred.

Aborting or timing out does not undo a request already accepted by the server.

`await client.phone.eraseRehearsalHistory(lineId, testId);`

getRehearsalHistory(lineId, sessionId, requestOptions?): Promise<PhoneHistoryTranscript>

Defined in: src/resources/phone.ts:81

Read one saved private transcript.

string

Native phone line identity.

string

Saved test identity, not a conversation owner.

RequestOptions

Cancellation, timeout and transport options.

Promise<PhoneHistoryTranscript>

Plain user/assistant turns from the selected active test.

404 for inaccessible tests; 410 when erasure has begun.

`await client.phone.getRehearsalHistory(lineId, testId);`

listRehearsalHistory(lineId, query?, requestOptions?): Promise<PhoneHistoryPage>

Defined in: src/resources/phone.ts:48

List one page of the current person’s saved private tests for a line.

string

Native phone line identity.

PhoneHistoryQuery

Page size and continuation returned by the prior page.

RequestOptions

Cancellation, timeout and transport options.

Promise<PhoneHistoryPage>

A bounded page; continue while nextAfter is non-null, even if entries is empty.

Keyset order, not a consistent snapshot across concurrent changes.

`await client.phone.listRehearsalHistory(lineId, { limit: 25 });`