@xata.io/client 0.7.0 → 0.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 01aef78: Fix bundle for browsers
8
+ - 56be1fd: Allow sending updates with link object
9
+ - fc51771: Add includes operator helper methods
10
+
3
11
  ## 0.7.0
4
12
 
5
13
  ### Minor Changes
@@ -990,8 +990,9 @@ export declare type QueryTableVariables = {
990
990
  * },
991
991
  * {
992
992
  * "name": "r2",
993
- * },
994
- * ],
993
+ * }
994
+ * ]
995
+ * }
995
996
  * }
996
997
  * ```
997
998
  *
@@ -1001,7 +1002,7 @@ export declare type QueryTableVariables = {
1001
1002
  * {
1002
1003
  * "filter": {
1003
1004
  * "$exists": "settings",
1004
- * },
1005
+ * }
1005
1006
  * }
1006
1007
  * ```
1007
1008
  *
@@ -1016,8 +1017,8 @@ export declare type QueryTableVariables = {
1016
1017
  * },
1017
1018
  * {
1018
1019
  * "$exists": "name",
1019
- * },
1020
- * ],
1020
+ * }
1021
+ * ]
1021
1022
  * }
1022
1023
  * }
1023
1024
  * ```
@@ -1028,7 +1029,7 @@ export declare type QueryTableVariables = {
1028
1029
  * {
1029
1030
  * "filter": {
1030
1031
  * "$notExists": "settings",
1031
- * },
1032
+ * }
1032
1033
  * }
1033
1034
  * ```
1034
1035
  *
@@ -573,8 +573,9 @@ exports.bulkInsertTableRecords = bulkInsertTableRecords;
573
573
  * },
574
574
  * {
575
575
  * "name": "r2",
576
- * },
577
- * ],
576
+ * }
577
+ * ]
578
+ * }
578
579
  * }
579
580
  * ```
580
581
  *
@@ -584,7 +585,7 @@ exports.bulkInsertTableRecords = bulkInsertTableRecords;
584
585
  * {
585
586
  * "filter": {
586
587
  * "$exists": "settings",
587
- * },
588
+ * }
588
589
  * }
589
590
  * ```
590
591
  *
@@ -599,8 +600,8 @@ exports.bulkInsertTableRecords = bulkInsertTableRecords;
599
600
  * },
600
601
  * {
601
602
  * "$exists": "name",
602
- * },
603
- * ],
603
+ * }
604
+ * ]
604
605
  * }
605
606
  * }
606
607
  * ```
@@ -611,7 +612,7 @@ exports.bulkInsertTableRecords = bulkInsertTableRecords;
611
612
  * {
612
613
  * "filter": {
613
614
  * "$notExists": "settings",
614
- * },
615
+ * }
615
616
  * }
616
617
  * ```
617
618
  *
@@ -57,6 +57,18 @@ export declare const isNot: <T>(value: T) => PropertyFilter<T>;
57
57
  */
58
58
  export declare const contains: (value: string) => StringTypeFilter;
59
59
  /**
60
- * Operator to restrict results to only arrays that include the given value.
60
+ * Operator to restrict results if some array items match the predicate.
61
61
  */
62
62
  export declare const includes: <T>(value: T) => ArrayFilter<T>;
63
+ /**
64
+ * Operator to restrict results if all array items match the predicate.
65
+ */
66
+ export declare const includesAll: <T>(value: T) => ArrayFilter<T>;
67
+ /**
68
+ * Operator to restrict results if none array items match the predicate.
69
+ */
70
+ export declare const includesNone: <T>(value: T) => ArrayFilter<T>;
71
+ /**
72
+ * Operator to restrict results if some array items match the predicate.
73
+ */
74
+ export declare const includesAny: <T>(value: T) => ArrayFilter<T>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.includes = exports.contains = exports.isNot = exports.is = exports.pattern = exports.endsWith = exports.startsWith = exports.notExists = exports.exists = exports.le = exports.lte = exports.lt = exports.gte = exports.ge = exports.gt = void 0;
3
+ exports.includesAny = exports.includesNone = exports.includesAll = exports.includes = exports.contains = exports.isNot = exports.is = exports.pattern = exports.endsWith = exports.startsWith = exports.notExists = exports.exists = exports.le = exports.lte = exports.lt = exports.gte = exports.ge = exports.gt = void 0;
4
4
  /**
5
5
  * Operator to restrict results to only values that are greater than the given value.
6
6
  */
@@ -72,7 +72,22 @@ exports.isNot = isNot;
72
72
  const contains = (value) => ({ $contains: value });
73
73
  exports.contains = contains;
74
74
  /**
75
- * Operator to restrict results to only arrays that include the given value.
75
+ * Operator to restrict results if some array items match the predicate.
76
76
  */
77
77
  const includes = (value) => ({ $includes: value });
78
78
  exports.includes = includes;
79
+ /**
80
+ * Operator to restrict results if all array items match the predicate.
81
+ */
82
+ const includesAll = (value) => ({ $includesAll: value });
83
+ exports.includesAll = includesAll;
84
+ /**
85
+ * Operator to restrict results if none array items match the predicate.
86
+ */
87
+ const includesNone = (value) => ({ $includesNone: value });
88
+ exports.includesNone = includesNone;
89
+ /**
90
+ * Operator to restrict results if some array items match the predicate.
91
+ */
92
+ const includesAny = (value) => ({ $includesAny: value });
93
+ exports.includesAny = includesAny;
@@ -62,5 +62,5 @@ export declare type EditableData<O extends BaseData> = {
62
62
  id: string;
63
63
  } : NonNullable<O[K]> extends XataRecord ? {
64
64
  id: string;
65
- } | undefined : O[K];
65
+ } | null | undefined : O[K];
66
66
  };
@@ -372,6 +372,10 @@ const isBranchStrategyBuilder = (strategy) => {
372
372
  };
373
373
  const transformObjectLinks = (object) => {
374
374
  return Object.entries(object).reduce((acc, [key, value]) => {
375
+ // Ignore internal properties
376
+ if (key === 'xata')
377
+ return acc;
378
+ // Transform links to identifier
375
379
  return Object.assign(Object.assign({}, acc), { [key]: (0, record_1.isIdentifiable)(value) ? value.id : value });
376
380
  }, {});
377
381
  };
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@xata.io/client",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Xata.io SDK for TypeScript and JavaScript",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
+ "browser": {
8
+ "child_process": false
9
+ },
7
10
  "scripts": {
8
11
  "test": "echo \"Error: no test specified\" && exit 1",
9
12
  "build": "tsc -p tsconfig.build.json",
@@ -20,5 +23,5 @@
20
23
  "url": "https://github.com/xataio/client-ts/issues"
21
24
  },
22
25
  "homepage": "https://github.com/xataio/client-ts/blob/main/client/README.md",
23
- "gitHead": "09bfef88b675f94cf64851e574c4e6cfc65e4b05"
26
+ "gitHead": "c817835c55f287286f4d30863e7bcfac0215f8f7"
24
27
  }