@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
@@ -6,8 +6,25 @@ import { SchedulerInfo } from './public-types';
6
6
  */
7
7
  export declare class SchedulerClient {
8
8
  private readonly rpcManager;
9
+ /**
10
+ * Lists all configured schedulers.
11
+ *
12
+ * @returns A promise resolving to an array of scheduler metadata.
13
+ */
9
14
  list(): Promise<SchedulerInfo[]>;
15
+ /**
16
+ * Enables one or more schedulers by their IDs.
17
+ *
18
+ * @param schedulerId A single scheduler ID or an array of scheduler IDs to enable.
19
+ * @returns A promise that resolves once the update is complete.
20
+ */
10
21
  enable(schedulerId: string | string[]): Promise<void>;
22
+ /**
23
+ * Disables one or more schedulers by their IDs.
24
+ *
25
+ * @param schedulerId A single scheduler ID or an array of scheduler IDs to disable.
26
+ * @returns A promise that resolves once the update is complete.
27
+ */
11
28
  disable(schedulerId: string | string[]): Promise<void>;
12
29
  private update;
13
30
  private createUpdateSchedulerOptions;
@@ -6,9 +6,33 @@ import { SecretEntry, SecretKey, SecretValue, SetSecretRequestEntry } from './pu
6
6
  */
7
7
  export declare class SecretClient {
8
8
  private readonly rpcManager;
9
+ /**
10
+ * Retrieves a stored custom secret by its key.
11
+ *
12
+ * @param key The key of the secret to retrieve.
13
+ * @returns A promise resolving to the secret entry if found, or `undefined` if not found.
14
+ */
9
15
  get(key: SecretKey): Promise<SecretEntry | undefined>;
16
+ /**
17
+ * Retrieves all stored custom secrets.
18
+ *
19
+ * @returns A promise resolving to a record of secret entries keyed by their secret keys.
20
+ */
10
21
  getAll(): Promise<Record<SecretKey, SecretEntry>>;
22
+ /**
23
+ * Creates or updates a single secret entry.
24
+ *
25
+ * @param key The secret key to upsert.
26
+ * @param value The value associated with the secret.
27
+ * @returns A promise resolving to the created or updated secret entry.
28
+ */
11
29
  upsert(key: SecretKey, value: SecretValue): Promise<SecretEntry>;
30
+ /**
31
+ * Creates or updates multiple secret entries at once.
32
+ *
33
+ * @param entries An array of secret entries to set, each containing a key and value.
34
+ * @returns A promise resolving to an array of created or updated secret entries.
35
+ */
12
36
  upsertMany(entries: Array<SetSecretRequestEntry>): Promise<Array<SecretEntry>>;
13
37
  /**
14
38
  * Deletes a specified secret key.
@@ -30,6 +54,11 @@ export declare class SecretClient {
30
54
  * @returns A promise that resolves when the deletion request is complete.
31
55
  */
32
56
  deleteMany(keys: Array<SecretKey>, force?: boolean): Promise<void>;
57
+ /**
58
+ * Provides access to API key secret management operations.
59
+ *
60
+ * @returns An instance of {@link ApiKeysSecretClient} for managing API keys.
61
+ */
33
62
  get apiKeys(): ApiKeysSecretClient;
34
63
  }
35
64
  /**
@@ -39,8 +68,29 @@ export declare class SecretClient {
39
68
  */
40
69
  export declare class ApiKeysSecretClient {
41
70
  private readonly rpcManager;
71
+ /**
72
+ * Retrieves a stored API key by its key.
73
+ *
74
+ * @param key The API key to retrieve.
75
+ * @returns A promise resolving to the secret entry or undefined if not found.
76
+ */
42
77
  get(key: SecretKey): Promise<SecretEntry | undefined>;
78
+ /**
79
+ * Retrieves all secrets.
80
+ *
81
+ * @returns A promise resolving to a record of all stored secret entries.
82
+ */
43
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
+ */
44
88
  upsert(key: SecretKey): Promise<SecretEntry>;
89
+ /**
90
+ * Deletes a specified API key.
91
+ *
92
+ * @param key The key of the API key to delete.
93
+ * @returns A promise resolving once deletion is complete.
94
+ */
45
95
  delete(key: SecretKey): Promise<void>;
46
96
  }
@@ -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;
@@ -219,12 +221,42 @@ export declare class Squid {
219
221
  * Returns a set of functionality for interacting with API integrations.
220
222
  */
221
223
  api(): ApiClient;
224
+ /**
225
+ * Returns the AdminClient instance for performing administrative operations.
226
+ */
222
227
  admin(): AdminClient;
228
+ /**
229
+ * Returns a set of functionality for interacting with the web.
230
+ */
231
+ web(): WebClient;
232
+ /**
233
+ * Returns a client for accessing file storage for the current app.
234
+ * Defaults to the built-in storage integration if none is provided.
235
+ *
236
+ * @param integrationId The storage integration ID (default is 'built_in_storage').
237
+ */
223
238
  storage(integrationId?: IntegrationId): StorageClient;
239
+ /**
240
+ * Returns a client for accessing personal (user-specific) file storage.
241
+ *
242
+ * @param integrationId The storage integration ID to use.
243
+ */
224
244
  personalStorage(integrationId: IntegrationId): PersonalStorageClient;
245
+ /**
246
+ * Returns a client for working with structured data extraction tools.
247
+ */
225
248
  extraction(): ExtractionClient;
249
+ /**
250
+ * Returns the observability client for metrics.
251
+ */
226
252
  get observability(): ObservabilityClient;
253
+ /**
254
+ * Returns the scheduler client for managing scheduled jobs and tasks.
255
+ */
227
256
  get schedulers(): SchedulerClient;
257
+ /**
258
+ * Returns the application ID of the current Squid instance.
259
+ */
228
260
  get appId(): AppId;
229
261
  /**
230
262
  * Returns a distributed lock for the given mutex. The lock can be used to synchronize access to a shared resource.
@@ -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.343";
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.343",
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",