@nemphi/sdk 0.2.4844 → 0.2.4898

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1679,6 +1679,15 @@ export interface Document {
1679
1679
  extracted?: unknown;
1680
1680
  error?: string;
1681
1681
  }
1682
+ /**
1683
+ * A document with the whole text its extraction read (documents.read_text):
1684
+ * a .docx as paragraphs, a spreadsheet as tables, a presentation as slides,
1685
+ * a PDF as pages. Empty until the document is processed, or when it has no
1686
+ * text (a picture).
1687
+ */
1688
+ export interface DocumentText extends Document {
1689
+ markdown: string;
1690
+ }
1682
1691
  /** Upload kind hints that route a document to the company-profile parser. */
1683
1692
  export type CompanyDocumentKind = "rut" | "company_registration";
1684
1693
  /**
@@ -5047,6 +5056,19 @@ export interface PublicCallCenterCall {
5047
5056
  status: MarketingCallStatus;
5048
5057
  key?: string;
5049
5058
  join_token?: string | null;
5059
+ /** Present while the queue's voice agent holds the call: the page sends it the caller's audio too. */
5060
+ voice_agent?: boolean;
5061
+ }
5062
+ /** The caller's microphone pushed to the voice agent's media app. */
5063
+ export interface PublicCallCenterAgentPush {
5064
+ session_id: string;
5065
+ /** The SDP answer to the browser's offer. */
5066
+ sdp: string;
5067
+ }
5068
+ /** The agent's voice pulled into the caller's session: an SDP offer to answer when `renegotiate`. */
5069
+ export interface PublicCallCenterAgentPull {
5070
+ sdp: string;
5071
+ renegotiate: boolean;
5050
5072
  }
5051
5073
  /** One person's call-center desk (`callcenter.desk`). */
5052
5074
  export interface CallCenterDesk {
@@ -8308,6 +8330,8 @@ export interface NemphiClient {
8308
8330
  }): Promise<PartyMatches>;
8309
8331
  listDocuments(): Promise<Document[]>;
8310
8332
  getDocument(id: string): Promise<Document>;
8333
+ /** The document with the whole text its extraction read, as Markdown. */
8334
+ readDocumentText(id: string): Promise<DocumentText>;
8311
8335
  listLiveDocuments(filter?: LiveDocumentFilter): Promise<LiveDocument[]>;
8312
8336
  createLiveDocument(title: string, kind?: LiveDocumentKind, place?: LiveDocumentPlace): Promise<LiveDocument>;
8313
8337
  /** Files a document in a folder (empty: the top level) or moves it to another space. */
@@ -9318,6 +9342,16 @@ export interface NemphiClient {
9318
9342
  getPublicCallCenterCall(key: string, callId: string, callerKey: string): Promise<PublicCallCenterCall>;
9319
9343
  /** Hangs up a web call that is still ringing. */
9320
9344
  hangUpPublicCallCenterCall(key: string, callId: string, callerKey: string): Promise<PublicCallCenterCall>;
9345
+ /**
9346
+ * While the queue's voice agent holds a web call (`voice_agent`), pushes
9347
+ * the caller's microphone to the agent's media app: the browser's SDP
9348
+ * offer for transceiver `mid` in, the session and the SDP answer out.
9349
+ */
9350
+ pushPublicCallCenterAgent(key: string, callId: string, callerKey: string, sdp: string, mid: string): Promise<PublicCallCenterAgentPush>;
9351
+ /** Pulls the agent's voice into the caller's session; 409 `agent_not_ready` until it is seated. */
9352
+ pullPublicCallCenterAgent(key: string, callId: string, callerKey: string, sessionId: string): Promise<PublicCallCenterAgentPull>;
9353
+ /** Hands the browser's SDP answer to a pull's offer back. */
9354
+ answerPublicCallCenterAgent(key: string, callId: string, callerKey: string, sessionId: string, sdp: string): Promise<void>;
9321
9355
  /** Claims a guest seat on a call link; poll `getPublicCallParticipant` with the result. */
9322
9356
  joinPublicCall(token: string, name: string): Promise<PublicCallJoin>;
9323
9357
  /** Polls a guest seat for its media token. Unauthenticated. */