@appwrite.io/console 15.2.0 → 15.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.
- package/README.md +3 -3
- package/dist/cjs/sdk.js +12031 -9316
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +12028 -9316
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +12031 -9316
- package/package.json +4 -4
- package/types/client.d.ts +11 -0
- package/types/enums/addon.d.ts +2 -0
- package/types/enums/block-mode.d.ts +4 -0
- package/types/enums/database-status.d.ts +5 -0
- package/types/enums/health-queue-name.d.ts +2 -1
- package/types/enums/o-auth-2-oidc-prompt.d.ts +6 -0
- package/types/enums/organization-key-scopes.d.ts +4 -0
- package/types/enums/project-key-scopes.d.ts +4 -0
- package/types/enums/project-o-auth-2-oidc-prompt.d.ts +6 -0
- package/types/enums/query-suggestion-resource.d.ts +3 -0
- package/types/index.d.ts +8 -1
- package/types/models.d.ts +526 -392
- package/types/query.d.ts +24 -0
- package/types/services/account.d.ts +4 -4
- package/types/services/backups.d.ts +10 -1
- package/types/services/console.d.ts +35 -0
- package/types/services/databases.d.ts +0 -78
- package/types/services/documents-db.d.ts +4 -71
- package/types/services/domains.d.ts +26 -2
- package/types/services/functions.d.ts +4 -4
- package/types/services/health.d.ts +33 -16
- package/types/services/locale.d.ts +2 -2
- package/types/services/manager.d.ts +5 -1
- package/types/services/messaging.d.ts +0 -100
- package/types/services/mongo.d.ts +792 -0
- package/types/services/mysql.d.ts +882 -0
- package/types/services/notifications.d.ts +51 -0
- package/types/services/oauth-2.d.ts +117 -9
- package/types/services/organization.d.ts +158 -6
- package/types/services/organizations.d.ts +21 -0
- package/types/services/{compute.d.ts → postgresql.d.ts} +193 -322
- package/types/services/project.d.ts +14 -7
- package/types/services/projects.d.ts +186 -0
- package/types/services/tables-db.d.ts +89 -57
- package/types/services/usage.d.ts +16 -22
- package/types/services/users.d.ts +2 -2
- package/types/services/vectors-db.d.ts +8 -73
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
import type { Models } from '../models';
|
|
3
|
+
export declare class Notifications {
|
|
4
|
+
client: Client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
/**
|
|
7
|
+
* Get the list of notifications for the currently logged in console user. Use queries to filter the results by attributes such as read status, view timestamps, or creation date.
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* @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: read, type, channel, messageId, projectId, resourceType, resourceId, parentResourceType, parentResourceId, firstSeen, lastSeen
|
|
11
|
+
* @throws {AppwriteException}
|
|
12
|
+
* @returns {Promise<Models.NotificationList>}
|
|
13
|
+
*/
|
|
14
|
+
list(params?: {
|
|
15
|
+
queries?: string[];
|
|
16
|
+
}): Promise<Models.NotificationList>;
|
|
17
|
+
/**
|
|
18
|
+
* Get the list of notifications for the currently logged in console user. Use queries to filter the results by attributes such as read status, view timestamps, or creation date.
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* @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: read, type, channel, messageId, projectId, resourceType, resourceId, parentResourceType, parentResourceId, firstSeen, lastSeen
|
|
22
|
+
* @throws {AppwriteException}
|
|
23
|
+
* @returns {Promise<Models.NotificationList>}
|
|
24
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
25
|
+
*/
|
|
26
|
+
list(queries?: string[]): Promise<Models.NotificationList>;
|
|
27
|
+
/**
|
|
28
|
+
* Update a notification by its unique ID. Use the `read` parameter to mark the notification as read or unread.
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* @param {string} params.notificationId - Notification ID.
|
|
32
|
+
* @param {boolean} params.read - Notification read status.
|
|
33
|
+
* @throws {AppwriteException}
|
|
34
|
+
* @returns {Promise<Models.Notification>}
|
|
35
|
+
*/
|
|
36
|
+
update(params: {
|
|
37
|
+
notificationId: string;
|
|
38
|
+
read: boolean;
|
|
39
|
+
}): Promise<Models.Notification>;
|
|
40
|
+
/**
|
|
41
|
+
* Update a notification by its unique ID. Use the `read` parameter to mark the notification as read or unread.
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* @param {string} notificationId - Notification ID.
|
|
45
|
+
* @param {boolean} read - Notification read status.
|
|
46
|
+
* @throws {AppwriteException}
|
|
47
|
+
* @returns {Promise<Models.Notification>}
|
|
48
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
49
|
+
*/
|
|
50
|
+
update(notificationId: string, read: boolean): Promise<Models.Notification>;
|
|
51
|
+
}
|
|
@@ -8,30 +8,33 @@ export declare class Oauth2 {
|
|
|
8
8
|
*
|
|
9
9
|
* @param {string} params.grantId - Grant ID made during authorization, provided to consent screen in URL search params.
|
|
10
10
|
* @param {string} params.authorizationDetails - Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.
|
|
11
|
+
* @param {string} params.scope - Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes.
|
|
11
12
|
* @throws {AppwriteException}
|
|
12
13
|
* @returns {Promise<Models.Oauth2Approve>}
|
|
13
14
|
*/
|
|
14
15
|
approve(params: {
|
|
15
16
|
grantId: string;
|
|
16
17
|
authorizationDetails?: string;
|
|
18
|
+
scope?: string;
|
|
17
19
|
}): Promise<Models.Oauth2Approve>;
|
|
18
20
|
/**
|
|
19
21
|
* Approve an OAuth2 grant after the user gives consent. Returns the `redirectUrl` the end user should be sent to. The consent screen may optionally pass enriched `authorization_details` to record the concrete resources the user selected. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
|
|
20
22
|
*
|
|
21
23
|
* @param {string} grantId - Grant ID made during authorization, provided to consent screen in URL search params.
|
|
22
24
|
* @param {string} authorizationDetails - Enriched `authorization_details` the user consented to, replacing what the client requested. Each entry must use a `type` the project accepts. Optional; omit to keep the originally requested details.
|
|
25
|
+
* @param {string} scope - Space-separated scopes the user consented to. Must be a subset of the scopes originally requested; identity scopes such as `openid` are always retained. Optional; omit to keep the originally requested scopes.
|
|
23
26
|
* @throws {AppwriteException}
|
|
24
27
|
* @returns {Promise<Models.Oauth2Approve>}
|
|
25
28
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
26
29
|
*/
|
|
27
|
-
approve(grantId: string, authorizationDetails?: string): Promise<Models.Oauth2Approve>;
|
|
30
|
+
approve(grantId: string, authorizationDetails?: string, scope?: string): Promise<Models.Oauth2Approve>;
|
|
28
31
|
/**
|
|
29
32
|
* Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
|
|
30
33
|
*
|
|
31
34
|
* @param {string} params.clientId - OAuth2 client ID.
|
|
32
35
|
* @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
33
36
|
* @param {string} params.responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).
|
|
34
|
-
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
37
|
+
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
35
38
|
* @param {string} params.state - OAuth2 state. You receive this back in the redirect URI.
|
|
36
39
|
* @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
37
40
|
* @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
@@ -40,14 +43,15 @@ export declare class Oauth2 {
|
|
|
40
43
|
* @param {number} params.maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.
|
|
41
44
|
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
42
45
|
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
46
|
+
* @param {string} params.requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint.
|
|
43
47
|
* @throws {AppwriteException}
|
|
44
48
|
* @returns {Promise<Models.Oauth2Authorize>}
|
|
45
49
|
*/
|
|
46
|
-
authorize(params
|
|
47
|
-
clientId
|
|
48
|
-
redirectUri
|
|
49
|
-
responseType
|
|
50
|
-
scope
|
|
50
|
+
authorize(params?: {
|
|
51
|
+
clientId?: string;
|
|
52
|
+
redirectUri?: string;
|
|
53
|
+
responseType?: string;
|
|
54
|
+
scope?: string;
|
|
51
55
|
state?: string;
|
|
52
56
|
nonce?: string;
|
|
53
57
|
codeChallenge?: string;
|
|
@@ -56,6 +60,7 @@ export declare class Oauth2 {
|
|
|
56
60
|
maxAge?: number;
|
|
57
61
|
authorizationDetails?: string;
|
|
58
62
|
resource?: string;
|
|
63
|
+
requestUri?: string;
|
|
59
64
|
}): Promise<Models.Oauth2Authorize>;
|
|
60
65
|
/**
|
|
61
66
|
* Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
|
|
@@ -63,7 +68,7 @@ export declare class Oauth2 {
|
|
|
63
68
|
* @param {string} clientId - OAuth2 client ID.
|
|
64
69
|
* @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
65
70
|
* @param {string} responseType - OAuth2 / OIDC response type. One of `code` (Authorization Code Flow), `id_token` (Implicit Flow, OIDC login only), or `code id_token` (Hybrid Flow).
|
|
66
|
-
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`.
|
|
71
|
+
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
67
72
|
* @param {string} state - OAuth2 state. You receive this back in the redirect URI.
|
|
68
73
|
* @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
69
74
|
* @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
@@ -72,11 +77,12 @@ export declare class Oauth2 {
|
|
|
72
77
|
* @param {number} maxAge - OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.
|
|
73
78
|
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
74
79
|
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
80
|
+
* @param {string} requestUri - OAuth2 authorization request handle returned by the pushed authorization request endpoint.
|
|
75
81
|
* @throws {AppwriteException}
|
|
76
82
|
* @returns {Promise<Models.Oauth2Authorize>}
|
|
77
83
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
78
84
|
*/
|
|
79
|
-
authorize(clientId
|
|
85
|
+
authorize(clientId?: string, redirectUri?: string, responseType?: string, scope?: string, state?: string, nonce?: string, codeChallenge?: string, codeChallengeMethod?: string, prompt?: string, maxAge?: number, authorizationDetails?: string, resource?: string, requestUri?: string): Promise<Models.Oauth2Authorize>;
|
|
80
86
|
/**
|
|
81
87
|
* Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.
|
|
82
88
|
*
|
|
@@ -177,6 +183,108 @@ export declare class Oauth2 {
|
|
|
177
183
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
178
184
|
*/
|
|
179
185
|
logout(idTokenHint?: string, logoutHint?: string, clientId?: string, postLogoutRedirectUri?: string, state?: string, uiLocales?: string): Promise<{}>;
|
|
186
|
+
/**
|
|
187
|
+
* List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.
|
|
188
|
+
*
|
|
189
|
+
* @param {number} params.limit - Maximum number of organizations to return. Between 1 and 5000.
|
|
190
|
+
* @param {number} params.offset - Number of organizations to skip before returning results. Used for pagination.
|
|
191
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
192
|
+
* @throws {AppwriteException}
|
|
193
|
+
* @returns {Promise<Models.Oauth2OrganizationList>}
|
|
194
|
+
*/
|
|
195
|
+
listOrganizations(params?: {
|
|
196
|
+
limit?: number;
|
|
197
|
+
offset?: number;
|
|
198
|
+
search?: string;
|
|
199
|
+
}): Promise<Models.Oauth2OrganizationList>;
|
|
200
|
+
/**
|
|
201
|
+
* List the organizations the OAuth2 access token can access. Resolves the token's `organization` authorization details, expanding the `*` wildcard into the concrete set of organizations the user can see.
|
|
202
|
+
*
|
|
203
|
+
* @param {number} limit - Maximum number of organizations to return. Between 1 and 5000.
|
|
204
|
+
* @param {number} offset - Number of organizations to skip before returning results. Used for pagination.
|
|
205
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
206
|
+
* @throws {AppwriteException}
|
|
207
|
+
* @returns {Promise<Models.Oauth2OrganizationList>}
|
|
208
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
209
|
+
*/
|
|
210
|
+
listOrganizations(limit?: number, offset?: number, search?: string): Promise<Models.Oauth2OrganizationList>;
|
|
211
|
+
/**
|
|
212
|
+
* Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.
|
|
213
|
+
*
|
|
214
|
+
* @param {string} params.clientId - OAuth2 client ID.
|
|
215
|
+
* @param {string} params.redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
216
|
+
* @param {string} params.responseType - OAuth2 / OIDC response type.
|
|
217
|
+
* @param {string} params.scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
218
|
+
* @param {string} params.state - OAuth2 state. You receive this back in the redirect URI.
|
|
219
|
+
* @param {string} params.nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
220
|
+
* @param {string} params.codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
221
|
+
* @param {string} params.codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
|
|
222
|
+
* @param {string} params.prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
|
|
223
|
+
* @param {number} params.maxAge - OIDC max_age parameter for customization of consent screen.
|
|
224
|
+
* @param {string} params.authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
225
|
+
* @param {string} params.resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
226
|
+
* @throws {AppwriteException}
|
|
227
|
+
* @returns {Promise<Models.Oauth2PAR>}
|
|
228
|
+
*/
|
|
229
|
+
createPAR(params: {
|
|
230
|
+
clientId: string;
|
|
231
|
+
redirectUri: string;
|
|
232
|
+
responseType: string;
|
|
233
|
+
scope: string;
|
|
234
|
+
state?: string;
|
|
235
|
+
nonce?: string;
|
|
236
|
+
codeChallenge?: string;
|
|
237
|
+
codeChallengeMethod?: string;
|
|
238
|
+
prompt?: string;
|
|
239
|
+
maxAge?: number;
|
|
240
|
+
authorizationDetails?: string;
|
|
241
|
+
resource?: string;
|
|
242
|
+
}): Promise<Models.Oauth2PAR>;
|
|
243
|
+
/**
|
|
244
|
+
* Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.
|
|
245
|
+
*
|
|
246
|
+
* @param {string} clientId - OAuth2 client ID.
|
|
247
|
+
* @param {string} redirectUri - Redirect URI where visitor will be redirected after authorization, whether successful or not.
|
|
248
|
+
* @param {string} responseType - OAuth2 / OIDC response type.
|
|
249
|
+
* @param {string} scope - Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: `openid`, `email`, `profile`, `phone`.
|
|
250
|
+
* @param {string} state - OAuth2 state. You receive this back in the redirect URI.
|
|
251
|
+
* @param {string} nonce - OIDC nonce parameter to prevent replay attacks. Required when response_type includes `id_token`.
|
|
252
|
+
* @param {string} codeChallenge - PKCE code challenge. Required when OAuth2 app is public.
|
|
253
|
+
* @param {string} codeChallengeMethod - PKCE code challenge method. Required when OAuth2 app is public.
|
|
254
|
+
* @param {string} prompt - OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.
|
|
255
|
+
* @param {number} maxAge - OIDC max_age parameter for customization of consent screen.
|
|
256
|
+
* @param {string} authorizationDetails - Rich authorization request. JSON array of objects, each with a `type` and project-defined fields
|
|
257
|
+
* @param {string} resource - RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.
|
|
258
|
+
* @throws {AppwriteException}
|
|
259
|
+
* @returns {Promise<Models.Oauth2PAR>}
|
|
260
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
261
|
+
*/
|
|
262
|
+
createPAR(clientId: string, redirectUri: string, responseType: string, scope: string, state?: string, nonce?: string, codeChallenge?: string, codeChallengeMethod?: string, prompt?: string, maxAge?: number, authorizationDetails?: string, resource?: string): Promise<Models.Oauth2PAR>;
|
|
263
|
+
/**
|
|
264
|
+
* List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.
|
|
265
|
+
*
|
|
266
|
+
* @param {number} params.limit - Maximum number of projects to return. Between 1 and 5000.
|
|
267
|
+
* @param {number} params.offset - Number of projects to skip before returning results. Used for pagination.
|
|
268
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
269
|
+
* @throws {AppwriteException}
|
|
270
|
+
* @returns {Promise<Models.Oauth2ProjectList>}
|
|
271
|
+
*/
|
|
272
|
+
listProjects(params?: {
|
|
273
|
+
limit?: number;
|
|
274
|
+
offset?: number;
|
|
275
|
+
search?: string;
|
|
276
|
+
}): Promise<Models.Oauth2ProjectList>;
|
|
277
|
+
/**
|
|
278
|
+
* List the projects the OAuth2 access token can access. Resolves the token's `project` authorization details, expanding the `*` wildcard into the concrete set of projects the user can see.
|
|
279
|
+
*
|
|
280
|
+
* @param {number} limit - Maximum number of projects to return. Between 1 and 5000.
|
|
281
|
+
* @param {number} offset - Number of projects to skip before returning results. Used for pagination.
|
|
282
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
283
|
+
* @throws {AppwriteException}
|
|
284
|
+
* @returns {Promise<Models.Oauth2ProjectList>}
|
|
285
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
286
|
+
*/
|
|
287
|
+
listProjects(limit?: number, offset?: number, search?: string): Promise<Models.Oauth2ProjectList>;
|
|
180
288
|
/**
|
|
181
289
|
* Reject an OAuth2 grant when the user denies consent. Returns the `redirectUrl` the end user should be sent to with an `access_denied` error. You can pass Accept header of `application/json` to receive a JSON response instead of a redirect.
|
|
182
290
|
*
|
|
@@ -5,6 +5,39 @@ import { Region } from '../enums/region';
|
|
|
5
5
|
export declare class Organization {
|
|
6
6
|
client: Client;
|
|
7
7
|
constructor(client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Get the current organization.
|
|
10
|
+
*
|
|
11
|
+
* @throws {AppwriteException}
|
|
12
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
13
|
+
*/
|
|
14
|
+
get<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.Organization<Preferences>>;
|
|
15
|
+
/**
|
|
16
|
+
* Update the current organization's name.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} params.name - New organization name. Max length: 128 chars.
|
|
19
|
+
* @throws {AppwriteException}
|
|
20
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
21
|
+
*/
|
|
22
|
+
update<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
|
|
23
|
+
name: string;
|
|
24
|
+
}): Promise<Models.Organization<Preferences>>;
|
|
25
|
+
/**
|
|
26
|
+
* Update the current organization's name.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} name - New organization name. Max length: 128 chars.
|
|
29
|
+
* @throws {AppwriteException}
|
|
30
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
31
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
32
|
+
*/
|
|
33
|
+
update<Preferences extends Models.Preferences = Models.DefaultPreferences>(name: string): Promise<Models.Organization<Preferences>>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete the current organization. All projects that belong to the organization are deleted as well.
|
|
36
|
+
*
|
|
37
|
+
* @throws {AppwriteException}
|
|
38
|
+
* @returns {Promise<{}>}
|
|
39
|
+
*/
|
|
40
|
+
delete(): Promise<{}>;
|
|
8
41
|
/**
|
|
9
42
|
* Get a list of all API keys from the current organization.
|
|
10
43
|
*
|
|
@@ -32,7 +65,7 @@ export declare class Organization {
|
|
|
32
65
|
*
|
|
33
66
|
* @param {string} params.keyId - Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
34
67
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
35
|
-
* @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of
|
|
68
|
+
* @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed.
|
|
36
69
|
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
37
70
|
* @throws {AppwriteException}
|
|
38
71
|
* @returns {Promise<Models.Key>}
|
|
@@ -48,7 +81,7 @@ export declare class Organization {
|
|
|
48
81
|
*
|
|
49
82
|
* @param {string} keyId - Key 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.
|
|
50
83
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
51
|
-
* @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of
|
|
84
|
+
* @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed.
|
|
52
85
|
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
53
86
|
* @throws {AppwriteException}
|
|
54
87
|
* @returns {Promise<Models.Key>}
|
|
@@ -79,7 +112,7 @@ export declare class Organization {
|
|
|
79
112
|
*
|
|
80
113
|
* @param {string} params.keyId - Key unique ID.
|
|
81
114
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
82
|
-
* @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of
|
|
115
|
+
* @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed.
|
|
83
116
|
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
84
117
|
* @throws {AppwriteException}
|
|
85
118
|
* @returns {Promise<Models.Key>}
|
|
@@ -95,7 +128,7 @@ export declare class Organization {
|
|
|
95
128
|
*
|
|
96
129
|
* @param {string} keyId - Key unique ID.
|
|
97
130
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
98
|
-
* @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of
|
|
131
|
+
* @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed.
|
|
99
132
|
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
100
133
|
* @throws {AppwriteException}
|
|
101
134
|
* @returns {Promise<Models.Key>}
|
|
@@ -121,10 +154,129 @@ export declare class Organization {
|
|
|
121
154
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
122
155
|
*/
|
|
123
156
|
deleteKey(keyId: string): Promise<{}>;
|
|
157
|
+
/**
|
|
158
|
+
* Get a list of all memberships from the current organization.
|
|
159
|
+
*
|
|
160
|
+
* @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
|
|
161
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
162
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
163
|
+
* @throws {AppwriteException}
|
|
164
|
+
* @returns {Promise<Models.MembershipList>}
|
|
165
|
+
*/
|
|
166
|
+
listMemberships(params?: {
|
|
167
|
+
queries?: string[];
|
|
168
|
+
search?: string;
|
|
169
|
+
total?: boolean;
|
|
170
|
+
}): Promise<Models.MembershipList>;
|
|
171
|
+
/**
|
|
172
|
+
* Get a list of all memberships from the current organization.
|
|
173
|
+
*
|
|
174
|
+
* @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
|
|
175
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
176
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
177
|
+
* @throws {AppwriteException}
|
|
178
|
+
* @returns {Promise<Models.MembershipList>}
|
|
179
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
180
|
+
*/
|
|
181
|
+
listMemberships(queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
|
|
182
|
+
/**
|
|
183
|
+
* Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.
|
|
184
|
+
*
|
|
185
|
+
* @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the organization. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
186
|
+
* @param {string} params.email - Email of the new organization member.
|
|
187
|
+
* @param {string} params.userId - ID of the user to be added to the organization.
|
|
188
|
+
* @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
189
|
+
* @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.
|
|
190
|
+
* @param {string} params.name - Name of the new organization member. Max length: 128 chars.
|
|
191
|
+
* @throws {AppwriteException}
|
|
192
|
+
* @returns {Promise<Models.Membership>}
|
|
193
|
+
*/
|
|
194
|
+
createMembership(params: {
|
|
195
|
+
roles: string[];
|
|
196
|
+
email?: string;
|
|
197
|
+
userId?: string;
|
|
198
|
+
phone?: string;
|
|
199
|
+
url?: string;
|
|
200
|
+
name?: string;
|
|
201
|
+
}): Promise<Models.Membership>;
|
|
202
|
+
/**
|
|
203
|
+
* Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.
|
|
204
|
+
*
|
|
205
|
+
* @param {string[]} roles - Array of strings. Use this param to set the user roles in the organization. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
206
|
+
* @param {string} email - Email of the new organization member.
|
|
207
|
+
* @param {string} userId - ID of the user to be added to the organization.
|
|
208
|
+
* @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
209
|
+
* @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.
|
|
210
|
+
* @param {string} name - Name of the new organization member. Max length: 128 chars.
|
|
211
|
+
* @throws {AppwriteException}
|
|
212
|
+
* @returns {Promise<Models.Membership>}
|
|
213
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
214
|
+
*/
|
|
215
|
+
createMembership(roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
|
|
216
|
+
/**
|
|
217
|
+
* Get a membership from the current organization by its unique ID.
|
|
218
|
+
*
|
|
219
|
+
* @param {string} params.membershipId - Membership ID.
|
|
220
|
+
* @throws {AppwriteException}
|
|
221
|
+
* @returns {Promise<Models.Membership>}
|
|
222
|
+
*/
|
|
223
|
+
getMembership(params: {
|
|
224
|
+
membershipId: string;
|
|
225
|
+
}): Promise<Models.Membership>;
|
|
226
|
+
/**
|
|
227
|
+
* Get a membership from the current organization by its unique ID.
|
|
228
|
+
*
|
|
229
|
+
* @param {string} membershipId - Membership ID.
|
|
230
|
+
* @throws {AppwriteException}
|
|
231
|
+
* @returns {Promise<Models.Membership>}
|
|
232
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
233
|
+
*/
|
|
234
|
+
getMembership(membershipId: string): Promise<Models.Membership>;
|
|
235
|
+
/**
|
|
236
|
+
* Modify the roles of a member in the current organization.
|
|
237
|
+
*
|
|
238
|
+
* @param {string} params.membershipId - Membership ID.
|
|
239
|
+
* @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the organization. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
240
|
+
* @throws {AppwriteException}
|
|
241
|
+
* @returns {Promise<Models.Membership>}
|
|
242
|
+
*/
|
|
243
|
+
updateMembership(params: {
|
|
244
|
+
membershipId: string;
|
|
245
|
+
roles: string[];
|
|
246
|
+
}): Promise<Models.Membership>;
|
|
247
|
+
/**
|
|
248
|
+
* Modify the roles of a member in the current organization.
|
|
249
|
+
*
|
|
250
|
+
* @param {string} membershipId - Membership ID.
|
|
251
|
+
* @param {string[]} roles - An array of strings. Use this param to set the user's roles in the organization. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
252
|
+
* @throws {AppwriteException}
|
|
253
|
+
* @returns {Promise<Models.Membership>}
|
|
254
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
255
|
+
*/
|
|
256
|
+
updateMembership(membershipId: string, roles: string[]): Promise<Models.Membership>;
|
|
257
|
+
/**
|
|
258
|
+
* Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.
|
|
259
|
+
*
|
|
260
|
+
* @param {string} params.membershipId - Membership ID.
|
|
261
|
+
* @throws {AppwriteException}
|
|
262
|
+
* @returns {Promise<{}>}
|
|
263
|
+
*/
|
|
264
|
+
deleteMembership(params: {
|
|
265
|
+
membershipId: string;
|
|
266
|
+
}): Promise<{}>;
|
|
267
|
+
/**
|
|
268
|
+
* Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.
|
|
269
|
+
*
|
|
270
|
+
* @param {string} membershipId - Membership ID.
|
|
271
|
+
* @throws {AppwriteException}
|
|
272
|
+
* @returns {Promise<{}>}
|
|
273
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
274
|
+
*/
|
|
275
|
+
deleteMembership(membershipId: string): Promise<{}>;
|
|
124
276
|
/**
|
|
125
277
|
* Get a list of all projects. You can use the query params to filter your results.
|
|
126
278
|
*
|
|
127
|
-
* @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, teamId, labels, search
|
|
279
|
+
* @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, teamId, labels, search, accessedAt
|
|
128
280
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
129
281
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
130
282
|
* @throws {AppwriteException}
|
|
@@ -138,7 +290,7 @@ export declare class Organization {
|
|
|
138
290
|
/**
|
|
139
291
|
* Get a list of all projects. You can use the query params to filter your results.
|
|
140
292
|
*
|
|
141
|
-
* @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, teamId, labels, search
|
|
293
|
+
* @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, teamId, labels, search, accessedAt
|
|
142
294
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
143
295
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
144
296
|
* @throws {AppwriteException}
|
|
@@ -167,6 +167,27 @@ export declare class Organizations {
|
|
|
167
167
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
168
168
|
*/
|
|
169
169
|
createBaaAddon(organizationId: string): Promise<Models.Addon>;
|
|
170
|
+
/**
|
|
171
|
+
* Create a Premium Geo DB addon for an organization.
|
|
172
|
+
*
|
|
173
|
+
*
|
|
174
|
+
* @param {string} params.organizationId - Organization ID
|
|
175
|
+
* @throws {AppwriteException}
|
|
176
|
+
* @returns {Promise<Models.Addon>}
|
|
177
|
+
*/
|
|
178
|
+
createPremiumGeoDBAddon(params: {
|
|
179
|
+
organizationId: string;
|
|
180
|
+
}): Promise<Models.Addon>;
|
|
181
|
+
/**
|
|
182
|
+
* Create a Premium Geo DB addon for an organization.
|
|
183
|
+
*
|
|
184
|
+
*
|
|
185
|
+
* @param {string} organizationId - Organization ID
|
|
186
|
+
* @throws {AppwriteException}
|
|
187
|
+
* @returns {Promise<Models.Addon>}
|
|
188
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
189
|
+
*/
|
|
190
|
+
createPremiumGeoDBAddon(organizationId: string): Promise<Models.Addon>;
|
|
170
191
|
/**
|
|
171
192
|
* Get the details of a billing addon for an organization.
|
|
172
193
|
*
|