@@ -556,18 +556,22 @@ namespace Models {
556
556
* User ID.
557
557
*/
558
558
userId : string ;
559
- /**
560
- * Team ID.
561
- */
562
- teamId : string ;
563
559
/**
564
560
* User name.
565
561
*/
566
- name : string ;
562
+ userName : string ;
567
563
/**
568
564
* User email address.
569
565
*/
570
- email : string ;
566
+ userEmail : string ;
567
+ /**
568
+ * Team ID.
569
+ */
570
+ teamId : string ;
571
+ /**
572
+ * Team name.
573
+ */
574
+ teamName : string ;
571
575
/**
572
576
* Date, the user has been invited to join the team in Unix timestamp.
573
577
*/
@@ -618,9 +622,9 @@ namespace Models {
618
622
*/
619
623
statusCode : number ;
620
624
/**
621
- * The script stdout output string. Logs the last 4,000 characters of the execution stdout output.
625
+ * The script response output string. Logs the last 4,000 characters of the execution response output.
622
626
*/
623
- stdout : string ;
627
+ response : string ;
624
628
/**
625
629
* The script stderr output string. Logs the last 4,000 characters of the execution stderr output
626
630
*/
@@ -823,7 +827,7 @@ class Appwrite {
823
827
locale : '' ,
824
828
} ;
825
829
headers : Headers = {
826
- 'x-sdk-version' : 'appwrite:web:7 .0.0' ,
830
+ 'x-sdk-version' : 'appwrite:web:8 .0.0' ,
827
831
'X-Appwrite-Response-Format' : '0.13.0' ,
828
832
} ;
829
833
@@ -1249,28 +1253,6 @@ class Appwrite {
1249
1253
} , payload ) ;
1250
1254
} ,
1251
1255
1252
- /**
1253
- * Delete Account
1254
- *
1255
- * Delete a currently logged in user account. Behind the scene, the user
1256
- * record is not deleted but permanently blocked from any access. This is done
1257
- * to avoid deleted accounts being overtaken by new users with the same email
1258
- * address. Any user-related resources like documents or storage files should
1259
- * be deleted separately.
1260
- *
1261
- * @throws {AppwriteException }
1262
- * @returns {Promise }
1263
- */
1264
- delete : async ( ) : Promise < { } > => {
1265
- let path = '/account' ;
1266
- let payload : Payload = { } ;
1267
-
1268
- const uri = new URL ( this . config . endpoint + path ) ;
1269
- return await this . call ( 'delete' , uri , {
1270
- 'content-type' : 'application/json' ,
1271
- } , payload ) ;
1272
- } ,
1273
-
1274
1256
/**
1275
1257
* Update Account Email
1276
1258
*
@@ -1397,7 +1379,7 @@ class Appwrite {
1397
1379
*
1398
1380
* Update currently logged in user password. For validation, user is required
1399
1381
* to pass in the new password, and the old password. For users created with
1400
- * OAuth and Team Invites, oldPassword is optional.
1382
+ * OAuth, Team Invites and Magic URL , oldPassword is optional.
1401
1383
*
1402
1384
* @param {string } password
1403
1385
* @param {string } oldPassword
@@ -1856,6 +1838,9 @@ class Appwrite {
1856
1838
/**
1857
1839
* Update Session (Refresh Tokens)
1858
1840
*
1841
+ * Access tokens have limited lifespan and expire to mitigate security risks.
1842
+ * If session was created using an OAuth provider, this route can be used to
1843
+ * "refresh" the access token.
1859
1844
*
1860
1845
* @param {string } sessionId
1861
1846
* @throws {AppwriteException }
@@ -1901,6 +1886,26 @@ class Appwrite {
1901
1886
} , payload ) ;
1902
1887
} ,
1903
1888
1889
+ /**
1890
+ * Update Account Status
1891
+ *
1892
+ * Block the currently logged in user account. Behind the scene, the user
1893
+ * record is not deleted but permanently blocked from any access. To
1894
+ * completely delete a user, use the Users API instead.
1895
+ *
1896
+ * @throws {AppwriteException }
1897
+ * @returns {Promise }
1898
+ */
1899
+ updateStatus : async < Preferences extends Models . Preferences > ( ) : Promise < Models . User < Preferences > > => {
1900
+ let path = '/account/status' ;
1901
+ let payload : Payload = { } ;
1902
+
1903
+ const uri = new URL ( this . config . endpoint + path ) ;
1904
+ return await this . call ( 'patch' , uri , {
1905
+ 'content-type' : 'application/json' ,
1906
+ } , payload ) ;
1907
+ } ,
1908
+
1904
1909
/**
1905
1910
* Create Email Verification
1906
1911
*
@@ -1988,9 +1993,14 @@ class Appwrite {
1988
1993
* Get Browser Icon
1989
1994
*
1990
1995
* You can use this endpoint to show different browser icons to your users.
1991
- * The code argument receives the browser code as it appears in your user
1992
- * /account/sessions endpoint. Use width, height and quality arguments to
1993
- * change the output settings.
1996
+ * The code argument receives the browser code as it appears in your user [GET
1997
+ * /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use
1998
+ * width, height and quality arguments to change the output settings.
1999
+ *
2000
+ * When one dimension is specified and the other is 0, the image is scaled
2001
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
2002
+ * image at source quality. If dimensions are not specified, the default size
2003
+ * of image returned is 100x100px.
1994
2004
*
1995
2005
* @param {string } code
1996
2006
* @param {number } width
@@ -2035,6 +2045,12 @@ class Appwrite {
2035
2045
* The credit card endpoint will return you the icon of the credit card
2036
2046
* provider you need. Use width, height and quality arguments to change the
2037
2047
* output settings.
2048
+ *
2049
+ * When one dimension is specified and the other is 0, the image is scaled
2050
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
2051
+ * image at source quality. If dimensions are not specified, the default size
2052
+ * of image returned is 100x100px.
2053
+ *
2038
2054
*
2039
2055
* @param {string } code
2040
2056
* @param {number } width
@@ -2112,6 +2128,12 @@ class Appwrite {
2112
2128
* You can use this endpoint to show different country flags icons to your
2113
2129
* users. The code argument receives the 2 letter country code. Use width,
2114
2130
* height and quality arguments to change the output settings.
2131
+ *
2132
+ * When one dimension is specified and the other is 0, the image is scaled
2133
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
2134
+ * image at source quality. If dimensions are not specified, the default size
2135
+ * of image returned is 100x100px.
2136
+ *
2115
2137
*
2116
2138
* @param {string } code
2117
2139
* @param {number } width
@@ -2157,6 +2179,12 @@ class Appwrite {
2157
2179
* you want. This endpoint is very useful if you need to crop and display
2158
2180
* remote images in your app or in case you want to make sure a 3rd party
2159
2181
* image is properly served using a TLS protocol.
2182
+ *
2183
+ * When one dimension is specified and the other is 0, the image is scaled
2184
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
2185
+ * image at source quality. If dimensions are not specified, the default size
2186
+ * of image returned is 400x400px.
2187
+ *
2160
2188
*
2161
2189
* @param {string } url
2162
2190
* @param {number } width
@@ -2207,6 +2235,12 @@ class Appwrite {
2207
2235
* default, a random theme will be selected. The random theme will persist for
2208
2236
* the user's initials when reloading the same theme will always return for
2209
2237
* the same initials.
2238
+ *
2239
+ * When one dimension is specified and the other is 0, the image is scaled
2240
+ * with preserved aspect ratio. If both dimensions are 0, the API provides an
2241
+ * image at source quality. If dimensions are not specified, the default size
2242
+ * of image returned is 100x100px.
2243
+ *
2210
2244
*
2211
2245
* @param {string } name
2212
2246
* @param {number } width
@@ -2255,6 +2289,7 @@ class Appwrite {
2255
2289
*
2256
2290
* Converts a given plain text to a QR code image. You can use the query
2257
2291
* parameters to change the size and style of the resulting image.
2292
+ *
2258
2293
*
2259
2294
* @param {string } text
2260
2295
* @param {number } size
@@ -2495,9 +2530,7 @@ class Appwrite {
2495
2530
/**
2496
2531
* Delete Document
2497
2532
*
2498
- * Delete a document by its unique ID. This endpoint deletes only the parent
2499
- * documents, its attributes and relations to other documents. Child documents
2500
- * **will not** be deleted.
2533
+ * Delete a document by its unique ID.
2501
2534
*
2502
2535
* @param {string } collectionId
2503
2536
* @param {string } documentId
0 commit comments