@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.
- package/dist/api/client.d.ts +4 -1
- package/dist/api/client.js +9 -0
- package/dist/api/components.d.ts +36 -50
- package/dist/api/components.js +8 -21
- package/dist/api/fetcher.js +9 -9
- package/dist/api/index.js +5 -1
- package/dist/api/parameters.d.ts +0 -1
- package/dist/api/responses.d.ts +6 -0
- package/dist/api/schemas.d.ts +1 -1
- package/dist/index.d.ts +0 -57
- package/dist/index.js +6 -236
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.js +13 -1
- package/dist/schema/operators.d.ts +51 -0
- package/dist/schema/operators.js +51 -0
- package/dist/schema/pagination.d.ts +38 -0
- package/dist/schema/pagination.js +32 -0
- package/dist/schema/query.d.ts +74 -5
- package/dist/schema/query.js +56 -19
- package/dist/schema/record.d.ts +36 -0
- package/dist/schema/record.js +2 -0
- package/dist/schema/repository.d.ts +101 -0
- package/dist/schema/repository.js +263 -0
- package/dist/schema/selection.d.ts +3 -7
- package/dist/util/lang.d.ts +1 -0
- package/package.json +2 -2
- package/tsconfig.json +21 -0
@@ -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
|
8
|
-
|
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
|
}> : '');
|
package/dist/util/lang.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xata.io/client",
|
3
|
-
"version": "0.0.0-beta.
|
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": "
|
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
|
+
}
|