@squidcloud/twilio-client 1.0.495 → 1.0.497

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.
@@ -42,6 +42,10 @@ export interface AiAgentTwilioIntegrationOptions {
42
42
  openAiVoiceIntegrationId?: IntegrationId;
43
43
  /** OpenAI engine: the realtime model that talks on the call. Defaults to the integration's default model. */
44
44
  voiceModel?: string;
45
+ /** OpenAI engine: whether caller speech interrupts the model. Omitted values keep OpenAI's default. */
46
+ allowInterruptions?: boolean;
47
+ /** OpenAI engine: how readily caller speech is detected. Omitted values keep OpenAI's default. */
48
+ interruptionSensitivity?: 'low' | 'normal' | 'high';
45
49
  /** Spoken as soon as a call is answered. Defaults to a short greeting in `language`, when one is known. */
46
50
  welcomeGreeting?: string;
47
51
  /**
@@ -1,2 +1,2 @@
1
- export { AiAgentTwilioIntegrationOptions, GetTwilioCallTranscriptRequest, GetTwilioCallTranscriptResponse, ListTwilioPhoneNumbersRequest, ListTwilioPhoneNumbersResponse, PlaceTwilioCallRequest, PlaceTwilioCallResponse, ProvisionTwilioAgentRequest, ProvisionTwilioAgentResponse, SMS_EVENT_TYPE, SendTwilioSmsRequest, SendTwilioSmsResponse, TwilioAgentProvisioning, TwilioCallRecord, TwilioCallTranscriptEntry, TwilioPhoneNumber, TwilioSmsEvent, VoiceEngine, VoiceMode, } from '../../common/src/twilio-types';
1
+ export { AiAgentTwilioIntegrationOptions, CallSid, CreateTwilioCustomerVoiceTokenRequest, CreateTwilioCustomerVoiceTokenResponse, ElevenLabsProvisionedIds, GetTwilioCallTranscriptRequest, GetTwilioCallTranscriptResponse, GetTwilioCustomerVoiceCallRequest, GetTwilioCustomerVoiceCallResponse, ListTwilioPhoneNumbersRequest, ListTwilioPhoneNumbersResponse, OpenAiVoiceSipTarget, PlaceTwilioCallRequest, PlaceTwilioCallResponse, ProvisionTwilioAgentRequest, ProvisionTwilioAgentResponse, SMS_EVENT_TYPE, SendTwilioSmsRequest, SendTwilioSmsResponse, SetTwilioHumanHandoffRequest, SetTwilioHumanHandoffResponse, TwilioAgentProvisioning, TwilioCallRecord, TwilioCallTranscriptEntry, TwilioPhoneNumber, TwilioSmsEvent, VOICE_ENGINES, VOICE_MODES, VoiceEngine, VoiceMode, } from '../../common/src/twilio-types';
2
2
  export * from './twilio-client';
@@ -1,5 +1,5 @@
1
1
  import { Squid } from '@squidcloud/client';
2
- import { GetTwilioCallTranscriptRequest, GetTwilioCallTranscriptResponse, ListTwilioPhoneNumbersResponse, PlaceTwilioCallRequest, PlaceTwilioCallResponse, ProvisionTwilioAgentRequest, ProvisionTwilioAgentResponse, SendTwilioSmsRequest, SendTwilioSmsResponse } from '../../common/src/twilio-types';
2
+ import { CreateTwilioCustomerVoiceTokenRequest, CreateTwilioCustomerVoiceTokenResponse, GetTwilioCallTranscriptRequest, GetTwilioCallTranscriptResponse, GetTwilioCustomerVoiceCallRequest, GetTwilioCustomerVoiceCallResponse, ListTwilioPhoneNumbersResponse, PlaceTwilioCallRequest, PlaceTwilioCallResponse, ProvisionTwilioAgentRequest, ProvisionTwilioAgentResponse, SendTwilioSmsRequest, SendTwilioSmsResponse, SetTwilioHumanHandoffRequest, SetTwilioHumanHandoffResponse } from '../../common/src/twilio-types';
3
3
  /** Client of the Twilio connector for one integration; every call needs an app API key. */
4
4
  export declare class SquidTwilioClient {
5
5
  private readonly squid;
@@ -15,4 +15,16 @@ export declare class SquidTwilioClient {
15
15
  listPhoneNumbers(): Promise<ListTwilioPhoneNumbersResponse>;
16
16
  /** Wires an agent's number up again and returns the outcome; saving the agent's connection does this on its own. */
17
17
  provisionAgent(request: Omit<ProvisionTwilioAgentRequest, 'integrationId'>): Promise<ProvisionTwilioAgentResponse>;
18
+ /**
19
+ * Issues a short-lived Twilio Voice SDK credential for a browser call with one agent. The browser connects
20
+ * with it and the call rings the agent like a call to its number; needs the integration's API key.
21
+ */
22
+ createCustomerVoiceToken(request: Omit<CreateTwilioCustomerVoiceTokenRequest, 'integrationId'>): Promise<CreateTwilioCustomerVoiceTokenResponse>;
23
+ /** The call a browser credential was used for, once the browser connected. */
24
+ getCustomerVoiceCall(request: Omit<GetTwilioCustomerVoiceCallRequest, 'integrationId'>): Promise<GetTwilioCustomerVoiceCallResponse>;
25
+ /**
26
+ * Claims a live call for a human handoff, confirms the human is on, or releases an unconfirmed claim. A
27
+ * claimed call is routed to `handoffUrl` at its next Twilio callback and is no longer ended by the agent.
28
+ */
29
+ setHumanHandoff(request: Omit<SetTwilioHumanHandoffRequest, 'integrationId'>): Promise<SetTwilioHumanHandoffResponse>;
18
30
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,i)=>{if(Array.isArray(i))for(var n=0;n<i.length;){var r=i[n++],o=i[n++];e.o(t,r)?0===o&&n++:0===o?Object.defineProperty(t,r,{enumerable:!0,value:i[n++]}):Object.defineProperty(t,r,{enumerable:!0,get:o})}else for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};let t={};e.r(t),e.d(t,{SMS_EVENT_TYPE:()=>i,SquidTwilioClient:()=>n});const i="twilio-sms-event";class n{constructor(e,t){this.squid=e,this.integrationId=t}async sendSms(e){return this.squid.executeFunction("sendSms",{...e,integrationId:this.integrationId})}async placeCall(e){return this.squid.executeFunction("placeCall",{...e,integrationId:this.integrationId})}async getCallTranscript(e){return this.squid.executeFunction("getCallTranscript",{...e,integrationId:this.integrationId})}async listPhoneNumbers(){return this.squid.executeFunction("twilioListPhoneNumbers",{integrationId:this.integrationId})}async provisionAgent(e){return this.squid.executeFunction("twilioProvisionAgent",{...e,integrationId:this.integrationId})}}const r=exports;for(var o in t)r[o]=t[o];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";const e={d:(t,i)=>{if(Array.isArray(i))for(var n=0;n<i.length;){var r=i[n++],o=i[n++];e.o(t,r)?0===o&&n++:0===o?Object.defineProperty(t,r,{enumerable:!0,value:i[n++]}):Object.defineProperty(t,r,{enumerable:!0,get:o})}else for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};let t={};e.r(t),e.d(t,{SMS_EVENT_TYPE:()=>i,SquidTwilioClient:()=>o,VOICE_ENGINES:()=>r,VOICE_MODES:()=>n});const i="twilio-sms-event",n=["relay","gather"],r=["twilio","elevenlabs","openai"];class o{constructor(e,t){this.squid=e,this.integrationId=t}async sendSms(e){return this.squid.executeFunction("sendSms",{...e,integrationId:this.integrationId})}async placeCall(e){return this.squid.executeFunction("placeCall",{...e,integrationId:this.integrationId})}async getCallTranscript(e){return this.squid.executeFunction("getCallTranscript",{...e,integrationId:this.integrationId})}async listPhoneNumbers(){return this.squid.executeFunction("twilioListPhoneNumbers",{integrationId:this.integrationId})}async provisionAgent(e){return this.squid.executeFunction("twilioProvisionAgent",{...e,integrationId:this.integrationId})}async createCustomerVoiceToken(e){return this.squid.executeFunction("twilioCreateCustomerVoiceToken",{...e,integrationId:this.integrationId})}async getCustomerVoiceCall(e){return this.squid.executeFunction("twilioGetCustomerVoiceCall",{...e,integrationId:this.integrationId})}async setHumanHandoff(e){return this.squid.executeFunction("twilioSetHumanHandoff",{...e,integrationId:this.integrationId})}}const s=exports;for(var a in t)s[a]=t[a];t.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})})();
@@ -505,7 +505,11 @@ export interface BaseAiChatOptions {
505
505
  responseFormat?: AiAgentResponseFormat;
506
506
  /** Whether to response in a "smooth typing" way, beneficial when the chat result is displayed in a UI. Default to true. */
507
507
  smoothTyping?: boolean;
508
- /** Global context passed to the agent and all AI functions of the agent. */
508
+ /**
509
+ * Global context passed to the agent and all AI functions of the agent. A request's value also reaches the AI
510
+ * functions of its connected agents, merged over each one's stored `agentContext`. Its keys are caller input and
511
+ * win over stored ones: only the root agent's `@secureAiAgent` rules can vet them, and none run for a public agent.
512
+ */
509
513
  agentContext?: Record<string, unknown>;
510
514
  /**
511
515
  * Functions to expose to the AI.
@@ -950,6 +954,12 @@ export interface AiStatusMessage {
950
954
  /** Optional tags providing additional metadata about the status. */
951
955
  tags?: Record<string, any>;
952
956
  }
957
+ /**
958
+ * `errorType` on a failed chat/ask job when the AI provider itself failed (a stall, timeout, or
959
+ * unrecognized 5xx) rather than Squid or the caller's request.
960
+ * @category AI
961
+ */
962
+ export declare const AI_PROVIDER_ERROR_TYPE = "AI_PROVIDER_ERROR";
953
963
  /** List of all chat history (memory) sources. */
954
964
  export declare const AI_CHAT_MESSAGE_SOURCE: readonly ["user", "ai"];
955
965
  /** Source of the chat history entry: either an AI response or a user. */
@@ -1068,17 +1078,12 @@ export interface UpsertContextStatusSuccess extends BaseUpsertContextStatus {
1068
1078
  imageFailureCount?: number;
1069
1079
  }
1070
1080
  /**
1071
- * Machine-readable code identifying a specific upsert failure reason.
1072
- *
1073
- * `DUPLICATE_CONTENT` means the request omitted a contextId and its content is
1074
- * byte-identical to an existing context in the same knowledge base.
1075
- *
1076
- * `EMBEDDING_FAILED` means extraction succeeded but embedding the context's chunks did not; the
1077
- * content was not written (an overwrite target keeps its previous content) and the request can be
1078
- * safely retried as-is.
1081
+ * Names an upsert failure; `DUPLICATE_CONTENT` identifies existing content when contextId is omitted.
1082
+ * `EMBEDDING_FAILED`, `EXTRACTION_TIMED_OUT`, `PROVIDER_ACCESS_DENIED`, and `SOURCE_UNREACHABLE` may
1083
+ * succeed on retry. Document faults carry `retryable: false` because the same bytes fail again.
1079
1084
  * @category AI
1080
1085
  */
1081
- export type UpsertContextErrorCode = 'DUPLICATE_CONTENT' | 'EMBEDDING_FAILED';
1086
+ export type UpsertContextErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1082
1087
  /**
1083
1088
  * The existing context a `DUPLICATE_CONTENT` rejection points at — where the byte-identical original
1084
1089
  * already lives.
@@ -1105,6 +1110,11 @@ export interface UpsertContextStatusError extends BaseUpsertContextStatus {
1105
1110
  errorMessage: string;
1106
1111
  /** Machine-readable code for the failure, when one applies. */
1107
1112
  errorCode?: UpsertContextErrorCode;
1113
+ /**
1114
+ * Present only when the same bytes fail the same way again, so a caller must not retry the request
1115
+ * as-is. Absence means the failure may be transient.
1116
+ */
1117
+ retryable?: false;
1108
1118
  /**
1109
1119
  * The existing context this request duplicated, when `errorCode` is `DUPLICATE_CONTENT`. Lets a caller
1110
1120
  * point the user at where the original already lives (e.g. its folder) instead of only reporting the
@@ -37,11 +37,16 @@ export type AiFileProviderType = (typeof AI_FILE_PROVIDER_TYPES)[number];
37
37
  * for them the ids are inert rather than wrong.
38
38
  */
39
39
  export declare function isFileCapableProviderType(type: AiProviderType): type is AiFileProviderType;
40
+ /**
41
+ * The AI providers whose chat provider implements the code interpreter. Declared like
42
+ * {@link AI_FILE_PROVIDER_TYPES}, so a provider that gains the interpreter is added here and nowhere else.
43
+ */
44
+ export declare const AI_CODE_INTERPRETER_PROVIDER_TYPES: readonly ["openai", "anthropic", "gemini"];
40
45
  /**
41
46
  * Public OpenAI chat model names (active models only).
42
47
  * @category AI
43
48
  */
44
- export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra"];
49
+ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna"];
45
50
  /**
46
51
  * Public Gemini chat model names (active models only).
47
52
  * @category AI
@@ -56,12 +61,12 @@ export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4.6", "grok-4-1-fast
56
61
  * Public Anthropic chat model names (active models only).
57
62
  * @category AI
58
63
  */
59
- export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5", "claude-sonnet-5"];
64
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5"];
60
65
  /**
61
66
  * The supported AI model names.
62
67
  * @category AI
63
68
  */
64
- export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5", "claude-sonnet-5", "gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
69
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna", "claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5", "gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
65
70
  /** Checks if the given model name is a global AI chat model name. */
66
71
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
67
72
  /**
@@ -1,4 +1,4 @@
1
- import { AgentContextRequest, AiChatModelSelection, AiReasoningEffort, ContextImageFailure, UpsertContextStatusError } from './ai-agent.public-types';
1
+ import { AiChatModelSelection, AiReasoningEffort, ContextImageFailure, UpsertContextStatusError } from './ai-agent.public-types';
2
2
  import { AiEmbeddingsModelSelection, AiRerankProvider } from './ai-common.public-types';
3
3
  import { AiContextId, AiKnowledgeBaseId, AppId } from './communication.public-types';
4
4
  import { DocumentExtractionMethod } from './extraction.public-types';
@@ -228,12 +228,24 @@ export interface AiKnowledgeBaseGraphConfig {
228
228
  */
229
229
  autoBuildDebounceMs?: number;
230
230
  /**
231
- * When true, the sweep does not start automatic structural builds for this KB: activity keeps arming
232
- * the build, and the first quiet window after the flag is cleared runs it. Meant for an ingestion
233
- * campaign whose builds an operator wants to schedule by hand; `rebuildGraph` stays available.
234
- * Defaults to false.
231
+ * When true, the sweep starts no automatic build for this KB, entity resolution included: activity keeps
232
+ * arming the build, and the first quiet window after the flag is cleared runs it. `rebuildGraph` stays
233
+ * available. To hold only the structural build, use `structuralBuildSchedule`. Defaults to false.
235
234
  */
236
235
  autoBuildPaused?: boolean;
236
+ /**
237
+ * When the sweep may start an automatic structural build: `'debounced'` (one quiet window after activity),
238
+ * `'off'` (manual `rebuildGraph` only) or a 5-field cron expression. Entity resolution keeps running
239
+ * either way. Omitted ⇒ the server's default, `'debounced'` unless the deployment sets one.
240
+ */
241
+ structuralBuildSchedule?: string;
242
+ /** IANA time zone of a cron `structuralBuildSchedule`, e.g. `'America/Los_Angeles'`. Omitted ⇒ the server's default (UTC). */
243
+ structuralBuildTimeZone?: string;
244
+ /**
245
+ * How long after a cron slot its structural build may still start (milliseconds); past it, the build waits for
246
+ * the next slot. Must be a positive integer. Omitted ⇒ the server's default (3 hours).
247
+ */
248
+ structuralBuildCatchUpMs?: number;
237
249
  /** Concept-layer (facet taxonomy) configuration. Omitted ⇒ `facets: 'auto'`. */
238
250
  concepts?: AiKnowledgeBaseGraphConceptsConfig;
239
251
  }
@@ -265,6 +277,13 @@ export interface AiKnowledgeBaseGraphConceptsConfig {
265
277
  * @category AI
266
278
  */
267
279
  export declare const FOLDER_PATH_METADATA_FIELD_NAME = "folderPath";
280
+ /**
281
+ * The canonical file-name metadata field: the source file's name, stamped by file ingestion (console
282
+ * upload, document connectors). Metadata extraction reads it, beside {@link FOLDER_PATH_METADATA_FIELD_NAME},
283
+ * as evidence about the document.
284
+ * @category AI
285
+ */
286
+ export declare const FILE_NAME_METADATA_FIELD_NAME = "filename";
268
287
  /**
269
288
  * A path facet: a deterministic tree built by splitting a hierarchical path field on {@link separator}.
270
289
  * Interior nodes are the path prefixes; scoping a search to one node matches that folder and everything
@@ -498,9 +517,18 @@ export interface AiKnowledgeBaseContext {
498
517
  * content-level dedup on upsert. Absent on legacy contexts ingested before hashing was introduced.
499
518
  */
500
519
  contentHash?: string;
501
- /** Original request configuration for how the context content was processed. */
502
- requestConfig?: AgentContextRequest;
520
+ /**
521
+ * The options the context was ingested with, replayed when it is reupserted. Absent on contexts that
522
+ * carry none; their reupsert takes the defaults.
523
+ */
524
+ requestConfig?: AiKnowledgeBaseContextRequestConfig;
503
525
  }
526
+ /**
527
+ * The ingestion request's options only. Everything else a reupsert needs lives on the context itself —
528
+ * its text or stored file, title, metadata and access scopes — where it can change after ingestion.
529
+ * @category AI
530
+ */
531
+ export type AiKnowledgeBaseContextRequestConfig = Omit<AiKnowledgeBaseTextContextRequest, 'text' | 'title' | 'metadata' | 'scopes'> | Omit<AiKnowledgeBaseFileContextRequest, 'metadata' | 'scopes'>;
504
532
  /**
505
533
  * @category AI
506
534
  */
@@ -633,11 +661,10 @@ export interface AiKnowledgeBaseFileContextRequest extends BaseAiKnowledgeBaseCo
633
661
  /** The preferred method for extracting data from the document. */
634
662
  preferredExtractionMethod?: DocumentExtractionMethod;
635
663
  /**
636
- * Whether Squid keeps or discards the original file.
637
- *
638
- * Keeping the original file allows reprocessing and the ability for the user to download it later.
639
- *
640
- * Defaults to false.
664
+ * Whether Squid discards the downloadable original once the file is extracted; the extracted text and
665
+ * images are stored either way. Defaults to false: the original is kept so the user can download it and
666
+ * Squid can reprocess it. Without it, `querySpreadsheetsWithAi` cannot open a workbook context and a
667
+ * reupsert of the context fails, on the sync and the bulk lane alike.
641
668
  */
642
669
  discardOriginalFile?: boolean;
643
670
  }
@@ -945,9 +972,9 @@ export interface GrepKnowledgeBaseResponse {
945
972
  */
946
973
  unscannedContextCount?: number;
947
974
  /**
948
- * With `limitation: 'truncatedContent'`, the file names of documents known to have lost content at
949
- * ingest. A bounded sample, not a complete list — present it as an example, and do not infer that
950
- * documents missing from it are intact.
975
+ * Every in-scope document known to have lost content at ingest, by file name. Present whenever such a
976
+ * document is in scope, alongside whichever {@link limitation} the scan reported — a cut document is no
977
+ * less cut because the scan also stopped early. Absent when none is.
951
978
  */
952
979
  truncatedContentFileNames?: Array<string>;
953
980
  }
@@ -1710,7 +1737,8 @@ export interface QueryKnowledgeBaseGraphResponse {
1710
1737
  summaries?: Array<KnowledgeBaseGraphQueryGlobalSummary>;
1711
1738
  }
1712
1739
  /**
1713
- * One context to stage through bulk ingestion.
1740
+ * One context to stage through bulk ingestion. Unlike the sync request, `imageExtractionModel` is not
1741
+ * accepted: a job bills one fixed vision model for every image it describes.
1714
1742
  * @category AI
1715
1743
  */
1716
1744
  export interface BulkIngestionContext {
@@ -1744,6 +1772,24 @@ export interface BulkIngestionContext {
1744
1772
  * same name, so a caller's choice survives whichever lane a deployment routes the upload through.
1745
1773
  */
1746
1774
  preferredExtractionMethod?: DocumentExtractionMethod;
1775
+ /**
1776
+ * The RAG type and chunk overlap this context is chunked and indexed with; mirrors the sync request's
1777
+ * `options`, with the same defaults (the knowledge base's `ragType`, and the overlap that type implies).
1778
+ * `chunkOverlap` must be a number below the 4,000-character chunk size.
1779
+ */
1780
+ options?: BaseAiKnowledgeBaseContextOptions;
1781
+ /**
1782
+ * Minimum width/height in pixels for an extracted image to be kept; mirrors the sync request's field of
1783
+ * the same name. Smaller images are skipped, and an inline markdown/HTML image below it keeps its raw
1784
+ * reference in the text.
1785
+ */
1786
+ imageMinSizePixels?: number;
1787
+ /**
1788
+ * Whether Squid discards a file context's downloadable original once it is extracted (the extracted
1789
+ * text and images are stored either way); mirrors {@link AiKnowledgeBaseFileContextRequest.discardOriginalFile},
1790
+ * with the same consequences. Ignored for a text context.
1791
+ */
1792
+ discardOriginalFile?: boolean;
1747
1793
  /**
1748
1794
  * Optional metadata associated with the context item; mirrors {@link BaseAiKnowledgeBaseContextRequest.metadata}.
1749
1795
  * Squid-reserved keys are stripped server-side, and values are validated/normalized against the target
@@ -1867,8 +1913,11 @@ export interface BulkIngestionFileStatus {
1867
1913
  /**
1868
1914
  * Machine-readable class of a failed file, for outcomes to treat differently from real failures.
1869
1915
  * Terminal — reported with `retryable: false` — are `'CONTENT_TOO_LARGE'` (past the per-context
1870
- * ceiling), `'ENCRYPTED_DOCUMENT'`, `'NO_EMBEDDABLE_CONTENT'`, `'SOURCE_OVER_PROVIDER_LIMIT'` (the
1871
- * bytes exceed what the extraction provider accepts) and `'UNSUPPORTED_FILE_TYPE'`.
1916
+ * ceiling), `'ENCRYPTED_DOCUMENT'`, `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
1917
+ * document as too large, even with the pages that draw it redrawn smaller), `'NO_EMBEDDABLE_CONTENT'`,
1918
+ * `'SOURCE_OVER_PROVIDER_LIMIT'` (the bytes exceed what the extraction provider accepts),
1919
+ * `'UNREADABLE_DOCUMENT'` (a PDF or Office file whose bytes cannot be opened as one), `'UNREADABLE_WORKBOOK'`
1920
+ * (a spreadsheet whose content the parser cannot read) and `'UNSUPPORTED_FILE_TYPE'`.
1872
1921
  * `'DUPLICATE_CONTENT'` is a skip rather than a failure: the KB already holds this content.
1873
1922
  * `'EXTRACTION_TIMED_OUT'` stays retryable — the deadline is contended, so a borderline document can
1874
1923
  * cross it under load. So do `'SOURCE_UNREACHABLE'` (the provider could not fetch the source, which a
@@ -1877,7 +1926,7 @@ export interface BulkIngestionFileStatus {
1877
1926
  * file, so re-submit it in a fresh job; a file that alone exceeds the ceiling fails this way in every job.
1878
1927
  * Additive; absent for ordinary failures.
1879
1928
  */
1880
- errorCode?: 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNSUPPORTED_FILE_TYPE';
1929
+ errorCode?: 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1881
1930
  /**
1882
1931
  * Present only on a failed file an extraction provider answered: a stable fingerprint of that answer
1883
1932
  * (provider, HTTP status and provider code), so a caller can tell the same failure repeating from a new one.
@@ -1895,7 +1944,25 @@ export interface BulkIngestionFileStatus {
1895
1944
  imageFailures?: Array<ContextImageFailure>;
1896
1945
  /** Total number of failed images, which exceeds `imageFailures.length` when the list was capped. */
1897
1946
  imageFailureCount?: number;
1947
+ /**
1948
+ * Set on a `completed` file that is stored and searchable but that the job withheld from graph indexing;
1949
+ * the bulk counterpart of {@link UpsertKnowledgeBaseContextsResponse.graphIndexingSkippedContextIds}, and
1950
+ * `graphIndexingSkipReason` says why. Records the job's own outcome: it is written when the job's graph
1951
+ * run admits its files, which can be after the job completes (a poll of the job status sees it, the
1952
+ * terminal push may not), and it stays set even if a later graph build indexes the file.
1953
+ */
1954
+ graphIndexingSkipped?: boolean;
1955
+ /** Why graph indexing was withheld; present exactly when `graphIndexingSkipped` is. */
1956
+ graphIndexingSkipReason?: BulkIngestionGraphSkipReason;
1898
1957
  }
1958
+ /**
1959
+ * Why a bulk-ingested file was withheld from graph indexing. `'cap'`: the knowledge base is over its
1960
+ * per-KB graph chunk cap (or the cap could not be checked and the job failed closed), so the file stays
1961
+ * out until the cap allows it. `'queue'`: the graph-indexing queue was full when the file finalized; the
1962
+ * file is left to the graph auto-build sweep, which indexes it under the same cap once the job goes quiet.
1963
+ * @category AI
1964
+ */
1965
+ export type BulkIngestionGraphSkipReason = 'cap' | 'queue';
1899
1966
  /**
1900
1967
  * Why a whole bulk-ingestion staging call was refused, on the `details` of its 400 response. The
1901
1968
  * refusal names the one context that caused it, so a caller recording per-file outcomes charges only
@@ -78,6 +78,10 @@ export interface AnswerOpenAiVoiceCallRequest {
78
78
  model?: string;
79
79
  /** Voice of the realtime model; defaults to the integration's default voice. */
80
80
  voice?: string;
81
+ /** Whether caller speech interrupts the realtime model. Omitted values keep OpenAI's default. */
82
+ allowInterruptions?: boolean;
83
+ /** How readily OpenAI detects caller speech. Omitted values keep OpenAI's default. */
84
+ interruptionSensitivity?: 'low' | 'normal' | 'high';
81
85
  /** Instructions of the realtime model. */
82
86
  instructions: string;
83
87
  /** Spoken as soon as the call is answered; without it the model waits for the caller to speak first. */
@@ -124,6 +128,10 @@ export interface StartOpenAiWebVoiceCallRequest {
124
128
  model?: string;
125
129
  /** Voice of the realtime model. */
126
130
  voice?: string;
131
+ /** Whether caller speech interrupts the model; defaults to the phone line, then OpenAI's default. */
132
+ allowInterruptions?: boolean;
133
+ /** How readily caller speech is detected; defaults to the phone line, then OpenAI's default. */
134
+ interruptionSensitivity?: 'low' | 'normal' | 'high';
127
135
  /** Language the call starts in, as an ISO code or BCP-47 tag. */
128
136
  language?: string;
129
137
  /** Whether the caller may switch language mid-call. */
@@ -14,7 +14,7 @@ export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_
14
14
  * `AiAgentMcpServerConfig.oauthIntegrationId`). Kept in sync with the providers supported by the
15
15
  * MCP OAuth validation in core.
16
16
  */
17
- export declare const MCP_OAUTH_INTEGRATION_TYPES: readonly ["auth0"];
17
+ export declare const MCP_OAUTH_INTEGRATION_TYPES: readonly ["auth0", "azure-entra-id", "azure-entra-external-id"];
18
18
  /** Supported integration types for GraphQL-based services. */
19
19
  export declare const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql"];
20
20
  /** Supported integration types for HTTP-based services. */
@@ -84,4 +84,18 @@ export interface AsyncJob<T = any> {
84
84
  * This is optional.
85
85
  */
86
86
  error?: string;
87
+ /**
88
+ * A machine-readable category for the error, if the job has failed. Lets a caller branch on the
89
+ * failure kind (e.g. `'AI_PROVIDER_ERROR'`) without parsing {@link error}.
90
+ */
91
+ errorType?: string;
92
+ }
93
+ /**
94
+ * An `Error` carrying a machine-readable {@link errorType}, thrown by `JobClient.awaitJob` when a
95
+ * failed job's {@link AsyncJob.errorType} is set. Lets a caller branch on the failure kind (e.g.
96
+ * `'AI_PROVIDER_ERROR'`) without parsing `message`.
97
+ */
98
+ export interface JobError extends Error {
99
+ /** The category the failed job's error was tagged with, if any (e.g. `'AI_PROVIDER_ERROR'`). */
100
+ errorType?: string;
87
101
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@squidcloud/twilio-client",
3
- "version": "1.0.495",
3
+ "version": "1.0.497",
4
4
  "description": "Squid Twilio Client",
5
5
  "main": "dist/index.js",
6
- "types": "dist/client/src/index.d.ts",
6
+ "types": "dist/connectors/twilio/twilio-client/src/index.d.ts",
7
7
  "scripts": {
8
8
  "prebuild": "del-cli dist",
9
9
  "build": "webpack --mode=production",
@@ -17,7 +17,7 @@
17
17
  "author": "",
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
- "@squidcloud/client": "^1.0.495"
20
+ "@squidcloud/client": "^1.0.497"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=20.0.0"