@squidcloud/client 1.0.328 → 1.0.330

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.
@@ -1,5 +1,9 @@
1
1
  import { IntegrationClient } from './integration-client';
2
2
  import { SecretClient } from './secret.client';
3
+ /**
4
+ * AdminClient provides access to application administrative operations,
5
+ * including integrations and secrets management.
6
+ */
3
7
  export declare class AdminClient {
4
8
  private readonly rpcManager;
5
9
  private readonly region;
@@ -3,6 +3,11 @@ import { BlobAndFilename } from '../types';
3
3
  import { Observable } from 'rxjs';
4
4
  import { AskOptionsWithoutVoice, AskWithVoiceResponse, ChatOptionsWithoutVoice, TranscribeAndAskWithVoiceResponse, TranscribeAndChatResponse } from './ai-agent-client.types';
5
5
  export type UpsertAgentRequestParams = Omit<UpsertAgentRequest, 'id'>;
6
+ /**
7
+ * AiAgentReference provides methods for managing AI agents, including
8
+ * retrieving, updating, and deleting agents, handling agent contexts,
9
+ * and interacting with chat or voice-based AI functionalities.
10
+ */
6
11
  export declare class AiAgentReference {
7
12
  private readonly agentId;
8
13
  private readonly ongoingChatSequences;
@@ -1,5 +1,10 @@
1
1
  import { AiAgent, AiAgentId } from '../public-types';
2
2
  import { AiAgentReference } from './ai-agent-client-reference';
3
+ /**
4
+ * AiAgentClient manages AI agent interactions, including listing agents,
5
+ * handling real-time chat responses, and processing AI status updates
6
+ * through WebSocket notifications.
7
+ */
3
8
  export declare class AiAgentClient {
4
9
  private readonly rpcManager;
5
10
  private readonly socketManager;
@@ -1,5 +1,9 @@
1
1
  import { AiAudioCreateSpeechOptions, AiAudioTranscribeOptions } from './public-types';
2
2
  import { BlobAndFilename } from './types';
3
+ /**
4
+ * AiAudioClient provides methods for AI-driven audio processing,
5
+ * including speech transcription and text-to-speech synthesis.
6
+ */
3
7
  export declare class AiAudioClient {
4
8
  private readonly rpcManager;
5
9
  transcribe(file: File | BlobAndFilename, options?: AiAudioTranscribeOptions): Promise<string>;
@@ -1,4 +1,7 @@
1
1
  import { AiGenerateImageOptions } from './public-types';
2
+ /**
3
+ * AiImageClient provides methods for AI-powered image processing.
4
+ */
2
5
  export declare class AiImageClient {
3
6
  private readonly rpcManager;
4
7
  generate(prompt: string, options: AiGenerateImageOptions): Promise<string>;
@@ -2,6 +2,10 @@ import { IntegrationId } from '../../internal-common/src/public-types/communicat
2
2
  import { ApiEndpointId, HttpMethod } from '../../internal-common/src/public-types/integrations/api.public-types';
3
3
  import { HttpResponse } from './squid-http-client';
4
4
  import { ApiOptions } from '../../internal-common/src/public-types/api-client.public-types';
5
+ /**
6
+ * ApiClient facilitates making HTTP API requests to external integrations,
7
+ * supporting various HTTP methods such as GET, POST, PUT, PATCH, and DELETE.
8
+ */
5
9
  export declare class ApiClient {
6
10
  private readonly rpcManager;
7
11
  get<ResponseBodyType = unknown>(integrationId: IntegrationId, endpointId: ApiEndpointId, options?: ApiOptions): Promise<HttpResponse<ResponseBodyType>>;
@@ -1 +1 @@
1
- export declare function getConsoleBaseUrl(appRegion: string, path?: string): string;
1
+ export {};
@@ -1,5 +1,9 @@
1
1
  import { Observable } from 'rxjs';
2
2
  export type DestructorFn = () => Promise<void> | void;
3
+ /**
4
+ * DestructManager handles the execution of pre-destruction and destruction
5
+ * tasks, ensuring proper cleanup of resources in an orderly manner.
6
+ */
3
7
  export declare class DestructManager {
4
8
  private readonly preDestructors;
5
9
  private readonly destructors;
@@ -1,4 +1,8 @@
1
1
  import { Query, SquidDocId, SquidDocument } from './public-types';
2
+ /**
3
+ * DocumentStore manages the storage, retrieval, sorting, and migration
4
+ * of documents, ensuring efficient access and manipulation of stored data.
5
+ */
2
6
  export declare class DocumentStore {
3
7
  private readonly squidDocIdToDoc;
4
8
  saveDocument(squidDocId: SquidDocId, properties: SquidDocument | undefined): SquidDocument | undefined;
@@ -1,5 +1,9 @@
1
1
  import { BlobAndFilename } from './types';
2
2
  import { DocumentTextDataResponse, ExtractDataFromDocumentFileOptions } from '../../internal-common/src/public-types/extraction.public-types';
3
+ /**
4
+ * ExtractionClient provides methods for extracting structured data
5
+ * from document files using AI-driven processing.
6
+ */
3
7
  export declare class ExtractionClient {
4
8
  private readonly rpcManager;
5
9
  extractDataFromDocumentFile(file: File | BlobAndFilename, options?: ExtractDataFromDocumentFileOptions): Promise<DocumentTextDataResponse>;
@@ -1 +1 @@
1
- export declare function base64ToFile(base64: string, filename: string, mimeType?: string): File;
1
+ export {};
@@ -1,4 +1,8 @@
1
1
  import { IntegrationId, IntegrationInfo, IntegrationType } from './public-types';
2
+ /**
3
+ * IntegrationClient manages integrations within an application,
4
+ * providing methods for listing, retrieving, updating, and deleting integrations.
5
+ */
2
6
  export declare class IntegrationClient {
3
7
  private readonly rpcManager;
4
8
  private readonly iacBaseUrl;
@@ -1,4 +1 @@
1
- import { Squid } from '../squid';
2
- import { SerializedQuery } from '../public-types';
3
- import { SnapshotEmitter } from './snapshot-emitter';
4
- export declare function deserializeQuery<ReturnType = any>(squid: Squid, serializedQuery: SerializedQuery): SnapshotEmitter<ReturnType>;
1
+ export {};
@@ -21,6 +21,10 @@ interface InternalState<ReturnType> {
21
21
  numBefore: number;
22
22
  numAfter: number;
23
23
  }
24
+ /**
25
+ * Pagination provides a paginated view over a dataset, supporting navigation
26
+ * through pages, real-time updates, and sorting based on predefined criteria.
27
+ */
24
28
  export declare class Pagination<ReturnType> {
25
29
  private readonly paginateOptions;
26
30
  private internalStateObserver;
@@ -1,5 +1,10 @@
1
1
  import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
2
2
  import { Alias, ClientRequestId, JoinCondition, Query, SquidDocument } from '../public-types';
3
+ /**
4
+ * Defines the state and behavior of an ongoing query, including
5
+ * query dependencies, data streaming, join conditions, and limit
6
+ * underflow handling for dynamic data fetching.
7
+ */
3
8
  export interface OngoingQuery {
4
9
  clientRequestId: ClientRequestId;
5
10
  query: Query;
@@ -31,5 +31,6 @@ export interface SnapshotEmitter<ReturnType> {
31
31
  * @param options The pagination options. Defaults to `{ subscribe: true, pageSize: 100 }`.
32
32
  */
33
33
  paginate(options?: Partial<PaginationOptions>): Pagination<ReturnType>;
34
+ /** Serializes the active query used by the emitter. */
34
35
  serialize(): SerializedQuery;
35
36
  }
@@ -1,4 +1,8 @@
1
1
  import { SchedulerInfo } from './public-types';
2
+ /**
3
+ * SchedulerClient provides methods to manage schedulers,
4
+ * including listing, enabling, and disabling scheduled tasks.
5
+ */
2
6
  export declare class SchedulerClient {
3
7
  private readonly rpcManager;
4
8
  list(): Promise<SchedulerInfo[]>;
@@ -1,4 +1,8 @@
1
1
  import { SecretEntry, SecretKey, SecretValue, SetSecretRequestEntry } from './public-types';
2
+ /**
3
+ * SecretClient provides methods for managing secrets, including retrieval,
4
+ * update, and deletion of stored secrets and API keys.
5
+ */
2
6
  export declare class SecretClient {
3
7
  private readonly rpcManager;
4
8
  get(key: SecretKey): Promise<SecretEntry | undefined>;
@@ -27,6 +31,10 @@ export declare class SecretClient {
27
31
  deleteMany(keys: Array<SecretKey>, force?: boolean): Promise<void>;
28
32
  get apiKeys(): ApiKeysSecretClient;
29
33
  }
34
+ /**
35
+ * ApiKeysSecretClient manages API key secrets, providing methods
36
+ * for retrieval, creation, and deletion of API keys.
37
+ */
30
38
  export declare class ApiKeysSecretClient {
31
39
  private readonly rpcManager;
32
40
  get(key: SecretKey): Promise<SecretEntry | undefined>;
@@ -1,28 +1,3 @@
1
- import { BlobAndFilename } from './types';
2
- export declare class RpcError<BodyType = unknown> extends Error {
3
- readonly statusCode: number;
4
- readonly statusText: string;
5
- readonly url: string;
6
- readonly headers: Record<string, string>;
7
- readonly body: BodyType;
8
- }
9
- /**
10
- * A more general request interface for other HTTP methods
11
- * (GET, PUT, PATCH, DELETE).
12
- */
13
- interface HttpRequestInput<RequestBodyType = unknown> {
14
- url: string;
15
- headers: Record<string, string>;
16
- message?: RequestBodyType;
17
- files?: Array<File | BlobAndFilename>;
18
- filesFieldName?: string;
19
- extractErrorMessage: boolean;
20
- /**
21
- * Which method to use. E.g. 'GET', 'PUT', 'PATCH', 'DELETE'...
22
- * For POST, we still use `HttpPostInput` for backward-compat.
23
- */
24
- method: string;
25
- }
26
1
  /** A response object with type T for the body. */
27
2
  export interface HttpResponse<BodyType = unknown> {
28
3
  status: number;
@@ -30,14 +5,3 @@ export interface HttpResponse<BodyType = unknown> {
30
5
  headers: Record<string, string>;
31
6
  body: BodyType;
32
7
  }
33
- export declare function rawSquidHttpGet<ResponseType = unknown, RequestType = unknown>(input: Omit<HttpRequestInput<RequestType>, 'method' | 'files' | 'filesFieldName'>): Promise<HttpResponse<ResponseType>>;
34
- export declare function rawSquidHttpPut<ResponseType = unknown, RequestType = unknown>(input: Omit<HttpRequestInput<RequestType>, 'method'> & {
35
- files?: Array<File | BlobAndFilename>;
36
- filesFieldName?: string;
37
- }): Promise<HttpResponse<ResponseType>>;
38
- export declare function rawSquidHttpPatch<ResponseType = unknown, RequestType = unknown>(input: Omit<HttpRequestInput<RequestType>, 'method'> & {
39
- files?: Array<File | BlobAndFilename>;
40
- filesFieldName?: string;
41
- }): Promise<HttpResponse<ResponseType>>;
42
- export declare function rawSquidHttpDelete<ResponseType = unknown, RequestType = unknown>(input: Omit<HttpRequestInput<RequestType>, 'method' | 'files' | 'filesFieldName'>): Promise<HttpResponse<ResponseType>>;
43
- export {};
@@ -41,6 +41,9 @@ export interface ListDirectoryContentsResponse {
41
41
  directories: Array<string>;
42
42
  files: Array<FileInDirectory>;
43
43
  }
44
+ /**
45
+ * StorageClient provides methods for managing files in a storage system (like S3).
46
+ */
44
47
  export declare class StorageClient {
45
48
  private readonly integrationId;
46
49
  private readonly rpcManager;
@@ -1 +1 @@
1
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.328";
1
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.330";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.328",
3
+ "version": "1.0.330",
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",