@appwrite.io/console 1.9.0 → 1.10.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/.github/workflows/publish.yml +1 -1
- package/CHANGELOG.md +45 -6
- package/README.md +82 -2
- package/dist/cjs/sdk.js +246 -193
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +246 -193
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +246 -193
- package/docs/examples/databases/create-document.md +1 -3
- package/docs/examples/databases/create-documents.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/organizations/get-available-credits.md +13 -0
- package/docs/examples/organizations/update-projects.md +14 -0
- package/docs/examples/vcs/get-repository-contents.md +2 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/models.ts +241 -9
- package/src/services/account.ts +97 -36
- package/src/services/avatars.ts +26 -20
- package/src/services/backups.ts +11 -0
- package/src/services/console.ts +8 -1
- package/src/services/databases.ts +97 -33
- package/src/services/domains.ts +111 -69
- package/src/services/functions.ts +37 -8
- package/src/services/graphql.ts +1 -0
- package/src/services/health.ts +26 -1
- package/src/services/locale.ts +9 -2
- package/src/services/messaging.ts +53 -8
- package/src/services/migrations.ts +12 -0
- package/src/services/organizations.ts +106 -16
- package/src/services/project.ts +5 -0
- package/src/services/projects.ts +50 -0
- package/src/services/proxy.ts +7 -0
- package/src/services/sites.ts +32 -4
- package/src/services/storage.ts +23 -9
- package/src/services/teams.ts +30 -17
- package/src/services/tokens.ts +4 -0
- package/src/services/users.ts +69 -27
- package/src/services/vcs.ts +16 -4
- package/types/models.d.ts +228 -192
- package/types/services/account.d.ts +36 -36
- package/types/services/avatars.d.ts +20 -20
- package/types/services/console.d.ts +1 -1
- package/types/services/databases.d.ts +43 -33
- package/types/services/domains.d.ts +69 -69
- package/types/services/functions.d.ts +8 -8
- package/types/services/health.d.ts +1 -1
- package/types/services/locale.d.ts +2 -2
- package/types/services/messaging.d.ts +8 -8
- package/types/services/organizations.d.ts +33 -16
- package/types/services/sites.d.ts +4 -4
- package/types/services/storage.d.ts +9 -9
- package/types/services/teams.d.ts +17 -17
- package/types/services/users.d.ts +27 -27
- package/types/services/vcs.d.ts +4 -4
package/dist/iife/sdk.js
CHANGED
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
'x-sdk-name': 'Console',
|
|
282
282
|
'x-sdk-platform': 'console',
|
|
283
283
|
'x-sdk-language': 'web',
|
|
284
|
-
'x-sdk-version': '1.
|
|
284
|
+
'x-sdk-version': '1.10.0',
|
|
285
285
|
'X-Appwrite-Response-Format': '1.7.0',
|
|
286
286
|
};
|
|
287
287
|
this.realtime = {
|
|
@@ -991,8 +991,8 @@
|
|
|
991
991
|
}
|
|
992
992
|
/**
|
|
993
993
|
* Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
|
|
994
|
-
|
|
995
|
-
|
|
994
|
+
* This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
|
|
995
|
+
*
|
|
996
996
|
*
|
|
997
997
|
* @param {string} email
|
|
998
998
|
* @param {string} password
|
|
@@ -1594,8 +1594,8 @@
|
|
|
1594
1594
|
}
|
|
1595
1595
|
/**
|
|
1596
1596
|
* Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint.
|
|
1597
|
-
|
|
1598
|
-
|
|
1597
|
+
*
|
|
1598
|
+
* Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
|
|
1599
1599
|
*
|
|
1600
1600
|
* @param {string} userId
|
|
1601
1601
|
* @param {string} secret
|
|
@@ -1675,8 +1675,8 @@
|
|
|
1675
1675
|
}
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
|
|
1678
|
-
|
|
1679
|
-
|
|
1678
|
+
*
|
|
1679
|
+
* 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).
|
|
1680
1680
|
*
|
|
1681
1681
|
* @param {string} email
|
|
1682
1682
|
* @param {string} password
|
|
@@ -1735,11 +1735,11 @@
|
|
|
1735
1735
|
}
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1738
|
+
*
|
|
1739
|
+
* If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
|
|
1740
|
+
*
|
|
1741
|
+
* 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).
|
|
1742
|
+
*
|
|
1743
1743
|
*
|
|
1744
1744
|
* @param {OAuthProvider} provider
|
|
1745
1745
|
* @param {string} success
|
|
@@ -1984,8 +1984,8 @@
|
|
|
1984
1984
|
}
|
|
1985
1985
|
/**
|
|
1986
1986
|
* Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.
|
|
1987
|
-
|
|
1988
|
-
|
|
1987
|
+
*
|
|
1988
|
+
* 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).
|
|
1989
1989
|
*
|
|
1990
1990
|
* @param {string} userId
|
|
1991
1991
|
* @param {string} email
|
|
@@ -2019,9 +2019,9 @@
|
|
|
2019
2019
|
}
|
|
2020
2020
|
/**
|
|
2021
2021
|
* Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour.
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2022
|
+
*
|
|
2023
|
+
* 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).
|
|
2024
|
+
*
|
|
2025
2025
|
*
|
|
2026
2026
|
* @param {string} userId
|
|
2027
2027
|
* @param {string} email
|
|
@@ -2059,10 +2059,10 @@
|
|
|
2059
2059
|
}
|
|
2060
2060
|
/**
|
|
2061
2061
|
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2062
|
+
*
|
|
2063
|
+
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
|
|
2064
|
+
*
|
|
2065
|
+
* 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).
|
|
2066
2066
|
*
|
|
2067
2067
|
* @param {OAuthProvider} provider
|
|
2068
2068
|
* @param {string} success
|
|
@@ -2101,8 +2101,8 @@
|
|
|
2101
2101
|
}
|
|
2102
2102
|
/**
|
|
2103
2103
|
* Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.
|
|
2104
|
-
|
|
2105
|
-
|
|
2104
|
+
*
|
|
2105
|
+
* 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).
|
|
2106
2106
|
*
|
|
2107
2107
|
* @param {string} userId
|
|
2108
2108
|
* @param {string} phone
|
|
@@ -2132,9 +2132,9 @@
|
|
|
2132
2132
|
}
|
|
2133
2133
|
/**
|
|
2134
2134
|
* Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2135
|
+
*
|
|
2136
|
+
* Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
|
|
2137
|
+
*
|
|
2138
2138
|
*
|
|
2139
2139
|
* @param {string} url
|
|
2140
2140
|
* @throws {AppwriteException}
|
|
@@ -2236,8 +2236,8 @@
|
|
|
2236
2236
|
}
|
|
2237
2237
|
/**
|
|
2238
2238
|
* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
|
|
2239
|
-
|
|
2240
|
-
|
|
2239
|
+
*
|
|
2240
|
+
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
2241
2241
|
*
|
|
2242
2242
|
* @param {Browser} code
|
|
2243
2243
|
* @param {number} width
|
|
@@ -2270,9 +2270,9 @@
|
|
|
2270
2270
|
}
|
|
2271
2271
|
/**
|
|
2272
2272
|
* The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2273
|
+
*
|
|
2274
|
+
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
2275
|
+
*
|
|
2276
2276
|
*
|
|
2277
2277
|
* @param {CreditCard} code
|
|
2278
2278
|
* @param {number} width
|
|
@@ -2305,8 +2305,8 @@
|
|
|
2305
2305
|
}
|
|
2306
2306
|
/**
|
|
2307
2307
|
* Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
|
|
2308
|
-
|
|
2309
|
-
|
|
2308
|
+
*
|
|
2309
|
+
* This endpoint does not follow HTTP redirects.
|
|
2310
2310
|
*
|
|
2311
2311
|
* @param {string} url
|
|
2312
2312
|
* @throws {AppwriteException}
|
|
@@ -2330,9 +2330,9 @@
|
|
|
2330
2330
|
}
|
|
2331
2331
|
/**
|
|
2332
2332
|
* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2333
|
+
*
|
|
2334
|
+
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
2335
|
+
*
|
|
2336
2336
|
*
|
|
2337
2337
|
* @param {Flag} code
|
|
2338
2338
|
* @param {number} width
|
|
@@ -2365,10 +2365,10 @@
|
|
|
2365
2365
|
}
|
|
2366
2366
|
/**
|
|
2367
2367
|
* Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2368
|
+
*
|
|
2369
|
+
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
|
|
2370
|
+
*
|
|
2371
|
+
* This endpoint does not follow HTTP redirects.
|
|
2372
2372
|
*
|
|
2373
2373
|
* @param {string} url
|
|
2374
2374
|
* @param {number} width
|
|
@@ -2400,11 +2400,11 @@
|
|
|
2400
2400
|
}
|
|
2401
2401
|
/**
|
|
2402
2402
|
* Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2403
|
+
*
|
|
2404
|
+
* You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.
|
|
2405
|
+
*
|
|
2406
|
+
* When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.
|
|
2407
|
+
*
|
|
2408
2408
|
*
|
|
2409
2409
|
* @param {string} name
|
|
2410
2410
|
* @param {number} width
|
|
@@ -2437,7 +2437,7 @@
|
|
|
2437
2437
|
}
|
|
2438
2438
|
/**
|
|
2439
2439
|
* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
|
|
2440
|
-
|
|
2440
|
+
*
|
|
2441
2441
|
*
|
|
2442
2442
|
* @param {string} text
|
|
2443
2443
|
* @param {number} size
|
|
@@ -2987,7 +2987,7 @@
|
|
|
2987
2987
|
}
|
|
2988
2988
|
/**
|
|
2989
2989
|
* Create a new Database.
|
|
2990
|
-
|
|
2990
|
+
*
|
|
2991
2991
|
*
|
|
2992
2992
|
* @param {string} databaseId
|
|
2993
2993
|
* @param {string} name
|
|
@@ -3285,7 +3285,7 @@
|
|
|
3285
3285
|
}
|
|
3286
3286
|
/**
|
|
3287
3287
|
* Create a boolean attribute.
|
|
3288
|
-
|
|
3288
|
+
*
|
|
3289
3289
|
*
|
|
3290
3290
|
* @param {string} databaseId
|
|
3291
3291
|
* @param {string} collectionId
|
|
@@ -3466,7 +3466,7 @@
|
|
|
3466
3466
|
}
|
|
3467
3467
|
/**
|
|
3468
3468
|
* Create an email attribute.
|
|
3469
|
-
|
|
3469
|
+
*
|
|
3470
3470
|
*
|
|
3471
3471
|
* @param {string} databaseId
|
|
3472
3472
|
* @param {string} collectionId
|
|
@@ -3512,7 +3512,7 @@
|
|
|
3512
3512
|
}
|
|
3513
3513
|
/**
|
|
3514
3514
|
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
3515
|
-
|
|
3515
|
+
*
|
|
3516
3516
|
*
|
|
3517
3517
|
* @param {string} databaseId
|
|
3518
3518
|
* @param {string} collectionId
|
|
@@ -3558,7 +3558,7 @@
|
|
|
3558
3558
|
}
|
|
3559
3559
|
/**
|
|
3560
3560
|
* Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
3561
|
-
|
|
3561
|
+
*
|
|
3562
3562
|
*
|
|
3563
3563
|
* @param {string} databaseId
|
|
3564
3564
|
* @param {string} collectionId
|
|
@@ -3611,7 +3611,7 @@
|
|
|
3611
3611
|
}
|
|
3612
3612
|
/**
|
|
3613
3613
|
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
3614
|
-
|
|
3614
|
+
*
|
|
3615
3615
|
*
|
|
3616
3616
|
* @param {string} databaseId
|
|
3617
3617
|
* @param {string} collectionId
|
|
@@ -3664,7 +3664,7 @@
|
|
|
3664
3664
|
}
|
|
3665
3665
|
/**
|
|
3666
3666
|
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
3667
|
-
|
|
3667
|
+
*
|
|
3668
3668
|
*
|
|
3669
3669
|
* @param {string} databaseId
|
|
3670
3670
|
* @param {string} collectionId
|
|
@@ -3718,7 +3718,7 @@
|
|
|
3718
3718
|
}
|
|
3719
3719
|
/**
|
|
3720
3720
|
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
3721
|
-
|
|
3721
|
+
*
|
|
3722
3722
|
*
|
|
3723
3723
|
* @param {string} databaseId
|
|
3724
3724
|
* @param {string} collectionId
|
|
@@ -3772,7 +3772,7 @@
|
|
|
3772
3772
|
}
|
|
3773
3773
|
/**
|
|
3774
3774
|
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
3775
|
-
|
|
3775
|
+
*
|
|
3776
3776
|
*
|
|
3777
3777
|
* @param {string} databaseId
|
|
3778
3778
|
* @param {string} collectionId
|
|
@@ -3826,7 +3826,7 @@
|
|
|
3826
3826
|
}
|
|
3827
3827
|
/**
|
|
3828
3828
|
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
3829
|
-
|
|
3829
|
+
*
|
|
3830
3830
|
*
|
|
3831
3831
|
* @param {string} databaseId
|
|
3832
3832
|
* @param {string} collectionId
|
|
@@ -3880,7 +3880,7 @@
|
|
|
3880
3880
|
}
|
|
3881
3881
|
/**
|
|
3882
3882
|
* Create IP address attribute.
|
|
3883
|
-
|
|
3883
|
+
*
|
|
3884
3884
|
*
|
|
3885
3885
|
* @param {string} databaseId
|
|
3886
3886
|
* @param {string} collectionId
|
|
@@ -3926,7 +3926,7 @@
|
|
|
3926
3926
|
}
|
|
3927
3927
|
/**
|
|
3928
3928
|
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
3929
|
-
|
|
3929
|
+
*
|
|
3930
3930
|
*
|
|
3931
3931
|
* @param {string} databaseId
|
|
3932
3932
|
* @param {string} collectionId
|
|
@@ -3972,7 +3972,7 @@
|
|
|
3972
3972
|
}
|
|
3973
3973
|
/**
|
|
3974
3974
|
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
3975
|
-
|
|
3975
|
+
*
|
|
3976
3976
|
*
|
|
3977
3977
|
* @param {string} databaseId
|
|
3978
3978
|
* @param {string} collectionId
|
|
@@ -4026,7 +4026,7 @@
|
|
|
4026
4026
|
}
|
|
4027
4027
|
/**
|
|
4028
4028
|
* Create a string attribute.
|
|
4029
|
-
|
|
4029
|
+
*
|
|
4030
4030
|
*
|
|
4031
4031
|
* @param {string} databaseId
|
|
4032
4032
|
* @param {string} collectionId
|
|
@@ -4083,7 +4083,7 @@
|
|
|
4083
4083
|
}
|
|
4084
4084
|
/**
|
|
4085
4085
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
4086
|
-
|
|
4086
|
+
*
|
|
4087
4087
|
*
|
|
4088
4088
|
* @param {string} databaseId
|
|
4089
4089
|
* @param {string} collectionId
|
|
@@ -4133,7 +4133,7 @@
|
|
|
4133
4133
|
}
|
|
4134
4134
|
/**
|
|
4135
4135
|
* Create a URL attribute.
|
|
4136
|
-
|
|
4136
|
+
*
|
|
4137
4137
|
*
|
|
4138
4138
|
* @param {string} databaseId
|
|
4139
4139
|
* @param {string} collectionId
|
|
@@ -4179,7 +4179,7 @@
|
|
|
4179
4179
|
}
|
|
4180
4180
|
/**
|
|
4181
4181
|
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
4182
|
-
|
|
4182
|
+
*
|
|
4183
4183
|
*
|
|
4184
4184
|
* @param {string} databaseId
|
|
4185
4185
|
* @param {string} collectionId
|
|
@@ -4277,7 +4277,7 @@
|
|
|
4277
4277
|
}
|
|
4278
4278
|
/**
|
|
4279
4279
|
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
4280
|
-
|
|
4280
|
+
*
|
|
4281
4281
|
*
|
|
4282
4282
|
* @param {string} databaseId
|
|
4283
4283
|
* @param {string} collectionId
|
|
@@ -4342,7 +4342,7 @@
|
|
|
4342
4342
|
* @param {string} databaseId
|
|
4343
4343
|
* @param {string} collectionId
|
|
4344
4344
|
* @param {string} documentId
|
|
4345
|
-
* @param {Omit<Document, keyof Models.Document>} data
|
|
4345
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data
|
|
4346
4346
|
* @param {string[]} permissions
|
|
4347
4347
|
* @throws {AppwriteException}
|
|
4348
4348
|
* @returns {Promise<Document>}
|
|
@@ -4378,6 +4378,8 @@
|
|
|
4378
4378
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
4379
4379
|
}
|
|
4380
4380
|
/**
|
|
4381
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
|
|
4382
|
+
*
|
|
4381
4383
|
* Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
4382
4384
|
*
|
|
4383
4385
|
* @param {string} databaseId
|
|
@@ -4408,8 +4410,10 @@
|
|
|
4408
4410
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
4409
4411
|
}
|
|
4410
4412
|
/**
|
|
4413
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
|
|
4414
|
+
*
|
|
4411
4415
|
* Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
4412
|
-
|
|
4416
|
+
*
|
|
4413
4417
|
*
|
|
4414
4418
|
* @param {string} databaseId
|
|
4415
4419
|
* @param {string} collectionId
|
|
@@ -4439,6 +4443,8 @@
|
|
|
4439
4443
|
return this.client.call('put', uri, apiHeaders, payload);
|
|
4440
4444
|
}
|
|
4441
4445
|
/**
|
|
4446
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
|
|
4447
|
+
*
|
|
4442
4448
|
* Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.
|
|
4443
4449
|
*
|
|
4444
4450
|
* @param {string} databaseId
|
|
@@ -4470,6 +4476,8 @@
|
|
|
4470
4476
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
4471
4477
|
}
|
|
4472
4478
|
/**
|
|
4479
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
|
|
4480
|
+
*
|
|
4473
4481
|
* Bulk delete documents using queries, if no queries are passed then all documents are deleted.
|
|
4474
4482
|
*
|
|
4475
4483
|
* @param {string} databaseId
|
|
@@ -4526,6 +4534,8 @@
|
|
|
4526
4534
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
4527
4535
|
}
|
|
4528
4536
|
/**
|
|
4537
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.
|
|
4538
|
+
*
|
|
4529
4539
|
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
4530
4540
|
*
|
|
4531
4541
|
* @param {string} databaseId
|
|
@@ -4569,7 +4579,7 @@
|
|
|
4569
4579
|
* @param {string} databaseId
|
|
4570
4580
|
* @param {string} collectionId
|
|
4571
4581
|
* @param {string} documentId
|
|
4572
|
-
* @param {Partial<Omit<Document, keyof Models.Document>>} data
|
|
4582
|
+
* @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>} data
|
|
4573
4583
|
* @param {string[]} permissions
|
|
4574
4584
|
* @throws {AppwriteException}
|
|
4575
4585
|
* @returns {Promise<Document>}
|
|
@@ -4759,7 +4769,7 @@
|
|
|
4759
4769
|
}
|
|
4760
4770
|
/**
|
|
4761
4771
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
4762
|
-
|
|
4772
|
+
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
4763
4773
|
*
|
|
4764
4774
|
* @param {string} databaseId
|
|
4765
4775
|
* @param {string} collectionId
|
|
@@ -5029,7 +5039,7 @@
|
|
|
5029
5039
|
}
|
|
5030
5040
|
/**
|
|
5031
5041
|
* Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.
|
|
5032
|
-
|
|
5042
|
+
* Once deleted, the domain will no longer be available for use and all associated resources will be removed.
|
|
5033
5043
|
*
|
|
5034
5044
|
* @param {string} domainId
|
|
5035
5045
|
* @throws {AppwriteException}
|
|
@@ -5049,8 +5059,8 @@
|
|
|
5049
5059
|
}
|
|
5050
5060
|
/**
|
|
5051
5061
|
* Verify which NS records are used and update the domain accordingly. This will check the domain's
|
|
5052
|
-
|
|
5053
|
-
|
|
5062
|
+
* nameservers and update the domain's status based on whether the nameservers match the expected
|
|
5063
|
+
* Appwrite nameservers.
|
|
5054
5064
|
*
|
|
5055
5065
|
* @param {string} domainId
|
|
5056
5066
|
* @throws {AppwriteException}
|
|
@@ -5087,7 +5097,7 @@
|
|
|
5087
5097
|
}
|
|
5088
5098
|
/**
|
|
5089
5099
|
* Add Google Workspace DNS records to the domain. This will create the required MX records
|
|
5090
|
-
|
|
5100
|
+
* for Google Workspace email hosting.
|
|
5091
5101
|
*
|
|
5092
5102
|
* @param {string} domainId
|
|
5093
5103
|
* @throws {AppwriteException}
|
|
@@ -5124,7 +5134,7 @@
|
|
|
5124
5134
|
}
|
|
5125
5135
|
/**
|
|
5126
5136
|
* Add iCloud DNS records to the domain. This will create the required MX and SPF records
|
|
5127
|
-
|
|
5137
|
+
* for using iCloud email services with your domain.
|
|
5128
5138
|
*
|
|
5129
5139
|
* @param {string} domainId
|
|
5130
5140
|
* @throws {AppwriteException}
|
|
@@ -5161,7 +5171,7 @@
|
|
|
5161
5171
|
}
|
|
5162
5172
|
/**
|
|
5163
5173
|
* Add Mailgun DNS records to the domain. This endpoint will create the required DNS records
|
|
5164
|
-
|
|
5174
|
+
* for Mailgun in the specified domain.
|
|
5165
5175
|
*
|
|
5166
5176
|
* @param {string} domainId
|
|
5167
5177
|
* @throws {AppwriteException}
|
|
@@ -5198,7 +5208,7 @@
|
|
|
5198
5208
|
}
|
|
5199
5209
|
/**
|
|
5200
5210
|
* Add Outlook DNS records to the domain. This will create the required MX records
|
|
5201
|
-
|
|
5211
|
+
* for setting up Outlook email hosting for your domain.
|
|
5202
5212
|
*
|
|
5203
5213
|
* @param {string} domainId
|
|
5204
5214
|
* @throws {AppwriteException}
|
|
@@ -5235,7 +5245,7 @@
|
|
|
5235
5245
|
}
|
|
5236
5246
|
/**
|
|
5237
5247
|
* Add ProtonMail DNS records to the domain. This will create the required MX records
|
|
5238
|
-
|
|
5248
|
+
* for using ProtonMail with your custom domain.
|
|
5239
5249
|
*
|
|
5240
5250
|
* @param {string} domainId
|
|
5241
5251
|
* @throws {AppwriteException}
|
|
@@ -5272,7 +5282,7 @@
|
|
|
5272
5282
|
}
|
|
5273
5283
|
/**
|
|
5274
5284
|
* Add Zoho Mail DNS records to the domain. This will create the required MX records
|
|
5275
|
-
|
|
5285
|
+
* for setting up Zoho Mail on your domain.
|
|
5276
5286
|
*
|
|
5277
5287
|
* @param {string} domainId
|
|
5278
5288
|
* @throws {AppwriteException}
|
|
@@ -5292,7 +5302,7 @@
|
|
|
5292
5302
|
}
|
|
5293
5303
|
/**
|
|
5294
5304
|
* List DNS records for a given domain. You can use this endpoint to list all the DNS records
|
|
5295
|
-
|
|
5305
|
+
* associated with your domain.
|
|
5296
5306
|
*
|
|
5297
5307
|
* @param {string} domainId
|
|
5298
5308
|
* @param {string[]} queries
|
|
@@ -5314,7 +5324,7 @@
|
|
|
5314
5324
|
}
|
|
5315
5325
|
/**
|
|
5316
5326
|
* Create a new A record for the given domain. A records are used to point a domain name
|
|
5317
|
-
|
|
5327
|
+
* to an IPv4 address. The record value should be a valid IPv4 address.
|
|
5318
5328
|
*
|
|
5319
5329
|
* @param {string} domainId
|
|
5320
5330
|
* @param {string} name
|
|
@@ -5359,8 +5369,8 @@
|
|
|
5359
5369
|
}
|
|
5360
5370
|
/**
|
|
5361
5371
|
* Update an existing A record for the given domain. This endpoint allows you to modify
|
|
5362
|
-
|
|
5363
|
-
|
|
5372
|
+
* the properties of an A record including its name (subdomain), IPv4 address, TTL,
|
|
5373
|
+
* and optional comment.
|
|
5364
5374
|
*
|
|
5365
5375
|
* @param {string} domainId
|
|
5366
5376
|
* @param {string} recordId
|
|
@@ -5409,7 +5419,7 @@
|
|
|
5409
5419
|
}
|
|
5410
5420
|
/**
|
|
5411
5421
|
* Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record
|
|
5412
|
-
|
|
5422
|
+
* to your domain. The record will be used to point a hostname to an IPv6 address.
|
|
5413
5423
|
*
|
|
5414
5424
|
* @param {string} domainId
|
|
5415
5425
|
* @param {string} name
|
|
@@ -5454,8 +5464,8 @@
|
|
|
5454
5464
|
}
|
|
5455
5465
|
/**
|
|
5456
5466
|
* Update an existing AAAA record for the given domain. This endpoint allows you to modify
|
|
5457
|
-
|
|
5458
|
-
|
|
5467
|
+
* the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
|
|
5468
|
+
* TTL, and optional comment.
|
|
5459
5469
|
*
|
|
5460
5470
|
* @param {string} domainId
|
|
5461
5471
|
* @param {string} recordId
|
|
@@ -5504,8 +5514,8 @@
|
|
|
5504
5514
|
}
|
|
5505
5515
|
/**
|
|
5506
5516
|
* Create a new ALIAS record for the given domain. This record type can be used to point your domain
|
|
5507
|
-
|
|
5508
|
-
|
|
5517
|
+
* to another domain name that will serve as an alias. This is particularly useful when you want to
|
|
5518
|
+
* map your domain to a target domain that may change its IP address.
|
|
5509
5519
|
*
|
|
5510
5520
|
* @param {string} domainId
|
|
5511
5521
|
* @param {string} name
|
|
@@ -5550,10 +5560,10 @@
|
|
|
5550
5560
|
}
|
|
5551
5561
|
/**
|
|
5552
5562
|
* Update an existing ALIAS record for the specified domain. This endpoint allows you to modify
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5563
|
+
* the properties of an existing ALIAS record including its name, target domain, TTL, and comment.
|
|
5564
|
+
*
|
|
5565
|
+
* The ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).
|
|
5566
|
+
* It provides a way to map one domain name to another.
|
|
5557
5567
|
*
|
|
5558
5568
|
* @param {string} domainId
|
|
5559
5569
|
* @param {string} recordId
|
|
@@ -5602,7 +5612,7 @@
|
|
|
5602
5612
|
}
|
|
5603
5613
|
/**
|
|
5604
5614
|
* Create a new CAA record for the given domain. CAA records are used to specify which
|
|
5605
|
-
|
|
5615
|
+
* Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your domain.
|
|
5606
5616
|
*
|
|
5607
5617
|
* @param {string} domainId
|
|
5608
5618
|
* @param {string} name
|
|
@@ -5647,8 +5657,8 @@
|
|
|
5647
5657
|
}
|
|
5648
5658
|
/**
|
|
5649
5659
|
* Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization)
|
|
5650
|
-
|
|
5651
|
-
|
|
5660
|
+
* record is used to specify which certificate authorities (CAs) are authorized to issue certificates
|
|
5661
|
+
* for a domain.
|
|
5652
5662
|
*
|
|
5653
5663
|
* @param {string} domainId
|
|
5654
5664
|
* @param {string} recordId
|
|
@@ -5697,10 +5707,10 @@
|
|
|
5697
5707
|
}
|
|
5698
5708
|
/**
|
|
5699
5709
|
* Create a new CNAME record for the given domain.
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5710
|
+
*
|
|
5711
|
+
* A CNAME record maps a subdomain to another domain name, allowing you to create aliases
|
|
5712
|
+
* for your domain. For example, you can create a CNAME record to point 'blog.example.com'
|
|
5713
|
+
* to 'example.wordpress.com'.
|
|
5704
5714
|
*
|
|
5705
5715
|
* @param {string} domainId
|
|
5706
5716
|
* @param {string} name
|
|
@@ -5793,7 +5803,7 @@
|
|
|
5793
5803
|
}
|
|
5794
5804
|
/**
|
|
5795
5805
|
* Create a new HTTPS record for the given domain. This record is used to configure HTTPS
|
|
5796
|
-
|
|
5806
|
+
* settings for your domain, enabling secure communication over SSL/TLS.
|
|
5797
5807
|
*
|
|
5798
5808
|
* @param {string} domainId
|
|
5799
5809
|
* @param {string} name
|
|
@@ -5838,8 +5848,8 @@
|
|
|
5838
5848
|
}
|
|
5839
5849
|
/**
|
|
5840
5850
|
* Update an existing HTTPS record for the given domain. This endpoint allows you to modify
|
|
5841
|
-
|
|
5842
|
-
|
|
5851
|
+
* the properties of an HTTPS record associated with your domain, including the name (subdomain),
|
|
5852
|
+
* target value, TTL, and optional comment.
|
|
5843
5853
|
*
|
|
5844
5854
|
* @param {string} domainId
|
|
5845
5855
|
* @param {string} recordId
|
|
@@ -5888,9 +5898,9 @@
|
|
|
5888
5898
|
}
|
|
5889
5899
|
/**
|
|
5890
5900
|
* Create a new MX record for the given domain. MX records are used to define the mail servers responsible
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5901
|
+
* for accepting email messages for the domain. Multiple MX records can be created with different priorities.
|
|
5902
|
+
* The priority parameter determines the order in which mail servers are used, with lower values indicating
|
|
5903
|
+
* higher priority.
|
|
5894
5904
|
*
|
|
5895
5905
|
* @param {string} domainId
|
|
5896
5906
|
* @param {string} name
|
|
@@ -5997,7 +6007,7 @@
|
|
|
5997
6007
|
}
|
|
5998
6008
|
/**
|
|
5999
6009
|
* Create a new NS record for the given domain. NS records specify the nameservers that are used
|
|
6000
|
-
|
|
6010
|
+
* to resolve the domain name to IP addresses. Each domain can have multiple NS records.
|
|
6001
6011
|
*
|
|
6002
6012
|
* @param {string} domainId
|
|
6003
6013
|
* @param {string} name
|
|
@@ -6042,9 +6052,9 @@
|
|
|
6042
6052
|
}
|
|
6043
6053
|
/**
|
|
6044
6054
|
* Update an existing NS record for the given domain. This endpoint allows you to modify
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6055
|
+
* the properties of an NS (nameserver) record associated with your domain. You can update
|
|
6056
|
+
* the record name (subdomain), target nameserver value, TTL, and add or modify comments
|
|
6057
|
+
* for better record management.
|
|
6048
6058
|
*
|
|
6049
6059
|
* @param {string} domainId
|
|
6050
6060
|
* @param {string} recordId
|
|
@@ -6093,8 +6103,8 @@
|
|
|
6093
6103
|
}
|
|
6094
6104
|
/**
|
|
6095
6105
|
* Create a new SRV record for the given domain. SRV records are used to define the location
|
|
6096
|
-
|
|
6097
|
-
|
|
6106
|
+
* of servers for specific services. For example, they can be used to specify which server
|
|
6107
|
+
* handles a specific service like SIP or XMPP for the domain.
|
|
6098
6108
|
*
|
|
6099
6109
|
* @param {string} domainId
|
|
6100
6110
|
* @param {string} name
|
|
@@ -6160,19 +6170,19 @@
|
|
|
6160
6170
|
}
|
|
6161
6171
|
/**
|
|
6162
6172
|
* Update an existing SRV record for the given domain.
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6173
|
+
*
|
|
6174
|
+
* Required parameters:
|
|
6175
|
+
* - domainId: Domain unique ID
|
|
6176
|
+
* - recordId: DNS record unique ID
|
|
6177
|
+
* - name: Record name (service name)
|
|
6178
|
+
* - value: Target hostname for this SRV record
|
|
6179
|
+
* - ttl: Time to live, in seconds
|
|
6180
|
+
* - priority: Record priority
|
|
6181
|
+
* - weight: Record weight
|
|
6182
|
+
* - port: Port number for the service
|
|
6183
|
+
*
|
|
6184
|
+
* Optional parameters:
|
|
6185
|
+
* - comment: A comment for this record
|
|
6176
6186
|
*
|
|
6177
6187
|
* @param {string} domainId
|
|
6178
6188
|
* @param {string} recordId
|
|
@@ -6242,8 +6252,8 @@
|
|
|
6242
6252
|
}
|
|
6243
6253
|
/**
|
|
6244
6254
|
* Create a new TXT record for the given domain. TXT records can be used
|
|
6245
|
-
|
|
6246
|
-
|
|
6255
|
+
* to provide additional information about your domain, such as domain
|
|
6256
|
+
* verification records, SPF records, or DKIM records.
|
|
6247
6257
|
*
|
|
6248
6258
|
* @param {string} domainId
|
|
6249
6259
|
* @param {string} name
|
|
@@ -6285,9 +6295,9 @@
|
|
|
6285
6295
|
}
|
|
6286
6296
|
/**
|
|
6287
6297
|
* Update an existing TXT record for the given domain.
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6298
|
+
*
|
|
6299
|
+
* Update the TXT record details for a specific domain by providing the domain ID,
|
|
6300
|
+
* record ID, and the new record configuration including name, value, TTL, and an optional comment.
|
|
6291
6301
|
*
|
|
6292
6302
|
* @param {string} domainId
|
|
6293
6303
|
* @param {string} recordId
|
|
@@ -6336,10 +6346,10 @@
|
|
|
6336
6346
|
}
|
|
6337
6347
|
/**
|
|
6338
6348
|
* Get a single DNS record for a given domain by record ID.
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6349
|
+
*
|
|
6350
|
+
* This endpoint allows you to retrieve a specific DNS record associated with a domain
|
|
6351
|
+
* using its unique identifier. The record contains information about the DNS configuration
|
|
6352
|
+
* such as type, value, and TTL settings.
|
|
6343
6353
|
*
|
|
6344
6354
|
* @param {string} domainId
|
|
6345
6355
|
* @param {string} recordId
|
|
@@ -6361,7 +6371,7 @@
|
|
|
6361
6371
|
}
|
|
6362
6372
|
/**
|
|
6363
6373
|
* Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record
|
|
6364
|
-
|
|
6374
|
+
* from a specific domain.
|
|
6365
6375
|
*
|
|
6366
6376
|
* @param {string} domainId
|
|
6367
6377
|
* @param {string} recordId
|
|
@@ -6385,9 +6395,9 @@
|
|
|
6385
6395
|
}
|
|
6386
6396
|
/**
|
|
6387
6397
|
* Update the team ID for a specific domain. This endpoint requires admin access.
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6398
|
+
*
|
|
6399
|
+
* Updating the team ID will transfer ownership and access control of the domain
|
|
6400
|
+
* and all its DNS records to the new team.
|
|
6391
6401
|
*
|
|
6392
6402
|
* @param {string} domainId
|
|
6393
6403
|
* @param {string} teamId
|
|
@@ -6414,7 +6424,7 @@
|
|
|
6414
6424
|
}
|
|
6415
6425
|
/**
|
|
6416
6426
|
* Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
|
|
6417
|
-
|
|
6427
|
+
* zone file in a standardized format that can be used to configure DNS servers.
|
|
6418
6428
|
*
|
|
6419
6429
|
* @param {string} domainId
|
|
6420
6430
|
* @throws {AppwriteException}
|
|
@@ -6432,7 +6442,7 @@
|
|
|
6432
6442
|
}
|
|
6433
6443
|
/**
|
|
6434
6444
|
* Update the DNS zone for the given domain using the provided zone file content.
|
|
6435
|
-
|
|
6445
|
+
* All parsed records are imported and then the main domain document is returned.
|
|
6436
6446
|
*
|
|
6437
6447
|
* @param {string} domainId
|
|
6438
6448
|
* @param {string} content
|
|
@@ -6848,10 +6858,10 @@
|
|
|
6848
6858
|
}
|
|
6849
6859
|
/**
|
|
6850
6860
|
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6861
|
+
*
|
|
6862
|
+
* This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
|
|
6863
|
+
*
|
|
6864
|
+
* Use the "command" param to set the entrypoint used to execute your code.
|
|
6855
6865
|
*
|
|
6856
6866
|
* @param {string} functionId
|
|
6857
6867
|
* @param {File} code
|
|
@@ -6923,8 +6933,8 @@
|
|
|
6923
6933
|
}
|
|
6924
6934
|
/**
|
|
6925
6935
|
* Create a deployment based on a template.
|
|
6926
|
-
|
|
6927
|
-
|
|
6936
|
+
*
|
|
6937
|
+
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
|
|
6928
6938
|
*
|
|
6929
6939
|
* @param {string} functionId
|
|
6930
6940
|
* @param {string} repository
|
|
@@ -6976,8 +6986,8 @@
|
|
|
6976
6986
|
}
|
|
6977
6987
|
/**
|
|
6978
6988
|
* Create a deployment when a function is connected to VCS.
|
|
6979
|
-
|
|
6980
|
-
|
|
6989
|
+
*
|
|
6990
|
+
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
6981
6991
|
*
|
|
6982
6992
|
* @param {string} functionId
|
|
6983
6993
|
* @param {VCSDeploymentType} type
|
|
@@ -7638,7 +7648,7 @@
|
|
|
7638
7648
|
}
|
|
7639
7649
|
/**
|
|
7640
7650
|
* Returns the amount of failed jobs in a given queue.
|
|
7641
|
-
|
|
7651
|
+
*
|
|
7642
7652
|
*
|
|
7643
7653
|
* @param {Name} name
|
|
7644
7654
|
* @param {number} threshold
|
|
@@ -7858,8 +7868,8 @@
|
|
|
7858
7868
|
}
|
|
7859
7869
|
/**
|
|
7860
7870
|
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
|
|
7861
|
-
|
|
7862
|
-
|
|
7871
|
+
*
|
|
7872
|
+
* ([IP Geolocation by DB-IP](https://db-ip.com))
|
|
7863
7873
|
*
|
|
7864
7874
|
* @throws {AppwriteException}
|
|
7865
7875
|
* @returns {Promise<Models.Locale>}
|
|
@@ -8063,7 +8073,7 @@
|
|
|
8063
8073
|
}
|
|
8064
8074
|
/**
|
|
8065
8075
|
* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
|
|
8066
|
-
|
|
8076
|
+
*
|
|
8067
8077
|
*
|
|
8068
8078
|
* @param {string} messageId
|
|
8069
8079
|
* @param {string[]} topics
|
|
@@ -8221,7 +8231,7 @@
|
|
|
8221
8231
|
}
|
|
8222
8232
|
/**
|
|
8223
8233
|
* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
|
|
8224
|
-
|
|
8234
|
+
*
|
|
8225
8235
|
*
|
|
8226
8236
|
* @param {string} messageId
|
|
8227
8237
|
* @param {string[]} topics
|
|
@@ -8362,7 +8372,7 @@
|
|
|
8362
8372
|
}
|
|
8363
8373
|
/**
|
|
8364
8374
|
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
|
|
8365
|
-
|
|
8375
|
+
*
|
|
8366
8376
|
*
|
|
8367
8377
|
* @param {string} messageId
|
|
8368
8378
|
* @param {string[]} topics
|
|
@@ -8406,7 +8416,7 @@
|
|
|
8406
8416
|
}
|
|
8407
8417
|
/**
|
|
8408
8418
|
* Get a message by its unique ID.
|
|
8409
|
-
|
|
8419
|
+
*
|
|
8410
8420
|
*
|
|
8411
8421
|
* @param {string} messageId
|
|
8412
8422
|
* @throws {AppwriteException}
|
|
@@ -9461,7 +9471,7 @@
|
|
|
9461
9471
|
}
|
|
9462
9472
|
/**
|
|
9463
9473
|
* Get a provider by its unique ID.
|
|
9464
|
-
|
|
9474
|
+
*
|
|
9465
9475
|
*
|
|
9466
9476
|
* @param {string} providerId
|
|
9467
9477
|
* @throws {AppwriteException}
|
|
@@ -9594,7 +9604,7 @@
|
|
|
9594
9604
|
}
|
|
9595
9605
|
/**
|
|
9596
9606
|
* Get a topic by its unique ID.
|
|
9597
|
-
|
|
9607
|
+
*
|
|
9598
9608
|
*
|
|
9599
9609
|
* @param {string} topicId
|
|
9600
9610
|
* @throws {AppwriteException}
|
|
@@ -9612,7 +9622,7 @@
|
|
|
9612
9622
|
}
|
|
9613
9623
|
/**
|
|
9614
9624
|
* Update a topic by its unique ID.
|
|
9615
|
-
|
|
9625
|
+
*
|
|
9616
9626
|
*
|
|
9617
9627
|
* @param {string} topicId
|
|
9618
9628
|
* @param {string} name
|
|
@@ -9738,7 +9748,7 @@
|
|
|
9738
9748
|
}
|
|
9739
9749
|
/**
|
|
9740
9750
|
* Get a subscriber by its unique ID.
|
|
9741
|
-
|
|
9751
|
+
*
|
|
9742
9752
|
*
|
|
9743
9753
|
* @param {string} topicId
|
|
9744
9754
|
* @param {string} subscriberId
|
|
@@ -10322,7 +10332,7 @@
|
|
|
10322
10332
|
}
|
|
10323
10333
|
/**
|
|
10324
10334
|
* Create a new organization.
|
|
10325
|
-
|
|
10335
|
+
*
|
|
10326
10336
|
*
|
|
10327
10337
|
* @param {string} organizationId
|
|
10328
10338
|
* @param {string} name
|
|
@@ -10600,7 +10610,7 @@
|
|
|
10600
10610
|
}
|
|
10601
10611
|
/**
|
|
10602
10612
|
* List all credits for an organization.
|
|
10603
|
-
|
|
10613
|
+
*
|
|
10604
10614
|
*
|
|
10605
10615
|
* @param {string} organizationId
|
|
10606
10616
|
* @param {string[]} queries
|
|
@@ -10646,6 +10656,23 @@
|
|
|
10646
10656
|
};
|
|
10647
10657
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
10648
10658
|
}
|
|
10659
|
+
/**
|
|
10660
|
+
* Get total available valid credits for an organization.
|
|
10661
|
+
*
|
|
10662
|
+
* @param {string} organizationId
|
|
10663
|
+
* @throws {AppwriteException}
|
|
10664
|
+
* @returns {Promise<Models.CreditAvailable>}
|
|
10665
|
+
*/
|
|
10666
|
+
getAvailableCredits(organizationId) {
|
|
10667
|
+
if (typeof organizationId === 'undefined') {
|
|
10668
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
10669
|
+
}
|
|
10670
|
+
const apiPath = '/organizations/{organizationId}/credits/available'.replace('{organizationId}', organizationId);
|
|
10671
|
+
const payload = {};
|
|
10672
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10673
|
+
const apiHeaders = {};
|
|
10674
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10675
|
+
}
|
|
10649
10676
|
/**
|
|
10650
10677
|
* Get credit details.
|
|
10651
10678
|
*
|
|
@@ -10904,7 +10931,7 @@
|
|
|
10904
10931
|
}
|
|
10905
10932
|
/**
|
|
10906
10933
|
* Set an organization's backup payment method.
|
|
10907
|
-
|
|
10934
|
+
*
|
|
10908
10935
|
*
|
|
10909
10936
|
* @param {string} organizationId
|
|
10910
10937
|
* @param {string} paymentMethodId
|
|
@@ -11055,6 +11082,29 @@
|
|
|
11055
11082
|
};
|
|
11056
11083
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
11057
11084
|
}
|
|
11085
|
+
/**
|
|
11086
|
+
* Update selected projects to keep in the organization.
|
|
11087
|
+
*
|
|
11088
|
+
* @param {string} organizationId
|
|
11089
|
+
* @param {string[]} projects
|
|
11090
|
+
* @throws {AppwriteException}
|
|
11091
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
11092
|
+
*/
|
|
11093
|
+
updateProjects(organizationId, projects) {
|
|
11094
|
+
if (typeof organizationId === 'undefined') {
|
|
11095
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11096
|
+
}
|
|
11097
|
+
const apiPath = '/organizations/{organizationId}/projects'.replace('{organizationId}', organizationId);
|
|
11098
|
+
const payload = {};
|
|
11099
|
+
if (typeof projects !== 'undefined') {
|
|
11100
|
+
payload['projects'] = projects;
|
|
11101
|
+
}
|
|
11102
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11103
|
+
const apiHeaders = {
|
|
11104
|
+
'content-type': 'application/json',
|
|
11105
|
+
};
|
|
11106
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
11107
|
+
}
|
|
11058
11108
|
/**
|
|
11059
11109
|
* Get Scopes
|
|
11060
11110
|
*
|
|
@@ -13622,8 +13672,8 @@
|
|
|
13622
13672
|
}
|
|
13623
13673
|
/**
|
|
13624
13674
|
* Create a deployment based on a template.
|
|
13625
|
-
|
|
13626
|
-
|
|
13675
|
+
*
|
|
13676
|
+
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
|
|
13627
13677
|
*
|
|
13628
13678
|
* @param {string} siteId
|
|
13629
13679
|
* @param {string} repository
|
|
@@ -13675,8 +13725,8 @@
|
|
|
13675
13725
|
}
|
|
13676
13726
|
/**
|
|
13677
13727
|
* Create a deployment when a site is connected to VCS.
|
|
13678
|
-
|
|
13679
|
-
|
|
13728
|
+
*
|
|
13729
|
+
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
13680
13730
|
*
|
|
13681
13731
|
* @param {string} siteId
|
|
13682
13732
|
* @param {VCSDeploymentType} type
|
|
@@ -14238,13 +14288,13 @@
|
|
|
14238
14288
|
}
|
|
14239
14289
|
/**
|
|
14240
14290
|
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14291
|
+
*
|
|
14292
|
+
* Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.
|
|
14293
|
+
*
|
|
14294
|
+
* When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
|
|
14295
|
+
*
|
|
14296
|
+
* If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
|
|
14297
|
+
*
|
|
14248
14298
|
*
|
|
14249
14299
|
* @param {string} bucketId
|
|
14250
14300
|
* @param {string} fileId
|
|
@@ -14485,7 +14535,7 @@
|
|
|
14485
14535
|
}
|
|
14486
14536
|
/**
|
|
14487
14537
|
* Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. 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.
|
|
14488
|
-
|
|
14538
|
+
*
|
|
14489
14539
|
*
|
|
14490
14540
|
* @param {StorageUsageRange} range
|
|
14491
14541
|
* @throws {AppwriteException}
|
|
@@ -14503,7 +14553,7 @@
|
|
|
14503
14553
|
}
|
|
14504
14554
|
/**
|
|
14505
14555
|
* Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. 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.
|
|
14506
|
-
|
|
14556
|
+
*
|
|
14507
14557
|
*
|
|
14508
14558
|
* @param {string} bucketId
|
|
14509
14559
|
* @param {StorageUsageRange} range
|
|
@@ -14693,13 +14743,13 @@
|
|
|
14693
14743
|
}
|
|
14694
14744
|
/**
|
|
14695
14745
|
* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
|
|
14696
|
-
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14746
|
+
*
|
|
14747
|
+
* You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.
|
|
14748
|
+
*
|
|
14749
|
+
* Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
|
|
14750
|
+
*
|
|
14751
|
+
* Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
|
|
14752
|
+
*
|
|
14703
14753
|
*
|
|
14704
14754
|
* @param {string} teamId
|
|
14705
14755
|
* @param {string[]} roles
|
|
@@ -14767,7 +14817,7 @@
|
|
|
14767
14817
|
}
|
|
14768
14818
|
/**
|
|
14769
14819
|
* 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).
|
|
14770
|
-
|
|
14820
|
+
*
|
|
14771
14821
|
*
|
|
14772
14822
|
* @param {string} teamId
|
|
14773
14823
|
* @param {string} membershipId
|
|
@@ -14821,9 +14871,9 @@
|
|
|
14821
14871
|
}
|
|
14822
14872
|
/**
|
|
14823
14873
|
* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14874
|
+
*
|
|
14875
|
+
* If the request is successful, a session for the user is automatically created.
|
|
14876
|
+
*
|
|
14827
14877
|
*
|
|
14828
14878
|
* @param {string} teamId
|
|
14829
14879
|
* @param {string} membershipId
|
|
@@ -15466,7 +15516,7 @@
|
|
|
15466
15516
|
}
|
|
15467
15517
|
/**
|
|
15468
15518
|
* 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.
|
|
15469
|
-
|
|
15519
|
+
*
|
|
15470
15520
|
*
|
|
15471
15521
|
* @param {UserUsageRange} range
|
|
15472
15522
|
* @throws {AppwriteException}
|
|
@@ -15573,8 +15623,8 @@
|
|
|
15573
15623
|
}
|
|
15574
15624
|
/**
|
|
15575
15625
|
* Update the user labels by its unique ID.
|
|
15576
|
-
|
|
15577
|
-
|
|
15626
|
+
*
|
|
15627
|
+
* Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info.
|
|
15578
15628
|
*
|
|
15579
15629
|
* @param {string} userId
|
|
15580
15630
|
* @param {string[]} labels
|
|
@@ -15906,8 +15956,8 @@
|
|
|
15906
15956
|
}
|
|
15907
15957
|
/**
|
|
15908
15958
|
* Creates a session for a user. Returns an immediately usable session object.
|
|
15909
|
-
|
|
15910
|
-
|
|
15959
|
+
*
|
|
15960
|
+
* If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint.
|
|
15911
15961
|
*
|
|
15912
15962
|
* @param {string} userId
|
|
15913
15963
|
* @throws {AppwriteException}
|
|
@@ -16143,7 +16193,7 @@
|
|
|
16143
16193
|
}
|
|
16144
16194
|
/**
|
|
16145
16195
|
* 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.
|
|
16146
|
-
|
|
16196
|
+
*
|
|
16147
16197
|
*
|
|
16148
16198
|
* @param {string} userId
|
|
16149
16199
|
* @param {number} length
|
|
@@ -16348,7 +16398,7 @@
|
|
|
16348
16398
|
}
|
|
16349
16399
|
/**
|
|
16350
16400
|
* 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.
|
|
16351
|
-
|
|
16401
|
+
*
|
|
16352
16402
|
*
|
|
16353
16403
|
* @param {string} installationId
|
|
16354
16404
|
* @param {string} providerRepositoryId
|
|
@@ -16370,15 +16420,15 @@
|
|
|
16370
16420
|
}
|
|
16371
16421
|
/**
|
|
16372
16422
|
* 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.
|
|
16373
|
-
|
|
16374
16423
|
*
|
|
16375
16424
|
* @param {string} installationId
|
|
16376
16425
|
* @param {string} providerRepositoryId
|
|
16377
16426
|
* @param {string} providerRootDirectory
|
|
16427
|
+
* @param {string} providerReference
|
|
16378
16428
|
* @throws {AppwriteException}
|
|
16379
16429
|
* @returns {Promise<Models.VcsContentList>}
|
|
16380
16430
|
*/
|
|
16381
|
-
getRepositoryContents(installationId, providerRepositoryId, providerRootDirectory) {
|
|
16431
|
+
getRepositoryContents(installationId, providerRepositoryId, providerRootDirectory, providerReference) {
|
|
16382
16432
|
if (typeof installationId === 'undefined') {
|
|
16383
16433
|
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
16384
16434
|
}
|
|
@@ -16390,6 +16440,9 @@
|
|
|
16390
16440
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
16391
16441
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
16392
16442
|
}
|
|
16443
|
+
if (typeof providerReference !== 'undefined') {
|
|
16444
|
+
payload['providerReference'] = providerReference;
|
|
16445
|
+
}
|
|
16393
16446
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
16394
16447
|
const apiHeaders = {};
|
|
16395
16448
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -16426,7 +16479,7 @@
|
|
|
16426
16479
|
}
|
|
16427
16480
|
/**
|
|
16428
16481
|
* List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details.
|
|
16429
|
-
|
|
16482
|
+
*
|
|
16430
16483
|
*
|
|
16431
16484
|
* @param {string[]} queries
|
|
16432
16485
|
* @param {string} search
|