@xata.io/client 0.18.3 → 0.18.5
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 +12 -0
- package/dist/index.cjs +173 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +219 -195
- package/dist/index.mjs +173 -123
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -150,7 +150,7 @@ function getFetchImplementation(userFetch) {
|
|
150
150
|
return fetchImpl;
|
151
151
|
}
|
152
152
|
|
153
|
-
const VERSION = "0.18.
|
153
|
+
const VERSION = "0.18.5";
|
154
154
|
|
155
155
|
class ErrorWithCause extends Error {
|
156
156
|
constructor(message, options) {
|
@@ -233,7 +233,8 @@ async function fetch$1({
|
|
233
233
|
apiKey,
|
234
234
|
apiUrl,
|
235
235
|
workspacesApiUrl,
|
236
|
-
trace
|
236
|
+
trace,
|
237
|
+
signal
|
237
238
|
}) {
|
238
239
|
return trace(
|
239
240
|
`${method.toUpperCase()} ${path}`,
|
@@ -254,7 +255,8 @@ async function fetch$1({
|
|
254
255
|
...headers,
|
255
256
|
...hostHeader(fullUrl),
|
256
257
|
Authorization: `Bearer ${apiKey}`
|
257
|
-
}
|
258
|
+
},
|
259
|
+
signal
|
258
260
|
});
|
259
261
|
if (response.status === 204) {
|
260
262
|
return {};
|
@@ -290,250 +292,298 @@ function parseUrl(url) {
|
|
290
292
|
}
|
291
293
|
}
|
292
294
|
|
293
|
-
const getUser = (variables) => fetch$1({ url: "/user", method: "get", ...variables });
|
294
|
-
const updateUser = (variables) => fetch$1({
|
295
|
-
|
296
|
-
|
295
|
+
const getUser = (variables, signal) => fetch$1({ url: "/user", method: "get", ...variables, signal });
|
296
|
+
const updateUser = (variables, signal) => fetch$1({
|
297
|
+
url: "/user",
|
298
|
+
method: "put",
|
299
|
+
...variables,
|
300
|
+
signal
|
301
|
+
});
|
302
|
+
const deleteUser = (variables, signal) => fetch$1({ url: "/user", method: "delete", ...variables, signal });
|
303
|
+
const getUserAPIKeys = (variables, signal) => fetch$1({
|
297
304
|
url: "/user/keys",
|
298
305
|
method: "get",
|
299
|
-
...variables
|
306
|
+
...variables,
|
307
|
+
signal
|
300
308
|
});
|
301
|
-
const createUserAPIKey = (variables) => fetch$1({
|
309
|
+
const createUserAPIKey = (variables, signal) => fetch$1({
|
302
310
|
url: "/user/keys/{keyName}",
|
303
311
|
method: "post",
|
304
|
-
...variables
|
312
|
+
...variables,
|
313
|
+
signal
|
305
314
|
});
|
306
|
-
const deleteUserAPIKey = (variables) => fetch$1({
|
315
|
+
const deleteUserAPIKey = (variables, signal) => fetch$1({
|
307
316
|
url: "/user/keys/{keyName}",
|
308
317
|
method: "delete",
|
309
|
-
...variables
|
318
|
+
...variables,
|
319
|
+
signal
|
310
320
|
});
|
311
|
-
const createWorkspace = (variables) => fetch$1({
|
321
|
+
const createWorkspace = (variables, signal) => fetch$1({
|
312
322
|
url: "/workspaces",
|
313
323
|
method: "post",
|
314
|
-
...variables
|
324
|
+
...variables,
|
325
|
+
signal
|
315
326
|
});
|
316
|
-
const getWorkspacesList = (variables) => fetch$1({
|
327
|
+
const getWorkspacesList = (variables, signal) => fetch$1({
|
317
328
|
url: "/workspaces",
|
318
329
|
method: "get",
|
319
|
-
...variables
|
330
|
+
...variables,
|
331
|
+
signal
|
320
332
|
});
|
321
|
-
const getWorkspace = (variables) => fetch$1({
|
333
|
+
const getWorkspace = (variables, signal) => fetch$1({
|
322
334
|
url: "/workspaces/{workspaceId}",
|
323
335
|
method: "get",
|
324
|
-
...variables
|
336
|
+
...variables,
|
337
|
+
signal
|
325
338
|
});
|
326
|
-
const updateWorkspace = (variables) => fetch$1({
|
339
|
+
const updateWorkspace = (variables, signal) => fetch$1({
|
327
340
|
url: "/workspaces/{workspaceId}",
|
328
341
|
method: "put",
|
329
|
-
...variables
|
342
|
+
...variables,
|
343
|
+
signal
|
330
344
|
});
|
331
|
-
const deleteWorkspace = (variables) => fetch$1({
|
345
|
+
const deleteWorkspace = (variables, signal) => fetch$1({
|
332
346
|
url: "/workspaces/{workspaceId}",
|
333
347
|
method: "delete",
|
334
|
-
...variables
|
348
|
+
...variables,
|
349
|
+
signal
|
335
350
|
});
|
336
|
-
const getWorkspaceMembersList = (variables) => fetch$1({
|
351
|
+
const getWorkspaceMembersList = (variables, signal) => fetch$1({
|
337
352
|
url: "/workspaces/{workspaceId}/members",
|
338
353
|
method: "get",
|
339
|
-
...variables
|
354
|
+
...variables,
|
355
|
+
signal
|
340
356
|
});
|
341
|
-
const updateWorkspaceMemberRole = (variables) => fetch$1({ url: "/workspaces/{workspaceId}/members/{userId}", method: "put", ...variables });
|
342
|
-
const removeWorkspaceMember = (variables) => fetch$1({
|
357
|
+
const updateWorkspaceMemberRole = (variables, signal) => fetch$1({ url: "/workspaces/{workspaceId}/members/{userId}", method: "put", ...variables, signal });
|
358
|
+
const removeWorkspaceMember = (variables, signal) => fetch$1({
|
343
359
|
url: "/workspaces/{workspaceId}/members/{userId}",
|
344
360
|
method: "delete",
|
345
|
-
...variables
|
361
|
+
...variables,
|
362
|
+
signal
|
346
363
|
});
|
347
|
-
const inviteWorkspaceMember = (variables) => fetch$1({ url: "/workspaces/{workspaceId}/invites", method: "post", ...variables });
|
348
|
-
const updateWorkspaceMemberInvite = (variables) => fetch$1({ url: "/workspaces/{workspaceId}/invites/{inviteId}", method: "patch", ...variables });
|
349
|
-
const cancelWorkspaceMemberInvite = (variables) => fetch$1({
|
364
|
+
const inviteWorkspaceMember = (variables, signal) => fetch$1({ url: "/workspaces/{workspaceId}/invites", method: "post", ...variables, signal });
|
365
|
+
const updateWorkspaceMemberInvite = (variables, signal) => fetch$1({ url: "/workspaces/{workspaceId}/invites/{inviteId}", method: "patch", ...variables, signal });
|
366
|
+
const cancelWorkspaceMemberInvite = (variables, signal) => fetch$1({
|
350
367
|
url: "/workspaces/{workspaceId}/invites/{inviteId}",
|
351
368
|
method: "delete",
|
352
|
-
...variables
|
369
|
+
...variables,
|
370
|
+
signal
|
353
371
|
});
|
354
|
-
const resendWorkspaceMemberInvite = (variables) => fetch$1({
|
372
|
+
const resendWorkspaceMemberInvite = (variables, signal) => fetch$1({
|
355
373
|
url: "/workspaces/{workspaceId}/invites/{inviteId}/resend",
|
356
374
|
method: "post",
|
357
|
-
...variables
|
375
|
+
...variables,
|
376
|
+
signal
|
358
377
|
});
|
359
|
-
const acceptWorkspaceMemberInvite = (variables) => fetch$1({
|
378
|
+
const acceptWorkspaceMemberInvite = (variables, signal) => fetch$1({
|
360
379
|
url: "/workspaces/{workspaceId}/invites/{inviteKey}/accept",
|
361
380
|
method: "post",
|
362
|
-
...variables
|
381
|
+
...variables,
|
382
|
+
signal
|
363
383
|
});
|
364
|
-
const getDatabaseList = (variables) => fetch$1({
|
384
|
+
const getDatabaseList = (variables, signal) => fetch$1({
|
365
385
|
url: "/dbs",
|
366
386
|
method: "get",
|
367
|
-
...variables
|
387
|
+
...variables,
|
388
|
+
signal
|
368
389
|
});
|
369
|
-
const getBranchList = (variables) => fetch$1({
|
390
|
+
const getBranchList = (variables, signal) => fetch$1({
|
370
391
|
url: "/dbs/{dbName}",
|
371
392
|
method: "get",
|
372
|
-
...variables
|
393
|
+
...variables,
|
394
|
+
signal
|
373
395
|
});
|
374
|
-
const createDatabase = (variables) => fetch$1({
|
396
|
+
const createDatabase = (variables, signal) => fetch$1({
|
375
397
|
url: "/dbs/{dbName}",
|
376
398
|
method: "put",
|
377
|
-
...variables
|
399
|
+
...variables,
|
400
|
+
signal
|
378
401
|
});
|
379
|
-
const deleteDatabase = (variables) => fetch$1({
|
402
|
+
const deleteDatabase = (variables, signal) => fetch$1({
|
380
403
|
url: "/dbs/{dbName}",
|
381
404
|
method: "delete",
|
382
|
-
...variables
|
405
|
+
...variables,
|
406
|
+
signal
|
383
407
|
});
|
384
|
-
const getDatabaseMetadata = (variables) => fetch$1({
|
408
|
+
const getDatabaseMetadata = (variables, signal) => fetch$1({
|
385
409
|
url: "/dbs/{dbName}/metadata",
|
386
410
|
method: "get",
|
387
|
-
...variables
|
411
|
+
...variables,
|
412
|
+
signal
|
388
413
|
});
|
389
|
-
const updateDatabaseMetadata = (variables) => fetch$1({ url: "/dbs/{dbName}/metadata", method: "patch", ...variables });
|
390
|
-
const getGitBranchesMapping = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "get", ...variables });
|
391
|
-
const addGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "post", ...variables });
|
392
|
-
const removeGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "delete", ...variables });
|
393
|
-
const resolveBranch = (variables) => fetch$1({
|
414
|
+
const updateDatabaseMetadata = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/metadata", method: "patch", ...variables, signal });
|
415
|
+
const getGitBranchesMapping = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "get", ...variables, signal });
|
416
|
+
const addGitBranchesEntry = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "post", ...variables, signal });
|
417
|
+
const removeGitBranchesEntry = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "delete", ...variables, signal });
|
418
|
+
const resolveBranch = (variables, signal) => fetch$1({
|
394
419
|
url: "/dbs/{dbName}/resolveBranch",
|
395
420
|
method: "get",
|
396
|
-
...variables
|
421
|
+
...variables,
|
422
|
+
signal
|
397
423
|
});
|
398
|
-
const
|
399
|
-
const createMigrationRequest = (variables) => fetch$1({ url: "/dbs/{dbName}/migrations", method: "post", ...variables });
|
400
|
-
const getMigrationRequest = (variables) => fetch$1({
|
424
|
+
const queryMigrationRequests = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/migrations/query", method: "post", ...variables, signal });
|
425
|
+
const createMigrationRequest = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/migrations", method: "post", ...variables, signal });
|
426
|
+
const getMigrationRequest = (variables, signal) => fetch$1({
|
401
427
|
url: "/dbs/{dbName}/migrations/{mrNumber}",
|
402
428
|
method: "get",
|
403
|
-
...variables
|
429
|
+
...variables,
|
430
|
+
signal
|
404
431
|
});
|
405
|
-
const updateMigrationRequest = (variables) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}", method: "patch", ...variables });
|
406
|
-
const listMigrationRequestsCommits = (variables) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}/commits", method: "post", ...variables });
|
407
|
-
const compareMigrationRequest = (variables) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}/compare", method: "post", ...variables });
|
408
|
-
const getMigrationRequestIsMerged = (variables) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}/merge", method: "get", ...variables });
|
409
|
-
const mergeMigrationRequest = (variables) => fetch$1({
|
432
|
+
const updateMigrationRequest = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}", method: "patch", ...variables, signal });
|
433
|
+
const listMigrationRequestsCommits = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}/commits", method: "post", ...variables, signal });
|
434
|
+
const compareMigrationRequest = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}/compare", method: "post", ...variables, signal });
|
435
|
+
const getMigrationRequestIsMerged = (variables, signal) => fetch$1({ url: "/dbs/{dbName}/migrations/{mrNumber}/merge", method: "get", ...variables, signal });
|
436
|
+
const mergeMigrationRequest = (variables, signal) => fetch$1({
|
410
437
|
url: "/dbs/{dbName}/migrations/{mrNumber}/merge",
|
411
438
|
method: "post",
|
412
|
-
...variables
|
439
|
+
...variables,
|
440
|
+
signal
|
413
441
|
});
|
414
|
-
const getBranchDetails = (variables) => fetch$1({
|
442
|
+
const getBranchDetails = (variables, signal) => fetch$1({
|
415
443
|
url: "/db/{dbBranchName}",
|
416
444
|
method: "get",
|
417
|
-
...variables
|
445
|
+
...variables,
|
446
|
+
signal
|
418
447
|
});
|
419
|
-
const createBranch = (variables) => fetch$1({ url: "/db/{dbBranchName}", method: "put", ...variables });
|
420
|
-
const deleteBranch = (variables) => fetch$1({
|
448
|
+
const createBranch = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}", method: "put", ...variables, signal });
|
449
|
+
const deleteBranch = (variables, signal) => fetch$1({
|
421
450
|
url: "/db/{dbBranchName}",
|
422
451
|
method: "delete",
|
423
|
-
...variables
|
452
|
+
...variables,
|
453
|
+
signal
|
424
454
|
});
|
425
|
-
const updateBranchMetadata = (variables) => fetch$1({
|
455
|
+
const updateBranchMetadata = (variables, signal) => fetch$1({
|
426
456
|
url: "/db/{dbBranchName}/metadata",
|
427
457
|
method: "put",
|
428
|
-
...variables
|
458
|
+
...variables,
|
459
|
+
signal
|
429
460
|
});
|
430
|
-
const getBranchMetadata = (variables) => fetch$1({
|
461
|
+
const getBranchMetadata = (variables, signal) => fetch$1({
|
431
462
|
url: "/db/{dbBranchName}/metadata",
|
432
463
|
method: "get",
|
433
|
-
...variables
|
464
|
+
...variables,
|
465
|
+
signal
|
434
466
|
});
|
435
|
-
const getBranchMigrationHistory = (variables) => fetch$1({ url: "/db/{dbBranchName}/migrations", method: "get", ...variables });
|
436
|
-
const executeBranchMigrationPlan = (variables) => fetch$1({ url: "/db/{dbBranchName}/migrations/execute", method: "post", ...variables });
|
437
|
-
const getBranchMigrationPlan = (variables) => fetch$1({ url: "/db/{dbBranchName}/migrations/plan", method: "post", ...variables });
|
438
|
-
const compareBranchWithUserSchema = (variables) => fetch$1({ url: "/db/{dbBranchName}/schema/compare", method: "post", ...variables });
|
439
|
-
const compareBranchSchemas = (variables) => fetch$1({ url: "/db/{dbBranchName}/schema/compare/{branchName}", method: "post", ...variables });
|
440
|
-
const updateBranchSchema = (variables) => fetch$1({
|
467
|
+
const getBranchMigrationHistory = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/migrations", method: "get", ...variables, signal });
|
468
|
+
const executeBranchMigrationPlan = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/migrations/execute", method: "post", ...variables, signal });
|
469
|
+
const getBranchMigrationPlan = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/migrations/plan", method: "post", ...variables, signal });
|
470
|
+
const compareBranchWithUserSchema = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/schema/compare", method: "post", ...variables, signal });
|
471
|
+
const compareBranchSchemas = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/schema/compare/{branchName}", method: "post", ...variables, signal });
|
472
|
+
const updateBranchSchema = (variables, signal) => fetch$1({
|
441
473
|
url: "/db/{dbBranchName}/schema/update",
|
442
474
|
method: "post",
|
443
|
-
...variables
|
475
|
+
...variables,
|
476
|
+
signal
|
444
477
|
});
|
445
|
-
const previewBranchSchemaEdit = (variables) => fetch$1({ url: "/db/{dbBranchName}/schema/preview", method: "post", ...variables });
|
446
|
-
const applyBranchSchemaEdit = (variables) => fetch$1({ url: "/db/{dbBranchName}/schema/apply", method: "post", ...variables });
|
447
|
-
const getBranchSchemaHistory = (variables) => fetch$1({ url: "/db/{dbBranchName}/schema/history", method: "post", ...variables });
|
448
|
-
const getBranchStats = (variables) => fetch$1({
|
478
|
+
const previewBranchSchemaEdit = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/schema/preview", method: "post", ...variables, signal });
|
479
|
+
const applyBranchSchemaEdit = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/schema/apply", method: "post", ...variables, signal });
|
480
|
+
const getBranchSchemaHistory = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/schema/history", method: "post", ...variables, signal });
|
481
|
+
const getBranchStats = (variables, signal) => fetch$1({
|
449
482
|
url: "/db/{dbBranchName}/stats",
|
450
483
|
method: "get",
|
451
|
-
...variables
|
484
|
+
...variables,
|
485
|
+
signal
|
452
486
|
});
|
453
|
-
const createTable = (variables) => fetch$1({
|
487
|
+
const createTable = (variables, signal) => fetch$1({
|
454
488
|
url: "/db/{dbBranchName}/tables/{tableName}",
|
455
489
|
method: "put",
|
456
|
-
...variables
|
490
|
+
...variables,
|
491
|
+
signal
|
457
492
|
});
|
458
|
-
const deleteTable = (variables) => fetch$1({
|
493
|
+
const deleteTable = (variables, signal) => fetch$1({
|
459
494
|
url: "/db/{dbBranchName}/tables/{tableName}",
|
460
495
|
method: "delete",
|
461
|
-
...variables
|
496
|
+
...variables,
|
497
|
+
signal
|
462
498
|
});
|
463
|
-
const updateTable = (variables) => fetch$1({
|
499
|
+
const updateTable = (variables, signal) => fetch$1({
|
464
500
|
url: "/db/{dbBranchName}/tables/{tableName}",
|
465
501
|
method: "patch",
|
466
|
-
...variables
|
502
|
+
...variables,
|
503
|
+
signal
|
467
504
|
});
|
468
|
-
const getTableSchema = (variables) => fetch$1({
|
505
|
+
const getTableSchema = (variables, signal) => fetch$1({
|
469
506
|
url: "/db/{dbBranchName}/tables/{tableName}/schema",
|
470
507
|
method: "get",
|
471
|
-
...variables
|
508
|
+
...variables,
|
509
|
+
signal
|
472
510
|
});
|
473
|
-
const setTableSchema = (variables) => fetch$1({
|
511
|
+
const setTableSchema = (variables, signal) => fetch$1({
|
474
512
|
url: "/db/{dbBranchName}/tables/{tableName}/schema",
|
475
513
|
method: "put",
|
476
|
-
...variables
|
514
|
+
...variables,
|
515
|
+
signal
|
477
516
|
});
|
478
|
-
const getTableColumns = (variables) => fetch$1({
|
517
|
+
const getTableColumns = (variables, signal) => fetch$1({
|
479
518
|
url: "/db/{dbBranchName}/tables/{tableName}/columns",
|
480
519
|
method: "get",
|
481
|
-
...variables
|
520
|
+
...variables,
|
521
|
+
signal
|
482
522
|
});
|
483
|
-
const addTableColumn = (variables) => fetch$1({
|
523
|
+
const addTableColumn = (variables, signal) => fetch$1({
|
484
524
|
url: "/db/{dbBranchName}/tables/{tableName}/columns",
|
485
525
|
method: "post",
|
486
|
-
...variables
|
526
|
+
...variables,
|
527
|
+
signal
|
487
528
|
});
|
488
|
-
const getColumn = (variables) => fetch$1({
|
529
|
+
const getColumn = (variables, signal) => fetch$1({
|
489
530
|
url: "/db/{dbBranchName}/tables/{tableName}/columns/{columnName}",
|
490
531
|
method: "get",
|
491
|
-
...variables
|
532
|
+
...variables,
|
533
|
+
signal
|
492
534
|
});
|
493
|
-
const deleteColumn = (variables) => fetch$1({
|
535
|
+
const deleteColumn = (variables, signal) => fetch$1({
|
494
536
|
url: "/db/{dbBranchName}/tables/{tableName}/columns/{columnName}",
|
495
537
|
method: "delete",
|
496
|
-
...variables
|
538
|
+
...variables,
|
539
|
+
signal
|
497
540
|
});
|
498
|
-
const updateColumn = (variables) => fetch$1({
|
541
|
+
const updateColumn = (variables, signal) => fetch$1({
|
499
542
|
url: "/db/{dbBranchName}/tables/{tableName}/columns/{columnName}",
|
500
543
|
method: "patch",
|
501
|
-
...variables
|
544
|
+
...variables,
|
545
|
+
signal
|
502
546
|
});
|
503
|
-
const insertRecord = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data", method: "post", ...variables });
|
504
|
-
const insertRecordWithID = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "put", ...variables });
|
505
|
-
const updateRecordWithID = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "patch", ...variables });
|
506
|
-
const upsertRecordWithID = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "post", ...variables });
|
507
|
-
const deleteRecord = (variables) => fetch$1({
|
547
|
+
const insertRecord = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data", method: "post", ...variables, signal });
|
548
|
+
const insertRecordWithID = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "put", ...variables, signal });
|
549
|
+
const updateRecordWithID = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "patch", ...variables, signal });
|
550
|
+
const upsertRecordWithID = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "post", ...variables, signal });
|
551
|
+
const deleteRecord = (variables, signal) => fetch$1({
|
508
552
|
url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}",
|
509
553
|
method: "delete",
|
510
|
-
...variables
|
554
|
+
...variables,
|
555
|
+
signal
|
511
556
|
});
|
512
|
-
const getRecord = (variables) => fetch$1({
|
557
|
+
const getRecord = (variables, signal) => fetch$1({
|
513
558
|
url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}",
|
514
559
|
method: "get",
|
515
|
-
...variables
|
560
|
+
...variables,
|
561
|
+
signal
|
516
562
|
});
|
517
|
-
const bulkInsertTableRecords = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/bulk", method: "post", ...variables });
|
518
|
-
const queryTable = (variables) => fetch$1({
|
563
|
+
const bulkInsertTableRecords = (variables, signal) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/bulk", method: "post", ...variables, signal });
|
564
|
+
const queryTable = (variables, signal) => fetch$1({
|
519
565
|
url: "/db/{dbBranchName}/tables/{tableName}/query",
|
520
566
|
method: "post",
|
521
|
-
...variables
|
567
|
+
...variables,
|
568
|
+
signal
|
522
569
|
});
|
523
|
-
const searchTable = (variables) => fetch$1({
|
570
|
+
const searchTable = (variables, signal) => fetch$1({
|
524
571
|
url: "/db/{dbBranchName}/tables/{tableName}/search",
|
525
572
|
method: "post",
|
526
|
-
...variables
|
573
|
+
...variables,
|
574
|
+
signal
|
527
575
|
});
|
528
|
-
const searchBranch = (variables) => fetch$1({
|
576
|
+
const searchBranch = (variables, signal) => fetch$1({
|
529
577
|
url: "/db/{dbBranchName}/search",
|
530
578
|
method: "post",
|
531
|
-
...variables
|
579
|
+
...variables,
|
580
|
+
signal
|
532
581
|
});
|
533
|
-
const summarizeTable = (variables) => fetch$1({
|
582
|
+
const summarizeTable = (variables, signal) => fetch$1({
|
534
583
|
url: "/db/{dbBranchName}/tables/{tableName}/summarize",
|
535
584
|
method: "post",
|
536
|
-
...variables
|
585
|
+
...variables,
|
586
|
+
signal
|
537
587
|
});
|
538
588
|
const operationsByTag = {
|
539
589
|
users: { getUser, updateUser, deleteUser, getUserAPIKeys, createUserAPIKey, deleteUserAPIKey },
|
@@ -573,7 +623,7 @@ const operationsByTag = {
|
|
573
623
|
getBranchStats
|
574
624
|
},
|
575
625
|
migrationRequests: {
|
576
|
-
|
626
|
+
queryMigrationRequests,
|
577
627
|
createMigrationRequest,
|
578
628
|
getMigrationRequest,
|
579
629
|
updateMigrationRequest,
|
@@ -1112,8 +1162,8 @@ class MigrationRequestsApi {
|
|
1112
1162
|
constructor(extraProps) {
|
1113
1163
|
this.extraProps = extraProps;
|
1114
1164
|
}
|
1115
|
-
|
1116
|
-
return operationsByTag.migrationRequests.
|
1165
|
+
queryMigrationRequests(workspace, database, options = {}) {
|
1166
|
+
return operationsByTag.migrationRequests.queryMigrationRequests({
|
1117
1167
|
pathParams: { workspace, dbName: database },
|
1118
1168
|
body: options,
|
1119
1169
|
...this.extraProps
|
@@ -2588,5 +2638,5 @@ class XataError extends Error {
|
|
2588
2638
|
}
|
2589
2639
|
}
|
2590
2640
|
|
2591
|
-
export { BaseClient, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, Repository, RestRepository, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, XataApiClient, XataApiPlugin, XataError, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals,
|
2641
|
+
export { BaseClient, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, Repository, RestRepository, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, XataApiClient, XataApiPlugin, XataError, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|
2592
2642
|
//# sourceMappingURL=index.mjs.map
|