node-appwrite 20.1.0 → 20.3.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 (95) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +2 -2
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/execution-status.d.mts +2 -1
  6. package/dist/enums/execution-status.d.ts +2 -1
  7. package/dist/enums/execution-status.js +1 -0
  8. package/dist/enums/execution-status.js.map +1 -1
  9. package/dist/enums/execution-status.mjs +1 -0
  10. package/dist/enums/execution-status.mjs.map +1 -1
  11. package/dist/enums/framework.d.mts +1 -0
  12. package/dist/enums/framework.d.ts +1 -0
  13. package/dist/enums/framework.js +1 -0
  14. package/dist/enums/framework.js.map +1 -1
  15. package/dist/enums/framework.mjs +1 -0
  16. package/dist/enums/framework.mjs.map +1 -1
  17. package/dist/index.d.mts +1 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +9 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +1 -0
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/models.d.mts +43 -1
  24. package/dist/models.d.ts +43 -1
  25. package/dist/operator.d.mts +181 -0
  26. package/dist/operator.d.ts +181 -0
  27. package/dist/operator.js +268 -0
  28. package/dist/operator.js.map +1 -0
  29. package/dist/operator.mjs +266 -0
  30. package/dist/operator.mjs.map +1 -0
  31. package/dist/query.js +6 -6
  32. package/dist/query.js.map +1 -1
  33. package/dist/query.mjs +6 -6
  34. package/dist/query.mjs.map +1 -1
  35. package/dist/services/account.d.mts +8 -2
  36. package/dist/services/account.d.ts +8 -2
  37. package/dist/services/account.js +14 -4
  38. package/dist/services/account.js.map +1 -1
  39. package/dist/services/account.mjs +14 -4
  40. package/dist/services/account.mjs.map +1 -1
  41. package/dist/services/databases.d.mts +192 -18
  42. package/dist/services/databases.d.ts +192 -18
  43. package/dist/services/databases.js +268 -16
  44. package/dist/services/databases.js.map +1 -1
  45. package/dist/services/databases.mjs +268 -16
  46. package/dist/services/databases.mjs.map +1 -1
  47. package/dist/services/functions.d.mts +12 -3
  48. package/dist/services/functions.d.ts +12 -3
  49. package/dist/services/functions.js +18 -3
  50. package/dist/services/functions.js.map +1 -1
  51. package/dist/services/functions.mjs +18 -3
  52. package/dist/services/functions.mjs.map +1 -1
  53. package/dist/services/messaging.d.mts +116 -9
  54. package/dist/services/messaging.d.ts +116 -9
  55. package/dist/services/messaging.js +182 -9
  56. package/dist/services/messaging.js.map +1 -1
  57. package/dist/services/messaging.mjs +182 -9
  58. package/dist/services/messaging.mjs.map +1 -1
  59. package/dist/services/sites.d.mts +12 -3
  60. package/dist/services/sites.d.ts +12 -3
  61. package/dist/services/sites.js +18 -3
  62. package/dist/services/sites.js.map +1 -1
  63. package/dist/services/sites.mjs +18 -3
  64. package/dist/services/sites.mjs.map +1 -1
  65. package/dist/services/storage.d.mts +8 -2
  66. package/dist/services/storage.d.ts +8 -2
  67. package/dist/services/storage.js +12 -2
  68. package/dist/services/storage.js.map +1 -1
  69. package/dist/services/storage.mjs +12 -2
  70. package/dist/services/storage.mjs.map +1 -1
  71. package/dist/services/tables-db.d.mts +190 -16
  72. package/dist/services/tables-db.d.ts +190 -16
  73. package/dist/services/tables-db.js +268 -16
  74. package/dist/services/tables-db.js.map +1 -1
  75. package/dist/services/tables-db.mjs +268 -16
  76. package/dist/services/tables-db.mjs.map +1 -1
  77. package/dist/services/teams.d.mts +8 -2
  78. package/dist/services/teams.d.ts +8 -2
  79. package/dist/services/teams.js +12 -2
  80. package/dist/services/teams.js.map +1 -1
  81. package/dist/services/teams.mjs +12 -2
  82. package/dist/services/teams.mjs.map +1 -1
  83. package/dist/services/tokens.d.mts +4 -1
  84. package/dist/services/tokens.d.ts +4 -1
  85. package/dist/services/tokens.js +6 -1
  86. package/dist/services/tokens.js.map +1 -1
  87. package/dist/services/tokens.mjs +6 -1
  88. package/dist/services/tokens.mjs.map +1 -1
  89. package/dist/services/users.d.mts +24 -6
  90. package/dist/services/users.d.ts +24 -6
  91. package/dist/services/users.js +37 -7
  92. package/dist/services/users.js.map +1 -1
  93. package/dist/services/users.mjs +37 -7
  94. package/dist/services/users.mjs.map +1 -1
  95. package/package.json +1 -1
@@ -20,23 +20,26 @@ declare class Teams {
20
20
  *
21
21
  * @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
22
22
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
23
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
23
24
  * @throws {AppwriteException}
24
25
  * @returns {Promise<Models.TeamList<Preferences>>}
25
26
  */
26
27
  list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
27
28
  queries?: string[];
28
29
  search?: string;
30
+ total?: boolean;
29
31
  }): Promise<Models.TeamList<Preferences>>;
30
32
  /**
31
33
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
32
34
  *
33
35
  * @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
34
36
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
37
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
35
38
  * @throws {AppwriteException}
36
39
  * @returns {Promise<Models.TeamList<Preferences>>}
37
40
  * @deprecated Use the object parameter style method for a better developer experience.
38
41
  */
39
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
42
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.TeamList<Preferences>>;
40
43
  /**
41
44
  * 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.
42
45
  *
@@ -128,6 +131,7 @@ declare class Teams {
128
131
  * @param {string} params.teamId - Team ID.
129
132
  * @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
130
133
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
134
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
131
135
  * @throws {AppwriteException}
132
136
  * @returns {Promise<Models.MembershipList>}
133
137
  */
@@ -135,6 +139,7 @@ declare class Teams {
135
139
  teamId: string;
136
140
  queries?: string[];
137
141
  search?: string;
142
+ total?: boolean;
138
143
  }): Promise<Models.MembershipList>;
139
144
  /**
140
145
  * 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.
@@ -142,11 +147,12 @@ declare class Teams {
142
147
  * @param {string} teamId - Team ID.
143
148
  * @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
144
149
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
150
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
145
151
  * @throws {AppwriteException}
146
152
  * @returns {Promise<Models.MembershipList>}
147
153
  * @deprecated Use the object parameter style method for a better developer experience.
148
154
  */
149
- listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
155
+ listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
150
156
  /**
151
157
  * 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.
152
158
  *
@@ -20,23 +20,26 @@ declare class Teams {
20
20
  *
21
21
  * @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
22
22
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
23
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
23
24
  * @throws {AppwriteException}
24
25
  * @returns {Promise<Models.TeamList<Preferences>>}
25
26
  */
26
27
  list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
27
28
  queries?: string[];
28
29
  search?: string;
30
+ total?: boolean;
29
31
  }): Promise<Models.TeamList<Preferences>>;
30
32
  /**
31
33
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
32
34
  *
33
35
  * @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
34
36
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
37
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
35
38
  * @throws {AppwriteException}
36
39
  * @returns {Promise<Models.TeamList<Preferences>>}
37
40
  * @deprecated Use the object parameter style method for a better developer experience.
38
41
  */
39
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
42
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.TeamList<Preferences>>;
40
43
  /**
41
44
  * 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.
42
45
  *
@@ -128,6 +131,7 @@ declare class Teams {
128
131
  * @param {string} params.teamId - Team ID.
129
132
  * @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
130
133
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
134
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
131
135
  * @throws {AppwriteException}
132
136
  * @returns {Promise<Models.MembershipList>}
133
137
  */
@@ -135,6 +139,7 @@ declare class Teams {
135
139
  teamId: string;
136
140
  queries?: string[];
137
141
  search?: string;
142
+ total?: boolean;
138
143
  }): Promise<Models.MembershipList>;
139
144
  /**
140
145
  * 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.
@@ -142,11 +147,12 @@ declare class Teams {
142
147
  * @param {string} teamId - Team ID.
143
148
  * @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
144
149
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
150
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
145
151
  * @throws {AppwriteException}
146
152
  * @returns {Promise<Models.MembershipList>}
147
153
  * @deprecated Use the object parameter style method for a better developer experience.
148
154
  */
149
- listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
155
+ listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
150
156
  /**
151
157
  * 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.
152
158
  *
@@ -13,11 +13,13 @@ class Teams {
13
13
  } else {
14
14
  params = {
15
15
  queries: paramsOrFirst,
16
- search: rest[0]
16
+ search: rest[0],
17
+ total: rest[1]
17
18
  };
18
19
  }
19
20
  const queries = params.queries;
20
21
  const search = params.search;
22
+ const total = params.total;
21
23
  const apiPath = "/teams";
22
24
  const payload = {};
23
25
  if (typeof queries !== "undefined") {
@@ -26,6 +28,9 @@ class Teams {
26
28
  if (typeof search !== "undefined") {
27
29
  payload["search"] = search;
28
30
  }
31
+ if (typeof total !== "undefined") {
32
+ payload["total"] = total;
33
+ }
29
34
  const uri = new URL(this.client.config.endpoint + apiPath);
30
35
  const apiHeaders = {};
31
36
  return this.client.call(
@@ -169,12 +174,14 @@ class Teams {
169
174
  params = {
170
175
  teamId: paramsOrFirst,
171
176
  queries: rest[0],
172
- search: rest[1]
177
+ search: rest[1],
178
+ total: rest[2]
173
179
  };
174
180
  }
175
181
  const teamId = params.teamId;
176
182
  const queries = params.queries;
177
183
  const search = params.search;
184
+ const total = params.total;
178
185
  if (typeof teamId === "undefined") {
179
186
  throw new client.AppwriteException('Missing required parameter: "teamId"');
180
187
  }
@@ -186,6 +193,9 @@ class Teams {
186
193
  if (typeof search !== "undefined") {
187
194
  payload["search"] = search;
188
195
  }
196
+ if (typeof total !== "undefined") {
197
+ payload["total"] = total;
198
+ }
189
199
  const uri = new URL(this.client.config.endpoint + apiPath);
190
200
  const apiHeaders = {};
191
201
  return this.client.call(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/teams.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAIjE,MAAM,MAAM;AAAA,EAGf,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAqBA,KACI,kBACG,MACkC;AACrC,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,SAAS;AAAA,QACT,QAAQ,KAAK,CAAC;AAAA,MAClB;AAAA,IACJ;AAEA,UAAM,UAAU,OAAO;AACvB,UAAM,SAAS,OAAO;AAGtB,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;A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tB,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU,wBAAwB,QAAQ,YAAY,MAAM;AAClE,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Teams {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\n *\n * @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\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.TeamList<Preferences>>}\n */\n list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string }): Promise<Models.TeamList<Preferences>>;\n /**\n * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\n *\n * @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\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.TeamList<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;\n list<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst?: { queries?: string[], search?: string } | string[],\n ...rest: [(string)?] \n ): Promise<Models.TeamList<Preferences>> {\n let params: { queries?: string[], search?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n\n\n const apiPath = '/teams';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.name - Team name. Max length: 128 chars.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string, name: string, roles?: string[] }): Promise<Models.Team<Preferences>>;\n /**\n * 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.\n *\n * @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.\n * @param {string} name - Team name. Max length: 128 chars.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n create<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;\n create<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string, name: string, roles?: string[] } | string,\n ...rest: [(string)?, (string[])?] \n ): Promise<Models.Team<Preferences>> {\n let params: { teamId: string, name: string, roles?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, name: string, roles?: string[] };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n name: rest[0] as string,\n roles: rest[1] as string[] \n };\n }\n \n const teamId = params.teamId;\n const name = params.name;\n const roles = params.roles;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/teams';\n const payload: Payload = {};\n if (typeof teamId !== 'undefined') {\n payload['teamId'] = teamId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a team by its ID. All team members have read access for this resource.\n *\n * @param {string} params.teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n get<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string }): Promise<Models.Team<Preferences>>;\n /**\n * Get a team by its ID. All team members have read access for this resource.\n *\n * @param {string} teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n get<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Models.Team<Preferences>>;\n get<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string } | string \n ): Promise<Models.Team<Preferences>> {\n let params: { teamId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string \n };\n }\n \n const teamId = params.teamId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update the team's name by its unique ID.\n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.name - New team name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string, name: string }): Promise<Models.Team<Preferences>>;\n /**\n * Update the team's name by its unique ID.\n *\n * @param {string} teamId - Team ID.\n * @param {string} name - New team name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;\n updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string, name: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Team<Preferences>> {\n let params: { teamId: string, name: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, name: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n name: rest[0] as string \n };\n }\n \n const teamId = params.teamId;\n const name = params.name;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a team using its ID. Only team members with the owner role can delete the team.\n *\n * @param {string} params.teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n delete(params: { teamId: string }): Promise<{}>;\n /**\n * Delete a team using its ID. Only team members with the owner role can delete the team.\n *\n * @param {string} teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n delete(teamId: string): Promise<{}>;\n delete(\n paramsOrFirst: { teamId: string } | string \n ): Promise<{}> {\n let params: { teamId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string \n };\n }\n \n const teamId = params.teamId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @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\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.MembershipList>}\n */\n listMemberships(params: { teamId: string, queries?: string[], search?: string }): Promise<Models.MembershipList>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @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\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.MembershipList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;\n listMemberships(\n paramsOrFirst: { teamId: string, queries?: string[], search?: string } | string,\n ...rest: [(string[])?, (string)?] \n ): Promise<Models.MembershipList> {\n let params: { teamId: string, queries?: string[], search?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, queries?: string[], search?: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string \n };\n }\n \n const teamId = params.teamId;\n const queries = params.queries;\n const search = params.search;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n * \n * 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.\n * \n * 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. \n * \n * 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.\n * \n *\n * @param {string} params.teamId - Team ID.\n * @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.\n * @param {string} params.email - Email of the new team member.\n * @param {string} params.userId - ID of the user to be added to a team.\n * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.\n * @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.\n * @param {string} params.name - Name of the new team member. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n createMembership(params: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }): Promise<Models.Membership>;\n /**\n * 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.\n * \n * 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.\n * \n * 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. \n * \n * 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.\n * \n *\n * @param {string} teamId - Team ID.\n * @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.\n * @param {string} email - Email of the new team member.\n * @param {string} userId - ID of the user to be added to a team.\n * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.\n * @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.\n * @param {string} name - Name of the new team member. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;\n createMembership(\n paramsOrFirst: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string } | string,\n ...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (string)?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n roles: rest[0] as string[],\n email: rest[1] as string,\n userId: rest[2] as string,\n phone: rest[3] as string,\n url: rest[4] as string,\n name: rest[5] as string \n };\n }\n \n const teamId = params.teamId;\n const roles = params.roles;\n const email = params.email;\n const userId = params.userId;\n const phone = params.phone;\n const url = params.url;\n const name = params.name;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof roles === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"roles\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof phone !== 'undefined') {\n payload['phone'] = phone;\n }\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n getMembership(params: { teamId: string, membershipId: string }): Promise<Models.Membership>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;\n getMembership(\n paramsOrFirst: { teamId: string, membershipId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, membershipId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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).\n * \n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n updateMembership(params: { teamId: string, membershipId: string, roles: string[] }): Promise<Models.Membership>;\n /**\n * 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).\n * \n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;\n updateMembership(\n paramsOrFirst: { teamId: string, membershipId: string, roles: string[] } | string,\n ...rest: [(string)?, (string[])?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, membershipId: string, roles: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string, roles: string[] };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string,\n roles: rest[1] as string[] \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n const roles = params.roles;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n if (typeof roles === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"roles\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteMembership(params: { teamId: string, membershipId: string }): Promise<{}>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteMembership(teamId: string, membershipId: string): Promise<{}>;\n deleteMembership(\n paramsOrFirst: { teamId: string, membershipId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { teamId: string, membershipId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n * \n * If the request is successful, a session for the user is automatically created.\n * \n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @param {string} params.userId - User ID.\n * @param {string} params.secret - Secret key.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n updateMembershipStatus(params: { teamId: string, membershipId: string, userId: string, secret: string }): Promise<Models.Membership>;\n /**\n * 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.\n * \n * If the request is successful, a session for the user is automatically created.\n * \n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @param {string} userId - User ID.\n * @param {string} secret - Secret key.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;\n updateMembershipStatus(\n paramsOrFirst: { teamId: string, membershipId: string, userId: string, secret: string } | string,\n ...rest: [(string)?, (string)?, (string)?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, membershipId: string, userId: string, secret: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string, userId: string, secret: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string,\n userId: rest[1] as string,\n secret: rest[2] as string \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n const userId = params.userId;\n const secret = params.secret;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"secret\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}/status'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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).\n *\n * @param {string} params.teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n */\n getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string }): Promise<Preferences>;\n /**\n * 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).\n *\n * @param {string} teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Preferences>;\n getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string } | string \n ): Promise<Preferences> {\n let params: { teamId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string \n };\n }\n \n const teamId = params.teamId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @param {object} params.prefs - Prefs key-value JSON object.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n */\n updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string, prefs: object }): Promise<Preferences>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @param {object} prefs - Prefs key-value JSON object.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, prefs: object): Promise<Preferences>;\n updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string, prefs: object } | string,\n ...rest: [(object)?] \n ): Promise<Preferences> {\n let params: { teamId: string, prefs: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, prefs: object };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n prefs: rest[0] as object \n };\n }\n \n const teamId = params.teamId;\n const prefs = params.prefs;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof prefs === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"prefs\"');\n }\n\n const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof prefs !== 'undefined') {\n payload['prefs'] = prefs;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources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AA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Teams {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\n *\n * @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\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.TeamList<Preferences>>}\n */\n list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.TeamList<Preferences>>;\n /**\n * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\n *\n * @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\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.TeamList<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.TeamList<Preferences>>;\n list<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.TeamList<Preferences>> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/teams';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @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.\n * @param {string} params.name - Team name. Max length: 128 chars.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string, name: string, roles?: string[] }): Promise<Models.Team<Preferences>>;\n /**\n * 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.\n *\n * @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.\n * @param {string} name - Team name. Max length: 128 chars.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n create<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string, roles?: string[]): Promise<Models.Team<Preferences>>;\n create<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string, name: string, roles?: string[] } | string,\n ...rest: [(string)?, (string[])?] \n ): Promise<Models.Team<Preferences>> {\n let params: { teamId: string, name: string, roles?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, name: string, roles?: string[] };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n name: rest[0] as string,\n roles: rest[1] as string[] \n };\n }\n \n const teamId = params.teamId;\n const name = params.name;\n const roles = params.roles;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/teams';\n const payload: Payload = {};\n if (typeof teamId !== 'undefined') {\n payload['teamId'] = teamId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a team by its ID. All team members have read access for this resource.\n *\n * @param {string} params.teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n get<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string }): Promise<Models.Team<Preferences>>;\n /**\n * Get a team by its ID. All team members have read access for this resource.\n *\n * @param {string} teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n get<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Models.Team<Preferences>>;\n get<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string } | string \n ): Promise<Models.Team<Preferences>> {\n let params: { teamId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string \n };\n }\n \n const teamId = params.teamId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update the team's name by its unique ID.\n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.name - New team name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n */\n updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string, name: string }): Promise<Models.Team<Preferences>>;\n /**\n * Update the team's name by its unique ID.\n *\n * @param {string} teamId - Team ID.\n * @param {string} name - New team name. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Team<Preferences>>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, name: string): Promise<Models.Team<Preferences>>;\n updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string, name: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Team<Preferences>> {\n let params: { teamId: string, name: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, name: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n name: rest[0] as string \n };\n }\n \n const teamId = params.teamId;\n const name = params.name;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a team using its ID. Only team members with the owner role can delete the team.\n *\n * @param {string} params.teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n delete(params: { teamId: string }): Promise<{}>;\n /**\n * Delete a team using its ID. Only team members with the owner role can delete the team.\n *\n * @param {string} teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n delete(teamId: string): Promise<{}>;\n delete(\n paramsOrFirst: { teamId: string } | string \n ): Promise<{}> {\n let params: { teamId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string \n };\n }\n \n const teamId = params.teamId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}'.replace('{teamId}', teamId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @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\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.MembershipList>}\n */\n listMemberships(params: { teamId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.MembershipList>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @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\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.MembershipList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;\n listMemberships(\n paramsOrFirst: { teamId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.MembershipList> {\n let params: { teamId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const teamId = params.teamId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n * \n * 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.\n * \n * 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. \n * \n * 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.\n * \n *\n * @param {string} params.teamId - Team ID.\n * @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.\n * @param {string} params.email - Email of the new team member.\n * @param {string} params.userId - ID of the user to be added to a team.\n * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.\n * @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.\n * @param {string} params.name - Name of the new team member. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n createMembership(params: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string }): Promise<Models.Membership>;\n /**\n * 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.\n * \n * 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.\n * \n * 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. \n * \n * 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.\n * \n *\n * @param {string} teamId - Team ID.\n * @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.\n * @param {string} email - Email of the new team member.\n * @param {string} userId - ID of the user to be added to a team.\n * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.\n * @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.\n * @param {string} name - Name of the new team member. Max length: 128 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;\n createMembership(\n paramsOrFirst: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string } | string,\n ...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (string)?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n roles: rest[0] as string[],\n email: rest[1] as string,\n userId: rest[2] as string,\n phone: rest[3] as string,\n url: rest[4] as string,\n name: rest[5] as string \n };\n }\n \n const teamId = params.teamId;\n const roles = params.roles;\n const email = params.email;\n const userId = params.userId;\n const phone = params.phone;\n const url = params.url;\n const name = params.name;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof roles === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"roles\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof email !== 'undefined') {\n payload['email'] = email;\n }\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof phone !== 'undefined') {\n payload['phone'] = phone;\n }\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n getMembership(params: { teamId: string, membershipId: string }): Promise<Models.Membership>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getMembership(teamId: string, membershipId: string): Promise<Models.Membership>;\n getMembership(\n paramsOrFirst: { teamId: string, membershipId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, membershipId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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).\n * \n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n updateMembership(params: { teamId: string, membershipId: string, roles: string[] }): Promise<Models.Membership>;\n /**\n * 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).\n * \n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @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.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;\n updateMembership(\n paramsOrFirst: { teamId: string, membershipId: string, roles: string[] } | string,\n ...rest: [(string)?, (string[])?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, membershipId: string, roles: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string, roles: string[] };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string,\n roles: rest[1] as string[] \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n const roles = params.roles;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n if (typeof roles === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"roles\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n if (typeof roles !== 'undefined') {\n payload['roles'] = roles;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteMembership(params: { teamId: string, membershipId: string }): Promise<{}>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteMembership(teamId: string, membershipId: string): Promise<{}>;\n deleteMembership(\n paramsOrFirst: { teamId: string, membershipId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { teamId: string, membershipId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n * \n * If the request is successful, a session for the user is automatically created.\n * \n *\n * @param {string} params.teamId - Team ID.\n * @param {string} params.membershipId - Membership ID.\n * @param {string} params.userId - User ID.\n * @param {string} params.secret - Secret key.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n */\n updateMembershipStatus(params: { teamId: string, membershipId: string, userId: string, secret: string }): Promise<Models.Membership>;\n /**\n * 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.\n * \n * If the request is successful, a session for the user is automatically created.\n * \n *\n * @param {string} teamId - Team ID.\n * @param {string} membershipId - Membership ID.\n * @param {string} userId - User ID.\n * @param {string} secret - Secret key.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Membership>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateMembershipStatus(teamId: string, membershipId: string, userId: string, secret: string): Promise<Models.Membership>;\n updateMembershipStatus(\n paramsOrFirst: { teamId: string, membershipId: string, userId: string, secret: string } | string,\n ...rest: [(string)?, (string)?, (string)?] \n ): Promise<Models.Membership> {\n let params: { teamId: string, membershipId: string, userId: string, secret: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, membershipId: string, userId: string, secret: string };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n membershipId: rest[0] as string,\n userId: rest[1] as string,\n secret: rest[2] as string \n };\n }\n \n const teamId = params.teamId;\n const membershipId = params.membershipId;\n const userId = params.userId;\n const secret = params.secret;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof membershipId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"membershipId\"');\n }\n if (typeof userId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"userId\"');\n }\n if (typeof secret === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"secret\"');\n }\n\n const apiPath = '/teams/{teamId}/memberships/{membershipId}/status'.replace('{teamId}', teamId).replace('{membershipId}', membershipId);\n const payload: Payload = {};\n if (typeof userId !== 'undefined') {\n payload['userId'] = userId;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'patch',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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).\n *\n * @param {string} params.teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n */\n getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string }): Promise<Preferences>;\n /**\n * 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).\n *\n * @param {string} teamId - Team ID.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string): Promise<Preferences>;\n getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string } | string \n ): Promise<Preferences> {\n let params: { teamId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string };\n } else {\n params = {\n teamId: paramsOrFirst as string \n };\n }\n \n const teamId = params.teamId;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n\n const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @param {string} params.teamId - Team ID.\n * @param {object} params.prefs - Prefs key-value JSON object.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n */\n updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { teamId: string, prefs: object }): Promise<Preferences>;\n /**\n * 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.\n *\n * @param {string} teamId - Team ID.\n * @param {object} prefs - Prefs key-value JSON object.\n * @throws {AppwriteException}\n * @returns {Promise<Preferences>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, prefs: object): Promise<Preferences>;\n updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(\n paramsOrFirst: { teamId: string, prefs: object } | string,\n ...rest: [(object)?] \n ): Promise<Preferences> {\n let params: { teamId: string, prefs: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { teamId: string, prefs: object };\n } else {\n params = {\n teamId: paramsOrFirst as string,\n prefs: rest[0] as object \n };\n }\n \n const teamId = params.teamId;\n const prefs = params.prefs;\n\n if (typeof teamId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"teamId\"');\n }\n if (typeof prefs === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"prefs\"');\n }\n\n const apiPath = '/teams/{teamId}/prefs'.replace('{teamId}', teamId);\n const payload: Payload = {};\n if (typeof prefs !== 'undefined') {\n payload['prefs'] = prefs;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
@@ -12,11 +12,13 @@ var Teams = class {
12
12
  } else {
13
13
  params = {
14
14
  queries: paramsOrFirst,
15
- search: rest[0]
15
+ search: rest[0],
16
+ total: rest[1]
16
17
  };
17
18
  }
18
19
  const queries = params.queries;
19
20
  const search = params.search;
21
+ const total = params.total;
20
22
  const apiPath = "/teams";
21
23
  const payload = {};
22
24
  if (typeof queries !== "undefined") {
@@ -25,6 +27,9 @@ var Teams = class {
25
27
  if (typeof search !== "undefined") {
26
28
  payload["search"] = search;
27
29
  }
30
+ if (typeof total !== "undefined") {
31
+ payload["total"] = total;
32
+ }
28
33
  const uri = new URL(this.client.config.endpoint + apiPath);
29
34
  const apiHeaders = {};
30
35
  return this.client.call(
@@ -168,12 +173,14 @@ var Teams = class {
168
173
  params = {
169
174
  teamId: paramsOrFirst,
170
175
  queries: rest[0],
171
- search: rest[1]
176
+ search: rest[1],
177
+ total: rest[2]
172
178
  };
173
179
  }
174
180
  const teamId = params.teamId;
175
181
  const queries = params.queries;
176
182
  const search = params.search;
183
+ const total = params.total;
177
184
  if (typeof teamId === "undefined") {
178
185
  throw new AppwriteException('Missing required parameter: "teamId"');
179
186
  }
@@ -185,6 +192,9 @@ var Teams = class {
185
192
  if (typeof search !== "undefined") {
186
193
  payload["search"] = search;
187
194
  }
195
+ if (typeof total !== "undefined") {
196
+ payload["total"] = total;
197
+ }
188
198
  const uri = new URL(this.client.config.endpoint + apiPath);
189
199
  const apiHeaders = {};
190
200
  return this.client.call(