@squidcloud/client 1.0.203 → 1.0.204
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 +3 -3
- package/dist/internal-common/src/public-types/integrations/ai_chatbot.public-types.d.ts +0 -15
- package/dist/internal-common/src/public-types/integrations/api.public-types.d.ts +16 -0
- package/dist/internal-common/src/public-types-backend/ai-chatbot.public-context.d.ts +27 -0
- package/dist/internal-common/src/{public-types → public-types-backend}/api-call.public-context.d.ts +2 -18
- package/dist/internal-common/src/{public-types → public-types-backend}/bundle-api.public-types.d.ts +6 -14
- package/dist/internal-common/src/{public-types → public-types-backend}/mutation.public-context.d.ts +3 -3
- package/dist/internal-common/src/{public-types → public-types-backend}/native-query.public-context.d.ts +1 -1
- package/dist/internal-common/src/{public-types → public-types-backend}/query.public-context.d.ts +12 -12
- package/dist/internal-common/src/{public-types → public-types-backend}/topic.public-context.d.ts +1 -1
- package/dist/typescript-client/src/ai-chatbot-client.d.ts +6 -3
- package/dist/typescript-client/src/api-client.d.ts +1 -1
- package/dist/typescript-client/src/index.d.ts +1 -0
- package/dist/typescript-client/src/public-types-deprecated.d.ts +103 -0
- package/dist/typescript-client/src/public-types.d.ts +1 -10
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +2 -2
- package/package.json +1 -1
- package/dist/internal-common/src/public-types/ai-chatbot.public-context.d.ts +0 -14
- /package/dist/internal-common/src/{public-types → public-types-backend}/distributed-lock.public-context.d.ts +0 -0
- /package/dist/internal-common/src/{public-types → public-types-backend}/graphql.public-context.d.ts +0 -0
|
@@ -14,18 +14,3 @@ export type AiChatbotContextMetadata = {
|
|
|
14
14
|
preview: boolean;
|
|
15
15
|
sizeBytes?: number;
|
|
16
16
|
};
|
|
17
|
-
export type AiChatbotContextType = 'text' | 'url' | 'file';
|
|
18
|
-
interface AiChatbotContextBase {
|
|
19
|
-
type: AiChatbotContextType;
|
|
20
|
-
data: string;
|
|
21
|
-
}
|
|
22
|
-
export interface AiChatbotTextContext extends AiChatbotContextBase {
|
|
23
|
-
type: 'text';
|
|
24
|
-
}
|
|
25
|
-
export interface AiChatbotUrlContext extends AiChatbotContextBase {
|
|
26
|
-
type: 'url';
|
|
27
|
-
}
|
|
28
|
-
export interface AiChatbotFileContext extends AiChatbotContextBase {
|
|
29
|
-
type: 'file';
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
@@ -10,6 +10,22 @@ export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
|
10
10
|
export interface ApiRequestField {
|
|
11
11
|
location: ApiParameterLocation;
|
|
12
12
|
}
|
|
13
|
+
/** The options for calling an API. */
|
|
14
|
+
export interface CallApiOptions {
|
|
15
|
+
/** If true, the response will be returned as-is without any processing. */
|
|
16
|
+
nativeResponse?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* An optional string to override the default origin of the API (e.g. https://host:port). Useful for
|
|
19
|
+
* scenarios such as testing, development, or accessing the API from different environments.
|
|
20
|
+
*/
|
|
21
|
+
originOverride?: string;
|
|
22
|
+
}
|
|
23
|
+
/** A native API call response. */
|
|
24
|
+
export interface NativeApiCallResponse<BodyType = unknown> {
|
|
25
|
+
body: BodyType;
|
|
26
|
+
headers: Record<string, string>;
|
|
27
|
+
status: number;
|
|
28
|
+
}
|
|
13
29
|
export interface ApiResponseField {
|
|
14
30
|
location: ApiResponseParameterLocation;
|
|
15
31
|
path?: FieldPath;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AiChatbotMutationType, AiChatbotResourceType } from '../public-types/ai-chatbot.public-types';
|
|
2
|
+
export type AiChatbotContextType = 'text' | 'url' | 'file';
|
|
3
|
+
export interface AiChatbotContextBase {
|
|
4
|
+
type: AiChatbotContextType;
|
|
5
|
+
data: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AiChatbotTextContext extends AiChatbotContextBase {
|
|
8
|
+
type: 'text';
|
|
9
|
+
}
|
|
10
|
+
export interface AiChatbotUrlContext extends AiChatbotContextBase {
|
|
11
|
+
type: 'url';
|
|
12
|
+
}
|
|
13
|
+
export interface AiChatbotFileContext extends AiChatbotContextBase {
|
|
14
|
+
type: 'file';
|
|
15
|
+
}
|
|
16
|
+
export declare class AiChatbotChatContext {
|
|
17
|
+
readonly prompt: string;
|
|
18
|
+
readonly profileId: string;
|
|
19
|
+
}
|
|
20
|
+
/** A context provided to the security rules of an AI Chatbot mutation. */
|
|
21
|
+
export declare class AiChatbotMutationContext {
|
|
22
|
+
readonly type: AiChatbotMutationType;
|
|
23
|
+
readonly resource: AiChatbotResourceType;
|
|
24
|
+
readonly profileId: string;
|
|
25
|
+
readonly payload: any;
|
|
26
|
+
}
|
|
27
|
+
export type AiChatbotContext = AiChatbotTextContext | AiChatbotUrlContext | AiChatbotFileContext;
|
package/dist/internal-common/src/{public-types → public-types-backend}/api-call.public-context.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiEndpointId, HttpMethod } from '
|
|
2
|
-
import { IntegrationId } from '
|
|
1
|
+
import { ApiEndpointId, HttpMethod } from '../public-types/integrations/api.public-types';
|
|
2
|
+
import { IntegrationId } from '../public-types/communication.public-types';
|
|
3
3
|
/** The headers of an API call. */
|
|
4
4
|
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
5
5
|
/** The context of an API call. */
|
|
@@ -16,16 +16,6 @@ export interface ApiOptions {
|
|
|
16
16
|
queryParams?: Record<string, string | number | boolean>;
|
|
17
17
|
pathParams?: Record<string, string | number | boolean>;
|
|
18
18
|
}
|
|
19
|
-
/** The options for calling an API. */
|
|
20
|
-
export interface CallApiOptions {
|
|
21
|
-
/** If true, the response will be returned as-is without any processing. */
|
|
22
|
-
nativeResponse?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* An optional string to override the default origin of the API (e.g. https://host:port). Useful for
|
|
25
|
-
* scenarios such as testing, development, or accessing the API from different environments.
|
|
26
|
-
*/
|
|
27
|
-
originOverride?: string;
|
|
28
|
-
}
|
|
29
19
|
export interface CallApiRequest<BodyType = any> {
|
|
30
20
|
integrationId: IntegrationId;
|
|
31
21
|
endpointId: ApiEndpointId;
|
|
@@ -33,9 +23,3 @@ export interface CallApiRequest<BodyType = any> {
|
|
|
33
23
|
overrideMethod?: HttpMethod;
|
|
34
24
|
options: ApiOptions;
|
|
35
25
|
}
|
|
36
|
-
/** A native API call response. */
|
|
37
|
-
export interface NativeApiCallResponse<T = unknown> {
|
|
38
|
-
body: T;
|
|
39
|
-
headers: Record<string, string>;
|
|
40
|
-
status: number;
|
|
41
|
-
}
|
package/dist/internal-common/src/{public-types → public-types-backend}/bundle-api.public-types.d.ts
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { MutationContext } from './mutation.public-context';
|
|
2
2
|
import { ApiCallContext } from './api-call.public-context';
|
|
3
3
|
import { QueryContext } from './query.public-context';
|
|
4
|
-
import { AiChatbotActionType, DatabaseActionType, StorageActionType, TopicActionType } from '
|
|
5
|
-
import { ClientConnectionState } from '
|
|
6
|
-
import { DocumentData } from '
|
|
7
|
-
import { MutationType } from '
|
|
8
|
-
import { ClientId, SquidDocId } from '
|
|
4
|
+
import { AiChatbotActionType, DatabaseActionType, StorageActionType, TopicActionType } from '../public-types/bundle-data.public-types';
|
|
5
|
+
import { ClientConnectionState } from '../public-types/socket.public-types';
|
|
6
|
+
import { DocumentData } from '../public-types/document.public-types';
|
|
7
|
+
import { MutationType } from '../public-types/mutation.public-types';
|
|
8
|
+
import { ClientId, SquidDocId } from '../public-types/communication.public-types';
|
|
9
9
|
import { TopicReadContext, TopicWriteContext } from './topic.public-context';
|
|
10
10
|
import { NativeQueryContext } from './native-query.public-context';
|
|
11
11
|
import { DistributedLockContext } from './distributed-lock.public-context';
|
|
12
12
|
import { GraphqlContext } from './graphql.public-context';
|
|
13
13
|
import { AiChatbotChatContext, AiChatbotMutationContext } from './ai-chatbot.public-context';
|
|
14
|
-
import { StorageContext } from '
|
|
14
|
+
import { StorageContext } from '../public-types/storage.types';
|
|
15
15
|
export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
16
16
|
export type SecureStorageAction<T extends StorageActionType> = T extends 'all' ? () => boolean | Promise<boolean> : (context: StorageContext) => boolean | Promise<boolean>;
|
|
17
17
|
export type SecureTopicAction<T extends TopicActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: TopicReadContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: TopicWriteContext<T>) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
@@ -74,14 +74,6 @@ export type LimiterConfig = {
|
|
|
74
74
|
rateLimit?: number | RateLimitOptions | Array<RateLimitOptions>;
|
|
75
75
|
quotaLimit?: number | QuotaLimitOptions | Array<QuotaLimitOptions>;
|
|
76
76
|
};
|
|
77
|
-
/**
|
|
78
|
-
* Convert LimiterConfig to LimiterOptions.
|
|
79
|
-
*
|
|
80
|
-
* This decouples the required syntax for the developer from the internal implementation.
|
|
81
|
-
*
|
|
82
|
-
* @param config LimiterConfig to convert.
|
|
83
|
-
*/
|
|
84
|
-
export declare function limiterConfigToOptions(config: LimiterConfig): LimiterOptions;
|
|
85
77
|
export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
|
|
86
78
|
/** The context provided to a webhook function. */
|
|
87
79
|
export interface WebhookRequest<T = any> {
|
package/dist/internal-common/src/{public-types → public-types-backend}/mutation.public-context.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Paths } from '
|
|
2
|
-
import { BeforeAndAfterDocs } from '
|
|
3
|
-
import { Mutation, MutationType } from '
|
|
1
|
+
import { Paths } from '../public-types/typescript.public-types';
|
|
2
|
+
import { BeforeAndAfterDocs } from '../public-types/document.public-types';
|
|
3
|
+
import { Mutation, MutationType } from '../public-types/mutation.public-types';
|
|
4
4
|
/** The mutation context that will be provided to the security function. */
|
|
5
5
|
export declare class MutationContext<T = any> {
|
|
6
6
|
readonly mutation: Mutation<T>;
|
package/dist/internal-common/src/{public-types → public-types-backend}/query.public-context.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FieldSort, Operator, Query, SimpleCondition } from '
|
|
2
|
-
import { DeepRecord, FieldOf, PartialBy, Paths } from '
|
|
3
|
-
import { CollectionName, DocumentData } from '
|
|
4
|
-
import { IntegrationId } from '
|
|
1
|
+
import { FieldSort, Operator, Query, SimpleCondition } from '../public-types/query.public-types';
|
|
2
|
+
import { DeepRecord, FieldOf, PartialBy, Paths } from '../public-types/typescript.public-types';
|
|
3
|
+
import { CollectionName, DocumentData } from '../public-types/document.public-types';
|
|
4
|
+
import { IntegrationId } from '../public-types/communication.public-types';
|
|
5
5
|
export declare class QueryContext<T extends DocumentData = any> {
|
|
6
6
|
readonly query: Query<T>;
|
|
7
7
|
private readonly parsedConditions;
|
|
@@ -110,28 +110,28 @@ export declare class QueryContext<T extends DocumentData = any> {
|
|
|
110
110
|
/** A list of context conditions */
|
|
111
111
|
export type ContextConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<ContextCondition<Doc, F>>;
|
|
112
112
|
/** A Context condition - a condition that replaces multiple '==' or '!=' conditions with 'in' and 'not in'. */
|
|
113
|
-
type ContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = InContextCondition<Doc, F> | NotInContextCondition<Doc, F> | OtherContextCondition<Doc, F>;
|
|
114
|
-
interface InContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'in'> {
|
|
113
|
+
export type ContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = InContextCondition<Doc, F> | NotInContextCondition<Doc, F> | OtherContextCondition<Doc, F>;
|
|
114
|
+
export interface InContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'in'> {
|
|
115
115
|
operator: 'in';
|
|
116
116
|
value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
|
|
117
117
|
}
|
|
118
|
-
interface NotInContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'not in'> {
|
|
118
|
+
export interface NotInContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'not in'> {
|
|
119
119
|
operator: 'not in';
|
|
120
120
|
value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
|
|
121
121
|
}
|
|
122
|
-
interface OtherContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, Exclude<ContextOperator, 'in' | 'not in'>> {
|
|
122
|
+
export interface OtherContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, Exclude<ContextOperator, 'in' | 'not in'>> {
|
|
123
123
|
operator: Exclude<ContextOperator, 'in' | 'not in'>;
|
|
124
124
|
value: FieldOf<DeepRecord<Doc>, Paths<Doc>> | any;
|
|
125
125
|
}
|
|
126
126
|
/** A condition that includes the 'in' and 'not in' operators. */
|
|
127
|
-
interface GeneralCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, AllOperators> {
|
|
127
|
+
export interface GeneralCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, AllOperators> {
|
|
128
128
|
operator: AllOperators;
|
|
129
129
|
value: any;
|
|
130
130
|
}
|
|
131
131
|
/** A list of general conditions. */
|
|
132
|
-
type GeneralConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<GeneralCondition<Doc, F>>;
|
|
133
|
-
type ContextOperator = Exclude<Operator, '==' | '!='> | 'in' | 'not in';
|
|
132
|
+
export type GeneralConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<GeneralCondition<Doc, F>>;
|
|
133
|
+
export type ContextOperator = Exclude<Operator, '==' | '!='> | 'in' | 'not in';
|
|
134
134
|
type AllOperators = Operator | 'in' | 'not in';
|
|
135
135
|
/** A generic value that can exist in a query. */
|
|
136
|
-
type GenericValue<Doc = any, F extends Paths<Doc> = Paths<Doc>, O extends AllOperators = any> = O extends 'in' ? Array<DeepRecord<Doc>[F]> | null : O extends 'not in' ? Array<DeepRecord<Doc>[F]> | null : DeepRecord<Doc>[F] | null;
|
|
136
|
+
export type GenericValue<Doc = any, F extends Paths<Doc> = Paths<Doc>, O extends AllOperators = any> = O extends 'in' ? Array<DeepRecord<Doc>[F]> | null : O extends 'not in' ? Array<DeepRecord<Doc>[F]> | null : DeepRecord<Doc>[F] | null;
|
|
137
137
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AiChatbotChatOptions,
|
|
1
|
+
import { AiChatbotChatOptions, AiModelName } from './public-types';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { AiChatbotContext } from '../../internal-common/src/public-types-backend/ai-chatbot.public-context';
|
|
3
4
|
export declare class AiChatbotClient {
|
|
4
5
|
private readonly rpcManager;
|
|
5
6
|
private readonly socketManager;
|
|
@@ -73,7 +74,8 @@ export declare class AiChatbotProfileReference {
|
|
|
73
74
|
* Adds a new profile to the chatbot. This will result in an error if a profile already exists with the same id.
|
|
74
75
|
*
|
|
75
76
|
* @param data An object containing options for creating the profile.
|
|
76
|
-
* @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-opus-20240229`,
|
|
77
|
+
* @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-opus-20240229`,
|
|
78
|
+
* `claude-3-sonnet-20240229` or `claude-3-haiku-20240307`).
|
|
77
79
|
* @param data.isPublic - Whether the chat functionality of the profile can be accessed without security rules.
|
|
78
80
|
* @returns A promise that resolves when the profile is successfully created.
|
|
79
81
|
*/
|
|
@@ -83,7 +85,8 @@ export declare class AiChatbotProfileReference {
|
|
|
83
85
|
* current profile id.
|
|
84
86
|
*
|
|
85
87
|
* @param data An object containing options for updating the profile.
|
|
86
|
-
* @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-opus-20240229`,
|
|
88
|
+
* @param data.modelName - The name of the OpenAI model (`gpt-3.5, `gpt-4`, `claude-3-opus-20240229`,
|
|
89
|
+
* `claude-3-sonnet-20240229` or `claude-3-haiku-20240307`).
|
|
87
90
|
* @param data.isPublic - Whether the chat functionality of the profile can be accessed without security rules.
|
|
88
91
|
* @returns A promise that resolves when the profile is successfully updated.
|
|
89
92
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntegrationId } from '../../internal-common/src/public-types/communication.public-types';
|
|
2
2
|
import { ApiEndpointId, HttpMethod } from '../../internal-common/src/public-types/integrations/api.public-types';
|
|
3
|
-
import { ApiOptions } from '../../internal-common/src/public-types/api-call.public-context';
|
|
3
|
+
import { ApiOptions } from '../../internal-common/src/public-types-backend/api-call.public-context';
|
|
4
4
|
import { HttpResponse } from './squid-http-client';
|
|
5
5
|
export declare class ApiClient {
|
|
6
6
|
private readonly rpcManager;
|
|
@@ -23,6 +23,7 @@ export * from './graphql-client';
|
|
|
23
23
|
export * from './mutation/mutation-sender';
|
|
24
24
|
export * from './native-query-manager';
|
|
25
25
|
export * from './public-types';
|
|
26
|
+
export * from './public-types-deprecated';
|
|
26
27
|
export * from './public-utils';
|
|
27
28
|
export * from './query/deserializer';
|
|
28
29
|
export * from './query/join-query-builder.factory';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { MutationContext as MutationContextDeprecated } from '../../internal-common/src/public-types-backend/mutation.public-context';
|
|
2
|
+
import { AiChatbotChatContext as AiChatbotChatContextDeprecated, AiChatbotContext as AiChatbotContextDeprecated, AiChatbotContextBase as AiChatbotContextBaseDeprecated, AiChatbotContextType as AiChatbotContextTypeDeprecated, AiChatbotFileContext as AiChatbotFileContextDeprecated, AiChatbotMutationContext as AiChatbotMutationContextDeprecated, AiChatbotTextContext as AiChatbotTextContextDeprecated, AiChatbotUrlContext as AiChatbotUrlContextDeprecated } from '../../internal-common/src/public-types-backend/ai-chatbot.public-context';
|
|
3
|
+
import { ApiCallContext as ApiCallContextDeprecated, ApiHeaders as ApiHeadersDeprecated, ApiOptions as ApiOptionsDeprecated, CallApiRequest as CallApiRequestDeprecated } from '../../internal-common/src/public-types-backend/api-call.public-context';
|
|
4
|
+
import { DistributedLockContext as DistributedLockContextDeprecated } from '../../internal-common/src/public-types-backend/distributed-lock.public-context';
|
|
5
|
+
import { GraphqlContext as GraphqlContextDeprecated } from '../../internal-common/src/public-types-backend/graphql.public-context';
|
|
6
|
+
import { NativeQueryContext as NativeQueryContextDeprecated } from '../../internal-common/src/public-types-backend/native-query.public-context';
|
|
7
|
+
import { ContextConditions as ContextConditionsDeprecated, QueryContext as QueryContextDeprecated } from '../../internal-common/src/public-types-backend/query.public-context';
|
|
8
|
+
import { TopicReadContext as TopicReadContextDeprecated, TopicWriteContext as TopicWriteContextDeprecated } from '../../internal-common/src/public-types-backend/topic.public-context';
|
|
9
|
+
import { DocumentData } from '../../internal-common/src/public-types/document.public-types';
|
|
10
|
+
import { Paths } from '../../internal-common/src/public-types/typescript.public-types';
|
|
11
|
+
import { ActionMethodDecorator as ActionMethodDecoratorDeprecated, AiFunctionAction as AiFunctionActionDeprecated, ClientConnectionStateChangeAction as ClientConnectionStateChangeActionDeprecated, ExecutableAction as ExecutableActionDeprecated, LimitedAction as LimitedActionDeprecated, LimiterConfig as LimiterConfigDeprecated, LimiterOptions as LimiterOptionsDeprecated, LimiterScope as LimiterScopeDeprecated, QuotaLimitOptions as QuotaLimitOptionsDeprecated, QuotaRenewPeriod as QuotaRenewPeriodDeprecated, RateLimitOptions as RateLimitOptionsDeprecated, SchedulerAction as SchedulerActionDeprecated, SecureAiChatbotAction as SecureAiChatbotActionDeprecated, SecureApiAction as SecureApiActionDeprecated, SecureDatabaseAction as SecureDatabaseActionDeprecated, SecureDistributedLockAction as SecureDistributedLockActionDeprecated, SecureGraphQLAction as SecureGraphQLActionDeprecated, SecureNativeQueryAction as SecureNativeQueryActionDeprecated, SecureStorageAction as SecureStorageActionDeprecated, SecureTopicAction as SecureTopicActionDeprecated, SquidFile as SquidFileDeprecated, TriggerAction as TriggerActionDeprecated, TriggerRequest as TriggerRequestDeprecated, WebhookAction as WebhookActionDeprecated, WebhookRequest as WebhookRequestDeprecated, WebhookResponse as WebhookResponseDeprecated } from '../../internal-common/src/public-types-backend/bundle-api.public-types';
|
|
12
|
+
import { AiChatbotActionType, DatabaseActionType, StorageActionType, TopicActionType } from '../../internal-common/src/public-types/bundle-data.public-types';
|
|
13
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
14
|
+
export type MutationContext<T = any> = MutationContextDeprecated<T>;
|
|
15
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
16
|
+
export type AiChatbotContextType = AiChatbotContextTypeDeprecated;
|
|
17
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
18
|
+
export type AiChatbotContextBase = AiChatbotContextBaseDeprecated;
|
|
19
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
20
|
+
export type AiChatbotTextContext = AiChatbotTextContextDeprecated;
|
|
21
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
22
|
+
export type AiChatbotUrlContext = AiChatbotUrlContextDeprecated;
|
|
23
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
24
|
+
export type AiChatbotFileContext = AiChatbotFileContextDeprecated;
|
|
25
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
26
|
+
export type AiChatbotChatContext = AiChatbotChatContextDeprecated;
|
|
27
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
28
|
+
export type AiChatbotMutationContext = AiChatbotMutationContextDeprecated;
|
|
29
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
30
|
+
export type AiChatbotContext = AiChatbotContextDeprecated;
|
|
31
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
32
|
+
export type ApiHeaders = ApiHeadersDeprecated;
|
|
33
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
34
|
+
export type ApiCallContext = ApiCallContextDeprecated;
|
|
35
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
36
|
+
export type ApiOptions = ApiOptionsDeprecated;
|
|
37
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
38
|
+
export type CallApiRequest<BodyType = any> = CallApiRequestDeprecated<BodyType>;
|
|
39
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
40
|
+
export type DistributedLockContext = DistributedLockContextDeprecated;
|
|
41
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
42
|
+
export type GraphqlContext = GraphqlContextDeprecated;
|
|
43
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
44
|
+
export type NativeQueryContext = NativeQueryContextDeprecated;
|
|
45
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
46
|
+
export type QueryContext<T extends DocumentData = any> = QueryContextDeprecated<T>;
|
|
47
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
48
|
+
export type ContextConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = ContextConditionsDeprecated<Doc, F>;
|
|
49
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
50
|
+
export type TopicReadContext = TopicReadContextDeprecated;
|
|
51
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
52
|
+
export type TopicWriteContext<T> = TopicWriteContextDeprecated<T>;
|
|
53
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
54
|
+
export type SecureDatabaseAction<T extends DatabaseActionType> = SecureDatabaseActionDeprecated<T>;
|
|
55
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
56
|
+
export type SecureStorageAction<T extends StorageActionType> = SecureStorageActionDeprecated<T>;
|
|
57
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
58
|
+
export type SecureTopicAction<T extends TopicActionType> = SecureTopicActionDeprecated<T>;
|
|
59
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
60
|
+
export type SecureApiAction = SecureApiActionDeprecated;
|
|
61
|
+
export type SecureDistributedLockAction = SecureDistributedLockActionDeprecated;
|
|
62
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
63
|
+
export type SecureGraphQLAction = SecureGraphQLActionDeprecated;
|
|
64
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
65
|
+
export type SecureNativeQueryAction = SecureNativeQueryActionDeprecated;
|
|
66
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
67
|
+
export type SecureAiChatbotAction<T extends AiChatbotActionType> = SecureAiChatbotActionDeprecated<T>;
|
|
68
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
69
|
+
export type ClientConnectionStateChangeAction = ClientConnectionStateChangeActionDeprecated;
|
|
70
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
71
|
+
export type ExecutableAction = ExecutableActionDeprecated;
|
|
72
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
73
|
+
export type AiFunctionAction<T extends Record<string, any> = any> = AiFunctionActionDeprecated<T>;
|
|
74
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
75
|
+
export type TriggerAction = TriggerActionDeprecated;
|
|
76
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
77
|
+
export type TriggerRequest<T extends DocumentData = any> = TriggerRequestDeprecated<T>;
|
|
78
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
79
|
+
export type SchedulerAction = SchedulerActionDeprecated;
|
|
80
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
81
|
+
export type LimitedAction = LimitedActionDeprecated;
|
|
82
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
83
|
+
export type LimiterScope = LimiterScopeDeprecated;
|
|
84
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
85
|
+
export type QuotaRenewPeriod = QuotaRenewPeriodDeprecated;
|
|
86
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
87
|
+
export type RateLimitOptions = RateLimitOptionsDeprecated;
|
|
88
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
89
|
+
export type QuotaLimitOptions = QuotaLimitOptionsDeprecated;
|
|
90
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
91
|
+
export type LimiterOptions = LimiterOptionsDeprecated;
|
|
92
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
93
|
+
export type LimiterConfig = LimiterConfigDeprecated;
|
|
94
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
95
|
+
export type WebhookAction = WebhookActionDeprecated;
|
|
96
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
97
|
+
export type WebhookRequest<T = any> = WebhookRequestDeprecated<T>;
|
|
98
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
99
|
+
export type WebhookResponse = WebhookResponseDeprecated;
|
|
100
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
101
|
+
export type SquidFile = SquidFileDeprecated;
|
|
102
|
+
/** @deprecated. Use import from @squidcloud/backend. */
|
|
103
|
+
export type ActionMethodDecorator<U> = ActionMethodDecoratorDeprecated<U>;
|
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
export * from '../../internal-common/src/public-types/ai-assistant.public-types';
|
|
2
|
-
export * from '../../internal-common/src/public-types/ai-chatbot.public-context';
|
|
3
2
|
export * from '../../internal-common/src/public-types/ai-chatbot.public-types';
|
|
4
|
-
export * from '../../internal-common/src/public-types/api-call.public-context';
|
|
5
3
|
export * from '../../internal-common/src/public-types/application.public-types';
|
|
6
|
-
export * from '../../internal-common/src/public-types/bundle-api.public-types';
|
|
7
4
|
export * from '../../internal-common/src/public-types/bundle-data.public-types';
|
|
8
5
|
export * from '../../internal-common/src/public-types/communication.public-types';
|
|
9
6
|
export * from '../../internal-common/src/public-types/context.public-types';
|
|
10
|
-
export * from '../../internal-common/src/public-types/distributed-lock.public-context';
|
|
11
7
|
export * from '../../internal-common/src/public-types/document.public-types';
|
|
12
|
-
export * from '../../internal-common/src/public-types/graphql.public-context';
|
|
13
8
|
export * from '../../internal-common/src/public-types/graphql.public-types';
|
|
14
9
|
export * from '../../internal-common/src/public-types/http-status.enum';
|
|
15
10
|
export * from '../../internal-common/src/public-types/integration.public-types';
|
|
16
11
|
export * from '../../internal-common/src/public-types/integrations/ai_chatbot.public-types';
|
|
17
12
|
export * from '../../internal-common/src/public-types/integrations/api.public-types';
|
|
18
|
-
export * from '../../internal-common/src/public-types/mutation.public-context';
|
|
19
13
|
export * from '../../internal-common/src/public-types/mutation.public-types';
|
|
20
|
-
export * from '../../internal-common/src/public-types/native-query.public-context';
|
|
21
14
|
export * from '../../internal-common/src/public-types/native-query.public-types';
|
|
22
15
|
export * from '../../internal-common/src/public-types/openapi.public-types';
|
|
23
|
-
export * from '../../internal-common/src/public-types/query.public-context';
|
|
24
16
|
export * from '../../internal-common/src/public-types/query.public-types';
|
|
25
17
|
export * from '../../internal-common/src/public-types/regions.public-types';
|
|
26
18
|
export * from '../../internal-common/src/public-types/schema.public-types';
|
|
27
19
|
export * from '../../internal-common/src/public-types/secret.public-types';
|
|
28
20
|
export * from '../../internal-common/src/public-types/serialized-query.public-types';
|
|
29
21
|
export * from '../../internal-common/src/public-types/socket.public-types';
|
|
30
|
-
export * from '../../internal-common/src/public-types/topic.public-context';
|
|
31
|
-
export * from '../../internal-common/src/public-types/typescript.public-types';
|
|
32
22
|
export * from '../../internal-common/src/public-types/storage.types';
|
|
23
|
+
export * from '../../internal-common/src/public-types/typescript.public-types';
|
|
@@ -93,13 +93,13 @@ export declare class JoinQueryBuilder<Aliases extends Record<Alias, Alias[]>, Re
|
|
|
93
93
|
}, options: {
|
|
94
94
|
leftAlias: LeftAlias;
|
|
95
95
|
isInner?: IsInner;
|
|
96
|
-
}): JoinQueryBuilder<Omit<Aliases, LeftAlias> & Record<LeftAlias, [...Aliases[LeftAlias], NewAlias]> & Record<NewAlias, []>, ReturnType & (IsInner extends true ? Record<NewAlias, NewReturnType> : Partial<Record<NewAlias, NewReturnType>>), NewAlias, RootAlias>;
|
|
96
|
+
}): Omit<JoinQueryBuilder<Omit<Aliases, LeftAlias> & Record<LeftAlias, [...Aliases[LeftAlias], NewAlias]> & Record<NewAlias, []>, ReturnType & (IsInner extends true ? Record<NewAlias, NewReturnType> : Partial<Record<NewAlias, NewReturnType>>), NewAlias, RootAlias>, 'limit' | 'getLimit'>;
|
|
97
97
|
join<NewAlias extends string, NewReturnType extends DocumentData, IsInner extends boolean = false>(queryBuilder: QueryBuilder<NewReturnType>, alias: Exclude<NewAlias, keyof ReturnType>, joinFields: {
|
|
98
98
|
left: keyof Required<ReturnType>[LatestAlias] & FieldName;
|
|
99
99
|
right: keyof NewReturnType & FieldName;
|
|
100
100
|
}, options?: {
|
|
101
101
|
isInner?: IsInner;
|
|
102
|
-
}): JoinQueryBuilder<Omit<Aliases, LatestAlias> & Record<LatestAlias, [...Aliases[LatestAlias], NewAlias]> & Record<NewAlias, []>, ReturnType & (IsInner extends true ? Record<NewAlias, NewReturnType> : Partial<Record<NewAlias, NewReturnType>>), NewAlias, RootAlias>;
|
|
102
|
+
}): Omit<JoinQueryBuilder<Omit<Aliases, LatestAlias> & Record<LatestAlias, [...Aliases[LatestAlias], NewAlias]> & Record<NewAlias, []>, ReturnType & (IsInner extends true ? Record<NewAlias, NewReturnType> : Partial<Record<NewAlias, NewReturnType>>), NewAlias, RootAlias>, 'limit' | 'getLimit'>;
|
|
103
103
|
/** @inheritDoc */
|
|
104
104
|
snapshot(): Promise<Array<WithDocumentReferences<ReturnType>>>;
|
|
105
105
|
/** @inheritDoc */
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AiChatbotMutationType, AiChatbotResourceType } from './ai-chatbot.public-types';
|
|
2
|
-
import { AiChatbotFileContext, AiChatbotTextContext, AiChatbotUrlContext } from './integrations/ai_chatbot.public-types';
|
|
3
|
-
export declare class AiChatbotChatContext {
|
|
4
|
-
readonly prompt: string;
|
|
5
|
-
readonly profileId: string;
|
|
6
|
-
}
|
|
7
|
-
/** A context provided to the security rules of an AI Chatbot mutation. */
|
|
8
|
-
export declare class AiChatbotMutationContext {
|
|
9
|
-
readonly type: AiChatbotMutationType;
|
|
10
|
-
readonly resource: AiChatbotResourceType;
|
|
11
|
-
readonly profileId: string;
|
|
12
|
-
readonly payload: any;
|
|
13
|
-
}
|
|
14
|
-
export type AiChatbotContext = AiChatbotTextContext | AiChatbotUrlContext | AiChatbotFileContext;
|
|
File without changes
|
/package/dist/internal-common/src/{public-types → public-types-backend}/graphql.public-context.d.ts
RENAMED
|
File without changes
|