@squidcloud/client 1.0.229 → 1.0.231

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { FunctionName } from './bundle-data.public-types';
1
2
  /** The supported OpenAI models */
2
3
  export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-turbo-preview", "gpt-4o", "gpt-4-turbo"];
3
4
  export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-pro"];
@@ -65,6 +66,8 @@ export interface AiChatbotChatOptions {
65
66
  overrideModel?: AiChatModelName;
66
67
  /** File URLs (only images supported at the moment) */
67
68
  fileUrls?: Array<AiFileUrl>;
69
+ /** Functions to expose to the AI */
70
+ functions?: Array<FunctionName>;
68
71
  }
69
72
  export type AiChatbotMutationType = 'insert' | 'update' | 'delete';
70
73
  export type AiChatbotResourceType = 'instruction' | 'context' | 'profile';
@@ -9,6 +9,7 @@ export type FieldPath = string;
9
9
  export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
10
10
  export interface ApiRequestField {
11
11
  location: ApiParameterLocation;
12
+ description?: string;
12
13
  }
13
14
  /** The options for calling an API. */
14
15
  export interface CallApiOptions {
@@ -29,6 +30,7 @@ export interface NativeApiCallResponse<BodyType = unknown> {
29
30
  export interface ApiResponseField {
30
31
  location: ApiResponseParameterLocation;
31
32
  path?: FieldPath;
33
+ description?: string;
32
34
  }
33
35
  export type ApiInjectionFieldType = 'secret' | 'regular';
34
36
  export interface ApiInjectionField {
@@ -50,6 +52,7 @@ export interface ApiEndpoint {
50
52
  requestSchema?: Record<FieldName, ApiRequestField>;
51
53
  responseSchema?: Record<FieldPath, ApiResponseField>;
52
54
  injectionSchema?: ApiInjectionSchema;
55
+ tags?: Array<string>;
53
56
  }
54
57
  export interface DiscoverOpenApiSchemaRequest {
55
58
  integrationType: IntegrationType.api;
@@ -36,7 +36,7 @@ export interface CompositeCondition<Doc extends DocumentData = any> {
36
36
  export declare function isSimpleCondition(condition: Condition): condition is SimpleCondition;
37
37
  type CompositeConditionOperator = '>=' | '<=' | '>' | '<';
38
38
  /** An operator in a query condition. */
39
- export type Operator = '==' | '!=' | CompositeConditionOperator | 'like' | 'not like' | 'like_cs' | 'not like_cs';
39
+ export type Operator = '==' | '!=' | CompositeConditionOperator | 'like' | 'not like' | 'like_cs' | 'not like_cs' | 'array_includes' | 'array_includes_all' | 'array_not_includes';
40
40
  export declare const ALL_OPERATORS: Array<Operator>;
41
41
  /** A definition of a sort by a filed. */
42
42
  export interface FieldSort<Doc> {
@@ -1,4 +1,5 @@
1
1
  import { AiFileUrl } from '../public-types/ai-chatbot.public-types';
2
+ import { FunctionName } from '../public-types/bundle-data.public-types';
2
3
  export type AiChatResponseFormat = 'text' | 'json_object';
3
4
  export interface AiChatOptions {
4
5
  maxTokens: number;
@@ -7,4 +8,5 @@ export interface AiChatOptions {
7
8
  instructions: string;
8
9
  clientId: string;
9
10
  fileUrls: Array<AiFileUrl>;
11
+ functions?: Array<FunctionName>;
10
12
  }
@@ -101,6 +101,30 @@ export declare abstract class BaseQueryBuilder<MyDocType extends DocumentData> {
101
101
  * @returns The query builder.
102
102
  */
103
103
  notLike(fieldName: (keyof MyDocType & FieldName) | string, pattern: string, caseSensitive?: boolean): this;
104
+ /**
105
+ * Adds a condition to the query to check if the specified field includes any of the given values.
106
+ *
107
+ * @param fieldName The name of the field to query.
108
+ * @param values The values to check for inclusion in the field array.
109
+ * @returns The query builder.
110
+ */
111
+ arrayIncludes(fieldName: (keyof MyDocType & FieldName) | string, values: Array<PrimitiveFieldType>): this;
112
+ /**
113
+ * Adds a condition to the query to check if the specified field includes all the given values.
114
+ *
115
+ * @param fieldName The name of the field to query.
116
+ * @param values The values to check for inclusion in the field array.
117
+ * @returns The query builder.
118
+ */
119
+ arrayIncludesAll(fieldName: (keyof MyDocType & FieldName) | string, values: Array<PrimitiveFieldType>): this;
120
+ /**
121
+ * Adds a condition to the query to check if the specified field does not include any of the given values.
122
+ *
123
+ * @param fieldName The name of the field to query.
124
+ * @param values The values to check for non-inclusion in the field array.
125
+ * @returns The query builder.
126
+ */
127
+ arrayNotIncludes(fieldName: (keyof MyDocType & FieldName) | string, values: Array<PrimitiveFieldType>): this;
104
128
  throwIfInvalidLikePattern(pattern: string): void;
105
129
  /**
106
130
  * Sets a limit to the number of results returned by the query. The maximum limit is 20,000 and the default is 1,000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.229",
3
+ "version": "1.0.231",
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",