@squidcloud/client 1.0.344 → 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.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Request to search the web.
3
+ */
4
+ export interface WebAiSearchRequest {
5
+ /** The search query. */
6
+ query: string;
7
+ }
8
+ /**
9
+ * Represents a cited URL in the search response.
10
+ */
11
+ export interface WebAiSearchCitedUrl {
12
+ /** The URL of the cited resource. */
13
+ url: string;
14
+ /** The title of the cited resource. */
15
+ title: string;
16
+ }
17
+ /**
18
+ * Response from a web search.
19
+ */
20
+ export interface WebAiSearchResponse {
21
+ /** The search result content in Markdown format. */
22
+ markdownText: string;
23
+ /** A list of cited URLs included in the search response. */
24
+ citedUrls: Array<WebAiSearchCitedUrl>;
25
+ }
26
+ /**
27
+ * Request to fetch content from a URL.
28
+ */
29
+ export interface WebGetUrlContentRequest {
30
+ /** The URL to fetch content from. */
31
+ url: string;
32
+ }
33
+ /**
34
+ * Response from fetching content from a URL.
35
+ */
36
+ export interface WebGetUrlContentResponse {
37
+ /** The content fetched from the URL in Markdown format. */
38
+ markdownText: string;
39
+ }
@@ -53,3 +53,4 @@ export * from './ai-client';
53
53
  export * from './agent/ai-agent-client';
54
54
  export * from './agent/ai-agent-client.types';
55
55
  export * from './agent/ai-agent-client-reference';
56
+ export * from './web-client';
@@ -21,3 +21,4 @@ export * from '../../internal-common/src/public-types/typescript.public-types';
21
21
  export * from '../../internal-common/src/public-types/extraction.public-types';
22
22
  export * from '../../internal-common/src/public-types/ai-matchmaking.types';
23
23
  export * from '../../internal-common/src/public-types/backend.public-types';
24
+ export * from '../../internal-common/src/public-types/web.public-types';
@@ -81,6 +81,10 @@ export declare class ApiKeysSecretClient {
81
81
  * @returns A promise resolving to a record of all stored secret entries.
82
82
  */
83
83
  getAll(): Promise<Record<SecretKey, SecretEntry>>;
84
+ /**
85
+ * Inserts a new API key or updates an existing one with a new autogenerated value.
86
+ * Returns the created secret.
87
+ */
84
88
  upsert(key: SecretKey): Promise<SecretEntry>;
85
89
  /**
86
90
  * Deletes a specified API key.
@@ -12,6 +12,7 @@ import { PersonalStorageClient } from './personal-storage-client';
12
12
  import { SchedulerClient } from './scheduler-client';
13
13
  import { AdminClient } from './admin-client';
14
14
  import { AiClient } from './ai-client';
15
+ import { WebClient } from './web-client';
15
16
  /**
16
17
  * The different options that can be used to initialize a Squid instance.
17
18
  * @category Platform
@@ -109,6 +110,7 @@ export declare class Squid {
109
110
  private readonly aiClient;
110
111
  private readonly apiClient;
111
112
  private readonly adminClient;
113
+ private readonly webClient;
112
114
  private readonly observabilityClient;
113
115
  private readonly queueManagerFactory;
114
116
  private readonly schedulerClient;
@@ -223,6 +225,10 @@ export declare class Squid {
223
225
  * Returns the AdminClient instance for performing administrative operations.
224
226
  */
225
227
  admin(): AdminClient;
228
+ /**
229
+ * Returns a set of functionality for interacting with the web.
230
+ */
231
+ web(): WebClient;
226
232
  /**
227
233
  * Returns a client for accessing file storage for the current app.
228
234
  * Defaults to the built-in storage integration if none is provided.
@@ -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.344";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.345";
@@ -0,0 +1,18 @@
1
+ import { WebAiSearchResponse } from '../../internal-common/src/public-types/web.public-types';
2
+ /**
3
+ * WebClient provides methods to interact with web-related functionalities.
4
+ * @category Platform
5
+ */
6
+ export declare class WebClient {
7
+ private readonly rpcManager;
8
+ /**
9
+ * Search the web using AI. Returns a response containing Markdown text and cited URLs.
10
+ * @param query The keywords or query string to search for.
11
+ */
12
+ aiSearch(query: string): Promise<WebAiSearchResponse>;
13
+ /**
14
+ * Fetch content from a URL.
15
+ * @param url The URL to fetch content from.
16
+ */
17
+ getUrlContent(url: string): Promise<string>;
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.344",
3
+ "version": "1.0.345",
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",