@xata.io/client 0.0.0-beta.64a31a3 → 0.0.0-beta.914c21b

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,16 +1,12 @@
1
1
  import { XataRecord } from '..';
2
+ import { PartialBy } from '../util/lang';
2
3
  import { StringKeys, UnionToIntersection, Values } from '../util/types';
3
4
  import { Query } from './query';
4
5
  declare type Queries<T> = {
5
6
  [key in keyof T as T[key] extends Query<any> ? key : never]: T[key];
6
7
  };
7
- declare type OmitQueries<T> = {
8
- [key in keyof T as T[key] extends Query<any> ? never : key]: T[key];
9
- };
10
- declare type OmitMethods<T> = {
11
- [key in keyof T as T[key] extends Function ? never : key]: T[key];
12
- };
13
- export declare type Selectable<T> = Omit<OmitQueries<OmitMethods<T>>, 'id' | 'xata'>;
8
+ declare type InternalProperties = keyof Omit<XataRecord, 'id'>;
9
+ export declare type Selectable<T extends XataRecord> = Omit<PartialBy<T, 'id'>, InternalProperties>;
14
10
  export declare type SelectableColumn<O> = '*' | (O extends Array<unknown> ? never : O extends Record<string, any> ? '*' | Values<{
15
11
  [K in StringKeys<O>]: O[K] extends Record<string, any> ? `${K}.${SelectableColumn<O[K]>}` : K;
16
12
  }> : '');
@@ -1 +1,2 @@
1
1
  export declare function compact<T>(arr: Array<T | null | undefined>): T[];
2
+ export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xata.io/client",
3
- "version": "0.0.0-beta.64a31a3",
3
+ "version": "0.0.0-beta.914c21b",
4
4
  "description": "Xata.io SDK for TypeScript and JavaScript",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,5 +20,5 @@
20
20
  "url": "https://github.com/xataio/client-ts/issues"
21
21
  },
22
22
  "homepage": "https://github.com/xataio/client-ts/blob/main/client/README.md",
23
- "gitHead": "64a31a3877fe75bb61b1b06864e09810e14dc174"
23
+ "gitHead": "914c21b073a27b406ab4083a2b375143aa385dbf"
24
24
  }
package/tsconfig.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "lib": ["dom", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "module": "CommonJS",
13
+ "moduleResolution": "node",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": false,
17
+ "outDir": "dist",
18
+ "declaration": true
19
+ },
20
+ "include": ["src"]
21
+ }