@xata.io/client 0.0.0-next.v0b9131efdfa1340c28d4ce9bd73d6c4854e7c140 → 0.0.0-next.v0bff19eb2ff4a0bbcef7cd1a58e23bd4db0b6d49

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,4 +1,4 @@
1
1
 
2
- > @xata.io/client@0.29.4 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.29.5 add-version /home/runner/work/client-ts/client-ts/packages/client
3
3
  > node ../../scripts/add-version-file.mjs
4
4
 
@@ -1,5 +1,5 @@
1
1
 
2
- > @xata.io/client@0.29.4 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.29.5 build /home/runner/work/client-ts/client-ts/packages/client
3
3
  > rimraf dist && rollup -c
4
4
 
5
5
  
@@ -7,7 +7,7 @@
7
7
  created dist/index.cjs in 1.2s
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 656ms
10
+ created dist/index.mjs in 1.1s
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
13
  created dist/index.d.ts in 4.4s
package/CHANGELOG.md CHANGED
@@ -1,12 +1,16 @@
1
1
  # @xata.io/client
2
2
 
3
- ## 0.0.0-next.v0b9131efdfa1340c28d4ce9bd73d6c4854e7c140
3
+ ## 0.0.0-next.v0bff19eb2ff4a0bbcef7cd1a58e23bd4db0b6d49
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [`1b0b1a0`](https://github.com/xataio/client-ts/commit/1b0b1a09240cfcffc292cc5c17205eba10e5b054) Thanks [@SferaDev](https://github.com/SferaDev)! - Make XataApiClient to use ES Proxies
7
+ - [`8b79ea3`](https://github.com/xataio/client-ts/commit/8b79ea3ad28d9300768da4206efb5a02ce2c48bd) Thanks [@SferaDev](https://github.com/SferaDev)! - Version 1.0
8
8
 
9
- - [`0a60b36`](https://github.com/xataio/client-ts/commit/0a60b3612f7fba050eb3c73b0b3b7a73e58ff26f) Thanks [@SferaDev](https://github.com/SferaDev)! - Version 1.0
9
+ ### Minor Changes
10
+
11
+ - [#1494](https://github.com/xataio/client-ts/pull/1494) [`cc673c9`](https://github.com/xataio/client-ts/commit/cc673c9a7885351082020e360630eab5db78c652) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - [Breaking] Update `XataApiClient` to use unified parameters
12
+
13
+ ## 0.29.5
10
14
 
11
15
  ### Patch Changes
12
16
 
package/dist/index.cjs CHANGED
@@ -2171,7 +2171,7 @@ function defaultOnOpen(response) {
2171
2171
  }
2172
2172
  }
2173
2173
 
2174
- const VERSION = "0.29.4";
2174
+ const VERSION = "0.29.5";
2175
2175
 
2176
2176
  class ErrorWithCause extends Error {
2177
2177
  constructor(message, options) {
@@ -2485,6 +2485,36 @@ function parseUrl(url) {
2485
2485
 
2486
2486
  const dataPlaneFetch = async (options) => fetch$1({ ...options, endpoint: "dataPlane" });
2487
2487
 
2488
+ const listClusterBranches = (variables, signal) => dataPlaneFetch({
2489
+ url: "/cluster/{clusterId}/branches",
2490
+ method: "get",
2491
+ ...variables,
2492
+ signal
2493
+ });
2494
+ const listClusterExtensions = (variables, signal) => dataPlaneFetch({
2495
+ url: "/cluster/{clusterId}/extensions",
2496
+ method: "get",
2497
+ ...variables,
2498
+ signal
2499
+ });
2500
+ const installClusterExtension = (variables, signal) => dataPlaneFetch({
2501
+ url: "/cluster/{clusterId}/extensions",
2502
+ method: "post",
2503
+ ...variables,
2504
+ signal
2505
+ });
2506
+ const dropClusterExtension = (variables, signal) => dataPlaneFetch({
2507
+ url: "/cluster/{clusterId}/extensions",
2508
+ method: "delete",
2509
+ ...variables,
2510
+ signal
2511
+ });
2512
+ const getClusterMetrics = (variables, signal) => dataPlaneFetch({
2513
+ url: "/cluster/{clusterId}/metrics",
2514
+ method: "get",
2515
+ ...variables,
2516
+ signal
2517
+ });
2488
2518
  const applyMigration = (variables, signal) => dataPlaneFetch({
2489
2519
  url: "/db/{dbBranchName}/migrations/apply",
2490
2520
  method: "post",
@@ -2527,6 +2557,12 @@ const getBranchMigrationJobStatus = (variables, signal) => dataPlaneFetch({
2527
2557
  ...variables,
2528
2558
  signal
2529
2559
  });
2560
+ const getMigrationJobs = (variables, signal) => dataPlaneFetch({
2561
+ url: "/db/{dbBranchName}/migrations/jobs",
2562
+ method: "get",
2563
+ ...variables,
2564
+ signal
2565
+ });
2530
2566
  const getMigrationJobStatus = (variables, signal) => dataPlaneFetch({
2531
2567
  url: "/db/{dbBranchName}/migrations/jobs/{jobId}",
2532
2568
  method: "get",
@@ -2571,12 +2607,25 @@ const getSchema = (variables, signal) => dataPlaneFetch({
2571
2607
  ...variables,
2572
2608
  signal
2573
2609
  });
2610
+ const getSchemas = (variables, signal) => dataPlaneFetch({
2611
+ url: "/db/{dbBranchName}/schemas",
2612
+ method: "get",
2613
+ ...variables,
2614
+ signal
2615
+ });
2574
2616
  const copyBranch = (variables, signal) => dataPlaneFetch({
2575
2617
  url: "/db/{dbBranchName}/copy",
2576
2618
  method: "post",
2577
2619
  ...variables,
2578
2620
  signal
2579
2621
  });
2622
+ const getBranchMoveStatus = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/move", method: "get", ...variables, signal });
2623
+ const moveBranch = (variables, signal) => dataPlaneFetch({
2624
+ url: "/db/{dbBranchName}/move",
2625
+ method: "put",
2626
+ ...variables,
2627
+ signal
2628
+ });
2580
2629
  const updateBranchMetadata = (variables, signal) => dataPlaneFetch({
2581
2630
  url: "/db/{dbBranchName}/metadata",
2582
2631
  method: "put",
@@ -2931,6 +2980,13 @@ const sqlBatchQuery = (variables, signal) => dataPlaneFetch({
2931
2980
  signal
2932
2981
  });
2933
2982
  const operationsByTag$2 = {
2983
+ cluster: {
2984
+ listClusterBranches,
2985
+ listClusterExtensions,
2986
+ installClusterExtension,
2987
+ dropClusterExtension,
2988
+ getClusterMetrics
2989
+ },
2934
2990
  migrations: {
2935
2991
  applyMigration,
2936
2992
  startMigration,
@@ -2939,9 +2995,11 @@ const operationsByTag$2 = {
2939
2995
  adaptTable,
2940
2996
  adaptAllTables,
2941
2997
  getBranchMigrationJobStatus,
2998
+ getMigrationJobs,
2942
2999
  getMigrationJobStatus,
2943
3000
  getMigrationHistory,
2944
3001
  getSchema,
3002
+ getSchemas,
2945
3003
  getBranchMigrationHistory,
2946
3004
  getBranchMigrationPlan,
2947
3005
  executeBranchMigrationPlan,
@@ -2959,6 +3017,8 @@ const operationsByTag$2 = {
2959
3017
  createBranch,
2960
3018
  deleteBranch,
2961
3019
  copyBranch,
3020
+ getBranchMoveStatus,
3021
+ moveBranch,
2962
3022
  updateBranchMetadata,
2963
3023
  getBranchMetadata,
2964
3024
  getBranchStats,
@@ -5072,16 +5132,13 @@ class SQLPlugin extends XataPlugin {
5072
5132
  throw new Error("Invalid usage of `xata.sql`. Please use it as a tagged template or with an object.");
5073
5133
  }
5074
5134
  const { statement, params, consistency, responseType } = prepareParams(query, parameters);
5075
- const {
5076
- records,
5077
- rows,
5078
- warning,
5079
- columns = []
5080
- } = await sqlQuery({
5135
+ const { warning, columns, ...response } = await sqlQuery({
5081
5136
  pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", region: "{region}" },
5082
5137
  body: { statement, params, consistency, responseType },
5083
5138
  ...pluginOptions
5084
5139
  });
5140
+ const records = "records" in response ? response.records : void 0;
5141
+ const rows = "rows" in response ? response.rows : void 0;
5085
5142
  return { records, rows, warning, columns };
5086
5143
  };
5087
5144
  sqlFunction.connectionString = buildConnectionString(pluginOptions);
@@ -5431,6 +5488,7 @@ exports.deleteUserAPIKey = deleteUserAPIKey;
5431
5488
  exports.deleteUserOAuthClient = deleteUserOAuthClient;
5432
5489
  exports.deleteWorkspace = deleteWorkspace;
5433
5490
  exports.deserialize = deserialize;
5491
+ exports.dropClusterExtension = dropClusterExtension;
5434
5492
  exports.endsWith = endsWith;
5435
5493
  exports.equals = equals;
5436
5494
  exports.executeBranchMigrationPlan = executeBranchMigrationPlan;
@@ -5445,9 +5503,11 @@ exports.getBranchMetadata = getBranchMetadata;
5445
5503
  exports.getBranchMigrationHistory = getBranchMigrationHistory;
5446
5504
  exports.getBranchMigrationJobStatus = getBranchMigrationJobStatus;
5447
5505
  exports.getBranchMigrationPlan = getBranchMigrationPlan;
5506
+ exports.getBranchMoveStatus = getBranchMoveStatus;
5448
5507
  exports.getBranchSchemaHistory = getBranchSchemaHistory;
5449
5508
  exports.getBranchStats = getBranchStats;
5450
5509
  exports.getCluster = getCluster;
5510
+ exports.getClusterMetrics = getClusterMetrics;
5451
5511
  exports.getColumn = getColumn;
5452
5512
  exports.getDatabaseGithubSettings = getDatabaseGithubSettings;
5453
5513
  exports.getDatabaseList = getDatabaseList;
@@ -5460,10 +5520,12 @@ exports.getGitBranchesMapping = getGitBranchesMapping;
5460
5520
  exports.getHostUrl = getHostUrl;
5461
5521
  exports.getMigrationHistory = getMigrationHistory;
5462
5522
  exports.getMigrationJobStatus = getMigrationJobStatus;
5523
+ exports.getMigrationJobs = getMigrationJobs;
5463
5524
  exports.getMigrationRequest = getMigrationRequest;
5464
5525
  exports.getMigrationRequestIsMerged = getMigrationRequestIsMerged;
5465
5526
  exports.getRecord = getRecord;
5466
5527
  exports.getSchema = getSchema;
5528
+ exports.getSchemas = getSchemas;
5467
5529
  exports.getTableColumns = getTableColumns;
5468
5530
  exports.getTableSchema = getTableSchema;
5469
5531
  exports.getUser = getUser;
@@ -5488,6 +5550,7 @@ exports.includesAny = includesAny;
5488
5550
  exports.includesNone = includesNone;
5489
5551
  exports.insertRecord = insertRecord;
5490
5552
  exports.insertRecordWithID = insertRecordWithID;
5553
+ exports.installClusterExtension = installClusterExtension;
5491
5554
  exports.inviteWorkspaceMember = inviteWorkspaceMember;
5492
5555
  exports.is = is;
5493
5556
  exports.isCursorPaginationOptions = isCursorPaginationOptions;
@@ -5501,12 +5564,15 @@ exports.le = le;
5501
5564
  exports.lessEquals = lessEquals;
5502
5565
  exports.lessThan = lessThan;
5503
5566
  exports.lessThanEquals = lessThanEquals;
5567
+ exports.listClusterBranches = listClusterBranches;
5568
+ exports.listClusterExtensions = listClusterExtensions;
5504
5569
  exports.listClusters = listClusters;
5505
5570
  exports.listMigrationRequestsCommits = listMigrationRequestsCommits;
5506
5571
  exports.listRegions = listRegions;
5507
5572
  exports.lt = lt;
5508
5573
  exports.lte = lte;
5509
5574
  exports.mergeMigrationRequest = mergeMigrationRequest;
5575
+ exports.moveBranch = moveBranch;
5510
5576
  exports.notExists = notExists;
5511
5577
  exports.operationsByTag = operationsByTag;
5512
5578
  exports.parseProviderString = parseProviderString;