@@ -1037,17 +1037,21 @@ declare module "node-appwrite" {
1037
1037
*/
1038
1038
userId : string ;
1039
1039
/**
1040
- * Team ID.
1041
- */
1042
- teamId : string ;
1043
- /**
1044
1040
* User name.
1045
1041
*/
1046
- name : string ;
1042
+ userName : string ;
1047
1043
/**
1048
1044
* User email address.
1049
1045
*/
1050
- email : string ;
1046
+ userEmail : string ;
1047
+ /**
1048
+ * Team ID.
1049
+ */
1050
+ teamId : string ;
1051
+ /**
1052
+ * Team name.
1053
+ */
1054
+ teamName : string ;
1051
1055
/**
1052
1056
* Date, the user has been invited to join the team in Unix timestamp.
1053
1057
*/
@@ -1241,9 +1245,9 @@ declare module "node-appwrite" {
1241
1245
*/
1242
1246
statusCode : number ;
1243
1247
/**
1244
- * The script stdout output string. Logs the last 4,000 characters of the execution stdout output.
1248
+ * The script response output string. Logs the last 4,000 characters of the execution response output.
1245
1249
*/
1246
- stdout : string ;
1250
+ response : string ;
1247
1251
/**
1248
1252
* The script stderr output string. Logs the last 4,000 characters of the execution stderr output
1249
1253
*/
@@ -1506,19 +1510,6 @@ declare module "node-appwrite" {
1506
1510
* @returns {Promise }
1507
1511
*/
1508
1512
get < Preferences extends Models . Preferences > ( ) : Promise < Models . User < Preferences > > ;
1509
- /**
1510
- * Delete Account
1511
- *
1512
- * Delete a currently logged in user account. Behind the scene, the user
1513
- * record is not deleted but permanently blocked from any access. This is done
1514
- * to avoid deleted accounts being overtaken by new users with the same email
1515
- * address. Any user-related resources like documents or storage files should
1516
- * be deleted separately.
1517
- *
1518
- * @throws {AppwriteException }
1519
- * @returns {Promise }
1520
- */
1521
- delete ( ) : Promise < Response > ;
1522
1513
/**
1523
1514
* Update Account Email
1524
1515
*
@@ -1564,7 +1555,7 @@ declare module "node-appwrite" {
1564
1555
*
1565
1556
* Update currently logged in user password. For validation, user is required
1566
1557
* to pass in the new password, and the old password. For users created with
1567
- * OAuth and Team Invites, oldPassword is optional.
1558
+ * OAuth, Team Invites and Magic URL , oldPassword is optional.
1568
1559
*
1569
1560
* @param {string } password
1570
1561
* @param {string } oldPassword
@@ -1666,6 +1657,10 @@ declare module "node-appwrite" {
1666
1657
/**
1667
1658
* Update Session (Refresh Tokens)
1668
1659
*
1660
+ * Access tokens have limited lifespan and expire to mitigate security risks.
1661
+ * If session was created using an OAuth provider, this route can be used to
1662
+ * "refresh" the access token.
1663
+ *
1669
1664
* @param {string } sessionId
1670
1665
* @throws {AppwriteException }
1671
1666
* @returns {Promise }
@@ -1684,6 +1679,17 @@ declare module "node-appwrite" {
1684
1679
* @returns {Promise }
1685
1680
*/
1686
1681
deleteSession ( sessionId : string ) : Promise < Response > ;
1682
+ /**
1683
+ * Update Account Status
1684
+ *
1685
+ * Block the currently logged in user account. Behind the scene, the user
1686
+ * record is not deleted but permanently blocked from any access. To
1687
+ * completely delete a user, use the Users API instead.
1688
+ *
1689
+ * @throws {AppwriteException }
1690
+ * @returns {Promise }
1691
+ */
1692
+ updateStatus < Preferences extends Models . Preferences > ( ) : Promise < Models . User < Preferences > > ;
1687
1693
/**
1688
1694
* Create Email Verification
1689
1695
*
@@ -1728,9 +1734,14 @@ declare module "node-appwrite" {
1728
1734
* Get Browser Icon
1729
1735
*
1730
1736
* You can use this endpoint to show different browser icons to your users.
1731
- * The code argument receives the browser code as it appears in your user
1732
- * /account/sessions endpoint. Use width, height and quality arguments to
1733
- * change the output settings.
1737
+ * The code argument receives the browser code as it appears in your user [GET
1738
+ * /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use
1739
+ * width, height and quality arguments to change the output settings.
1740
+ *
1741
+ * When one dimension is specified and the other is 0, the image is scaled
1742
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
1743
+ * image at source quality. If dimensions are not specified, the default size
1744
+ * of image returned is 100x100px.
1734
1745
*
1735
1746
* @param {string } code
1736
1747
* @param {number } width
@@ -1746,6 +1757,12 @@ declare module "node-appwrite" {
1746
1757
* The credit card endpoint will return you the icon of the credit card
1747
1758
* provider you need. Use width, height and quality arguments to change the
1748
1759
* output settings.
1760
+ *
1761
+ * When one dimension is specified and the other is 0, the image is scaled
1762
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
1763
+ * image at source quality. If dimensions are not specified, the default size
1764
+ * of image returned is 100x100px.
1765
+ *
1749
1766
*
1750
1767
* @param {string } code
1751
1768
* @param {number } width
@@ -1773,6 +1790,12 @@ declare module "node-appwrite" {
1773
1790
* You can use this endpoint to show different country flags icons to your
1774
1791
* users. The code argument receives the 2 letter country code. Use width,
1775
1792
* height and quality arguments to change the output settings.
1793
+ *
1794
+ * When one dimension is specified and the other is 0, the image is scaled
1795
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
1796
+ * image at source quality. If dimensions are not specified, the default size
1797
+ * of image returned is 100x100px.
1798
+ *
1776
1799
*
1777
1800
* @param {string } code
1778
1801
* @param {number } width
@@ -1789,6 +1812,12 @@ declare module "node-appwrite" {
1789
1812
* you want. This endpoint is very useful if you need to crop and display
1790
1813
* remote images in your app or in case you want to make sure a 3rd party
1791
1814
* image is properly served using a TLS protocol.
1815
+ *
1816
+ * When one dimension is specified and the other is 0, the image is scaled
1817
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
1818
+ * image at source quality. If dimensions are not specified, the default size
1819
+ * of image returned is 400x400px.
1820
+ *
1792
1821
*
1793
1822
* @param {string } url
1794
1823
* @param {number } width
@@ -1810,6 +1839,12 @@ declare module "node-appwrite" {
1810
1839
* default, a random theme will be selected. The random theme will persist for
1811
1840
* the user's initials when reloading the same theme will always return for
1812
1841
* the same initials.
1842
+ *
1843
+ * When one dimension is specified and the other is 0, the image is scaled
1844
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
1845
+ * image at source quality. If dimensions are not specified, the default size
1846
+ * of image returned is 100x100px.
1847
+ *
1813
1848
*
1814
1849
* @param {string } name
1815
1850
* @param {number } width
@@ -1825,6 +1860,7 @@ declare module "node-appwrite" {
1825
1860
*
1826
1861
* Converts a given plain text to a QR code image. You can use the query
1827
1862
* parameters to change the size and style of the resulting image.
1863
+ *
1828
1864
*
1829
1865
* @param {string } text
1830
1866
* @param {number } size
@@ -2123,9 +2159,7 @@ declare module "node-appwrite" {
2123
2159
/**
2124
2160
* Delete Document
2125
2161
*
2126
- * Delete a document by its unique ID. This endpoint deletes only the parent
2127
- * documents, its attributes and relations to other documents. Child documents
2128
- * **will not** be deleted.
2162
+ * Delete a document by its unique ID.
2129
2163
*
2130
2164
* @param {string } collectionId
2131
2165
* @param {string } documentId
@@ -2209,7 +2243,7 @@ declare module "node-appwrite" {
2209
2243
*/
2210
2244
create ( functionId : string , name : string , execute : string [ ] , runtime : string , vars ?: object , events ?: string [ ] , schedule ?: string , timeout ?: number ) : Promise < Models . Function > ;
2211
2245
/**
2212
- * List the currently active function runtimes.
2246
+ * List runtimes
2213
2247
*
2214
2248
* Get a list of all runtimes that are currently active on your instance.
2215
2249
*
@@ -2448,16 +2482,6 @@ declare module "node-appwrite" {
2448
2482
* @returns {Promise }
2449
2483
*/
2450
2484
getQueueLogs ( ) : Promise < Models . HealthQueue > ;
2451
- /**
2452
- * Get Usage Queue
2453
- *
2454
- * Get the number of usage stats that are waiting to be processed in the
2455
- * Appwrite internal queue server.
2456
- *
2457
- * @throws {AppwriteException }
2458
- * @returns {Promise }
2459
- */
2460
- getQueueUsage ( ) : Promise < Models . HealthQueue > ;
2461
2485
/**
2462
2486
* Get Webhooks Queue
2463
2487
*
@@ -3000,7 +3024,11 @@ declare module "node-appwrite" {
3000
3024
/**
3001
3025
* Delete User
3002
3026
*
3003
- * Delete a user by its unique ID.
3027
+ * Delete a user by its unique ID, thereby releasing it's ID. Since ID is
3028
+ * released and can be reused, all user-related resources like documents or
3029
+ * storage files should be deleted before user deletion. If you want to keep
3030
+ * ID reserved, use the [updateStatus](/docs/server/users#usersUpdateStatus)
3031
+ * endpoint instead.
3004
3032
*
3005
3033
* @param {string } userId
3006
3034
* @throws {AppwriteException }
@@ -3030,6 +3058,16 @@ declare module "node-appwrite" {
3030
3058
* @returns {Promise }
3031
3059
*/
3032
3060
getLogs ( userId : string , limit ?: number , offset ?: number ) : Promise < Models . LogList > ;
3061
+ /**
3062
+ * Get User Memberships
3063
+ *
3064
+ * Get the user membership list by its unique ID.
3065
+ *
3066
+ * @param {string } userId
3067
+ * @throws {AppwriteException }
3068
+ * @returns {Promise }
3069
+ */
3070
+ getMemberships ( userId : string ) : Promise < Models . MembershipList > ;
3033
3071
/**
3034
3072
* Update Name
3035
3073
*
@@ -3109,7 +3147,8 @@ declare module "node-appwrite" {
3109
3147
/**
3110
3148
* Update User Status
3111
3149
*
3112
- * Update the user status by its unique ID.
3150
+ * Update the user status by its unique ID. Use this endpoint as an
3151
+ * alternative to deleting a user if you want to keep user's ID reserved.
3113
3152
*
3114
3153
* @param {string } userId
3115
3154
* @param {boolean } status
0 commit comments