react-native-appwrite 0.20.0 → 0.23.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 +55 -38
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +56 -39
- 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 +19 -13
- 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 +9 -7
- 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
|
@@ -653,7 +653,7 @@ export declare class Account extends Service {
|
|
|
653
653
|
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
654
654
|
*
|
|
655
655
|
*
|
|
656
|
-
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
656
|
+
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
|
|
657
657
|
* @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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.
|
|
658
658
|
* @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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.
|
|
659
659
|
* @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -674,7 +674,7 @@ export declare class Account extends Service {
|
|
|
674
674
|
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
675
675
|
*
|
|
676
676
|
*
|
|
677
|
-
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
677
|
+
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
|
|
678
678
|
* @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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.
|
|
679
679
|
* @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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.
|
|
680
680
|
* @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -930,7 +930,7 @@ export declare class Account extends Service {
|
|
|
930
930
|
*
|
|
931
931
|
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
932
932
|
*
|
|
933
|
-
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
933
|
+
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
|
|
934
934
|
* @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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.
|
|
935
935
|
* @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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.
|
|
936
936
|
* @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -950,7 +950,7 @@ export declare class Account extends Service {
|
|
|
950
950
|
*
|
|
951
951
|
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
952
952
|
*
|
|
953
|
-
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
|
|
953
|
+
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine.
|
|
954
954
|
* @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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.
|
|
955
955
|
* @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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.
|
|
956
956
|
* @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -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