react-native-appwrite 0.17.1 → 0.18.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 (44) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/sdk.js +339 -17
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +339 -18
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/docs/examples/account/list-identities.md +2 -1
  7. package/docs/examples/account/list-logs.md +2 -1
  8. package/docs/examples/databases/create-document.md +1 -1
  9. package/docs/examples/databases/list-documents.md +2 -1
  10. package/docs/examples/databases/update-document.md +1 -1
  11. package/docs/examples/databases/upsert-document.md +1 -1
  12. package/docs/examples/functions/list-executions.md +2 -1
  13. package/docs/examples/storage/create-file.md +1 -1
  14. package/docs/examples/storage/list-files.md +2 -1
  15. package/docs/examples/storage/update-file.md +1 -1
  16. package/docs/examples/tablesdb/create-row.md +1 -1
  17. package/docs/examples/tablesdb/list-rows.md +2 -1
  18. package/docs/examples/tablesdb/update-row.md +1 -1
  19. package/docs/examples/tablesdb/upsert-row.md +1 -1
  20. package/docs/examples/teams/list-memberships.md +2 -1
  21. package/docs/examples/teams/list.md +2 -1
  22. package/package.json +2 -3
  23. package/src/client.ts +1 -1
  24. package/src/enums/execution-status.ts +1 -0
  25. package/src/index.ts +3 -0
  26. package/src/models.ts +1 -1
  27. package/src/operator.ts +308 -0
  28. package/src/query.ts +6 -6
  29. package/src/services/account.ts +30 -12
  30. package/src/services/databases.ts +15 -7
  31. package/src/services/functions.ts +15 -7
  32. package/src/services/storage.ts +15 -7
  33. package/src/services/tables-db.ts +15 -7
  34. package/src/services/teams.ts +30 -14
  35. package/types/enums/execution-status.d.ts +2 -1
  36. package/types/index.d.ts +3 -0
  37. package/types/models.d.ts +1 -1
  38. package/types/operator.d.ts +180 -0
  39. package/types/services/account.d.ts +8 -2
  40. package/types/services/databases.d.ts +4 -1
  41. package/types/services/functions.d.ts +4 -1
  42. package/types/services/storage.d.ts +4 -1
  43. package/types/services/tables-db.d.ts +4 -1
  44. package/types/services/teams.d.ts +8 -2
@@ -0,0 +1,180 @@
1
+ type OperatorValuesSingle = string | number | boolean;
2
+ export type OperatorValuesList = string[] | number[] | boolean[] | any[];
3
+ export type OperatorValues = OperatorValuesSingle | OperatorValuesList;
4
+ export declare enum Condition {
5
+ Equal = "equal",
6
+ NotEqual = "notEqual",
7
+ GreaterThan = "greaterThan",
8
+ GreaterThanEqual = "greaterThanEqual",
9
+ LessThan = "lessThan",
10
+ LessThanEqual = "lessThanEqual",
11
+ Contains = "contains",
12
+ IsNull = "isNull",
13
+ IsNotNull = "isNotNull"
14
+ }
15
+ /**
16
+ * Helper class to generate operator strings for atomic operations.
17
+ */
18
+ export declare class Operator {
19
+ method: string;
20
+ values: OperatorValuesList | undefined;
21
+ /**
22
+ * Constructor for Operator class.
23
+ *
24
+ * @param {string} method
25
+ * @param {OperatorValues} values
26
+ */
27
+ constructor(method: string, values?: OperatorValues);
28
+ /**
29
+ * Convert the operator object to a JSON string.
30
+ *
31
+ * @returns {string}
32
+ */
33
+ toString(): string;
34
+ /**
35
+ * Increment a numeric attribute by a specified value.
36
+ *
37
+ * @param {number} value
38
+ * @param {number} max
39
+ * @returns {string}
40
+ */
41
+ static increment: (value?: number, max?: number) => string;
42
+ /**
43
+ * Decrement a numeric attribute by a specified value.
44
+ *
45
+ * @param {number} value
46
+ * @param {number} min
47
+ * @returns {string}
48
+ */
49
+ static decrement: (value?: number, min?: number) => string;
50
+ /**
51
+ * Multiply a numeric attribute by a specified factor.
52
+ *
53
+ * @param {number} factor
54
+ * @param {number} max
55
+ * @returns {string}
56
+ */
57
+ static multiply: (factor: number, max?: number) => string;
58
+ /**
59
+ * Divide a numeric attribute by a specified divisor.
60
+ *
61
+ * @param {number} divisor
62
+ * @param {number} min
63
+ * @returns {string}
64
+ */
65
+ static divide: (divisor: number, min?: number) => string;
66
+ /**
67
+ * Apply modulo operation on a numeric attribute.
68
+ *
69
+ * @param {number} divisor
70
+ * @returns {string}
71
+ */
72
+ static modulo: (divisor: number) => string;
73
+ /**
74
+ * Raise a numeric attribute to a specified power.
75
+ *
76
+ * @param {number} exponent
77
+ * @param {number} max
78
+ * @returns {string}
79
+ */
80
+ static power: (exponent: number, max?: number) => string;
81
+ /**
82
+ * Append values to an array attribute.
83
+ *
84
+ * @param {any[]} values
85
+ * @returns {string}
86
+ */
87
+ static arrayAppend: (values: any[]) => string;
88
+ /**
89
+ * Prepend values to an array attribute.
90
+ *
91
+ * @param {any[]} values
92
+ * @returns {string}
93
+ */
94
+ static arrayPrepend: (values: any[]) => string;
95
+ /**
96
+ * Insert a value at a specific index in an array attribute.
97
+ *
98
+ * @param {number} index
99
+ * @param {any} value
100
+ * @returns {string}
101
+ */
102
+ static arrayInsert: (index: number, value: any) => string;
103
+ /**
104
+ * Remove a value from an array attribute.
105
+ *
106
+ * @param {any} value
107
+ * @returns {string}
108
+ */
109
+ static arrayRemove: (value: any) => string;
110
+ /**
111
+ * Remove duplicate values from an array attribute.
112
+ *
113
+ * @returns {string}
114
+ */
115
+ static arrayUnique: () => string;
116
+ /**
117
+ * Keep only values that exist in both the current array and the provided array.
118
+ *
119
+ * @param {any[]} values
120
+ * @returns {string}
121
+ */
122
+ static arrayIntersect: (values: any[]) => string;
123
+ /**
124
+ * Remove values from the array that exist in the provided array.
125
+ *
126
+ * @param {any[]} values
127
+ * @returns {string}
128
+ */
129
+ static arrayDiff: (values: any[]) => string;
130
+ /**
131
+ * Filter array values based on a condition.
132
+ *
133
+ * @param {Condition} condition
134
+ * @param {any} value
135
+ * @returns {string}
136
+ */
137
+ static arrayFilter: (condition: Condition, value?: any) => string;
138
+ /**
139
+ * Concatenate a value to a string or array attribute.
140
+ *
141
+ * @param {any} value
142
+ * @returns {string}
143
+ */
144
+ static stringConcat: (value: any) => string;
145
+ /**
146
+ * Replace occurrences of a search string with a replacement string.
147
+ *
148
+ * @param {string} search
149
+ * @param {string} replace
150
+ * @returns {string}
151
+ */
152
+ static stringReplace: (search: string, replace: string) => string;
153
+ /**
154
+ * Toggle a boolean attribute.
155
+ *
156
+ * @returns {string}
157
+ */
158
+ static toggle: () => string;
159
+ /**
160
+ * Add days to a date attribute.
161
+ *
162
+ * @param {number} days
163
+ * @returns {string}
164
+ */
165
+ static dateAddDays: (days: number) => string;
166
+ /**
167
+ * Subtract days from a date attribute.
168
+ *
169
+ * @param {number} days
170
+ * @returns {string}
171
+ */
172
+ static dateSubDays: (days: number) => string;
173
+ /**
174
+ * Set a date attribute to the current date and time.
175
+ *
176
+ * @returns {string}
177
+ */
178
+ static dateSetNow: () => string;
179
+ }
180
+ export {};
@@ -71,21 +71,24 @@ export declare class Account extends Service {
71
71
  * Get the list of identities for the currently logged in user.
72
72
  *
73
73
  * @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, provider, providerUid, providerEmail, providerAccessTokenExpiry
74
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
74
75
  * @throws {AppwriteException}
75
76
  * @returns {Promise}
76
77
  */
77
78
  listIdentities(params?: {
78
79
  queries?: string[];
80
+ total?: boolean;
79
81
  }): Promise<Models.IdentityList>;
80
82
  /**
81
83
  * Get the list of identities for the currently logged in user.
82
84
  *
83
85
  * @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, provider, providerUid, providerEmail, providerAccessTokenExpiry
86
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
84
87
  * @throws {AppwriteException}
85
88
  * @returns {Promise<Models.IdentityList>}
86
89
  * @deprecated Use the object parameter style method for a better developer experience.
87
90
  */
88
- listIdentities(queries?: string[]): Promise<Models.IdentityList>;
91
+ listIdentities(queries?: string[], total?: boolean): Promise<Models.IdentityList>;
89
92
  /**
90
93
  * Delete an identity by its unique ID.
91
94
  *
@@ -116,21 +119,24 @@ export declare class Account extends Service {
116
119
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
117
120
  *
118
121
  * @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). Only supported methods are limit and offset
122
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
119
123
  * @throws {AppwriteException}
120
124
  * @returns {Promise}
121
125
  */
122
126
  listLogs(params?: {
123
127
  queries?: string[];
128
+ total?: boolean;
124
129
  }): Promise<Models.LogList>;
125
130
  /**
126
131
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
127
132
  *
128
133
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
134
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
129
135
  * @throws {AppwriteException}
130
136
  * @returns {Promise<Models.LogList>}
131
137
  * @deprecated Use the object parameter style method for a better developer experience.
132
138
  */
133
- listLogs(queries?: string[]): Promise<Models.LogList>;
139
+ listLogs(queries?: string[], total?: boolean): Promise<Models.LogList>;
134
140
  /**
135
141
  * Enable or disable MFA on an account.
136
142
  *
@@ -133,6 +133,7 @@ export declare class Databases extends Service {
133
133
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
134
134
  * @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.
135
135
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
136
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
136
137
  * @throws {AppwriteException}
137
138
  * @returns {Promise}
138
139
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
@@ -142,6 +143,7 @@ export declare class Databases extends Service {
142
143
  collectionId: string;
143
144
  queries?: string[];
144
145
  transactionId?: string;
146
+ total?: boolean;
145
147
  }): Promise<Models.DocumentList<Document>>;
146
148
  /**
147
149
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
@@ -150,11 +152,12 @@ export declare class Databases extends Service {
150
152
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
151
153
  * @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.
152
154
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
155
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
153
156
  * @throws {AppwriteException}
154
157
  * @returns {Promise<Models.DocumentList<Document>>}
155
158
  * @deprecated Use the object parameter style method for a better developer experience.
156
159
  */
157
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
160
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
158
161
  /**
159
162
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
160
163
  *
@@ -9,23 +9,26 @@ export declare class Functions extends Service {
9
9
  *
10
10
  * @param {string} params.functionId - Function ID.
11
11
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
12
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
12
13
  * @throws {AppwriteException}
13
14
  * @returns {Promise}
14
15
  */
15
16
  listExecutions(params: {
16
17
  functionId: string;
17
18
  queries?: string[];
19
+ total?: boolean;
18
20
  }): Promise<Models.ExecutionList>;
19
21
  /**
20
22
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
21
23
  *
22
24
  * @param {string} functionId - Function ID.
23
25
  * @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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
26
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
24
27
  * @throws {AppwriteException}
25
28
  * @returns {Promise<Models.ExecutionList>}
26
29
  * @deprecated Use the object parameter style method for a better developer experience.
27
30
  */
28
- listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList>;
31
+ listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
29
32
  /**
30
33
  * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
31
34
  *
@@ -12,6 +12,7 @@ export declare class Storage extends Service {
12
12
  * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
13
13
  * @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
14
14
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
15
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
15
16
  * @throws {AppwriteException}
16
17
  * @returns {Promise}
17
18
  */
@@ -19,6 +20,7 @@ export declare class Storage extends Service {
19
20
  bucketId: string;
20
21
  queries?: string[];
21
22
  search?: string;
23
+ total?: boolean;
22
24
  }): Promise<Models.FileList>;
23
25
  /**
24
26
  * Get a list of all the user files. You can use the query params to filter your results.
@@ -26,11 +28,12 @@ export declare class Storage extends Service {
26
28
  * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
27
29
  * @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
28
30
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
31
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
29
32
  * @throws {AppwriteException}
30
33
  * @returns {Promise<Models.FileList>}
31
34
  * @deprecated Use the object parameter style method for a better developer experience.
32
35
  */
33
- listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
36
+ listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;
34
37
  /**
35
38
  * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
36
39
  *
@@ -133,6 +133,7 @@ export declare class TablesDB extends Service {
133
133
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
134
134
  * @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.
135
135
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
136
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
136
137
  * @throws {AppwriteException}
137
138
  * @returns {Promise}
138
139
  */
@@ -141,6 +142,7 @@ export declare class TablesDB extends Service {
141
142
  tableId: string;
142
143
  queries?: string[];
143
144
  transactionId?: string;
145
+ total?: boolean;
144
146
  }): Promise<Models.RowList<Row>>;
145
147
  /**
146
148
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
@@ -149,11 +151,12 @@ export declare class TablesDB extends Service {
149
151
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
150
152
  * @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.
151
153
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
154
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
152
155
  * @throws {AppwriteException}
153
156
  * @returns {Promise<Models.RowList<Row>>}
154
157
  * @deprecated Use the object parameter style method for a better developer experience.
155
158
  */
156
- listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
159
+ listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
157
160
  /**
158
161
  * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
159
162
  *
@@ -8,23 +8,26 @@ export declare class Teams extends Service {
8
8
  *
9
9
  * @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
10
10
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
11
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
11
12
  * @throws {AppwriteException}
12
13
  * @returns {Promise}
13
14
  */
14
15
  list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
15
16
  queries?: string[];
16
17
  search?: string;
18
+ total?: boolean;
17
19
  }): Promise<Models.TeamList<Preferences>>;
18
20
  /**
19
21
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
20
22
  *
21
23
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan
22
24
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
25
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
23
26
  * @throws {AppwriteException}
24
27
  * @returns {Promise<Models.TeamList<Preferences>>}
25
28
  * @deprecated Use the object parameter style method for a better developer experience.
26
29
  */
27
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
30
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.TeamList<Preferences>>;
28
31
  /**
29
32
  * 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.
30
33
  *
@@ -116,6 +119,7 @@ export declare class Teams extends Service {
116
119
  * @param {string} params.teamId - Team ID.
117
120
  * @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
118
121
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
122
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
119
123
  * @throws {AppwriteException}
120
124
  * @returns {Promise}
121
125
  */
@@ -123,6 +127,7 @@ export declare class Teams extends Service {
123
127
  teamId: string;
124
128
  queries?: string[];
125
129
  search?: string;
130
+ total?: boolean;
126
131
  }): Promise<Models.MembershipList>;
127
132
  /**
128
133
  * 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.
@@ -130,11 +135,12 @@ export declare class Teams extends Service {
130
135
  * @param {string} teamId - Team ID.
131
136
  * @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
132
137
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
138
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
133
139
  * @throws {AppwriteException}
134
140
  * @returns {Promise<Models.MembershipList>}
135
141
  * @deprecated Use the object parameter style method for a better developer experience.
136
142
  */
137
- listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
143
+ listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
138
144
  /**
139
145
  * 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.
140
146
  *