@appwrite.io/console 2.1.2 → 2.2.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 +12 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2099 -520
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2098 -521
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2003 -444
- package/docs/examples/account/create-key.md +15 -0
- package/docs/examples/account/delete-key.md +13 -0
- package/docs/examples/account/get-key.md +13 -0
- package/docs/examples/account/list-keys.md +13 -0
- package/docs/examples/account/update-key.md +16 -0
- package/docs/examples/avatars/get-screenshot.md +5 -5
- package/docs/examples/backups/create-archive.md +2 -2
- package/docs/examples/backups/create-policy.md +2 -2
- package/docs/examples/backups/create-restoration.md +2 -2
- package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-longtext-attribute.md +18 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/create-text-attribute.md +18 -0
- package/docs/examples/databases/create-varchar-attribute.md +19 -0
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-longtext-attribute.md +18 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/update-text-attribute.md +18 -0
- package/docs/examples/databases/update-varchar-attribute.md +19 -0
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/list-templates.md +3 -3
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/organizations/create-key.md +16 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/delete-key.md +14 -0
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/get-key.md +14 -0
- package/docs/examples/organizations/list-keys.md +14 -0
- package/docs/examples/organizations/list-regions.md +13 -0
- package/docs/examples/organizations/update-key.md +17 -0
- package/docs/examples/organizations/update-plan.md +2 -2
- package/docs/examples/projects/create-jwt.md +2 -2
- package/docs/examples/projects/create-key.md +2 -2
- package/docs/examples/projects/update-key.md +2 -2
- package/docs/examples/sites/list-templates.md +3 -3
- package/docs/examples/tablesdb/create-index.md +2 -2
- package/docs/examples/tablesdb/create-longtext-column.md +18 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/create-text-column.md +18 -0
- package/docs/examples/tablesdb/create-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update-longtext-column.md +18 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/update-table.md +1 -1
- package/docs/examples/tablesdb/update-text-column.md +18 -0
- package/docs/examples/tablesdb/update-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update.md +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/update-membership.md +2 -2
- package/package.json +3 -2
- package/src/channel.ts +138 -0
- package/src/client.ts +54 -9
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/roles.ts +7 -0
- package/src/enums/runtimes.ts +66 -0
- package/src/enums/scopes.ts +65 -0
- package/src/enums/services.ts +5 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +10 -1
- package/src/models.ts +349 -1
- package/src/query.ts +42 -0
- package/src/services/account.ts +364 -56
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +17 -16
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +11 -42
- package/src/services/databases.ts +1060 -280
- package/src/services/domains.ts +44 -44
- package/src/services/functions.ts +60 -57
- package/src/services/graphql.ts +2 -2
- package/src/services/health.ts +22 -20
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +466 -70
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +86 -85
- package/src/services/proxy.ts +8 -8
- package/src/services/realtime.ts +35 -12
- package/src/services/sites.ts +42 -40
- package/src/services/storage.ts +16 -16
- package/src/services/tables-db.ts +1050 -268
- package/src/services/teams.ts +31 -30
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +49 -49
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +72 -0
- package/types/client.d.ts +11 -3
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/roles.d.ts +7 -0
- package/types/enums/runtimes.d.ts +66 -0
- package/types/enums/scopes.d.ts +65 -0
- package/types/enums/services.d.ts +5 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +10 -1
- package/types/models.d.ts +341 -1
- package/types/query.d.ts +30 -0
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +161 -17
- package/types/services/projects.d.ts +13 -12
- package/types/services/realtime.d.ts +17 -8
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/types/services/teams.d.ts +9 -8
- package/src/enums/billing-plan.ts +0 -17
- package/types/enums/billing-plan.d.ts +0 -17
package/src/services/users.ts
CHANGED
|
@@ -23,7 +23,7 @@ export class Users {
|
|
|
23
23
|
* @throws {AppwriteException}
|
|
24
24
|
* @returns {Promise<Models.UserList<Preferences>>}
|
|
25
25
|
*/
|
|
26
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string, total?: boolean
|
|
26
|
+
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.UserList<Preferences>>;
|
|
27
27
|
/**
|
|
28
28
|
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
29
29
|
*
|
|
@@ -91,7 +91,7 @@ export class Users {
|
|
|
91
91
|
* @throws {AppwriteException}
|
|
92
92
|
* @returns {Promise<Models.User<Preferences>>}
|
|
93
93
|
*/
|
|
94
|
-
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email?: string, phone?: string, password?: string, name?: string
|
|
94
|
+
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email?: string, phone?: string, password?: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
95
95
|
/**
|
|
96
96
|
* Create a new user.
|
|
97
97
|
*
|
|
@@ -174,7 +174,7 @@ export class Users {
|
|
|
174
174
|
* @throws {AppwriteException}
|
|
175
175
|
* @returns {Promise<Models.User<Preferences>>}
|
|
176
176
|
*/
|
|
177
|
-
createArgon2User<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string
|
|
177
|
+
createArgon2User<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
178
178
|
/**
|
|
179
179
|
* Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
180
180
|
*
|
|
@@ -257,7 +257,7 @@ export class Users {
|
|
|
257
257
|
* @throws {AppwriteException}
|
|
258
258
|
* @returns {Promise<Models.User<Preferences>>}
|
|
259
259
|
*/
|
|
260
|
-
createBcryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string
|
|
260
|
+
createBcryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
261
261
|
/**
|
|
262
262
|
* Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
263
263
|
*
|
|
@@ -339,7 +339,7 @@ export class Users {
|
|
|
339
339
|
* @throws {AppwriteException}
|
|
340
340
|
* @returns {Promise<Models.IdentityList>}
|
|
341
341
|
*/
|
|
342
|
-
listIdentities(params?: { queries?: string[], search?: string, total?: boolean
|
|
342
|
+
listIdentities(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.IdentityList>;
|
|
343
343
|
/**
|
|
344
344
|
* Get identities for all users.
|
|
345
345
|
*
|
|
@@ -403,7 +403,7 @@ export class Users {
|
|
|
403
403
|
* @throws {AppwriteException}
|
|
404
404
|
* @returns {Promise<{}>}
|
|
405
405
|
*/
|
|
406
|
-
deleteIdentity(params: { identityId: string
|
|
406
|
+
deleteIdentity(params: { identityId: string }): Promise<{}>;
|
|
407
407
|
/**
|
|
408
408
|
* Delete an identity by its unique ID.
|
|
409
409
|
*
|
|
@@ -458,7 +458,7 @@ export class Users {
|
|
|
458
458
|
* @throws {AppwriteException}
|
|
459
459
|
* @returns {Promise<Models.User<Preferences>>}
|
|
460
460
|
*/
|
|
461
|
-
createMD5User<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string
|
|
461
|
+
createMD5User<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
462
462
|
/**
|
|
463
463
|
* Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
464
464
|
*
|
|
@@ -541,7 +541,7 @@ export class Users {
|
|
|
541
541
|
* @throws {AppwriteException}
|
|
542
542
|
* @returns {Promise<Models.User<Preferences>>}
|
|
543
543
|
*/
|
|
544
|
-
createPHPassUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string
|
|
544
|
+
createPHPassUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
545
545
|
/**
|
|
546
546
|
* Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
547
547
|
*
|
|
@@ -629,7 +629,7 @@ export class Users {
|
|
|
629
629
|
* @throws {AppwriteException}
|
|
630
630
|
* @returns {Promise<Models.User<Preferences>>}
|
|
631
631
|
*/
|
|
632
|
-
createScryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string
|
|
632
|
+
createScryptUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, passwordSalt: string, passwordCpu: number, passwordMemory: number, passwordParallel: number, passwordLength: number, name?: string }): Promise<Models.User<Preferences>>;
|
|
633
633
|
/**
|
|
634
634
|
* Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
635
635
|
*
|
|
@@ -760,7 +760,7 @@ export class Users {
|
|
|
760
760
|
* @throws {AppwriteException}
|
|
761
761
|
* @returns {Promise<Models.User<Preferences>>}
|
|
762
762
|
*/
|
|
763
|
-
createScryptModifiedUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string
|
|
763
|
+
createScryptModifiedUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, passwordSalt: string, passwordSaltSeparator: string, passwordSignerKey: string, name?: string }): Promise<Models.User<Preferences>>;
|
|
764
764
|
/**
|
|
765
765
|
* Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
766
766
|
*
|
|
@@ -871,7 +871,7 @@ export class Users {
|
|
|
871
871
|
* @throws {AppwriteException}
|
|
872
872
|
* @returns {Promise<Models.User<Preferences>>}
|
|
873
873
|
*/
|
|
874
|
-
createSHAUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string
|
|
874
|
+
createSHAUser<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string }): Promise<Models.User<Preferences>>;
|
|
875
875
|
/**
|
|
876
876
|
* Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password.
|
|
877
877
|
*
|
|
@@ -958,7 +958,7 @@ export class Users {
|
|
|
958
958
|
* @throws {AppwriteException}
|
|
959
959
|
* @returns {Promise<Models.UsageUsers>}
|
|
960
960
|
*/
|
|
961
|
-
getUsage(params?: { range?: UsageRange
|
|
961
|
+
getUsage(params?: { range?: UsageRange }): Promise<Models.UsageUsers>;
|
|
962
962
|
/**
|
|
963
963
|
* Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
964
964
|
*
|
|
@@ -1010,7 +1010,7 @@ export class Users {
|
|
|
1010
1010
|
* @throws {AppwriteException}
|
|
1011
1011
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1012
1012
|
*/
|
|
1013
|
-
get<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string
|
|
1013
|
+
get<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string }): Promise<Models.User<Preferences>>;
|
|
1014
1014
|
/**
|
|
1015
1015
|
* Get a user by its unique ID.
|
|
1016
1016
|
*
|
|
@@ -1061,7 +1061,7 @@ export class Users {
|
|
|
1061
1061
|
* @throws {AppwriteException}
|
|
1062
1062
|
* @returns {Promise<{}>}
|
|
1063
1063
|
*/
|
|
1064
|
-
delete(params: { userId: string
|
|
1064
|
+
delete(params: { userId: string }): Promise<{}>;
|
|
1065
1065
|
/**
|
|
1066
1066
|
* Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead.
|
|
1067
1067
|
*
|
|
@@ -1114,7 +1114,7 @@ export class Users {
|
|
|
1114
1114
|
* @throws {AppwriteException}
|
|
1115
1115
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1116
1116
|
*/
|
|
1117
|
-
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string
|
|
1117
|
+
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, email: string }): Promise<Models.User<Preferences>>;
|
|
1118
1118
|
/**
|
|
1119
1119
|
* Update the user email by its unique ID.
|
|
1120
1120
|
*
|
|
@@ -1178,7 +1178,7 @@ export class Users {
|
|
|
1178
1178
|
* @throws {AppwriteException}
|
|
1179
1179
|
* @returns {Promise<Models.Jwt>}
|
|
1180
1180
|
*/
|
|
1181
|
-
createJWT(params: { userId: string, sessionId?: string, duration?: number
|
|
1181
|
+
createJWT(params: { userId: string, sessionId?: string, duration?: number }): Promise<Models.Jwt>;
|
|
1182
1182
|
/**
|
|
1183
1183
|
* Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
|
|
1184
1184
|
*
|
|
@@ -1246,7 +1246,7 @@ export class Users {
|
|
|
1246
1246
|
* @throws {AppwriteException}
|
|
1247
1247
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1248
1248
|
*/
|
|
1249
|
-
updateLabels<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, labels: string[]
|
|
1249
|
+
updateLabels<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, labels: string[] }): Promise<Models.User<Preferences>>;
|
|
1250
1250
|
/**
|
|
1251
1251
|
* Update the user labels by its unique ID.
|
|
1252
1252
|
*
|
|
@@ -1312,7 +1312,7 @@ export class Users {
|
|
|
1312
1312
|
* @throws {AppwriteException}
|
|
1313
1313
|
* @returns {Promise<Models.LogList>}
|
|
1314
1314
|
*/
|
|
1315
|
-
listLogs(params: { userId: string, queries?: string[], total?: boolean
|
|
1315
|
+
listLogs(params: { userId: string, queries?: string[], total?: boolean }): Promise<Models.LogList>;
|
|
1316
1316
|
/**
|
|
1317
1317
|
* Get the user activity logs list by its unique ID.
|
|
1318
1318
|
*
|
|
@@ -1379,7 +1379,7 @@ export class Users {
|
|
|
1379
1379
|
* @throws {AppwriteException}
|
|
1380
1380
|
* @returns {Promise<Models.MembershipList>}
|
|
1381
1381
|
*/
|
|
1382
|
-
listMemberships(params: { userId: string, queries?: string[], search?: string, total?: boolean
|
|
1382
|
+
listMemberships(params: { userId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.MembershipList>;
|
|
1383
1383
|
/**
|
|
1384
1384
|
* Get the user membership list by its unique ID.
|
|
1385
1385
|
*
|
|
@@ -1451,7 +1451,7 @@ export class Users {
|
|
|
1451
1451
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1452
1452
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Users.updateMFA` instead.
|
|
1453
1453
|
*/
|
|
1454
|
-
updateMfa<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, mfa: boolean
|
|
1454
|
+
updateMfa<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, mfa: boolean }): Promise<Models.User<Preferences>>;
|
|
1455
1455
|
/**
|
|
1456
1456
|
* Enable or disable MFA on a user account.
|
|
1457
1457
|
*
|
|
@@ -1514,7 +1514,7 @@ export class Users {
|
|
|
1514
1514
|
* @throws {AppwriteException}
|
|
1515
1515
|
* @returns {Promise<Models.User<Preferences>>}
|
|
1516
1516
|
*/
|
|
1517
|
-
updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, mfa: boolean
|
|
1517
|
+
updateMFA<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, mfa: boolean }): Promise<Models.User<Preferences>>;
|
|
1518
1518
|
/**
|
|
1519
1519
|
* Enable or disable MFA on a user account.
|
|
1520
1520
|
*
|
|
@@ -1578,7 +1578,7 @@ export class Users {
|
|
|
1578
1578
|
* @returns {Promise<{}>}
|
|
1579
1579
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Users.deleteMFAAuthenticator` instead.
|
|
1580
1580
|
*/
|
|
1581
|
-
deleteMfaAuthenticator(params: { userId: string, type: AuthenticatorType
|
|
1581
|
+
deleteMfaAuthenticator(params: { userId: string, type: AuthenticatorType }): Promise<{}>;
|
|
1582
1582
|
/**
|
|
1583
1583
|
* Delete an authenticator app.
|
|
1584
1584
|
*
|
|
@@ -1638,7 +1638,7 @@ export class Users {
|
|
|
1638
1638
|
* @throws {AppwriteException}
|
|
1639
1639
|
* @returns {Promise<{}>}
|
|
1640
1640
|
*/
|
|
1641
|
-
deleteMFAAuthenticator(params: { userId: string, type: AuthenticatorType
|
|
1641
|
+
deleteMFAAuthenticator(params: { userId: string, type: AuthenticatorType }): Promise<{}>;
|
|
1642
1642
|
/**
|
|
1643
1643
|
* Delete an authenticator app.
|
|
1644
1644
|
*
|
|
@@ -1698,7 +1698,7 @@ export class Users {
|
|
|
1698
1698
|
* @returns {Promise<Models.MfaFactors>}
|
|
1699
1699
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Users.listMFAFactors` instead.
|
|
1700
1700
|
*/
|
|
1701
|
-
listMfaFactors(params: { userId: string
|
|
1701
|
+
listMfaFactors(params: { userId: string }): Promise<Models.MfaFactors>;
|
|
1702
1702
|
/**
|
|
1703
1703
|
* List the factors available on the account to be used as a MFA challange.
|
|
1704
1704
|
*
|
|
@@ -1749,7 +1749,7 @@ export class Users {
|
|
|
1749
1749
|
* @throws {AppwriteException}
|
|
1750
1750
|
* @returns {Promise<Models.MfaFactors>}
|
|
1751
1751
|
*/
|
|
1752
|
-
listMFAFactors(params: { userId: string
|
|
1752
|
+
listMFAFactors(params: { userId: string }): Promise<Models.MfaFactors>;
|
|
1753
1753
|
/**
|
|
1754
1754
|
* List the factors available on the account to be used as a MFA challange.
|
|
1755
1755
|
*
|
|
@@ -1801,7 +1801,7 @@ export class Users {
|
|
|
1801
1801
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
1802
1802
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Users.getMFARecoveryCodes` instead.
|
|
1803
1803
|
*/
|
|
1804
|
-
getMfaRecoveryCodes(params: { userId: string
|
|
1804
|
+
getMfaRecoveryCodes(params: { userId: string }): Promise<Models.MfaRecoveryCodes>;
|
|
1805
1805
|
/**
|
|
1806
1806
|
* Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
|
|
1807
1807
|
*
|
|
@@ -1852,7 +1852,7 @@ export class Users {
|
|
|
1852
1852
|
* @throws {AppwriteException}
|
|
1853
1853
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
1854
1854
|
*/
|
|
1855
|
-
getMFARecoveryCodes(params: { userId: string
|
|
1855
|
+
getMFARecoveryCodes(params: { userId: string }): Promise<Models.MfaRecoveryCodes>;
|
|
1856
1856
|
/**
|
|
1857
1857
|
* Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
|
|
1858
1858
|
*
|
|
@@ -1904,7 +1904,7 @@ export class Users {
|
|
|
1904
1904
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
1905
1905
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Users.updateMFARecoveryCodes` instead.
|
|
1906
1906
|
*/
|
|
1907
|
-
updateMfaRecoveryCodes(params: { userId: string
|
|
1907
|
+
updateMfaRecoveryCodes(params: { userId: string }): Promise<Models.MfaRecoveryCodes>;
|
|
1908
1908
|
/**
|
|
1909
1909
|
* Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
|
|
1910
1910
|
*
|
|
@@ -1956,7 +1956,7 @@ export class Users {
|
|
|
1956
1956
|
* @throws {AppwriteException}
|
|
1957
1957
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
1958
1958
|
*/
|
|
1959
|
-
updateMFARecoveryCodes(params: { userId: string
|
|
1959
|
+
updateMFARecoveryCodes(params: { userId: string }): Promise<Models.MfaRecoveryCodes>;
|
|
1960
1960
|
/**
|
|
1961
1961
|
* Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method.
|
|
1962
1962
|
*
|
|
@@ -2009,7 +2009,7 @@ export class Users {
|
|
|
2009
2009
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
2010
2010
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Users.createMFARecoveryCodes` instead.
|
|
2011
2011
|
*/
|
|
2012
|
-
createMfaRecoveryCodes(params: { userId: string
|
|
2012
|
+
createMfaRecoveryCodes(params: { userId: string }): Promise<Models.MfaRecoveryCodes>;
|
|
2013
2013
|
/**
|
|
2014
2014
|
* Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.
|
|
2015
2015
|
*
|
|
@@ -2061,7 +2061,7 @@ export class Users {
|
|
|
2061
2061
|
* @throws {AppwriteException}
|
|
2062
2062
|
* @returns {Promise<Models.MfaRecoveryCodes>}
|
|
2063
2063
|
*/
|
|
2064
|
-
createMFARecoveryCodes(params: { userId: string
|
|
2064
|
+
createMFARecoveryCodes(params: { userId: string }): Promise<Models.MfaRecoveryCodes>;
|
|
2065
2065
|
/**
|
|
2066
2066
|
* Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK.
|
|
2067
2067
|
*
|
|
@@ -2114,7 +2114,7 @@ export class Users {
|
|
|
2114
2114
|
* @throws {AppwriteException}
|
|
2115
2115
|
* @returns {Promise<Models.User<Preferences>>}
|
|
2116
2116
|
*/
|
|
2117
|
-
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, name: string
|
|
2117
|
+
updateName<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, name: string }): Promise<Models.User<Preferences>>;
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Update the user name by its unique ID.
|
|
2120
2120
|
*
|
|
@@ -2177,7 +2177,7 @@ export class Users {
|
|
|
2177
2177
|
* @throws {AppwriteException}
|
|
2178
2178
|
* @returns {Promise<Models.User<Preferences>>}
|
|
2179
2179
|
*/
|
|
2180
|
-
updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, password: string
|
|
2180
|
+
updatePassword<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, password: string }): Promise<Models.User<Preferences>>;
|
|
2181
2181
|
/**
|
|
2182
2182
|
* Update the user password by its unique ID.
|
|
2183
2183
|
*
|
|
@@ -2240,7 +2240,7 @@ export class Users {
|
|
|
2240
2240
|
* @throws {AppwriteException}
|
|
2241
2241
|
* @returns {Promise<Models.User<Preferences>>}
|
|
2242
2242
|
*/
|
|
2243
|
-
updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, number: string
|
|
2243
|
+
updatePhone<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, number: string }): Promise<Models.User<Preferences>>;
|
|
2244
2244
|
/**
|
|
2245
2245
|
* Update the user phone by its unique ID.
|
|
2246
2246
|
*
|
|
@@ -2302,7 +2302,7 @@ export class Users {
|
|
|
2302
2302
|
* @throws {AppwriteException}
|
|
2303
2303
|
* @returns {Promise<Preferences>}
|
|
2304
2304
|
*/
|
|
2305
|
-
getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string
|
|
2305
|
+
getPrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string }): Promise<Preferences>;
|
|
2306
2306
|
/**
|
|
2307
2307
|
* Get the user preferences by its unique ID.
|
|
2308
2308
|
*
|
|
@@ -2354,7 +2354,7 @@ export class Users {
|
|
|
2354
2354
|
* @throws {AppwriteException}
|
|
2355
2355
|
* @returns {Promise<Preferences>}
|
|
2356
2356
|
*/
|
|
2357
|
-
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, prefs: object
|
|
2357
|
+
updatePrefs<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, prefs: object }): Promise<Preferences>;
|
|
2358
2358
|
/**
|
|
2359
2359
|
* Update the user 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 error if exceeded.
|
|
2360
2360
|
*
|
|
@@ -2417,7 +2417,7 @@ export class Users {
|
|
|
2417
2417
|
* @throws {AppwriteException}
|
|
2418
2418
|
* @returns {Promise<Models.SessionList>}
|
|
2419
2419
|
*/
|
|
2420
|
-
listSessions(params: { userId: string, total?: boolean
|
|
2420
|
+
listSessions(params: { userId: string, total?: boolean }): Promise<Models.SessionList>;
|
|
2421
2421
|
/**
|
|
2422
2422
|
* Get the user sessions list by its unique ID.
|
|
2423
2423
|
*
|
|
@@ -2477,7 +2477,7 @@ export class Users {
|
|
|
2477
2477
|
* @throws {AppwriteException}
|
|
2478
2478
|
* @returns {Promise<Models.Session>}
|
|
2479
2479
|
*/
|
|
2480
|
-
createSession(params: { userId: string
|
|
2480
|
+
createSession(params: { userId: string }): Promise<Models.Session>;
|
|
2481
2481
|
/**
|
|
2482
2482
|
* Creates a session for a user. Returns an immediately usable session object.
|
|
2483
2483
|
*
|
|
@@ -2531,7 +2531,7 @@ export class Users {
|
|
|
2531
2531
|
* @throws {AppwriteException}
|
|
2532
2532
|
* @returns {Promise<{}>}
|
|
2533
2533
|
*/
|
|
2534
|
-
deleteSessions(params: { userId: string
|
|
2534
|
+
deleteSessions(params: { userId: string }): Promise<{}>;
|
|
2535
2535
|
/**
|
|
2536
2536
|
* Delete all user's sessions by using the user's unique ID.
|
|
2537
2537
|
*
|
|
@@ -2584,7 +2584,7 @@ export class Users {
|
|
|
2584
2584
|
* @throws {AppwriteException}
|
|
2585
2585
|
* @returns {Promise<{}>}
|
|
2586
2586
|
*/
|
|
2587
|
-
deleteSession(params: { userId: string, sessionId: string
|
|
2587
|
+
deleteSession(params: { userId: string, sessionId: string }): Promise<{}>;
|
|
2588
2588
|
/**
|
|
2589
2589
|
* Delete a user sessions by its unique ID.
|
|
2590
2590
|
*
|
|
@@ -2644,7 +2644,7 @@ export class Users {
|
|
|
2644
2644
|
* @throws {AppwriteException}
|
|
2645
2645
|
* @returns {Promise<Models.User<Preferences>>}
|
|
2646
2646
|
*/
|
|
2647
|
-
updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, status: boolean
|
|
2647
|
+
updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, status: boolean }): Promise<Models.User<Preferences>>;
|
|
2648
2648
|
/**
|
|
2649
2649
|
* Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.
|
|
2650
2650
|
*
|
|
@@ -2708,7 +2708,7 @@ export class Users {
|
|
|
2708
2708
|
* @throws {AppwriteException}
|
|
2709
2709
|
* @returns {Promise<Models.TargetList>}
|
|
2710
2710
|
*/
|
|
2711
|
-
listTargets(params: { userId: string, queries?: string[], total?: boolean
|
|
2711
|
+
listTargets(params: { userId: string, queries?: string[], total?: boolean }): Promise<Models.TargetList>;
|
|
2712
2712
|
/**
|
|
2713
2713
|
* List the messaging targets that are associated with a user.
|
|
2714
2714
|
*
|
|
@@ -2777,7 +2777,7 @@ export class Users {
|
|
|
2777
2777
|
* @throws {AppwriteException}
|
|
2778
2778
|
* @returns {Promise<Models.Target>}
|
|
2779
2779
|
*/
|
|
2780
|
-
createTarget(params: { userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string
|
|
2780
|
+
createTarget(params: { userId: string, targetId: string, providerType: MessagingProviderType, identifier: string, providerId?: string, name?: string }): Promise<Models.Target>;
|
|
2781
2781
|
/**
|
|
2782
2782
|
* Create a messaging target.
|
|
2783
2783
|
*
|
|
@@ -2870,7 +2870,7 @@ export class Users {
|
|
|
2870
2870
|
* @throws {AppwriteException}
|
|
2871
2871
|
* @returns {Promise<Models.Target>}
|
|
2872
2872
|
*/
|
|
2873
|
-
getTarget(params: { userId: string, targetId: string
|
|
2873
|
+
getTarget(params: { userId: string, targetId: string }): Promise<Models.Target>;
|
|
2874
2874
|
/**
|
|
2875
2875
|
* Get a user's push notification target by ID.
|
|
2876
2876
|
*
|
|
@@ -2932,7 +2932,7 @@ export class Users {
|
|
|
2932
2932
|
* @throws {AppwriteException}
|
|
2933
2933
|
* @returns {Promise<Models.Target>}
|
|
2934
2934
|
*/
|
|
2935
|
-
updateTarget(params: { userId: string, targetId: string, identifier?: string, providerId?: string, name?: string
|
|
2935
|
+
updateTarget(params: { userId: string, targetId: string, identifier?: string, providerId?: string, name?: string }): Promise<Models.Target>;
|
|
2936
2936
|
/**
|
|
2937
2937
|
* Update a messaging target.
|
|
2938
2938
|
*
|
|
@@ -3010,7 +3010,7 @@ export class Users {
|
|
|
3010
3010
|
* @throws {AppwriteException}
|
|
3011
3011
|
* @returns {Promise<{}>}
|
|
3012
3012
|
*/
|
|
3013
|
-
deleteTarget(params: { userId: string, targetId: string
|
|
3013
|
+
deleteTarget(params: { userId: string, targetId: string }): Promise<{}>;
|
|
3014
3014
|
/**
|
|
3015
3015
|
* Delete a messaging target.
|
|
3016
3016
|
*
|
|
@@ -3072,7 +3072,7 @@ export class Users {
|
|
|
3072
3072
|
* @throws {AppwriteException}
|
|
3073
3073
|
* @returns {Promise<Models.Token>}
|
|
3074
3074
|
*/
|
|
3075
|
-
createToken(params: { userId: string, length?: number, expire?: number
|
|
3075
|
+
createToken(params: { userId: string, length?: number, expire?: number }): Promise<Models.Token>;
|
|
3076
3076
|
/**
|
|
3077
3077
|
* Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
|
|
3078
3078
|
*
|
|
@@ -3139,7 +3139,7 @@ export class Users {
|
|
|
3139
3139
|
* @throws {AppwriteException}
|
|
3140
3140
|
* @returns {Promise<Models.User<Preferences>>}
|
|
3141
3141
|
*/
|
|
3142
|
-
updateEmailVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, emailVerification: boolean
|
|
3142
|
+
updateEmailVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, emailVerification: boolean }): Promise<Models.User<Preferences>>;
|
|
3143
3143
|
/**
|
|
3144
3144
|
* Update the user email verification status by its unique ID.
|
|
3145
3145
|
*
|
|
@@ -3202,7 +3202,7 @@ export class Users {
|
|
|
3202
3202
|
* @throws {AppwriteException}
|
|
3203
3203
|
* @returns {Promise<Models.User<Preferences>>}
|
|
3204
3204
|
*/
|
|
3205
|
-
updatePhoneVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, phoneVerification: boolean
|
|
3205
|
+
updatePhoneVerification<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { userId: string, phoneVerification: boolean }): Promise<Models.User<Preferences>>;
|
|
3206
3206
|
/**
|
|
3207
3207
|
* Update the user phone verification status by its unique ID.
|
|
3208
3208
|
*
|
package/src/services/vcs.ts
CHANGED
|
@@ -21,7 +21,7 @@ export class Vcs {
|
|
|
21
21
|
* @throws {AppwriteException}
|
|
22
22
|
* @returns {Promise<Models.DetectionFramework>}
|
|
23
23
|
*/
|
|
24
|
-
createRepositoryDetection(params: { installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string
|
|
24
|
+
createRepositoryDetection(params: { installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string }): Promise<Models.DetectionFramework>;
|
|
25
25
|
/**
|
|
26
26
|
* Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
|
|
27
27
|
*
|
|
@@ -101,7 +101,7 @@ export class Vcs {
|
|
|
101
101
|
* @throws {AppwriteException}
|
|
102
102
|
* @returns {Promise<Models.ProviderRepositoryFrameworkList>}
|
|
103
103
|
*/
|
|
104
|
-
listRepositories(params: { installationId: string, type: VCSDetectionType, search?: string, queries?: string[]
|
|
104
|
+
listRepositories(params: { installationId: string, type: VCSDetectionType, search?: string, queries?: string[] }): Promise<Models.ProviderRepositoryFrameworkList>;
|
|
105
105
|
/**
|
|
106
106
|
* Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.
|
|
107
107
|
*
|
|
@@ -176,7 +176,7 @@ export class Vcs {
|
|
|
176
176
|
* @throws {AppwriteException}
|
|
177
177
|
* @returns {Promise<Models.ProviderRepository>}
|
|
178
178
|
*/
|
|
179
|
-
createRepository(params: { installationId: string, name: string, xprivate: boolean
|
|
179
|
+
createRepository(params: { installationId: string, name: string, xprivate: boolean }): Promise<Models.ProviderRepository>;
|
|
180
180
|
/**
|
|
181
181
|
* Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.
|
|
182
182
|
*
|
|
@@ -248,7 +248,7 @@ export class Vcs {
|
|
|
248
248
|
* @throws {AppwriteException}
|
|
249
249
|
* @returns {Promise<Models.ProviderRepository>}
|
|
250
250
|
*/
|
|
251
|
-
getRepository(params: { installationId: string, providerRepositoryId: string
|
|
251
|
+
getRepository(params: { installationId: string, providerRepositoryId: string }): Promise<Models.ProviderRepository>;
|
|
252
252
|
/**
|
|
253
253
|
* Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.
|
|
254
254
|
*
|
|
@@ -308,7 +308,7 @@ export class Vcs {
|
|
|
308
308
|
* @throws {AppwriteException}
|
|
309
309
|
* @returns {Promise<Models.BranchList>}
|
|
310
310
|
*/
|
|
311
|
-
listRepositoryBranches(params: { installationId: string, providerRepositoryId: string
|
|
311
|
+
listRepositoryBranches(params: { installationId: string, providerRepositoryId: string }): Promise<Models.BranchList>;
|
|
312
312
|
/**
|
|
313
313
|
* Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.
|
|
314
314
|
*
|
|
@@ -370,7 +370,7 @@ export class Vcs {
|
|
|
370
370
|
* @throws {AppwriteException}
|
|
371
371
|
* @returns {Promise<Models.VcsContentList>}
|
|
372
372
|
*/
|
|
373
|
-
getRepositoryContents(params: { installationId: string, providerRepositoryId: string, providerRootDirectory?: string, providerReference?: string
|
|
373
|
+
getRepositoryContents(params: { installationId: string, providerRepositoryId: string, providerRootDirectory?: string, providerReference?: string }): Promise<Models.VcsContentList>;
|
|
374
374
|
/**
|
|
375
375
|
* Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
|
|
376
376
|
*
|
|
@@ -442,7 +442,7 @@ export class Vcs {
|
|
|
442
442
|
* @throws {AppwriteException}
|
|
443
443
|
* @returns {Promise<{}>}
|
|
444
444
|
*/
|
|
445
|
-
updateExternalDeployments(params: { installationId: string, repositoryId: string, providerPullRequestId: string
|
|
445
|
+
updateExternalDeployments(params: { installationId: string, repositoryId: string, providerPullRequestId: string }): Promise<{}>;
|
|
446
446
|
/**
|
|
447
447
|
* Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.
|
|
448
448
|
*
|
|
@@ -513,7 +513,7 @@ export class Vcs {
|
|
|
513
513
|
* @throws {AppwriteException}
|
|
514
514
|
* @returns {Promise<Models.InstallationList>}
|
|
515
515
|
*/
|
|
516
|
-
listInstallations(params?: { queries?: string[], search?: string, total?: boolean
|
|
516
|
+
listInstallations(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.InstallationList>;
|
|
517
517
|
/**
|
|
518
518
|
* List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.
|
|
519
519
|
*
|
|
@@ -578,7 +578,7 @@ export class Vcs {
|
|
|
578
578
|
* @throws {AppwriteException}
|
|
579
579
|
* @returns {Promise<Models.Installation>}
|
|
580
580
|
*/
|
|
581
|
-
getInstallation(params: { installationId: string
|
|
581
|
+
getInstallation(params: { installationId: string }): Promise<Models.Installation>;
|
|
582
582
|
/**
|
|
583
583
|
* Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration.
|
|
584
584
|
*
|
|
@@ -629,7 +629,7 @@ export class Vcs {
|
|
|
629
629
|
* @throws {AppwriteException}
|
|
630
630
|
* @returns {Promise<{}>}
|
|
631
631
|
*/
|
|
632
|
-
deleteInstallation(params: { installationId: string
|
|
632
|
+
deleteInstallation(params: { installationId: string }): Promise<{}>;
|
|
633
633
|
/**
|
|
634
634
|
* Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.
|
|
635
635
|
*
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
interface Database {
|
|
2
|
+
_db: any;
|
|
3
|
+
}
|
|
4
|
+
interface Collection {
|
|
5
|
+
_coll: any;
|
|
6
|
+
}
|
|
7
|
+
interface Document {
|
|
8
|
+
_doc: any;
|
|
9
|
+
}
|
|
10
|
+
interface TablesDB {
|
|
11
|
+
_tdb: any;
|
|
12
|
+
}
|
|
13
|
+
interface Table {
|
|
14
|
+
_tbl: any;
|
|
15
|
+
}
|
|
16
|
+
interface Row {
|
|
17
|
+
_row: any;
|
|
18
|
+
}
|
|
19
|
+
interface Bucket {
|
|
20
|
+
_bkt: any;
|
|
21
|
+
}
|
|
22
|
+
interface File {
|
|
23
|
+
_file: any;
|
|
24
|
+
}
|
|
25
|
+
interface Func {
|
|
26
|
+
_fn: any;
|
|
27
|
+
}
|
|
28
|
+
interface Execution {
|
|
29
|
+
_exec: any;
|
|
30
|
+
}
|
|
31
|
+
interface Team {
|
|
32
|
+
_team: any;
|
|
33
|
+
}
|
|
34
|
+
interface Membership {
|
|
35
|
+
_mem: any;
|
|
36
|
+
}
|
|
37
|
+
interface Resolved {
|
|
38
|
+
_res: any;
|
|
39
|
+
}
|
|
40
|
+
declare type Actionable = Document | Row | File | Execution | Team | Membership;
|
|
41
|
+
export declare class Channel<T> {
|
|
42
|
+
private readonly segments;
|
|
43
|
+
_type: T;
|
|
44
|
+
private constructor();
|
|
45
|
+
private next;
|
|
46
|
+
private resolve;
|
|
47
|
+
toString(): string;
|
|
48
|
+
collection(this: Channel<Database>, id?: string): Channel<Collection>;
|
|
49
|
+
document(this: Channel<Collection>, id?: string): Channel<Document>;
|
|
50
|
+
table(this: Channel<TablesDB>, id?: string): Channel<Table>;
|
|
51
|
+
row(this: Channel<Table>, id?: string): Channel<Row>;
|
|
52
|
+
file(this: Channel<Bucket>, id?: string): Channel<File>;
|
|
53
|
+
execution(this: Channel<Func>, id?: string): Channel<Execution>;
|
|
54
|
+
create(this: Channel<Actionable>): Channel<Resolved>;
|
|
55
|
+
update(this: Channel<Actionable>): Channel<Resolved>;
|
|
56
|
+
delete(this: Channel<Actionable>): Channel<Resolved>;
|
|
57
|
+
static database(id?: string): Channel<Database>;
|
|
58
|
+
static tablesdb(id?: string): Channel<TablesDB>;
|
|
59
|
+
static bucket(id?: string): Channel<Bucket>;
|
|
60
|
+
static function(id?: string): Channel<Func>;
|
|
61
|
+
static team(id?: string): Channel<Team>;
|
|
62
|
+
static membership(id?: string): Channel<Membership>;
|
|
63
|
+
static account(userId?: string): string;
|
|
64
|
+
static documents(): string;
|
|
65
|
+
static rows(): string;
|
|
66
|
+
static files(): string;
|
|
67
|
+
static executions(): string;
|
|
68
|
+
static teams(): string;
|
|
69
|
+
}
|
|
70
|
+
export declare type ActionableChannel = Channel<Document> | Channel<Row> | Channel<File> | Channel<Execution> | Channel<Team> | Channel<Membership>;
|
|
71
|
+
export declare type ResolvedChannel = Channel<Resolved>;
|
|
72
|
+
export {};
|
package/types/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Models } from './models';
|
|
2
|
+
import { Channel, ActionableChannel, ResolvedChannel } from './channel';
|
|
2
3
|
/**
|
|
3
4
|
* Payload type representing a key-value pair with string keys and any values.
|
|
4
5
|
*/
|
|
@@ -208,8 +209,8 @@ declare class Client {
|
|
|
208
209
|
* @deprecated Use the Realtime service instead.
|
|
209
210
|
* @see Realtime
|
|
210
211
|
*
|
|
211
|
-
* @param {string|string[]} channels
|
|
212
|
-
* Channel to subscribe - pass a single channel as a string or multiple with an array
|
|
212
|
+
* @param {string|string[]|Channel<any>|ActionableChannel|ResolvedChannel|(Channel<any>|ActionableChannel|ResolvedChannel)[]} channels
|
|
213
|
+
* Channel to subscribe - pass a single channel as a string or Channel builder instance, or multiple with an array.
|
|
213
214
|
*
|
|
214
215
|
* Possible channels are:
|
|
215
216
|
* - account
|
|
@@ -227,10 +228,17 @@ declare class Client {
|
|
|
227
228
|
* - teams.[ID]
|
|
228
229
|
* - memberships
|
|
229
230
|
* - memberships.[ID]
|
|
231
|
+
*
|
|
232
|
+
* You can also use Channel builders:
|
|
233
|
+
* - Channel.database('db').collection('col').document('doc').create()
|
|
234
|
+
* - Channel.bucket('bucket').file('file').update()
|
|
235
|
+
* - Channel.function('func').execution('exec').delete()
|
|
236
|
+
* - Channel.team('team').create()
|
|
237
|
+
* - Channel.membership('membership').update()
|
|
230
238
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
231
239
|
* @returns {() => void} Unsubscribes from events.
|
|
232
240
|
*/
|
|
233
|
-
subscribe<T extends unknown>(channels: string | string[], callback: (payload: RealtimeResponseEvent<T>) => void): () => void;
|
|
241
|
+
subscribe<T extends unknown>(channels: string | string[] | Channel<any> | ActionableChannel | ResolvedChannel | (Channel<any> | ActionableChannel | ResolvedChannel)[], callback: (payload: RealtimeResponseEvent<T>) => void): () => void;
|
|
234
242
|
prepareRequest(method: string, url: URL, headers?: Headers, params?: Payload): {
|
|
235
243
|
uri: string;
|
|
236
244
|
options: RequestInit;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum BrowserPermission {
|
|
2
|
+
Geolocation = "geolocation",
|
|
3
|
+
Camera = "camera",
|
|
4
|
+
Microphone = "microphone",
|
|
5
|
+
Notifications = "notifications",
|
|
6
|
+
Midi = "midi",
|
|
7
|
+
Push = "push",
|
|
8
|
+
Clipboardread = "clipboard-read",
|
|
9
|
+
Clipboardwrite = "clipboard-write",
|
|
10
|
+
Paymenthandler = "payment-handler",
|
|
11
|
+
Usb = "usb",
|
|
12
|
+
Bluetooth = "bluetooth",
|
|
13
|
+
Accelerometer = "accelerometer",
|
|
14
|
+
Gyroscope = "gyroscope",
|
|
15
|
+
Magnetometer = "magnetometer",
|
|
16
|
+
Ambientlightsensor = "ambient-light-sensor",
|
|
17
|
+
Backgroundsync = "background-sync",
|
|
18
|
+
Persistentstorage = "persistent-storage",
|
|
19
|
+
Screenwakelock = "screen-wake-lock",
|
|
20
|
+
Webshare = "web-share",
|
|
21
|
+
Xrspatialtracking = "xr-spatial-tracking"
|
|
22
|
+
}
|