@appwrite.io/console 1.9.0 → 1.10.0

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.
Files changed (55) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/CHANGELOG.md +45 -6
  3. package/README.md +82 -2
  4. package/dist/cjs/sdk.js +246 -193
  5. package/dist/cjs/sdk.js.map +1 -1
  6. package/dist/esm/sdk.js +246 -193
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +246 -193
  9. package/docs/examples/databases/create-document.md +1 -3
  10. package/docs/examples/databases/create-documents.md +1 -1
  11. package/docs/examples/functions/create-execution.md +1 -1
  12. package/docs/examples/organizations/get-available-credits.md +13 -0
  13. package/docs/examples/organizations/update-projects.md +14 -0
  14. package/docs/examples/vcs/get-repository-contents.md +2 -1
  15. package/package.json +1 -1
  16. package/src/client.ts +1 -1
  17. package/src/models.ts +241 -9
  18. package/src/services/account.ts +97 -36
  19. package/src/services/avatars.ts +26 -20
  20. package/src/services/backups.ts +11 -0
  21. package/src/services/console.ts +8 -1
  22. package/src/services/databases.ts +97 -33
  23. package/src/services/domains.ts +111 -69
  24. package/src/services/functions.ts +37 -8
  25. package/src/services/graphql.ts +1 -0
  26. package/src/services/health.ts +26 -1
  27. package/src/services/locale.ts +9 -2
  28. package/src/services/messaging.ts +53 -8
  29. package/src/services/migrations.ts +12 -0
  30. package/src/services/organizations.ts +106 -16
  31. package/src/services/project.ts +5 -0
  32. package/src/services/projects.ts +50 -0
  33. package/src/services/proxy.ts +7 -0
  34. package/src/services/sites.ts +32 -4
  35. package/src/services/storage.ts +23 -9
  36. package/src/services/teams.ts +30 -17
  37. package/src/services/tokens.ts +4 -0
  38. package/src/services/users.ts +69 -27
  39. package/src/services/vcs.ts +16 -4
  40. package/types/models.d.ts +228 -192
  41. package/types/services/account.d.ts +36 -36
  42. package/types/services/avatars.d.ts +20 -20
  43. package/types/services/console.d.ts +1 -1
  44. package/types/services/databases.d.ts +43 -33
  45. package/types/services/domains.d.ts +69 -69
  46. package/types/services/functions.d.ts +8 -8
  47. package/types/services/health.d.ts +1 -1
  48. package/types/services/locale.d.ts +2 -2
  49. package/types/services/messaging.d.ts +8 -8
  50. package/types/services/organizations.d.ts +33 -16
  51. package/types/services/sites.d.ts +4 -4
  52. package/types/services/storage.d.ts +9 -9
  53. package/types/services/teams.d.ts +17 -17
  54. package/types/services/users.d.ts +27 -27
  55. package/types/services/vcs.d.ts +4 -4
@@ -78,13 +78,13 @@ export declare class Storage {
78
78
  listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
79
79
  /**
80
80
  * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
81
-
82
- Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
83
-
84
- When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
85
-
86
- If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
87
-
81
+ *
82
+ * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
83
+ *
84
+ * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file&#039;s **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
85
+ *
86
+ * If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
87
+ *
88
88
  *
89
89
  * @param {string} bucketId
90
90
  * @param {string} fileId
@@ -166,7 +166,7 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk
166
166
  getFileView(bucketId: string, fileId: string, token?: string): string;
167
167
  /**
168
168
  * Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
169
-
169
+ *
170
170
  *
171
171
  * @param {StorageUsageRange} range
172
172
  * @throws {AppwriteException}
@@ -175,7 +175,7 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk
175
175
  getUsage(range?: StorageUsageRange): Promise<Models.UsageStorage>;
176
176
  /**
177
177
  * Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
178
-
178
+ *
179
179
  *
180
180
  * @param {string} bucketId
181
181
  * @param {StorageUsageRange} range
@@ -11,7 +11,7 @@ export declare class Teams {
11
11
  * @throws {AppwriteException}
12
12
  * @returns {Promise<Models.TeamList<Preferences>>}
13
13
  */
14
- list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
14
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
15
15
  /**
16
16
  * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
17
17
  *
@@ -21,7 +21,7 @@ export declare class Teams {
21
21
  * @throws {AppwriteException}
22
22
  * @returns {Promise<Models.Team<Preferences>>}
23
23
  */
24
- create<Preferences extends Models.Preferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
24
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
25
25
  /**
26
26
  * Get a team by its ID. All team members have read access for this resource.
27
27
  *
@@ -29,7 +29,7 @@ export declare class Teams {
29
29
  * @throws {AppwriteException}
30
30
  * @returns {Promise<Models.Team<Preferences>>}
31
31
  */
32
- get<Preferences extends Models.Preferences>(teamId: string): Promise<Models.Team<Preferences>>;
32
+ get<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Models.Team<Preferences>>;
33
33
  /**
34
34
  * Update the team&#039;s name by its unique ID.
35
35
  *
@@ -38,7 +38,7 @@ export declare class Teams {
38
38
  * @throws {AppwriteException}
39
39
  * @returns {Promise<Models.Team<Preferences>>}
40
40
  */
41
- updateName<Preferences extends Models.Preferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
41
+ updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
42
42
  /**
43
43
  * Delete a team using its ID. Only team members with the owner role can delete the team.
44
44
  *
@@ -68,13 +68,13 @@ export declare class Teams {
68
68
  listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
69
69
  /**
70
70
  * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn&#039;t exist. If initiated from a Server SDK, the new member will be added automatically to the team.
71
-
72
- You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
73
-
74
- Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
75
-
76
- Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
77
-
71
+ *
72
+ * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID &gt; email &gt; phone number if you provide more than one of these parameters.
73
+ *
74
+ * Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
75
+ *
76
+ * Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
77
+ *
78
78
  *
79
79
  * @param {string} teamId
80
80
  * @param {string[]} roles
@@ -98,7 +98,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
98
98
  getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;
99
99
  /**
100
100
  * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
101
-
101
+ *
102
102
  *
103
103
  * @param {string} teamId
104
104
  * @param {string} membershipId
@@ -118,9 +118,9 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
118
118
  deleteMembership(teamId: string, membershipId: string): Promise<{}>;
119
119
  /**
120
120
  * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
121
-
122
- If the request is successful, a session for the user is automatically created.
123
-
121
+ *
122
+ * If the request is successful, a session for the user is automatically created.
123
+ *
124
124
  *
125
125
  * @param {string} teamId
126
126
  * @param {string} membershipId
@@ -137,7 +137,7 @@ If the request is successful, a session for the user is automatically created.
137
137
  * @throws {AppwriteException}
138
138
  * @returns {Promise<Preferences>}
139
139
  */
140
- getPrefs<Preferences extends Models.Preferences>(teamId: string): Promise<Preferences>;
140
+ getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Preferences>;
141
141
  /**
142
142
  * Update the team&#039;s preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.
143
143
  *
@@ -146,5 +146,5 @@ If the request is successful, a session for the user is automatically created.
146
146
  * @throws {AppwriteException}
147
147
  * @returns {Promise<Preferences>}
148
148
  */
149
- updatePrefs<Preferences extends Models.Preferences>(teamId: string, prefs: object): Promise<Preferences>;
149
+ updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, prefs: object): Promise<Preferences>;
150
150
  }
@@ -15,7 +15,7 @@ export declare class Users {
15
15
  * @throws {AppwriteException}
16
16
  * @returns {Promise<Models.UserList<Preferences>>}
17
17
  */
18
- list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
18
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
19
19
  /**
20
20
  * Create a new user.
21
21
  *
@@ -27,7 +27,7 @@ export declare class Users {
27
27
  * @throws {AppwriteException}
28
28
  * @returns {Promise<Models.User<Preferences>>}
29
29
  */
30
- create<Preferences extends Models.Preferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>>;
30
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email?: string, phone?: string, password?: string, name?: string): Promise<Models.User<Preferences>>;
31
31
  /**
32
32
  * Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
33
33
  *
@@ -38,7 +38,7 @@ export declare class Users {
38
38
  * @throws {AppwriteException}
39
39
  * @returns {Promise<Models.User<Preferences>>}
40
40
  */
41
- createArgon2User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
41
+ createArgon2User<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
42
42
  /**
43
43
  * Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
44
44
  *
@@ -49,7 +49,7 @@ export declare class Users {
49
49
  * @throws {AppwriteException}
50
50
  * @returns {Promise<Models.User<Preferences>>}
51
51
  */
52
- createBcryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
52
+ createBcryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
53
53
  /**
54
54
  * Get identities for all users.
55
55
  *
@@ -77,7 +77,7 @@ export declare class Users {
77
77
  * @throws {AppwriteException}
78
78
  * @returns {Promise<Models.User<Preferences>>}
79
79
  */
80
- createMD5User<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
80
+ createMD5User<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
81
81
  /**
82
82
  * Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
83
83
  *
@@ -88,7 +88,7 @@ export declare class Users {
88
88
  * @throws {AppwriteException}
89
89
  * @returns {Promise<Models.User<Preferences>>}
90
90
  */
91
- createPHPassUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
91
+ createPHPassUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
92
92
  /**
93
93
  * Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
94
94
  *
@@ -104,7 +104,7 @@ export declare class Users {
104
104
  * @throws {AppwriteException}
105
105
  * @returns {Promise<Models.User<Preferences>>}
106
106
  */
107
- createScryptUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>>;
107
+ createScryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string): Promise<Models.User<Preferences>>;
108
108
  /**
109
109
  * Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
110
110
  *
@@ -118,7 +118,7 @@ export declare class Users {
118
118
  * @throws {AppwriteException}
119
119
  * @returns {Promise<Models.User<Preferences>>}
120
120
  */
121
- createScryptModifiedUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>>;
121
+ createScryptModifiedUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string): Promise<Models.User<Preferences>>;
122
122
  /**
123
123
  * Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
124
124
  *
@@ -130,10 +130,10 @@ export declare class Users {
130
130
  * @throws {AppwriteException}
131
131
  * @returns {Promise<Models.User<Preferences>>}
132
132
  */
133
- createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
133
+ createSHAUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
134
134
  /**
135
135
  * Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
136
-
136
+ *
137
137
  *
138
138
  * @param {UserUsageRange} range
139
139
  * @throws {AppwriteException}
@@ -147,7 +147,7 @@ export declare class Users {
147
147
  * @throws {AppwriteException}
148
148
  * @returns {Promise<Models.User<Preferences>>}
149
149
  */
150
- get<Preferences extends Models.Preferences>(userId: string): Promise<Models.User<Preferences>>;
150
+ get<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string): Promise<Models.User<Preferences>>;
151
151
  /**
152
152
  * Delete a user by its unique ID, thereby releasing it&#039;s ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.
153
153
  *
@@ -164,7 +164,7 @@ export declare class Users {
164
164
  * @throws {AppwriteException}
165
165
  * @returns {Promise<Models.User<Preferences>>}
166
166
  */
167
- updateEmail<Preferences extends Models.Preferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
167
+ updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
168
168
  /**
169
169
  * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
170
170
  *
@@ -177,15 +177,15 @@ export declare class Users {
177
177
  createJWT(userId: string, sessionId?: string, duration?: number): Promise<Models.Jwt>;
178
178
  /**
179
179
  * Update the user labels by its unique ID.
180
-
181
- Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.
180
+ *
181
+ * Labels can be used to grant access to resources. While teams are a way for user&#039;s to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.
182
182
  *
183
183
  * @param {string} userId
184
184
  * @param {string[]} labels
185
185
  * @throws {AppwriteException}
186
186
  * @returns {Promise<Models.User<Preferences>>}
187
187
  */
188
- updateLabels<Preferences extends Models.Preferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
188
+ updateLabels<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
189
189
  /**
190
190
  * Get the user activity logs list by its unique ID.
191
191
  *
@@ -213,7 +213,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
213
213
  * @throws {AppwriteException}
214
214
  * @returns {Promise<Models.User<Preferences>>}
215
215
  */
216
- updateMfa<Preferences extends Models.Preferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>>;
216
+ updateMfa<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, mfa: boolean): Promise<Models.User<Preferences>>;
217
217
  /**
218
218
  * Delete an authenticator app.
219
219
  *
@@ -263,7 +263,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
263
263
  * @throws {AppwriteException}
264
264
  * @returns {Promise<Models.User<Preferences>>}
265
265
  */
266
- updateName<Preferences extends Models.Preferences>(userId: string, name: string): Promise<Models.User<Preferences>>;
266
+ updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, name: string): Promise<Models.User<Preferences>>;
267
267
  /**
268
268
  * Update the user password by its unique ID.
269
269
  *
@@ -272,7 +272,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
272
272
  * @throws {AppwriteException}
273
273
  * @returns {Promise<Models.User<Preferences>>}
274
274
  */
275
- updatePassword<Preferences extends Models.Preferences>(userId: string, password: string): Promise<Models.User<Preferences>>;
275
+ updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, password: string): Promise<Models.User<Preferences>>;
276
276
  /**
277
277
  * Update the user phone by its unique ID.
278
278
  *
@@ -281,7 +281,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
281
281
  * @throws {AppwriteException}
282
282
  * @returns {Promise<Models.User<Preferences>>}
283
283
  */
284
- updatePhone<Preferences extends Models.Preferences>(userId: string, number: string): Promise<Models.User<Preferences>>;
284
+ updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, number: string): Promise<Models.User<Preferences>>;
285
285
  /**
286
286
  * Get the user preferences by its unique ID.
287
287
  *
@@ -289,7 +289,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
289
289
  * @throws {AppwriteException}
290
290
  * @returns {Promise<Preferences>}
291
291
  */
292
- getPrefs<Preferences extends Models.Preferences>(userId: string): Promise<Preferences>;
292
+ getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string): Promise<Preferences>;
293
293
  /**
294
294
  * Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.
295
295
  *
@@ -298,7 +298,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
298
298
  * @throws {AppwriteException}
299
299
  * @returns {Promise<Preferences>}
300
300
  */
301
- updatePrefs<Preferences extends Models.Preferences>(userId: string, prefs: object): Promise<Preferences>;
301
+ updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, prefs: object): Promise<Preferences>;
302
302
  /**
303
303
  * Get the user sessions list by its unique ID.
304
304
  *
@@ -309,8 +309,8 @@ Labels can be used to grant access to resources. While teams are a way for user&
309
309
  listSessions(userId: string): Promise<Models.SessionList>;
310
310
  /**
311
311
  * Creates a session for a user. Returns an immediately usable session object.
312
-
313
- If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.
312
+ *
313
+ * If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.
314
314
  *
315
315
  * @param {string} userId
316
316
  * @throws {AppwriteException}
@@ -342,7 +342,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
342
342
  * @throws {AppwriteException}
343
343
  * @returns {Promise<Models.User<Preferences>>}
344
344
  */
345
- updateStatus<Preferences extends Models.Preferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
345
+ updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, status: boolean): Promise<Models.User<Preferences>>;
346
346
  /**
347
347
  * List the messaging targets that are associated with a user.
348
348
  *
@@ -397,7 +397,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
397
397
  deleteTarget(userId: string, targetId: string): Promise<{}>;
398
398
  /**
399
399
  * Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
400
-
400
+ *
401
401
  *
402
402
  * @param {string} userId
403
403
  * @param {number} length
@@ -414,7 +414,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
414
414
  * @throws {AppwriteException}
415
415
  * @returns {Promise<Models.User<Preferences>>}
416
416
  */
417
- updateEmailVerification<Preferences extends Models.Preferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>>;
417
+ updateEmailVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, emailVerification: boolean): Promise<Models.User<Preferences>>;
418
418
  /**
419
419
  * Update the user phone verification status by its unique ID.
420
420
  *
@@ -423,5 +423,5 @@ If you want to generate a token for a custom authentication flow, use the [POST
423
423
  * @throws {AppwriteException}
424
424
  * @returns {Promise<Models.User<Preferences>>}
425
425
  */
426
- updatePhoneVerification<Preferences extends Models.Preferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>>;
426
+ updatePhoneVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, phoneVerification: boolean): Promise<Models.User<Preferences>>;
427
427
  }
@@ -46,7 +46,7 @@ export declare class Vcs {
46
46
  getRepository(installationId: string, providerRepositoryId: string): Promise<Models.ProviderRepository>;
47
47
  /**
48
48
  * Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.
49
-
49
+ *
50
50
  *
51
51
  * @param {string} installationId
52
52
  * @param {string} providerRepositoryId
@@ -56,15 +56,15 @@ export declare class Vcs {
56
56
  listRepositoryBranches(installationId: string, providerRepositoryId: string): Promise<Models.BranchList>;
57
57
  /**
58
58
  * Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
59
-
60
59
  *
61
60
  * @param {string} installationId
62
61
  * @param {string} providerRepositoryId
63
62
  * @param {string} providerRootDirectory
63
+ * @param {string} providerReference
64
64
  * @throws {AppwriteException}
65
65
  * @returns {Promise<Models.VcsContentList>}
66
66
  */
67
- getRepositoryContents(installationId: string, providerRepositoryId: string, providerRootDirectory?: string): Promise<Models.VcsContentList>;
67
+ getRepositoryContents(installationId: string, providerRepositoryId: string, providerRootDirectory?: string, providerReference?: string): Promise<Models.VcsContentList>;
68
68
  /**
69
69
  * Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.
70
70
  *
@@ -77,7 +77,7 @@ export declare class Vcs {
77
77
  updateExternalDeployments(installationId: string, repositoryId: string, providerPullRequestId: string): Promise<{}>;
78
78
  /**
79
79
  * List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.
80
-
80
+ *
81
81
  *
82
82
  * @param {string[]} queries
83
83
  * @param {string} search