react-native-appwrite 0.20.0 → 0.21.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.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +45 -34
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +46 -35
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/update-membership.md +2 -2
- package/package.json +1 -1
- package/src/channel.ts +7 -9
- package/src/client.ts +32 -5
- package/src/enums/o-auth-provider.ts +2 -0
- package/src/index.ts +0 -1
- package/src/services/account.ts +15 -15
- package/src/services/avatars.ts +3 -3
- package/src/services/graphql.ts +2 -2
- package/src/services/teams.ts +18 -19
- package/types/channel.d.ts +3 -3
- package/types/client.d.ts +2 -1
- package/types/enums/o-auth-provider.d.ts +3 -1
- package/types/index.d.ts +0 -1
- package/types/services/account.d.ts +4 -4
- package/types/services/teams.d.ts +8 -9
- package/src/enums/roles.ts +0 -5
- package/types/enums/roles.d.ts +0 -5
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
-
import { Roles } from '../enums/roles';
|
|
5
4
|
export declare class Teams extends Service {
|
|
6
5
|
constructor(client: Client);
|
|
7
6
|
/**
|
|
@@ -153,7 +152,7 @@ export declare class Teams extends Service {
|
|
|
153
152
|
*
|
|
154
153
|
*
|
|
155
154
|
* @param {string} params.teamId - Team ID.
|
|
156
|
-
* @param {
|
|
155
|
+
* @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.
|
|
157
156
|
* @param {string} params.email - Email of the new team member.
|
|
158
157
|
* @param {string} params.userId - ID of the user to be added to a team.
|
|
159
158
|
* @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -164,7 +163,7 @@ export declare class Teams extends Service {
|
|
|
164
163
|
*/
|
|
165
164
|
createMembership(params: {
|
|
166
165
|
teamId: string;
|
|
167
|
-
roles:
|
|
166
|
+
roles: string[];
|
|
168
167
|
email?: string;
|
|
169
168
|
userId?: string;
|
|
170
169
|
phone?: string;
|
|
@@ -182,7 +181,7 @@ export declare class Teams extends Service {
|
|
|
182
181
|
*
|
|
183
182
|
*
|
|
184
183
|
* @param {string} teamId - Team ID.
|
|
185
|
-
* @param {
|
|
184
|
+
* @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.
|
|
186
185
|
* @param {string} email - Email of the new team member.
|
|
187
186
|
* @param {string} userId - ID of the user to be added to a team.
|
|
188
187
|
* @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -192,7 +191,7 @@ export declare class Teams extends Service {
|
|
|
192
191
|
* @returns {Promise<Models.Membership>}
|
|
193
192
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
194
193
|
*/
|
|
195
|
-
createMembership(teamId: string, roles:
|
|
194
|
+
createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
|
|
196
195
|
/**
|
|
197
196
|
* 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.
|
|
198
197
|
*
|
|
@@ -221,14 +220,14 @@ export declare class Teams extends Service {
|
|
|
221
220
|
*
|
|
222
221
|
* @param {string} params.teamId - Team ID.
|
|
223
222
|
* @param {string} params.membershipId - Membership ID.
|
|
224
|
-
* @param {
|
|
223
|
+
* @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.
|
|
225
224
|
* @throws {AppwriteException}
|
|
226
225
|
* @returns {Promise}
|
|
227
226
|
*/
|
|
228
227
|
updateMembership(params: {
|
|
229
228
|
teamId: string;
|
|
230
229
|
membershipId: string;
|
|
231
|
-
roles:
|
|
230
|
+
roles: string[];
|
|
232
231
|
}): Promise<Models.Membership>;
|
|
233
232
|
/**
|
|
234
233
|
* 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).
|
|
@@ -236,12 +235,12 @@ export declare class Teams extends Service {
|
|
|
236
235
|
*
|
|
237
236
|
* @param {string} teamId - Team ID.
|
|
238
237
|
* @param {string} membershipId - Membership ID.
|
|
239
|
-
* @param {
|
|
238
|
+
* @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.
|
|
240
239
|
* @throws {AppwriteException}
|
|
241
240
|
* @returns {Promise<Models.Membership>}
|
|
242
241
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
243
242
|
*/
|
|
244
|
-
updateMembership(teamId: string, membershipId: string, roles:
|
|
243
|
+
updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
|
|
245
244
|
/**
|
|
246
245
|
* 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.
|
|
247
246
|
*
|
package/src/enums/roles.ts
DELETED