@squidcloud/client 1.0.343 → 1.0.345

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.
Files changed (47) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +118 -22
  3. package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +7 -4
  4. package/dist/internal-common/src/public-types/ai-matchmaking.types.d.ts +19 -16
  5. package/dist/internal-common/src/public-types/api-client.public-types.d.ts +4 -0
  6. package/dist/internal-common/src/public-types/backend.public-types.d.ts +12 -1
  7. package/dist/internal-common/src/public-types/communication.public-types.d.ts +7 -0
  8. package/dist/internal-common/src/public-types/context.public-types.d.ts +14 -3
  9. package/dist/internal-common/src/public-types/document.public-types.d.ts +9 -2
  10. package/dist/internal-common/src/public-types/extraction.public-types.d.ts +17 -0
  11. package/dist/internal-common/src/public-types/http-status.enum.d.ts +1 -0
  12. package/dist/internal-common/src/public-types/integration.public-types.d.ts +12 -1
  13. package/dist/internal-common/src/public-types/integrations/api.public-types.d.ts +40 -0
  14. package/dist/internal-common/src/public-types/metric.public-types.d.ts +32 -2
  15. package/dist/internal-common/src/public-types/openapi.public-types.d.ts +4 -0
  16. package/dist/internal-common/src/public-types/query.public-types.d.ts +26 -7
  17. package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +13 -0
  18. package/dist/internal-common/src/public-types/schema.public-types.d.ts +4 -0
  19. package/dist/internal-common/src/public-types/secret.public-types.d.ts +10 -0
  20. package/dist/internal-common/src/public-types/serialized-query.public-types.d.ts +18 -0
  21. package/dist/internal-common/src/public-types/socket.public-types.d.ts +1 -0
  22. package/dist/internal-common/src/public-types/typescript.public-types.d.ts +8 -0
  23. package/dist/internal-common/src/public-types/web.public-types.d.ts +39 -0
  24. package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +9 -0
  25. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +28 -0
  26. package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +12 -0
  27. package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +12 -1
  28. package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +6 -0
  29. package/dist/internal-common/src/types/file.types.d.ts +6 -0
  30. package/dist/typescript-client/src/admin-client.d.ts +6 -0
  31. package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +9 -0
  32. package/dist/typescript-client/src/agent/ai-agent-client.d.ts +8 -0
  33. package/dist/typescript-client/src/ai-client.d.ts +16 -0
  34. package/dist/typescript-client/src/ai-image-client.d.ts +3 -2
  35. package/dist/typescript-client/src/api-client.d.ts +44 -0
  36. package/dist/typescript-client/src/extraction-client.d.ts +7 -0
  37. package/dist/typescript-client/src/index.d.ts +1 -0
  38. package/dist/typescript-client/src/integration-client.d.ts +30 -0
  39. package/dist/typescript-client/src/personal-storage-client.d.ts +8 -0
  40. package/dist/typescript-client/src/public-types.d.ts +1 -0
  41. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +115 -8
  42. package/dist/typescript-client/src/scheduler-client.d.ts +17 -0
  43. package/dist/typescript-client/src/secret.client.d.ts +50 -0
  44. package/dist/typescript-client/src/squid.d.ts +32 -0
  45. package/dist/typescript-client/src/version.d.ts +1 -1
  46. package/dist/typescript-client/src/web-client.d.ts +18 -0
  47. package/package.json +1 -1
@@ -153,75 +153,105 @@ export type AiAudioTranscribeOptions = WhisperOptions;
153
153
  */
154
154
  export type AiAudioCreateSpeechOptions = OpenAiCreateSpeechOptions;
155
155
  /**
156
+ * Base options for generating images with an AI model.
156
157
  * @category AI
157
158
  */
158
159
  export interface BaseAiGenerateImageOptions {
160
+ /** The name of the AI model to use for image generation. */
159
161
  modelName: AiImageModelName;
160
162
  }
161
163
  /**
164
+ * Base options for transcribing audio with an AI model.
162
165
  * @category AI
163
166
  */
164
167
  export interface BaseAiAudioTranscribeOptions {
168
+ /** The name of the AI model to use for audio transcription. */
165
169
  modelName: AiAudioTranscriptionModelName;
166
170
  }
167
171
  /**
172
+ * Base options for creating speech with an AI model.
168
173
  * @category AI
169
174
  */
170
175
  export interface BaseAiAudioCreateSpeechOptions {
176
+ /** The name of the AI model to use for speech creation. */
171
177
  modelName: AiAudioCreateSpeechModelName;
172
178
  }
173
179
  /**
180
+ * Options for generating images using the DALL-E model.
174
181
  * @category AI
175
182
  */
176
183
  export interface DallEOptions extends BaseAiGenerateImageOptions {
184
+ /** Specifies the DALL-E 3 model for image generation. */
177
185
  modelName: 'dall-e-3';
186
+ /** The quality of the generated image; defaults to 'standard'. */
178
187
  quality?: 'hd' | 'standard';
188
+ /** The size of the generated image; defaults to '1024x1024'. */
179
189
  size?: '1024x1024' | '1792x1024' | '1024x1792';
190
+ /** The number of images to generate; defaults to 1 and limited to 1. */
180
191
  numberOfImagesToGenerate?: 1;
181
192
  }
182
193
  /**
194
+ * Options for transcribing audio using the Whisper model.
183
195
  * @category AI
184
196
  */
185
197
  export interface WhisperOptions extends BaseAiAudioTranscribeOptions {
198
+ /** Specifies the Whisper-1 model for audio transcription. */
186
199
  modelName: 'whisper-1';
200
+ /** The format of the transcription response; defaults to 'json'. */
187
201
  responseFormat?: 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';
202
+ /** The temperature for sampling during transcription; defaults to model-specific value. */
188
203
  temperature?: number;
204
+ /** An optional prompt to guide the transcription process. */
189
205
  prompt?: string;
190
206
  }
191
207
  /**
208
+ * Options for creating speech using OpenAI's text-to-speech models.
192
209
  * @category AI
193
210
  */
194
211
  export interface OpenAiCreateSpeechOptions extends BaseAiAudioCreateSpeechOptions {
212
+ /** The OpenAI model to use for speech creation (e.g., 'tts-1' or 'tts-1-hd'). */
195
213
  modelName: OpenAiAudioCreateSpeechModelName;
214
+ /** The voice to use for speech synthesis; defaults to model-specific value. */
196
215
  voice?: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
216
+ /** The format of the audio output; defaults to 'mp3'. */
197
217
  responseFormat?: OpenAiCreateSpeechFormat;
218
+ /** The speed of the speech; defaults to 1.0. */
198
219
  speed?: number;
199
220
  }
200
221
  /**
222
+ * Options for generating images using the Flux model.
201
223
  * @category AI
202
224
  */
203
225
  export interface FluxOptions extends BaseAiGenerateImageOptions {
226
+ /** Specifies the Flux Pro 1.1 model for image generation. */
204
227
  modelName: 'flux-pro-1.1';
205
- /** Must be a multiple of 32. Min 256, max 1440 - default to 1024 */
228
+ /** The width of the generated image, must be a multiple of 32, min 256, max 1440; defaults to 1024. */
206
229
  width?: number;
207
- /** Must be a multiple of 32. Min 256, max 1440 - default to 768 */
230
+ /** The height of the generated image, must be a multiple of 32, min 256, max 1440; defaults to 768. */
208
231
  height?: number;
209
- /** Whether to modify the prompt for more creative generation - default to false */
232
+ /** Whether to enhance the prompt for more creative output; defaults to false. */
210
233
  prompt_upsampling?: boolean;
211
- /** Random seed. Set for reproducible generation */
234
+ /** A random seed for reproducible generation, if specified. */
212
235
  seed?: number;
213
- /** 1 is most strict and 5 is most permissive */
236
+ /** The safety tolerance level, from 1 (strict) to 5 (permissive). */
214
237
  safety_tolerance?: number;
215
238
  }
216
239
  /**
240
+ * Options for generating images using the Stable Diffusion Core model.
217
241
  * @category AI
218
242
  */
219
243
  export interface StableDiffusionCoreOptions extends BaseAiGenerateImageOptions {
244
+ /** Specifies the Stable Diffusion Core model for image generation. */
220
245
  modelName: 'stable-diffusion-core';
246
+ /** The aspect ratio of the generated image; defaults to '1:1'. */
221
247
  aspectRatio?: '16:9' | '1:1' | '21:9' | '2:3' | '3:2' | '4:5' | '5:4' | '9:16' | '9:21';
248
+ /** An optional negative prompt to guide what to exclude from the image. */
222
249
  negativePrompt?: string;
250
+ /** A random seed for reproducible generation, if specified. */
223
251
  seed?: number;
252
+ /** A style preset to apply to the generated image, if specified. */
224
253
  stylePreset?: 'analog-film' | 'anime' | 'cinematic' | 'comic-book' | 'digital-art' | 'enhance' | 'fantasy-art' | 'isometric' | 'line-art' | 'low-poly' | 'modeling-compound' | 'neon-punk' | 'origami' | 'photographic' | 'pixel-art' | 'tile-texture';
254
+ /** The format of the output image; defaults to 'png'. */
225
255
  outputFormat?: 'jpeg' | 'png' | 'webp';
226
256
  }
227
257
  /**
@@ -238,40 +268,37 @@ export type AiAgentResponseFormat = 'text' | 'json_object';
238
268
  */
239
269
  export type AiFileUrlType = 'image';
240
270
  /**
271
+ * Represents a URL reference to an AI-processed file, such as an image.
241
272
  * @category AI
242
273
  */
243
274
  export interface AiFileUrl {
275
+ /** The type of file referenced by the URL (e.g., 'image'). */
244
276
  type: AiFileUrlType;
277
+ /** The URL pointing to the file. */
245
278
  url: string;
246
279
  }
247
280
  /**
281
+ * Metadata for an AI agent connected to an integration.
248
282
  * @category AI
249
283
  */
250
284
  export interface AiConnectedIntegrationMetadata {
285
+ /** The ID of the connected integration. */
251
286
  integrationId: IntegrationId;
252
- /** Type of the connected integration. */
287
+ /** The type of the connected integration (e.g., API, database). */
253
288
  integrationType: IntegrationType;
254
- /**
255
- * Description of the connected integration for the parent agent context.
256
- * Works as AI function description.
257
- * If not provided the default one is used.
258
- */
289
+ /** An optional description of the integration for the parent agent context, used as AI function description. */
259
290
  description?: string;
260
- /**
261
- * Instructions for the connected integration agent.
262
- * If not provided the default one is used.
263
- */
291
+ /** Optional instructions for the connected integration agent, overriding the default if provided. */
264
292
  instructions?: string;
265
293
  }
266
294
  /**
295
+ * Metadata for a connected AI agent callable by the current agent.
267
296
  * @category AI
268
297
  */
269
298
  export interface AiConnectedAgentMetadata {
299
+ /** The ID of the connected AI agent. */
270
300
  agentId: AiAgentId;
271
- /**
272
- * Description of the connected agent for the parent agent context.
273
- * Works as AI function description.
274
- */
301
+ /** A description of the connected agent for the parent agent context, used as AI function description. */
275
302
  description: string;
276
303
  }
277
304
  /**
@@ -342,18 +369,23 @@ export interface BaseAiAgentChatOptions {
342
369
  model?: AiChatModelName;
343
370
  }
344
371
  /**
345
- * Each model-specific options interface now “anchors” the overrideModel property.
372
+ * Chat options specific to Gemini models, extending base options.
346
373
  * @category AI
347
374
  */
348
375
  export interface GeminiChatOptions extends BaseAiAgentChatOptions {
376
+ /** The Gemini model to use for the chat. */
349
377
  model?: GeminiChatModelName;
378
+ /** Enables grounding with web search for more informed responses; defaults to false. */
350
379
  groundingWithWebSearch?: boolean;
351
380
  }
352
381
  /**
382
+ * Chat options specific to OpenAI models, extending base options.
353
383
  * @category AI
354
384
  */
355
385
  export interface OpenAiChatOptions extends BaseAiAgentChatOptions {
386
+ /** The OpenAI model to use for the chat. */
356
387
  model?: OpenAiChatModelName;
388
+ /** An array of file URLs to include in the chat context. */
357
389
  fileUrls?: Array<AiFileUrl>;
358
390
  }
359
391
  /**
@@ -361,24 +393,33 @@ export interface OpenAiChatOptions extends BaseAiAgentChatOptions {
361
393
  */
362
394
  export type OpenAiReasoningEffort = 'low' | 'medium' | 'high';
363
395
  /**
396
+ * Chat options for OpenAI reasoning models, extending OpenAI options.
364
397
  * @category AI
365
398
  */
366
399
  export interface OpenAiReasoningChatOptions extends OpenAiChatOptions {
400
+ /** The OpenAI reasoning model to use for the chat. */
367
401
  model?: OpenAiReasoningChatModelName;
402
+ /** The level of reasoning effort to apply; defaults to model-specific value. */
368
403
  reasoningEffort?: OpenAiReasoningEffort;
369
404
  }
370
405
  /**
406
+ * Chat options specific to Anthropic models, extending base options.
371
407
  * @category AI
372
408
  */
373
409
  export interface AnthropicChatOptions extends BaseAiAgentChatOptions {
410
+ /** The Anthropic model to use for the chat. */
374
411
  model?: AnthropicChatModelName;
375
412
  }
376
413
  /**
414
+ * Optional settings for an AI session, allowing partial specification of identifiers.
377
415
  * @category AI
378
416
  */
379
417
  export type AiSessionOptions = Partial<{
418
+ /** A unique identifier for tracing the session, if provided. */
380
419
  traceId: string;
420
+ /** The ID of the client initiating the session, if specified. */
381
421
  clientId: string;
422
+ /** The ID of the AI agent involved in the session, if specified. */
382
423
  agentId: string;
383
424
  }>;
384
425
  /**
@@ -394,17 +435,23 @@ export type AllAiAgentChatOptions = {
394
435
  [K in keyof BaseAiAgentChatOptions | keyof GeminiChatOptions | keyof OpenAiReasoningChatOptions | keyof OpenAiChatOptions | keyof AnthropicChatOptions]?: (K extends keyof BaseAiAgentChatOptions ? BaseAiAgentChatOptions[K] : never) | (K extends keyof GeminiChatOptions ? GeminiChatOptions[K] : never) | (K extends keyof OpenAiReasoningChatOptions ? OpenAiReasoningChatOptions[K] : never) | (K extends keyof OpenAiChatOptions ? OpenAiChatOptions[K] : never) | (K extends keyof AnthropicChatOptions ? AnthropicChatOptions[K] : never);
395
436
  };
396
437
  /**
397
- * A definition of an AI agent.
438
+ * A definition of an AI agent with its properties and default chat options.
398
439
  * @category AI
399
440
  */
400
441
  export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
442
+ /** The unique identifier of the AI agent. */
401
443
  id: AiAgentId;
444
+ /** The date and time the agent was created. */
402
445
  createdAt: Date;
446
+ /** The date and time the agent was last updated. */
403
447
  updatedAt: Date;
448
+ /** An optional description of the agent's purpose or capabilities. */
404
449
  description?: string;
450
+ /** Indicates whether the agent is publicly accessible; defaults to false. */
405
451
  isPublic?: boolean;
452
+ /** Enables audit logging for the agent's activities if true; defaults to false. */
406
453
  auditLog?: boolean;
407
- /** The default options of the agent - can be overridden by the user when using the agent. */
454
+ /** The default chat options for the agent, overridable by the user during use. */
408
455
  options: AiAgentChatOptions<T>;
409
456
  }
410
457
  /**
@@ -414,6 +461,7 @@ export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'opti
414
461
  options?: AiAgentChatOptions;
415
462
  };
416
463
  /**
464
+ * Options for observing the status of an AI agent operation.
417
465
  * @category AI
418
466
  */
419
467
  export interface AiObserveStatusOptions {
@@ -421,12 +469,17 @@ export interface AiObserveStatusOptions {
421
469
  chatId?: string;
422
470
  }
423
471
  /**
472
+ * A status message from an AI agent operation.
424
473
  * @category AI
425
474
  */
426
475
  export interface AiStatusMessage {
476
+ /** The ID of the agent generating the status message. */
427
477
  agentId: string;
478
+ /** An optional chat ID associated with the status message. */
428
479
  chatId?: string;
480
+ /** The title or summary of the status message. */
429
481
  title: string;
482
+ /** Optional tags providing additional metadata about the status. */
430
483
  tags?: Record<string, any>;
431
484
  }
432
485
  /**
@@ -442,26 +495,41 @@ export interface AiSearchOptions {
442
495
  limit?: number;
443
496
  }
444
497
  /**
498
+ * A single chunk of data returned from an AI search operation.
445
499
  * @category AI
446
500
  */
447
501
  export interface AiSearchResultChunk {
502
+ /** The data content of the search result chunk. */
448
503
  data: string;
504
+ /** Optional metadata associated with the chunk. */
449
505
  metadata?: AiContextMetadata;
506
+ /** The relevance score of the chunk, indicating match quality. */
450
507
  score: number;
451
508
  }
452
509
  /**
510
+ * Represents an AI agent's context entry with metadata and content.
453
511
  * @category AI
454
512
  */
455
513
  export interface AiAgentContext {
514
+ /** The unique identifier of the context entry. */
456
515
  id: AiContextId;
516
+ /** The date and time the context was created. */
457
517
  createdAt: Date;
518
+ /** The date and time the context was last updated. */
458
519
  updatedAt: Date;
520
+ /** The ID of the agent owning this context. */
459
521
  agentId: AiAgentId;
522
+ /** The type of context (e.g., 'text' or 'file'). */
460
523
  type: AiContextType;
524
+ /** A title describing the context content. */
461
525
  title: string;
526
+ /** The text content of the context. */
462
527
  text: string;
528
+ /** Indicates whether the context is a preview; defaults to false. */
463
529
  preview: boolean;
530
+ /** The size of the context content in bytes. */
464
531
  sizeBytes: number;
532
+ /** Metadata associated with the context. */
465
533
  metadata: AiContextMetadata;
466
534
  }
467
535
  /**
@@ -478,23 +546,35 @@ interface BaseContextRequest {
478
546
  */
479
547
  export type AiContextType = 'text' | 'file';
480
548
  /**
549
+ * Request structure for adding text-based context to an AI agent.
481
550
  * @category AI
482
551
  */
483
552
  export interface TextContextRequest extends BaseContextRequest {
553
+ /** Specifies the context type as 'text'. */
484
554
  type: 'text';
555
+ /** A title for the text context. */
485
556
  title: string;
557
+ /** The text content to add to the context. */
486
558
  text: string;
487
559
  }
488
560
  /**
561
+ * Request structure for adding file-based context to an AI agent.
489
562
  * @category AI
490
563
  */
491
564
  export interface FileContextRequest extends BaseContextRequest {
565
+ /** Specifies the context type as 'file'. */
492
566
  type: 'file';
567
+ /** Whether to extract images from the file; defaults to false. */
493
568
  extractImages?: boolean;
569
+ /** The minimum width for extracted images, if applicable. */
494
570
  minImageWidth?: number;
571
+ /** The minimum height for extracted images, if applicable. */
495
572
  minImageHeight?: number;
573
+ /** Whether to treat the full page as an image; defaults to false. */
496
574
  fullPageAsImage?: boolean;
575
+ /** The AI model to use for extraction, if specified. */
497
576
  extractionModel?: AiChatModelName;
577
+ /** An optional password to access the file, if encrypted. */
498
578
  password?: string;
499
579
  }
500
580
  /**
@@ -537,21 +617,27 @@ interface AiContextMetadataExistsFilter {
537
617
  */
538
618
  export type AiContextMetadataSimpleFilter = AiContextMetadataEqFilter | AiContextMetadataNeFilter | AiContextMetadataGtFilter | AiContextMetadataGteFilter | AiContextMetadataLtFilter | AiContextMetadataLteFilter | AiContextMetadataInFilter | AiContextMetadataNinFilter | AiContextMetadataExistsFilter;
539
619
  /**
620
+ * A filter for AI context metadata based on field-specific conditions or values.
540
621
  * @category AI
541
622
  */
542
623
  export interface AiContextMetadataFieldFilter {
624
+ /** A record where keys are field names and values are either simple filters or direct metadata values. */
543
625
  [field: string]: AiContextMetadataSimpleFilter | AiContextMetadataValue;
544
626
  }
545
627
  /**
628
+ * A filter combining multiple AI context metadata filters with a logical AND operation.
546
629
  * @category AI
547
630
  */
548
631
  export interface AiContextMetadataAndFilter {
632
+ /** An array of filters that must all be true for the condition to pass. */
549
633
  $and: AiContextMetadataFilter[];
550
634
  }
551
635
  /**
636
+ * A filter combining multiple AI context metadata filters with a logical OR operation.
552
637
  * @category AI
553
638
  */
554
639
  export interface AiContextMetadataOrFilter {
640
+ /** An array of filters where at least one must be true for the condition to pass. */
555
641
  $or: AiContextMetadataFilter[];
556
642
  }
557
643
  /**
@@ -559,6 +645,7 @@ export interface AiContextMetadataOrFilter {
559
645
  */
560
646
  export type AiContextMetadataFilter = AiContextMetadataFieldFilter | AiContextMetadataAndFilter | AiContextMetadataOrFilter;
561
647
  /**
648
+ * A record of metadata key-value pairs for AI context, where values are primitive types or undefined.
562
649
  * @category AI
563
650
  */
564
651
  export type AiContextMetadata = Record<string, AiContextMetadataValue>;
@@ -567,20 +654,29 @@ export type AiContextMetadata = Record<string, AiContextMetadataValue>;
567
654
  */
568
655
  export type GuardrailKeysType = 'disableProfanity' | 'offTopicAnswers' | 'professionalTone' | 'disablePii';
569
656
  /**
657
+ * Options for applying guardrails to AI responses to enforce specific constraints.
570
658
  * @category AI
571
659
  */
572
660
  export type GuardrailsOptions = {
661
+ /** Disables profanity in the AI response if true; defaults to false. */
573
662
  disableProfanity?: boolean;
663
+ /** Prevents off-topic answers if true; defaults to false. */
574
664
  offTopicAnswers?: boolean;
665
+ /** Enforces a professional tone in the response if true; defaults to false. */
575
666
  professionalTone?: boolean;
667
+ /** Disables inclusion of personally identifiable information if true; defaults to false. */
576
668
  disablePii?: boolean;
669
+ /** A custom guardrail instruction, if specified. */
577
670
  custom?: string;
578
671
  };
579
672
  /**
673
+ * Response structure for transcribing audio and asking an AI agent a question.
580
674
  * @category AI
581
675
  */
582
676
  export interface AiTranscribeAndAskResponse {
677
+ /** The AI agent's response to the transcribed prompt. */
583
678
  responseString: string;
679
+ /** The transcribed text from the audio input. */
584
680
  transcribedPrompt: string;
585
681
  }
586
682
  export {};
@@ -6,17 +6,20 @@ import { FunctionName } from './backend.public-types';
6
6
  */
7
7
  export type AssistantToolType = 'code_interpreter' | 'file_search';
8
8
  /**
9
- * The options for the AI assistant.
9
+ * The options for configuring an AI assistant's behavior and response.
10
10
  * @category AI
11
11
  */
12
12
  export interface QueryAssistantOptions {
13
- /** Extra context passed to all AI functions. */
13
+ /** Additional context provided to all AI functions for processing. */
14
14
  agentContext?: Record<string, unknown>;
15
- /** Extra context per AI function.*/
15
+ /** Specific context provided per AI function, keyed by function name. */
16
16
  functionContexts?: Record<FunctionName, Record<string, unknown>>;
17
- /** The format of the response from the AI model. Defaults to 'text' */
17
+ /** The desired format of the AI model's response; defaults to 'text'. */
18
18
  responseFormat?: AiAgentResponseFormat;
19
+ /** The OpenAI chat model to use for the assistant, if specified. */
19
20
  model?: OpenAiChatModelName;
21
+ /** The level of reasoning effort to apply, as defined by OpenAI. */
20
22
  reasoningEffort?: OpenAiReasoningEffort;
23
+ /** Custom instructions to guide the assistant's behavior, if provided. */
21
24
  instructions?: string;
22
25
  }
@@ -5,7 +5,9 @@ import { AiContextMetadata, AiContextMetadataFilter } from './ai-agent.public-ty
5
5
  * @category AI
6
6
  */
7
7
  export interface MmCategory {
8
+ /** The unique identifier of the category. */
8
9
  id: string;
10
+ /** A description used by the AI to understand and extract features from the category content. */
9
11
  description: string;
10
12
  }
11
13
  /**
@@ -14,9 +16,13 @@ export interface MmCategory {
14
16
  * @category AI
15
17
  */
16
18
  export interface MmEntity {
19
+ /** The unique identifier of the entity. */
17
20
  id: string;
21
+ /** The content of the entity to be matched. */
18
22
  content: string;
23
+ /** The ID of the category this entity belongs to. */
19
24
  categoryId: string;
25
+ /** Metadata used for filtering entities during matching. */
20
26
  metadata: AiContextMetadata;
21
27
  }
22
28
  /**
@@ -27,12 +33,11 @@ export interface MmEntity {
27
33
  * @category AI
28
34
  */
29
35
  export interface MmMatchMaker {
36
+ /** The unique identifier of the matchmaker. */
30
37
  id: string;
38
+ /** A description aiding the AI in understanding the matchmaker's domain. */
31
39
  description: string;
32
- /** @deprecated */
33
- firstCategory?: MmCategory;
34
- /** @deprecated */
35
- secondCategory?: MmCategory;
40
+ /** An array of categories defining the types of entities that can be matched. */
36
41
  categories: Array<MmCategory>;
37
42
  }
38
43
  /**
@@ -40,32 +45,30 @@ export interface MmMatchMaker {
40
45
  * @category AI
41
46
  */
42
47
  export interface MmEntityMatch extends MmEntity {
43
- /** The score of the match between 0 and 100 - 100 represents best match. */
48
+ /** The score of the match, ranging from 0 to 100, where 100 is the best match. */
44
49
  score: number;
50
+ /** The reasoning behind the match score, provided by the AI. */
45
51
  reasoning: string;
46
52
  }
47
53
  /**
48
- * Represents options for finding matches.
54
+ * Represents options for finding matches in the matchmaker system.
49
55
  * @category AI
50
56
  */
51
57
  export interface MmFindMatchesOptions {
52
- /** Metadata filter conditions - defaults to none */
58
+ /** Optional metadata filter conditions to narrow down matching entities; defaults to none. */
53
59
  metadataFilter?: AiContextMetadataFilter;
54
- /** The maximum number of matches to return - default: 100, max: 100 */
60
+ /** The maximum number of matches to return; defaults to 100, with a maximum of 100. */
55
61
  limit?: number;
56
- /**
57
- * The category to match the entities to - defaults to the next category provided in the matchmaker or the first one
58
- * if there is no next.
59
- */
62
+ /** The category ID to match entities against; defaults to the next or first category in the matchmaker. */
60
63
  matchToCategoryId?: string;
61
64
  }
62
65
  /**
63
- * Represents options for listing entities.
64
- * @category AI
66
+ * Represents options for listing entities in the matchmaker system.
67
+ - * @category AI
65
68
  */
66
69
  export interface MmListEntitiesOptions {
67
- /** Metadata filter conditions - defaults to none */
70
+ /** Optional metadata filter conditions to narrow down listed entities; defaults to none. */
68
71
  metadataFilter?: AiContextMetadataFilter;
69
- /** The maximum number of matches to return - default: 100 */
72
+ /** The maximum number of entities to return; defaults to 100. */
70
73
  limit?: number;
71
74
  }
@@ -1,5 +1,9 @@
1
+ /** Optional configuration for an API call, including headers, query, and path parameters. */
1
2
  export interface ApiOptions {
3
+ /** Headers to include in the API request. */
2
4
  headers?: Record<string, string | number | boolean>;
5
+ /** Query parameters to append to the API URL. */
3
6
  queryParams?: Record<string, string | number | boolean>;
7
+ /** Path parameters to substitute in the API URL. */
4
8
  pathParams?: Record<string, string | number | boolean>;
5
9
  }
@@ -1,13 +1,24 @@
1
1
  /** Backend related public types that should be available on the client SDK */
2
2
  /**
3
+ * A type alias for a service identifier.
3
4
  * @category Queue
4
5
  */
5
6
  export type TopicName = string;
7
+ /** A type alias for a service class name. */
6
8
  export type ServiceName = string;
9
+ /** A type alias for a function name within a service. */
7
10
  export type FunctionName = string;
8
- /** Function name with the contextual data. The data must be a serializable JSON. */
11
+ /**
12
+ * Function name with contextual data, where the data must be serializable as JSON.
13
+ */
9
14
  export interface FunctionNameWithContext {
15
+ /** The name of the function within a service. */
10
16
  name: FunctionName;
17
+ /** A record of contextual data associated with the function call. */
11
18
  context: Record<string, unknown>;
12
19
  }
20
+ /**
21
+ * A combined service and function name in the format 'ServiceName:FunctionName'.
22
+ * Uniquely identifies a function within a service.
23
+ */
13
24
  export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
@@ -1,12 +1,18 @@
1
1
  /** A type alias for an application id. */
2
2
  export type AppId = string;
3
+ /** A tuple of environment identifiers like 'dev' or 'prod'. */
3
4
  export declare const ENVIRONMENT_IDS: readonly ["dev", "prod"];
5
+ /** A type representing valid environment identifiers derived from ENVIRONMENT_IDS. */
4
6
  export type EnvironmentId = (typeof ENVIRONMENT_IDS)[number];
7
+ /** A type alias for a squid developer identifier. */
5
8
  export type SquidDeveloperId = string;
6
9
  /** A type alias for an integration id. */
7
10
  export type IntegrationId = string;
11
+ /** A type alias for a client identifier. */
8
12
  export type ClientId = string;
13
+ /** A type alias for a squid document identifier. */
9
14
  export type SquidDocId = string;
15
+ /** A type alias for a client request identifier. */
10
16
  export type ClientRequestId = string;
11
17
  /** ID of AI agent. Also known as AI profile id. */
12
18
  export type AiAgentId = string;
@@ -16,6 +22,7 @@ export type AiAgentId = string;
16
22
  */
17
23
  export declare const BUILT_IN_AGENT_ID = "built_in_agent";
18
24
  /**
25
+ * A type alias for an AI context identifier.
19
26
  * @category AI
20
27
  */
21
28
  export type AiContextId = string;
@@ -4,22 +4,29 @@ import { AppId, ClientId } from './communication.public-types';
4
4
  */
5
5
  export type AuthType = 'Bearer' | 'ApiKey';
6
6
  /**
7
- * The payload of a JWT token in case an auth token was used.
7
+ * The payload of a JWT token when Bearer authentication is used.
8
8
  * @category Auth
9
9
  */
10
10
  export interface AuthWithBearer {
11
+ /** Specifies the Bearer authentication type. */
11
12
  type: 'Bearer';
13
+ /** The unique identifier of the authenticated user. */
12
14
  userId: string;
15
+ /** The expiration timestamp of the token, in seconds. */
13
16
  expiration: number;
17
+ /** Additional attributes associated with the token. */
14
18
  attributes: Record<string, any>;
19
+ /** The raw JWT token string, if available. */
15
20
  jwt?: string;
16
21
  }
17
22
  /**
18
- * The authentication object for the current request in case an API key is used.
23
+ * The authentication object for the current request when an API key is used.
19
24
  * @category Auth
20
25
  */
21
26
  export interface AuthWithApiKey {
27
+ /** Specifies the API key authentication type. */
22
28
  type: 'ApiKey';
29
+ /** The API key string used for authentication. */
23
30
  apiKey: string;
24
31
  }
25
32
  /**
@@ -28,14 +35,18 @@ export interface AuthWithApiKey {
28
35
  */
29
36
  export type Auth = AuthWithBearer | AuthWithApiKey;
30
37
  /**
38
+ * Represents an authentication token with its type and associated details.
31
39
  * @category Auth
32
40
  */
33
41
  export interface AuthToken {
42
+ /** The type of authentication (e.g., 'Bearer' or 'ApiKey'). */
34
43
  type: AuthType;
44
+ /** The token string used for authentication. */
35
45
  token: string;
46
+ /** The ID of the integration associated with the token, if applicable. */
36
47
  integrationId?: string;
37
48
  }
38
- /** The context of a request to a service. */
49
+ /** * The context of a request to a service, providing metadata about the request source. */
39
50
  export interface RunContext {
40
51
  /** Your applicationId. */
41
52
  appId: AppId;