@squidcloud/client 1.0.142 → 1.0.144-beta

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 (116) hide show
  1. package/dist/cjs/index.js +15649 -15749
  2. package/dist/common/src/ai-assistant.types.d.ts +25 -23
  3. package/dist/common/src/ai-chatbot.context.d.ts +12 -0
  4. package/dist/common/src/{ai-assistant.schemas.d.ts → ai-chatbot.schemas.d.ts} +1 -1
  5. package/dist/common/src/ai-chatbot.types.d.ts +25 -0
  6. package/dist/common/src/api-call.context.d.ts +13 -13
  7. package/dist/common/src/api.types.d.ts +4 -4
  8. package/dist/common/src/application.schemas.d.ts +66 -66
  9. package/dist/common/src/application.types.d.ts +143 -143
  10. package/dist/common/src/backend-function.schemas.d.ts +1 -1
  11. package/dist/common/src/backend-function.types.d.ts +1 -1
  12. package/dist/common/src/backend-run.types.d.ts +2 -2
  13. package/dist/common/src/bundle-api.types.d.ts +43 -42
  14. package/dist/common/src/bundle-data.types.d.ts +5 -4
  15. package/dist/common/src/communication.types.d.ts +8 -8
  16. package/dist/common/src/context.types.d.ts +40 -40
  17. package/dist/common/src/distributed-lock.context.d.ts +4 -4
  18. package/dist/common/src/document.types.d.ts +22 -22
  19. package/dist/common/src/graphql.context.d.ts +7 -7
  20. package/dist/common/src/graphql.types.d.ts +9 -9
  21. package/dist/common/src/heartbeat.types.d.ts +1 -1
  22. package/dist/common/src/http-status.enum.d.ts +50 -50
  23. package/dist/common/src/index.d.ts +57 -56
  24. package/dist/common/src/integrations/ai_chatbot.types.d.ts +31 -0
  25. package/dist/common/src/integrations/api.types.d.ts +80 -80
  26. package/dist/common/src/integrations/auth.types.d.ts +47 -47
  27. package/dist/common/src/integrations/database.types.d.ts +274 -274
  28. package/dist/common/src/integrations/index.d.ts +134 -134
  29. package/dist/common/src/integrations/observability.types.d.ts +23 -23
  30. package/dist/common/src/logger.types.d.ts +21 -21
  31. package/dist/common/src/metrics.types.d.ts +1 -1
  32. package/dist/common/src/mutation.context.d.ts +14 -14
  33. package/dist/common/src/mutation.schemas.d.ts +1 -1
  34. package/dist/common/src/mutation.types.d.ts +53 -53
  35. package/dist/common/src/named-query.context.d.ts +4 -4
  36. package/dist/common/src/named-query.schemas.d.ts +1 -1
  37. package/dist/common/src/named-query.types.d.ts +1 -1
  38. package/dist/common/src/native-query.context.d.ts +7 -7
  39. package/dist/common/src/native-query.types.d.ts +16 -16
  40. package/dist/common/src/query/base-query-builder.d.ts +147 -147
  41. package/dist/common/src/query/index.d.ts +4 -4
  42. package/dist/common/src/query/pagination.d.ts +62 -62
  43. package/dist/common/src/query/query-context.d.ts +137 -137
  44. package/dist/common/src/query/serialized-query.types.d.ts +24 -24
  45. package/dist/common/src/query.types.d.ts +64 -64
  46. package/dist/common/src/regions.d.ts +1 -1
  47. package/dist/common/src/schema/schema.types.d.ts +54 -54
  48. package/dist/common/src/secret.schemas.d.ts +1 -1
  49. package/dist/common/src/secret.types.d.ts +22 -22
  50. package/dist/common/src/security.types.d.ts +1 -1
  51. package/dist/common/src/socket.schemas.d.ts +1 -1
  52. package/dist/common/src/socket.types.d.ts +5 -5
  53. package/dist/common/src/time-units.d.ts +1 -1
  54. package/dist/common/src/trigger.types.d.ts +1 -1
  55. package/dist/common/src/types.d.ts +14 -14
  56. package/dist/common/src/utils/array.d.ts +1 -1
  57. package/dist/common/src/utils/assert.d.ts +1 -1
  58. package/dist/common/src/utils/error.d.ts +4 -4
  59. package/dist/common/src/utils/global.utils.d.ts +1 -1
  60. package/dist/common/src/utils/http.d.ts +2 -2
  61. package/dist/common/src/utils/id.d.ts +2 -2
  62. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  63. package/dist/common/src/utils/object.d.ts +5 -5
  64. package/dist/common/src/utils/serialization.d.ts +6 -6
  65. package/dist/common/src/utils/transforms.d.ts +18 -18
  66. package/dist/common/src/utils/url.d.ts +1 -1
  67. package/dist/common/src/utils/validation.d.ts +25 -25
  68. package/dist/common/src/webhook-response.d.ts +1 -1
  69. package/dist/common/src/websocket.impl.d.ts +21 -21
  70. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  71. package/dist/typescript-client/src/ai-assistant-client.d.ts +11 -174
  72. package/dist/typescript-client/src/ai-chatbot-client.d.ts +174 -0
  73. package/dist/typescript-client/src/{ai-client.factory.d.ts → ai-chatbot-client.factory.d.ts} +11 -11
  74. package/dist/typescript-client/src/ai.types.d.ts +47 -10
  75. package/dist/typescript-client/src/api.manager.d.ts +11 -11
  76. package/dist/typescript-client/src/auth.manager.d.ts +33 -33
  77. package/dist/typescript-client/src/backend-function.manager.d.ts +9 -9
  78. package/dist/typescript-client/src/client-id.service.d.ts +27 -27
  79. package/dist/typescript-client/src/collection-reference.d.ts +80 -80
  80. package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -13
  81. package/dist/typescript-client/src/connection-details.d.ts +23 -23
  82. package/dist/typescript-client/src/data.manager.d.ts +173 -173
  83. package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
  84. package/dist/typescript-client/src/distributed-lock.manager.d.ts +16 -16
  85. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  86. package/dist/typescript-client/src/document-reference.d.ts +140 -140
  87. package/dist/typescript-client/src/document-reference.factory.d.ts +13 -13
  88. package/dist/typescript-client/src/document-store.d.ts +14 -14
  89. package/dist/typescript-client/src/graphql-client.d.ts +14 -14
  90. package/dist/typescript-client/src/graphql-client.factory.d.ts +11 -11
  91. package/dist/typescript-client/src/index.d.ts +9 -9
  92. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +10 -10
  93. package/dist/typescript-client/src/named-query.manager.d.ts +11 -11
  94. package/dist/typescript-client/src/native-query-manager.d.ts +7 -7
  95. package/dist/typescript-client/src/query/deserializer.d.ts +3 -3
  96. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +161 -161
  97. package/dist/typescript-client/src/query/local-query-manager.d.ts +9 -9
  98. package/dist/typescript-client/src/query/query-builder.factory.d.ts +77 -77
  99. package/dist/typescript-client/src/query/query-sender.d.ts +33 -33
  100. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +130 -130
  101. package/dist/typescript-client/src/query/query.types.d.ts +49 -49
  102. package/dist/typescript-client/src/rate-limiter.d.ts +32 -32
  103. package/dist/typescript-client/src/rpc.manager.d.ts +29 -29
  104. package/dist/typescript-client/src/secret.client.d.ts +22 -22
  105. package/dist/typescript-client/src/socket.manager.d.ts +43 -43
  106. package/dist/typescript-client/src/squid.d.ts +283 -319
  107. package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
  108. package/dist/typescript-client/src/state/actions.d.ts +29 -29
  109. package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
  110. package/dist/typescript-client/src/state/state.service.d.ts +22 -22
  111. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  112. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  113. package/dist/typescript-client/src/types.d.ts +2 -2
  114. package/package.json +2 -2
  115. package/dist/common/src/ai-assistant.context.d.ts +0 -12
  116. package/dist/common/src/integrations/ai_assistant.types.d.ts +0 -31
@@ -1,42 +1,43 @@
1
- import { AiAssistantActionType, DatabaseActionType } from './bundle-data.types';
2
- import { DocumentData, SquidDocId } from './document.types';
3
- import { MutationContext } from './mutation.context';
4
- import { MutationType } from './mutation.types';
5
- import { QueryContext } from './query';
6
- import { ApiCallContext } from './api-call.context';
7
- import { NamedQueryContext } from './named-query.context';
8
- import { GraphqlContext } from './graphql.context';
9
- import { DistributedLockContext } from './distributed-lock.context';
10
- import { AiAssistantChatContext, AiAssistantMutationContext } from './ai-assistant.context';
11
- import { ClientId } from './communication.types';
12
- import { ClientConnectionState } from './socket.types';
13
- import { NativeQueryContext } from './native-query.context';
14
- 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>);
15
- export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
16
- export type SecureNamedQueryAction = ((context: NamedQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
17
- export type SecureNativeQueryAction = ((context: NativeQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
18
- export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
19
- export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
20
- export type SecureAiAssistantAction<T extends AiAssistantActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context: AiAssistantChatContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: AiAssistantMutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
21
- export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
22
- export type ExecutableAction = (...args: any[]) => any;
23
- export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
24
- /** The context provided to a trigger function. */
25
- export interface TriggerRequest<T extends DocumentData = any> {
26
- squidDocId: SquidDocId;
27
- mutationType: MutationType;
28
- docBefore?: T;
29
- docAfter?: T;
30
- }
31
- export type SchedulerAction = () => void | Promise<void>;
32
- export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
33
- /** The context provided to a webhook function. */
34
- export interface WebhookRequest {
35
- body: any;
36
- rawBody?: string;
37
- queryParams: Record<string, string>;
38
- headers: Record<string, string>;
39
- httpMethod: 'post' | 'get' | 'put' | 'delete';
40
- files?: Array<SquidFile>;
41
- }
42
- export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
1
+ import { AiChatbotActionType, DatabaseActionType } from './bundle-data.types';
2
+ import { DocumentData, SquidDocId } from './document.types';
3
+ import { MutationContext } from './mutation.context';
4
+ import { MutationType } from './mutation.types';
5
+ import { QueryContext } from './query';
6
+ import { ApiCallContext } from './api-call.context';
7
+ import { NamedQueryContext } from './named-query.context';
8
+ import { GraphqlContext } from './graphql.context';
9
+ import { DistributedLockContext } from './distributed-lock.context';
10
+ import { ClientId } from './communication.types';
11
+ import { ClientConnectionState } from './socket.types';
12
+ import { NativeQueryContext } from './native-query.context';
13
+ import { AiChatbotChatContext, AiChatbotMutationContext } from './ai-chatbot.context';
14
+ 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>);
15
+ export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
16
+ export type SecureNamedQueryAction = ((context: NamedQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
17
+ export type SecureNativeQueryAction = ((context: NativeQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
18
+ export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
19
+ export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
20
+ export type SecureAiChatbotAction<T extends AiChatbotActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context: AiChatbotChatContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: AiChatbotMutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
21
+ export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
22
+ export type ExecutableAction = (...args: any[]) => any;
23
+ export type AiFunctionAction<T extends Record<string, any> = any> = (params: T) => any;
24
+ export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
25
+ /** The context provided to a trigger function. */
26
+ export interface TriggerRequest<T extends DocumentData = any> {
27
+ squidDocId: SquidDocId;
28
+ mutationType: MutationType;
29
+ docBefore?: T;
30
+ docAfter?: T;
31
+ }
32
+ export type SchedulerAction = () => void | Promise<void>;
33
+ export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
34
+ /** The context provided to a webhook function. */
35
+ export interface WebhookRequest {
36
+ body: any;
37
+ rawBody?: string;
38
+ queryParams: Record<string, string>;
39
+ headers: Record<string, string>;
40
+ httpMethod: 'post' | 'get' | 'put' | 'delete';
41
+ files?: Array<SquidFile>;
42
+ }
43
+ export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
@@ -1,4 +1,5 @@
1
- /** The different types of actions that can be performed on a database. */
2
- export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
3
- /** The different types of actions that can be performed on an AI assistant. */
4
- export type AiAssistantActionType = 'chat' | 'mutate' | 'all';
1
+ /** The different types of actions that can be performed on a database. */
2
+ export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
3
+ /** The different types of actions that can be performed on an AI chatbot. */
4
+ export type AiChatbotActionType = 'chat' | 'mutate' | 'all';
5
+ export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date';
@@ -1,8 +1,8 @@
1
- /** A type alias for an application id. */
2
- export type AppId = string;
3
- export type EnvironmentId = 'prod' | 'dev';
4
- export declare const allEnvironmentIds: Array<EnvironmentId>;
5
- /** A type alias for an integration id. */
6
- export type IntegrationId = string;
7
- export type ChatId = string;
8
- export type SquidDeveloperId = string;
1
+ /** A type alias for an application id. */
2
+ export type AppId = string;
3
+ export type EnvironmentId = 'prod' | 'dev';
4
+ export declare const allEnvironmentIds: Array<EnvironmentId>;
5
+ /** A type alias for an integration id. */
6
+ export type IntegrationId = string;
7
+ export type ChatId = string;
8
+ export type SquidDeveloperId = string;
@@ -1,40 +1,40 @@
1
- import { AppId, ClientId } from './communication.types';
2
- export type AuthType = 'Bearer' | 'ApiKey';
3
- /**
4
- * The payload of a JWT token in case an auth token was used.
5
- */
6
- export interface AuthWithBearer {
7
- type: 'Bearer';
8
- userId: string;
9
- expiration: number;
10
- attributes: Record<string, any>;
11
- }
12
- /**
13
- * The authentication object for the current request in case an API key is used.
14
- */
15
- export interface AuthWithApiKey {
16
- type: 'ApiKey';
17
- apiKey: string;
18
- }
19
- /** The authentication object for the current request. */
20
- export type Auth = AuthWithBearer | AuthWithApiKey;
21
- export interface AuthToken {
22
- type: AuthType;
23
- token: string;
24
- integrationId?: string;
25
- }
26
- /** The context of a request to a service. */
27
- export interface RunContext {
28
- /** Your applicationId. */
29
- appId: AppId;
30
- /**
31
- * The id of the client that initiated this request. This is only relevant in cases that the request was initiated by
32
- * a client such as when securing an api call or a DB operation. This id will not be available for triggers,
33
- * schedulers, webhooks and other functions that are not directly initiated by a user action.
34
- */
35
- clientId?: ClientId;
36
- /** The IP address of the client that initiated this request. */
37
- sourceIp?: string;
38
- /** The headers of the request. */
39
- headers?: Record<string, any>;
40
- }
1
+ import { AppId, ClientId } from './communication.types';
2
+ export type AuthType = 'Bearer' | 'ApiKey';
3
+ /**
4
+ * The payload of a JWT token in case an auth token was used.
5
+ */
6
+ export interface AuthWithBearer {
7
+ type: 'Bearer';
8
+ userId: string;
9
+ expiration: number;
10
+ attributes: Record<string, any>;
11
+ }
12
+ /**
13
+ * The authentication object for the current request in case an API key is used.
14
+ */
15
+ export interface AuthWithApiKey {
16
+ type: 'ApiKey';
17
+ apiKey: string;
18
+ }
19
+ /** The authentication object for the current request. */
20
+ export type Auth = AuthWithBearer | AuthWithApiKey;
21
+ export interface AuthToken {
22
+ type: AuthType;
23
+ token: string;
24
+ integrationId?: string;
25
+ }
26
+ /** The context of a request to a service. */
27
+ export interface RunContext {
28
+ /** Your applicationId. */
29
+ appId: AppId;
30
+ /**
31
+ * The id of the client that initiated this request. This is only relevant in cases that the request was initiated by
32
+ * a client such as when securing an api call or a DB operation. This id will not be available for triggers,
33
+ * schedulers, webhooks and other functions that are not directly initiated by a user action.
34
+ */
35
+ clientId?: ClientId;
36
+ /** The IP address of the client that initiated this request. */
37
+ sourceIp?: string;
38
+ /** The headers of the request. */
39
+ headers?: Record<string, any>;
40
+ }
@@ -1,4 +1,4 @@
1
- /** The context provided to a secure distributed lock function. */
2
- export declare class DistributedLockContext {
3
- readonly mutex: string;
4
- }
1
+ /** The context provided to a secure distributed lock function. */
2
+ export declare class DistributedLockContext {
3
+ readonly mutex: string;
4
+ }
@@ -1,22 +1,22 @@
1
- import { IntegrationId } from './communication.types';
2
- /** A type alias for a field name. */
3
- export type FieldName<T = any> = string & keyof T;
4
- /** A type alias for a document id as string. */
5
- export type DocId = string;
6
- /** A type alias for a document id object when the ID is a composite of primary keys. */
7
- export type DocIdObj = Record<FieldName, any>;
8
- /** A type alias for a collection name. */
9
- export type CollectionName = string;
10
- /** The full document id, including the collection name and the integration id. */
11
- export interface SquidDocIdObj {
12
- collectionName: CollectionName;
13
- docId: DocId;
14
- integrationId: IntegrationId;
15
- }
16
- /** The before and after documents of a document change. */
17
- export interface BeforeAndAfterDocs<T = SquidDocument> {
18
- before: T | undefined;
19
- after: T | undefined;
20
- }
21
- /** A generic document data type. */
22
- export type DocumentData = Record<FieldName, any | undefined>;
1
+ import { IntegrationId } from './communication.types';
2
+ /** A type alias for a field name. */
3
+ export type FieldName<T = any> = string & keyof T;
4
+ /** A type alias for a document id as string. */
5
+ export type DocId = string;
6
+ /** A type alias for a document id object when the ID is a composite of primary keys. */
7
+ export type DocIdObj = Record<FieldName, any>;
8
+ /** A type alias for a collection name. */
9
+ export type CollectionName = string;
10
+ /** The full document id, including the collection name and the integration id. */
11
+ export interface SquidDocIdObj {
12
+ collectionName: CollectionName;
13
+ docId: DocId;
14
+ integrationId: IntegrationId;
15
+ }
16
+ /** The before and after documents of a document change. */
17
+ export interface BeforeAndAfterDocs<T = SquidDocument> {
18
+ before: T | undefined;
19
+ after: T | undefined;
20
+ }
21
+ /** A generic document data type. */
22
+ export type DocumentData = Record<FieldName, any | undefined>;
@@ -1,7 +1,7 @@
1
- /** The context provided to a secure GraphQL function. */
2
- export declare class GraphqlContext {
3
- readonly isGraphiQL: boolean;
4
- readonly query: string | undefined;
5
- readonly variables: string | Record<string, any> | undefined;
6
- readonly operationName: string | undefined;
7
- }
1
+ /** The context provided to a secure GraphQL function. */
2
+ export declare class GraphqlContext {
3
+ readonly isGraphiQL: boolean;
4
+ readonly query: string | undefined;
5
+ readonly variables: string | Record<string, any> | undefined;
6
+ readonly operationName: string | undefined;
7
+ }
@@ -1,9 +1,9 @@
1
- export { ExecutionResult, IntrospectionQuery } from 'graphql';
2
- export interface GraphQLRequest {
3
- operationName?: string;
4
- query?: string;
5
- variables?: string | Record<string, any>;
6
- }
7
- export interface SecureGraphQLRequest extends GraphQLRequest {
8
- isGraphiQL: boolean;
9
- }
1
+ export { ExecutionResult, IntrospectionQuery } from 'graphql';
2
+ export interface GraphQLRequest {
3
+ operationName?: string;
4
+ query?: string;
5
+ variables?: string | Record<string, any>;
6
+ }
7
+ export interface SecureGraphQLRequest extends GraphQLRequest {
8
+ isGraphiQL: boolean;
9
+ }
@@ -1 +1 @@
1
- export declare function checkAllHeartbeatProviders(heartbeatProviders: Record<string, HeartbeatProvider>): Promise<void>;
1
+ export declare function checkAllHeartbeatProviders(heartbeatProviders: Record<string, HeartbeatProvider>): Promise<void>;
@@ -1,50 +1,50 @@
1
- export declare enum HttpStatus {
2
- CONTINUE = 100,
3
- SWITCHING_PROTOCOLS = 101,
4
- PROCESSING = 102,
5
- EARLYHINTS = 103,
6
- OK = 200,
7
- CREATED = 201,
8
- ACCEPTED = 202,
9
- NON_AUTHORITATIVE_INFORMATION = 203,
10
- NO_CONTENT = 204,
11
- RESET_CONTENT = 205,
12
- PARTIAL_CONTENT = 206,
13
- AMBIGUOUS = 300,
14
- MOVED_PERMANENTLY = 301,
15
- FOUND = 302,
16
- SEE_OTHER = 303,
17
- NOT_MODIFIED = 304,
18
- TEMPORARY_REDIRECT = 307,
19
- PERMANENT_REDIRECT = 308,
20
- BAD_REQUEST = 400,
21
- UNAUTHORIZED = 401,
22
- PAYMENT_REQUIRED = 402,
23
- FORBIDDEN = 403,
24
- NOT_FOUND = 404,
25
- METHOD_NOT_ALLOWED = 405,
26
- NOT_ACCEPTABLE = 406,
27
- PROXY_AUTHENTICATION_REQUIRED = 407,
28
- REQUEST_TIMEOUT = 408,
29
- CONFLICT = 409,
30
- GONE = 410,
31
- LENGTH_REQUIRED = 411,
32
- PRECONDITION_FAILED = 412,
33
- PAYLOAD_TOO_LARGE = 413,
34
- URI_TOO_LONG = 414,
35
- UNSUPPORTED_MEDIA_TYPE = 415,
36
- REQUESTED_RANGE_NOT_SATISFIABLE = 416,
37
- EXPECTATION_FAILED = 417,
38
- I_AM_A_TEAPOT = 418,
39
- MISDIRECTED = 421,
40
- UNPROCESSABLE_ENTITY = 422,
41
- FAILED_DEPENDENCY = 424,
42
- PRECONDITION_REQUIRED = 428,
43
- TOO_MANY_REQUESTS = 429,
44
- INTERNAL_SERVER_ERROR = 500,
45
- NOT_IMPLEMENTED = 501,
46
- BAD_GATEWAY = 502,
47
- SERVICE_UNAVAILABLE = 503,
48
- GATEWAY_TIMEOUT = 504,
49
- HTTP_VERSION_NOT_SUPPORTED = 505
50
- }
1
+ export declare enum HttpStatus {
2
+ CONTINUE = 100,
3
+ SWITCHING_PROTOCOLS = 101,
4
+ PROCESSING = 102,
5
+ EARLYHINTS = 103,
6
+ OK = 200,
7
+ CREATED = 201,
8
+ ACCEPTED = 202,
9
+ NON_AUTHORITATIVE_INFORMATION = 203,
10
+ NO_CONTENT = 204,
11
+ RESET_CONTENT = 205,
12
+ PARTIAL_CONTENT = 206,
13
+ AMBIGUOUS = 300,
14
+ MOVED_PERMANENTLY = 301,
15
+ FOUND = 302,
16
+ SEE_OTHER = 303,
17
+ NOT_MODIFIED = 304,
18
+ TEMPORARY_REDIRECT = 307,
19
+ PERMANENT_REDIRECT = 308,
20
+ BAD_REQUEST = 400,
21
+ UNAUTHORIZED = 401,
22
+ PAYMENT_REQUIRED = 402,
23
+ FORBIDDEN = 403,
24
+ NOT_FOUND = 404,
25
+ METHOD_NOT_ALLOWED = 405,
26
+ NOT_ACCEPTABLE = 406,
27
+ PROXY_AUTHENTICATION_REQUIRED = 407,
28
+ REQUEST_TIMEOUT = 408,
29
+ CONFLICT = 409,
30
+ GONE = 410,
31
+ LENGTH_REQUIRED = 411,
32
+ PRECONDITION_FAILED = 412,
33
+ PAYLOAD_TOO_LARGE = 413,
34
+ URI_TOO_LONG = 414,
35
+ UNSUPPORTED_MEDIA_TYPE = 415,
36
+ REQUESTED_RANGE_NOT_SATISFIABLE = 416,
37
+ EXPECTATION_FAILED = 417,
38
+ I_AM_A_TEAPOT = 418,
39
+ MISDIRECTED = 421,
40
+ UNPROCESSABLE_ENTITY = 422,
41
+ FAILED_DEPENDENCY = 424,
42
+ PRECONDITION_REQUIRED = 428,
43
+ TOO_MANY_REQUESTS = 429,
44
+ INTERNAL_SERVER_ERROR = 500,
45
+ NOT_IMPLEMENTED = 501,
46
+ BAD_GATEWAY = 502,
47
+ SERVICE_UNAVAILABLE = 503,
48
+ GATEWAY_TIMEOUT = 504,
49
+ HTTP_VERSION_NOT_SUPPORTED = 505
50
+ }
@@ -1,56 +1,57 @@
1
- export * from './ai-assistant.schemas';
2
- export * from './ai-assistant.types';
3
- export * from './api-call.context';
4
- export * from './api.types';
5
- export * from './application.schemas';
6
- export * from './application.types';
7
- export * from './backend-function.schemas';
8
- export * from './backend-function.types';
9
- export * from './backend-run.types';
10
- export * from './bundle-api.types';
11
- export * from './bundle-data.types';
12
- export * from './communication.types';
13
- export * from './context.types';
14
- export * from './distributed-lock.context';
15
- export * from './document.types';
16
- export * from './graphql.context';
17
- export * from './graphql.types';
18
- export * from './http-status.enum';
19
- export * from './integrations';
20
- export * from './logger.types';
21
- export * from './metrics.types';
22
- export * from './mutation.context';
23
- export * from './mutation.schemas';
24
- export * from './mutation.types';
25
- export * from './named-query.context';
26
- export * from './named-query.schemas';
27
- export * from './named-query.types';
28
- export * from './native-query.context';
29
- export * from './native-query.types';
30
- export * from './query';
31
- export * from './query.types';
32
- export * from './regions';
33
- export * from './schema/schema.types';
34
- export * from './secret.schemas';
35
- export * from './secret.types';
36
- export * from './security.types';
37
- export * from './socket.schemas';
38
- export * from './socket.types';
39
- export * from './time-units';
40
- export * from './trigger.types';
41
- export * from './types';
42
- export * from './utils/array';
43
- export * from './utils/assert';
44
- export * from './utils/error';
45
- export * from './utils/http';
46
- export * from './utils/id';
47
- export * from './utils/lock.manager';
48
- export * from './utils/object';
49
- export * from './utils/serialization';
50
- export * from './utils/transforms';
51
- export * from './utils/url';
52
- export * from './utils/validation';
53
- export * from './webhook-response';
54
- export * from './heartbeat.types';
55
- export * from './utils/global.utils';
56
- export * from './websocket.impl';
1
+ export * from './ai-chatbot.schemas';
2
+ export * from './ai-chatbot.types';
3
+ export * from './ai-assistant.types';
4
+ export * from './api-call.context';
5
+ export * from './api.types';
6
+ export * from './application.schemas';
7
+ export * from './application.types';
8
+ export * from './backend-function.schemas';
9
+ export * from './backend-function.types';
10
+ export * from './backend-run.types';
11
+ export * from './bundle-api.types';
12
+ export * from './bundle-data.types';
13
+ export * from './communication.types';
14
+ export * from './context.types';
15
+ export * from './distributed-lock.context';
16
+ export * from './document.types';
17
+ export * from './graphql.context';
18
+ export * from './graphql.types';
19
+ export * from './http-status.enum';
20
+ export * from './integrations';
21
+ export * from './logger.types';
22
+ export * from './metrics.types';
23
+ export * from './mutation.context';
24
+ export * from './mutation.schemas';
25
+ export * from './mutation.types';
26
+ export * from './named-query.context';
27
+ export * from './named-query.schemas';
28
+ export * from './named-query.types';
29
+ export * from './native-query.context';
30
+ export * from './native-query.types';
31
+ export * from './query';
32
+ export * from './query.types';
33
+ export * from './regions';
34
+ export * from './schema/schema.types';
35
+ export * from './secret.schemas';
36
+ export * from './secret.types';
37
+ export * from './security.types';
38
+ export * from './socket.schemas';
39
+ export * from './socket.types';
40
+ export * from './time-units';
41
+ export * from './trigger.types';
42
+ export * from './types';
43
+ export * from './utils/array';
44
+ export * from './utils/assert';
45
+ export * from './utils/error';
46
+ export * from './utils/http';
47
+ export * from './utils/id';
48
+ export * from './utils/lock.manager';
49
+ export * from './utils/object';
50
+ export * from './utils/serialization';
51
+ export * from './utils/transforms';
52
+ export * from './utils/url';
53
+ export * from './utils/validation';
54
+ export * from './webhook-response';
55
+ export * from './heartbeat.types';
56
+ export * from './utils/global.utils';
57
+ export * from './websocket.impl';
@@ -0,0 +1,31 @@
1
+ import { AiModelName } from '../ai-chatbot.types';
2
+ import { IntegrationId } from '../communication.types';
3
+ import { BaseIntegrationConfig, IntegrationType } from './index';
4
+ export interface AiChatbotIntegrationConfig extends BaseIntegrationConfig {
5
+ type: IntegrationType.ai_chatbot;
6
+ configuration: AiChatbotConfiguration;
7
+ }
8
+ export type AiChatbotConfiguration = {
9
+ apiKey?: string;
10
+ };
11
+ export type AiChatbotProfileMetadata = {
12
+ modelName: AiModelName;
13
+ isPublic: boolean;
14
+ strictContext: boolean;
15
+ instructions: Record<string, string>;
16
+ };
17
+ export type AiChatbotContextMetadata = {
18
+ title: string;
19
+ text: string;
20
+ preview: boolean;
21
+ sizeBytes?: number;
22
+ };
23
+ export interface AiChatbotProfile extends AiChatbotProfileMetadata {
24
+ contexts: Record<string, AiChatbotContextMetadata>;
25
+ }
26
+ export interface AiChatbotProfiles {
27
+ profiles: Record<string, AiChatbotProfile>;
28
+ }
29
+ export interface GetAiChatbotProfilesRequest {
30
+ integrationId: IntegrationId;
31
+ }