@squidcloud/freshdesk-client 1.0.503 → 1.0.505

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.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++],s=i[n++];e.o(t,r)?0===s&&n++:0===s?Object.defineProperty(t,r,{enumerable:!0,value:i[n++]}):Object.defineProperty(t,r,{enumerable:!0,get:s})}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,{FreshdeskClient:()=>c,PRIORITY_LABELS:()=>i,RELATED_TICKETS_MODE_ENUM:()=>s,SOURCE_LABELS:()=>r,STATUS_LABELS:()=>n});const i={1:"Low",2:"Medium",3:"High",4:"Urgent"},n={2:"Open",3:"Pending",4:"Resolved",5:"Closed"},r={1:"Email",2:"Portal",3:"Phone",7:"Chat",8:"Mobihelp",9:"Feedback Widget",10:"Outbound Email"},s=["RESOLVED_OR_CLOSED","ALL","NONE"];class c{constructor(e,t){this.squid=e,this.integrationId=t}async searchTickets(e,t=50){const i={integrationId:this.integrationId,query:e,limit:t};return this.squid.executeFunction("searchFreshdeskTicketsExecutable",i)}async getTicketDetails(e,t="RESOLVED_OR_CLOSED"){const i={integrationId:this.integrationId,ticketId:e,relatedTicketsMode:t};return this.squid.executeFunction("getFreshdeskTicketDetailsExecutable",i)}async createTicket(e,t,i,n){const r={integrationId:this.integrationId,subject:e,description:t,email:i,...n};return this.squid.executeFunction("createFreshdeskTicketExecutable",r)}async updateTicket(e,t){const i={integrationId:this.integrationId,ticketId:e,...t};return this.squid.executeFunction("updateFreshdeskTicketExecutable",i)}async replyToTicket(e,t,i=!1){const n={integrationId:this.integrationId,ticketId:e,body:t,private:i};return this.squid.executeFunction("replyToFreshdeskTicketExecutable",n)}async addNote(e,t,i=!0){const n={integrationId:this.integrationId,ticketId:e,body:t,private:i};return this.squid.executeFunction("addFreshdeskNoteExecutable",n)}async changeStatus(e,t){return this.updateTicket(e,{status:t})}async changePriority(e,t){return this.updateTicket(e,{priority:t})}async resolveTicket(e){return this.changeStatus(e,4)}async closeTicket(e){return this.changeStatus(e,5)}async reopenTicket(e){return this.changeStatus(e,2)}}const a=exports;for(var o in t)a[o]=t[o];t.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";const e={d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};let t={};e.r(t),e.d(t,{FreshdeskClient:()=>c,PRIORITY_LABELS:()=>i,RELATED_TICKETS_MODE_ENUM:()=>r,SOURCE_LABELS:()=>s,STATUS_LABELS:()=>n});const i={1:"Low",2:"Medium",3:"High",4:"Urgent"},n={2:"Open",3:"Pending",4:"Resolved",5:"Closed"},s={1:"Email",2:"Portal",3:"Phone",7:"Chat",8:"Mobihelp",9:"Feedback Widget",10:"Outbound Email"},r=["RESOLVED_OR_CLOSED","ALL","NONE"];class c{constructor(e,t){this.squid=e,this.integrationId=t}async searchTickets(e,t=50){const i={integrationId:this.integrationId,query:e,limit:t};return this.squid.executeFunction("searchFreshdeskTicketsExecutable",i)}async getTicketDetails(e,t="RESOLVED_OR_CLOSED"){const i={integrationId:this.integrationId,ticketId:e,relatedTicketsMode:t};return this.squid.executeFunction("getFreshdeskTicketDetailsExecutable",i)}async createTicket(e,t,i,n){const s={integrationId:this.integrationId,subject:e,description:t,email:i,...n};return this.squid.executeFunction("createFreshdeskTicketExecutable",s)}async updateTicket(e,t){const i={integrationId:this.integrationId,ticketId:e,...t};return this.squid.executeFunction("updateFreshdeskTicketExecutable",i)}async replyToTicket(e,t,i=!1){const n={integrationId:this.integrationId,ticketId:e,body:t,private:i};return this.squid.executeFunction("replyToFreshdeskTicketExecutable",n)}async addNote(e,t,i=!0){const n={integrationId:this.integrationId,ticketId:e,body:t,private:i};return this.squid.executeFunction("addFreshdeskNoteExecutable",n)}async changeStatus(e,t){return this.updateTicket(e,{status:t})}async changePriority(e,t){return this.updateTicket(e,{priority:t})}async resolveTicket(e){return this.changeStatus(e,4)}async closeTicket(e){return this.changeStatus(e,5)}async reopenTicket(e){return this.changeStatus(e,2)}}const a=exports;for(var o in t)a[o]=t[o];t.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Version-family rules for knowledge-base sources that keep every draft of a document (`Deck v01 … v05, vF`).
3
- * Dependency-free on purpose: connectors bundle it, and the console preview runs the exact same code.
3
+ * Imports only the dependency-free `utils/string` on purpose: connectors bundle it, and the console preview runs
4
+ * the exact same code.
4
5
  */
5
6
  /** Overridable rules. A list that is present replaces the default list; an absent one keeps the default. */
6
7
  export interface KbVersionRules {
@@ -7,6 +7,7 @@ import { DocumentExtractionMethod } from './extraction.public-types';
7
7
  import { IntegrationType } from './integration.public-types';
8
8
  import { JobId } from './job.public-types';
9
9
  import { SecretKey } from './secret.public-types';
10
+ import { UpsertSessionRequest } from './session.public-types';
10
11
  /**
11
12
  * @category AI
12
13
  */
@@ -431,6 +432,13 @@ export interface AiModelRoutingOptions {
431
432
  models: VendorAiChatModelName[];
432
433
  /** The vendor model that makes the choice. */
433
434
  routingModel: VendorAiChatModelName;
435
+ /**
436
+ * How to choose, in plain language: the routing model follows it over its default rule, which
437
+ * takes the cheapest candidate that can answer well. Up to 2000 characters. The routing model
438
+ * sees each candidate's price, context window and benchmark measurements, so an instruction can
439
+ * refer to them ("never pay more than $0.01 per answer", "prefer the model measured on coding").
440
+ */
441
+ instructions?: string;
434
442
  }
435
443
  /**
436
444
  * The model of an `ask` or `chat` request: a concrete model, or a set of models a routing model chooses from.
@@ -459,8 +467,15 @@ export type AiChatRequestOptions = Omit<AllAiAgentChatOptions, 'model'> & {
459
467
  export interface AiModelRoutingResult {
460
468
  /** The model the routing model chose and the request was sent to. A `backupModel` may still have served it. */
461
469
  model: VendorAiChatModelName;
470
+ /**
471
+ * The reasoning effort the chosen model ran at: the routing model's own pick, or the request's or
472
+ * agent's effort resolved to a level the model accepts when one was set. Undefined is the model's default.
473
+ */
474
+ reasoningEffort?: AiReasoningEffort;
462
475
  /** The model that made the choice. */
463
476
  routingModel: VendorAiChatModelName;
477
+ /** The routing model's one-line justification of the choice. */
478
+ reason: string;
464
479
  /** Input tokens the routing call consumed. */
465
480
  inputTokens: number;
466
481
  /** Output tokens the routing call generated. */
@@ -516,8 +531,8 @@ export interface BaseAiChatOptions {
516
531
  */
517
532
  maxTokens?: number;
518
533
  /**
519
- * The maximum number of tokens the model should output.
520
- * Passed directly to the AI model. Can be used to control the output verbosity.
534
+ * The maximum number of tokens the model should output. Can be used to control the output verbosity.
535
+ * For a model from an AI connector, the model's configured max output tokens is the ceiling.
521
536
  */
522
537
  maxOutputTokens?: number;
523
538
  /** The context ID to use for the request. If not provided, the agent's default context will be used. */
@@ -653,6 +668,9 @@ export interface BaseAiChatOptions {
653
668
  * conversation, not only the one that fell back — tuning meant for one model is not evidence of
654
669
  * what another should use.
655
670
  *
671
+ * A turn the primary's safety classifier declines outright — no text at all came back — falls
672
+ * back the same way, since another model may well answer the same prompt.
673
+ *
656
674
  * Applies to models served through Squid's own provider SDKs — the vendor models and
657
675
  * `openai_compatible`, Bedrock and Vertex integrations. A model you serve yourself from backend
658
676
  * code reports its failures as plain errors that carry no provider status, so a turn on one is
@@ -697,17 +715,16 @@ export interface BaseAiChatOptions {
697
715
  */
698
716
  verbosity?: AiVerbosityLevel;
699
717
  /**
700
- * Enable LLMs built-in code interpreter for executing Python code.
718
+ * Enables a code interpreter for executing Python code.
701
719
  * - 'none': Code interpreter is disabled (default).
702
- * - 'llm': Use LLM's native code interpreter to run Python code.
703
- *
704
- * Note: Only supported by OpenAI, Anthropic and Gemini models. Ignored for other providers.
720
+ * - 'llm': The model runs Python in Squid's sandbox through a tool call. Requires a model that supports tool calling.
705
721
  */
706
722
  useCodeInterpreter?: 'none' | 'llm';
707
723
  /**
708
724
  * File IDs to include in the chat context.
709
725
  * These are IDs returned from the AI provider's Files API after uploading files.
710
- * Files are attached to the conversation and can be read/analyzed by the AI.
726
+ * Files are attached to the conversation and can be read/analyzed by the AI. With `useCodeInterpreter: 'llm'`,
727
+ * the files are given to the code interpreter instead.
711
728
  */
712
729
  fileIds?: string[];
713
730
  /**
@@ -863,6 +880,19 @@ export interface AiChatRequestCredentials {
863
880
  */
864
881
  integrationAccessTokens?: Record<IntegrationId, string>;
865
882
  }
883
+ /**
884
+ * The session (`squid.sessions()`) a chat request runs in. It is part of the request only: never stored with the agent.
885
+ * @category AI
886
+ */
887
+ export interface AiChatRequestSession {
888
+ /**
889
+ * Every AI function the request calls gets the session as `context.session`. With the app API key, the request
890
+ * creates the session or updates the one with the same id. Without it, a new id creates the session with its data
891
+ * and a live one is attached as it is; the agent's `@secureAiAgent` rules see both and can refuse them. A call that
892
+ * skips the rules, to a public agent or with the agent's API key, cannot attach one.
893
+ */
894
+ session?: UpsertSessionRequest;
895
+ }
866
896
  /**
867
897
  * Configuration for exposing an AI agent as an MCP server at `/mcp/<agentId>`.
868
898
  * @category AI
@@ -1144,11 +1174,12 @@ export interface UpsertContextStatusSuccess extends BaseUpsertContextStatus {
1144
1174
  }
1145
1175
  /**
1146
1176
  * Names an upsert failure; `DUPLICATE_CONTENT` identifies existing content when contextId is omitted.
1147
- * `CONTENT_IN_FLIGHT`, `EMBEDDING_FAILED`, `EXTRACTION_TIMED_OUT`, `PROVIDER_ACCESS_DENIED`, and
1148
- * `SOURCE_UNREACHABLE` may succeed on retry. Document faults carry `retryable: false` because the same bytes fail again.
1177
+ * `CONTENT_IN_FLIGHT`, `EMBEDDED_CHILDREN_NOT_RECONCILED`, `EMBEDDING_FAILED`, `EXTRACTION_TIMED_OUT`,
1178
+ * `PROVIDER_ACCESS_DENIED`, and `SOURCE_UNREACHABLE` may succeed on retry. Document faults carry `retryable: false`
1179
+ * because the same bytes fail again.
1149
1180
  * @category AI
1150
1181
  */
1151
- export type UpsertContextErrorCode = 'CONTENT_IN_FLIGHT' | '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';
1182
+ export type UpsertContextErrorCode = 'CONTENT_IN_FLIGHT' | 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDED_CHILDREN_NOT_RECONCILED' | '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';
1152
1183
  /**
1153
1184
  * The existing context a `DUPLICATE_CONTENT` rejection points at — where the byte-identical original
1154
1185
  * already lives.
@@ -1279,6 +1310,14 @@ export type BaseAiContextOptions = {
1279
1310
  ragType?: AiRagType;
1280
1311
  /** Amount of chunk overlap, in characters. */
1281
1312
  chunkOverlap?: number;
1313
+ /**
1314
+ * Contextual RAG only. On a re-upsert, a chunk whose text is unchanged keeps its stored blurb and
1315
+ * embedding, and only chunks with new text are sent to the LLM; with GraphRAG it also keeps its graph
1316
+ * entities and is not extracted again. A chunk that carries an image is always written anew. A reused blurb
1317
+ * was written against the previous version of the document; set false when an edit can change the meaning
1318
+ * of text elsewhere in it. Defaults to true.
1319
+ */
1320
+ reuseChunkContext?: boolean;
1282
1321
  };
1283
1322
  /**
1284
1323
  * @category AI
@@ -1331,8 +1370,9 @@ export type AiPiiOptions = {
1331
1370
  /** App-specific PII in plain language, e.g. `'internal case numbers like CASE-12345'`. */
1332
1371
  customRules?: Array<string>;
1333
1372
  /**
1334
- * Model performing the screening. Defaults to {@link DEFAULT_PII_CLASSIFIER_MODEL}. Each attempt is
1335
- * bounded at a minute, so an override has to answer within it.
1373
+ * Model performing the screening. Defaults to {@link DEFAULT_PII_CLASSIFIER_MODEL}, or the app's best
1374
+ * available model when that one is unavailable. Each attempt is bounded at a minute, so an override has
1375
+ * to answer within it.
1336
1376
  */
1337
1377
  classifierModel?: AiChatModelSelection;
1338
1378
  /** Literal values that never count as PII, e.g. a shared support address. */
@@ -38,8 +38,8 @@ export type AiFileProviderType = (typeof AI_FILE_PROVIDER_TYPES)[number];
38
38
  */
39
39
  export declare function isFileCapableProviderType(type: AiProviderType): type is AiFileProviderType;
40
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.
41
+ * Providers with a vendor-hosted code interpreter; unused by Squid.
42
+ * @deprecated The code interpreter runs in Squid's sandbox and works with any model that supports tool calling.
43
43
  */
44
44
  export declare const AI_CODE_INTERPRETER_PROVIDER_TYPES: readonly ["openai", "anthropic", "gemini"];
45
45
  /**
@@ -51,7 +51,7 @@ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-
51
51
  * Public Gemini chat model names (active models only).
52
52
  * @category AI
53
53
  */
54
- export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-3.1-pro", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
54
+ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-4-argon", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
55
55
  /**
56
56
  * Public Grok chat model names (active models only).
57
57
  * @category AI
@@ -61,12 +61,12 @@ export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4.6", "grok-4-1-fast
61
61
  * Public Anthropic chat model names (active models only).
62
62
  * @category AI
63
63
  */
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-5"];
64
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5", "claude-fable-5-1", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5"];
65
65
  /**
66
66
  * The supported AI model names.
67
67
  * @category AI
68
68
  */
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-luna", "gpt-6.1-sol", "claude-fable-5", "claude-fable-5-1", "claude-haiku-4-5-20251001", "claude-opus-5-5", "claude-sonnet-5-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-luna", "gpt-6.1-sol", "claude-fable-5", "claude-fable-5-1", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5", "gemini-4-argon", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
70
70
  /** Checks if the given model name is a global AI chat model name. */
71
71
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
72
72
  /**
@@ -220,6 +220,13 @@ export interface AiKnowledgeBaseGraphConfig {
220
220
  extractionModel?: AiChatModelSelection;
221
221
  /** Optional domain taxonomy hint (entity types) injected into the extraction prompt. */
222
222
  entityTypes?: string[];
223
+ /**
224
+ * How hard per-chunk extraction works. `'thorough'` allows about 40 entities per chunk instead of 15 and runs
225
+ * at high reasoning effort on OpenAI extraction models: more entities and relationships, a bigger graph (a
226
+ * listing yields ~40 entities per chunk) and about 1.5x the extraction cost. Like `extractionModel`, a change
227
+ * reaches already-indexed content on the next `full` rebuild. Defaults to `'standard'`.
228
+ */
229
+ extractionDepth?: 'standard' | 'thorough';
223
230
  /**
224
231
  * Quiet window (milliseconds) after the last graph activity before the sweep auto-builds the
225
232
  * structure. Must be a positive integer, and is floored at 3 seconds — a shorter window is not
@@ -528,6 +535,11 @@ export interface AiKnowledgeBaseContext {
528
535
  * carry none; their reupsert takes the defaults.
529
536
  */
530
537
  requestConfig?: AiKnowledgeBaseContextRequestConfig;
538
+ /**
539
+ * Set on an attachment of a OneNote section or email that the knowledge base indexed as its own context: the
540
+ * id of that container. Such contexts are managed with their container and left out of context listings.
541
+ */
542
+ parentContextId?: string;
531
543
  }
532
544
  /**
533
545
  * The ingestion request's options only. Everything else a reupsert needs lives on the context itself —
@@ -692,6 +704,12 @@ export declare const BULK_INGESTION_MAX_MULTIPART_FILE_BYTES: number;
692
704
  * @category AI
693
705
  */
694
706
  export declare const MAX_UPLOAD_FILE_BYTES: number;
707
+ /**
708
+ * Largest OneNote section (`.one`) a knowledge base ingests, on either lane. A section carries its attachments,
709
+ * each indexed as a context of its own, so it may exceed {@link MAX_UPLOAD_FILE_BYTES}.
710
+ * @category AI
711
+ */
712
+ export declare const MAX_ONENOTE_SECTION_BYTES: number;
695
713
  /**
696
714
  * @category AI
697
715
  */
@@ -709,6 +727,14 @@ export type BaseAiKnowledgeBaseContextOptions = {
709
727
  ragType?: AiRagType;
710
728
  /** Amount of chunk overlap, in characters. */
711
729
  chunkOverlap?: number;
730
+ /**
731
+ * Contextual RAG only. On a re-upsert, a chunk whose text is unchanged keeps its stored blurb and
732
+ * embedding, and only chunks with new text are sent to the LLM; with GraphRAG it also keeps its graph
733
+ * entities and is not extracted again. A chunk that carries an image is always written anew. A reused blurb
734
+ * was written against the previous version of the document; set false when an edit can change the meaning
735
+ * of text elsewhere in it. Defaults to true.
736
+ */
737
+ reuseChunkContext?: boolean;
712
738
  };
713
739
  /**
714
740
  * Specific options for the AI knowledgebase search method.
@@ -795,9 +821,10 @@ export interface UpsertKnowledgeBaseContextResponse {
795
821
  /** List of the upsert status of each item sent in the request. */
796
822
  failure?: UpsertContextStatusError;
797
823
  /**
798
- * Set when the context was stored (and is fully searchable via vector/keyword) but NOT graph-indexed
799
- * because the knowledge base is over its per-KB graph chunk cap. Only GraphRAG coverage is absent; the
800
- * singular counterpart of {@link UpsertKnowledgeBaseContextsResponse.graphIndexingSkippedContextIds}.
824
+ * Set when the context was stored (and is fully searchable via vector/keyword) but NOT graph-indexed by
825
+ * this upsert: the knowledge base is over its per-KB graph chunk cap, or its stale graph data could not be
826
+ * pruned, which a later graph rebuild repairs. Only GraphRAG coverage is absent; the singular counterpart
827
+ * of {@link UpsertKnowledgeBaseContextsResponse.graphIndexingSkippedContextIds}.
801
828
  */
802
829
  graphIndexingSkipped?: boolean;
803
830
  /**
@@ -838,9 +865,10 @@ export interface UpsertKnowledgeBaseContextsResponse {
838
865
  */
839
866
  contextIds?: Array<AiContextId>;
840
867
  /**
841
- * Contexts that were stored (and are fully searchable via vector/keyword) but NOT graph-indexed because
842
- * the knowledge base is over its per-KB graph chunk cap. Only GraphRAG coverage is absent; surfaced so a
843
- * caller can report the graph-coverage gap. Absent/empty when nothing was skipped or graph is disabled.
868
+ * Contexts that were stored (and are fully searchable via vector/keyword) but NOT graph-indexed by this
869
+ * upsert: the knowledge base is over its per-KB graph chunk cap, or their stale graph data could not be
870
+ * pruned, which a later graph rebuild repairs. Only GraphRAG coverage is absent; surfaced so a caller can
871
+ * report the graph-coverage gap. Absent/empty when nothing was skipped or graph is disabled.
844
872
  */
845
873
  graphIndexingSkippedContextIds?: Array<AiContextId>;
846
874
  /**
@@ -1549,8 +1577,8 @@ export interface KnowledgeBaseGraphFacetValueStatus {
1549
1577
  * documents into topics/facets.
1550
1578
  * - `'full'` — wipes the graph and re-extracts entities/relationships from every chunk with an LLM,
1551
1579
  * then rebuilds the concept layer. The expensive deep-clean: re-extraction dominates its cost.
1552
- * Only needed when the extraction itself must be redone, e.g. after changing `entityTypes` or
1553
- * `extractionModel`.
1580
+ * Only needed when the extraction itself must be redone, e.g. after changing `entityTypes`,
1581
+ * `extractionModel` or `extractionDepth`.
1554
1582
  * @category AI
1555
1583
  */
1556
1584
  export type KnowledgeBaseGraphRebuildMode = 'full' | 'structural';
@@ -2072,7 +2100,8 @@ export interface BulkIngestionJobStatusCounts {
2072
2100
  /**
2073
2101
  * Machine-readable class of a bulk-ingestion file failure, for outcomes to treat differently from real
2074
2102
  * failures. Terminal — reported with `retryable: false` — are `'CONTENT_TOO_LARGE'` (past the per-context
2075
- * ceiling), `'ENCRYPTED_DOCUMENT'`, `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
2103
+ * ceiling), `'ENCRYPTED_DOCUMENT'`, `'EXTRACTION_ABANDONED'` (each worker that took the file up died before
2104
+ * finishing it), `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
2076
2105
  * document as too large, even with the pages that draw it redrawn smaller), `'NO_EMBEDDABLE_CONTENT'`,
2077
2106
  * `'SOURCE_OVER_PROVIDER_LIMIT'` (the bytes exceed what the extraction provider accepts),
2078
2107
  * `'UNREADABLE_DOCUMENT'` (a PDF or Office file whose bytes cannot be opened as one), `'UNREADABLE_WORKBOOK'`
@@ -2086,7 +2115,7 @@ export interface BulkIngestionJobStatusCounts {
2086
2115
  * alone exceeds the ceiling fails this way in every job.
2087
2116
  * @category AI
2088
2117
  */
2089
- export type BulkIngestionFileErrorCode = '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';
2118
+ export type BulkIngestionFileErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_ABANDONED' | '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';
2090
2119
  /**
2091
2120
  * Per-file/per-context status within a bulk-ingestion job, so a caller can see which file finished,
2092
2121
  * which is still processing, and why a file failed.
@@ -24,6 +24,11 @@ export interface AiQueryOptions {
24
24
  instructions?: string;
25
25
  /** Whether to enable raw results output. */
26
26
  enableRawResults?: boolean;
27
+ /**
28
+ * When the results are too large to analyze in the answer, skips the analysis and returns the raw results as
29
+ * files instead, for a caller that processes them itself (e.g. an agent with `executePythonCode`). Default: false.
30
+ */
31
+ largeResultsAsFiles?: boolean;
27
32
  /** Options for the collection selection stage. */
28
33
  selectCollectionsOptions?: AiQuerySelectCollectionsOptions;
29
34
  /** Options for the query generation stage. */
@@ -62,6 +62,8 @@ export interface RunContext {
62
62
  headers?: Record<string, any>;
63
63
  /** Additional context for OpenAPI requests */
64
64
  openApiContext?: OpenApiContext;
65
+ /** The id of the session (`squid.sessions()`) this request runs in, when the AI agent or LangGraph call attached one. */
66
+ sessionId?: string;
65
67
  }
66
68
  /** In the case of OpenAPI, the context of the request is provided in a separate object. */
67
69
  export interface OpenApiContext {
@@ -399,7 +399,7 @@ export interface DocumentMetadata {
399
399
  docModifiedAt?: string;
400
400
  /**
401
401
  * Source document type: `pdf` | `docx` | `doc` | `pptx` | `ppt` | `xlsx` | `xlsm` | `xls` | `xlsb` |
402
- * `eml` | `msg` | `csv` | `tsv` | `md` | `html` | `txt`.
402
+ * `eml` | `msg` | `one` | `csv` | `tsv` | `md` | `html` | `txt`.
403
403
  */
404
404
  docType?: string;
405
405
  }
@@ -1,6 +1,6 @@
1
1
  import { IntegrationId } from './communication.public-types';
2
2
  /** List of all integration types supported by Squid. */
3
- export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_blob", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "bitbucket", "built_in_azure_blob", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "azure-entra-external-id", "azure-entra-id", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "generic_site_ingester", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "outlook", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "twilio", "elevenlabs", "openai_voice", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "sharepoint", "vertex"];
3
+ export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_blob", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "bitbucket", "built_in_azure_blob", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "azure-entra-external-id", "azure-entra-id", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "generic_site_ingester", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "outlook", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "twilio", "elevenlabs", "openai_voice", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "bedrock_embedding", "sharepoint", "vertex"];
4
4
  /**
5
5
  * @category Database
6
6
  */
@@ -1,3 +1,4 @@
1
+ import { UpsertSessionRequest } from './session.public-types';
1
2
  /**
2
3
  * Options for starting a new LangGraph run.
3
4
  * @category AI
@@ -14,6 +15,13 @@ export interface InvokeLangGraphOptions {
14
15
  * passes its own.
15
16
  */
16
17
  context?: Record<string, unknown>;
18
+ /**
19
+ * The session (`squid.sessions()`) the run runs in: nodes read its id from `RunContext.sessionId`. With the app API
20
+ * key, the run creates the session or updates the one with the same id. Without it, a new id creates the session
21
+ * with its data and a live one is attached as it is; the graph's `@secureLangGraph` rules see both and can refuse
22
+ * them.
23
+ */
24
+ session?: UpsertSessionRequest;
17
25
  }
18
26
  /**
19
27
  * Options for resuming an interrupted LangGraph thread.
@@ -24,6 +32,24 @@ export interface ResumeLangGraphOptions {
24
32
  timeoutMs?: number;
25
33
  /** Context of the resumed run, which every node reads as LangGraph's `runtime.context`. */
26
34
  context?: Record<string, unknown>;
35
+ /** The session the resumed run runs in, as for {@link InvokeLangGraphOptions.session}. */
36
+ session?: UpsertSessionRequest;
37
+ }
38
+ /**
39
+ * Options for streaming a new LangGraph run.
40
+ * @category AI
41
+ */
42
+ export interface StreamLangGraphOptions extends InvokeLangGraphOptions {
43
+ /** Streams only the tokens of LLM calls with one of these tags, such as those set with `model.withConfig({ tags })`. */
44
+ tokenTags?: string[];
45
+ }
46
+ /**
47
+ * Options for streaming the resume of an interrupted LangGraph thread.
48
+ * @category AI
49
+ */
50
+ export interface StreamResumeLangGraphOptions extends ResumeLangGraphOptions {
51
+ /** Streams only the tokens of LLM calls with one of these tags, such as those set with `model.withConfig({ tags })`. */
52
+ tokenTags?: string[];
27
53
  }
28
54
  /**
29
55
  * Successful result of a LangGraph invocation.
@@ -55,3 +81,63 @@ export interface GetLangGraphStateSuccessResult {
55
81
  /** Next nodes to execute. Empty if the graph has completed. */
56
82
  next: string[];
57
83
  }
84
+ /**
85
+ * Data a node wrote to LangGraph's stream: `config.writer(data)` in TypeScript, `get_stream_writer()(data)` in Python.
86
+ * @category AI
87
+ */
88
+ export interface LangGraphCustomEvent {
89
+ /** Always `custom`. */
90
+ type: 'custom';
91
+ /** What the node wrote, as JSON. */
92
+ data: unknown;
93
+ }
94
+ /**
95
+ * Text that an LLM call made by a node streamed. Consecutive tokens of one message can arrive merged.
96
+ * @category AI
97
+ */
98
+ export interface LangGraphTokenEvent {
99
+ /** Always `token`. */
100
+ type: 'token';
101
+ /** The id of the message the text belongs to, which is also its id in the graph state. */
102
+ messageId?: string;
103
+ /** The node that made the LLM call. */
104
+ node: string;
105
+ /** The tags of the LLM call, such as those set with `model.withConfig({ tags })`. */
106
+ tags: string[];
107
+ /** The streamed text. */
108
+ text: string;
109
+ }
110
+ /**
111
+ * The text of an AI message that a node wrote whole, without streaming it from an LLM call.
112
+ * @category AI
113
+ */
114
+ export interface LangGraphMessageEvent {
115
+ /** Always `message`. */
116
+ type: 'message';
117
+ /** The id of the message in the graph state. */
118
+ messageId?: string;
119
+ /** The node that wrote the message. */
120
+ node: string;
121
+ /** The text of the message. */
122
+ text: string;
123
+ }
124
+ /**
125
+ * The result of a streamed run, which is the stream's last event.
126
+ * @category AI
127
+ */
128
+ export interface LangGraphResultEvent {
129
+ /** Always `result`. */
130
+ type: 'result';
131
+ /** The result of the run, as `invoke` returns it. */
132
+ result: InvokeLangGraphSuccessResult;
133
+ /**
134
+ * Set when some of the run's events may be missing from the stream: they were lost on the way or arrived too late.
135
+ * The result itself is complete.
136
+ */
137
+ incomplete?: boolean;
138
+ }
139
+ /**
140
+ * An event of a streamed LangGraph run.
141
+ * @category AI
142
+ */
143
+ export type LangGraphStreamEvent = LangGraphCustomEvent | LangGraphTokenEvent | LangGraphMessageEvent | LangGraphResultEvent;
@@ -0,0 +1,82 @@
1
+ /**
2
+ * An app-scoped record of JSON data under an id the app chooses, which expires. See `squid.sessions()`.
3
+ * @category Sessions
4
+ */
5
+ export interface Session {
6
+ /** The id of the session. */
7
+ id: string;
8
+ /** The data of the session. */
9
+ data: Record<string, unknown>;
10
+ /** When the session was created. */
11
+ createdAt: Date;
12
+ /** When the session was last written. */
13
+ updatedAt: Date;
14
+ /** When the session expires, or `null` when it never does. */
15
+ expiresAt: Date | null;
16
+ }
17
+ /**
18
+ * How long a session lives after its last write: a TTL, or `'never'` to keep it until it is deleted.
19
+ * @category Sessions
20
+ */
21
+ export type SessionExpiration = SessionTtl | 'never';
22
+ /**
23
+ * An expiration a fixed time after the session's last write.
24
+ * @category Sessions
25
+ */
26
+ export interface SessionTtl {
27
+ /** Milliseconds from the last write to the expiration. At least 1000. */
28
+ ttlMs: number;
29
+ }
30
+ /**
31
+ * Creates a session, or updates the one with the same id.
32
+ * @category Sessions
33
+ */
34
+ export interface UpsertSessionRequest {
35
+ /** The id of the session: 1-256 characters, without control characters. */
36
+ id: string;
37
+ /** Top-level keys to set; other keys keep their values. The session's data is at most 64 KB. */
38
+ data?: Record<string, unknown>;
39
+ /** Top-level keys to remove. */
40
+ deleteKeys?: string[];
41
+ /** Replaces the session's expiration. A new session expires one day after its last write. */
42
+ expiration?: SessionExpiration;
43
+ }
44
+ /**
45
+ * A value a session listing matches a data key against.
46
+ * @category Sessions
47
+ */
48
+ export type SessionFilterValue = string | number | boolean | null;
49
+ /**
50
+ * Filters of a session listing.
51
+ * @category Sessions
52
+ */
53
+ export interface ListSessionsFilter {
54
+ /** Top-level data keys that must equal the given values. */
55
+ data?: Record<string, SessionFilterValue>;
56
+ /** Only sessions created after this time. */
57
+ createdAfter?: Date;
58
+ /** Only sessions created before this time. */
59
+ createdBefore?: Date;
60
+ }
61
+ /**
62
+ * Asks for a page of sessions, newest first.
63
+ * @category Sessions
64
+ */
65
+ export interface ListSessionsRequest {
66
+ /** The page size: 100 by default, at most 1000. */
67
+ limit?: number;
68
+ /** The `nextCursor` of the previous page. */
69
+ cursor?: string;
70
+ /** Filters of the listing. */
71
+ where?: ListSessionsFilter;
72
+ }
73
+ /**
74
+ * A page of sessions.
75
+ * @category Sessions
76
+ */
77
+ export interface ListSessionsResponse {
78
+ /** The sessions of the page, newest first. */
79
+ sessions: Session[];
80
+ /** Pass it as `cursor` to get the next page. Absent on the last page. */
81
+ nextCursor?: string;
82
+ }
@@ -3,6 +3,7 @@ import { AiFunctionId } from '../public-types/backend.public-types';
3
3
  import { AiAgentId, IntegrationId } from '../public-types/communication.public-types';
4
4
  import { AuthWithBearer } from '../public-types/context.public-types';
5
5
  import { IntegrationType } from '../public-types/integration.public-types';
6
+ import { Session, UpsertSessionRequest } from '../public-types/session.public-types';
6
7
  /**
7
8
  * Context object passed as a second parameter to every AI function call,
8
9
  * providing both agent-specific and function-specific context.
@@ -24,6 +25,11 @@ export interface AiFunctionCallContext<FunctionContextType = unknown, AgentConte
24
25
  functionContext: FunctionContextType;
25
26
  /** The session associated with this AI function call. */
26
27
  sessionContext: AiSessionContext;
28
+ /**
29
+ * The session (`squid.sessions()`) the agent call attached, read right before this function call. Absent when the
30
+ * call attached none, or when the session was deleted or expired.
31
+ */
32
+ session?: Session;
27
33
  /**
28
34
  * Instructions of the calling AI agent, when the function runs an AI sub-agent that should
29
35
  * honor them (e.g. formatting rules or domain conventions). For integration-connected functions
@@ -49,6 +55,16 @@ export declare class SecureAiAgentContext {
49
55
  * `'models' in model` before reading it as a concrete model selection.
50
56
  */
51
57
  readonly options?: AiChatRequestOptions;
58
+ /**
59
+ * The session the call asks to attach. Without the app API key, a new id creates it with the caller's `data`, and a
60
+ * live one is attached as it is: a rule that rejects it refuses the call.
61
+ */
62
+ readonly session?: UpsertSessionRequest;
63
+ /**
64
+ * The live session stored under `session.id`, which a caller without the app API key attaches as it is: check that
65
+ * the caller may use it. Absent with the API key, which skips the rules.
66
+ */
67
+ readonly storedSession?: Session;
52
68
  }
53
69
  /**
54
70
  * Provides context to a knowledge base's `accessControl.scopeResolver` function, which turns the caller
@@ -1,3 +1,4 @@
1
+ import { Session, UpsertSessionRequest } from '../public-types/session.public-types';
1
2
  /**
2
3
  * Which client-facing LangGraph action triggered this security check.
3
4
  * @category AI
@@ -17,4 +18,14 @@ export declare class SecureLangGraphContext {
17
18
  readonly resumePayload?: unknown;
18
19
  /** The context the caller passed for the run (`invoke` and `resume`), which nodes read as `runtime.context`. */
19
20
  readonly graphContext?: Record<string, unknown>;
21
+ /**
22
+ * The session the call asks to attach (`invoke` and `resume`). Without the app API key, a new id creates it with the
23
+ * caller's `data`, and a live one is attached as it is: a rule that rejects it refuses the call.
24
+ */
25
+ readonly session?: UpsertSessionRequest;
26
+ /**
27
+ * The live session stored under `session.id`, which a caller without the app API key attaches as it is: check that
28
+ * the caller may use it. Absent with the API key, which skips the rules.
29
+ */
30
+ readonly storedSession?: Session;
20
31
  }
@@ -6,7 +6,11 @@ export type StorageFunctionality = 'fileUpload' | 'getFileMetadata' | 'getDownlo
6
6
  export interface StorageContext {
7
7
  /** Identifier of the integration performing the storage action. */
8
8
  integrationId: IntegrationId;
9
- /** List of paths within the storage bucket relevant to the action. */
9
+ /**
10
+ * The keys the action runs on, as the bucket is accessed: each client path trimmed and stripped of one
11
+ * leading and one trailing '/', an uploaded file joined to its directory, a listed directory ending in
12
+ * '/' ('' for the bucket root). A path with a `.` or `..` segment is refused before any rule runs.
13
+ */
10
14
  pathsInBucket: Array<string>;
11
15
  /** Type of action being performed on the storage. */
12
16
  action: StorageActionType;
@@ -18,12 +18,12 @@ export interface ConnectorRunConfiguration {
18
18
  codeUrlId: string;
19
19
  }
20
20
  /**
21
- * Success response type for function execution.
22
- * ok is always true, functionResponse is always present.
21
+ * Success response type for function execution. `functionResponse` is absent when the function
22
+ * returned `undefined`: serialization drops the key.
23
23
  */
24
24
  export interface TenantExecuteFunctionSuccess<T = unknown> {
25
25
  ok: true;
26
- functionResponse: T;
26
+ functionResponse?: T;
27
27
  }
28
28
  /**
29
29
  * Error response type for function execution.
@@ -1 +1,2 @@
1
- export {};
1
+ import { LangGraphRunEvent } from '../public-types/langgraph.public-types';
2
+ export type { LangGraphRunEvent };
@@ -1,9 +1,16 @@
1
1
  /** Splits a field path into the segments `getInPath` walks: a dot or a bracket separates them. */
2
2
  export declare const SPLIT_REGEX_FOR_GET_IN_PATH: RegExp;
3
- /** Returns a value by the `path`. Works with array indexes, like a.b[0]. */
3
+ /** Reads [key] from [obj] itself; an inherited property, `__proto__` included, reads as undefined. */
4
+ export declare function getOwnProperty(obj: object, key: PropertyKey): unknown;
5
+ /**
6
+ * Sets [key] of [obj] as its own property. `__proto__` is defined rather than assigned, which would set the object's
7
+ * prototype instead; `JSON.parse` and bson make it an own key too.
8
+ */
9
+ export declare function setOwnProperty(obj: object, key: PropertyKey, value: unknown): void;
10
+ /** Returns a value by the `path`, reading own properties only. Works with array indexes, like a.b[0]. */
4
11
  export declare function getInPath(obj: unknown, path: string): any;
5
12
  export declare function isDateObject(value: unknown): value is Date;
6
- /** Sets a value by path . Does not support array indexes. */
13
+ /** Sets a value by path, as own properties of the objects on it. Does not support array indexes. */
7
14
  export declare function setInPath(obj: object, path: string, value: unknown, delimiter?: string): void;
8
15
  export declare function deleteInPath(obj: object, path: string, delimiter?: string): void;
9
16
  export declare function replaceKeyInMap<K, T>(map: Map<K, T | undefined>, a: K, b: K): void;
@@ -31,6 +38,8 @@ export declare function cloneShallow<T>(value: T): T;
31
38
  export declare function deepMerge<T extends object, U extends object>(target: T, source: U): T & U;
32
39
  /** Returns true if the `value` is a defined object and is not an array. */
33
40
  export declare function isPlainObject(value: unknown): value is object;
41
+ /** Returns true if the `value` is a defined object and is not an array, typed as a record of its fields. */
42
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
34
43
  /**
35
44
  * Returns true if the `value` is an object that JSON can hold as it is: a plain object whose values are JSON at any
36
45
  * depth, with no `__proto__` key. A `Date` or another class instance is not one.
@@ -1,4 +1,8 @@
1
- export declare function sortKeys(json: unknown): any;
1
+ /**
2
+ * Sorts the keys of [json] at every depth. An own `__proto__` key is skipped unless [keepPrototypeKey]: the ids and
3
+ * subscription keys stored from {@link normalizeJsonAsString} carry no such key, while a comparison has to see it.
4
+ */
5
+ export declare function sortKeys(json: unknown, keepPrototypeKey?: boolean): any;
2
6
  export declare function normalizeJsonAsString(json: unknown): string;
3
7
  export declare function serializeObj(obj: unknown): string;
4
8
  /**
@@ -17,13 +21,13 @@ export declare function deserializeMultipartBody<T>(request: T): T;
17
21
  export declare function encodeValueForMapping(value: unknown): string;
18
22
  export declare function decodeValueForMapping(encodedString: string): any;
19
23
  /**
20
- * Compares 2 objects by their normalized JSON value.
24
+ * Compares 2 objects by their normalized JSON value, own `__proto__` keys included.
21
25
  * This function should not be used with objects with circular references.
22
26
  * Returns true if the object are equal.
23
27
  */
24
28
  export declare function compareByNormalizedJsonValue<T>(v1: T | undefined, v2: T | undefined): boolean;
25
29
  /**
26
- * Compares 2 objects by their normalized JSON value for specific fields only.
30
+ * Compares 2 objects by their normalized JSON value for specific fields only, own `__proto__` keys included.
27
31
  * This function should not be used with objects with circular references.
28
32
  * Returns true if the specified fields are equal.
29
33
  */
@@ -0,0 +1,18 @@
1
+ export declare function numberString(number: number): string;
2
+ export declare function plural(string: string, count: number, options?: {
3
+ suffix?: string;
4
+ alt?: string;
5
+ }): string;
6
+ export declare function titleCase(string: string): string;
7
+ export declare function abbreviate(text: string, maxLength: number, suffix?: string): string;
8
+ /**
9
+ * Abbreviates a block of text into a single short line for logging.
10
+ *
11
+ * This function will:
12
+ * 1. Replace all runs of whitespace (spaces, tabs, line breaks) with a single space.
13
+ * 2. Trim leading and trailing whitespace.
14
+ * 3. Truncate to at most `maxLength` characters, appending `suffix` if the text was cut.
15
+ */
16
+ export declare function shortify(text: string, maxLength?: number, suffix?: string): string;
17
+ /** Hashes the text with 32-bit FNV-1a, starting from `seed` (the standard offset basis by default). */
18
+ export declare function hashFnv1a32(text: string, seed?: number): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/freshdesk-client",
3
- "version": "1.0.503",
3
+ "version": "1.0.505",
4
4
  "description": "Squid Freshdesk Client - SDK for interacting with the Freshdesk connector",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/freshdesk-client/src/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
25
  "assertic": "^1.3.0",
26
- "@squidcloud/client": "^1.0.503"
26
+ "@squidcloud/client": "^1.0.505"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=20.0.0"