@squidcloud/backend 1.0.447 → 1.0.449

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,6 +1,6 @@
1
1
  import { AiQueryOptions } from '@squidcloud/client';
2
2
  import { IntegrationId } from '@squidcloud/client';
3
- import { CollectionName, DocumentData } from '@squidcloud/client';
3
+ import { CollectionName, DocumentData, FieldName } from '@squidcloud/client';
4
4
  import { FieldSort, Operator, Query, SimpleCondition } from '@squidcloud/client';
5
5
  import { DeepRecord, FieldOf, PartialBy, Paths } from '@squidcloud/client';
6
6
  /**
@@ -32,6 +32,10 @@ export declare class QueryContext<T extends DocumentData = any> {
32
32
  * The query limit if one exists, -1 otherwise.
33
33
  */
34
34
  get limit(): number;
35
+ /**
36
+ * The fields to project (include) in query results, or undefined if all fields should be returned.
37
+ */
38
+ get projectFields(): Array<FieldName> | undefined;
35
39
  /**
36
40
  * Verifies that the query's sort order aligns with the provided field sorts. The fields specified in the `sorts`
37
41
  * parameter must appear in the exact order at the beginning of the query's sort sequence. The query can include
@@ -87,6 +91,15 @@ export declare class QueryContext<T extends DocumentData = any> {
87
91
  * @returns Whether the query is a subquery of the parent query.
88
92
  */
89
93
  isSubqueryOfQuery(query: Query<T>): boolean;
94
+ /**
95
+ * Checks if this query's projectFields are a subset of the parent query's projectFields.
96
+ * A query can only be a child of another if the parent provides all fields the child needs.
97
+ *
98
+ * @param childFields - The projectFields of this query (the potential child)
99
+ * @param parentFields - The projectFields of the candidate parent query
100
+ * @returns Whether the child's fields are available from the parent
101
+ */
102
+ private isProjectFieldsSubset;
90
103
  /**
91
104
  * Returns all conditions that apply to any of the specified field names. This method
92
105
  * provides a convenient way to retrieve all conditions that involve a specific set of fields.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/backend",
3
- "version": "1.0.447",
3
+ "version": "1.0.449",
4
4
  "description": "Squid Cloud's backend SDK",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,7 +34,7 @@
34
34
  "typedoc-plugin-markdown": "^4.8.1"
35
35
  },
36
36
  "peerDependencies": {
37
- "@squidcloud/client": "^1.0.447"
37
+ "@squidcloud/client": "^1.0.449"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=20.0.0"