node-appwrite 20.1.0 → 20.2.1

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.
@@ -67,6 +67,129 @@ declare class TablesDB {
67
67
  * @deprecated Use the object parameter style method for a better developer experience.
68
68
  */
69
69
  create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
70
+ /**
71
+ * List transactions across all databases.
72
+ *
73
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
74
+ * @throws {AppwriteException}
75
+ * @returns {Promise<Models.TransactionList>}
76
+ */
77
+ listTransactions(params?: {
78
+ queries?: string[];
79
+ }): Promise<Models.TransactionList>;
80
+ /**
81
+ * List transactions across all databases.
82
+ *
83
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
84
+ * @throws {AppwriteException}
85
+ * @returns {Promise<Models.TransactionList>}
86
+ * @deprecated Use the object parameter style method for a better developer experience.
87
+ */
88
+ listTransactions(queries?: string[]): Promise<Models.TransactionList>;
89
+ /**
90
+ * Create a new transaction.
91
+ *
92
+ * @param {number} params.ttl - Seconds before the transaction expires.
93
+ * @throws {AppwriteException}
94
+ * @returns {Promise<Models.Transaction>}
95
+ */
96
+ createTransaction(params?: {
97
+ ttl?: number;
98
+ }): Promise<Models.Transaction>;
99
+ /**
100
+ * Create a new transaction.
101
+ *
102
+ * @param {number} ttl - Seconds before the transaction expires.
103
+ * @throws {AppwriteException}
104
+ * @returns {Promise<Models.Transaction>}
105
+ * @deprecated Use the object parameter style method for a better developer experience.
106
+ */
107
+ createTransaction(ttl?: number): Promise<Models.Transaction>;
108
+ /**
109
+ * Get a transaction by its unique ID.
110
+ *
111
+ * @param {string} params.transactionId - Transaction ID.
112
+ * @throws {AppwriteException}
113
+ * @returns {Promise<Models.Transaction>}
114
+ */
115
+ getTransaction(params: {
116
+ transactionId: string;
117
+ }): Promise<Models.Transaction>;
118
+ /**
119
+ * Get a transaction by its unique ID.
120
+ *
121
+ * @param {string} transactionId - Transaction ID.
122
+ * @throws {AppwriteException}
123
+ * @returns {Promise<Models.Transaction>}
124
+ * @deprecated Use the object parameter style method for a better developer experience.
125
+ */
126
+ getTransaction(transactionId: string): Promise<Models.Transaction>;
127
+ /**
128
+ * Update a transaction, to either commit or roll back its operations.
129
+ *
130
+ * @param {string} params.transactionId - Transaction ID.
131
+ * @param {boolean} params.commit - Commit transaction?
132
+ * @param {boolean} params.rollback - Rollback transaction?
133
+ * @throws {AppwriteException}
134
+ * @returns {Promise<Models.Transaction>}
135
+ */
136
+ updateTransaction(params: {
137
+ transactionId: string;
138
+ commit?: boolean;
139
+ rollback?: boolean;
140
+ }): Promise<Models.Transaction>;
141
+ /**
142
+ * Update a transaction, to either commit or roll back its operations.
143
+ *
144
+ * @param {string} transactionId - Transaction ID.
145
+ * @param {boolean} commit - Commit transaction?
146
+ * @param {boolean} rollback - Rollback transaction?
147
+ * @throws {AppwriteException}
148
+ * @returns {Promise<Models.Transaction>}
149
+ * @deprecated Use the object parameter style method for a better developer experience.
150
+ */
151
+ updateTransaction(transactionId: string, commit?: boolean, rollback?: boolean): Promise<Models.Transaction>;
152
+ /**
153
+ * Delete a transaction by its unique ID.
154
+ *
155
+ * @param {string} params.transactionId - Transaction ID.
156
+ * @throws {AppwriteException}
157
+ * @returns {Promise<{}>}
158
+ */
159
+ deleteTransaction(params: {
160
+ transactionId: string;
161
+ }): Promise<{}>;
162
+ /**
163
+ * Delete a transaction by its unique ID.
164
+ *
165
+ * @param {string} transactionId - Transaction ID.
166
+ * @throws {AppwriteException}
167
+ * @returns {Promise<{}>}
168
+ * @deprecated Use the object parameter style method for a better developer experience.
169
+ */
170
+ deleteTransaction(transactionId: string): Promise<{}>;
171
+ /**
172
+ * Create multiple operations in a single transaction.
173
+ *
174
+ * @param {string} params.transactionId - Transaction ID.
175
+ * @param {object[]} params.operations - Array of staged operations.
176
+ * @throws {AppwriteException}
177
+ * @returns {Promise<Models.Transaction>}
178
+ */
179
+ createOperations(params: {
180
+ transactionId: string;
181
+ operations?: object[];
182
+ }): Promise<Models.Transaction>;
183
+ /**
184
+ * Create multiple operations in a single transaction.
185
+ *
186
+ * @param {string} transactionId - Transaction ID.
187
+ * @param {object[]} operations - Array of staged operations.
188
+ * @throws {AppwriteException}
189
+ * @returns {Promise<Models.Transaction>}
190
+ * @deprecated Use the object parameter style method for a better developer experience.
191
+ */
192
+ createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
70
193
  /**
71
194
  * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
72
195
  *
@@ -1411,6 +1534,7 @@ declare class TablesDB {
1411
1534
  * @param {string} params.databaseId - Database ID.
1412
1535
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
1413
1536
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1537
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1414
1538
  * @throws {AppwriteException}
1415
1539
  * @returns {Promise<Models.RowList<Row>>}
1416
1540
  */
@@ -1418,6 +1542,7 @@ declare class TablesDB {
1418
1542
  databaseId: string;
1419
1543
  tableId: string;
1420
1544
  queries?: string[];
1545
+ transactionId?: string;
1421
1546
  }): Promise<Models.RowList<Row>>;
1422
1547
  /**
1423
1548
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
@@ -1425,11 +1550,12 @@ declare class TablesDB {
1425
1550
  * @param {string} databaseId - Database ID.
1426
1551
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
1427
1552
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1553
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1428
1554
  * @throws {AppwriteException}
1429
1555
  * @returns {Promise<Models.RowList<Row>>}
1430
1556
  * @deprecated Use the object parameter style method for a better developer experience.
1431
1557
  */
1432
- listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
1558
+ listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
1433
1559
  /**
1434
1560
  * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1435
1561
  *
@@ -1438,6 +1564,7 @@ declare class TablesDB {
1438
1564
  * @param {string} params.rowId - Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1439
1565
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>} params.data - Row data as JSON object.
1440
1566
  * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
1567
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1441
1568
  * @throws {AppwriteException}
1442
1569
  * @returns {Promise<Row>}
1443
1570
  */
@@ -1447,6 +1574,7 @@ declare class TablesDB {
1447
1574
  rowId: string;
1448
1575
  data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>;
1449
1576
  permissions?: string[];
1577
+ transactionId?: string;
1450
1578
  }): Promise<Row>;
1451
1579
  /**
1452
1580
  * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1456,17 +1584,19 @@ declare class TablesDB {
1456
1584
  * @param {string} rowId - Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1457
1585
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>} data - Row data as JSON object.
1458
1586
  * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
1587
+ * @param {string} transactionId - Transaction ID for staging the operation.
1459
1588
  * @throws {AppwriteException}
1460
1589
  * @returns {Promise<Row>}
1461
1590
  * @deprecated Use the object parameter style method for a better developer experience.
1462
1591
  */
1463
- createRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>, permissions?: string[]): Promise<Row>;
1592
+ createRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Omit<Row, keyof Models.Row>, permissions?: string[], transactionId?: string): Promise<Row>;
1464
1593
  /**
1465
1594
  * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1466
1595
  *
1467
1596
  * @param {string} params.databaseId - Database ID.
1468
1597
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
1469
1598
  * @param {object[]} params.rows - Array of rows data as JSON objects.
1599
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1470
1600
  * @throws {AppwriteException}
1471
1601
  * @returns {Promise<Models.RowList<Row>>}
1472
1602
  */
@@ -1474,6 +1604,7 @@ declare class TablesDB {
1474
1604
  databaseId: string;
1475
1605
  tableId: string;
1476
1606
  rows: object[];
1607
+ transactionId?: string;
1477
1608
  }): Promise<Models.RowList<Row>>;
1478
1609
  /**
1479
1610
  * Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1481,11 +1612,12 @@ declare class TablesDB {
1481
1612
  * @param {string} databaseId - Database ID.
1482
1613
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
1483
1614
  * @param {object[]} rows - Array of rows data as JSON objects.
1615
+ * @param {string} transactionId - Transaction ID for staging the operation.
1484
1616
  * @throws {AppwriteException}
1485
1617
  * @returns {Promise<Models.RowList<Row>>}
1486
1618
  * @deprecated Use the object parameter style method for a better developer experience.
1487
1619
  */
1488
- createRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[]): Promise<Models.RowList<Row>>;
1620
+ createRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[], transactionId?: string): Promise<Models.RowList<Row>>;
1489
1621
  /**
1490
1622
  * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1491
1623
  *
@@ -1493,6 +1625,7 @@ declare class TablesDB {
1493
1625
  * @param {string} params.databaseId - Database ID.
1494
1626
  * @param {string} params.tableId - Table ID.
1495
1627
  * @param {object[]} params.rows - Array of row data as JSON objects. May contain partial rows.
1628
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1496
1629
  * @throws {AppwriteException}
1497
1630
  * @returns {Promise<Models.RowList<Row>>}
1498
1631
  */
@@ -1500,6 +1633,7 @@ declare class TablesDB {
1500
1633
  databaseId: string;
1501
1634
  tableId: string;
1502
1635
  rows: object[];
1636
+ transactionId?: string;
1503
1637
  }): Promise<Models.RowList<Row>>;
1504
1638
  /**
1505
1639
  * Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1508,11 +1642,12 @@ declare class TablesDB {
1508
1642
  * @param {string} databaseId - Database ID.
1509
1643
  * @param {string} tableId - Table ID.
1510
1644
  * @param {object[]} rows - Array of row data as JSON objects. May contain partial rows.
1645
+ * @param {string} transactionId - Transaction ID for staging the operation.
1511
1646
  * @throws {AppwriteException}
1512
1647
  * @returns {Promise<Models.RowList<Row>>}
1513
1648
  * @deprecated Use the object parameter style method for a better developer experience.
1514
1649
  */
1515
- upsertRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[]): Promise<Models.RowList<Row>>;
1650
+ upsertRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rows: object[], transactionId?: string): Promise<Models.RowList<Row>>;
1516
1651
  /**
1517
1652
  * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.
1518
1653
  *
@@ -1520,6 +1655,7 @@ declare class TablesDB {
1520
1655
  * @param {string} params.tableId - Table ID.
1521
1656
  * @param {object} params.data - Row data as JSON object. Include only column and value pairs to be updated.
1522
1657
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1658
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1523
1659
  * @throws {AppwriteException}
1524
1660
  * @returns {Promise<Models.RowList<Row>>}
1525
1661
  */
@@ -1528,6 +1664,7 @@ declare class TablesDB {
1528
1664
  tableId: string;
1529
1665
  data?: object;
1530
1666
  queries?: string[];
1667
+ transactionId?: string;
1531
1668
  }): Promise<Models.RowList<Row>>;
1532
1669
  /**
1533
1670
  * Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.
@@ -1536,17 +1673,19 @@ declare class TablesDB {
1536
1673
  * @param {string} tableId - Table ID.
1537
1674
  * @param {object} data - Row data as JSON object. Include only column and value pairs to be updated.
1538
1675
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1676
+ * @param {string} transactionId - Transaction ID for staging the operation.
1539
1677
  * @throws {AppwriteException}
1540
1678
  * @returns {Promise<Models.RowList<Row>>}
1541
1679
  * @deprecated Use the object parameter style method for a better developer experience.
1542
1680
  */
1543
- updateRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, data?: object, queries?: string[]): Promise<Models.RowList<Row>>;
1681
+ updateRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, data?: object, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
1544
1682
  /**
1545
1683
  * Bulk delete rows using queries, if no queries are passed then all rows are deleted.
1546
1684
  *
1547
1685
  * @param {string} params.databaseId - Database ID.
1548
1686
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1549
1687
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1688
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1550
1689
  * @throws {AppwriteException}
1551
1690
  * @returns {Promise<Models.RowList<Row>>}
1552
1691
  */
@@ -1554,6 +1693,7 @@ declare class TablesDB {
1554
1693
  databaseId: string;
1555
1694
  tableId: string;
1556
1695
  queries?: string[];
1696
+ transactionId?: string;
1557
1697
  }): Promise<Models.RowList<Row>>;
1558
1698
  /**
1559
1699
  * Bulk delete rows using queries, if no queries are passed then all rows are deleted.
@@ -1561,11 +1701,12 @@ declare class TablesDB {
1561
1701
  * @param {string} databaseId - Database ID.
1562
1702
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1563
1703
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1704
+ * @param {string} transactionId - Transaction ID for staging the operation.
1564
1705
  * @throws {AppwriteException}
1565
1706
  * @returns {Promise<Models.RowList<Row>>}
1566
1707
  * @deprecated Use the object parameter style method for a better developer experience.
1567
1708
  */
1568
- deleteRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[]): Promise<Models.RowList<Row>>;
1709
+ deleteRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
1569
1710
  /**
1570
1711
  * Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
1571
1712
  *
@@ -1573,6 +1714,7 @@ declare class TablesDB {
1573
1714
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1574
1715
  * @param {string} params.rowId - Row ID.
1575
1716
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1717
+ * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1576
1718
  * @throws {AppwriteException}
1577
1719
  * @returns {Promise<Row>}
1578
1720
  */
@@ -1581,6 +1723,7 @@ declare class TablesDB {
1581
1723
  tableId: string;
1582
1724
  rowId: string;
1583
1725
  queries?: string[];
1726
+ transactionId?: string;
1584
1727
  }): Promise<Row>;
1585
1728
  /**
1586
1729
  * Get a row by its unique ID. This endpoint response returns a JSON object with the row data.
@@ -1589,11 +1732,12 @@ declare class TablesDB {
1589
1732
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1590
1733
  * @param {string} rowId - Row ID.
1591
1734
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1735
+ * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1592
1736
  * @throws {AppwriteException}
1593
1737
  * @returns {Promise<Row>}
1594
1738
  * @deprecated Use the object parameter style method for a better developer experience.
1595
1739
  */
1596
- getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[]): Promise<Row>;
1740
+ getRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, queries?: string[], transactionId?: string): Promise<Row>;
1597
1741
  /**
1598
1742
  * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1599
1743
  *
@@ -1602,6 +1746,7 @@ declare class TablesDB {
1602
1746
  * @param {string} params.rowId - Row ID.
1603
1747
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} params.data - Row data as JSON object. Include all required columns of the row to be created or updated.
1604
1748
  * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1749
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1605
1750
  * @throws {AppwriteException}
1606
1751
  * @returns {Promise<Row>}
1607
1752
  */
@@ -1611,6 +1756,7 @@ declare class TablesDB {
1611
1756
  rowId: string;
1612
1757
  data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
1613
1758
  permissions?: string[];
1759
+ transactionId?: string;
1614
1760
  }): Promise<Row>;
1615
1761
  /**
1616
1762
  * Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
@@ -1620,11 +1766,12 @@ declare class TablesDB {
1620
1766
  * @param {string} rowId - Row ID.
1621
1767
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} data - Row data as JSON object. Include all required columns of the row to be created or updated.
1622
1768
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1769
+ * @param {string} transactionId - Transaction ID for staging the operation.
1623
1770
  * @throws {AppwriteException}
1624
1771
  * @returns {Promise<Row>}
1625
1772
  * @deprecated Use the object parameter style method for a better developer experience.
1626
1773
  */
1627
- upsertRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[]): Promise<Row>;
1774
+ upsertRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string): Promise<Row>;
1628
1775
  /**
1629
1776
  * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
1630
1777
  *
@@ -1633,6 +1780,7 @@ declare class TablesDB {
1633
1780
  * @param {string} params.rowId - Row ID.
1634
1781
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} params.data - Row data as JSON object. Include only columns and value pairs to be updated.
1635
1782
  * @param {string[]} params.permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1783
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1636
1784
  * @throws {AppwriteException}
1637
1785
  * @returns {Promise<Row>}
1638
1786
  */
@@ -1642,6 +1790,7 @@ declare class TablesDB {
1642
1790
  rowId: string;
1643
1791
  data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>;
1644
1792
  permissions?: string[];
1793
+ transactionId?: string;
1645
1794
  }): Promise<Row>;
1646
1795
  /**
1647
1796
  * Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.
@@ -1651,17 +1800,19 @@ declare class TablesDB {
1651
1800
  * @param {string} rowId - Row ID.
1652
1801
  * @param {Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>} data - Row data as JSON object. Include only columns and value pairs to be updated.
1653
1802
  * @param {string[]} permissions - An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1803
+ * @param {string} transactionId - Transaction ID for staging the operation.
1654
1804
  * @throws {AppwriteException}
1655
1805
  * @returns {Promise<Row>}
1656
1806
  * @deprecated Use the object parameter style method for a better developer experience.
1657
1807
  */
1658
- updateRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[]): Promise<Row>;
1808
+ updateRow<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, data?: Row extends Models.DefaultRow ? Partial<Models.Row> & Record<string, any> : Partial<Models.Row> & Partial<Omit<Row, keyof Models.Row>>, permissions?: string[], transactionId?: string): Promise<Row>;
1659
1809
  /**
1660
1810
  * Delete a row by its unique ID.
1661
1811
  *
1662
1812
  * @param {string} params.databaseId - Database ID.
1663
1813
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1664
1814
  * @param {string} params.rowId - Row ID.
1815
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1665
1816
  * @throws {AppwriteException}
1666
1817
  * @returns {Promise<{}>}
1667
1818
  */
@@ -1669,6 +1820,7 @@ declare class TablesDB {
1669
1820
  databaseId: string;
1670
1821
  tableId: string;
1671
1822
  rowId: string;
1823
+ transactionId?: string;
1672
1824
  }): Promise<{}>;
1673
1825
  /**
1674
1826
  * Delete a row by its unique ID.
@@ -1676,11 +1828,12 @@ declare class TablesDB {
1676
1828
  * @param {string} databaseId - Database ID.
1677
1829
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1678
1830
  * @param {string} rowId - Row ID.
1831
+ * @param {string} transactionId - Transaction ID for staging the operation.
1679
1832
  * @throws {AppwriteException}
1680
1833
  * @returns {Promise<{}>}
1681
1834
  * @deprecated Use the object parameter style method for a better developer experience.
1682
1835
  */
1683
- deleteRow(databaseId: string, tableId: string, rowId: string): Promise<{}>;
1836
+ deleteRow(databaseId: string, tableId: string, rowId: string, transactionId?: string): Promise<{}>;
1684
1837
  /**
1685
1838
  * Decrement a specific column of a row by a given value.
1686
1839
  *
@@ -1690,6 +1843,7 @@ declare class TablesDB {
1690
1843
  * @param {string} params.column - Column key.
1691
1844
  * @param {number} params.value - Value to increment the column by. The value must be a number.
1692
1845
  * @param {number} params.min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
1846
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1693
1847
  * @throws {AppwriteException}
1694
1848
  * @returns {Promise<Row>}
1695
1849
  */
@@ -1700,6 +1854,7 @@ declare class TablesDB {
1700
1854
  column: string;
1701
1855
  value?: number;
1702
1856
  min?: number;
1857
+ transactionId?: string;
1703
1858
  }): Promise<Row>;
1704
1859
  /**
1705
1860
  * Decrement a specific column of a row by a given value.
@@ -1710,11 +1865,12 @@ declare class TablesDB {
1710
1865
  * @param {string} column - Column key.
1711
1866
  * @param {number} value - Value to increment the column by. The value must be a number.
1712
1867
  * @param {number} min - Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
1868
+ * @param {string} transactionId - Transaction ID for staging the operation.
1713
1869
  * @throws {AppwriteException}
1714
1870
  * @returns {Promise<Row>}
1715
1871
  * @deprecated Use the object parameter style method for a better developer experience.
1716
1872
  */
1717
- decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number): Promise<Row>;
1873
+ decrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, min?: number, transactionId?: string): Promise<Row>;
1718
1874
  /**
1719
1875
  * Increment a specific column of a row by a given value.
1720
1876
  *
@@ -1724,6 +1880,7 @@ declare class TablesDB {
1724
1880
  * @param {string} params.column - Column key.
1725
1881
  * @param {number} params.value - Value to increment the column by. The value must be a number.
1726
1882
  * @param {number} params.max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
1883
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
1727
1884
  * @throws {AppwriteException}
1728
1885
  * @returns {Promise<Row>}
1729
1886
  */
@@ -1734,6 +1891,7 @@ declare class TablesDB {
1734
1891
  column: string;
1735
1892
  value?: number;
1736
1893
  max?: number;
1894
+ transactionId?: string;
1737
1895
  }): Promise<Row>;
1738
1896
  /**
1739
1897
  * Increment a specific column of a row by a given value.
@@ -1744,11 +1902,12 @@ declare class TablesDB {
1744
1902
  * @param {string} column - Column key.
1745
1903
  * @param {number} value - Value to increment the column by. The value must be a number.
1746
1904
  * @param {number} max - Maximum value for the column. If the current value is greater than this value, an error will be thrown.
1905
+ * @param {string} transactionId - Transaction ID for staging the operation.
1747
1906
  * @throws {AppwriteException}
1748
1907
  * @returns {Promise<Row>}
1749
1908
  * @deprecated Use the object parameter style method for a better developer experience.
1750
1909
  */
1751
- incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number): Promise<Row>;
1910
+ incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
1752
1911
  }
1753
1912
 
1754
1913
  export { TablesDB };