node-appwrite 17.2.0 → 18.0.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 (108) hide show
  1. package/README.md +67 -2
  2. package/dist/client.js +3 -3
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.mjs +3 -3
  5. package/dist/client.mjs.map +1 -1
  6. package/dist/enums/{v-c-s-deployment-type.js → vcs-deployment-type.js} +1 -1
  7. package/dist/enums/vcs-deployment-type.js.map +1 -0
  8. package/dist/enums/{v-c-s-deployment-type.mjs → vcs-deployment-type.mjs} +2 -2
  9. package/dist/enums/vcs-deployment-type.mjs.map +1 -0
  10. package/dist/index.d.mts +2 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.js +7 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +2 -1
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/models.d.mts +717 -58
  17. package/dist/models.d.ts +717 -58
  18. package/dist/query.d.mts +70 -0
  19. package/dist/query.d.ts +70 -0
  20. package/dist/query.js +70 -0
  21. package/dist/query.js.map +1 -1
  22. package/dist/query.mjs +70 -0
  23. package/dist/query.mjs.map +1 -1
  24. package/dist/services/account.d.mts +625 -70
  25. package/dist/services/account.d.ts +625 -70
  26. package/dist/services/account.js +592 -292
  27. package/dist/services/account.js.map +1 -1
  28. package/dist/services/account.mjs +592 -292
  29. package/dist/services/account.mjs.map +1 -1
  30. package/dist/services/avatars.d.mts +157 -26
  31. package/dist/services/avatars.d.ts +157 -26
  32. package/dist/services/avatars.js +104 -93
  33. package/dist/services/avatars.js.map +1 -1
  34. package/dist/services/avatars.mjs +104 -93
  35. package/dist/services/avatars.mjs.map +1 -1
  36. package/dist/services/databases.d.mts +1224 -248
  37. package/dist/services/databases.d.ts +1224 -248
  38. package/dist/services/databases.js +877 -611
  39. package/dist/services/databases.js.map +1 -1
  40. package/dist/services/databases.mjs +877 -611
  41. package/dist/services/databases.mjs.map +1 -1
  42. package/dist/services/functions.d.mts +530 -107
  43. package/dist/services/functions.d.ts +530 -107
  44. package/dist/services/functions.js +393 -276
  45. package/dist/services/functions.js.map +1 -1
  46. package/dist/services/functions.mjs +393 -276
  47. package/dist/services/functions.mjs.map +1 -1
  48. package/dist/services/graphql.d.mts +24 -2
  49. package/dist/services/graphql.d.ts +24 -2
  50. package/dist/services/graphql.js +20 -16
  51. package/dist/services/graphql.js.map +1 -1
  52. package/dist/services/graphql.mjs +20 -16
  53. package/dist/services/graphql.mjs.map +1 -1
  54. package/dist/services/health.d.mts +175 -16
  55. package/dist/services/health.d.ts +175 -16
  56. package/dist/services/health.js +144 -115
  57. package/dist/services/health.js.map +1 -1
  58. package/dist/services/health.mjs +144 -115
  59. package/dist/services/health.mjs.map +1 -1
  60. package/dist/services/locale.js.map +1 -1
  61. package/dist/services/locale.mjs.map +1 -1
  62. package/dist/services/messaging.d.mts +1544 -262
  63. package/dist/services/messaging.d.ts +1544 -262
  64. package/dist/services/messaging.js +1417 -592
  65. package/dist/services/messaging.js.map +1 -1
  66. package/dist/services/messaging.mjs +1417 -592
  67. package/dist/services/messaging.mjs.map +1 -1
  68. package/dist/services/sites.d.mts +495 -99
  69. package/dist/services/sites.d.ts +495 -99
  70. package/dist/services/sites.js +371 -258
  71. package/dist/services/sites.js.map +1 -1
  72. package/dist/services/sites.mjs +371 -258
  73. package/dist/services/sites.mjs.map +1 -1
  74. package/dist/services/storage.d.mts +306 -63
  75. package/dist/services/storage.d.ts +306 -63
  76. package/dist/services/storage.js +225 -158
  77. package/dist/services/storage.js.map +1 -1
  78. package/dist/services/storage.mjs +225 -158
  79. package/dist/services/storage.mjs.map +1 -1
  80. package/dist/services/tables-db.d.mts +1549 -0
  81. package/dist/services/tables-db.d.ts +1549 -0
  82. package/dist/services/tables-db.js +2374 -0
  83. package/dist/services/tables-db.js.map +1 -0
  84. package/dist/services/tables-db.mjs +2373 -0
  85. package/dist/services/tables-db.mjs.map +1 -0
  86. package/dist/services/teams.d.mts +233 -39
  87. package/dist/services/teams.d.ts +233 -39
  88. package/dist/services/teams.js +170 -135
  89. package/dist/services/teams.js.map +1 -1
  90. package/dist/services/teams.mjs +170 -135
  91. package/dist/services/teams.mjs.map +1 -1
  92. package/dist/services/tokens.d.mts +76 -11
  93. package/dist/services/tokens.d.ts +76 -11
  94. package/dist/services/tokens.js +60 -45
  95. package/dist/services/tokens.js.map +1 -1
  96. package/dist/services/tokens.mjs +60 -45
  97. package/dist/services/tokens.mjs.map +1 -1
  98. package/dist/services/users.d.mts +842 -115
  99. package/dist/services/users.d.ts +842 -115
  100. package/dist/services/users.js +719 -408
  101. package/dist/services/users.js.map +1 -1
  102. package/dist/services/users.mjs +719 -408
  103. package/dist/services/users.mjs.map +1 -1
  104. package/package.json +1 -1
  105. package/dist/enums/v-c-s-deployment-type.js.map +0 -1
  106. package/dist/enums/v-c-s-deployment-type.mjs.map +0 -1
  107. /package/dist/enums/{v-c-s-deployment-type.d.mts → vcs-deployment-type.d.mts} +0 -0
  108. /package/dist/enums/{v-c-s-deployment-type.d.ts → vcs-deployment-type.d.ts} +0 -0
@@ -8,106 +8,256 @@ declare class Teams {
8
8
  /**
9
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.
10
10
  *
11
- * @param {string[]} queries
12
- * @param {string} search
11
+ * @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. You may filter on the following attributes: name, total, billingPlan
12
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
13
13
  * @throws {AppwriteException}
14
14
  * @returns {Promise<Models.TeamList<Preferences>>}
15
15
  */
16
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
17
+ queries?: string[];
18
+ search?: string;
19
+ }): Promise<Models.TeamList<Preferences>>;
20
+ /**
21
+ * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
22
+ *
23
+ * @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. You may filter on the following attributes: name, total, billingPlan
24
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
25
+ * @throws {AppwriteException}
26
+ * @returns {Promise<Models.TeamList<Preferences>>}
27
+ * @deprecated Use the object parameter style method for a better developer experience.
28
+ */
16
29
  list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
17
30
  /**
18
31
  * 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.
19
32
  *
20
- * @param {string} teamId
21
- * @param {string} name
22
- * @param {string[]} roles
33
+ * @param {string} params.teamId - Team 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.
34
+ * @param {string} params.name - Team name. Max length: 128 chars.
35
+ * @param {string[]} params.roles - Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
23
36
  * @throws {AppwriteException}
24
37
  * @returns {Promise<Models.Team<Preferences>>}
25
38
  */
39
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
40
+ teamId: string;
41
+ name: string;
42
+ roles?: string[];
43
+ }): Promise<Models.Team<Preferences>>;
44
+ /**
45
+ * 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.
46
+ *
47
+ * @param {string} teamId - Team 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.
48
+ * @param {string} name - Team name. Max length: 128 chars.
49
+ * @param {string[]} roles - Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
50
+ * @throws {AppwriteException}
51
+ * @returns {Promise<Models.Team<Preferences>>}
52
+ * @deprecated Use the object parameter style method for a better developer experience.
53
+ */
26
54
  create<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;
27
55
  /**
28
56
  * Get a team by its ID. All team members have read access for this resource.
29
57
  *
30
- * @param {string} teamId
58
+ * @param {string} params.teamId - Team ID.
59
+ * @throws {AppwriteException}
60
+ * @returns {Promise<Models.Team<Preferences>>}
61
+ */
62
+ get<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
63
+ teamId: string;
64
+ }): Promise<Models.Team<Preferences>>;
65
+ /**
66
+ * Get a team by its ID. All team members have read access for this resource.
67
+ *
68
+ * @param {string} teamId - Team ID.
31
69
  * @throws {AppwriteException}
32
70
  * @returns {Promise<Models.Team<Preferences>>}
71
+ * @deprecated Use the object parameter style method for a better developer experience.
33
72
  */
34
73
  get<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Models.Team<Preferences>>;
35
74
  /**
36
- * Update the team&#039;s name by its unique ID.
75
+ * Update the team's name by its unique ID.
76
+ *
77
+ * @param {string} params.teamId - Team ID.
78
+ * @param {string} params.name - New team name. Max length: 128 chars.
79
+ * @throws {AppwriteException}
80
+ * @returns {Promise<Models.Team<Preferences>>}
81
+ */
82
+ updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
83
+ teamId: string;
84
+ name: string;
85
+ }): Promise<Models.Team<Preferences>>;
86
+ /**
87
+ * Update the team's name by its unique ID.
37
88
  *
38
- * @param {string} teamId
39
- * @param {string} name
89
+ * @param {string} teamId - Team ID.
90
+ * @param {string} name - New team name. Max length: 128 chars.
40
91
  * @throws {AppwriteException}
41
92
  * @returns {Promise<Models.Team<Preferences>>}
93
+ * @deprecated Use the object parameter style method for a better developer experience.
42
94
  */
43
95
  updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;
44
96
  /**
45
97
  * Delete a team using its ID. Only team members with the owner role can delete the team.
46
98
  *
47
- * @param {string} teamId
99
+ * @param {string} params.teamId - Team ID.
48
100
  * @throws {AppwriteException}
49
101
  * @returns {Promise<{}>}
50
102
  */
103
+ delete(params: {
104
+ teamId: string;
105
+ }): Promise<{}>;
106
+ /**
107
+ * Delete a team using its ID. Only team members with the owner role can delete the team.
108
+ *
109
+ * @param {string} teamId - Team ID.
110
+ * @throws {AppwriteException}
111
+ * @returns {Promise<{}>}
112
+ * @deprecated Use the object parameter style method for a better developer experience.
113
+ */
51
114
  delete(teamId: string): Promise<{}>;
52
115
  /**
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.
116
+ * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
54
117
  *
55
- * @param {string} teamId
56
- * @param {string[]} queries
57
- * @param {string} search
118
+ * @param {string} params.teamId - Team ID.
119
+ * @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. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles
120
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
58
121
  * @throws {AppwriteException}
59
122
  * @returns {Promise<Models.MembershipList>}
60
123
  */
124
+ listMemberships(params: {
125
+ teamId: string;
126
+ queries?: string[];
127
+ search?: string;
128
+ }): Promise<Models.MembershipList>;
129
+ /**
130
+ * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
131
+ *
132
+ * @param {string} teamId - Team ID.
133
+ * @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. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles
134
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
135
+ * @throws {AppwriteException}
136
+ * @returns {Promise<Models.MembershipList>}
137
+ * @deprecated Use the object parameter style method for a better developer experience.
138
+ */
61
139
  listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
62
140
  /**
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.
141
+ * 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't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
64
142
  *
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.
143
+ * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.
66
144
  *
67
145
  * 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.
68
146
  *
69
147
  * 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.
70
148
  *
71
149
  *
72
- * @param {string} teamId
73
- * @param {string[]} roles
74
- * @param {string} email
75
- * @param {string} userId
76
- * @param {string} phone
77
- * @param {string} url
78
- * @param {string} name
150
+ * @param {string} params.teamId - Team ID.
151
+ * @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
152
+ * @param {string} params.email - Email of the new team member.
153
+ * @param {string} params.userId - ID of the user to be added to a team.
154
+ * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
155
+ * @param {string} params.url - URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
156
+ * @param {string} params.name - Name of the new team member. Max length: 128 chars.
79
157
  * @throws {AppwriteException}
80
158
  * @returns {Promise<Models.Membership>}
81
159
  */
160
+ createMembership(params: {
161
+ teamId: string;
162
+ roles: string[];
163
+ email?: string;
164
+ userId?: string;
165
+ phone?: string;
166
+ url?: string;
167
+ name?: string;
168
+ }): Promise<Models.Membership>;
169
+ /**
170
+ * 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't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
171
+ *
172
+ * You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.
173
+ *
174
+ * 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.
175
+ *
176
+ * 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.
177
+ *
178
+ *
179
+ * @param {string} teamId - Team ID.
180
+ * @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
181
+ * @param {string} email - Email of the new team member.
182
+ * @param {string} userId - ID of the user to be added to a team.
183
+ * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
184
+ * @param {string} url - URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
185
+ * @param {string} name - Name of the new team member. Max length: 128 chars.
186
+ * @throws {AppwriteException}
187
+ * @returns {Promise<Models.Membership>}
188
+ * @deprecated Use the object parameter style method for a better developer experience.
189
+ */
82
190
  createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
83
191
  /**
84
192
  * 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.
85
193
  *
86
- * @param {string} teamId
87
- * @param {string} membershipId
194
+ * @param {string} params.teamId - Team ID.
195
+ * @param {string} params.membershipId - Membership ID.
88
196
  * @throws {AppwriteException}
89
197
  * @returns {Promise<Models.Membership>}
90
198
  */
199
+ getMembership(params: {
200
+ teamId: string;
201
+ membershipId: string;
202
+ }): Promise<Models.Membership>;
203
+ /**
204
+ * 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.
205
+ *
206
+ * @param {string} teamId - Team ID.
207
+ * @param {string} membershipId - Membership ID.
208
+ * @throws {AppwriteException}
209
+ * @returns {Promise<Models.Membership>}
210
+ * @deprecated Use the object parameter style method for a better developer experience.
211
+ */
91
212
  getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;
92
213
  /**
93
214
  * 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).
94
215
  *
95
216
  *
96
- * @param {string} teamId
97
- * @param {string} membershipId
98
- * @param {string[]} roles
217
+ * @param {string} params.teamId - Team ID.
218
+ * @param {string} params.membershipId - Membership ID.
219
+ * @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
99
220
  * @throws {AppwriteException}
100
221
  * @returns {Promise<Models.Membership>}
101
222
  */
223
+ updateMembership(params: {
224
+ teamId: string;
225
+ membershipId: string;
226
+ roles: string[];
227
+ }): Promise<Models.Membership>;
228
+ /**
229
+ * 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).
230
+ *
231
+ *
232
+ * @param {string} teamId - Team ID.
233
+ * @param {string} membershipId - Membership ID.
234
+ * @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
235
+ * @throws {AppwriteException}
236
+ * @returns {Promise<Models.Membership>}
237
+ * @deprecated Use the object parameter style method for a better developer experience.
238
+ */
102
239
  updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
103
240
  /**
104
241
  * 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.
105
242
  *
106
- * @param {string} teamId
107
- * @param {string} membershipId
243
+ * @param {string} params.teamId - Team ID.
244
+ * @param {string} params.membershipId - Membership ID.
108
245
  * @throws {AppwriteException}
109
246
  * @returns {Promise<{}>}
110
247
  */
248
+ deleteMembership(params: {
249
+ teamId: string;
250
+ membershipId: string;
251
+ }): Promise<{}>;
252
+ /**
253
+ * 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.
254
+ *
255
+ * @param {string} teamId - Team ID.
256
+ * @param {string} membershipId - Membership ID.
257
+ * @throws {AppwriteException}
258
+ * @returns {Promise<{}>}
259
+ * @deprecated Use the object parameter style method for a better developer experience.
260
+ */
111
261
  deleteMembership(teamId: string, membershipId: string): Promise<{}>;
112
262
  /**
113
263
  * 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.
@@ -115,29 +265,73 @@ declare class Teams {
115
265
  * If the request is successful, a session for the user is automatically created.
116
266
  *
117
267
  *
118
- * @param {string} teamId
119
- * @param {string} membershipId
120
- * @param {string} userId
121
- * @param {string} secret
268
+ * @param {string} params.teamId - Team ID.
269
+ * @param {string} params.membershipId - Membership ID.
270
+ * @param {string} params.userId - User ID.
271
+ * @param {string} params.secret - Secret key.
272
+ * @throws {AppwriteException}
273
+ * @returns {Promise<Models.Membership>}
274
+ */
275
+ updateMembershipStatus(params: {
276
+ teamId: string;
277
+ membershipId: string;
278
+ userId: string;
279
+ secret: string;
280
+ }): Promise<Models.Membership>;
281
+ /**
282
+ * 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.
283
+ *
284
+ * If the request is successful, a session for the user is automatically created.
285
+ *
286
+ *
287
+ * @param {string} teamId - Team ID.
288
+ * @param {string} membershipId - Membership ID.
289
+ * @param {string} userId - User ID.
290
+ * @param {string} secret - Secret key.
122
291
  * @throws {AppwriteException}
123
292
  * @returns {Promise<Models.Membership>}
293
+ * @deprecated Use the object parameter style method for a better developer experience.
124
294
  */
125
295
  updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;
126
296
  /**
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).
297
+ * Get the team's shared preferences by its unique ID. If a preference doesn'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).
128
298
  *
129
- * @param {string} teamId
299
+ * @param {string} params.teamId - Team ID.
130
300
  * @throws {AppwriteException}
131
301
  * @returns {Promise<Preferences>}
132
302
  */
303
+ getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
304
+ teamId: string;
305
+ }): Promise<Preferences>;
306
+ /**
307
+ * Get the team's shared preferences by its unique ID. If a preference doesn'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).
308
+ *
309
+ * @param {string} teamId - Team ID.
310
+ * @throws {AppwriteException}
311
+ * @returns {Promise<Preferences>}
312
+ * @deprecated Use the object parameter style method for a better developer experience.
313
+ */
133
314
  getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Preferences>;
134
315
  /**
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.
316
+ * Update the team'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.
317
+ *
318
+ * @param {string} params.teamId - Team ID.
319
+ * @param {object} params.prefs - Prefs key-value JSON object.
320
+ * @throws {AppwriteException}
321
+ * @returns {Promise<Preferences>}
322
+ */
323
+ updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
324
+ teamId: string;
325
+ prefs: object;
326
+ }): Promise<Preferences>;
327
+ /**
328
+ * Update the team'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.
136
329
  *
137
- * @param {string} teamId
138
- * @param {object} prefs
330
+ * @param {string} teamId - Team ID.
331
+ * @param {object} prefs - Prefs key-value JSON object.
139
332
  * @throws {AppwriteException}
140
333
  * @returns {Promise<Preferences>}
334
+ * @deprecated Use the object parameter style method for a better developer experience.
141
335
  */
142
336
  updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, prefs: object): Promise<Preferences>;
143
337
  }