@xata.io/client 0.0.0-alpha.vfe07d64 → 0.0.0-alpha.vfe4679b

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/index.d.ts CHANGED
@@ -1481,6 +1481,10 @@ type TransactionInsertOp = {
1481
1481
  * conflict, the record is inserted. If there is a conflict, Xata will replace the record.
1482
1482
  */
1483
1483
  createOnly?: boolean;
1484
+ /**
1485
+ * If set, the call will return the requested fields as part of the response.
1486
+ */
1487
+ columns?: string[];
1484
1488
  };
1485
1489
  /**
1486
1490
  * @pattern [a-zA-Z0-9_-~:]+
@@ -1509,6 +1513,10 @@ type TransactionUpdateOp = {
1509
1513
  * Xata will insert this record if it cannot be found.
1510
1514
  */
1511
1515
  upsert?: boolean;
1516
+ /**
1517
+ * If set, the call will return the requested fields as part of the response.
1518
+ */
1519
+ columns?: string[];
1512
1520
  };
1513
1521
  /**
1514
1522
  * A delete operation. The transaction will continue if no record matches the ID.
@@ -1519,6 +1527,10 @@ type TransactionDeleteOp = {
1519
1527
  */
1520
1528
  table: string;
1521
1529
  id: RecordID;
1530
+ /**
1531
+ * If set, the call will return the requested fields as part of the response.
1532
+ */
1533
+ columns?: string[];
1522
1534
  };
1523
1535
  /**
1524
1536
  * A transaction operation
@@ -1530,6 +1542,12 @@ type TransactionOperation$1 = {
1530
1542
  } | {
1531
1543
  ['delete']: TransactionDeleteOp;
1532
1544
  };
1545
+ /**
1546
+ * Fields to return in the transaction result.
1547
+ */
1548
+ type TransactionResultColumns = {
1549
+ [key: string]: any;
1550
+ };
1533
1551
  /**
1534
1552
  * A result from an insert operation.
1535
1553
  */
@@ -1543,6 +1561,7 @@ type TransactionResultInsert = {
1543
1561
  */
1544
1562
  rows: number;
1545
1563
  id: RecordID;
1564
+ columns?: TransactionResultColumns;
1546
1565
  };
1547
1566
  /**
1548
1567
  * A result from an update operation.
@@ -1557,6 +1576,7 @@ type TransactionResultUpdate = {
1557
1576
  */
1558
1577
  rows: number;
1559
1578
  id: RecordID;
1579
+ columns?: TransactionResultColumns;
1560
1580
  };
1561
1581
  /**
1562
1582
  * A result from a delete operation.
@@ -1570,6 +1590,7 @@ type TransactionResultDelete = {
1570
1590
  * The number of deleted rows
1571
1591
  */
1572
1592
  rows: number;
1593
+ columns?: TransactionResultColumns;
1573
1594
  };
1574
1595
  /**
1575
1596
  * An ordered array of results from the submitted operations.
@@ -5042,6 +5063,7 @@ type schemas_TransactionDeleteOp = TransactionDeleteOp;
5042
5063
  type schemas_TransactionError = TransactionError;
5043
5064
  type schemas_TransactionFailure = TransactionFailure;
5044
5065
  type schemas_TransactionInsertOp = TransactionInsertOp;
5066
+ type schemas_TransactionResultColumns = TransactionResultColumns;
5045
5067
  type schemas_TransactionResultDelete = TransactionResultDelete;
5046
5068
  type schemas_TransactionResultInsert = TransactionResultInsert;
5047
5069
  type schemas_TransactionResultUpdate = TransactionResultUpdate;
@@ -5148,6 +5170,7 @@ declare namespace schemas {
5148
5170
  schemas_TransactionFailure as TransactionFailure,
5149
5171
  schemas_TransactionInsertOp as TransactionInsertOp,
5150
5172
  TransactionOperation$1 as TransactionOperation,
5173
+ schemas_TransactionResultColumns as TransactionResultColumns,
5151
5174
  schemas_TransactionResultDelete as TransactionResultDelete,
5152
5175
  schemas_TransactionResultInsert as TransactionResultInsert,
5153
5176
  schemas_TransactionResultUpdate as TransactionResultUpdate,
package/dist/index.mjs CHANGED
@@ -850,8 +850,10 @@ function parseWorkspacesUrlParts(url) {
850
850
  return null;
851
851
  const regex = /(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.xata\.sh.*/;
852
852
  const regexStaging = /(?:https:\/\/)?([^.]+)\.staging(?:\.([^.]+))\.xatabase\.co.*/;
853
- const regexDev = /(?:https:\/\/)?([^.]+)\.staging(?:\.([^.]+))\.xata\.tech.*/;
854
- const match = url.match(regex) || url.match(regexStaging) || url.match(regexDev);
853
+ const regexDevCloudflare = /(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev.*/;
854
+ const regexStagingCloudflare = /(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.staging-xata\.dev.*/;
855
+ const regexProdCloudflare = /(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.xata\.tech.*/;
856
+ const match = url.match(regex) || url.match(regexStaging) || url.match(regexDevCloudflare) || url.match(regexStagingCloudflare) || url.match(regexProdCloudflare);
855
857
  if (!match)
856
858
  return null;
857
859
  return { workspace: match[1], region: match[2] };