@xata.io/client 0.0.0-beta.cae436d → 0.0.0-beta.d29cf06
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 +24 -0
- package/dist/api/client.d.ts +6 -1
- package/dist/api/client.js +16 -1
- package/dist/api/components.d.ts +36 -26
- package/dist/api/components.js +9 -9
- package/dist/api/index.js +5 -1
- package/dist/api/responses.d.ts +6 -0
- package/dist/index.d.ts +0 -57
- package/dist/index.js +6 -236
- package/dist/schema/index.d.ts +5 -0
- package/dist/schema/index.js +14 -1
- package/dist/schema/operators.d.ts +51 -0
- package/dist/schema/operators.js +51 -0
- package/dist/schema/pagination.d.ts +43 -1
- package/dist/schema/pagination.js +37 -1
- package/dist/schema/query.d.ts +93 -10
- package/dist/schema/query.js +83 -19
- package/dist/schema/record.d.ts +41 -0
- package/dist/schema/record.js +2 -0
- package/dist/schema/repository.d.ts +109 -0
- package/dist/schema/repository.js +280 -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
package/CHANGELOG.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# @xata.io/client
|
2
|
+
|
3
|
+
## 0.4.0
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- b951331: Add support for new float column
|
8
|
+
- d470610: Add new getAll() method
|
9
|
+
- eaf92a8: Expose pagination constants (size and offset limits)
|
10
|
+
- 57fde77: Reduce subrequests for createMany
|
11
|
+
- eaf92a8: Implement schema-less client
|
12
|
+
- 97a3caa: Make createBranch from optional with empty branch
|
13
|
+
|
14
|
+
## 0.3.0
|
15
|
+
|
16
|
+
### Minor Changes
|
17
|
+
|
18
|
+
- 1c0a454: Add API Client and internally use it
|
19
|
+
|
20
|
+
### Patch Changes
|
21
|
+
|
22
|
+
- 122321c: Fix client in CF workers and Deno
|
23
|
+
- a2671b5: Allow cancel or resend workspace invites
|
24
|
+
- e73d470: Split insert and create
|
package/dist/api/client.d.ts
CHANGED
@@ -40,6 +40,8 @@ declare class WorkspaceApi {
|
|
40
40
|
updateWorkspaceMemberRole(workspaceId: Schemas.WorkspaceID, userId: Schemas.UserID, role: Schemas.Role): Promise<void>;
|
41
41
|
removeWorkspaceMember(workspaceId: Schemas.WorkspaceID, userId: Schemas.UserID): Promise<void>;
|
42
42
|
inviteWorkspaceMember(workspaceId: Schemas.WorkspaceID, email: string, role: Schemas.Role): Promise<Schemas.WorkspaceInvite>;
|
43
|
+
cancelWorkspaceMemberInvite(workspaceId: Schemas.WorkspaceID, inviteId: Schemas.InviteID): Promise<void>;
|
44
|
+
resendWorkspaceMemberInvite(workspaceId: Schemas.WorkspaceID, inviteId: Schemas.InviteID): Promise<void>;
|
43
45
|
acceptWorkspaceMemberInvite(workspaceId: Schemas.WorkspaceID, inviteKey: Schemas.InviteKey): Promise<void>;
|
44
46
|
}
|
45
47
|
declare class DatabaseApi {
|
@@ -81,10 +83,13 @@ declare class RecordsApi {
|
|
81
83
|
private extraProps;
|
82
84
|
constructor(extraProps: FetcherExtraProps);
|
83
85
|
insertRecord(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, record: Record<string, any>): Promise<Types.InsertRecordResponse>;
|
84
|
-
insertRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.InsertRecordWithIDQueryParams): Promise<
|
86
|
+
insertRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.InsertRecordWithIDQueryParams): Promise<Responses.RecordUpdateResponse>;
|
87
|
+
updateRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.UpdateRecordWithIDQueryParams): Promise<Responses.RecordUpdateResponse>;
|
88
|
+
upsertRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.UpsertRecordWithIDQueryParams): Promise<Responses.RecordUpdateResponse>;
|
85
89
|
deleteRecord(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID): Promise<void>;
|
86
90
|
getRecord(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, options?: Types.GetRecordRequestBody): Promise<Schemas.XataRecord>;
|
87
91
|
bulkInsertTableRecords(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, records: Record<string, any>[]): Promise<Types.BulkInsertTableRecordsResponse>;
|
88
92
|
queryTable(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, query: Types.QueryTableRequestBody): Promise<Responses.QueryResponse>;
|
93
|
+
searchBranch(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, query: Types.SearchBranchRequestBody): Promise<Responses.SearchResponse>;
|
89
94
|
}
|
90
95
|
export {};
|
package/dist/api/client.js
CHANGED
@@ -107,6 +107,12 @@ class WorkspaceApi {
|
|
107
107
|
inviteWorkspaceMember(workspaceId, email, role) {
|
108
108
|
return components_1.operationsByTag.workspaces.inviteWorkspaceMember(Object.assign({ pathParams: { workspaceId }, body: { email, role } }, this.extraProps));
|
109
109
|
}
|
110
|
+
cancelWorkspaceMemberInvite(workspaceId, inviteId) {
|
111
|
+
return components_1.operationsByTag.workspaces.cancelWorkspaceMemberInvite(Object.assign({ pathParams: { workspaceId, inviteId } }, this.extraProps));
|
112
|
+
}
|
113
|
+
resendWorkspaceMemberInvite(workspaceId, inviteId) {
|
114
|
+
return components_1.operationsByTag.workspaces.resendWorkspaceMemberInvite(Object.assign({ pathParams: { workspaceId, inviteId } }, this.extraProps));
|
115
|
+
}
|
110
116
|
acceptWorkspaceMemberInvite(workspaceId, inviteKey) {
|
111
117
|
return components_1.operationsByTag.workspaces.acceptWorkspaceMemberInvite(Object.assign({ pathParams: { workspaceId, inviteKey } }, this.extraProps));
|
112
118
|
}
|
@@ -135,7 +141,7 @@ class BranchApi {
|
|
135
141
|
getBranchDetails(workspace, database, branch) {
|
136
142
|
return components_1.operationsByTag.branch.getBranchDetails(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}` } }, this.extraProps));
|
137
143
|
}
|
138
|
-
createBranch(workspace, database, branch, from, options = {}) {
|
144
|
+
createBranch(workspace, database, branch, from = '', options = {}) {
|
139
145
|
return components_1.operationsByTag.branch.createBranch(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}` }, queryParams: { from }, body: options }, this.extraProps));
|
140
146
|
}
|
141
147
|
deleteBranch(workspace, database, branch) {
|
@@ -205,6 +211,12 @@ class RecordsApi {
|
|
205
211
|
insertRecordWithID(workspace, database, branch, tableName, recordId, record, options = {}) {
|
206
212
|
return components_1.operationsByTag.records.insertRecordWithID(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId }, queryParams: options, body: record }, this.extraProps));
|
207
213
|
}
|
214
|
+
updateRecordWithID(workspace, database, branch, tableName, recordId, record, options = {}) {
|
215
|
+
return components_1.operationsByTag.records.updateRecordWithID(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId }, queryParams: options, body: record }, this.extraProps));
|
216
|
+
}
|
217
|
+
upsertRecordWithID(workspace, database, branch, tableName, recordId, record, options = {}) {
|
218
|
+
return components_1.operationsByTag.records.upsertRecordWithID(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId }, queryParams: options, body: record }, this.extraProps));
|
219
|
+
}
|
208
220
|
deleteRecord(workspace, database, branch, tableName, recordId) {
|
209
221
|
return components_1.operationsByTag.records.deleteRecord(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId } }, this.extraProps));
|
210
222
|
}
|
@@ -217,4 +229,7 @@ class RecordsApi {
|
|
217
229
|
queryTable(workspace, database, branch, tableName, query) {
|
218
230
|
return components_1.operationsByTag.records.queryTable(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName }, body: query }, this.extraProps));
|
219
231
|
}
|
232
|
+
searchBranch(workspace, database, branch, query) {
|
233
|
+
return components_1.operationsByTag.records.searchBranch(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}` }, body: query }, this.extraProps));
|
234
|
+
}
|
220
235
|
}
|
package/dist/api/components.d.ts
CHANGED
@@ -161,22 +161,6 @@ export declare type InviteWorkspaceMemberVariables = {
|
|
161
161
|
* Invite some user to join the workspace with the given role
|
162
162
|
*/
|
163
163
|
export declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<Schemas.WorkspaceInvite>;
|
164
|
-
export declare type UpdateWorkspaceMemberInvitePathParams = {
|
165
|
-
workspaceId: Schemas.WorkspaceID;
|
166
|
-
inviteId: Schemas.InviteID;
|
167
|
-
};
|
168
|
-
export declare type UpdateWorkspaceMemberInviteRequestBody = {
|
169
|
-
role: Schemas.Role;
|
170
|
-
};
|
171
|
-
export declare type UpdateWorkspaceMemberInviteVariables = {
|
172
|
-
body: UpdateWorkspaceMemberInviteRequestBody;
|
173
|
-
pathParams: UpdateWorkspaceMemberInvitePathParams;
|
174
|
-
} & FetcherExtraProps;
|
175
|
-
/**
|
176
|
-
* This operation provides a way to update an invite.
|
177
|
-
* The role can be updated while the email cannot.
|
178
|
-
*/
|
179
|
-
export declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<Schemas.WorkspaceInvite>;
|
180
164
|
export declare type CancelWorkspaceMemberInvitePathParams = {
|
181
165
|
workspaceId: Schemas.WorkspaceID;
|
182
166
|
inviteId: Schemas.InviteID;
|
@@ -566,12 +550,6 @@ export declare type InsertRecordWithIDQueryParams = {
|
|
566
550
|
createOnly?: boolean;
|
567
551
|
ifVersion?: number;
|
568
552
|
};
|
569
|
-
export declare type InsertRecordWithIDResponse = {
|
570
|
-
id: string;
|
571
|
-
xata: {
|
572
|
-
version: number;
|
573
|
-
};
|
574
|
-
};
|
575
553
|
export declare type InsertRecordWithIDVariables = {
|
576
554
|
body?: Record<string, any>;
|
577
555
|
pathParams: InsertRecordWithIDPathParams;
|
@@ -580,7 +558,37 @@ export declare type InsertRecordWithIDVariables = {
|
|
580
558
|
/**
|
581
559
|
* By default, IDs are auto-generated when data is insterted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
|
582
560
|
*/
|
583
|
-
export declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<
|
561
|
+
export declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>;
|
562
|
+
export declare type UpdateRecordWithIDPathParams = {
|
563
|
+
dbBranchName: Schemas.DBBranchName;
|
564
|
+
tableName: Schemas.TableName;
|
565
|
+
recordId: Schemas.RecordID;
|
566
|
+
workspace: string;
|
567
|
+
};
|
568
|
+
export declare type UpdateRecordWithIDQueryParams = {
|
569
|
+
ifVersion?: number;
|
570
|
+
};
|
571
|
+
export declare type UpdateRecordWithIDVariables = {
|
572
|
+
body?: Record<string, any>;
|
573
|
+
pathParams: UpdateRecordWithIDPathParams;
|
574
|
+
queryParams?: UpdateRecordWithIDQueryParams;
|
575
|
+
} & FetcherExtraProps;
|
576
|
+
export declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>;
|
577
|
+
export declare type UpsertRecordWithIDPathParams = {
|
578
|
+
dbBranchName: Schemas.DBBranchName;
|
579
|
+
tableName: Schemas.TableName;
|
580
|
+
recordId: Schemas.RecordID;
|
581
|
+
workspace: string;
|
582
|
+
};
|
583
|
+
export declare type UpsertRecordWithIDQueryParams = {
|
584
|
+
ifVersion?: number;
|
585
|
+
};
|
586
|
+
export declare type UpsertRecordWithIDVariables = {
|
587
|
+
body?: Record<string, any>;
|
588
|
+
pathParams: UpsertRecordWithIDPathParams;
|
589
|
+
queryParams?: UpsertRecordWithIDQueryParams;
|
590
|
+
} & FetcherExtraProps;
|
591
|
+
export declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>;
|
584
592
|
export declare type DeleteRecordPathParams = {
|
585
593
|
dbBranchName: Schemas.DBBranchName;
|
586
594
|
tableName: Schemas.TableName;
|
@@ -1356,13 +1364,14 @@ export declare type SearchBranchPathParams = {
|
|
1356
1364
|
export declare type SearchBranchRequestBody = {
|
1357
1365
|
tables?: string[];
|
1358
1366
|
query: string;
|
1367
|
+
fuzziness?: number;
|
1359
1368
|
};
|
1360
1369
|
export declare type SearchBranchVariables = {
|
1361
1370
|
body: SearchBranchRequestBody;
|
1362
1371
|
pathParams: SearchBranchPathParams;
|
1363
1372
|
} & FetcherExtraProps;
|
1364
1373
|
/**
|
1365
|
-
* Run a free text search operation across the
|
1374
|
+
* Run a free text search operation across the database branch.
|
1366
1375
|
*/
|
1367
1376
|
export declare const searchBranch: (variables: SearchBranchVariables) => Promise<Responses.SearchResponse>;
|
1368
1377
|
export declare const operationsByTag: {
|
@@ -1384,7 +1393,6 @@ export declare const operationsByTag: {
|
|
1384
1393
|
updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
|
1385
1394
|
removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
|
1386
1395
|
inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<Schemas.WorkspaceInvite>;
|
1387
|
-
updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<Schemas.WorkspaceInvite>;
|
1388
1396
|
cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
|
1389
1397
|
resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
|
1390
1398
|
acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables) => Promise<undefined>;
|
@@ -1420,7 +1428,9 @@ export declare const operationsByTag: {
|
|
1420
1428
|
};
|
1421
1429
|
records: {
|
1422
1430
|
insertRecord: (variables: InsertRecordVariables) => Promise<InsertRecordResponse>;
|
1423
|
-
insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<
|
1431
|
+
insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>;
|
1432
|
+
updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>;
|
1433
|
+
upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>;
|
1424
1434
|
deleteRecord: (variables: DeleteRecordVariables) => Promise<undefined>;
|
1425
1435
|
getRecord: (variables: GetRecordVariables) => Promise<Schemas.XataRecord>;
|
1426
1436
|
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertTableRecordsResponse>;
|
package/dist/api/components.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.searchBranch = exports.queryTable = exports.bulkInsertTableRecords = exports.getRecord = exports.deleteRecord = exports.upsertRecordWithID = exports.updateRecordWithID = exports.insertRecordWithID = exports.insertRecord = exports.updateColumn = exports.deleteColumn = exports.getColumn = exports.addTableColumn = exports.getTableColumns = exports.setTableSchema = exports.getTableSchema = exports.updateTable = exports.deleteTable = exports.createTable = exports.getBranchStats = exports.getBranchMigrationPlan = exports.executeBranchMigrationPlan = exports.getBranchMigrationHistory = exports.getBranchMetadata = exports.updateBranchMetadata = exports.deleteBranch = exports.createBranch = exports.getBranchDetails = exports.deleteDatabase = exports.createDatabase = exports.getBranchList = exports.getDatabaseList = exports.acceptWorkspaceMemberInvite = exports.resendWorkspaceMemberInvite = exports.cancelWorkspaceMemberInvite = exports.inviteWorkspaceMember = exports.removeWorkspaceMember = exports.updateWorkspaceMemberRole = exports.getWorkspaceMembersList = exports.deleteWorkspace = exports.updateWorkspace = exports.getWorkspace = exports.getWorkspacesList = exports.createWorkspace = exports.deleteUserAPIKey = exports.createUserAPIKey = exports.getUserAPIKeys = exports.deleteUser = exports.updateUser = exports.getUser = void 0;
|
4
|
+
exports.operationsByTag = void 0;
|
4
5
|
/**
|
5
6
|
* Generated by @openapi-codegen
|
6
7
|
*
|
@@ -82,12 +83,6 @@ exports.removeWorkspaceMember = removeWorkspaceMember;
|
|
82
83
|
*/
|
83
84
|
const inviteWorkspaceMember = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/workspaces/{workspaceId}/invites', method: 'post' }, variables));
|
84
85
|
exports.inviteWorkspaceMember = inviteWorkspaceMember;
|
85
|
-
/**
|
86
|
-
* This operation provides a way to update an invite.
|
87
|
-
* The role can be updated while the email cannot.
|
88
|
-
*/
|
89
|
-
const updateWorkspaceMemberInvite = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/workspaces/{workspaceId}/invites/{inviteId}', method: 'patch' }, variables));
|
90
|
-
exports.updateWorkspaceMemberInvite = updateWorkspaceMemberInvite;
|
91
86
|
/**
|
92
87
|
* This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
|
93
88
|
*/
|
@@ -222,6 +217,10 @@ exports.insertRecord = insertRecord;
|
|
222
217
|
*/
|
223
218
|
const insertRecordWithID = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'put' }, variables));
|
224
219
|
exports.insertRecordWithID = insertRecordWithID;
|
220
|
+
const updateRecordWithID = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'patch' }, variables));
|
221
|
+
exports.updateRecordWithID = updateRecordWithID;
|
222
|
+
const upsertRecordWithID = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'post' }, variables));
|
223
|
+
exports.upsertRecordWithID = upsertRecordWithID;
|
225
224
|
const deleteRecord = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'delete' }, variables));
|
226
225
|
exports.deleteRecord = deleteRecord;
|
227
226
|
/**
|
@@ -943,7 +942,7 @@ exports.bulkInsertTableRecords = bulkInsertTableRecords;
|
|
943
942
|
const queryTable = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/query', method: 'post' }, variables));
|
944
943
|
exports.queryTable = queryTable;
|
945
944
|
/**
|
946
|
-
* Run a free text search operation across the
|
945
|
+
* Run a free text search operation across the database branch.
|
947
946
|
*/
|
948
947
|
const searchBranch = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/search', method: 'post' }, variables));
|
949
948
|
exports.searchBranch = searchBranch;
|
@@ -959,7 +958,6 @@ exports.operationsByTag = {
|
|
959
958
|
updateWorkspaceMemberRole: exports.updateWorkspaceMemberRole,
|
960
959
|
removeWorkspaceMember: exports.removeWorkspaceMember,
|
961
960
|
inviteWorkspaceMember: exports.inviteWorkspaceMember,
|
962
|
-
updateWorkspaceMemberInvite: exports.updateWorkspaceMemberInvite,
|
963
961
|
cancelWorkspaceMemberInvite: exports.cancelWorkspaceMemberInvite,
|
964
962
|
resendWorkspaceMemberInvite: exports.resendWorkspaceMemberInvite,
|
965
963
|
acceptWorkspaceMemberInvite: exports.acceptWorkspaceMemberInvite
|
@@ -992,6 +990,8 @@ exports.operationsByTag = {
|
|
992
990
|
records: {
|
993
991
|
insertRecord: exports.insertRecord,
|
994
992
|
insertRecordWithID: exports.insertRecordWithID,
|
993
|
+
updateRecordWithID: exports.updateRecordWithID,
|
994
|
+
upsertRecordWithID: exports.upsertRecordWithID,
|
995
995
|
deleteRecord: exports.deleteRecord,
|
996
996
|
getRecord: exports.getRecord,
|
997
997
|
bulkInsertTableRecords: exports.bulkInsertTableRecords,
|
package/dist/api/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
package/dist/api/responses.d.ts
CHANGED
@@ -23,6 +23,12 @@ export declare type BranchMigrationPlan = {
|
|
23
23
|
version: number;
|
24
24
|
migration: Schemas.BranchMigration;
|
25
25
|
};
|
26
|
+
export declare type RecordUpdateResponse = {
|
27
|
+
id: string;
|
28
|
+
xata: {
|
29
|
+
version: number;
|
30
|
+
};
|
31
|
+
};
|
26
32
|
export declare type QueryResponse = {
|
27
33
|
records: Schemas.XataRecord[];
|
28
34
|
meta: Schemas.RecordsMetadata;
|
package/dist/index.d.ts
CHANGED
@@ -1,63 +1,6 @@
|
|
1
|
-
import { FetchImpl } from './api/fetcher';
|
2
|
-
import { Page } from './schema/pagination';
|
3
|
-
import { Query, QueryOptions } from './schema/query';
|
4
|
-
import { Selectable, SelectableColumn, Select } from './schema/selection';
|
5
|
-
export interface XataRecord {
|
6
|
-
id: string;
|
7
|
-
xata: {
|
8
|
-
version: number;
|
9
|
-
};
|
10
|
-
read(): Promise<this>;
|
11
|
-
update(data: Selectable<this>): Promise<this>;
|
12
|
-
delete(): Promise<void>;
|
13
|
-
}
|
14
|
-
export declare abstract class Repository<T extends XataRecord> extends Query<T> {
|
15
|
-
abstract create(object: Selectable<T>): Promise<T>;
|
16
|
-
abstract createMany(objects: Selectable<T>[]): Promise<T[]>;
|
17
|
-
abstract read(id: string): Promise<T | null>;
|
18
|
-
abstract update(id: string, object: Partial<T>): Promise<T>;
|
19
|
-
abstract delete(id: string): void;
|
20
|
-
abstract query<R extends XataRecord, Options extends QueryOptions<T>>(query: Query<T, R>, options: Options): Promise<Page<T, typeof options['columns'] extends SelectableColumn<T>[] ? Select<T, typeof options['columns'][number]> : R>>;
|
21
|
-
}
|
22
|
-
export declare class RestRepository<T extends XataRecord> extends Repository<T> {
|
23
|
-
#private;
|
24
|
-
constructor(client: BaseClient<any>, table: string);
|
25
|
-
create(object: T): Promise<T>;
|
26
|
-
createMany(objects: T[]): Promise<T[]>;
|
27
|
-
read(recordId: string): Promise<T | null>;
|
28
|
-
update(recordId: string, object: Partial<T>): Promise<T>;
|
29
|
-
delete(recordId: string): Promise<void>;
|
30
|
-
query<R extends XataRecord, Options extends QueryOptions<T>>(query: Query<T, R>, options: Options): Promise<Page<T, typeof options['columns'] extends SelectableColumn<T>[] ? Select<T, typeof options['columns'][number]> : R>>;
|
31
|
-
}
|
32
|
-
interface RepositoryFactory {
|
33
|
-
createRepository<T extends XataRecord>(client: BaseClient<any>, table: string): Repository<T>;
|
34
|
-
}
|
35
|
-
export declare class RestRespositoryFactory implements RepositoryFactory {
|
36
|
-
createRepository<T extends XataRecord>(client: BaseClient<any>, table: string): Repository<T>;
|
37
|
-
}
|
38
|
-
declare type BranchStrategyValue = string | undefined | null;
|
39
|
-
declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
|
40
|
-
declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
|
41
|
-
declare type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
|
42
|
-
export declare type XataClientOptions = {
|
43
|
-
fetch?: FetchImpl;
|
44
|
-
databaseURL?: string;
|
45
|
-
branch: BranchStrategyOption;
|
46
|
-
apiKey: string;
|
47
|
-
repositoryFactory?: RepositoryFactory;
|
48
|
-
};
|
49
|
-
export declare class BaseClient<D extends Record<string, Repository<any>>> {
|
50
|
-
#private;
|
51
|
-
options: XataClientOptions;
|
52
|
-
db: D;
|
53
|
-
constructor(options: XataClientOptions, links: Links);
|
54
|
-
initObject<T>(table: string, object: object): T;
|
55
|
-
getBranch(): Promise<string>;
|
56
|
-
}
|
57
1
|
export declare class XataError extends Error {
|
58
2
|
readonly status: number;
|
59
3
|
constructor(message: string, status: number);
|
60
4
|
}
|
61
|
-
export declare type Links = Record<string, Array<string[]>>;
|
62
5
|
export * from './api';
|
63
6
|
export * from './schema';
|
package/dist/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
@@ -9,230 +13,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
15
|
};
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
19
|
-
});
|
20
|
-
};
|
21
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
22
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
23
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
24
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
25
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
26
|
-
};
|
27
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
31
|
-
};
|
32
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
33
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
34
|
-
var m = o[Symbol.asyncIterator], i;
|
35
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
36
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
37
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
38
|
-
};
|
39
|
-
var _RestRepository_instances, _RestRepository_client, _RestRepository_fetch, _RestRepository_table, _RestRepository_getFetchProps, _BaseClient_links, _BaseClient_branch;
|
40
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
-
exports.XataError =
|
42
|
-
const api_1 = require("./api");
|
43
|
-
const filters_1 = require("./schema/filters");
|
44
|
-
const pagination_1 = require("./schema/pagination");
|
45
|
-
const query_1 = require("./schema/query");
|
46
|
-
class Repository extends query_1.Query {
|
47
|
-
}
|
48
|
-
exports.Repository = Repository;
|
49
|
-
class RestRepository extends Repository {
|
50
|
-
constructor(client, table) {
|
51
|
-
super(null, table, {});
|
52
|
-
_RestRepository_instances.add(this);
|
53
|
-
_RestRepository_client.set(this, void 0);
|
54
|
-
_RestRepository_fetch.set(this, void 0);
|
55
|
-
_RestRepository_table.set(this, void 0);
|
56
|
-
__classPrivateFieldSet(this, _RestRepository_client, client, "f");
|
57
|
-
__classPrivateFieldSet(this, _RestRepository_table, table, "f");
|
58
|
-
// TODO: Remove when integrating with API client
|
59
|
-
const fetchImpl = typeof fetch !== 'undefined' ? fetch : __classPrivateFieldGet(this, _RestRepository_client, "f").options.fetch;
|
60
|
-
if (!fetchImpl) {
|
61
|
-
throw new Error(`The \`fetch\` option passed to the Xata client is resolving to a falsy value and may not be correctly imported.`);
|
62
|
-
}
|
63
|
-
__classPrivateFieldSet(this, _RestRepository_fetch, fetchImpl, "f");
|
64
|
-
}
|
65
|
-
create(object) {
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
67
|
-
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this);
|
68
|
-
const record = transformObjectLinks(object);
|
69
|
-
const response = yield (0, api_1.insertRecord)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f") }, body: record }, fetchProps));
|
70
|
-
const finalObject = yield this.read(response.id);
|
71
|
-
if (!finalObject) {
|
72
|
-
throw new Error('The server failed to save the record');
|
73
|
-
}
|
74
|
-
return finalObject;
|
75
|
-
});
|
76
|
-
}
|
77
|
-
createMany(objects) {
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
79
|
-
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this);
|
80
|
-
const records = objects.map((object) => transformObjectLinks(object));
|
81
|
-
const response = yield (0, api_1.bulkInsertTableRecords)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f") }, body: { records } }, fetchProps));
|
82
|
-
// TODO: Use filer.$any() to get all the records
|
83
|
-
const finalObjects = yield Promise.all(response.recordIDs.map((id) => this.read(id)));
|
84
|
-
if (finalObjects.some((object) => !object)) {
|
85
|
-
throw new Error('The server failed to save the record');
|
86
|
-
}
|
87
|
-
return finalObjects;
|
88
|
-
});
|
89
|
-
}
|
90
|
-
read(recordId) {
|
91
|
-
return __awaiter(this, void 0, void 0, function* () {
|
92
|
-
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this);
|
93
|
-
const response = yield (0, api_1.getRecord)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f"), recordId } }, fetchProps));
|
94
|
-
return __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), response);
|
95
|
-
});
|
96
|
-
}
|
97
|
-
update(recordId, object) {
|
98
|
-
return __awaiter(this, void 0, void 0, function* () {
|
99
|
-
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this);
|
100
|
-
const response = yield (0, api_1.insertRecordWithID)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f"), recordId }, body: object }, fetchProps));
|
101
|
-
// TODO: Review this, not sure we are properly initializing the object
|
102
|
-
return __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), response);
|
103
|
-
});
|
104
|
-
}
|
105
|
-
delete(recordId) {
|
106
|
-
return __awaiter(this, void 0, void 0, function* () {
|
107
|
-
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this);
|
108
|
-
yield (0, api_1.deleteRecord)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f"), recordId } }, fetchProps));
|
109
|
-
});
|
110
|
-
}
|
111
|
-
query(query, options) {
|
112
|
-
var _a, _b, _c;
|
113
|
-
return __awaiter(this, void 0, void 0, function* () {
|
114
|
-
const data = query.getQueryOptions();
|
115
|
-
const body = {
|
116
|
-
filter: Object.values(data.filter).some(Boolean) ? data.filter : undefined,
|
117
|
-
sort: (_a = (0, filters_1.buildSortFilter)(options === null || options === void 0 ? void 0 : options.sort)) !== null && _a !== void 0 ? _a : data.sort,
|
118
|
-
page: (_b = options === null || options === void 0 ? void 0 : options.page) !== null && _b !== void 0 ? _b : data.page,
|
119
|
-
columns: (_c = options === null || options === void 0 ? void 0 : options.columns) !== null && _c !== void 0 ? _c : data.columns
|
120
|
-
};
|
121
|
-
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this);
|
122
|
-
const { meta, records: objects } = yield (0, api_1.queryTable)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f") }, body }, fetchProps));
|
123
|
-
const records = objects.map((record) => __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), record));
|
124
|
-
// TODO: We should properly type this any
|
125
|
-
return new pagination_1.Page(query, meta, records);
|
126
|
-
});
|
127
|
-
}
|
128
|
-
}
|
129
|
-
exports.RestRepository = RestRepository;
|
130
|
-
_RestRepository_client = new WeakMap(), _RestRepository_fetch = new WeakMap(), _RestRepository_table = new WeakMap(), _RestRepository_instances = new WeakSet(), _RestRepository_getFetchProps = function _RestRepository_getFetchProps() {
|
131
|
-
return __awaiter(this, void 0, void 0, function* () {
|
132
|
-
const branch = yield __classPrivateFieldGet(this, _RestRepository_client, "f").getBranch();
|
133
|
-
return {
|
134
|
-
fetchImpl: __classPrivateFieldGet(this, _RestRepository_fetch, "f"),
|
135
|
-
apiKey: __classPrivateFieldGet(this, _RestRepository_client, "f").options.apiKey,
|
136
|
-
apiUrl: '',
|
137
|
-
// Instead of using workspace and dbBranch, we inject a probably CNAME'd URL
|
138
|
-
workspacesApiUrl: (path, params) => {
|
139
|
-
var _a, _b;
|
140
|
-
const baseUrl = (_a = __classPrivateFieldGet(this, _RestRepository_client, "f").options.databaseURL) !== null && _a !== void 0 ? _a : '';
|
141
|
-
const hasBranch = (_b = params.dbBranchName) !== null && _b !== void 0 ? _b : params.branch;
|
142
|
-
const newPath = path.replace(/^\/db\/[^/]+/, hasBranch ? `:${branch}` : '');
|
143
|
-
return baseUrl + newPath;
|
144
|
-
}
|
145
|
-
};
|
146
|
-
});
|
147
|
-
};
|
148
|
-
class RestRespositoryFactory {
|
149
|
-
createRepository(client, table) {
|
150
|
-
return new RestRepository(client, table);
|
151
|
-
}
|
152
|
-
}
|
153
|
-
exports.RestRespositoryFactory = RestRespositoryFactory;
|
154
|
-
class BaseClient {
|
155
|
-
constructor(options, links) {
|
156
|
-
_BaseClient_links.set(this, void 0);
|
157
|
-
_BaseClient_branch.set(this, void 0);
|
158
|
-
if (!options.databaseURL || !options.apiKey || !options.branch) {
|
159
|
-
throw new Error('Options databaseURL, apiKey and branch are required');
|
160
|
-
}
|
161
|
-
this.options = options;
|
162
|
-
__classPrivateFieldSet(this, _BaseClient_links, links, "f");
|
163
|
-
}
|
164
|
-
initObject(table, object) {
|
165
|
-
const o = {};
|
166
|
-
Object.assign(o, object);
|
167
|
-
const tableLinks = __classPrivateFieldGet(this, _BaseClient_links, "f")[table] || [];
|
168
|
-
for (const link of tableLinks) {
|
169
|
-
const [field, linkTable] = link;
|
170
|
-
const value = o[field];
|
171
|
-
if (value && typeof value === 'object') {
|
172
|
-
const { id } = value;
|
173
|
-
if (Object.keys(value).find((col) => col === 'id')) {
|
174
|
-
o[field] = this.initObject(linkTable, value);
|
175
|
-
}
|
176
|
-
else if (id) {
|
177
|
-
o[field] = {
|
178
|
-
id,
|
179
|
-
get: () => {
|
180
|
-
this.db[linkTable].read(id);
|
181
|
-
}
|
182
|
-
};
|
183
|
-
}
|
184
|
-
}
|
185
|
-
}
|
186
|
-
const db = this.db;
|
187
|
-
o.read = function () {
|
188
|
-
return db[table].read(o['id']);
|
189
|
-
};
|
190
|
-
o.update = function (data) {
|
191
|
-
return db[table].update(o['id'], data);
|
192
|
-
};
|
193
|
-
o.delete = function () {
|
194
|
-
return db[table].delete(o['id']);
|
195
|
-
};
|
196
|
-
for (const prop of ['read', 'update', 'delete']) {
|
197
|
-
Object.defineProperty(o, prop, { enumerable: false });
|
198
|
-
}
|
199
|
-
// TODO: links and rev links
|
200
|
-
Object.freeze(o);
|
201
|
-
return o;
|
202
|
-
}
|
203
|
-
getBranch() {
|
204
|
-
var e_1, _a;
|
205
|
-
return __awaiter(this, void 0, void 0, function* () {
|
206
|
-
if (__classPrivateFieldGet(this, _BaseClient_branch, "f"))
|
207
|
-
return __classPrivateFieldGet(this, _BaseClient_branch, "f");
|
208
|
-
const { branch: param } = this.options;
|
209
|
-
const strategies = Array.isArray(param) ? [...param] : [param];
|
210
|
-
const evaluateBranch = (strategy) => __awaiter(this, void 0, void 0, function* () {
|
211
|
-
return isBranchStrategyBuilder(strategy) ? yield strategy() : strategy;
|
212
|
-
});
|
213
|
-
try {
|
214
|
-
for (var strategies_1 = __asyncValues(strategies), strategies_1_1; strategies_1_1 = yield strategies_1.next(), !strategies_1_1.done;) {
|
215
|
-
const strategy = strategies_1_1.value;
|
216
|
-
const branch = yield evaluateBranch(strategy);
|
217
|
-
if (branch) {
|
218
|
-
__classPrivateFieldSet(this, _BaseClient_branch, branch, "f");
|
219
|
-
return branch;
|
220
|
-
}
|
221
|
-
}
|
222
|
-
}
|
223
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
224
|
-
finally {
|
225
|
-
try {
|
226
|
-
if (strategies_1_1 && !strategies_1_1.done && (_a = strategies_1.return)) yield _a.call(strategies_1);
|
227
|
-
}
|
228
|
-
finally { if (e_1) throw e_1.error; }
|
229
|
-
}
|
230
|
-
throw new Error('Unable to resolve branch value');
|
231
|
-
});
|
232
|
-
}
|
233
|
-
}
|
234
|
-
exports.BaseClient = BaseClient;
|
235
|
-
_BaseClient_links = new WeakMap(), _BaseClient_branch = new WeakMap();
|
17
|
+
exports.XataError = void 0;
|
236
18
|
class XataError extends Error {
|
237
19
|
constructor(message, status) {
|
238
20
|
super(message);
|
@@ -240,17 +22,5 @@ class XataError extends Error {
|
|
240
22
|
}
|
241
23
|
}
|
242
24
|
exports.XataError = XataError;
|
243
|
-
const isBranchStrategyBuilder = (strategy) => {
|
244
|
-
return typeof strategy === 'function';
|
245
|
-
};
|
246
|
-
// TODO: We can find a better implementation for links
|
247
|
-
const transformObjectLinks = (object) => {
|
248
|
-
return Object.entries(object).reduce((acc, [key, value]) => {
|
249
|
-
if (value && typeof value === 'object' && typeof value.id === 'string') {
|
250
|
-
return Object.assign(Object.assign({}, acc), { [key]: value.id });
|
251
|
-
}
|
252
|
-
return Object.assign(Object.assign({}, acc), { [key]: value });
|
253
|
-
}, {});
|
254
|
-
};
|
255
25
|
__exportStar(require("./api"), exports);
|
256
26
|
__exportStar(require("./schema"), exports);
|
package/dist/schema/index.d.ts
CHANGED
@@ -1 +1,6 @@
|
|
1
1
|
export * from './operators';
|
2
|
+
export * from './pagination';
|
3
|
+
export { Query } from './query';
|
4
|
+
export type { Identifiable, XataRecord } from './record';
|
5
|
+
export { BaseClient, Repository, RestRepository, RestRespositoryFactory } from './repository';
|
6
|
+
export type { XataClientOptions } from './repository';
|