@squidcloud/client 1.0.348 → 1.0.349

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.
@@ -30,11 +30,15 @@ export declare const AI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1
30
30
  /**
31
31
  * @category AI
32
32
  */
33
- export declare const OPENAI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"];
33
+ export declare const OPENAI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small"];
34
34
  /**
35
35
  * @category AI
36
36
  */
37
- export declare const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"];
37
+ export declare const VOYAGE_EMBEDDING_MODEL_NAMES: readonly ["voyage-3-large"];
38
+ /**
39
+ * @category AI
40
+ */
41
+ export declare const AI_EMBEDDINGS_MODEL_NAMES: readonly ["text-embedding-3-small", "voyage-3-large"];
38
42
  /**
39
43
  * The supported AI image generation model names.
40
44
  * @category AI
@@ -84,6 +88,10 @@ export type AiChatModelName = (typeof AI_CHAT_MODEL_NAMES)[number];
84
88
  * @category AI
85
89
  */
86
90
  export type AiEmbeddingsModelName = (typeof AI_EMBEDDINGS_MODEL_NAMES)[number];
91
+ /**
92
+ * @category AI
93
+ */
94
+ export type AiVoyageEmbeddingsModelName = (typeof VOYAGE_EMBEDDING_MODEL_NAMES)[number];
87
95
  /**
88
96
  * @category AI
89
97
  */
@@ -455,12 +463,15 @@ export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
455
463
  auditLog?: boolean;
456
464
  /** The default chat options for the agent, overridable by the user during use. */
457
465
  options: AiAgentChatOptions<T>;
466
+ /** The embedding model name used by the agent. */
467
+ embeddingModelName: AiEmbeddingsModelName;
458
468
  }
459
469
  /**
460
470
  * @category AI
461
471
  */
462
- export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
472
+ export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options' | 'embeddingModelName'> & {
463
473
  options?: AiAgentChatOptions;
474
+ embeddingModelName?: AiEmbeddingsModelName;
464
475
  };
465
476
  /**
466
477
  * Options for observing the status of an AI agent operation.
@@ -1,3 +1,4 @@
1
+ import { AppId } from './communication.public-types';
1
2
  /**
2
3
  * Request to search the web.
3
4
  */
@@ -37,3 +38,34 @@ export interface WebGetUrlContentResponse {
37
38
  /** The content fetched from the URL in Markdown format. */
38
39
  markdownText: string;
39
40
  }
41
+ /**
42
+ * Request to create a shortened URL.
43
+ */
44
+ export interface WebShortUrlRequest {
45
+ /** The URL to shorten. It must be a valid URL and should include the protocol (start with http:// or https://). */
46
+ url: string;
47
+ /** The application ID that will own this shortened URL. */
48
+ appId: AppId;
49
+ /** Seconds to live for the shortened URL. If set to 0, the URL will never expire. */
50
+ secondsToLive?: number;
51
+ }
52
+ /**
53
+ * Response with the newly created shortened URL.
54
+ */
55
+ export interface WebShortUrlResponse {
56
+ /** The ID of the shortened URL. */
57
+ id: string;
58
+ /** The full valid shortened URL. */
59
+ shortUrl: string;
60
+ /** The time when the shortened URL will expire. */
61
+ expiry: Date | null;
62
+ }
63
+ /**
64
+ * Request to delete a shortened URL.
65
+ */
66
+ export interface WebShortUrlDeleteRequest {
67
+ /** The ID of the shortened URL to delete. */
68
+ id: string;
69
+ /** The application ID that owns the shortened URL. */
70
+ appId: AppId;
71
+ }
@@ -2,4 +2,4 @@
2
2
  * The current version of the SquidCloud client package.
3
3
  * @category Platform
4
4
  */
5
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.348";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.349";
@@ -1,10 +1,13 @@
1
- import { WebAiSearchResponse } from '../../internal-common/src/public-types/web.public-types';
1
+ import { WebAiSearchResponse, WebShortUrlResponse } from '../../internal-common/src/public-types/web.public-types';
2
2
  /**
3
3
  * WebClient provides methods to interact with web-related functionalities.
4
4
  * @category Platform
5
5
  */
6
6
  export declare class WebClient {
7
7
  private readonly rpcManager;
8
+ private readonly region;
9
+ private readonly appId;
10
+ private readonly apiKey;
8
11
  /**
9
12
  * Search the web using AI. Returns a response containing Markdown text and cited URLs.
10
13
  * @param query The keywords or query string to search for.
@@ -15,4 +18,24 @@ export declare class WebClient {
15
18
  * @param url The URL to fetch content from.
16
19
  */
17
20
  getUrlContent(url: string): Promise<string>;
21
+ /**
22
+ * Creates a shortened URL for the given URL.
23
+ *
24
+ * Defaults to a 30 day expiration if no expiry is provided via the `secondsToLive` field.
25
+ * If `secondsToLive` is set to 0, the URL will never expire.
26
+ *
27
+ * @param url The URL to shorten. It must be a valid URL and should include the protocol (start with http:// or
28
+ * https://).
29
+ * @param secondsToLive Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 30
30
+ * days.
31
+ */
32
+ createShortUrl(url: string, secondsToLive?: number): Promise<WebShortUrlResponse>;
33
+ /**
34
+ * Deletes a shortened URL by its ID.
35
+ *
36
+ * The ID is the unique identifier at the end of the shortened URL.
37
+ *
38
+ * @param id The ID of the shortened URL to delete.
39
+ */
40
+ deleteShortUrl(id: string): Promise<void>;
18
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.348",
3
+ "version": "1.0.349",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/typescript-client/src/index.d.ts",