Class: PhoneClient
@kortexya/reasoninglayer / PhoneClient
Class: PhoneClient
Section titled “Class: 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.
Methods
Section titled “Methods”eraseRehearsalHistory()
Section titled “eraseRehearsalHistory()”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.
Parameters
Section titled “Parameters”lineId
Section titled “lineId”string
Native phone line identity.
sessionId
Section titled “sessionId”string
Saved test identity.
requestOptions?
Section titled “requestOptions?”Cancellation, timeout and transport options.
Returns
Section titled “Returns”Promise<void>
Only after the native server confirms erasure with 204. A repeated erase is idempotent.
Throws
Section titled “Throws”A storage failure remains retryable; no successful local erasure is inferred.
Remarks
Section titled “Remarks”Aborting or timing out does not undo a request already accepted by the server.
Example
Section titled “Example”`await client.phone.eraseRehearsalHistory(lineId, testId);`getRehearsalHistory()
Section titled “getRehearsalHistory()”getRehearsalHistory(
lineId,sessionId,requestOptions?):Promise<PhoneHistoryTranscript>
Defined in: src/resources/phone.ts:81
Read one saved private transcript.
Parameters
Section titled “Parameters”lineId
Section titled “lineId”string
Native phone line identity.
sessionId
Section titled “sessionId”string
Saved test identity, not a conversation owner.
requestOptions?
Section titled “requestOptions?”Cancellation, timeout and transport options.
Returns
Section titled “Returns”Promise<PhoneHistoryTranscript>
Plain user/assistant turns from the selected active test.
Throws
Section titled “Throws”404 for inaccessible tests; 410 when erasure has begun.
Example
Section titled “Example”`await client.phone.getRehearsalHistory(lineId, testId);`listRehearsalHistory()
Section titled “listRehearsalHistory()”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.
Parameters
Section titled “Parameters”lineId
Section titled “lineId”string
Native phone line identity.
query?
Section titled “query?”Page size and continuation returned by the prior page.
requestOptions?
Section titled “requestOptions?”Cancellation, timeout and transport options.
Returns
Section titled “Returns”Promise<PhoneHistoryPage>
A bounded page; continue while nextAfter is non-null, even if entries is empty.
Remarks
Section titled “Remarks”Keyset order, not a consistent snapshot across concurrent changes.
Example
Section titled “Example”`await client.phone.listRehearsalHistory(lineId, { limit: 25 });`