@squidcloud/backend 1.0.477 → 1.0.479

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.
@@ -23,6 +23,12 @@ export interface AiFunctionCallContext<FunctionContextType = unknown, AgentConte
23
23
  functionContext: FunctionContextType;
24
24
  /** The session associated with this AI function call. */
25
25
  sessionContext: AiSessionContext;
26
+ /**
27
+ * Instructions of the calling AI agent, when the function runs an AI sub-agent that should
28
+ * honor them (e.g. formatting rules or domain conventions). For integration-connected functions
29
+ * this carries the integration's instructions instead (see AiConnectedIntegrationMetadata).
30
+ */
31
+ instructions?: string;
26
32
  }
27
33
  /** AiFunctionContext for the connected integration function. Contains predefined integration data. */
28
34
  export interface AiFunctionCallContextWithIntegration<AiConnectedIntegrationOptionsType = unknown, FunctionContextType = unknown, AgentContextType = unknown> extends AiFunctionCallContext<FunctionContextType, AgentContextType>, AiConnectedIntegrationMetadata<AiConnectedIntegrationOptionsType> {
@@ -9,8 +9,14 @@ export declare const MUTATION_TYPES: readonly ["insert", "update", "delete"];
9
9
  * @category Database
10
10
  */
11
11
  export type MutationType = (typeof MUTATION_TYPES)[number];
12
- interface BaseMutation {
12
+ /**
13
+ * Base fields shared by all document mutations.
14
+ * @category Database
15
+ */
16
+ export interface BaseMutation {
17
+ /** The type of the mutation. */
13
18
  type: MutationType;
19
+ /** The identity of the mutated document. */
14
20
  squidDocIdObj: SquidDocIdObj;
15
21
  }
16
22
  /**
@@ -83,7 +89,11 @@ export interface RemovePropertyMutation {
83
89
  /** Specifies that the mutation removes a property. */
84
90
  type: 'removeProperty';
85
91
  }
86
- interface ApplyExtendString {
92
+ /**
93
+ * A property mutation that appends a value to the existing string.
94
+ * @category Database
95
+ */
96
+ export interface ApplyExtendString {
87
97
  /** Specifies that the mutation applies a string function. */
88
98
  type: 'applyStringFn';
89
99
  /** String function to extend the existing string. */
@@ -91,7 +101,11 @@ interface ApplyExtendString {
91
101
  /** String value to append. */
92
102
  value: string;
93
103
  }
94
- interface ApplyTrimString {
104
+ /**
105
+ * A property mutation that trims the existing string.
106
+ * @category Database
107
+ */
108
+ export interface ApplyTrimString {
95
109
  /** Specifies that the mutation applies a string function. */
96
110
  type: 'applyStringFn';
97
111
  /** String function to trim the existing string. */
@@ -145,4 +159,3 @@ export declare class MutationContext<T = any> {
145
159
  affectedPaths(startingRoot?: Paths<T> | string): Array<Paths<T>>;
146
160
  private checkPath;
147
161
  }
148
- export {};
@@ -4,7 +4,11 @@ import { IntegrationId } from '@squidcloud/client';
4
4
  * @category Database
5
5
  */
6
6
  export type NativeQueryRequestType = 'relational' | 'mongo' | 'elasticsearch' | 'pure';
7
- interface BaseNativeQueryContext {
7
+ /**
8
+ * Base fields shared by all native query contexts.
9
+ * @category Database
10
+ */
11
+ export interface BaseNativeQueryContext {
8
12
  /** Type of the native query request. */
9
13
  type: NativeQueryRequestType;
10
14
  /** Identifier for the integration. */
@@ -69,4 +73,3 @@ export interface PureNativeQueryContext extends BaseNativeQueryContext {
69
73
  * @category Database
70
74
  */
71
75
  export type NativeQueryContext = RelationalNativeQueryContext | MongoNativeQueryContext | ElasticsearchNativeQueryContext | PureNativeQueryContext;
72
- export {};
@@ -181,10 +181,13 @@ export type GeneralConditions<Doc extends DocumentData = any, F extends Paths<Do
181
181
  * @category Database
182
182
  */
183
183
  export type ContextOperator = Exclude<Operator, '==' | '!='> | 'in' | 'not in';
184
- type AllOperators = Operator | 'in' | 'not in';
184
+ /**
185
+ * Set of operators supported by query context conditions, including list membership.
186
+ * @category Database
187
+ */
188
+ export type AllOperators = Operator | 'in' | 'not in';
185
189
  /**
186
190
  * A generic value that can exist in a query.
187
191
  * @category Database
188
192
  */
189
193
  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;
190
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/backend",
3
- "version": "1.0.477",
3
+ "version": "1.0.479",
4
4
  "description": "Squid Cloud's backend SDK",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -35,7 +35,7 @@
35
35
  "typedoc-plugin-markdown": "^4.8.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@squidcloud/client": "^1.0.477"
38
+ "@squidcloud/client": "^1.0.479"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=20.0.0"