node-appwrite 15.0.0 → 15.0.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.
Files changed (73) hide show
  1. package/dist/client.js +7 -4
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +7 -4
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/models.d.mts +2 -2
  6. package/dist/models.d.ts +2 -2
  7. package/dist/services/account.d.mts +0 -86
  8. package/dist/services/account.d.ts +0 -86
  9. package/dist/services/account.js +86 -172
  10. package/dist/services/account.js.map +1 -1
  11. package/dist/services/account.mjs +86 -172
  12. package/dist/services/account.mjs.map +1 -1
  13. package/dist/services/avatars.d.mts +0 -14
  14. package/dist/services/avatars.d.ts +0 -14
  15. package/dist/services/avatars.js +14 -28
  16. package/dist/services/avatars.js.map +1 -1
  17. package/dist/services/avatars.mjs +14 -28
  18. package/dist/services/avatars.mjs.map +1 -1
  19. package/dist/services/databases.d.mts +0 -84
  20. package/dist/services/databases.d.ts +0 -84
  21. package/dist/services/databases.js +84 -168
  22. package/dist/services/databases.js.map +1 -1
  23. package/dist/services/databases.mjs +84 -168
  24. package/dist/services/databases.mjs.map +1 -1
  25. package/dist/services/functions.d.mts +0 -48
  26. package/dist/services/functions.d.ts +0 -48
  27. package/dist/services/functions.js +48 -96
  28. package/dist/services/functions.js.map +1 -1
  29. package/dist/services/functions.mjs +48 -96
  30. package/dist/services/functions.mjs.map +1 -1
  31. package/dist/services/graphql.d.mts +0 -4
  32. package/dist/services/graphql.d.ts +0 -4
  33. package/dist/services/graphql.js +4 -8
  34. package/dist/services/graphql.js.map +1 -1
  35. package/dist/services/graphql.mjs +4 -8
  36. package/dist/services/graphql.mjs.map +1 -1
  37. package/dist/services/health.d.mts +0 -46
  38. package/dist/services/health.d.ts +0 -46
  39. package/dist/services/health.js +46 -92
  40. package/dist/services/health.js.map +1 -1
  41. package/dist/services/health.mjs +46 -92
  42. package/dist/services/health.mjs.map +1 -1
  43. package/dist/services/locale.d.mts +0 -16
  44. package/dist/services/locale.d.ts +0 -16
  45. package/dist/services/locale.js +16 -32
  46. package/dist/services/locale.js.map +1 -1
  47. package/dist/services/locale.mjs +16 -32
  48. package/dist/services/locale.mjs.map +1 -1
  49. package/dist/services/messaging.d.mts +3 -95
  50. package/dist/services/messaging.d.ts +3 -95
  51. package/dist/services/messaging.js +95 -187
  52. package/dist/services/messaging.js.map +1 -1
  53. package/dist/services/messaging.mjs +95 -187
  54. package/dist/services/messaging.mjs.map +1 -1
  55. package/dist/services/storage.d.mts +0 -26
  56. package/dist/services/storage.d.ts +0 -26
  57. package/dist/services/storage.js +26 -52
  58. package/dist/services/storage.js.map +1 -1
  59. package/dist/services/storage.mjs +26 -52
  60. package/dist/services/storage.mjs.map +1 -1
  61. package/dist/services/teams.d.mts +0 -26
  62. package/dist/services/teams.d.ts +0 -26
  63. package/dist/services/teams.js +26 -52
  64. package/dist/services/teams.js.map +1 -1
  65. package/dist/services/teams.mjs +26 -52
  66. package/dist/services/teams.mjs.map +1 -1
  67. package/dist/services/users.d.mts +0 -84
  68. package/dist/services/users.d.ts +0 -84
  69. package/dist/services/users.js +84 -168
  70. package/dist/services/users.js.map +1 -1
  71. package/dist/services/users.mjs +84 -168
  72. package/dist/services/users.mjs.map +1 -1
  73. package/package.json +1 -1
@@ -6,8 +6,6 @@ declare class Teams {
6
6
  client: Client;
7
7
  constructor(client: Client);
8
8
  /**
9
- * List teams
10
- *
11
9
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
12
10
  *
13
11
  * @param {string[]} queries
@@ -17,8 +15,6 @@ declare class Teams {
17
15
  */
18
16
  list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
19
17
  /**
20
- * Create team
21
- *
22
18
  * 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.
23
19
  *
24
20
  * @param {string} teamId
@@ -29,8 +25,6 @@ declare class Teams {
29
25
  */
30
26
  create<Preferences extends Models.Preferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
31
27
  /**
32
- * Get team
33
- *
34
28
  * Get a team by its ID. All team members have read access for this resource.
35
29
  *
36
30
  * @param {string} teamId
@@ -39,8 +33,6 @@ declare class Teams {
39
33
  */
40
34
  get<Preferences extends Models.Preferences>(teamId: string): Promise<Models.Team<Preferences>>;
41
35
  /**
42
- * Update name
43
- *
44
36
  * Update the team&#039;s name by its unique ID.
45
37
  *
46
38
  * @param {string} teamId
@@ -50,8 +42,6 @@ declare class Teams {
50
42
  */
51
43
  updateName<Preferences extends Models.Preferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
52
44
  /**
53
- * Delete team
54
- *
55
45
  * Delete a team using its ID. Only team members with the owner role can delete the team.
56
46
  *
57
47
  * @param {string} teamId
@@ -60,8 +50,6 @@ declare class Teams {
60
50
  */
61
51
  delete(teamId: string): Promise<{}>;
62
52
  /**
63
- * List team memberships
64
- *
65
53
  * Use this endpoint to list a team&#039;s members using the team&#039;s ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
66
54
  *
67
55
  * @param {string} teamId
@@ -72,8 +60,6 @@ declare class Teams {
72
60
  */
73
61
  listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
74
62
  /**
75
- * Create team membership
76
- *
77
63
  * 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.
78
64
 
79
65
  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.
@@ -95,8 +81,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
95
81
  */
96
82
  createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
97
83
  /**
98
- * Get team membership
99
- *
100
84
  * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
101
85
  *
102
86
  * @param {string} teamId
@@ -106,8 +90,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
106
90
  */
107
91
  getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;
108
92
  /**
109
- * Update membership
110
- *
111
93
  * 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).
112
94
 
113
95
  *
@@ -119,8 +101,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
119
101
  */
120
102
  updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
121
103
  /**
122
- * Delete team membership
123
- *
124
104
  * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
125
105
  *
126
106
  * @param {string} teamId
@@ -130,8 +110,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
130
110
  */
131
111
  deleteMembership(teamId: string, membershipId: string): Promise<{}>;
132
112
  /**
133
- * Update team membership status
134
- *
135
113
  * 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.
136
114
 
137
115
  If the request is successful, a session for the user is automatically created.
@@ -146,8 +124,6 @@ If the request is successful, a session for the user is automatically created.
146
124
  */
147
125
  updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
148
126
  /**
149
- * Get team preferences
150
- *
151
127
  * Get the team&#039;s shared preferences by its unique ID. If a preference doesn&#039;t need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).
152
128
  *
153
129
  * @param {string} teamId
@@ -156,8 +132,6 @@ If the request is successful, a session for the user is automatically created.
156
132
  */
157
133
  getPrefs<Preferences extends Models.Preferences>(teamId: string): Promise<Preferences>;
158
134
  /**
159
- * Update preferences
160
- *
161
135
  * 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.
162
136
  *
163
137
  * @param {string} teamId
@@ -6,8 +6,6 @@ declare class Teams {
6
6
  client: Client;
7
7
  constructor(client: Client);
8
8
  /**
9
- * List teams
10
- *
11
9
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
12
10
  *
13
11
  * @param {string[]} queries
@@ -17,8 +15,6 @@ declare class Teams {
17
15
  */
18
16
  list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
19
17
  /**
20
- * Create team
21
- *
22
18
  * 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.
23
19
  *
24
20
  * @param {string} teamId
@@ -29,8 +25,6 @@ declare class Teams {
29
25
  */
30
26
  create<Preferences extends Models.Preferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
31
27
  /**
32
- * Get team
33
- *
34
28
  * Get a team by its ID. All team members have read access for this resource.
35
29
  *
36
30
  * @param {string} teamId
@@ -39,8 +33,6 @@ declare class Teams {
39
33
  */
40
34
  get<Preferences extends Models.Preferences>(teamId: string): Promise<Models.Team<Preferences>>;
41
35
  /**
42
- * Update name
43
- *
44
36
  * Update the team&#039;s name by its unique ID.
45
37
  *
46
38
  * @param {string} teamId
@@ -50,8 +42,6 @@ declare class Teams {
50
42
  */
51
43
  updateName<Preferences extends Models.Preferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
52
44
  /**
53
- * Delete team
54
- *
55
45
  * Delete a team using its ID. Only team members with the owner role can delete the team.
56
46
  *
57
47
  * @param {string} teamId
@@ -60,8 +50,6 @@ declare class Teams {
60
50
  */
61
51
  delete(teamId: string): Promise<{}>;
62
52
  /**
63
- * List team memberships
64
- *
65
53
  * Use this endpoint to list a team&#039;s members using the team&#039;s ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
66
54
  *
67
55
  * @param {string} teamId
@@ -72,8 +60,6 @@ declare class Teams {
72
60
  */
73
61
  listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
74
62
  /**
75
- * Create team membership
76
- *
77
63
  * 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.
78
64
 
79
65
  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.
@@ -95,8 +81,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
95
81
  */
96
82
  createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
97
83
  /**
98
- * Get team membership
99
- *
100
84
  * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
101
85
  *
102
86
  * @param {string} teamId
@@ -106,8 +90,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
106
90
  */
107
91
  getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;
108
92
  /**
109
- * Update membership
110
- *
111
93
  * 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).
112
94
 
113
95
  *
@@ -119,8 +101,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
119
101
  */
120
102
  updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
121
103
  /**
122
- * Delete team membership
123
- *
124
104
  * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
125
105
  *
126
106
  * @param {string} teamId
@@ -130,8 +110,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee
130
110
  */
131
111
  deleteMembership(teamId: string, membershipId: string): Promise<{}>;
132
112
  /**
133
- * Update team membership status
134
- *
135
113
  * 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.
136
114
 
137
115
  If the request is successful, a session for the user is automatically created.
@@ -146,8 +124,6 @@ If the request is successful, a session for the user is automatically created.
146
124
  */
147
125
  updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
148
126
  /**
149
- * Get team preferences
150
- *
151
127
  * Get the team&#039;s shared preferences by its unique ID. If a preference doesn&#039;t need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).
152
128
  *
153
129
  * @param {string} teamId
@@ -156,8 +132,6 @@ If the request is successful, a session for the user is automatically created.
156
132
  */
157
133
  getPrefs<Preferences extends Models.Preferences>(teamId: string): Promise<Preferences>;
158
134
  /**
159
- * Update preferences
160
- *
161
135
  * 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.
162
136
  *
163
137
  * @param {string} teamId
@@ -7,8 +7,6 @@ class Teams {
7
7
  this.client = client;
8
8
  }
9
9
  /**
10
- * List teams
11
- *
12
10
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
13
11
  *
14
12
  * @param {string[]} queries
@@ -16,7 +14,7 @@ class Teams {
16
14
  * @throws {AppwriteException}
17
15
  * @returns {Promise<Models.TeamList<Preferences>>}
18
16
  */
19
- async list(queries, search) {
17
+ list(queries, search) {
20
18
  const apiPath = "/teams";
21
19
  const payload = {};
22
20
  if (typeof queries !== "undefined") {
@@ -29,7 +27,7 @@ class Teams {
29
27
  const apiHeaders = {
30
28
  "content-type": "application/json"
31
29
  };
32
- return await this.client.call(
30
+ return this.client.call(
33
31
  "get",
34
32
  uri,
35
33
  apiHeaders,
@@ -37,8 +35,6 @@ class Teams {
37
35
  );
38
36
  }
39
37
  /**
40
- * Create team
41
- *
42
38
  * 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.
43
39
  *
44
40
  * @param {string} teamId
@@ -47,7 +43,7 @@ class Teams {
47
43
  * @throws {AppwriteException}
48
44
  * @returns {Promise<Models.Team<Preferences>>}
49
45
  */
50
- async create(teamId, name, roles) {
46
+ create(teamId, name, roles) {
51
47
  if (typeof teamId === "undefined") {
52
48
  throw new client.AppwriteException('Missing required parameter: "teamId"');
53
49
  }
@@ -69,7 +65,7 @@ class Teams {
69
65
  const apiHeaders = {
70
66
  "content-type": "application/json"
71
67
  };
72
- return await this.client.call(
68
+ return this.client.call(
73
69
  "post",
74
70
  uri,
75
71
  apiHeaders,
@@ -77,15 +73,13 @@ class Teams {
77
73
  );
78
74
  }
79
75
  /**
80
- * Get team
81
- *
82
76
  * Get a team by its ID. All team members have read access for this resource.
83
77
  *
84
78
  * @param {string} teamId
85
79
  * @throws {AppwriteException}
86
80
  * @returns {Promise<Models.Team<Preferences>>}
87
81
  */
88
- async get(teamId) {
82
+ get(teamId) {
89
83
  if (typeof teamId === "undefined") {
90
84
  throw new client.AppwriteException('Missing required parameter: "teamId"');
91
85
  }
@@ -95,7 +89,7 @@ class Teams {
95
89
  const apiHeaders = {
96
90
  "content-type": "application/json"
97
91
  };
98
- return await this.client.call(
92
+ return this.client.call(
99
93
  "get",
100
94
  uri,
101
95
  apiHeaders,
@@ -103,8 +97,6 @@ class Teams {
103
97
  );
104
98
  }
105
99
  /**
106
- * Update name
107
- *
108
100
  * Update the team&#039;s name by its unique ID.
109
101
  *
110
102
  * @param {string} teamId
@@ -112,7 +104,7 @@ class Teams {
112
104
  * @throws {AppwriteException}
113
105
  * @returns {Promise<Models.Team<Preferences>>}
114
106
  */
115
- async updateName(teamId, name) {
107
+ updateName(teamId, name) {
116
108
  if (typeof teamId === "undefined") {
117
109
  throw new client.AppwriteException('Missing required parameter: "teamId"');
118
110
  }
@@ -128,7 +120,7 @@ class Teams {
128
120
  const apiHeaders = {
129
121
  "content-type": "application/json"
130
122
  };
131
- return await this.client.call(
123
+ return this.client.call(
132
124
  "put",
133
125
  uri,
134
126
  apiHeaders,
@@ -136,15 +128,13 @@ class Teams {
136
128
  );
137
129
  }
138
130
  /**
139
- * Delete team
140
- *
141
131
  * Delete a team using its ID. Only team members with the owner role can delete the team.
142
132
  *
143
133
  * @param {string} teamId
144
134
  * @throws {AppwriteException}
145
135
  * @returns {Promise<{}>}
146
136
  */
147
- async delete(teamId) {
137
+ delete(teamId) {
148
138
  if (typeof teamId === "undefined") {
149
139
  throw new client.AppwriteException('Missing required parameter: "teamId"');
150
140
  }
@@ -154,7 +144,7 @@ class Teams {
154
144
  const apiHeaders = {
155
145
  "content-type": "application/json"
156
146
  };
157
- return await this.client.call(
147
+ return this.client.call(
158
148
  "delete",
159
149
  uri,
160
150
  apiHeaders,
@@ -162,8 +152,6 @@ class Teams {
162
152
  );
163
153
  }
164
154
  /**
165
- * List team memberships
166
- *
167
155
  * Use this endpoint to list a team&#039;s members using the team&#039;s ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
168
156
  *
169
157
  * @param {string} teamId
@@ -172,7 +160,7 @@ class Teams {
172
160
  * @throws {AppwriteException}
173
161
  * @returns {Promise<Models.MembershipList>}
174
162
  */
175
- async listMemberships(teamId, queries, search) {
163
+ listMemberships(teamId, queries, search) {
176
164
  if (typeof teamId === "undefined") {
177
165
  throw new client.AppwriteException('Missing required parameter: "teamId"');
178
166
  }
@@ -188,7 +176,7 @@ class Teams {
188
176
  const apiHeaders = {
189
177
  "content-type": "application/json"
190
178
  };
191
- return await this.client.call(
179
+ return this.client.call(
192
180
  "get",
193
181
  uri,
194
182
  apiHeaders,
@@ -196,8 +184,6 @@ class Teams {
196
184
  );
197
185
  }
198
186
  /**
199
- * Create team membership
200
- *
201
187
  * 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.
202
188
 
203
189
  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.
@@ -217,7 +203,7 @@ class Teams {
217
203
  * @throws {AppwriteException}
218
204
  * @returns {Promise<Models.Membership>}
219
205
  */
220
- async createMembership(teamId, roles, email, userId, phone, url, name) {
206
+ createMembership(teamId, roles, email, userId, phone, url, name) {
221
207
  if (typeof teamId === "undefined") {
222
208
  throw new client.AppwriteException('Missing required parameter: "teamId"');
223
209
  }
@@ -248,7 +234,7 @@ class Teams {
248
234
  const apiHeaders = {
249
235
  "content-type": "application/json"
250
236
  };
251
- return await this.client.call(
237
+ return this.client.call(
252
238
  "post",
253
239
  uri,
254
240
  apiHeaders,
@@ -256,8 +242,6 @@ class Teams {
256
242
  );
257
243
  }
258
244
  /**
259
- * Get team membership
260
- *
261
245
  * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
262
246
  *
263
247
  * @param {string} teamId
@@ -265,7 +249,7 @@ class Teams {
265
249
  * @throws {AppwriteException}
266
250
  * @returns {Promise<Models.Membership>}
267
251
  */
268
- async getMembership(teamId, membershipId) {
252
+ getMembership(teamId, membershipId) {
269
253
  if (typeof teamId === "undefined") {
270
254
  throw new client.AppwriteException('Missing required parameter: "teamId"');
271
255
  }
@@ -278,7 +262,7 @@ class Teams {
278
262
  const apiHeaders = {
279
263
  "content-type": "application/json"
280
264
  };
281
- return await this.client.call(
265
+ return this.client.call(
282
266
  "get",
283
267
  uri,
284
268
  apiHeaders,
@@ -286,8 +270,6 @@ class Teams {
286
270
  );
287
271
  }
288
272
  /**
289
- * Update membership
290
- *
291
273
  * 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).
292
274
 
293
275
  *
@@ -297,7 +279,7 @@ class Teams {
297
279
  * @throws {AppwriteException}
298
280
  * @returns {Promise<Models.Membership>}
299
281
  */
300
- async updateMembership(teamId, membershipId, roles) {
282
+ updateMembership(teamId, membershipId, roles) {
301
283
  if (typeof teamId === "undefined") {
302
284
  throw new client.AppwriteException('Missing required parameter: "teamId"');
303
285
  }
@@ -316,7 +298,7 @@ class Teams {
316
298
  const apiHeaders = {
317
299
  "content-type": "application/json"
318
300
  };
319
- return await this.client.call(
301
+ return this.client.call(
320
302
  "patch",
321
303
  uri,
322
304
  apiHeaders,
@@ -324,8 +306,6 @@ class Teams {
324
306
  );
325
307
  }
326
308
  /**
327
- * Delete team membership
328
- *
329
309
  * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
330
310
  *
331
311
  * @param {string} teamId
@@ -333,7 +313,7 @@ class Teams {
333
313
  * @throws {AppwriteException}
334
314
  * @returns {Promise<{}>}
335
315
  */
336
- async deleteMembership(teamId, membershipId) {
316
+ deleteMembership(teamId, membershipId) {
337
317
  if (typeof teamId === "undefined") {
338
318
  throw new client.AppwriteException('Missing required parameter: "teamId"');
339
319
  }
@@ -346,7 +326,7 @@ class Teams {
346
326
  const apiHeaders = {
347
327
  "content-type": "application/json"
348
328
  };
349
- return await this.client.call(
329
+ return this.client.call(
350
330
  "delete",
351
331
  uri,
352
332
  apiHeaders,
@@ -354,8 +334,6 @@ class Teams {
354
334
  );
355
335
  }
356
336
  /**
357
- * Update team membership status
358
- *
359
337
  * 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.
360
338
 
361
339
  If the request is successful, a session for the user is automatically created.
@@ -368,7 +346,7 @@ class Teams {
368
346
  * @throws {AppwriteException}
369
347
  * @returns {Promise<Models.Membership>}
370
348
  */
371
- async updateMembershipStatus(teamId, membershipId, userId, secret) {
349
+ updateMembershipStatus(teamId, membershipId, userId, secret) {
372
350
  if (typeof teamId === "undefined") {
373
351
  throw new client.AppwriteException('Missing required parameter: "teamId"');
374
352
  }
@@ -393,7 +371,7 @@ class Teams {
393
371
  const apiHeaders = {
394
372
  "content-type": "application/json"
395
373
  };
396
- return await this.client.call(
374
+ return this.client.call(
397
375
  "patch",
398
376
  uri,
399
377
  apiHeaders,
@@ -401,15 +379,13 @@ class Teams {
401
379
  );
402
380
  }
403
381
  /**
404
- * Get team preferences
405
- *
406
382
  * Get the team&#039;s shared preferences by its unique ID. If a preference doesn&#039;t need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).
407
383
  *
408
384
  * @param {string} teamId
409
385
  * @throws {AppwriteException}
410
386
  * @returns {Promise<Preferences>}
411
387
  */
412
- async getPrefs(teamId) {
388
+ getPrefs(teamId) {
413
389
  if (typeof teamId === "undefined") {
414
390
  throw new client.AppwriteException('Missing required parameter: "teamId"');
415
391
  }
@@ -419,7 +395,7 @@ class Teams {
419
395
  const apiHeaders = {
420
396
  "content-type": "application/json"
421
397
  };
422
- return await this.client.call(
398
+ return this.client.call(
423
399
  "get",
424
400
  uri,
425
401
  apiHeaders,
@@ -427,8 +403,6 @@ class Teams {
427
403
  );
428
404
  }
429
405
  /**
430
- * Update preferences
431
- *
432
406
  * 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.
433
407
  *
434
408
  * @param {string} teamId
@@ -436,7 +410,7 @@ class Teams {
436
410
  * @throws {AppwriteException}
437
411
  * @returns {Promise<Preferences>}
438
412
  */
439
- async updatePrefs(teamId, prefs) {
413
+ updatePrefs(teamId, prefs) {
440
414
  if (typeof teamId === "undefined") {
441
415
  throw new client.AppwriteException('Missing required parameter: "teamId"');
442
416
  }
@@ -452,7 +426,7 @@ class Teams {
452
426
  const apiHeaders = {
453
427
  "content-type": "application/json"
454
428
  };
455
- return await this.client.call(
429
+ return this.client.call(
456
430
  "put",
457
431
  uri,
458
432
  apiHeaders,