@squidcloud/client 1.0.338 → 1.0.340
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.
- package/dist/cjs/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +287 -62
- package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +9 -2
- package/dist/internal-common/src/public-types/ai-matchmaking.types.d.ts +6 -0
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +13 -0
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +7 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +12 -1
- package/dist/internal-common/src/public-types/document.public-types.d.ts +42 -12
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +21 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +16 -2
- package/dist/internal-common/src/public-types/integrations/api.public-types.d.ts +0 -11
- package/dist/internal-common/src/public-types/query.public-types.d.ts +35 -7
- package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +13 -4
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +24 -7
- package/dist/internal-common/src/public-types/serialized-query.public-types.d.ts +12 -0
- package/dist/internal-common/src/public-types/typescript.public-types.d.ts +0 -3
- package/dist/typescript-client/src/admin-client.d.ts +1 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +73 -2
- package/dist/typescript-client/src/agent/ai-agent-client.d.ts +1 -0
- package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +8 -1
- package/dist/typescript-client/src/ai-assistant-client.d.ts +3 -2
- package/dist/typescript-client/src/ai-audio-client.d.ts +15 -0
- package/dist/typescript-client/src/ai-client.d.ts +5 -0
- package/dist/typescript-client/src/ai-image-client.d.ts +16 -1
- package/dist/typescript-client/src/ai-matchmaking-client.d.ts +57 -11
- package/dist/typescript-client/src/ai.types.d.ts +24 -30
- package/dist/typescript-client/src/api-client.d.ts +1 -0
- package/dist/typescript-client/src/auth.manager.d.ts +4 -1
- package/dist/typescript-client/src/collection-reference.d.ts +2 -0
- package/dist/typescript-client/src/connection-details.d.ts +1 -0
- package/dist/typescript-client/src/destruct.manager.d.ts +1 -21
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +4 -1
- package/dist/typescript-client/src/document-reference.d.ts +1 -0
- package/dist/typescript-client/src/document-store.d.ts +1 -17
- package/dist/typescript-client/src/extraction-client.d.ts +1 -0
- package/dist/typescript-client/src/integration-client.d.ts +1 -0
- package/dist/typescript-client/src/observability-client.d.ts +5 -1
- package/dist/typescript-client/src/personal-storage-client.d.ts +23 -4
- package/dist/typescript-client/src/public-types.d.ts +1 -4
- package/dist/typescript-client/src/query/deserializer.d.ts +1 -0
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +34 -8
- package/dist/typescript-client/src/query/pagination.d.ts +10 -10
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +12 -4
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +1 -12
- package/dist/typescript-client/src/query/query.types.d.ts +2 -93
- package/dist/typescript-client/src/query/snapshot-emitter.d.ts +1 -0
- package/dist/typescript-client/src/query-utils.d.ts +5 -1
- package/dist/typescript-client/src/queue.manager.d.ts +1 -0
- package/dist/typescript-client/src/scheduler-client.d.ts +1 -0
- package/dist/typescript-client/src/secret.client.d.ts +2 -0
- package/dist/typescript-client/src/squid.d.ts +16 -4
- package/dist/typescript-client/src/storage-client.d.ts +9 -9
- package/dist/typescript-client/src/types.d.ts +4 -1
- package/dist/typescript-client/src/version.d.ts +2 -2
- package/package.json +6 -2
- package/dist/internal-common/src/metric-name.d.ts +0 -9
- package/dist/internal-common/src/public-types/application.public-types.d.ts +0 -94
- package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +0 -33
- package/dist/internal-common/src/public-types/mutation.public-types.d.ts +0 -54
- package/dist/internal-common/src/public-types/storage.types.d.ts +0 -9
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -21
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -18
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -127
- package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -1
- package/dist/internal-common/src/types/ai-assistant.types.d.ts +0 -1
- package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -53
- package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
- package/dist/internal-common/src/types/communication.types.d.ts +0 -1
- package/dist/internal-common/src/types/document.types.d.ts +0 -1
- package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
- package/dist/internal-common/src/types/observability.types.d.ts +0 -71
- package/dist/internal-common/src/types/query.types.d.ts +0 -10
- package/dist/internal-common/src/types/secret.types.d.ts +0 -2
- package/dist/internal-common/src/types/socket.types.d.ts +0 -1
- package/dist/internal-common/src/types/time-units.d.ts +0 -1
- package/dist/internal-common/src/utils/array.d.ts +0 -1
- package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
- package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
- package/dist/internal-common/src/utils/http.d.ts +0 -1
- package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
- package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
- package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
- package/dist/internal-common/src/utils/object.d.ts +0 -49
- package/dist/internal-common/src/utils/serialization.d.ts +0 -5
- package/dist/internal-common/src/utils/squid.constants.d.ts +0 -1
- package/dist/internal-common/src/utils/validation.d.ts +0 -19
- package/dist/internal-common/src/websocket.impl.d.ts +0 -26
|
@@ -4,7 +4,8 @@ import { DocumentData, FieldName, FieldSort, Operator, PrimitiveFieldType, Query
|
|
|
4
4
|
import { Pagination, PaginationOptions } from './pagination';
|
|
5
5
|
import { SnapshotEmitter } from './snapshot-emitter';
|
|
6
6
|
/**
|
|
7
|
-
* Interface used solely for
|
|
7
|
+
* Interface used solely for inheritDoc
|
|
8
|
+
* @category Database
|
|
8
9
|
*/
|
|
9
10
|
export interface HasDereference {
|
|
10
11
|
/**
|
|
@@ -16,6 +17,7 @@ export interface HasDereference {
|
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Query builder base class.
|
|
20
|
+
* @category Database
|
|
19
21
|
*/
|
|
20
22
|
export declare abstract class BaseQueryBuilder<MyDocType extends DocumentData> {
|
|
21
23
|
/**
|
|
@@ -129,7 +131,6 @@ export declare abstract class BaseQueryBuilder<MyDocType extends DocumentData> {
|
|
|
129
131
|
* @returns The query builder.
|
|
130
132
|
*/
|
|
131
133
|
arrayNotIncludes(fieldName: (keyof MyDocType & FieldName) | string, values: Array<PrimitiveFieldType>): this;
|
|
132
|
-
throwIfInvalidLikePattern(pattern: string): void;
|
|
133
134
|
/**
|
|
134
135
|
* Sets a limit to the number of results returned by the query. The maximum limit is 20,000 and the default is 1,000
|
|
135
136
|
* if none is provided.
|
|
@@ -149,8 +150,12 @@ export declare abstract class BaseQueryBuilder<MyDocType extends DocumentData> {
|
|
|
149
150
|
* Returns the query object built by this query builder.
|
|
150
151
|
*/
|
|
151
152
|
abstract build(): Query;
|
|
153
|
+
private throwIfInvalidLikePattern;
|
|
152
154
|
}
|
|
153
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* A query builder that can be used to build a query that returns a list of documents.
|
|
157
|
+
* @category Database
|
|
158
|
+
*/
|
|
154
159
|
export declare class QueryBuilder<DocumentType extends DocumentData> extends BaseQueryBuilder<DocumentType> implements SnapshotEmitter<DocumentReference<DocumentType>>, HasDereference {
|
|
155
160
|
private readonly collectionName;
|
|
156
161
|
private readonly integrationId;
|
|
@@ -209,7 +214,10 @@ export declare class QueryBuilder<DocumentType extends DocumentData> extends Bas
|
|
|
209
214
|
serialize(): SerializedSimpleQuery;
|
|
210
215
|
paginate(options?: Partial<PaginationOptions>): Pagination<DocumentReference<DocumentType>>;
|
|
211
216
|
}
|
|
212
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Describes the changes to a query result.
|
|
219
|
+
* @category Database
|
|
220
|
+
*/
|
|
213
221
|
export declare class Changes<DocumentType extends DocumentData> {
|
|
214
222
|
/** The newly inserted documents to the query result */
|
|
215
223
|
readonly inserts: Array<DocumentReference<DocumentType>>;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Number of additional results to fetch beyond the query limit.
|
|
3
|
-
* This is used to handle cases where the client may need more data
|
|
4
|
-
* than initially requested, allowing for smooth pagination.
|
|
5
|
-
*/
|
|
6
|
-
export declare const FETCH_BEYOND_LIMIT = 100;
|
|
7
|
-
/**
|
|
8
|
-
* Threshold for triggering a re-fetch when the number of available
|
|
9
|
-
* results falls below this value. Helps ensure that queries maintain
|
|
10
|
-
* an adequate number of results in memory.
|
|
11
|
-
*/
|
|
12
|
-
export declare const LIMIT_UNDERFLOW_TRIGGER = 20;
|
|
1
|
+
export {};
|
|
@@ -1,99 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
|
-
*/
|
|
8
|
-
export interface OngoingQuery {
|
|
9
|
-
/** Unique client request identifier for the query. */
|
|
10
|
-
clientRequestId: ClientRequestId;
|
|
11
|
-
/** Query definition specifying filters, conditions, and requested data. */
|
|
12
|
-
query: Query;
|
|
13
|
-
/** All the queries that depend on this query. A.join(B) ==> B depends on A. */
|
|
14
|
-
supportedQueries: Array<OngoingQuery>;
|
|
15
|
-
/** The query this query supports. A.join(B) ==> B supporting A. */
|
|
16
|
-
supportingOngoingQuery?: OngoingQuery;
|
|
17
|
-
/** Whether the first response has arrived. */
|
|
18
|
-
gotInitialResponse: boolean;
|
|
19
|
-
/** Whether the query is ready - relevant for joins. */
|
|
20
|
-
activated: boolean;
|
|
21
|
-
/** The join condition with the supporting ongoing query. */
|
|
22
|
-
joinCondition?: JoinCondition;
|
|
23
|
-
/** Alias used for identifying this query in joins. */
|
|
24
|
-
alias: Alias;
|
|
25
|
-
/** Subject emitting the documents retrieved by the query. */
|
|
26
|
-
dataSubject: BehaviorSubject<Array<SquidDocument> | null>;
|
|
27
|
-
/** Tracks whether the query has been registered with the system. */
|
|
28
|
-
queryRegistered: BehaviorSubject<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* In case that this query is a parent of another query (that is, the other query is a subset of this query),
|
|
31
|
-
* this query should not be unsubscribed from the server until we registered the child query in the server.
|
|
32
|
-
*/
|
|
33
|
-
unsubscribeBlockerCount: BehaviorSubject<number>;
|
|
34
|
-
/** Whether the query should be subscribed to and actively fetch data. */
|
|
35
|
-
subscribe: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* In case of joins, and if this ongoing query is the root, this field emits all the supported observables.
|
|
38
|
-
*
|
|
39
|
-
* For example:
|
|
40
|
-
* `A.join(B, {...some join condition...}).join(C, {...some join condition})`
|
|
41
|
-
* This field will emit `[A.subject.pipe(), B.subject.pipe(), C.subject.pipe()]`. Any new supported queries
|
|
42
|
-
* will be added here.
|
|
43
|
-
*/
|
|
44
|
-
allObservables?: ReplaySubject<Array<Observable<DocsAndAlias>>>;
|
|
45
|
-
/** Indicates whether this query has an empty result set in the context of a join. */
|
|
46
|
-
isEmptyForJoin: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* If the query is a supporting query (right side of the join) and the query has '==' condition on the join column,
|
|
49
|
-
* there is no need to emit a new query when additional values are added to the left side of the join
|
|
50
|
-
* since the right side will not change.
|
|
51
|
-
*/
|
|
52
|
-
canExpandForJoin: boolean;
|
|
53
|
-
/** Whether this query has completed execution. */
|
|
54
|
-
done: boolean;
|
|
55
|
-
/** Indicates if the query is currently in-flight (waiting for a response). */
|
|
56
|
-
isInFlight: boolean;
|
|
57
|
-
/** Forces fetching fresh results from the server instead of using cached data. */
|
|
58
|
-
forceFetchFromServer: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* If there's a limit, we request `limit + FETCH_BEYOND_LIMIT` documents from the server.
|
|
61
|
-
*
|
|
62
|
-
* - If we got that many documents, that means there may be even more.
|
|
63
|
-
* - If our result set goes below `limit + LIMIT_UNDERFLOW_TRIGGER` (due to local or remote deletions),
|
|
64
|
-
* we need to resend the query to the server to potentially get more documents.
|
|
65
|
-
* - If the number of documents is less than `limit + FETCH_BEYOND_LIMIT`, that means there are
|
|
66
|
-
* not that many documents on the server, so we don't need to resend the query regardless of
|
|
67
|
-
* how small our result size is or becomes.
|
|
68
|
-
*/
|
|
69
|
-
limitUnderflowState: LimitUnderflowState;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Represents the state of a query when handling limit underflows.
|
|
73
|
-
* Determines whether the client should re-fetch data when the number
|
|
74
|
-
* of stored documents drops below a certain threshold.
|
|
75
|
-
*/
|
|
76
|
-
export declare enum LimitUnderflowState {
|
|
77
|
-
/**
|
|
78
|
-
* The state is unknown, and the system should determine whether to re-fetch
|
|
79
|
-
* data based on observed conditions.
|
|
80
|
-
*/
|
|
81
|
-
UNKNOWN = 0,
|
|
82
|
-
/**
|
|
83
|
-
* Limit underflow handling is disabled. The query will not trigger
|
|
84
|
-
* a re-fetch even if the number of results falls below the threshold.
|
|
85
|
-
*/
|
|
86
|
-
DISABLED = 1,
|
|
87
|
-
/**
|
|
88
|
-
* Limit underflow handling is enabled. If the number of documents
|
|
89
|
-
* falls below the defined threshold, the system will attempt to fetch
|
|
90
|
-
* additional results from the server.
|
|
91
|
-
*/
|
|
92
|
-
ENABLED = 2
|
|
93
|
-
}
|
|
1
|
+
import { Alias, SquidDocument } from '../public-types';
|
|
94
2
|
/**
|
|
95
3
|
* Represents a collection of documents associated with a specific alias
|
|
96
4
|
* in a query, typically used in joined query results.
|
|
5
|
+
* @category Database
|
|
97
6
|
*/
|
|
98
7
|
export interface DocsAndAlias {
|
|
99
8
|
/**
|
|
@@ -4,6 +4,7 @@ import { Pagination, PaginationOptions } from './pagination';
|
|
|
4
4
|
/**
|
|
5
5
|
* Interface for emitting query results in a reactive manner,
|
|
6
6
|
* supporting both synchronous and asynchronous access.
|
|
7
|
+
* @category Database
|
|
7
8
|
*/
|
|
8
9
|
export interface SnapshotEmitter<ReturnType> {
|
|
9
10
|
/**
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { DocumentData } from '../../internal-common/src/public-types/document.public-types';
|
|
2
2
|
import { QueryBuilder } from './query/query-builder.factory';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Result of the `visitQueryResults` function.
|
|
5
|
+
* @category Database
|
|
6
|
+
*/
|
|
4
7
|
export interface VisitQueryResultsStats {
|
|
5
8
|
/** Count of documents visited. */
|
|
6
9
|
count: number;
|
|
@@ -10,5 +13,6 @@ export interface VisitQueryResultsStats {
|
|
|
10
13
|
/**
|
|
11
14
|
* Reads all objects from the query in a safe way (with pagination) and calls callback() on every object.
|
|
12
15
|
* The iteration is interrupted if error is thrown.
|
|
16
|
+
* @category Database
|
|
13
17
|
*/
|
|
14
18
|
export declare function visitQueryResults<T extends DocumentData>(query: QueryBuilder<T>, callback: (t: T) => Promise<unknown>, pageSize?: number): Promise<VisitQueryResultsStats>;
|
|
@@ -2,6 +2,7 @@ import { SchedulerInfo } from './public-types';
|
|
|
2
2
|
/**
|
|
3
3
|
* SchedulerClient provides methods to manage schedulers,
|
|
4
4
|
* including listing, enabling, and disabling scheduled tasks.
|
|
5
|
+
* @category Platform
|
|
5
6
|
*/
|
|
6
7
|
export declare class SchedulerClient {
|
|
7
8
|
private readonly rpcManager;
|
|
@@ -2,6 +2,7 @@ import { SecretEntry, SecretKey, SecretValue, SetSecretRequestEntry } from './pu
|
|
|
2
2
|
/**
|
|
3
3
|
* SecretClient provides methods for managing secrets, including retrieval,
|
|
4
4
|
* update, and deletion of stored secrets and API keys.
|
|
5
|
+
* @category Secret
|
|
5
6
|
*/
|
|
6
7
|
export declare class SecretClient {
|
|
7
8
|
private readonly rpcManager;
|
|
@@ -34,6 +35,7 @@ export declare class SecretClient {
|
|
|
34
35
|
/**
|
|
35
36
|
* ApiKeysSecretClient manages API key secrets, providing methods
|
|
36
37
|
* for retrieval, creation, and deletion of API keys.
|
|
38
|
+
* @category Secret
|
|
37
39
|
*/
|
|
38
40
|
export declare class ApiKeysSecretClient {
|
|
39
41
|
private readonly rpcManager;
|
|
@@ -12,7 +12,10 @@ 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
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The different options that can be used to initialize a Squid instance.
|
|
17
|
+
* @category Platform
|
|
18
|
+
*/
|
|
16
19
|
export interface SquidOptions {
|
|
17
20
|
/**
|
|
18
21
|
* A function that can be used to wrap messages coming from Squid to the application. This is useful for
|
|
@@ -54,7 +57,10 @@ export interface SquidOptions {
|
|
|
54
57
|
*/
|
|
55
58
|
squidDeveloperId?: SquidDeveloperId;
|
|
56
59
|
}
|
|
57
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Authentication data provider for Squid requests.
|
|
62
|
+
* @category Authentication
|
|
63
|
+
*/
|
|
58
64
|
export interface SquidAuthProvider {
|
|
59
65
|
/**
|
|
60
66
|
* Returns a valid AccessToken or undefined if there is no active authorized session.
|
|
@@ -75,6 +81,8 @@ export interface SquidAuthProvider {
|
|
|
75
81
|
* capabilities.
|
|
76
82
|
* All public Squid functions are bound to `this` and can be used with a destructuring patterns,
|
|
77
83
|
* like `const {setAuthProvider} = useSquid()`
|
|
84
|
+
*
|
|
85
|
+
* @category Platform
|
|
78
86
|
*/
|
|
79
87
|
export declare class Squid {
|
|
80
88
|
readonly options: SquidOptions;
|
|
@@ -171,7 +179,8 @@ export declare class Squid {
|
|
|
171
179
|
* {@link https://docs.getsquid.ai/docs/backend/executables/ documentation}.
|
|
172
180
|
*
|
|
173
181
|
* Files support:
|
|
174
|
-
* - To send a file to the backend, simply include it as one of the parameters; it will be received as a
|
|
182
|
+
* - To send a file to the backend, simply include it as one of the parameters; it will be received as a `SquidFile`
|
|
183
|
+
* on the backend.
|
|
175
184
|
* - Arrays of files can also be passed directly as parameters.
|
|
176
185
|
*
|
|
177
186
|
* @param functionName - The name of the backend function to execute.
|
|
@@ -179,7 +188,7 @@ export declare class Squid {
|
|
|
179
188
|
* @returns A promise that resolves to the result of the backend function.
|
|
180
189
|
* @typeParam T - The expected type of the result returned by the backend function.
|
|
181
190
|
*/
|
|
182
|
-
executeFunction<T = any>(functionName: string, ...params: any
|
|
191
|
+
executeFunction<T = any>(functionName: string, ...params: Array<any | File>): Promise<T>;
|
|
183
192
|
/**
|
|
184
193
|
* Executes a native relational query with the given parameters and returns a promise with the result.
|
|
185
194
|
* See https://docs.getsquid.ai/docs/client-sdk/database/native-queries.
|
|
@@ -206,6 +215,9 @@ export declare class Squid {
|
|
|
206
215
|
* @returns A set of AI specific clients.
|
|
207
216
|
*/
|
|
208
217
|
ai(): AiClient;
|
|
218
|
+
/**
|
|
219
|
+
* Returns a set of functionality for interacting with API integrations.
|
|
220
|
+
*/
|
|
209
221
|
api(): ApiClient;
|
|
210
222
|
admin(): AdminClient;
|
|
211
223
|
storage(integrationId?: IntegrationId): StorageClient;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IntegrationId } from '../../internal-common/src/public-types/communication.public-types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a request to upload a file to a specified directory within the storage bucket.
|
|
4
|
+
* @category Storage
|
|
4
5
|
*/
|
|
5
6
|
export interface StorageFileUploadRequest {
|
|
6
7
|
/** The ID of the integration where the file will be uploaded. */
|
|
@@ -12,6 +13,7 @@ export interface StorageFileUploadRequest {
|
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Represents a request to retrieve metadata for a specific file stored in the bucket.
|
|
16
|
+
* @category Storage
|
|
15
17
|
*/
|
|
16
18
|
export interface GetFileMetadataRequest {
|
|
17
19
|
/** The ID of the integration where the file is stored. */
|
|
@@ -21,6 +23,7 @@ export interface GetFileMetadataRequest {
|
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Represents the metadata details of a file stored in the bucket.
|
|
26
|
+
* @category Storage
|
|
24
27
|
*/
|
|
25
28
|
export interface GetFileMetadataResponse {
|
|
26
29
|
/** The name of the file. */
|
|
@@ -34,6 +37,7 @@ export interface GetFileMetadataResponse {
|
|
|
34
37
|
}
|
|
35
38
|
/**
|
|
36
39
|
* Represents a request to generate a temporary download URL for a file.
|
|
40
|
+
* @category Storage
|
|
37
41
|
*/
|
|
38
42
|
export interface GetDownloadUrlRequest {
|
|
39
43
|
/** The ID of the integration where the file is stored. */
|
|
@@ -45,6 +49,7 @@ export interface GetDownloadUrlRequest {
|
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
51
|
* Represents the response containing a generated download URL for a file.
|
|
52
|
+
* @category Storage
|
|
48
53
|
*/
|
|
49
54
|
export interface GetDownloadUrlResponse {
|
|
50
55
|
/** The temporary URL for downloading the file. */
|
|
@@ -52,6 +57,7 @@ export interface GetDownloadUrlResponse {
|
|
|
52
57
|
}
|
|
53
58
|
/**
|
|
54
59
|
* Represents a request to delete multiple files from the storage bucket.
|
|
60
|
+
* @category Storage
|
|
55
61
|
*/
|
|
56
62
|
export interface DeleteFilesRequest {
|
|
57
63
|
/** The ID of the integration where the files are stored. */
|
|
@@ -59,17 +65,9 @@ export interface DeleteFilesRequest {
|
|
|
59
65
|
/** An array of file paths within the bucket to be deleted. */
|
|
60
66
|
filePathsInBucket: Array<string>;
|
|
61
67
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Represents a request to list the contents of a directory within the storage bucket.
|
|
64
|
-
*/
|
|
65
|
-
export interface ListDirectoryContentsRequest {
|
|
66
|
-
/** The ID of the integration where the directory is located. */
|
|
67
|
-
integrationId: IntegrationId;
|
|
68
|
-
/** The path of the directory within the bucket. */
|
|
69
|
-
dirPathInBucket: string;
|
|
70
|
-
}
|
|
71
68
|
/**
|
|
72
69
|
* Represents details of a file within a directory in the storage bucket.
|
|
70
|
+
* @category Storage
|
|
73
71
|
*/
|
|
74
72
|
export interface FileInDirectory {
|
|
75
73
|
/** The name of the file. */
|
|
@@ -84,6 +82,7 @@ export interface FileInDirectory {
|
|
|
84
82
|
/**
|
|
85
83
|
* Represents the response containing a list of directories and files within a specified directory in the storage
|
|
86
84
|
* bucket.
|
|
85
|
+
* @category Storage
|
|
87
86
|
*/
|
|
88
87
|
export interface ListDirectoryContentsResponse {
|
|
89
88
|
/** An array of directory names present in the specified directory. */
|
|
@@ -93,6 +92,7 @@ export interface ListDirectoryContentsResponse {
|
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* StorageClient provides methods for managing files in a storage system (like S3).
|
|
95
|
+
* @category Storage
|
|
96
96
|
*/
|
|
97
97
|
export declare class StorageClient {
|
|
98
98
|
private readonly integrationId;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** The current version of the SquidCloud client package. */
|
|
2
|
-
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.
|
|
1
|
+
/** The current version of the SquidCloud client package. @category Platform */
|
|
2
|
+
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.340";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.340",
|
|
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",
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
25
25
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
26
26
|
"publish:public": "npm run build && npm publish --access public",
|
|
27
|
-
"full-bundle-size-report": "cross-env BUILD_FULL_BUNDLE_SIZE_REPORT=1 webpack --mode=production"
|
|
27
|
+
"full-bundle-size-report": "cross-env BUILD_FULL_BUNDLE_SIZE_REPORT=1 webpack --mode=production",
|
|
28
|
+
"generate-docs-html": "typedoc",
|
|
29
|
+
"generate-docs-markdown": "typedoc --plugin typedoc-plugin-markdown --readme none --out ./generated-docs/markdown"
|
|
28
30
|
},
|
|
29
31
|
"keywords": [
|
|
30
32
|
"typescript",
|
|
@@ -48,6 +50,8 @@
|
|
|
48
50
|
"rxjs": ">=7.5.7 <8.0.0"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
53
|
+
"typedoc": "^0.28.0",
|
|
54
|
+
"typedoc-plugin-markdown": "^4.5.2",
|
|
51
55
|
"@supercharge/promise-pool": "^3.2.0",
|
|
52
56
|
"@webpack-cli/generators": "^3.0.7",
|
|
53
57
|
"copy-webpack-plugin": "^12.0.2",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Names of the Squid metrics.
|
|
3
|
-
* Should be in sync with MetricName.kt.
|
|
4
|
-
* See MetricName.kt for documentation on each value.
|
|
5
|
-
*/
|
|
6
|
-
export declare const ALL_SQUID_METRIC_NAMES: readonly ["squid_functionExecution_count", "squid_functionExecution_time", "squid_aiChatbotContext_size", "squid_aiChatbotChatInputTokens_count", "squid_aiChatbotChatOutputTokens_count", "squid_aiChatbotChatOutcome_count", "squid_aiImageGeneration_count", "squid_aiImageGeneration_time", "squid_aiRemoveBackground_count", "squid_aiRemoveBackground_time", "squid_aiAudioTranscribe_count", "squid_aiAudioTranscribe_time", "squid_aiAudioCreateSpeech_count", "squid_aiAudioCreateSpeech_time", "squid_aiIntegrationData_count", "squid_aiIntegrationData_time", "squid_aiIntegrationApi_count", "squid_aiIntegrationApi_time", "squid_apiControllerCall_count", "squid_apiControllerCall_time", "squid_built_in_db_size", "squid_codeInitialization_count", "squid_codeInitialization_time", "squid_deleteApiKey_count", "squid_deleteApiKey_time", "squid_deleteSecret_count", "squid_deleteSecret_time", "squid_discoverGraphQLConnectionSchema_count", "squid_discoverGraphQLConnectionSchema_time", "squid_discoverOpenApiSchema_count", "squid_discoverOpenApiSchema_time", "squid_discoverOpenApiSchemaFromFile_count", "squid_discoverOpenApiSchemaFromFile_time", "squid_executeBackendFunction_count", "squid_executeBackendFunction_time", "squid_getAiChatbotProfiles_count", "squid_getAiChatbotProfiles_time", "squid_getAllApiKeys_count", "squid_getAllApiKeys_time", "squid_getAllSecrets_count", "squid_getAllSecrets_time", "squid_getAppApiKey_count", "squid_getAppApiKey_time", "squid_getSecret_count", "squid_getSecret_time", "squid_graphql_count", "squid_graphql_time", "squid_graphqlQuery_count", "squid_graphqlQuery_time", "squid_integrationCount_value", "squid_acquireLock_count", "squid_releaseLock_count", "squid_mutate_count", "squid_mutate_time", "squid_metricQuery_count", "squid_metricQuery_time", "squid_metricReport_count", "squid_metricReport_time", "squid_nativeQuery_count", "squid_nativeQuery_time", "squid_openapi_count", "squid_openapi_time", "squid_produceTopicMessage_count", "squid_produceTopicMessage_time", "squid_query_count", "squid_query_time", "squid_registerQuery_count", "squid_registerQuery_time", "squid_rerankChunks_count", "squid_rerankChunks_time", "squid_schedulerJob_count", "squid_schedulerJob_time", "squid_schema_size", "squid_secrets_entries", "squid_storageDeleteFiles_count", "squid_storageDeleteFiles_time", "squid_storageGetDownloadUrl_count", "squid_storageGetDownloadUrl_time", "squid_storageGetFileMetadata_count", "squid_storageGetFileMetadata_time", "squid_storageListDirectoryContents_count", "squid_storageListDirectoryContents_time", "squid_storageUploadFile_count", "squid_storageUploadFile_time", "squid_subscribeToTopic_count", "squid_subscribeToTopic_time", "squid_testGraphQLConnection_count", "squid_testGraphQLConnection_time", "squid_trigger_count", "squid_trigger_time", "squid_upsertApiKey_count", "squid_upsertApiKey_time", "squid_upsertSecret_count", "squid_upsertSecret_time", "squid_vectorChunks_count", "squid_vectorChunks_time", "squid_webhook_count", "squid_webhook_time"];
|
|
7
|
-
export type MetricName = (typeof ALL_SQUID_METRIC_NAMES)[number];
|
|
8
|
-
/** Common prefix for all Squid metrics. */
|
|
9
|
-
export declare const SQUID_METRIC_NAME_PREFIX = "squid_";
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/** A type alias for a string that represents a webhook. */
|
|
2
|
-
export type WebhookId = string;
|
|
3
|
-
/** A type alias for a string that represents a trigger id. */
|
|
4
|
-
export type TriggerId = string;
|
|
5
|
-
/** A type alias for a string that represents a scheduler id. */
|
|
6
|
-
export type SchedulerId = string;
|
|
7
|
-
/** The supported cron expression string. */
|
|
8
|
-
export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
|
|
9
|
-
/** A set of predefined cron expressions. */
|
|
10
|
-
export declare enum CronExpression {
|
|
11
|
-
EVERY_SECOND = "* * * * * *",
|
|
12
|
-
EVERY_5_SECONDS = "*/5 * * * * *",
|
|
13
|
-
EVERY_10_SECONDS = "*/10 * * * * *",
|
|
14
|
-
EVERY_30_SECONDS = "*/30 * * * * *",
|
|
15
|
-
EVERY_MINUTE = "*/1 * * * *",
|
|
16
|
-
EVERY_5_MINUTES = "0 */5 * * * *",
|
|
17
|
-
EVERY_10_MINUTES = "0 */10 * * * *",
|
|
18
|
-
EVERY_30_MINUTES = "0 */30 * * * *",
|
|
19
|
-
EVERY_HOUR = "0 0-23/1 * * *",
|
|
20
|
-
EVERY_2_HOURS = "0 0-23/2 * * *",
|
|
21
|
-
EVERY_3_HOURS = "0 0-23/3 * * *",
|
|
22
|
-
EVERY_4_HOURS = "0 0-23/4 * * *",
|
|
23
|
-
EVERY_5_HOURS = "0 0-23/5 * * *",
|
|
24
|
-
EVERY_6_HOURS = "0 0-23/6 * * *",
|
|
25
|
-
EVERY_7_HOURS = "0 0-23/7 * * *",
|
|
26
|
-
EVERY_8_HOURS = "0 0-23/8 * * *",
|
|
27
|
-
EVERY_9_HOURS = "0 0-23/9 * * *",
|
|
28
|
-
EVERY_10_HOURS = "0 0-23/10 * * *",
|
|
29
|
-
EVERY_11_HOURS = "0 0-23/11 * * *",
|
|
30
|
-
EVERY_12_HOURS = "0 0-23/12 * * *",
|
|
31
|
-
EVERY_DAY_AT_1AM = "0 01 * * *",
|
|
32
|
-
EVERY_DAY_AT_2AM = "0 02 * * *",
|
|
33
|
-
EVERY_DAY_AT_3AM = "0 03 * * *",
|
|
34
|
-
EVERY_DAY_AT_4AM = "0 04 * * *",
|
|
35
|
-
EVERY_DAY_AT_5AM = "0 05 * * *",
|
|
36
|
-
EVERY_DAY_AT_6AM = "0 06 * * *",
|
|
37
|
-
EVERY_DAY_AT_7AM = "0 07 * * *",
|
|
38
|
-
EVERY_DAY_AT_8AM = "0 08 * * *",
|
|
39
|
-
EVERY_DAY_AT_9AM = "0 09 * * *",
|
|
40
|
-
EVERY_DAY_AT_10AM = "0 10 * * *",
|
|
41
|
-
EVERY_DAY_AT_11AM = "0 11 * * *",
|
|
42
|
-
EVERY_DAY_AT_NOON = "0 12 * * *",
|
|
43
|
-
EVERY_DAY_AT_1PM = "0 13 * * *",
|
|
44
|
-
EVERY_DAY_AT_2PM = "0 14 * * *",
|
|
45
|
-
EVERY_DAY_AT_3PM = "0 15 * * *",
|
|
46
|
-
EVERY_DAY_AT_4PM = "0 16 * * *",
|
|
47
|
-
EVERY_DAY_AT_5PM = "0 17 * * *",
|
|
48
|
-
EVERY_DAY_AT_6PM = "0 18 * * *",
|
|
49
|
-
EVERY_DAY_AT_7PM = "0 19 * * *",
|
|
50
|
-
EVERY_DAY_AT_8PM = "0 20 * * *",
|
|
51
|
-
EVERY_DAY_AT_9PM = "0 21 * * *",
|
|
52
|
-
EVERY_DAY_AT_10PM = "0 22 * * *",
|
|
53
|
-
EVERY_DAY_AT_11PM = "0 23 * * *",
|
|
54
|
-
EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
|
|
55
|
-
EVERY_WEEK = "0 0 * * 7",
|
|
56
|
-
EVERY_WEEKDAY = "0 0 * * 1-5",
|
|
57
|
-
EVERY_WEEKEND = "0 0 * * 6,7",
|
|
58
|
-
EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT = "0 0 1 * *",
|
|
59
|
-
EVERY_1ST_DAY_OF_MONTH_AT_NOON = "0 12 1 * *",
|
|
60
|
-
EVERY_2ND_HOUR = "0 */2 * * *",
|
|
61
|
-
EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM = "0 1-23/2 * * *",
|
|
62
|
-
EVERY_2ND_MONTH = "0 0 1 */2 *",
|
|
63
|
-
EVERY_QUARTER = "0 0 1 */3 *",
|
|
64
|
-
EVERY_6_MONTHS = "0 0 1 */6 *",
|
|
65
|
-
EVERY_YEAR = "0 0 1 1 *",
|
|
66
|
-
EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
|
|
67
|
-
EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
|
|
68
|
-
EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
|
|
69
|
-
MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
|
|
70
|
-
MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
|
|
71
|
-
MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
|
|
72
|
-
MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
|
|
73
|
-
MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
|
|
74
|
-
MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
|
|
75
|
-
MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
|
|
76
|
-
MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
|
|
77
|
-
MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
|
|
78
|
-
MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
|
|
79
|
-
MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
|
|
80
|
-
MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
|
|
81
|
-
MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
|
|
82
|
-
MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
|
|
83
|
-
MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
|
|
84
|
-
MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
|
|
85
|
-
MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
|
|
86
|
-
MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
|
|
87
|
-
MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
|
|
88
|
-
MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
|
|
89
|
-
MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
|
|
90
|
-
MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
|
|
91
|
-
MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
|
|
92
|
-
MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
|
|
93
|
-
MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
|
|
94
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { IntegrationType } from './integration.public-types';
|
|
2
|
-
/** The different types of actions that can be performed on a database. */
|
|
3
|
-
export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
4
|
-
/** The different types of actions that can be performed for storage. */
|
|
5
|
-
export type StorageActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
6
|
-
/** The different types of actions that can be performed on a topic. */
|
|
7
|
-
export type TopicActionType = 'read' | 'write' | 'all';
|
|
8
|
-
/** The different type of actions for metrics. */
|
|
9
|
-
export type MetricActionType = 'write' | 'all';
|
|
10
|
-
export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date';
|
|
11
|
-
export interface AiFunctionParam {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
type: AiFunctionParamType;
|
|
15
|
-
required: boolean;
|
|
16
|
-
}
|
|
17
|
-
/** Additional optional readonly metadata for AI function. */
|
|
18
|
-
export interface AiFunctionAttributes {
|
|
19
|
-
/**
|
|
20
|
-
* Type of integration this function is used for.
|
|
21
|
-
* Functions with defined 'integrationType' require 'integrationId' to be passed as part of the function context.
|
|
22
|
-
*/
|
|
23
|
-
integrationType?: Array<IntegrationType>;
|
|
24
|
-
}
|
|
25
|
-
export type TopicName = string;
|
|
26
|
-
export type FunctionName = string;
|
|
27
|
-
/** Function name with the contextual data. The data must be a serializable JSON. */
|
|
28
|
-
export interface FunctionNameWithContext {
|
|
29
|
-
name: FunctionName;
|
|
30
|
-
context: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export type ServiceName = string;
|
|
33
|
-
export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { SquidDocIdObj } from './document.public-types';
|
|
2
|
-
interface BaseMutation {
|
|
3
|
-
type: MutationType;
|
|
4
|
-
squidDocIdObj: SquidDocIdObj;
|
|
5
|
-
}
|
|
6
|
-
/** A mutation on a document. */
|
|
7
|
-
export type Mutation<T = any> = UpdateMutation<T> | InsertMutation<T> | DeleteMutation;
|
|
8
|
-
/** The mutation type. */
|
|
9
|
-
export declare const MUTATION_TYPES: readonly ["insert", "update", "delete"];
|
|
10
|
-
export type MutationType = (typeof MUTATION_TYPES)[number];
|
|
11
|
-
export interface DeleteMutation extends BaseMutation {
|
|
12
|
-
type: 'delete';
|
|
13
|
-
}
|
|
14
|
-
export interface UpdateMutation<T = any> extends BaseMutation {
|
|
15
|
-
type: 'update';
|
|
16
|
-
/** The updated properties */
|
|
17
|
-
properties: {
|
|
18
|
-
[key in keyof T & string]?: Array<PropertyMutation<T[key]>>;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface InsertMutation<T = any> extends BaseMutation {
|
|
22
|
-
type: 'insert';
|
|
23
|
-
/** The inserted document */
|
|
24
|
-
properties: T;
|
|
25
|
-
}
|
|
26
|
-
/** A representation of a single property update */
|
|
27
|
-
export type PropertyMutation<Value = any> = ApplyNumericFnPropertyMutation | ApplyStringFnPropertyMutation | ValueUpdatePropertyMutation<Value> | RemovePropertyMutation;
|
|
28
|
-
/** A value update property mutation */
|
|
29
|
-
export interface ValueUpdatePropertyMutation<Value = any> {
|
|
30
|
-
type: 'update';
|
|
31
|
-
value: Value;
|
|
32
|
-
}
|
|
33
|
-
/** Applying a numeric function to a property */
|
|
34
|
-
export interface ApplyNumericFnPropertyMutation {
|
|
35
|
-
type: 'applyNumericFn';
|
|
36
|
-
fn: 'increment';
|
|
37
|
-
value: number;
|
|
38
|
-
}
|
|
39
|
-
/** A property update that removes a property from a document */
|
|
40
|
-
export interface RemovePropertyMutation {
|
|
41
|
-
type: 'removeProperty';
|
|
42
|
-
}
|
|
43
|
-
interface ApplyExtendString {
|
|
44
|
-
type: 'applyStringFn';
|
|
45
|
-
fn: 'extendString';
|
|
46
|
-
value: string;
|
|
47
|
-
}
|
|
48
|
-
interface ApplyTrimString {
|
|
49
|
-
type: 'applyStringFn';
|
|
50
|
-
fn: 'trim';
|
|
51
|
-
}
|
|
52
|
-
/** A property mutation that modifies a string */
|
|
53
|
-
export type ApplyStringFnPropertyMutation = ApplyExtendString | ApplyTrimString;
|
|
54
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IntegrationId } from './communication.public-types';
|
|
2
|
-
import { StorageActionType } from './bundle-data.public-types';
|
|
3
|
-
export type StorageFunctionality = 'fileUpload' | 'getFileMetadata' | 'getDownloadUrl' | 'deleteFiles' | 'listDirectoryContents';
|
|
4
|
-
export interface StorageContext {
|
|
5
|
-
integrationId: IntegrationId;
|
|
6
|
-
pathsInBucket: Array<string>;
|
|
7
|
-
action: StorageActionType;
|
|
8
|
-
functionality: StorageFunctionality;
|
|
9
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ApiEndpointId, HttpMethod } from '../public-types/integrations/api.public-types';
|
|
2
|
-
import { IntegrationId } from '../public-types/communication.public-types';
|
|
3
|
-
import { ApiOptions } from '../public-types/api-client.public-types';
|
|
4
|
-
/** The headers of an API call. */
|
|
5
|
-
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
6
|
-
/** The context of an API call. */
|
|
7
|
-
export declare class ApiCallContext {
|
|
8
|
-
readonly integrationId: IntegrationId;
|
|
9
|
-
readonly endpointId: ApiEndpointId;
|
|
10
|
-
readonly url: string;
|
|
11
|
-
readonly method: HttpMethod;
|
|
12
|
-
readonly body: unknown;
|
|
13
|
-
readonly options: ApiOptions;
|
|
14
|
-
}
|
|
15
|
-
export interface CallApiRequest<BodyType = any> {
|
|
16
|
-
integrationId: IntegrationId;
|
|
17
|
-
endpointId: ApiEndpointId;
|
|
18
|
-
body?: BodyType;
|
|
19
|
-
overrideMethod?: HttpMethod;
|
|
20
|
-
options: ApiOptions;
|
|
21
|
-
}
|