diff --git a/.env b/.env index 4980315c9ae..b7dd9e24f39 100644 --- a/.env +++ b/.env @@ -24,7 +24,7 @@ _APP_OPENSSL_KEY_V1=your-secret-key _APP_DOMAIN=traefik _APP_DOMAIN_FUNCTIONS=functions.localhost _APP_DOMAIN_SITES=sites.localhost -_APP_DOMAIN_TARGET_CNAME=test.appwrite.io +_APP_DOMAIN_TARGET_CNAME=test.localhost _APP_DOMAIN_TARGET_A=127.0.0.1 _APP_DOMAIN_TARGET_AAAA=::1 _APP_RULES_FORMAT=md5 @@ -85,7 +85,7 @@ _APP_COMPUTE_RUNTIMES_NETWORK=runtimes _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://exc1/v1 _APP_FUNCTIONS_RUNTIMES=php-8.0,node-18.0,python-3.9,ruby-3.1 -_APP_SITES_RUNTIMES=static-1,node-22,flutter-3.29 +_APP_SITES_RUNTIMES=static-1,node-22,flutter-3.32 _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_START_TIME=12:00 _APP_MAINTENANCE_RETENTION_CACHE=2592000 diff --git a/.github/workflows/sdk-preview.yml b/.github/workflows/sdk-preview.yml index 92b4f454cbb..e317845768e 100644 --- a/.github/workflows/sdk-preview.yml +++ b/.github/workflows/sdk-preview.yml @@ -1,25 +1,46 @@ -name: "Console SDK Preview" +name: "SDK Preview" on: pull_request: paths: - 'app/config/specs/*-latest-console.json' - + workflow_dispatch: + inputs: + platform: + type: choice + description: "Platform to build" + options: + - client + - server jobs: setup: - name: Setup & Build Console SDK + name: Setup & Build SDK runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 + + - name: Set SDK type + id: set-sdk + run: | + PLATFORM="${{ github.event.inputs.platform }}" + if [ -z "$PLATFORM" ]; then + PLATFORM="console" + fi + if [ "$PLATFORM" = "server" ]; then + echo "sdk_type=nodejs" >> $GITHUB_OUTPUT + else + echo "sdk_type=web" >> $GITHUB_OUTPUT + fi + echo "platform=$PLATFORM" >> $GITHUB_OUTPUT - name: Load and Start Appwrite run: | docker compose build docker compose up -d - docker compose exec appwrite sdks --platform=console --sdk=web --version=latest --git=no - sudo chown -R $USER:$USER ./app/sdks/console-web + docker compose exec appwrite sdks --platform=${{ steps.set-sdk.outputs.platform }} --sdk=${{ steps.set-sdk.outputs.sdk_type }} --version=latest --git=no + sudo chown -R $USER:$USER ./app/sdks/${{ steps.set-sdk.outputs.platform }}-${{ steps.set-sdk.outputs.sdk_type }} - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a7fc1cf0c63..6fd4e89858d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -303,7 +303,7 @@ jobs: docker compose up -d sleep 30 - - name: Run Projects tests with dev keys in ${{ matrix.tables-mode }} table mode + - name: Run Projects tests with dev keys in dedicated table mode run: | echo "Using project tables" export _APP_DATABASE_SHARED_TABLES= diff --git a/CHANGES.md b/CHANGES.md index 62db3d525eb..bc903e4b318 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,267 @@ +# Version 1.6.2 + +## What's Changed + +### Notable changes + +* Delete git folder to reduce build size in [9076](https://github.com/appwrite/appwrite/pull/9076) +* Upgrade assistant in [9100](https://github.com/appwrite/appwrite/pull/9100) +* Use redis adapter for abuse in [9121](https://github.com/appwrite/appwrite/pull/9121) +* Set base specification CPUs to 0.5 again in [9146](https://github.com/appwrite/appwrite/pull/9146) +* Add new push message parameters in [9060](https://github.com/appwrite/appwrite/pull/9060) +* Update audits to include user type in [9211](https://github.com/appwrite/appwrite/pull/9211) +* Enable HEIC in [9251](https://github.com/appwrite/appwrite/pull/9251) +* Added teamName to membership redirect url in [9269](https://github.com/appwrite/appwrite/pull/9269) +* Add support endpoint url for S3 in [9303](https://github.com/appwrite/appwrite/pull/9303) +* Added RuPay Credit Card Icon in Avatars Service in [5046](https://github.com/appwrite/appwrite/pull/5046) +* Add figma oauth provider in [9623](https://github.com/appwrite/appwrite/pull/9623) +* Update console to version 5.2.58 in [9637](https://github.com/appwrite/appwrite/pull/9637) + +### Fixes + +* Remove failed attribute in [9032](https://github.com/appwrite/appwrite/pull/9032) +* Fix delete notFound attribute in [9038](https://github.com/appwrite/appwrite/pull/9038) +* 🇮🇸 Added missing Icelandic translations for email strings. in [4848](https://github.com/appwrite/appwrite/pull/4848) +* fix doc comment for filter method in [5769](https://github.com/appwrite/appwrite/pull/5769) +* Delete attribute No throwing Exception on not found in [9157](https://github.com/appwrite/appwrite/pull/9157) +* Fix VCS identity collision in [9138](https://github.com/appwrite/appwrite/pull/9138) +* Fix disabling of email-otp when user wants to in [9200](https://github.com/appwrite/appwrite/pull/9200) +* Ensure user can delete session in [9209](https://github.com/appwrite/appwrite/pull/9209) +* Fix resend invitation in [9218](https://github.com/appwrite/appwrite/pull/9218) +* Fix phone number parsing exception handling in [9246](https://github.com/appwrite/appwrite/pull/9246) +* Fix amazon oauth in [9253](https://github.com/appwrite/appwrite/pull/9253) +* Fix slack oauth scopes, and updated to v2 in [9228](https://github.com/appwrite/appwrite/pull/9228) +* Fix forwarded user agent in [9271](https://github.com/appwrite/appwrite/pull/9271) +* Fix WEBP File Preview Rendering Issue in [9321](https://github.com/appwrite/appwrite/pull/9321) +* Fix build memory specifications in [9360](https://github.com/appwrite/appwrite/pull/9360) +* Fix Self Hosting functions by adding missed config in [9373](https://github.com/appwrite/appwrite/pull/9373) +* Fix resend team invite if already accepted in [9348](https://github.com/appwrite/appwrite/pull/9348) +* Fix null errors on team invite in [9391](https://github.com/appwrite/appwrite/pull/9391) +* Fix email (smtp) to multiple recipients in [9243](https://github.com/appwrite/appwrite/pull/9243) +* Fix stats timing by using receivedAt date when available in [9428](https://github.com/appwrite/appwrite/pull/9428) +* Make min/max params optional for attribute update in [9387](https://github.com/appwrite/appwrite/pull/9387) +* Fix blocking of phone sessions when disabled on console in [9447](https://github.com/appwrite/appwrite/pull/9447) +* Fix logging config in [9467](https://github.com/appwrite/appwrite/pull/9467) +* Update audit timestamp origin in [9481](https://github.com/appwrite/appwrite/pull/9481) +* Fix certificates in deletes worker in [9466](https://github.com/appwrite/appwrite/pull/9466) +* Fix console audits delete in [9547](https://github.com/appwrite/appwrite/pull/9547) +* Fix migrations in [9633](https://github.com/appwrite/appwrite/pull/9633) +* Ensure all 4xx errors in OAuth redirect lead to the failure URL in [9679](https://github.com/appwrite/appwrite/pull/9679) +* Treat 0 as unlimited for CPUs and memory in [9638](https://github.com/appwrite/appwrite/pull/9638) +* Add contextual dispatch logic to fix high CPU usage in [9687](https://github.com/appwrite/appwrite/pull/9687) + +### Miscellaneous + +* Merge 1.6.x into feat-custom-cf-hostnames in [8904](https://github.com/appwrite/appwrite/pull/8904) +* Improve compression param checks in [8922](https://github.com/appwrite/appwrite/pull/8922) +* upgrade utopia storage in [8930](https://github.com/appwrite/appwrite/pull/8930) +* Feat migration in [8797](https://github.com/appwrite/appwrite/pull/8797) +* feat fix web routes in [8962](https://github.com/appwrite/appwrite/pull/8962) +* Fix no pool access in [9027](https://github.com/appwrite/appwrite/pull/9027) +* feat: use environment variable to check rules format in [9039](https://github.com/appwrite/appwrite/pull/9039) +* Update storage.php in [9037](https://github.com/appwrite/appwrite/pull/9037) +* Upgrade db 0.53.200 in [9050](https://github.com/appwrite/appwrite/pull/9050) +* Chore: upgrade utopia storage in [9066](https://github.com/appwrite/appwrite/pull/9066) +* Update usage-dump payload in [9085](https://github.com/appwrite/appwrite/pull/9085) +* GitHub Workflows security hardening in [3728](https://github.com/appwrite/appwrite/pull/3728) +* Update add-oauth2-provider.md in [4313](https://github.com/appwrite/appwrite/pull/4313) +* update readme-cn some doc in [5278](https://github.com/appwrite/appwrite/pull/5278) +* Add accessibility features in [7042](https://github.com/appwrite/appwrite/pull/7042) +* Add Appwrite Cloud to read me. in [5445](https://github.com/appwrite/appwrite/pull/5445) +* Migration throw error in [9092](https://github.com/appwrite/appwrite/pull/9092) +* Fix usage payload bug in [9097](https://github.com/appwrite/appwrite/pull/9097) +* chore: replace occurrences of dbForConsole to dbForPlatform in [9096](https://github.com/appwrite/appwrite/pull/9096) +* fix(realtime): decrement connectionCounter only if connection is known in [9055](https://github.com/appwrite/appwrite/pull/9055) +* payload bug fix in [9098](https://github.com/appwrite/appwrite/pull/9098) +* Fix usage payload bug in [9099](https://github.com/appwrite/appwrite/pull/9099) +* Usage payload debug in [9101](https://github.com/appwrite/appwrite/pull/9101) +* Usage payload debug in [9103](https://github.com/appwrite/appwrite/pull/9103) +* Usage payload debug in [9104](https://github.com/appwrite/appwrite/pull/9104) +* Feat: createFunction abuse labels in [9102](https://github.com/appwrite/appwrite/pull/9102) +* Docs-create-document in [9105](https://github.com/appwrite/appwrite/pull/9105) +* Docs: Create document and unknown attribute error messages. in [5427](https://github.com/appwrite/appwrite/pull/5427) +* Fix: update project accessed at from router and schedulers in [9109](https://github.com/appwrite/appwrite/pull/9109) +* chore: initial commit in [9111](https://github.com/appwrite/appwrite/pull/9111) +* chore: optimise webhooks payload in [9115](https://github.com/appwrite/appwrite/pull/9115) +* Revert "chore: initial commit" in [9117](https://github.com/appwrite/appwrite/pull/9117) +* chore: fix attribute name in [9118](https://github.com/appwrite/appwrite/pull/9118) +* Migrate to redis abuse in [9124](https://github.com/appwrite/appwrite/pull/9124) +* Added webhooks usage stats in [9125](https://github.com/appwrite/appwrite/pull/9125) +* chore remove abuse cleanup in [9137](https://github.com/appwrite/appwrite/pull/9137) +* fix: remove abuse delete trigger in [9139](https://github.com/appwrite/appwrite/pull/9139) +* Remove firebase OAuth API endpoints in [9144](https://github.com/appwrite/appwrite/pull/9144) +* chore: release client sdks in [9112](https://github.com/appwrite/appwrite/pull/9112) +* Update general.php in [9155](https://github.com/appwrite/appwrite/pull/9155) +* feat(swoole): allow configuration override of available cpus in [9177](https://github.com/appwrite/appwrite/pull/9177) +* Usage databases api read writes addition in [9142](https://github.com/appwrite/appwrite/pull/9142) +* Fix dead connections in [9190](https://github.com/appwrite/appwrite/pull/9190) +* Add hostname to audits in [9165](https://github.com/appwrite/appwrite/pull/9165) +* chore: shifted authphone usage tracking to api calls in [9191](https://github.com/appwrite/appwrite/pull/9191) +* Revert "Fix dead connections" in [9201](https://github.com/appwrite/appwrite/pull/9201) +* Add assertEventually to messaging provider logs test in [9192](https://github.com/appwrite/appwrite/pull/9192) +* feat project sms usage in [9198](https://github.com/appwrite/appwrite/pull/9198) +* chore: add audit labels to project resources in [9056](https://github.com/appwrite/appwrite/pull/9056) +* fix sms usage in [9207](https://github.com/appwrite/appwrite/pull/9207) +* Update database in [9202](https://github.com/appwrite/appwrite/pull/9202) +* Fix dead connections in [9213](https://github.com/appwrite/appwrite/pull/9213) +* Revert "Fix dead connections" in [9214](https://github.com/appwrite/appwrite/pull/9214) +* Add logs db init for consistency in [9163](https://github.com/appwrite/appwrite/pull/9163) +* Split the collection definitions in [9153](https://github.com/appwrite/appwrite/pull/9153) +* Log path with populated parameters in [9220](https://github.com/appwrite/appwrite/pull/9220) +* Add missing scope on function template in [9208](https://github.com/appwrite/appwrite/pull/9208) +* Add relatedCollection default in [9225](https://github.com/appwrite/appwrite/pull/9225) +* fix: function usage in [9235](https://github.com/appwrite/appwrite/pull/9235) +* feat: optimise events payloads in [9232](https://github.com/appwrite/appwrite/pull/9232) +* Optimise webhook events in [9168](https://github.com/appwrite/appwrite/pull/9168) +* fix: maintenance job missing type in [9238](https://github.com/appwrite/appwrite/pull/9238) +* Update Fetch to 0.3.0 in [9245](https://github.com/appwrite/appwrite/pull/9245) +* Fix maintenance job in [9247](https://github.com/appwrite/appwrite/pull/9247) +* chore: add missing case for executions in [9248](https://github.com/appwrite/appwrite/pull/9248) +* Add index dependency exception in [9226](https://github.com/appwrite/appwrite/pull/9226) +* chore: fix benchmarking test when made from fork in [9233](https://github.com/appwrite/appwrite/pull/9233) +* Update SDK Generator versions in [9188](https://github.com/appwrite/appwrite/pull/9188) +* chore: skipped job instead of throwing error in [9250](https://github.com/appwrite/appwrite/pull/9250) +* Implement new SDK Class on 1.6.x in [9237](https://github.com/appwrite/appwrite/pull/9237) +* Delete collection before Appwrite's attributes in [9256](https://github.com/appwrite/appwrite/pull/9256) +* Feat batch usage dump in [9255](https://github.com/appwrite/appwrite/pull/9255) +* Fix cloud tests in [9261](https://github.com/appwrite/appwrite/pull/9261) +* Usage: Databases reads writes in [9260](https://github.com/appwrite/appwrite/pull/9260) +* Update: Latest sdk specs in [9274](https://github.com/appwrite/appwrite/pull/9274) +* Revert "Feat batch usage dump" in [9276](https://github.com/appwrite/appwrite/pull/9276) +* feat: add fast2SMS adapter in [9263](https://github.com/appwrite/appwrite/pull/9263) +* Update Sdk Generator dependency in [9280](https://github.com/appwrite/appwrite/pull/9280) +* Transformed at addition in [9281](https://github.com/appwrite/appwrite/pull/9281) +* Docs: clarify update endpoints only work on draft messages in [9236](https://github.com/appwrite/appwrite/pull/9236) +* Update sdk generator dependency in [9282](https://github.com/appwrite/appwrite/pull/9282) +* Revert "Transformed at addition" in [9284](https://github.com/appwrite/appwrite/pull/9284) +* replaced init for cloud link in [9285](https://github.com/appwrite/appwrite/pull/9285) +* Add transformed at in [9289](https://github.com/appwrite/appwrite/pull/9289) +* Make migrations use Dynamic keys for destination in [9291](https://github.com/appwrite/appwrite/pull/9291) +* Make sessions limit tests assert eventually in [9298](https://github.com/appwrite/appwrite/pull/9298) +* Chore update database in [9306](https://github.com/appwrite/appwrite/pull/9306) +* feat: add AMQP queues in [9287](https://github.com/appwrite/appwrite/pull/9287) +* fix(test): use assertEventually instead of while(true) in [9308](https://github.com/appwrite/appwrite/pull/9308) +* fix(certificate worker): events are published without queue name in [9309](https://github.com/appwrite/appwrite/pull/9309) +* chore: update utopia-php/queue to 0.8.1 in [9311](https://github.com/appwrite/appwrite/pull/9311) +* chore: update utopia-php/queue to 0.8.2 in [9312](https://github.com/appwrite/appwrite/pull/9312) +* fix(schedule-tasks): revert back to direct pool usage in [9313](https://github.com/appwrite/appwrite/pull/9313) +* feat: custom app schemes in [9262](https://github.com/appwrite/appwrite/pull/9262) +* Revert "feat: custom app schemes" in [9319](https://github.com/appwrite/appwrite/pull/9319) +* Restore "feat: custom app schemes"" in [9320](https://github.com/appwrite/appwrite/pull/9320) +* Revert "Restore "feat: custom app schemes""" in [9323](https://github.com/appwrite/appwrite/pull/9323) +* chore: update dependencies in [9330](https://github.com/appwrite/appwrite/pull/9330) +* Feat: logs DB in [9272](https://github.com/appwrite/appwrite/pull/9272) +* Catch invalid index in [9329](https://github.com/appwrite/appwrite/pull/9329) +* Fix: missing call for image transformations counting in [9342](https://github.com/appwrite/appwrite/pull/9342) +* Fix drop abuse on shared table project delete in [9346](https://github.com/appwrite/appwrite/pull/9346) +* Only run all table mode tests on db update in [9338](https://github.com/appwrite/appwrite/pull/9338) +* Fix: missing periodic metric in [9350](https://github.com/appwrite/appwrite/pull/9350) +* feat(builds): check if function is blocked before building in [9332](https://github.com/appwrite/appwrite/pull/9332) +* feat: batch create audit logs in [9347](https://github.com/appwrite/appwrite/pull/9347) +* Chore: Update migrations in [9355](https://github.com/appwrite/appwrite/pull/9355) +* Fix: metric time was not being written to DB in [9354](https://github.com/appwrite/appwrite/pull/9354) +* Fix patch index validation in [9356](https://github.com/appwrite/appwrite/pull/9356) +* Fix image trnasformation metrics in [9370](https://github.com/appwrite/appwrite/pull/9370) +* Use batch delete in worker in [9375](https://github.com/appwrite/appwrite/pull/9375) +* Fix Model Platform is missing response key: store in [9361](https://github.com/appwrite/appwrite/pull/9361) +* Feat key segmented usage in [9336](https://github.com/appwrite/appwrite/pull/9336) +* Feat messaging metrics in [9353](https://github.com/appwrite/appwrite/pull/9353) +* Fix removed audits for shared v2 in [9388](https://github.com/appwrite/appwrite/pull/9388) +* chore: bump utopia-php/image to 0.8.0 in [9390](https://github.com/appwrite/appwrite/pull/9390) +* Fix outdated CLI commands in documentation in [9122](https://github.com/appwrite/appwrite/pull/9122) +* disable logs display in [9398](https://github.com/appwrite/appwrite/pull/9398) +* Log batches per project in [9403](https://github.com/appwrite/appwrite/pull/9403) +* Batch per project in [9410](https://github.com/appwrite/appwrite/pull/9410) +* Fix: stats resources only queue projects accessed in last 3 hours in [9411](https://github.com/appwrite/appwrite/pull/9411) +* Track options requests in [9397](https://github.com/appwrite/appwrite/pull/9397) +* chore: bump docker-base in [9406](https://github.com/appwrite/appwrite/pull/9406) +* refactor: migrate Realtime::send calls to queueForRealtime in [9325](https://github.com/appwrite/appwrite/pull/9325) +* Revert "Fix: stats resources only queue projects accessed in last 3 hours" in [9424](https://github.com/appwrite/appwrite/pull/9424) +* Remove usage and usage dump in favor of stats-usage and stats-usage-dump in [9339](https://github.com/appwrite/appwrite/pull/9339) +* Fix: disable dual writing in [9429](https://github.com/appwrite/appwrite/pull/9429) +* Disable transformedAt update for console users in [9425](https://github.com/appwrite/appwrite/pull/9425) +* chore: add image transformation stats to usage endpoint in [9393](https://github.com/appwrite/appwrite/pull/9393) +* chore: added timeout to deployment builds in tests in [9426](https://github.com/appwrite/appwrite/pull/9426) +* fix: model for image transformations in usage project in [9442](https://github.com/appwrite/appwrite/pull/9442) +* Feat: calculate database storage in stats-resources in [9443](https://github.com/appwrite/appwrite/pull/9443) +* Activities batch writes in [9438](https://github.com/appwrite/appwrite/pull/9438) +* chore: bump cache 0.12.x in [9412](https://github.com/appwrite/appwrite/pull/9412) +* chore: queue console project for maintenance delete in [9479](https://github.com/appwrite/appwrite/pull/9479) +* chore: added logsdb for deletes worker in [9462](https://github.com/appwrite/appwrite/pull/9462) +* Feat: calculate and log time taken for each project in [9491](https://github.com/appwrite/appwrite/pull/9491) +* chore: update initializing dbForLogs in [9494](https://github.com/appwrite/appwrite/pull/9494) +* Feat bulk audit delete in [9487](https://github.com/appwrite/appwrite/pull/9487) +* Prepare 1.6.2 release in [9499](https://github.com/appwrite/appwrite/pull/9499) +* Regenerate specs in [9497](https://github.com/appwrite/appwrite/pull/9497) +* Regenerate examples in [9498](https://github.com/appwrite/appwrite/pull/9498) +* chore: bump sdk in [9414](https://github.com/appwrite/appwrite/pull/9414) +* update queue to 0.9.* in [9505](https://github.com/appwrite/appwrite/pull/9505) +* Feat improve delete queries in [9507](https://github.com/appwrite/appwrite/pull/9507) +* Feat: Add rule attributes in [9508](https://github.com/appwrite/appwrite/pull/9508) +* Sync main into 1.6.x in [9496](https://github.com/appwrite/appwrite/pull/9496) +* Bump console to version 5.2.53 in [9495](https://github.com/appwrite/appwrite/pull/9495) +* Prepare 1.6.1 release in [9294](https://github.com/appwrite/appwrite/pull/9294) +* Improve delete ordering in [9512](https://github.com/appwrite/appwrite/pull/9512) +* Cleanups in [9511](https://github.com/appwrite/appwrite/pull/9511) +* Feat dynamic regions in [9408](https://github.com/appwrite/appwrite/pull/9408) +* Feat env vars to system lib in [9515](https://github.com/appwrite/appwrite/pull/9515) +* Feat: domains count in [9514](https://github.com/appwrite/appwrite/pull/9514) +* Migration read from db in [9529](https://github.com/appwrite/appwrite/pull/9529) +* feat: add pool telemetry in [9530](https://github.com/appwrite/appwrite/pull/9530) +* Disable PDO persistence since we manage our own pool in [9526](https://github.com/appwrite/appwrite/pull/9526) +* chore: set min operations to 1 for reads and writes in [9536](https://github.com/appwrite/appwrite/pull/9536) +* Remove default region in [9430](https://github.com/appwrite/appwrite/pull/9430) +* Use cursor pagination with bigger limit for maintenance project loop in [9546](https://github.com/appwrite/appwrite/pull/9546) +* chore: stop tests on failure in [9525](https://github.com/appwrite/appwrite/pull/9525) +* chore: only update total count for privileged users in [9554](https://github.com/appwrite/appwrite/pull/9554) +* refactor: initialization of audit retention in [9563](https://github.com/appwrite/appwrite/pull/9563) +* Delete worker queries fixes in [9523](https://github.com/appwrite/appwrite/pull/9523) +* Bump database 0.62.x in [9568](https://github.com/appwrite/appwrite/pull/9568) +* Fix: schedules region filtering in [9577](https://github.com/appwrite/appwrite/pull/9577) +* Deletes worker fix selects for pagination in [9578](https://github.com/appwrite/appwrite/pull/9578) +* Add $permissions for delete documents selects in [9579](https://github.com/appwrite/appwrite/pull/9579) +* chore(audits): return queue pre-fetch results in [9533](https://github.com/appwrite/appwrite/pull/9533) +* Revert "chore(audits): return queue pre-fetch results" in [9586](https://github.com/appwrite/appwrite/pull/9586) +* Feat multi tenant insert in [9573](https://github.com/appwrite/appwrite/pull/9573) +* Add order by for cursor in [9588](https://github.com/appwrite/appwrite/pull/9588) +* Feat update fetch in [9592](https://github.com/appwrite/appwrite/pull/9592) +* Fix tenant casting in [9598](https://github.com/appwrite/appwrite/pull/9598) +* Feat update ws in [9602](https://github.com/appwrite/appwrite/pull/9602) +* Update database in [9603](https://github.com/appwrite/appwrite/pull/9603) +* Fix: image transformation cache in [9608](https://github.com/appwrite/appwrite/pull/9608) +* Remove audit payload in [9610](https://github.com/appwrite/appwrite/pull/9610) +* Sample rate from DSN in [9559](https://github.com/appwrite/appwrite/pull/9559) +* Restrict role change for sole org owner in [9615](https://github.com/appwrite/appwrite/pull/9615) +* chore: update php image to 0.8.1 in [9616](https://github.com/appwrite/appwrite/pull/9616) +* feat: refactor executor setup in [9420](https://github.com/appwrite/appwrite/pull/9420) +* chore: update gitpod.yml config in [9561](https://github.com/appwrite/appwrite/pull/9561) +* chore: update dependencies in [9625](https://github.com/appwrite/appwrite/pull/9625) +* Update migrations lib in [9628](https://github.com/appwrite/appwrite/pull/9628) +* feat: cache telemetry in [9624](https://github.com/appwrite/appwrite/pull/9624) +* Bump console to version 5.2.56 in [9631](https://github.com/appwrite/appwrite/pull/9631) +* Multi region support in [8667](https://github.com/appwrite/appwrite/pull/8667) +* Revert "Multi region support" in [9632](https://github.com/appwrite/appwrite/pull/9632) +* Revert "Revert "Multi region support"" in [9636](https://github.com/appwrite/appwrite/pull/9636) +* Fix tasks in [9644](https://github.com/appwrite/appwrite/pull/9644) +* chore: updated the migration version to 8.6 in [9646](https://github.com/appwrite/appwrite/pull/9646) +* Fix: merge the working of StatsUsage and StatsUsageDump in [9585](https://github.com/appwrite/appwrite/pull/9585) +* Update database in [9643](https://github.com/appwrite/appwrite/pull/9643) +* chore: fix error logging for CLI tasks in [9651](https://github.com/appwrite/appwrite/pull/9651) +* fix: usage test assertion in [9653](https://github.com/appwrite/appwrite/pull/9653) +* Fix keys in [9656](https://github.com/appwrite/appwrite/pull/9656) +* Feat: multi tenant dual writing in [9583](https://github.com/appwrite/appwrite/pull/9583) +* Fix/throwing 400 for null order attributes in [9657](https://github.com/appwrite/appwrite/pull/9657) +* feat: sdk group attribute in [9596](https://github.com/appwrite/appwrite/pull/9596) +* Add configurable function and build size in [9648](https://github.com/appwrite/appwrite/pull/9648) +* feat: update API endpoint in the code examples in [8933](https://github.com/appwrite/appwrite/pull/8933) +* chore: abstract token secret hiding to response model in [9574](https://github.com/appwrite/appwrite/pull/9574) +* chore: update sdks in [9655](https://github.com/appwrite/appwrite/pull/9655) +* feat: allow non-critical events to ignore exceptions when enqueuing the event in [9680](https://github.com/appwrite/appwrite/pull/9680) +* Revert "Add configurable function and build size" in [9681](https://github.com/appwrite/appwrite/pull/9681) +* core: introduce endpoint.docs in specs in [9685](https://github.com/appwrite/appwrite/pull/9685) +* fix: remove content-type header from get request specs in [9666](https://github.com/appwrite/appwrite/pull/9666) +* chore: update flutter sdk in [9691](https://github.com/appwrite/appwrite/pull/9691) + # Version 1.6.1 ## What's Changed diff --git a/README-CN.md b/README-CN.md index a81d99c3c3a..a9a6b3c867f 100644 --- a/README-CN.md +++ b/README-CN.md @@ -72,7 +72,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.6.2 + appwrite/appwrite:1.7.4 ``` ### Windows @@ -84,7 +84,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.6.2 + appwrite/appwrite:1.7.4 ``` #### PowerShell @@ -94,7 +94,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.6.2 + appwrite/appwrite:1.7.4 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index c3585dbb68a..88d3fe89dfe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ > [Get started with Appwrite](https://apwr.dev/appcloud) +> [Join the Init kick off event 19th of May: The future of Appwrite with Founder & CEO Eldad Fux](https://www.youtube.com/watch?v=1g8tuogsp7A)

@@ -77,7 +78,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.6.2 + appwrite/appwrite:1.7.4 ``` ### Windows @@ -89,7 +90,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.6.2 + appwrite/appwrite:1.7.4 ``` #### PowerShell @@ -99,7 +100,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.6.2 + appwrite/appwrite:1.7.4 ``` Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation. diff --git a/app/cli.php b/app/cli.php index 0f0e48bf7df..7c2daf45008 100644 --- a/app/cli.php +++ b/app/cli.php @@ -10,12 +10,15 @@ use Appwrite\Platform\Appwrite; use Appwrite\Runtimes\Runtimes; use Executor\Executor; +use Swoole\Runtime; use Swoole\Timer; +use Utopia\Cache\Adapter\Pool as CachePool; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\CLI; use Utopia\CLI\Console; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -23,6 +26,7 @@ use Utopia\Logger\Log; use Utopia\Platform\Service; use Utopia\Pools\Group; +use Utopia\Queue\Broker\Pool as BrokerPool; use Utopia\Queue\Publisher; use Utopia\Registry\Registry; use Utopia\System\System; @@ -45,10 +49,7 @@ $adapters = []; foreach ($list as $value) { - $adapters[] = $pools - ->get($value) - ->pop() - ->getResource(); + $adapters[] = new CachePool($pools->get($value)); } return new Cache(new Sharding($adapters)); @@ -68,12 +69,8 @@ $attempts++; try { // Prepare database connection - $dbAdapter = $pools - ->get('console') - ->pop() - ->getResource(); - - $dbForPlatform = new Database($dbAdapter, $cache); + $adapter = new DatabasePool($pools->get('console')); + $dbForPlatform = new Database($adapter, $cache); $dbForPlatform ->setNamespace('_console') @@ -91,7 +88,6 @@ $ready = true; } catch (\Throwable $err) { Console::warning($err->getMessage()); - $pools->get('console')->reclaim(); sleep($sleep); } } while ($attempts < $maxAttempts && !$ready); @@ -141,12 +137,8 @@ return $database; } - $dbAdapter = $pools - ->get($dsn->getHost()) - ->pop() - ->getResource(); - - $database = new Database($dbAdapter, $cache); + $adapter = new DatabasePool($pools->get($dsn->getHost())); + $database = new Database($adapter, $cache); $databases[$dsn->getHost()] = $database; $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); @@ -172,21 +164,15 @@ CLI::setResource('getLogsDB', function (Group $pools, Cache $cache) { $database = null; + return function (?Document $project = null) use ($pools, $cache, $database) { if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') { $database->setTenant($project->getInternalId()); return $database; } - $dbAdapter = $pools - ->get('logs') - ->pop() - ->getResource(); - - $database = new Database( - $dbAdapter, - $cache - ); + $adapter = new DatabasePool($pools->get('logs')); + $database = new Database($adapter, $cache); $database ->setSharedTables(true) @@ -210,7 +196,7 @@ return new StatsResources($publisher); }, ['publisher']); CLI::setResource('publisher', function (Group $pools) { - return $pools->get('publisher')->pop()->getResource(); + return new BrokerPool(publisher: $pools->get('publisher')); }, ['pools']); CLI::setResource('queueForFunctions', function (Publisher $publisher) { return new Func($publisher); @@ -298,4 +284,5 @@ $cli->shutdown()->action(fn () => Timer::clearAll()); +Runtime::enableCoroutine(SWOOLE_HOOK_ALL); run($cli->run(...)); diff --git a/app/config/collections/common.php b/app/config/collections/common.php index e77d5403d21..6de7eb224bc 100644 --- a/app/config/collections/common.php +++ b/app/config/collections/common.php @@ -1439,13 +1439,6 @@ 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], - [ - '$id' => ID::custom('_key_roles'), - 'type' => Database::INDEX_KEY, - 'attributes' => ['roles'], - 'lengths' => [128], - 'orders' => [], - ], ], ], diff --git a/app/config/errors.php b/app/config/errors.php index 6d9d29a8ead..8365e8c7056 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -393,6 +393,16 @@ 'description' => 'Membership is already confirmed.', 'code' => 409, ], + Exception::MEMBERSHIP_DELETION_PROHIBITED => [ + 'name' => Exception::MEMBERSHIP_DELETION_PROHIBITED, + 'description' => 'Membership deletion is prohibited.', + 'code' => 400, + ], + Exception::MEMBERSHIP_DOWNGRADE_PROHIBITED => [ + 'name' => Exception::MEMBERSHIP_DOWNGRADE_PROHIBITED, + 'description' => 'Membership role downgrade is prohibited.', + 'code' => 400, + ], /** Avatars */ Exception::AVATAR_SET_NOT_FOUND => [ diff --git a/app/config/platforms.php b/app/config/platforms.php index 0bfc736119a..7d481d508e5 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -11,7 +11,7 @@ [ 'key' => 'web', 'name' => 'Web', - 'version' => '17.1.0', + 'version' => '18.1.0', 'url' => 'https://github.com/appwrite/sdk-for-web', 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, @@ -59,7 +59,7 @@ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '15.1.0', + 'version' => '16.1.0', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -77,7 +77,7 @@ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '9.1.0', + 'version' => '10.1.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -112,7 +112,7 @@ [ 'key' => 'android', 'name' => 'Android', - 'version' => '7.1.0', + 'version' => '8.1.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -134,7 +134,7 @@ [ 'key' => 'react-native', 'name' => 'React Native', - 'version' => '0.8.0', + 'version' => '0.9.1', 'url' => 'https://github.com/appwrite/sdk-for-react-native', 'package' => 'https://npmjs.com/package/react-native-appwrite', 'enabled' => true, @@ -199,7 +199,7 @@ [ 'key' => 'web', 'name' => 'Console', - 'version' => '1.3.0', + 'version' => '1.7.0', 'url' => 'https://github.com/appwrite/sdk-for-console', 'package' => '', 'enabled' => true, @@ -217,7 +217,7 @@ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '6.2.3', + 'version' => '7.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -245,7 +245,7 @@ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '16.2.0', + 'version' => '17.0.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -263,7 +263,7 @@ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '14.2.0', + 'version' => '15.0.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -281,7 +281,7 @@ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '14.2.0', + 'version' => '15.0.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -299,7 +299,7 @@ [ 'key' => 'python', 'name' => 'Python', - 'version' => '10.2.0', + 'version' => '11.0.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -317,7 +317,7 @@ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '15.2.0', + 'version' => '16.0.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -335,7 +335,7 @@ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.7.0', + 'version' => '0.8.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -353,7 +353,7 @@ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.14.0', + 'version' => '0.13.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -371,7 +371,7 @@ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '15.2.0', + 'version' => '16.0.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -389,7 +389,7 @@ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '8.2.0', + 'version' => '9.0.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -411,7 +411,7 @@ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '9.2.0', + 'version' => '10.0.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index 92e64c7ba04..bbb78c6c667 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4660,6 +4660,115 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + } + } + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -4781,7 +4890,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -4865,7 +4974,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -4940,7 +5049,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -5055,7 +5164,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5238,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -5181,7 +5290,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -5233,7 +5342,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5285,7 +5394,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5337,7 +5446,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -5389,7 +5498,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5441,7 +5550,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5493,7 +5602,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5654,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -5597,7 +5706,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -5649,7 +5758,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5732,7 +5841,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -5807,7 +5916,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -5893,7 +6002,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -5991,7 +6100,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -6063,7 +6172,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6152,7 +6261,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6219,7 +6328,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -6297,7 +6406,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6524,7 +6633,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -6609,7 +6718,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -6685,7 +6794,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6770,7 +6879,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6832,7 +6941,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -6906,7 +7015,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -6970,7 +7079,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7056,7 +7165,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7167,7 +7276,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7239,7 +7348,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7326,7 +7435,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -7400,7 +7509,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -7498,7 +7607,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7559,7 +7668,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -9752,6 +9861,12 @@ "name": "X-Appwrite-Session", "description": "The user session to authenticate with", "in": "header" + }, + "DevKey": { + "type": "apiKey", + "name": "X-Appwrite-Dev-Key", + "description": "Your secret dev API key", + "in": "header" } } }, diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 31d5016e85c..90ef137fc26 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 431, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -4694,7 +4694,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -8167,7 +8167,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8227,7 +8227,10 @@ "type": "object" } } - } + }, + "required": [ + "documents" + ] } } } @@ -8255,7 +8258,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -8348,7 +8351,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8511,6 +8514,115 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + } + } + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8632,7 +8744,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9253,7 +9365,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -9418,7 +9530,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -9500,7 +9612,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -9573,7 +9685,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9804,7 +9916,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9853,7 +9965,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9903,7 +10015,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 401, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -10003,7 +10115,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 400, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -10063,7 +10175,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -10135,7 +10247,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -10194,7 +10306,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -10422,7 +10534,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -10483,7 +10595,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10563,7 +10675,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10646,7 +10758,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -10742,7 +10854,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10827,7 +10939,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10930,7 +11042,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11027,7 +11139,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -11089,7 +11201,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -11153,7 +11265,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -11243,7 +11355,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11314,7 +11426,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11389,7 +11501,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11504,7 +11616,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11569,7 +11681,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11640,7 +11752,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11722,7 +11834,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11781,7 +11893,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11872,7 +11984,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -11941,7 +12053,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12032,7 +12144,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12215,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -12155,7 +12267,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -12207,7 +12319,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12256,7 +12368,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -12305,7 +12417,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12354,7 +12466,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12414,7 +12526,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12463,7 +12575,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12512,7 +12624,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12574,7 +12686,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12636,7 +12748,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12709,7 +12821,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12771,7 +12883,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -12859,7 +12971,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12921,7 +13033,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12983,7 +13095,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13045,7 +13157,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -13107,7 +13219,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13169,7 +13281,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13231,7 +13343,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13293,7 +13405,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -13355,7 +13467,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -13404,7 +13516,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -13453,7 +13565,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -13502,7 +13614,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13554,7 +13666,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13606,7 +13718,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -13658,7 +13770,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13710,7 +13822,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13762,7 +13874,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13814,7 +13926,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -13866,7 +13978,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -13918,7 +14030,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -13994,7 +14106,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14138,7 +14250,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14284,7 +14396,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14458,7 +14570,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +14748,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14745,7 +14857,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14857,7 +14969,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14910,7 +15022,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -14972,7 +15084,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15047,7 +15159,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15122,7 +15234,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -15198,7 +15310,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -15303,7 +15415,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -15411,7 +15523,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -15496,7 +15608,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -15584,7 +15696,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -15699,7 +15811,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -15817,7 +15929,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -15912,7 +16024,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -16010,7 +16122,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -16115,7 +16227,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -16223,7 +16335,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -16366,7 +16478,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -16511,7 +16623,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -16606,7 +16718,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -16704,7 +16816,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -16799,7 +16911,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -16897,7 +17009,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -16992,7 +17104,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -17090,7 +17202,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17185,7 +17297,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17283,7 +17395,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -17336,7 +17448,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -17398,7 +17510,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -17473,7 +17585,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -17548,7 +17660,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -17622,7 +17734,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -17705,7 +17817,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -17765,7 +17877,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -17842,7 +17954,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -17904,7 +18016,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -17979,7 +18091,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -18063,7 +18175,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -18153,7 +18265,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -18216,7 +18328,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -18291,7 +18403,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18365,7 +18477,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18453,7 +18565,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -18546,7 +18658,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18625,7 +18737,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18701,7 +18813,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -18773,7 +18885,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18884,7 +18996,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -19017,7 +19129,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -19122,7 +19234,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -19246,7 +19358,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -19304,7 +19416,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -19355,7 +19467,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 320, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -19415,7 +19527,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19503,7 +19615,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19549,7 +19661,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19627,7 +19739,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19685,7 +19797,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -19765,7 +19877,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -19825,7 +19937,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19897,7 +20009,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20031,7 +20143,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20089,7 +20201,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20204,7 +20316,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -20264,7 +20376,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 160, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20356,7 +20468,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20435,7 +20547,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20514,7 +20626,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20593,7 +20705,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20672,7 +20784,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20763,7 +20875,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -20845,7 +20957,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20924,7 +21036,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21003,7 +21115,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21082,7 +21194,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21161,7 +21273,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21261,7 +21373,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -21329,7 +21441,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -21414,7 +21526,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -21482,7 +21594,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -21568,7 +21680,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -21638,7 +21750,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21725,7 +21837,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21783,7 +21895,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21876,7 +21988,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21944,7 +22056,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -22038,7 +22150,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22108,7 +22220,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +22358,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22304,7 +22416,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22423,7 +22535,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22491,7 +22603,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22586,7 +22698,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22656,7 +22768,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -22757,7 +22869,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -22836,7 +22948,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -22954,7 +23066,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23085,7 +23197,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -23164,7 +23276,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23388,7 +23500,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23652,7 +23764,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -23878,7 +23990,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24099,7 +24211,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24339,7 +24451,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24562,7 +24674,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24620,7 +24732,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24735,7 +24847,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -24803,7 +24915,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -24919,7 +25031,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -24989,7 +25101,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -25059,7 +25171,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -25133,7 +25245,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 432, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -25200,7 +25312,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 434, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -25278,7 +25390,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 435, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -25370,7 +25482,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 433, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -25448,7 +25560,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -25499,7 +25611,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -25559,7 +25671,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -25619,7 +25731,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -25689,7 +25801,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -25936,7 +26048,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -25985,7 +26097,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -26035,7 +26147,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 426, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -26135,7 +26247,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 427, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -26195,7 +26307,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 428, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -26267,7 +26379,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -26326,7 +26438,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -26569,7 +26681,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -26630,7 +26742,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -26710,7 +26822,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -26793,7 +26905,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -26894,7 +27006,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26974,7 +27086,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -27077,7 +27189,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -27175,7 +27287,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -27237,7 +27349,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -27301,7 +27413,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -27391,7 +27503,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -27462,7 +27574,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -27533,7 +27645,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -27595,7 +27707,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -27666,7 +27778,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 429, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -27748,7 +27860,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -27807,7 +27919,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -27898,7 +28010,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -27967,7 +28079,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -28058,7 +28170,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -28129,7 +28241,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -28202,7 +28314,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -28329,7 +28441,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -28388,7 +28500,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -28512,7 +28624,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -28573,7 +28685,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -28659,7 +28771,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -28757,7 +28869,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -28829,7 +28941,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -28918,7 +29030,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -28985,7 +29097,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -29063,7 +29175,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -29290,7 +29402,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -29375,7 +29487,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -29447,7 +29559,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -29529,7 +29641,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -29605,7 +29717,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -29690,7 +29802,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -29752,7 +29864,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -29826,7 +29938,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -29890,7 +30002,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -29963,7 +30075,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -30049,7 +30161,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -30160,7 +30272,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -30232,7 +30344,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -30319,7 +30431,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -30393,7 +30505,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -30490,7 +30602,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -30550,7 +30662,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -30631,7 +30743,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -30695,7 +30807,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -30711,12 +30823,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -30800,7 +30912,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -30860,7 +30972,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -30930,7 +31042,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -30992,7 +31104,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -31065,7 +31177,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -31153,7 +31265,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31238,7 +31350,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -31323,7 +31435,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -31391,7 +31503,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -31452,7 +31564,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -31537,7 +31649,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -31622,7 +31734,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31737,7 +31849,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -31840,7 +31952,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -31945,7 +32057,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 277, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -32017,7 +32129,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -32069,7 +32181,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -32130,7 +32242,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -32210,7 +32322,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -32292,7 +32404,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -32375,7 +32487,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -32449,7 +32561,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -32534,7 +32646,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -32607,7 +32719,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -32683,7 +32795,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -32744,7 +32856,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -32803,7 +32915,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -32862,7 +32974,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -32923,7 +33035,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -33003,7 +33115,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -33083,7 +33195,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -33163,7 +33275,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -33222,7 +33334,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -33302,7 +33414,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -33361,7 +33473,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -33413,7 +33525,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -33467,7 +33579,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -33538,7 +33650,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -33618,7 +33730,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -33691,7 +33803,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -33801,7 +33913,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -33871,7 +33983,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -33960,7 +34072,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -34032,7 +34144,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -34114,7 +34226,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -34194,7 +34306,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -34274,7 +34386,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -34370,7 +34482,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -34455,7 +34567,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -34540,7 +34652,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -34610,7 +34722,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34680,7 +34792,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -34754,7 +34866,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -34843,7 +34955,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -34917,7 +35029,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -34968,7 +35080,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index ac1c26d5b61..1ae93288643 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7650,7 +7650,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -7711,7 +7711,10 @@ "type": "object" } } - } + }, + "required": [ + "documents" + ] } } } @@ -7739,7 +7742,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -7833,7 +7836,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -7999,6 +8002,117 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + } + } + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8122,7 +8236,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -8573,7 +8687,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -8647,7 +8761,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -8879,7 +8993,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -8929,7 +9043,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -8980,7 +9094,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9040,7 +9154,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -9269,7 +9383,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -9331,7 +9445,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9412,7 +9526,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9496,7 +9610,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -9593,7 +9707,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9679,7 +9793,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -9783,7 +9897,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -9881,7 +9995,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9944,7 +10058,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10009,7 +10123,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -10100,7 +10214,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10172,7 +10286,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10249,7 +10363,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10366,7 +10480,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10433,7 +10547,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -10505,7 +10619,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -10565,7 +10679,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -10657,7 +10771,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -10727,7 +10841,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -10819,7 +10933,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -10891,7 +11005,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -10945,7 +11059,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -10999,7 +11113,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11049,7 +11163,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -11099,7 +11213,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11149,7 +11263,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11210,7 +11324,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11260,7 +11374,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11310,7 +11424,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11373,7 +11487,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11436,7 +11550,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11510,7 +11624,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11573,7 +11687,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -11662,7 +11776,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11725,7 +11839,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11788,7 +11902,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11851,7 +11965,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11914,7 +12028,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11977,7 +12091,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12040,7 +12154,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12217,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12166,7 +12280,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12216,7 +12330,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12266,7 +12380,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12316,7 +12430,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12370,7 +12484,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12424,7 +12538,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12478,7 +12592,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12532,7 +12646,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12586,7 +12700,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12640,7 +12754,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -12694,7 +12808,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12748,7 +12862,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -12825,7 +12939,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -12970,7 +13084,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -13117,7 +13231,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -13292,7 +13406,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -13471,7 +13585,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13581,7 +13695,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -13694,7 +13808,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13748,7 +13862,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -13811,7 +13925,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13887,7 +14001,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13963,7 +14077,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -14040,7 +14154,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -14146,7 +14260,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -14255,7 +14369,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -14341,7 +14455,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -14430,7 +14544,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14546,7 +14660,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -14665,7 +14779,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -14761,7 +14875,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -14860,7 +14974,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -14966,7 +15080,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -15075,7 +15189,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -15219,7 +15333,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -15365,7 +15479,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -15461,7 +15575,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -15560,7 +15674,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -15656,7 +15770,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -15755,7 +15869,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -15851,7 +15965,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -15950,7 +16064,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -16046,7 +16160,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -16145,7 +16259,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -16199,7 +16313,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -16262,7 +16376,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -16338,7 +16452,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16414,7 +16528,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16489,7 +16603,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16573,7 +16687,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -16634,7 +16748,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -16712,7 +16826,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -16775,7 +16889,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -16851,7 +16965,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16936,7 +17050,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -17028,7 +17142,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -17092,7 +17206,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -17169,7 +17283,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -17240,7 +17354,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -17488,7 +17602,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -17538,7 +17652,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -17589,7 +17703,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -17649,7 +17763,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +18007,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -17955,7 +18069,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18036,7 +18150,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -18120,7 +18234,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -18222,7 +18336,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -18303,7 +18417,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -18407,7 +18521,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18506,7 +18620,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -18569,7 +18683,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -18634,7 +18748,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -18725,7 +18839,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -18797,7 +18911,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -18869,7 +18983,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -18932,7 +19046,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -19004,7 +19118,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -19064,7 +19178,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -19156,7 +19270,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -19226,7 +19340,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -19318,7 +19432,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -19390,7 +19504,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -19464,7 +19578,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -19592,7 +19706,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19652,7 +19766,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -19777,7 +19891,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -19839,7 +19953,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -19927,7 +20041,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -20027,7 +20141,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -20101,7 +20215,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -20192,7 +20306,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20261,7 +20375,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -20341,7 +20455,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -20570,7 +20684,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -20657,7 +20771,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -20735,7 +20849,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -20822,7 +20936,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -20886,7 +21000,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -20962,7 +21076,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -21028,7 +21142,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -21116,7 +21230,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -21229,7 +21343,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -21303,7 +21417,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -21392,7 +21506,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -21468,7 +21582,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -21567,7 +21681,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -21629,7 +21743,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -21712,7 +21826,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -21777,7 +21891,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -21793,12 +21907,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21883,7 +21997,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -21944,7 +22058,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -22015,7 +22129,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -22078,7 +22192,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22152,7 +22266,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -22241,7 +22355,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -22327,7 +22441,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -22413,7 +22527,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -22482,7 +22596,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22544,7 +22658,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -22630,7 +22744,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -22716,7 +22830,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22832,7 +22946,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -22936,7 +23050,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -23042,7 +23156,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -23095,7 +23209,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -23157,7 +23271,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -23238,7 +23352,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -23321,7 +23435,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -23405,7 +23519,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -23480,7 +23594,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -23566,7 +23680,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23640,7 +23754,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -23717,7 +23831,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23779,7 +23893,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -23839,7 +23953,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -23899,7 +24013,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -23961,7 +24075,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -24042,7 +24156,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -24123,7 +24237,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24204,7 +24318,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -24264,7 +24378,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -24345,7 +24459,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -24405,7 +24519,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -24458,7 +24572,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -24513,7 +24627,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -24585,7 +24699,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -24666,7 +24780,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -24740,7 +24854,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -24851,7 +24965,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -24922,7 +25036,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -25012,7 +25126,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -25085,7 +25199,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -25168,7 +25282,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -25249,7 +25363,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 92e64c7ba04..bbb78c6c667 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4660,6 +4660,115 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + } + } + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -4781,7 +4890,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -4865,7 +4974,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -4940,7 +5049,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -5055,7 +5164,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5238,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -5181,7 +5290,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -5233,7 +5342,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5285,7 +5394,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5337,7 +5446,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -5389,7 +5498,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5441,7 +5550,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5493,7 +5602,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5654,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -5597,7 +5706,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -5649,7 +5758,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5732,7 +5841,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -5807,7 +5916,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -5893,7 +6002,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -5991,7 +6100,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -6063,7 +6172,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6152,7 +6261,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6219,7 +6328,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -6297,7 +6406,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6524,7 +6633,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -6609,7 +6718,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -6685,7 +6794,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6770,7 +6879,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6832,7 +6941,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -6906,7 +7015,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -6970,7 +7079,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7056,7 +7165,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7167,7 +7276,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7239,7 +7348,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7326,7 +7435,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -7400,7 +7509,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -7498,7 +7607,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7559,7 +7668,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -9752,6 +9861,12 @@ "name": "X-Appwrite-Session", "description": "The user session to authenticate with", "in": "header" + }, + "DevKey": { + "type": "apiKey", + "name": "X-Appwrite-Dev-Key", + "description": "Your secret dev API key", + "in": "header" } } }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 31d5016e85c..90ef137fc26 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 431, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -4694,7 +4694,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -8167,7 +8167,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8227,7 +8227,10 @@ "type": "object" } } - } + }, + "required": [ + "documents" + ] } } } @@ -8255,7 +8258,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -8348,7 +8351,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8511,6 +8514,115 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + } + } + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8632,7 +8744,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9253,7 +9365,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -9418,7 +9530,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -9500,7 +9612,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -9573,7 +9685,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9804,7 +9916,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9853,7 +9965,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9903,7 +10015,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 401, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -10003,7 +10115,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 400, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -10063,7 +10175,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -10135,7 +10247,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -10194,7 +10306,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -10422,7 +10534,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -10483,7 +10595,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10563,7 +10675,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10646,7 +10758,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -10742,7 +10854,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10827,7 +10939,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10930,7 +11042,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11027,7 +11139,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -11089,7 +11201,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -11153,7 +11265,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -11243,7 +11355,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11314,7 +11426,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11389,7 +11501,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11504,7 +11616,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11569,7 +11681,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11640,7 +11752,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11722,7 +11834,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11781,7 +11893,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11872,7 +11984,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -11941,7 +12053,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12032,7 +12144,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12215,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -12155,7 +12267,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -12207,7 +12319,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12256,7 +12368,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -12305,7 +12417,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12354,7 +12466,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12414,7 +12526,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12463,7 +12575,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12512,7 +12624,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12574,7 +12686,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12636,7 +12748,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12709,7 +12821,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12771,7 +12883,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -12859,7 +12971,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12921,7 +13033,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12983,7 +13095,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13045,7 +13157,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -13107,7 +13219,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13169,7 +13281,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13231,7 +13343,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13293,7 +13405,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -13355,7 +13467,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -13404,7 +13516,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -13453,7 +13565,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -13502,7 +13614,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13554,7 +13666,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13606,7 +13718,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -13658,7 +13770,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13710,7 +13822,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13762,7 +13874,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13814,7 +13926,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -13866,7 +13978,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -13918,7 +14030,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -13994,7 +14106,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14138,7 +14250,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14284,7 +14396,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14458,7 +14570,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +14748,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14745,7 +14857,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14857,7 +14969,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14910,7 +15022,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -14972,7 +15084,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15047,7 +15159,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15122,7 +15234,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -15198,7 +15310,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -15303,7 +15415,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -15411,7 +15523,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -15496,7 +15608,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -15584,7 +15696,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -15699,7 +15811,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -15817,7 +15929,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -15912,7 +16024,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -16010,7 +16122,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -16115,7 +16227,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -16223,7 +16335,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -16366,7 +16478,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -16511,7 +16623,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -16606,7 +16718,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -16704,7 +16816,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -16799,7 +16911,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -16897,7 +17009,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -16992,7 +17104,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -17090,7 +17202,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17185,7 +17297,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17283,7 +17395,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -17336,7 +17448,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -17398,7 +17510,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -17473,7 +17585,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -17548,7 +17660,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -17622,7 +17734,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -17705,7 +17817,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -17765,7 +17877,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -17842,7 +17954,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -17904,7 +18016,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -17979,7 +18091,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -18063,7 +18175,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -18153,7 +18265,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -18216,7 +18328,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -18291,7 +18403,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18365,7 +18477,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18453,7 +18565,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -18546,7 +18658,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18625,7 +18737,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18701,7 +18813,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -18773,7 +18885,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18884,7 +18996,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -19017,7 +19129,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -19122,7 +19234,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -19246,7 +19358,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -19304,7 +19416,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -19355,7 +19467,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 320, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -19415,7 +19527,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19503,7 +19615,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19549,7 +19661,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19627,7 +19739,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19685,7 +19797,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -19765,7 +19877,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -19825,7 +19937,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19897,7 +20009,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20031,7 +20143,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20089,7 +20201,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20204,7 +20316,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -20264,7 +20376,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 160, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20356,7 +20468,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20435,7 +20547,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20514,7 +20626,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20593,7 +20705,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20672,7 +20784,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20763,7 +20875,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -20845,7 +20957,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20924,7 +21036,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21003,7 +21115,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21082,7 +21194,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21161,7 +21273,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21261,7 +21373,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -21329,7 +21441,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -21414,7 +21526,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -21482,7 +21594,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -21568,7 +21680,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -21638,7 +21750,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21725,7 +21837,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21783,7 +21895,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21876,7 +21988,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21944,7 +22056,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -22038,7 +22150,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22108,7 +22220,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +22358,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22304,7 +22416,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22423,7 +22535,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22491,7 +22603,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22586,7 +22698,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22656,7 +22768,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -22757,7 +22869,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -22836,7 +22948,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -22954,7 +23066,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23085,7 +23197,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -23164,7 +23276,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23388,7 +23500,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23652,7 +23764,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -23878,7 +23990,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24099,7 +24211,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24339,7 +24451,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24562,7 +24674,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24620,7 +24732,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24735,7 +24847,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -24803,7 +24915,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -24919,7 +25031,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -24989,7 +25101,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -25059,7 +25171,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -25133,7 +25245,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 432, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -25200,7 +25312,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 434, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -25278,7 +25390,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 435, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -25370,7 +25482,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 433, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -25448,7 +25560,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -25499,7 +25611,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -25559,7 +25671,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -25619,7 +25731,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -25689,7 +25801,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -25936,7 +26048,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -25985,7 +26097,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -26035,7 +26147,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 426, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -26135,7 +26247,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 427, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -26195,7 +26307,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 428, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -26267,7 +26379,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -26326,7 +26438,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -26569,7 +26681,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -26630,7 +26742,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -26710,7 +26822,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -26793,7 +26905,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -26894,7 +27006,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26974,7 +27086,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -27077,7 +27189,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -27175,7 +27287,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -27237,7 +27349,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -27301,7 +27413,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -27391,7 +27503,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -27462,7 +27574,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -27533,7 +27645,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -27595,7 +27707,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -27666,7 +27778,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 429, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -27748,7 +27860,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -27807,7 +27919,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -27898,7 +28010,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -27967,7 +28079,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -28058,7 +28170,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -28129,7 +28241,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -28202,7 +28314,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -28329,7 +28441,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -28388,7 +28500,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -28512,7 +28624,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -28573,7 +28685,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -28659,7 +28771,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -28757,7 +28869,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -28829,7 +28941,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -28918,7 +29030,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -28985,7 +29097,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -29063,7 +29175,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -29290,7 +29402,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -29375,7 +29487,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -29447,7 +29559,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -29529,7 +29641,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -29605,7 +29717,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -29690,7 +29802,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -29752,7 +29864,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -29826,7 +29938,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -29890,7 +30002,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -29963,7 +30075,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -30049,7 +30161,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -30160,7 +30272,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -30232,7 +30344,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -30319,7 +30431,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -30393,7 +30505,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -30490,7 +30602,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -30550,7 +30662,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -30631,7 +30743,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -30695,7 +30807,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -30711,12 +30823,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -30800,7 +30912,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -30860,7 +30972,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -30930,7 +31042,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -30992,7 +31104,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -31065,7 +31177,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -31153,7 +31265,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31238,7 +31350,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -31323,7 +31435,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -31391,7 +31503,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -31452,7 +31564,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -31537,7 +31649,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -31622,7 +31734,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31737,7 +31849,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -31840,7 +31952,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -31945,7 +32057,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 277, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -32017,7 +32129,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -32069,7 +32181,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -32130,7 +32242,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -32210,7 +32322,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -32292,7 +32404,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -32375,7 +32487,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -32449,7 +32561,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -32534,7 +32646,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -32607,7 +32719,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -32683,7 +32795,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -32744,7 +32856,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -32803,7 +32915,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -32862,7 +32974,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -32923,7 +33035,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -33003,7 +33115,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -33083,7 +33195,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -33163,7 +33275,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -33222,7 +33334,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -33302,7 +33414,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -33361,7 +33473,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -33413,7 +33525,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -33467,7 +33579,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -33538,7 +33650,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -33618,7 +33730,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -33691,7 +33803,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -33801,7 +33913,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -33871,7 +33983,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -33960,7 +34072,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -34032,7 +34144,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -34114,7 +34226,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -34194,7 +34306,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -34274,7 +34386,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -34370,7 +34482,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -34455,7 +34567,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -34540,7 +34652,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -34610,7 +34722,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34680,7 +34792,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -34754,7 +34866,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -34843,7 +34955,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -34917,7 +35029,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -34968,7 +35080,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index ac1c26d5b61..1ae93288643 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7650,7 +7650,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -7711,7 +7711,10 @@ "type": "object" } } - } + }, + "required": [ + "documents" + ] } } } @@ -7739,7 +7742,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -7833,7 +7836,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -7999,6 +8002,117 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/document" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + } + } + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8122,7 +8236,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -8573,7 +8687,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -8647,7 +8761,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -8879,7 +8993,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -8929,7 +9043,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -8980,7 +9094,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9040,7 +9154,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -9269,7 +9383,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -9331,7 +9445,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9412,7 +9526,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9496,7 +9610,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -9593,7 +9707,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9679,7 +9793,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -9783,7 +9897,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -9881,7 +9995,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9944,7 +10058,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10009,7 +10123,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -10100,7 +10214,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10172,7 +10286,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10249,7 +10363,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10366,7 +10480,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10433,7 +10547,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -10505,7 +10619,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -10565,7 +10679,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -10657,7 +10771,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -10727,7 +10841,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -10819,7 +10933,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -10891,7 +11005,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -10945,7 +11059,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -10999,7 +11113,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11049,7 +11163,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -11099,7 +11213,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11149,7 +11263,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11210,7 +11324,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11260,7 +11374,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11310,7 +11424,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11373,7 +11487,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11436,7 +11550,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11510,7 +11624,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11573,7 +11687,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -11662,7 +11776,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11725,7 +11839,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11788,7 +11902,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11851,7 +11965,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11914,7 +12028,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11977,7 +12091,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12040,7 +12154,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12217,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12166,7 +12280,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12216,7 +12330,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12266,7 +12380,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12316,7 +12430,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12370,7 +12484,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12424,7 +12538,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12478,7 +12592,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12532,7 +12646,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12586,7 +12700,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12640,7 +12754,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -12694,7 +12808,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12748,7 +12862,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -12825,7 +12939,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -12970,7 +13084,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -13117,7 +13231,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -13292,7 +13406,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -13471,7 +13585,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13581,7 +13695,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -13694,7 +13808,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13748,7 +13862,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -13811,7 +13925,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13887,7 +14001,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13963,7 +14077,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -14040,7 +14154,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -14146,7 +14260,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -14255,7 +14369,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -14341,7 +14455,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -14430,7 +14544,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14546,7 +14660,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -14665,7 +14779,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -14761,7 +14875,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -14860,7 +14974,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -14966,7 +15080,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -15075,7 +15189,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -15219,7 +15333,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -15365,7 +15479,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -15461,7 +15575,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -15560,7 +15674,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -15656,7 +15770,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -15755,7 +15869,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -15851,7 +15965,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -15950,7 +16064,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -16046,7 +16160,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -16145,7 +16259,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -16199,7 +16313,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -16262,7 +16376,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -16338,7 +16452,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16414,7 +16528,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16489,7 +16603,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16573,7 +16687,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -16634,7 +16748,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -16712,7 +16826,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -16775,7 +16889,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -16851,7 +16965,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16936,7 +17050,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -17028,7 +17142,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -17092,7 +17206,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -17169,7 +17283,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -17240,7 +17354,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -17488,7 +17602,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -17538,7 +17652,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -17589,7 +17703,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -17649,7 +17763,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +18007,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -17955,7 +18069,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18036,7 +18150,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -18120,7 +18234,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -18222,7 +18336,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -18303,7 +18417,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -18407,7 +18521,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18506,7 +18620,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -18569,7 +18683,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -18634,7 +18748,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -18725,7 +18839,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -18797,7 +18911,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -18869,7 +18983,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -18932,7 +19046,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -19004,7 +19118,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -19064,7 +19178,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -19156,7 +19270,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -19226,7 +19340,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -19318,7 +19432,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -19390,7 +19504,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -19464,7 +19578,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -19592,7 +19706,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19652,7 +19766,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -19777,7 +19891,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -19839,7 +19953,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -19927,7 +20041,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -20027,7 +20141,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -20101,7 +20215,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -20192,7 +20306,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20261,7 +20375,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -20341,7 +20455,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -20570,7 +20684,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -20657,7 +20771,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -20735,7 +20849,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -20822,7 +20936,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -20886,7 +21000,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -20962,7 +21076,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -21028,7 +21142,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -21116,7 +21230,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -21229,7 +21343,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -21303,7 +21417,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -21392,7 +21506,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -21468,7 +21582,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -21567,7 +21681,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -21629,7 +21743,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -21712,7 +21826,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -21777,7 +21891,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -21793,12 +21907,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -21883,7 +21997,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -21944,7 +22058,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -22015,7 +22129,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -22078,7 +22192,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22152,7 +22266,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -22241,7 +22355,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -22327,7 +22441,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -22413,7 +22527,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -22482,7 +22596,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22544,7 +22658,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -22630,7 +22744,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -22716,7 +22830,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22832,7 +22946,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -22936,7 +23050,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -23042,7 +23156,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -23095,7 +23209,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -23157,7 +23271,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -23238,7 +23352,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -23321,7 +23435,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -23405,7 +23519,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -23480,7 +23594,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -23566,7 +23680,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23640,7 +23754,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -23717,7 +23831,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23779,7 +23893,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -23839,7 +23953,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -23899,7 +24013,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -23961,7 +24075,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -24042,7 +24156,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -24123,7 +24237,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24204,7 +24318,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -24264,7 +24378,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -24345,7 +24459,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -24405,7 +24519,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -24458,7 +24572,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -24513,7 +24627,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -24585,7 +24699,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -24666,7 +24780,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -24740,7 +24854,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -24851,7 +24965,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -24922,7 +25036,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -25012,7 +25126,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -25085,7 +25199,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -25168,7 +25282,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -25249,7 +25363,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index 9bfe261df1c..92132151b43 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -61,6 +61,12 @@ "name": "X-Appwrite-Session", "description": "The user session to authenticate with", "in": "header" + }, + "DevKey": { + "type": "apiKey", + "name": "X-Appwrite-Dev-Key", + "description": "Your secret dev API key", + "in": "header" } }, "paths": { @@ -4791,6 +4797,111 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + ] + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -4912,7 +5023,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -4990,7 +5101,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -5064,7 +5175,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -5181,7 +5292,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -5253,7 +5364,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -5327,7 +5438,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -5399,7 +5510,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5451,7 +5562,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5503,7 +5614,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -5555,7 +5666,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5607,7 +5718,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5659,7 +5770,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5711,7 +5822,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -5763,7 +5874,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -5817,7 +5928,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5902,7 +6013,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -5973,7 +6084,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -6056,7 +6167,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -6146,7 +6257,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -6216,7 +6327,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6305,7 +6416,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6375,7 +6486,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -6454,7 +6565,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6660,7 +6771,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -6739,7 +6850,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -6814,7 +6925,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6904,7 +7015,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6966,7 +7077,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7041,7 +7152,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7103,7 +7214,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7186,7 +7297,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7299,7 +7410,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7369,7 +7480,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7455,7 +7566,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -7527,7 +7638,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -7621,7 +7732,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7682,7 +7793,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index d7f8a4c9d15..e53a0dfb0bc 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4527,7 +4527,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -4590,7 +4590,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 431, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4661,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -4863,7 +4863,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -8296,7 +8296,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8346,13 +8346,16 @@ "documents": { "type": "array", "description": "Array of document data as JSON objects. May contain partial documents.", - "default": [], + "default": null, "x-example": null, "items": { "type": "object" } } - } + }, + "required": [ + "documents" + ] } } ] @@ -8381,7 +8384,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -8472,7 +8475,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8623,6 +8626,111 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + ] + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8744,7 +8852,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9335,7 +9443,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -9491,7 +9599,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -9569,7 +9677,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -9641,7 +9749,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9890,7 +9998,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9939,7 +10047,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9989,7 +10097,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 401, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -10083,7 +10191,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 400, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -10141,7 +10249,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -10211,7 +10319,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -10270,7 +10378,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -10515,7 +10623,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -10576,7 +10684,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10653,7 +10761,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10733,7 +10841,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -10825,7 +10933,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10910,7 +11018,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -11016,7 +11124,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11112,7 +11220,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -11174,7 +11282,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -11241,7 +11349,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -11327,7 +11435,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11394,7 +11502,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11468,7 +11576,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11585,7 +11693,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11650,7 +11758,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11717,7 +11825,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11795,7 +11903,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11854,7 +11962,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11944,7 +12052,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -12011,7 +12119,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12211,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12172,7 +12280,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -12246,7 +12354,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -12318,7 +12426,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12367,7 +12475,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -12416,7 +12524,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12465,7 +12573,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12523,7 +12631,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12572,7 +12680,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12621,7 +12729,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12681,7 +12789,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12741,7 +12849,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12810,7 +12918,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12870,7 +12978,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -12954,7 +13062,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13014,7 +13122,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -13074,7 +13182,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13134,7 +13242,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -13194,7 +13302,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13254,7 +13362,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13314,7 +13422,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13374,7 +13482,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -13434,7 +13542,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -13483,7 +13591,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -13532,7 +13640,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -13581,7 +13689,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13633,7 +13741,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13685,7 +13793,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -13737,7 +13845,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13789,7 +13897,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13841,7 +13949,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13893,7 +14001,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -13945,7 +14053,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -13997,7 +14105,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14072,7 +14180,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14230,7 +14338,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14385,7 +14493,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14580,7 +14688,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -14774,7 +14882,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14892,7 +15000,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15006,7 +15114,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15061,7 +15169,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15121,7 +15229,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15193,7 +15301,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15265,7 +15373,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -15340,7 +15448,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -15455,7 +15563,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -15568,7 +15676,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -15659,7 +15767,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -15748,7 +15856,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -15875,7 +15983,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -16000,7 +16108,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -16103,7 +16211,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -16204,7 +16312,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -16319,7 +16427,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -16432,7 +16540,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -16591,7 +16699,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -16747,7 +16855,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -16850,7 +16958,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -16951,7 +17059,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -17054,7 +17162,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -17155,7 +17263,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -17258,7 +17366,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -17359,7 +17467,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17462,7 +17570,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17561,7 +17669,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -17616,7 +17724,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -17676,7 +17784,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -17748,7 +17856,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -17820,7 +17928,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +18001,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -17981,7 +18089,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18041,7 +18149,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -18120,7 +18228,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -18180,7 +18288,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -18252,7 +18360,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -18333,7 +18441,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -18421,7 +18529,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -18484,7 +18592,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -18555,7 +18663,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18628,7 +18736,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18720,7 +18828,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -18808,7 +18916,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18892,7 +19000,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18970,7 +19078,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -19041,7 +19149,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -19160,7 +19268,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -19280,7 +19388,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -19392,7 +19500,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -19503,7 +19611,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -19561,7 +19669,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -19614,7 +19722,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 320, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -19672,7 +19780,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19754,7 +19862,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19802,7 +19910,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19883,7 +19991,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19941,7 +20049,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -20024,7 +20132,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -20082,7 +20190,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20153,7 +20261,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20300,7 +20408,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20358,7 +20466,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20483,7 +20591,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -20543,7 +20651,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 160, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20635,7 +20743,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20713,7 +20821,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20791,7 +20899,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20869,7 +20977,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20947,7 +21055,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -21039,7 +21147,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21120,7 +21228,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -21198,7 +21306,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21276,7 +21384,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21354,7 +21462,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21432,7 +21540,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21527,7 +21635,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -21597,7 +21705,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -21680,7 +21788,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -21746,7 +21854,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -21832,7 +21940,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -21900,7 +22008,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21985,7 +22093,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22043,7 +22151,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +22243,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22201,7 +22309,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -22296,7 +22404,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22364,7 +22472,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -22502,7 +22610,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22560,7 +22668,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22680,7 +22788,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22746,7 +22854,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +22951,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22911,7 +23019,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -23012,7 +23120,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -23090,7 +23198,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23219,7 +23327,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23357,7 +23465,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -23433,7 +23541,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23653,7 +23761,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23916,7 +24024,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -24136,7 +24244,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24353,7 +24461,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24588,7 +24696,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24805,7 +24913,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24863,7 +24971,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24981,7 +25089,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -25047,7 +25155,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -25168,7 +25276,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -25236,7 +25344,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -25302,7 +25410,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -25375,7 +25483,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 432, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -25445,7 +25553,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 434, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -25528,7 +25636,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 435, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -25625,7 +25733,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 433, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -25706,7 +25814,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -25759,7 +25867,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -25819,7 +25927,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -25877,7 +25985,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -25949,7 +26057,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -26214,7 +26322,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -26263,7 +26371,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -26313,7 +26421,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 426, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -26407,7 +26515,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 427, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -26465,7 +26573,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 428, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -26535,7 +26643,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -26594,7 +26702,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -26854,7 +26962,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -26915,7 +27023,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -26992,7 +27100,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -27072,7 +27180,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -27172,7 +27280,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -27251,7 +27359,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -27357,7 +27465,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -27454,7 +27562,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -27516,7 +27624,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -27583,7 +27691,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -27669,7 +27777,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -27736,7 +27844,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -27807,7 +27915,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -27871,7 +27979,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -27938,7 +28046,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 429, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -28016,7 +28124,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -28075,7 +28183,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -28165,7 +28273,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -28232,7 +28340,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -28324,7 +28432,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -28391,7 +28499,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -28463,7 +28571,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -28600,7 +28708,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -28659,7 +28767,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -28792,7 +28900,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -28851,7 +28959,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -28934,7 +29042,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -29024,7 +29132,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -29094,7 +29202,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -29183,7 +29291,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -29253,7 +29361,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -29332,7 +29440,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -29538,7 +29646,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -29617,7 +29725,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -29687,7 +29795,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -29765,7 +29873,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -29840,7 +29948,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -29930,7 +30038,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -29992,7 +30100,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -30067,7 +30175,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -30129,7 +30237,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -30199,7 +30307,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -30282,7 +30390,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -30395,7 +30503,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -30465,7 +30573,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -30551,7 +30659,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -30623,7 +30731,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -30716,7 +30824,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -30776,7 +30884,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -30854,7 +30962,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -30922,7 +31030,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -30934,12 +31042,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -31018,7 +31126,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -31078,7 +31186,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -31149,7 +31257,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -31209,7 +31317,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -31281,7 +31389,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -31376,7 +31484,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31467,7 +31575,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -31556,7 +31664,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -31625,7 +31733,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -31686,7 +31794,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -31777,7 +31885,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -31868,7 +31976,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31994,7 +32102,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -32106,7 +32214,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -32216,7 +32324,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 277, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -32286,7 +32394,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -32340,7 +32448,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -32401,7 +32509,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -32480,7 +32588,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -32562,7 +32670,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -32642,7 +32750,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -32713,7 +32821,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -32795,7 +32903,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -32869,7 +32977,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -32941,7 +33049,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -33000,7 +33108,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -33059,7 +33167,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -33118,7 +33226,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -33179,7 +33287,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -33258,7 +33366,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -33337,7 +33445,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -33414,7 +33522,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -33473,7 +33581,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -33550,7 +33658,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -33609,7 +33717,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -33663,7 +33771,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -33719,7 +33827,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -33788,7 +33896,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -33865,7 +33973,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -33937,7 +34045,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -34048,7 +34156,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -34116,7 +34224,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -34206,7 +34314,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -34276,7 +34384,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -34358,7 +34466,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -34437,7 +34545,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -34516,7 +34624,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -34611,7 +34719,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -34692,7 +34800,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -34775,7 +34883,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -34841,7 +34949,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34907,7 +35015,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -34981,7 +35089,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -35065,7 +35173,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -35136,7 +35244,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -35189,7 +35297,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index d2924041c0e..083290bcc05 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7769,7 +7769,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -7820,13 +7820,16 @@ "documents": { "type": "array", "description": "Array of document data as JSON objects. May contain partial documents.", - "default": [], + "default": null, "x-example": null, "items": { "type": "object" } } - } + }, + "required": [ + "documents" + ] } } ] @@ -7855,7 +7858,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -7947,7 +7950,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8101,6 +8104,113 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + ] + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8224,7 +8334,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -8657,7 +8767,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -8730,7 +8840,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -8980,7 +9090,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9030,7 +9140,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9081,7 +9191,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9141,7 +9251,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -9387,7 +9497,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -9449,7 +9559,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9527,7 +9637,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9608,7 +9718,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -9701,7 +9811,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9787,7 +9897,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -9894,7 +10004,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -9991,7 +10101,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10054,7 +10164,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10122,7 +10232,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -10209,7 +10319,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10277,7 +10387,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +10463,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10472,7 +10582,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10539,7 +10649,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -10607,7 +10717,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -10667,7 +10777,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -10758,7 +10868,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -10826,7 +10936,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -10919,7 +11029,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -10989,7 +11099,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -11065,7 +11175,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -11139,7 +11249,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11189,7 +11299,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -11239,7 +11349,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11289,7 +11399,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11348,7 +11458,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11398,7 +11508,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11448,7 +11558,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11509,7 +11619,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11570,7 +11680,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11640,7 +11750,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11701,7 +11811,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -11786,7 +11896,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11847,7 +11957,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11908,7 +12018,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11969,7 +12079,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12030,7 +12140,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12091,7 +12201,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12152,7 +12262,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12213,7 +12323,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12274,7 +12384,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12324,7 +12434,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12374,7 +12484,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12424,7 +12534,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12478,7 +12588,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12532,7 +12642,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12586,7 +12696,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12640,7 +12750,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12694,7 +12804,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12748,7 +12858,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -12802,7 +12912,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12856,7 +12966,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -12932,7 +13042,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13091,7 +13201,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -13247,7 +13357,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -13443,7 +13553,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -13638,7 +13748,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13757,7 +13867,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -13872,7 +13982,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13928,7 +14038,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -13989,7 +14099,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14062,7 +14172,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14135,7 +14245,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -14211,7 +14321,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -14327,7 +14437,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -14441,7 +14551,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -14533,7 +14643,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -14623,7 +14733,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14751,7 +14861,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -14877,7 +14987,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -14981,7 +15091,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -15083,7 +15193,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -15199,7 +15309,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -15313,7 +15423,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -15473,7 +15583,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -15630,7 +15740,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -15734,7 +15844,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -15836,7 +15946,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -15940,7 +16050,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -16042,7 +16152,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -16146,7 +16256,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -16248,7 +16358,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -16352,7 +16462,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -16452,7 +16562,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -16508,7 +16618,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -16569,7 +16679,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -16642,7 +16752,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16715,7 +16825,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16789,7 +16899,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16878,7 +16988,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -16939,7 +17049,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -17019,7 +17129,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -17080,7 +17190,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -17153,7 +17263,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -17235,7 +17345,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -17325,7 +17435,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -17389,7 +17499,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -17462,7 +17572,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -17535,7 +17645,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -17801,7 +17911,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -17851,7 +17961,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -17902,7 +18012,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -17962,7 +18072,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -18223,7 +18333,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -18285,7 +18395,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18363,7 +18473,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -18444,7 +18554,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -18545,7 +18655,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -18625,7 +18735,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -18732,7 +18842,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18830,7 +18940,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -18893,7 +19003,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -18961,7 +19071,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -19048,7 +19158,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -19116,7 +19226,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -19188,7 +19298,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -19253,7 +19363,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -19321,7 +19431,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -19381,7 +19491,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -19472,7 +19582,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -19540,7 +19650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -19633,7 +19743,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -19701,7 +19811,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -19774,7 +19884,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -19912,7 +20022,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19972,7 +20082,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -20106,7 +20216,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -20166,7 +20276,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -20251,7 +20361,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -20343,7 +20453,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -20415,7 +20525,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -20506,7 +20616,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20578,7 +20688,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -20659,7 +20769,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -20867,7 +20977,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -20948,7 +21058,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -21025,7 +21135,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -21117,7 +21227,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -21181,7 +21291,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -21258,7 +21368,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -21322,7 +21432,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -21407,7 +21517,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -21522,7 +21632,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -21594,7 +21704,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -21682,7 +21792,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -21756,7 +21866,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -21851,7 +21961,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -21913,7 +22023,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -21993,7 +22103,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -22062,7 +22172,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -22074,12 +22184,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -22159,7 +22269,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -22220,7 +22330,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -22292,7 +22402,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -22353,7 +22463,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22426,7 +22536,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -22522,7 +22632,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -22614,7 +22724,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -22704,7 +22814,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -22774,7 +22884,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22836,7 +22946,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -22928,7 +23038,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -23020,7 +23130,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -23147,7 +23257,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -23260,7 +23370,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -23371,7 +23481,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +23536,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -23488,7 +23598,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -23568,7 +23678,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -23651,7 +23761,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -23732,7 +23842,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -23804,7 +23914,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -23887,7 +23997,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23962,7 +24072,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -24035,7 +24145,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -24095,7 +24205,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24155,7 +24265,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24215,7 +24325,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24277,7 +24387,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -24357,7 +24467,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -24437,7 +24547,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24515,7 +24625,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -24575,7 +24685,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -24653,7 +24763,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -24713,7 +24823,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -24768,7 +24878,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -24825,7 +24935,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -24895,7 +25005,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -24973,7 +25083,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -25046,7 +25156,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -25158,7 +25268,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -25227,7 +25337,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -25318,7 +25428,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -25389,7 +25499,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -25472,7 +25582,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +25662,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 9bfe261df1c..92132151b43 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -61,6 +61,12 @@ "name": "X-Appwrite-Session", "description": "The user session to authenticate with", "in": "header" + }, + "DevKey": { + "type": "apiKey", + "name": "X-Appwrite-Dev-Key", + "description": "Your secret dev API key", + "in": "header" } }, "paths": { @@ -4791,6 +4797,111 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + ] + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -4912,7 +5023,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -4990,7 +5101,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -5064,7 +5175,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -5181,7 +5292,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -5253,7 +5364,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -5327,7 +5438,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -5399,7 +5510,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5451,7 +5562,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5503,7 +5614,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -5555,7 +5666,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5607,7 +5718,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5659,7 +5770,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5711,7 +5822,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -5763,7 +5874,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -5817,7 +5928,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5902,7 +6013,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -5973,7 +6084,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -6056,7 +6167,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -6146,7 +6257,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -6216,7 +6327,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6305,7 +6416,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6375,7 +6486,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -6454,7 +6565,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6660,7 +6771,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -6739,7 +6850,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -6814,7 +6925,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6904,7 +7015,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6966,7 +7077,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7041,7 +7152,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7103,7 +7214,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7186,7 +7297,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7299,7 +7410,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7369,7 +7480,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7455,7 +7566,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -7527,7 +7638,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -7621,7 +7732,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7682,7 +7793,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index d7f8a4c9d15..e53a0dfb0bc 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4527,7 +4527,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -4590,7 +4590,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 431, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4661,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -4863,7 +4863,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -8296,7 +8296,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8346,13 +8346,16 @@ "documents": { "type": "array", "description": "Array of document data as JSON objects. May contain partial documents.", - "default": [], + "default": null, "x-example": null, "items": { "type": "object" } } - } + }, + "required": [ + "documents" + ] } } ] @@ -8381,7 +8384,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -8472,7 +8475,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8623,6 +8626,111 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + ] + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8744,7 +8852,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9335,7 +9443,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -9491,7 +9599,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -9569,7 +9677,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -9641,7 +9749,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9890,7 +9998,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9939,7 +10047,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9989,7 +10097,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 401, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -10083,7 +10191,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 400, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -10141,7 +10249,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -10211,7 +10319,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -10270,7 +10378,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -10515,7 +10623,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -10576,7 +10684,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10653,7 +10761,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10733,7 +10841,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -10825,7 +10933,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10910,7 +11018,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -11016,7 +11124,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11112,7 +11220,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -11174,7 +11282,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -11241,7 +11349,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -11327,7 +11435,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11394,7 +11502,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11468,7 +11576,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11585,7 +11693,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11650,7 +11758,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11717,7 +11825,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11795,7 +11903,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11854,7 +11962,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11944,7 +12052,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -12011,7 +12119,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12211,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12172,7 +12280,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -12246,7 +12354,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -12318,7 +12426,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12367,7 +12475,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -12416,7 +12524,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12465,7 +12573,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12523,7 +12631,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12572,7 +12680,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12621,7 +12729,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12681,7 +12789,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12741,7 +12849,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12810,7 +12918,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12870,7 +12978,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -12954,7 +13062,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13014,7 +13122,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -13074,7 +13182,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13134,7 +13242,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -13194,7 +13302,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13254,7 +13362,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13314,7 +13422,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13374,7 +13482,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -13434,7 +13542,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -13483,7 +13591,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -13532,7 +13640,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -13581,7 +13689,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13633,7 +13741,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13685,7 +13793,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -13737,7 +13845,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13789,7 +13897,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13841,7 +13949,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13893,7 +14001,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -13945,7 +14053,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -13997,7 +14105,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14072,7 +14180,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14230,7 +14338,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14385,7 +14493,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14580,7 +14688,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -14774,7 +14882,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14892,7 +15000,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15006,7 +15114,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15061,7 +15169,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15121,7 +15229,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15193,7 +15301,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15265,7 +15373,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -15340,7 +15448,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -15455,7 +15563,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -15568,7 +15676,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -15659,7 +15767,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -15748,7 +15856,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -15875,7 +15983,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -16000,7 +16108,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -16103,7 +16211,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -16204,7 +16312,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -16319,7 +16427,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -16432,7 +16540,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -16591,7 +16699,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -16747,7 +16855,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -16850,7 +16958,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -16951,7 +17059,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -17054,7 +17162,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -17155,7 +17263,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -17258,7 +17366,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -17359,7 +17467,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17462,7 +17570,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17561,7 +17669,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -17616,7 +17724,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -17676,7 +17784,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -17748,7 +17856,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -17820,7 +17928,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +18001,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -17981,7 +18089,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18041,7 +18149,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -18120,7 +18228,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -18180,7 +18288,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -18252,7 +18360,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -18333,7 +18441,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -18421,7 +18529,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -18484,7 +18592,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -18555,7 +18663,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18628,7 +18736,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18720,7 +18828,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -18808,7 +18916,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18892,7 +19000,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18970,7 +19078,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -19041,7 +19149,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -19160,7 +19268,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -19280,7 +19388,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -19392,7 +19500,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -19503,7 +19611,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -19561,7 +19669,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -19614,7 +19722,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 320, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -19672,7 +19780,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19754,7 +19862,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19802,7 +19910,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19883,7 +19991,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19941,7 +20049,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -20024,7 +20132,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -20082,7 +20190,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20153,7 +20261,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20300,7 +20408,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20358,7 +20466,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20483,7 +20591,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -20543,7 +20651,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 160, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20635,7 +20743,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20713,7 +20821,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20791,7 +20899,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20869,7 +20977,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20947,7 +21055,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -21039,7 +21147,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21120,7 +21228,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -21198,7 +21306,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21276,7 +21384,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21354,7 +21462,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21432,7 +21540,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21527,7 +21635,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -21597,7 +21705,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -21680,7 +21788,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -21746,7 +21854,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -21832,7 +21940,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -21900,7 +22008,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21985,7 +22093,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22043,7 +22151,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +22243,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22201,7 +22309,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -22296,7 +22404,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22364,7 +22472,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -22502,7 +22610,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22560,7 +22668,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22680,7 +22788,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22746,7 +22854,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +22951,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22911,7 +23019,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -23012,7 +23120,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -23090,7 +23198,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23219,7 +23327,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23357,7 +23465,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -23433,7 +23541,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23653,7 +23761,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23916,7 +24024,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -24136,7 +24244,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24353,7 +24461,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24588,7 +24696,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24805,7 +24913,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24863,7 +24971,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24981,7 +25089,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -25047,7 +25155,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -25168,7 +25276,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -25236,7 +25344,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -25302,7 +25410,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -25375,7 +25483,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 432, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -25445,7 +25553,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 434, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -25528,7 +25636,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 435, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -25625,7 +25733,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 433, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -25706,7 +25814,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -25759,7 +25867,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -25819,7 +25927,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -25877,7 +25985,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -25949,7 +26057,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -26214,7 +26322,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -26263,7 +26371,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -26313,7 +26421,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 426, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -26407,7 +26515,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 427, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -26465,7 +26573,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 428, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -26535,7 +26643,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -26594,7 +26702,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -26854,7 +26962,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -26915,7 +27023,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -26992,7 +27100,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -27072,7 +27180,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -27172,7 +27280,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -27251,7 +27359,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -27357,7 +27465,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -27454,7 +27562,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -27516,7 +27624,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -27583,7 +27691,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -27669,7 +27777,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -27736,7 +27844,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -27807,7 +27915,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -27871,7 +27979,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -27938,7 +28046,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 429, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -28016,7 +28124,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -28075,7 +28183,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -28165,7 +28273,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -28232,7 +28340,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -28324,7 +28432,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -28391,7 +28499,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -28463,7 +28571,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -28600,7 +28708,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -28659,7 +28767,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -28792,7 +28900,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -28851,7 +28959,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -28934,7 +29042,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -29024,7 +29132,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -29094,7 +29202,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -29183,7 +29291,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -29253,7 +29361,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -29332,7 +29440,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -29538,7 +29646,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -29617,7 +29725,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -29687,7 +29795,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -29765,7 +29873,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -29840,7 +29948,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -29930,7 +30038,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -29992,7 +30100,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -30067,7 +30175,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -30129,7 +30237,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -30199,7 +30307,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -30282,7 +30390,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -30395,7 +30503,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -30465,7 +30573,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -30551,7 +30659,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -30623,7 +30731,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -30716,7 +30824,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -30776,7 +30884,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -30854,7 +30962,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -30922,7 +31030,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -30934,12 +31042,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -31018,7 +31126,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -31078,7 +31186,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -31149,7 +31257,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -31209,7 +31317,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -31281,7 +31389,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -31376,7 +31484,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31467,7 +31575,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -31556,7 +31664,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -31625,7 +31733,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -31686,7 +31794,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -31777,7 +31885,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -31868,7 +31976,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31994,7 +32102,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -32106,7 +32214,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -32216,7 +32324,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 277, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -32286,7 +32394,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -32340,7 +32448,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -32401,7 +32509,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -32480,7 +32588,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -32562,7 +32670,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -32642,7 +32750,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -32713,7 +32821,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -32795,7 +32903,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -32869,7 +32977,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -32941,7 +33049,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -33000,7 +33108,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -33059,7 +33167,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -33118,7 +33226,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -33179,7 +33287,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -33258,7 +33366,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -33337,7 +33445,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -33414,7 +33522,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -33473,7 +33581,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -33550,7 +33658,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -33609,7 +33717,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -33663,7 +33771,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -33719,7 +33827,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -33788,7 +33896,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -33865,7 +33973,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -33937,7 +34045,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -34048,7 +34156,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -34116,7 +34224,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -34206,7 +34314,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -34276,7 +34384,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -34358,7 +34466,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -34437,7 +34545,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -34516,7 +34624,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -34611,7 +34719,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -34692,7 +34800,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -34775,7 +34883,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 284, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -34841,7 +34949,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -34907,7 +35015,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -34981,7 +35089,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -35065,7 +35173,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 287, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -35136,7 +35244,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -35189,7 +35297,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index d2924041c0e..083290bcc05 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.0", + "version": "1.7.4", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7769,7 +7769,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -7820,13 +7820,16 @@ "documents": { "type": "array", "description": "Array of document data as JSON objects. May contain partial documents.", - "default": [], + "default": null, "x-example": null, "items": { "type": "object" } } - } + }, + "required": [ + "documents" + ] } } ] @@ -7855,7 +7858,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 114, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -7947,7 +7950,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8101,6 +8104,113 @@ } ] }, + "put": { + "summary": "Upsert document", + "operationId": "databasesUpsertDocument", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "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.", + "responses": { + "200": { + "description": "Document", + "schema": { + "$ref": "#\/definitions\/document" + } + } + }, + "x-appwrite": { + "method": "upsertDocument", + "group": "documents", + "weight": 114, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/upsert-document.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include all required attributes of the document to be created or updated.", + "default": {}, + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + }, + "required": [ + "data" + ] + } + } + ] + }, "patch": { "summary": "Update document", "operationId": "databasesUpdateDocument", @@ -8224,7 +8334,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -8657,7 +8767,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -8730,7 +8840,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -8980,7 +9090,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -9030,7 +9140,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9081,7 +9191,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9141,7 +9251,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -9387,7 +9497,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -9449,7 +9559,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9527,7 +9637,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9608,7 +9718,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 379, + "weight": 380, "cookies": false, "type": "upload", "deprecated": false, @@ -9701,7 +9811,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9787,7 +9897,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -9894,7 +10004,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -9991,7 +10101,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10054,7 +10164,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10122,7 +10232,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 386, + "weight": 387, "cookies": false, "type": "location", "deprecated": false, @@ -10209,7 +10319,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10277,7 +10387,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +10463,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10472,7 +10582,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10539,7 +10649,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -10607,7 +10717,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -10667,7 +10777,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -10758,7 +10868,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -10826,7 +10936,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -10919,7 +11029,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 399, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -10989,7 +11099,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 305, + "weight": 306, "cookies": false, "type": "graphql", "deprecated": false, @@ -11065,7 +11175,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 304, + "weight": 305, "cookies": false, "type": "graphql", "deprecated": false, @@ -11139,7 +11249,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11189,7 +11299,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 150, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -11239,7 +11349,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11289,7 +11399,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11348,7 +11458,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11398,7 +11508,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11448,7 +11558,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11509,7 +11619,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11570,7 +11680,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11640,7 +11750,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11701,7 +11811,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -11786,7 +11896,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11847,7 +11957,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11908,7 +12018,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11969,7 +12079,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12030,7 +12140,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12091,7 +12201,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12152,7 +12262,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12213,7 +12323,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12274,7 +12384,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12324,7 +12434,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12374,7 +12484,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12424,7 +12534,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12478,7 +12588,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12532,7 +12642,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12586,7 +12696,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12640,7 +12750,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12694,7 +12804,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12748,7 +12858,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 127, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -12802,7 +12912,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12856,7 +12966,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -12932,7 +13042,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13091,7 +13201,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -13247,7 +13357,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -13443,7 +13553,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -13638,7 +13748,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13757,7 +13867,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -13872,7 +13982,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13928,7 +14038,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -13989,7 +14099,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14062,7 +14172,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14135,7 +14245,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 331, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -14211,7 +14321,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 330, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -14327,7 +14437,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -14441,7 +14551,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 329, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -14533,7 +14643,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -14623,7 +14733,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14751,7 +14861,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -14877,7 +14987,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 324, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -14981,7 +15091,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -15083,7 +15193,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 322, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -15199,7 +15309,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -15313,7 +15423,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 323, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -15473,7 +15583,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -15630,7 +15740,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 325, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -15734,7 +15844,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -15836,7 +15946,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 326, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -15940,7 +16050,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -16042,7 +16152,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 327, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -16146,7 +16256,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -16248,7 +16358,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 328, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -16352,7 +16462,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -16452,7 +16562,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -16508,7 +16618,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -16569,7 +16679,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 332, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -16642,7 +16752,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16715,7 +16825,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 346, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16789,7 +16899,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 345, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16878,7 +16988,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -16939,7 +17049,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -17019,7 +17129,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -17080,7 +17190,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -17153,7 +17263,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -17235,7 +17345,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -17325,7 +17435,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -17389,7 +17499,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -17462,7 +17572,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 404, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -17535,7 +17645,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 402, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -17801,7 +17911,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 407, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -17851,7 +17961,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 430, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -17902,7 +18012,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 403, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -17962,7 +18072,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 405, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -18223,7 +18333,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 406, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -18285,7 +18395,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 413, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18363,7 +18473,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 412, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -18444,7 +18554,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 408, + "weight": 409, "cookies": false, "type": "upload", "deprecated": false, @@ -18545,7 +18655,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 416, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -18625,7 +18735,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 409, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -18732,7 +18842,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 410, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18830,7 +18940,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 411, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -18893,7 +19003,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 414, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -18961,7 +19071,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 415, + "weight": 416, "cookies": false, "type": "location", "deprecated": false, @@ -19048,7 +19158,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 417, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -19116,7 +19226,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 419, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -19188,7 +19298,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 418, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -19253,7 +19363,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 420, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -19321,7 +19431,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 423, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -19381,7 +19491,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 421, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -19472,7 +19582,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 422, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -19540,7 +19650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 424, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -19633,7 +19743,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 425, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -19701,7 +19811,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -19774,7 +19884,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -19912,7 +20022,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19972,7 +20082,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 208, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -20106,7 +20216,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -20166,7 +20276,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 211, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -20251,7 +20361,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 210, + "weight": 211, "cookies": false, "type": "upload", "deprecated": false, @@ -20343,7 +20453,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 212, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -20415,7 +20525,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -20506,7 +20616,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20578,7 +20688,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 214, + "weight": 215, "cookies": false, "type": "location", "deprecated": false, @@ -20659,7 +20769,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -20867,7 +20977,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 215, + "weight": 216, "cookies": false, "type": "location", "deprecated": false, @@ -20948,7 +21058,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -21025,7 +21135,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -21117,7 +21227,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -21181,7 +21291,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -21258,7 +21368,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -21322,7 +21432,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -21407,7 +21517,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -21522,7 +21632,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -21594,7 +21704,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -21682,7 +21792,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -21756,7 +21866,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -21851,7 +21961,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -21913,7 +22023,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -21993,7 +22103,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 438, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -22062,7 +22172,7 @@ "tags": [ "tokens" ], - "description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "description": "Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "responses": { "201": { "description": "ResourceToken", @@ -22074,12 +22184,12 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 436, + "weight": 437, "cookies": false, "type": "", "deprecated": false, "demo": "tokens\/create-file-token.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -22159,7 +22269,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 437, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -22220,7 +22330,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 439, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -22292,7 +22402,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 440, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -22353,7 +22463,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22426,7 +22536,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -22522,7 +22632,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -22614,7 +22724,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -22704,7 +22814,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -22774,7 +22884,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22836,7 +22946,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -22928,7 +23038,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -23020,7 +23130,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -23147,7 +23257,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -23260,7 +23370,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -23371,7 +23481,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +23536,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -23488,7 +23598,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -23568,7 +23678,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 276, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -23651,7 +23761,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -23732,7 +23842,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -23804,7 +23914,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -23887,7 +23997,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23962,7 +24072,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -24035,7 +24145,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -24095,7 +24205,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24155,7 +24265,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24215,7 +24325,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24277,7 +24387,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -24357,7 +24467,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -24437,7 +24547,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24515,7 +24625,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -24575,7 +24685,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -24653,7 +24763,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -24713,7 +24823,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -24768,7 +24878,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -24825,7 +24935,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -24895,7 +25005,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -24973,7 +25083,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -25046,7 +25156,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -25158,7 +25268,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -25227,7 +25337,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -25318,7 +25428,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -25389,7 +25499,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -25472,7 +25582,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +25662,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/template-runtimes.php b/app/config/template-runtimes.php index 8f1c0198c2c..d1bb1a5b6ac 100644 --- a/app/config/template-runtimes.php +++ b/app/config/template-runtimes.php @@ -14,7 +14,7 @@ ], 'DART' => [ 'name' => 'dart', - 'versions' => ['3.5', '3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16'] + 'versions' => ['3.8', '3.5', '3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16'] ], 'GO' => [ 'name' => 'go', @@ -38,6 +38,6 @@ ], 'FLUTTER' => [ 'name' => 'flutter', - 'versions' => ['3.24'] + 'versions' => ['3.32', '3.24'] ], ]; diff --git a/app/config/templates/site.php b/app/config/templates/site.php index ab6d5c4d4d9..a853955a971 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -1351,4 +1351,23 @@ function getFramework(string $frameworkEnum, array $overrides) 'providerVersion' => '0.3.*', 'variables' => [], ], + [ + 'key' => 'gallery-for-lynx', + 'name' => 'Lynx gallery', + 'tagline' => 'A Lynx website showcasing gallery with smooth animations.', + 'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) + 'useCases' => [UseCases::STARTER], + 'screenshotDark' => $url . '/images/sites/templates/gallery-for-lynx-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/gallery-for-lynx-light.png', + 'frameworks' => [ + getFramework('LYNX', [ + 'providerRootDirectory' => './lynx/gallery', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [] + ], ]; diff --git a/app/config/variables.php b/app/config/variables.php index da41666845c..2f9a5ab41af 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -106,6 +106,15 @@ 'question' => '', 'filter' => '' ], + [ + 'name' => '_APP_DOMAIN_SITES', + 'description' => 'A domain to use for site preview URLs.', + 'introduction' => '', + 'default' => 'sites.localhost', + 'required' => false, + 'question' => '', + 'filter' => '' + ], [ 'name' => '_APP_DOMAIN_TARGET', 'description' => 'Deprecated since 1.7.0. A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite \'_APP_DOMAIN\' variable. The default value is \'localhost\'.', diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 62ddd41daac..dcf547b6885 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -3785,7 +3785,12 @@ function updateAttribute( throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } - $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + try { + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + if ($document->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); } @@ -4202,6 +4207,244 @@ function updateAttribute( $response->dynamic($document, Response::MODEL_DOCUMENT); }); +App::put('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') + ->desc('Upsert document') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].upsert') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'document.upsert') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: 'databases', + group: 'documents', + name: 'upsertDocument', + description: '/docs/references/databases/upsert-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documentId', '', new CustomId(), 'Document ID.') + ->param('data', [], new JSON(), 'Document data as JSON object. Include all required attributes of the document to be created or updated.') + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->action(function (string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data) && \is_null($permissions)) { + throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); + } + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions, [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]); + + // Users can only manage their own roles, API keys and Admin users can manage any + $roles = Authorization::getRoles(); + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + } + } + } + } + + $data['$id'] = $documentId; + $data['$permissions'] = $permissions; + $newDocument = new Document($data); + + $operations = 0; + + $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { + + $operations++; + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + + $isList = \is_array($related) && \array_values($related) === $related; + + if ($isList) { + $relations = $related; + } else { + $relations = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($relations as &$relation) { + // If the relation is an array it can be either update or create a child document. + if ( + \is_array($relation) + && \array_values($relation) !== $relation + && !isset($relation['$id']) + ) { + $relation['$id'] = ID::unique(); + $relation = new Document($relation); + } + if ($relation instanceof Document) { + $oldDocument = Authorization::skip(fn () => $dbForProject->getDocument( + 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), + $relation->getId() + )); + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + // Attribute $collection is required for Utopia. + $relation->setAttribute( + '$collection', + 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId() + ); + + if ($oldDocument->isEmpty()) { + if (isset($relation['$id']) && $relation['$id'] === 'unique()') { + $relation['$id'] = ID::unique(); + } + } + $setCollection($relatedCollection, $relation); + } + } + + if ($isList) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } else { + $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + } + } + }); + + $setCollection($collection, $newDocument); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $operations)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $operations)); + + $upserted = []; + try { + $modified = $dbForProject->createOrUpdateDocuments( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + [$newDocument], + onNext: function (Document $document) use (&$upserted) { + $upserted[] = $document; + }, + ); + } catch (ConflictException) { + throw new Exception(Exception::DOCUMENT_UPDATE_CONFLICT); + } catch (DuplicateException) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + } + + $document = $upserted[0]; + // Add $collectionId and $databaseId for all documents + $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + $processDocument($collection, $document); + + $relationships = \array_map( + fn ($document) => $document->getAttribute('key'), + \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setContext('collection', $collection) + ->setContext('database', $database) + ->setPayload($response->getPayload(), sensitive: $relationships); + + $response->dynamic($document, Response::MODEL_DOCUMENT); + }); + App::patch('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('Update documents') ->groups(['api', 'database']) @@ -4338,7 +4581,7 @@ function updateAttribute( )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') - ->param('documents', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of document data as JSON objects. May contain partial documents.', true, ['plan']) + ->param('documents', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of document data as JSON objects. May contain partial documents.', false, ['plan']) ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 11fc4cc244b..b95eb432a18 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -3,13 +3,16 @@ use Appwrite\ClamAV\Network; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; use Utopia\App; +use Utopia\Cache\Adapter\Pool as CachePool; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Document; use Utopia\Domains\Validator\PublicDomain; use Utopia\Pools\Group; @@ -34,8 +37,8 @@ namespace: 'health', group: 'health', name: 'get', - auth: [AuthType::KEY], description: '/docs/references/health/get.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -70,11 +73,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'health', name: 'getDB', description: '/docs/references/health/get-db.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -86,8 +89,8 @@ ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { - $output = []; + $failures = []; $configs = [ 'Console.DB' => Config::getParam('pools-console'), @@ -97,7 +100,7 @@ foreach ($configs as $key => $config) { foreach ($config as $database) { try { - $adapter = $pools->get($database)->pop()->getResource(); + $adapter = new DatabasePool($pools->get($database)); $checkStart = \microtime(true); @@ -108,16 +111,16 @@ 'ping' => \round((\microtime(true) - $checkStart) / 1000) ]); } else { - $failure[] = $database; + $failures[] = $database; } - } catch (\Throwable $th) { - $failure[] = $database; + } catch (\Throwable) { + $failures[] = $database; } } } - if (!empty($failure)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failure)); + if (!empty($failures)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failures)); } $response->dynamic(new Document([ @@ -131,11 +134,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'health', name: 'getCache', description: '/docs/references/health/get-cache.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -147,44 +150,39 @@ ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { - $output = []; + $failures = []; $configs = [ 'Cache' => Config::getParam('pools-cache'), ]; foreach ($configs as $key => $config) { - foreach ($config as $database) { + foreach ($config as $cache) { try { - /** @var \Utopia\Cache\Adapter $adapter */ - $adapter = $pools->get($database)->pop()->getResource(); + $adapter = new CachePool($pools->get($cache)); $checkStart = \microtime(true); if ($adapter->ping()) { $output[] = new Document([ - 'name' => $key . " ($database)", + 'name' => $key . " ($cache)", 'status' => 'pass', 'ping' => \round((\microtime(true) - $checkStart) / 1000) ]); } else { - $output[] = new Document([ - 'name' => $key . " ($database)", - 'status' => 'fail', - 'ping' => \round((\microtime(true) - $checkStart) / 1000) - ]); + $failures[] = $cache; } - } catch (\Throwable $th) { - $output[] = new Document([ - 'name' => $key . " ($database)", - 'status' => 'fail', - 'ping' => \round((\microtime(true) - $checkStart) / 1000) - ]); + } catch (\Throwable) { + $failures[] = $cache; } } } + if (!empty($failures)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Cache failure on: ' . implode(", ", $failures)); + } + $response->dynamic(new Document([ 'statuses' => $output, 'total' => count($output), @@ -196,11 +194,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'health', name: 'getPubSub', description: '/docs/references/health/get-pubsub.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -212,44 +210,39 @@ ->inject('response') ->inject('pools') ->action(function (Response $response, Group $pools) { - $output = []; + $failures = []; $configs = [ 'PubSub' => Config::getParam('pools-pubsub'), ]; foreach ($configs as $key => $config) { - foreach ($config as $database) { + foreach ($config as $pubsub) { try { - /** @var \Appwrite\PubSub\Adapter $adapter */ - $adapter = $pools->get($database)->pop()->getResource(); + $adapter = new PubSubPool($pools->get($pubsub)); $checkStart = \microtime(true); if ($adapter->ping()) { $output[] = new Document([ - 'name' => $key . " ($database)", + 'name' => $key . " ($pubsub)", 'status' => 'pass', 'ping' => \round((\microtime(true) - $checkStart) / 1000) ]); } else { - $output[] = new Document([ - 'name' => $key . " ($database)", - 'status' => 'fail', - 'ping' => \round((\microtime(true) - $checkStart) / 1000) - ]); + $failures[] = $pubsub; } - } catch (\Throwable $th) { - $output[] = new Document([ - 'name' => $key . " ($database)", - 'status' => 'fail', - 'ping' => \round((\microtime(true) - $checkStart) / 1000) - ]); + } catch (\Throwable) { + $failures[] = $pubsub; } } } + if (!empty($failures)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Pubsub failure on: ' . implode(", ", $failures)); + } + $response->dynamic(new Document([ 'statuses' => $output, 'total' => count($output), @@ -261,11 +254,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'health', name: 'getTime', description: '/docs/references/health/get-time.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -325,11 +318,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueWebhooks', description: '/docs/references/health/get-queue-webhooks.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -351,18 +344,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/logs') ->desc('Get logs queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueLogs', description: '/docs/references/health/get-queue-logs.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -384,18 +377,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/certificate') ->desc('Get the SSL certificate for a domain') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'health', name: 'getCertificate', description: '/docs/references/health/get-certificate.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -441,18 +434,18 @@ 'validTo' => $certificatePayload['validTo_time_t'], 'signatureTypeSN' => $certificatePayload['signatureTypeSN'], ]), Response::MODEL_HEALTH_CERTIFICATE); - }, ['response']); + }); App::get('/v1/health/queue/certificates') ->desc('Get certificates queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueCertificates', description: '/docs/references/health/get-queue-certificates.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -474,18 +467,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/builds') ->desc('Get builds queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueBuilds', description: '/docs/references/health/get-queue-builds.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -507,18 +500,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/databases') ->desc('Get databases queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueDatabases', description: '/docs/references/health/get-queue-databases.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -541,18 +534,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/deletes') ->desc('Get deletes queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueDeletes', description: '/docs/references/health/get-queue-deletes.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -574,18 +567,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/mails') ->desc('Get mails queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueMails', description: '/docs/references/health/get-queue-mails.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -607,18 +600,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/messaging') ->desc('Get messaging queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueMessaging', description: '/docs/references/health/get-queue-messaging.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -640,18 +633,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/migrations') ->desc('Get migrations queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueMigrations', description: '/docs/references/health/get-queue-migrations.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -673,18 +666,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/functions') ->desc('Get functions queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueFunctions', description: '/docs/references/health/get-queue-functions.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -706,18 +699,18 @@ } $response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE); - }, ['response']); + }); App::get('/v1/health/queue/stats-resources') ->desc('Get stats resources queue') ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueStatsResources', description: '/docs/references/health/get-queue-stats-resources.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -746,11 +739,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getQueueUsage', description: '/docs/references/health/get-queue-stats-usage.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -779,11 +772,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'storage', name: 'getStorageLocal', description: '/docs/references/health/get-storage-local.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -829,11 +822,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'storage', name: 'getStorage', description: '/docs/references/health/get-storage.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -878,11 +871,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'health', name: 'getAntivirus', description: '/docs/references/health/get-storage-anti-virus.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, @@ -924,11 +917,11 @@ ->groups(['api', 'health']) ->label('scope', 'health.read') ->label('sdk', new Method( - auth: [AuthType::KEY], namespace: 'health', group: 'queue', name: 'getFailedJobs', description: '/docs/references/health/get-failed-queue-jobs.md', + auth: [AuthType::KEY], responses: [ new SDKResponse( code: Response::STATUS_CODE_OK, diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index e158cf52fb9..5eda8e9a0e6 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -24,6 +24,7 @@ use Utopia\Audit\Audit; use Utopia\Cache\Cache; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -223,7 +224,7 @@ $sharedTables = $sharedTablesV1 || $sharedTablesV2; if (!$sharedTablesV2) { - $adapter = $pools->get($dsn->getHost())->pop()->getResource(); + $adapter = new DatabasePool($pools->get($dsn->getHost())); $dbForProject = new Database($adapter, $cache); if ($sharedTables) { diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index a2757382467..c1c8d8e4a08 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -214,11 +214,42 @@ throw new Exception(Exception::RULE_NOT_FOUND); } + $targetCNAME = null; + switch ($rule->getAttribute('type', '')) { + case 'api': + // For example: fra.cloud.appwrite.io + $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); + break; + case 'redirect': + // For example: appwrite.network + $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_SITES', '')); + break; + case 'deployment': + switch ($rule->getAttribute('deploymentResourceType', '')) { + case 'function': + // For example: fra.appwrite.run + $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_FUNCTIONS', '')); + break; + case 'site': + // For example: appwrite.network + $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_SITES', '')); + break; + default: + break; + } + // no break + default: + break; + } + $validators = []; - $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); - if (!$targetCNAME->isKnown() || $targetCNAME->isTest()) { - $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); + + if (!is_null($targetCNAME)) { + if ($targetCNAME->isKnown() && !$targetCNAME->isTest()) { + $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); + } } + if ((new IP(IP::V4))->isValid(System::getEnv('_APP_DOMAIN_TARGET_A', ''))) { $validators[] = new DNS(System::getEnv('_APP_DOMAIN_TARGET_A', ''), DNS::RECORD_A); } @@ -260,7 +291,8 @@ // Issue a TLS certificate when domain is verified $queueForCertificates ->setDomain(new Document([ - 'domain' => $rule->getAttribute('domain') + 'domain' => $rule->getAttribute('domain'), + 'domainType' => $rule->getAttribute('deploymentResourceType', $rule->getAttribute('type')), ])) ->trigger(); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index ee6279c3bc8..d2edf476f60 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1004,7 +1004,7 @@ $algorithm = $file->getAttribute('algorithm', Compression::NONE); $cipher = $file->getAttribute('openSSLCipher'); $mime = $file->getAttribute('mimeType'); - if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) System::getEnv('_APP_STORAGE_PREVIEW_LIMIT', 20000000)) { + if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) System::getEnv('_APP_STORAGE_PREVIEW_LIMIT', APP_STORAGE_READ_BUFFER)) { if (!\in_array($mime, $inputs)) { $path = (\array_key_exists($mime, $fileLogos)) ? $fileLogos[$mime] : $fileLogos['default']; } else { @@ -1178,13 +1178,6 @@ throw new Exception(Exception::STORAGE_FILE_NOT_FOUND, 'File not found in ' . $path); } - $response - ->setContentType($file->getAttribute('mimeType')) - ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days - ->addHeader('X-Peak', \memory_get_peak_usage()) - ->addHeader('Content-Disposition', 'attachment; filename="' . $file->getAttribute('name', '') . '"') - ; - $size = $file->getAttribute('sizeOriginal', 0); $rangeHeader = $request->getHeader('range'); @@ -1193,7 +1186,7 @@ $end = $request->getRangeEnd(); $unit = $request->getRangeUnit(); - if ($end === null) { + if ($end === null || $end - $start > APP_STORAGE_READ_BUFFER) { $end = min(($start + MAX_OUTPUT_CHUNK_SIZE - 1), ($size - 1)); } @@ -1208,6 +1201,13 @@ ->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT); } + $response + ->setContentType($file->getAttribute('mimeType')) + ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days + ->addHeader('X-Peak', \memory_get_peak_usage()) + ->addHeader('Content-Disposition', 'attachment; filename="' . $file->getAttribute('name', '') . '"') + ; + $source = ''; if (!empty($file->getAttribute('openSSLCipher'))) { // Decrypt $source = $deviceForFiles->read($path); @@ -1241,12 +1241,15 @@ if (!empty($source)) { if (!empty($rangeHeader)) { $response->send(substr($source, $start, ($end - $start + 1))); + return; } $response->send($source); + return; } if (!empty($rangeHeader)) { $response->send($deviceForFiles->read($path, $start, ($end - $start + 1))); + return; } if ($size > APP_STORAGE_READ_BUFFER) { @@ -1342,15 +1345,6 @@ $contentType = $file->getAttribute('mimeType'); } - $response - ->setContentType($contentType) - ->addHeader('Content-Security-Policy', 'script-src none;') - ->addHeader('X-Content-Type-Options', 'nosniff') - ->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"') - ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days - ->addHeader('X-Peak', \memory_get_peak_usage()) - ; - $size = $file->getAttribute('sizeOriginal', 0); $rangeHeader = $request->getHeader('range'); @@ -1359,8 +1353,8 @@ $end = $request->getRangeEnd(); $unit = $request->getRangeUnit(); - if ($end === null) { - $end = min(($start + 2000000 - 1), ($size - 1)); + if ($end === null || $end - $start > APP_STORAGE_READ_BUFFER) { + $end = min(($start + APP_STORAGE_READ_BUFFER - 1), ($size - 1)); } if ($unit != 'bytes' || $start >= $end || $end >= $size) { @@ -1374,6 +1368,15 @@ ->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT); } + $response + ->setContentType($contentType) + ->addHeader('Content-Security-Policy', 'script-src none;') + ->addHeader('X-Content-Type-Options', 'nosniff') + ->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"') + ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days + ->addHeader('X-Peak', \memory_get_peak_usage()) + ; + $source = ''; if (!empty($file->getAttribute('openSSLCipher'))) { // Decrypt $source = $deviceForFiles->read($path); @@ -1407,6 +1410,7 @@ if (!empty($source)) { if (!empty($rangeHeader)) { $response->send(substr($source, $start, ($end - $start + 1))); + return; } $response->send($source); return; @@ -1494,14 +1498,6 @@ $contentType = $file->getAttribute('mimeType'); } - $response - ->setContentType($contentType) - ->addHeader('Content-Security-Policy', 'script-src none;') - ->addHeader('X-Content-Type-Options', 'nosniff') - ->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"') - ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days - ->addHeader('X-Peak', \memory_get_peak_usage()); - $size = $file->getAttribute('sizeOriginal', 0); $rangeHeader = $request->getHeader('range'); @@ -1510,8 +1506,8 @@ $end = $request->getRangeEnd(); $unit = $request->getRangeUnit(); - if ($end === null) { - $end = min(($start + 2000000 - 1), ($size - 1)); + if ($end === null || $end - $start > APP_STORAGE_READ_BUFFER) { + $end = min(($start + APP_STORAGE_READ_BUFFER - 1), ($size - 1)); } if ($unit != 'bytes' || $start >= $end || $end >= $size) { @@ -1525,6 +1521,14 @@ ->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT); } + $response + ->setContentType($contentType) + ->addHeader('Content-Security-Policy', 'script-src none;') + ->addHeader('X-Content-Type-Options', 'nosniff') + ->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"') + ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days + ->addHeader('X-Peak', \memory_get_peak_usage()); + $source = ''; if (!empty($file->getAttribute('openSSLCipher'))) { // Decrypt $source = $deviceForFiles->read($path); @@ -1558,6 +1562,7 @@ if (!empty($source)) { if (!empty($rangeHeader)) { $response->send(substr($source, $start, ($end - $start + 1))); + return; } $response->send($source); return; diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 49d9005c54f..7e52b169119 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -1097,10 +1097,13 @@ max: 2 ); + // Is the role change being requested by the user on their own membership? + $isCurrentUserAnOwner = $user->getInternalId() === $membership->getAttribute('userInternalId'); + // Prevent role change if there's only one owner left, - // the requester is that owner, and the new `$roles` no longer include 'owner'! - if ($ownersCount === 1 && $isOwner && !\in_array('owner', $roles)) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'There must be at least one owner in the organization.'); + // the requester is that owner, and the new `$roles` no longer include 'owner' + if ($ownersCount === 1 && $isOwner && $isCurrentUserAnOwner && !\in_array('owner', $roles)) { + throw new Exception(Exception::MEMBERSHIP_DOWNGRADE_PROHIBITED, 'There must be at least one owner in the organization.'); } } @@ -1315,10 +1318,12 @@ )) ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') + ->inject('user') + ->inject('project') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $teamId, string $membershipId, Response $response, Database $dbForProject, Event $queueForEvents) { + ->action(function (string $teamId, string $membershipId, Document $user, Document $project, Response $response, Database $dbForProject, Event $queueForEvents) { $membership = $dbForProject->getDocument('memberships', $membershipId); @@ -1326,9 +1331,9 @@ throw new Exception(Exception::TEAM_INVITE_NOT_FOUND); } - $user = $dbForProject->getDocument('users', $membership->getAttribute('userId')); + $profile = $dbForProject->getDocument('users', $membership->getAttribute('userId')); - if ($user->isEmpty()) { + if ($profile->isEmpty()) { throw new Exception(Exception::USER_NOT_FOUND); } @@ -1342,6 +1347,29 @@ throw new Exception(Exception::TEAM_MEMBERSHIP_MISMATCH); } + if ($project->getId() === 'console') { + // Quick check: + // fetch up to 2 owners to determine if only one exists + $ownersCount = $dbForProject->count( + collection: 'memberships', + queries: [ + Query::contains('roles', ['owner']), + Query::equal('teamInternalId', [$team->getInternalId()]) + ], + max: 2 + ); + + // Is the deletion being requested by the user on their own membership and they are also the owner? + $isSelfOwner = + in_array('owner', $membership->getAttribute('roles')) && + $membership->getAttribute('userInternalId') === $user->getInternalId(); + + if ($ownersCount === 1 && $isSelfOwner) { + /* Prevent removal if the user is the only owner. */ + throw new Exception(Exception::MEMBERSHIP_DELETION_PROHIBITED, 'There must be at least one owner in the organization.'); + } + } + try { $dbForProject->deleteDocument('memberships', $membership->getId()); } catch (AuthorizationException $exception) { @@ -1350,15 +1378,15 @@ throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove membership from DB'); } - $dbForProject->purgeCachedDocument('users', $user->getId()); + $dbForProject->purgeCachedDocument('users', $profile->getId()); if ($membership->getAttribute('confirm')) { // Count only confirmed members Authorization::skip(fn () => $dbForProject->decreaseDocumentAttribute('teams', $team->getId(), 'total', 1, 0)); } $queueForEvents - ->setParam('userId', $user->getId()) ->setParam('teamId', $team->getId()) + ->setParam('userId', $profile->getId()) ->setParam('membershipId', $membership->getId()) ->setPayload($response->output($membership, Response::MODEL_MEMBERSHIP)) ; diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 6211faf90ed..588ca417cf9 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -252,7 +252,6 @@ 'providerCommitUrl' => $providerCommitUrl, 'providerCommentId' => \strval($latestCommentId), 'providerBranch' => $providerBranch, - 'search' => implode(' ', [$deploymentId, $resource->getAttribute('entrypoint', '')]), 'activate' => $activate, ]))); @@ -294,7 +293,13 @@ // VCS branch preview if (!empty($providerBranch)) { - $domain = "branch-{$providerBranch}-{$resource->getId()}-{$project->getId()}.{$sitesDomain}"; + $branchPrefix = substr($providerBranch, 0, 16); + if (strlen($providerBranch) > 16) { + $remainingChars = substr($providerBranch, 16); + $branchPrefix .= '-' . substr(hash('sha256', $remainingChars), 0, 7); + } + $resourceProjectHash = substr(hash('sha256', $resource->getId() . $project->getId()), 0, 7); + $domain = "branch-{$branchPrefix}-{$resourceProjectHash}.{$sitesDomain}"; $ruleId = md5($domain); try { Authorization::skip( @@ -325,7 +330,7 @@ // VCS commit preview if (!empty($providerCommitHash)) { - $domain = "commit-{$providerCommitHash}-{$resource->getId()}-{$project->getId()}.{$sitesDomain}"; + $domain = "commit-" . substr($providerCommitHash, 0, 16) . ".{$sitesDomain}"; $ruleId = md5($domain); try { Authorization::skip( diff --git a/app/controllers/general.php b/app/controllers/general.php index 13433b98c8d..bff701792e4 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -452,16 +452,33 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $endpoint = $protocol . '://' . $hostname . "/v1"; // Appwrite vars + if ($type === 'function') { + $vars = \array_merge($vars, [ + 'APPWRITE_FUNCTION_API_ENDPOINT' => $endpoint, + 'APPWRITE_FUNCTION_ID' => $resource->getId(), + 'APPWRITE_FUNCTION_NAME' => $resource->getAttribute('name'), + 'APPWRITE_FUNCTION_DEPLOYMENT' => $deployment->getId(), + 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), + 'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '', + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '', + 'APPWRITE_FUNCTION_CPUS' => $spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT, + 'APPWRITE_FUNCTION_MEMORY' => $spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT, + ]); + } elseif ($type === 'site') { + $vars = \array_merge($vars, [ + 'APPWRITE_SITE_API_ENDPOINT' => $endpoint, + 'APPWRITE_SITE_ID' => $resource->getId(), + 'APPWRITE_SITE_NAME' => $resource->getAttribute('name'), + 'APPWRITE_SITE_DEPLOYMENT' => $deployment->getId(), + 'APPWRITE_SITE_PROJECT_ID' => $project->getId(), + 'APPWRITE_SITE_RUNTIME_NAME' => $runtime['name'] ?? '', + 'APPWRITE_SITE_RUNTIME_VERSION' => $runtime['version'] ?? '', + 'APPWRITE_SITE_CPUS' => $spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT, + 'APPWRITE_SITE_MEMORY' => $spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT, + ]); + } + $vars = \array_merge($vars, [ - 'APPWRITE_FUNCTION_API_ENDPOINT' => $endpoint, - 'APPWRITE_FUNCTION_ID' => $resource->getId(), - 'APPWRITE_FUNCTION_NAME' => $resource->getAttribute('name'), - 'APPWRITE_FUNCTION_DEPLOYMENT' => $deployment->getId(), - 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), - 'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '', - 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '', - 'APPWRITE_FUNCTION_CPUS' => $spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT, - 'APPWRITE_FUNCTION_MEMORY' => $spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT, 'APPWRITE_VERSION' => APP_VERSION_STABLE, 'APPWRITE_REGION' => $project->getAttribute('region'), 'APPWRITE_DEPLOYMENT_TYPE' => $deployment->getAttribute('type', ''), @@ -1030,7 +1047,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw ->addHeader('Server', 'Appwrite') ->addHeader('X-Content-Type-Options', 'nosniff') ->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE') - ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Forwarded-For, X-Forwarded-User-Agent') + ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Dev-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Forwarded-For, X-Forwarded-User-Agent') ->addHeader('Access-Control-Expose-Headers', 'X-Appwrite-Session, X-Fallback-Cookies') ->addHeader('Access-Control-Allow-Origin', $refDomain) ->addHeader('Access-Control-Allow-Credentials', 'true'); @@ -1093,7 +1110,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $response ->addHeader('Server', 'Appwrite') ->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE') - ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent') + ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Dev-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent') ->addHeader('Access-Control-Expose-Headers', 'X-Appwrite-Session, X-Fallback-Cookies') ->addHeader('Access-Control-Allow-Origin', $origin) ->addHeader('Access-Control-Allow-Credentials', 'true') diff --git a/app/http.php b/app/http.php index e413c5d248e..6064dfdd4cc 100644 --- a/app/http.php +++ b/app/http.php @@ -15,9 +15,11 @@ use Utopia\CLI\Console; use Utopia\Compression\Compression; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; @@ -170,7 +172,7 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co $sleep = 1; $attempts = 0; - do { + while (true) { try { $attempts++; $resource = $app->getResource($resourceKey); @@ -179,13 +181,12 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co break; // exit loop on success } catch (\Exception $e) { Console::warning(" └── Database not ready. Retrying connection ({$attempts})..."); - $pools->reclaim(); if ($attempts >= $max) { throw new \Exception(' └── Failed to connect to database: ' . $e->getMessage()); } sleep($sleep); } - } while ($attempts < $max); + } Console::success("[Setup] - $dbName database init started..."); @@ -368,11 +369,7 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co $cache = $app->getResource('cache'); foreach ($sharedTablesV2 as $hostname) { - $adapter = $pools - ->get($hostname) - ->pop() - ->getResource(); - + $adapter = new DatabasePool($pools->get($hostname)); $dbForProject = (new Database($adapter, $cache)) ->setDatabase('appwrite') ->setSharedTables(true) @@ -382,7 +379,7 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co try { Console::success('[Setup] - Creating project database: ' . $hostname . '...'); $dbForProject->create(); - } catch (Duplicate) { + } catch (DuplicateException) { Console::success('[Setup] - Skip: metadata table already exists'); } @@ -408,7 +405,6 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co } } - $pools->reclaim(); Console::success('[Setup] - Server database init completed...'); }); @@ -523,6 +519,7 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile()); Console::error('[Error] Line: ' . $th->getLine()); + Console::error('[Error] Trace: ' . $th->getTraceAsString()); $swooleResponse->setStatusCode(500); @@ -540,8 +537,6 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co ]; $swooleResponse->end(\json_encode($output)); - } finally { - $pools->reclaim(); } }); diff --git a/app/init/constants.php b/app/init/constants.php index 0de441cb7c6..99881a43817 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -37,8 +37,8 @@ const APP_RESOURCE_TOKEN_ACCESS = 24 * 60 * 60; // 24 hours const APP_FILE_ACCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours -const APP_CACHE_BUSTER = 4318; -const APP_VERSION_STABLE = '1.7.0-RC1'; +const APP_CACHE_BUSTER = 4320; +const APP_VERSION_STABLE = '1.7.4'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/app/init/registers.php b/app/init/registers.php index 1adaaf35cee..415730f9368 100644 --- a/app/init/registers.php +++ b/app/init/registers.php @@ -216,13 +216,13 @@ 'mysql', 'mariadb' => function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) { return new PDOProxy(function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) { - return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, array( + return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, [ \PDO::ATTR_TIMEOUT => 3, // Seconds \PDO::ATTR_PERSISTENT => false, \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC, \PDO::ATTR_EMULATE_PREPARES => true, \PDO::ATTR_STRINGIFY_FETCHES => true - )); + ]); }); }, 'redis' => function () use ($dsnHost, $dsnPort, $dsnPass) { diff --git a/app/init/resources.php b/app/init/resources.php index 2f7c17ab7fa..c75df2a3620 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -24,10 +24,12 @@ use Executor\Executor; use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis; use Utopia\App; +use Utopia\Cache\Adapter\Pool as CachePool; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\Console; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime as DatabaseDateTime; use Utopia\Database\Document; @@ -38,6 +40,7 @@ use Utopia\Locale\Locale; use Utopia\Logger\Log; use Utopia\Pools\Group; +use Utopia\Queue\Broker\Pool as BrokerPool; use Utopia\Queue\Publisher; use Utopia\Storage\Device; use Utopia\Storage\Device\AWS; @@ -49,7 +52,6 @@ use Utopia\Storage\Device\Wasabi; use Utopia\Storage\Storage; use Utopia\System\System; -use Utopia\Telemetry\Adapter as Telemetry; use Utopia\Telemetry\Adapter\None as NoTelemetry; use Utopia\Validator\Hostname; use Utopia\Validator\WhiteList; @@ -74,10 +76,10 @@ // Queues App::setResource('publisher', function (Group $pools) { - return $pools->get('publisher')->pop()->getResource(); + return new BrokerPool(publisher: $pools->get('publisher')); }, ['pools']); App::setResource('consumer', function (Group $pools) { - return $pools->get('consumer')->pop()->getResource(); + return new BrokerPool(consumer: $pools->get('consumer')); }, ['pools']); App::setResource('queueForMessaging', function (Publisher $publisher) { return new Messaging($publisher); @@ -331,12 +333,8 @@ $dsn = new DSN('mysql://' . $project->getAttribute('database')); } - $dbAdapter = $pools - ->get($dsn->getHost()) - ->pop() - ->getResource(); - - $database = new Database($dbAdapter, $cache); + $adapter = new DatabasePool($pools->get($dsn->getHost())); + $database = new Database($adapter, $cache); $database ->setMetadata('host', \gethostname()) @@ -362,12 +360,8 @@ }, ['pools', 'dbForPlatform', 'cache', 'project']); App::setResource('dbForPlatform', function (Group $pools, Cache $cache) { - $dbAdapter = $pools - ->get('console') - ->pop() - ->getResource(); - - $database = new Database($dbAdapter, $cache); + $adapter = new DatabasePool($pools->get('console')); + $database = new Database($adapter, $cache); $database ->setNamespace('_console') @@ -380,7 +374,7 @@ }, ['pools', 'cache']); App::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $cache) { - $databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools + $databases = []; return function (Document $project) use ($pools, $dbForPlatform, $cache, &$databases) { if ($project->isEmpty() || $project->getId() === 'console') { @@ -422,12 +416,8 @@ return $database; } - $dbAdapter = $pools - ->get($dsn->getHost()) - ->pop() - ->getResource(); - - $database = new Database($dbAdapter, $cache); + $adapter = new DatabasePool($pools->get($dsn->getHost())); + $database = new Database($adapter, $cache); $databases[$dsn->getHost()] = $database; $configure($database); @@ -437,21 +427,15 @@ App::setResource('getLogsDB', function (Group $pools, Cache $cache) { $database = null; - return function (?Document $project = null) use ($pools, $cache, $database) { + + return function (?Document $project = null) use ($pools, $cache, &$database) { if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') { $database->setTenant($project->getInternalId()); return $database; } - $dbAdapter = $pools - ->get('logs') - ->pop() - ->getResource(); - - $database = new Database( - $dbAdapter, - $cache - ); + $adapter = new DatabasePool($pools->get('logs')); + $database = new Database($adapter, $cache); $database ->setSharedTables(true) @@ -470,23 +454,16 @@ App::setResource('telemetry', fn () => new NoTelemetry()); -App::setResource('cache', function (Group $pools, Telemetry $telemetry) { +App::setResource('cache', function (Group $pools) { $list = Config::getParam('pools-cache', []); $adapters = []; foreach ($list as $value) { - $adapters[] = $pools - ->get($value) - ->pop() - ->getResource(); + $adapters[] = new CachePool($pools->get($value)); } - $cache = new Cache(new Sharding($adapters)); - - $cache->setTelemetry($telemetry); - - return $cache; -}, ['pools', 'telemetry']); + return new Cache(new Sharding($adapters)); +}, ['pools']); App::setResource('redis', function () { $host = System::getEnv('_APP_REDIS_HOST', 'localhost'); @@ -509,25 +486,24 @@ }; }, ['redis']); -App::setResource('deviceForLocal', function (Telemetry $telemetry) { - return new Device\Telemetry($telemetry, new Local()); -}, ['telemetry']); - -App::setResource('deviceForFiles', function ($project, Telemetry $telemetry) { - return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); -App::setResource('deviceForSites', function ($project, Telemetry $telemetry) { - return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_SITES . '/app-' . $project->getId())); -}, ['project', 'telemetry']); -App::setResource('deviceForImports', function ($project, Telemetry $telemetry) { - return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); -App::setResource('deviceForFunctions', function ($project, Telemetry $telemetry) { - return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); -App::setResource('deviceForBuilds', function ($project, Telemetry $telemetry) { - return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +App::setResource('deviceForLocal', function () { + return new Local(); +}); +App::setResource('deviceForFiles', function ($project) { + return getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId()); +}, ['project']); +App::setResource('deviceForSites', function ($project) { + return getDevice(APP_STORAGE_SITES . '/app-' . $project->getId()); +}, ['project']); +App::setResource('deviceForImports', function ($project) { + return getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId()); +}, ['project']); +App::setResource('deviceForFunctions', function ($project) { + return getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId()); +}, ['project']); +App::setResource('deviceForBuilds', function ($project) { + return getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId()); +}, ['project']); function getDevice(string $root, string $connection = ''): Device { @@ -556,7 +532,8 @@ function getDevice(string $root, string $connection = ''): Device switch ($device) { case Storage::DEVICE_S3: if (!empty($url)) { - return new S3($root, $accessKey, $accessSecret, $url, $region, $acl); + $bucketRoot = (!empty($bucket) ? $bucket . '/' : '') . \ltrim($root, '/'); + return new S3($bucketRoot, $accessKey, $accessSecret, $url, $region, $acl); } else { return new AWS($root, $accessKey, $accessSecret, $bucket, $region, $acl); } @@ -588,7 +565,8 @@ function getDevice(string $root, string $connection = ''): Device $s3Acl = 'private'; $s3EndpointUrl = System::getEnv('_APP_STORAGE_S3_ENDPOINT', ''); if (!empty($s3EndpointUrl)) { - return new S3($root, $s3AccessKey, $s3SecretKey, $s3EndpointUrl, $s3Region, $s3Acl); + $bucketRoot = (!empty($s3Bucket) ? $s3Bucket . '/' : '') . \ltrim($root, '/'); + return new S3($bucketRoot, $s3AccessKey, $s3SecretKey, $s3EndpointUrl, $s3Region, $s3Acl); } else { return new AWS($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl); } @@ -819,7 +797,7 @@ function getDevice(string $root, string $connection = ''): Device // add sdk to key $sdkValidator = new WhiteList($servers, true); - $sdk = $request->getHeader('x-sdk-name', 'UNKNOWN'); + $sdk = \strtolower($request->getHeader('x-sdk-name', 'UNKNOWN')); if ($sdk !== 'UNKNOWN' && $sdkValidator->isValid($sdk)) { $sdks = $key->getAttribute('sdks', []); @@ -905,7 +883,7 @@ function getDevice(string $root, string $connection = ''): Device $tokenJWT = $request->getParam('token'); if (!empty($tokenJWT) && !$project->isEmpty()) { // JWT authentication - $jwt = new JWT(App::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway. + $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway. try { $payload = $jwt->decode($tokenJWT); diff --git a/app/realtime.php b/app/realtime.php index 86f9c85fdd0..7e6fc0e311c 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -5,6 +5,7 @@ use Appwrite\Extend\Exception as AppwriteException; use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Network\Validator\Origin; +use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Swoole\Http\Request as SwooleRequest; @@ -15,10 +16,12 @@ use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis; use Utopia\App; +use Utopia\Cache\Adapter\Pool as CachePool; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\Console; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -28,13 +31,15 @@ use Utopia\Database\Validator\Authorization; use Utopia\DSN\DSN; use Utopia\Logger\Log; +use Utopia\Pools\Group; +use Utopia\Registry\Registry; use Utopia\System\System; use Utopia\Telemetry\Adapter\None as NoTelemetry; use Utopia\WebSocket\Adapter; use Utopia\WebSocket\Server; /** - * @var \Utopia\Registry\Registry $register + * @var Registry $register */ require_once __DIR__ . '/init.php'; @@ -46,17 +51,17 @@ function getConsoleDB(): Database { global $register; - /** @var \Utopia\Pools\Group $pools */ - $pools = $register->get('pools'); + static $database = null; - $dbAdapter = $pools - ->get('console') - ->pop() - ->getResource() - ; + if ($database !== null) { + return $database; + } - $database = new Database($dbAdapter, getCache()); + /** @var Group $pools */ + $pools = $register->get('pools'); + $adapter = new DatabasePool($pools->get('console')); + $database = new Database($adapter, getCache()); $database ->setNamespace('_console') ->setMetadata('host', \gethostname()) @@ -72,7 +77,13 @@ function getProjectDB(Document $project): Database { global $register; - /** @var \Utopia\Pools\Group $pools */ + static $databases = []; + + if (isset($databases[$project->getInternalId()])) { + return $databases[$project->getInternalId()]; + } + + /** @var Group $pools */ $pools = $register->get('pools'); if ($project->isEmpty() || $project->getId() === 'console') { @@ -86,11 +97,7 @@ function getProjectDB(Document $project): Database $dsn = new DSN('mysql://' . $project->getAttribute('database')); } - $adapter = $pools - ->get($dsn->getHost()) - ->pop() - ->getResource(); - + $adapter = new DatabasePool($pools->get($dsn->getHost())); $database = new Database($adapter, getCache()); $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); @@ -111,7 +118,7 @@ function getProjectDB(Document $project): Database ->setMetadata('host', \gethostname()) ->setMetadata('project', $project->getId()); - return $database; + return $databases[$project->getInternalId()] = $database; } } @@ -121,20 +128,22 @@ function getCache(): Cache { global $register; - $pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */ + static $cache = null; + + if ($cache !== null) { + return $cache; + } + + $pools = $register->get('pools'); /** @var Group $pools */ $list = Config::getParam('pools-cache', []); $adapters = []; foreach ($list as $value) { - $adapters[] = $pools - ->get($value) - ->pop() - ->getResource() - ; + $adapters[] = new CachePool($pools->get($value)); } - return new Cache(new Sharding($adapters)); + return $cache = new Cache(new Sharding($adapters)); } } @@ -142,6 +151,12 @@ function getCache(): Cache if (!function_exists('getRedis')) { function getRedis(): \Redis { + static $redis = null; + + if ($redis !== null) { + return $redis; + } + $host = System::getEnv('_APP_REDIS_HOST', 'localhost'); $port = System::getEnv('_APP_REDIS_PORT', 6379); $pass = System::getEnv('_APP_REDIS_PASS', ''); @@ -160,21 +175,39 @@ function getRedis(): \Redis if (!function_exists('getTimelimit')) { function getTimelimit(): TimeLimitRedis { - return new TimeLimitRedis("", 0, 1, getRedis()); + static $timelimit = null; + + if ($timelimit !== null) { + return $timelimit; + } + + return $timelimit = new TimeLimitRedis("", 0, 1, getRedis()); } } if (!function_exists('getRealtime')) { function getRealtime(): Realtime { - return new Realtime(); + static $realtime = null; + + if ($realtime !== null) { + return $realtime; + } + + return $realtime = new Realtime(); } } if (!function_exists('getTelemetry')) { function getTelemetry(int $workerId): Utopia\Telemetry\Adapter { - return new NoTelemetry(); + static $telemetry = null; + + if ($telemetry !== null) { + return $telemetry; + } + + return $telemetry = new NoTelemetry(); } } @@ -273,7 +306,6 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter sleep(DATABASE_RECONNECT_SLEEP); } } while (true); - $register->get('pools')->reclaim(); }); /** @@ -299,9 +331,7 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter Authorization::skip(fn () => $database->updateDocument('realtime', $statsDocument->getId(), $statsDocument)); } catch (Throwable $th) { - call_user_func($logError, $th, "updateWorkerDocument"); - } finally { - $register->get('pools')->reclaim(); + $logError($th, "updateWorkerDocument"); } }); } @@ -370,8 +400,6 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter 'data' => $event['data'] ])); } - - $register->get('pools')->reclaim(); } } /** @@ -407,8 +435,8 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter } $start = time(); - /** @var \Appwrite\PubSub\Adapter $pubsub */ - $pubsub = $register->get('pools')->get('pubsub')->pop()->getResource(); + $pubsub = new PubSubPool($register->get('pools')->get('pubsub')); + if ($pubsub->ping(true)) { $attempts = 0; Console::success('Pub/sub connection established (worker: ' . $workerId . ')'); @@ -436,8 +464,6 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter $realtime->unsubscribe($connection); $realtime->subscribe($projectId, $connection, $roles, $channels); - - $register->get('pools')->reclaim(); } } @@ -463,14 +489,12 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter } }); } catch (Throwable $th) { - call_user_func($logError, $th, "pubSubConnection"); + $logError($th, "pubSubConnection"); Console::error('Pub/sub error: ' . $th->getMessage()); $attempts++; sleep(DATABASE_RECONNECT_SLEEP); continue; - } finally { - $register->get('pools')->reclaim(); } } @@ -572,7 +596,7 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter $stats->incr($project->getId(), 'connections'); $stats->incr($project->getId(), 'connectionsTotal'); } catch (Throwable $th) { - call_user_func($logError, $th, "initServer"); + $logError($th, "initServer"); // Handle SQL error code is 'HY000' $code = $th->getCode(); @@ -596,8 +620,6 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter Console::error('[Error] Code: ' . $response['data']['code']); Console::error('[Error] Message: ' . $response['data']['message']); } - } finally { - $register->get('pools')->reclaim(); } }); @@ -696,8 +718,6 @@ function getTelemetry(int $workerId): Utopia\Telemetry\Adapter if ($th->getCode() === 1008) { $server->close($connection, $th->getCode()); } - } finally { - $register->get('pools')->reclaim(); } }); diff --git a/app/views/general/404.phtml b/app/views/general/404.phtml index 5e63344c8a8..2a9ff7f3125 100644 --- a/app/views/general/404.phtml +++ b/app/views/general/404.phtml @@ -151,37 +151,6 @@

- -
-

Powered by

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/app/views/general/error.phtml b/app/views/general/error.phtml index c6457ce98f1..a427f1d5e88 100644 --- a/app/views/general/error.phtml +++ b/app/views/general/error.phtml @@ -479,67 +479,39 @@ switch ($type) { -
- -
Error trace
- $traceItem): ?> -
- -
file
-
print($traceItem['file']); ?>
- - - -
line
-
print($traceItem['line']); ?>
- - - -
function
-
print($traceItem['function']); ?>
- - - -
args
-
print(\var_export($traceItem['args'], true)); ?>
- -
- -
+ +
+ +
Error trace
+ $traceItem): ?> +
+ +
file
+
print($traceItem['file']); ?>
+ + + +
line
+
print($traceItem['line']); ?>
+ + + +
function
+
print($traceItem['function']); ?>
+ + + +
args
+
print(\var_export($traceItem['args'], true)); ?>
+ +
+ +
+ -
-

Powered by

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index d52c823b4ed..2d8f2b35ab6 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -177,7 +177,7 @@ $image = $this->getParam('image', ''); appwrite-console: <<: *x-logging container_name: appwrite-console - image: /console:5.3.0-sites-rc.51 + image: /console:6.0.13 restart: unless-stopped networks: - appwrite @@ -685,11 +685,9 @@ $image = $this->getParam('image', ''); container_name: appwrite-task-stats-resources entrypoint: stats-resources <<: *x-logging + restart: unless-stopped networks: - appwrite - volumes: - - ./app:/usr/src/code/app - - ./src:/usr/src/code/src depends_on: - redis - mariadb @@ -866,7 +864,7 @@ $image = $this->getParam('image', ''); <<: *x-logging restart: unless-stopped stop_signal: SIGINT - image: openruntimes/executor:0.7.14 + image: openruntimes/executor:0.7.20 networks: - appwrite - runtimes diff --git a/app/worker.php b/app/worker.php index dfa645478b8..597e8a9943b 100644 --- a/app/worker.php +++ b/app/worker.php @@ -20,10 +20,12 @@ use Executor\Executor; use Swoole\Runtime; use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis; +use Utopia\Cache\Adapter\Pool as CachePool; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\Console; use Utopia\Config\Config; +use Utopia\Database\Adapter\Pool as DatabasePool; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -33,31 +35,26 @@ use Utopia\Logger\Logger; use Utopia\Platform\Service; use Utopia\Pools\Group; +use Utopia\Queue\Broker\Pool as BrokerPool; use Utopia\Queue\Message; use Utopia\Queue\Publisher; use Utopia\Queue\Server; use Utopia\Registry\Registry; -use Utopia\Storage\Device\Telemetry as TelemetryDevice; use Utopia\System\System; -use Utopia\Telemetry\Adapter as Telemetry; use Utopia\Telemetry\Adapter\None as NoTelemetry; Authorization::disable(); -Runtime::enableCoroutine(SWOOLE_HOOK_ALL); +Runtime::enableCoroutine(); Server::setResource('register', fn () => $register); Server::setResource('dbForPlatform', function (Cache $cache, Registry $register) { $pools = $register->get('pools'); - $database = $pools - ->get('console') - ->pop() - ->getResource(); + $adapter = new DatabasePool($pools->get('console')); + $dbForPlatform = new Database($adapter, $cache); + $dbForPlatform->setNamespace('_console'); - $adapter = new Database($database, $cache); - $adapter->setNamespace('_console'); - - return $adapter; + return $dbForPlatform; }, ['cache', 'register']); Server::setResource('project', function (Message $message, Database $dbForPlatform) { @@ -85,20 +82,9 @@ $dsn = new DSN('mysql://' . $project->getAttribute('database')); } - $adapter = $pools - ->get($dsn->getHost()) - ->pop() - ->getResource(); - + $adapter = new DatabasePool($pools->get($dsn->getHost())); $database = new Database($adapter, $cache); - try { - $dsn = new DSN($project->getAttribute('database')); - } catch (\InvalidArgumentException) { - // TODO: Temporary until all projects are using shared tables - $dsn = new DSN('mysql://' . $project->getAttribute('database')); - } - $sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', '')); if (\in_array($dsn->getHost(), $sharedTables)) { @@ -153,12 +139,8 @@ return $database; } - $dbAdapter = $pools - ->get($dsn->getHost()) - ->pop() - ->getResource(); - - $database = new Database($dbAdapter, $cache); + $adapter = new DatabasePool($pools->get($dsn->getHost())); + $database = new Database($adapter, $cache); $databases[$dsn->getHost()] = $database; @@ -190,15 +172,8 @@ return $database; } - $dbAdapter = $pools - ->get('logs') - ->pop() - ->getResource(); - - $database = new Database( - $dbAdapter, - $cache - ); + $adapter = new DatabasePool($pools->get('logs')); + $database = new Database($adapter, $cache); $database ->setSharedTables(true) @@ -236,11 +211,7 @@ $adapters = []; foreach ($list as $value) { - $adapters[] = $pools - ->get($value) - ->pop() - ->getResource() - ; + $adapters[] = new CachePool($pools->get($value)); } return new Cache(new Sharding($adapters)); @@ -269,12 +240,13 @@ Server::setResource('log', fn () => new Log()); + Server::setResource('publisher', function (Group $pools) { - return $pools->get('publisher')->pop()->getResource(); + return new BrokerPool(publisher: $pools->get('publisher')); }, ['pools']); Server::setResource('consumer', function (Group $pools) { - return $pools->get('consumer')->pop()->getResource(); + return new BrokerPool(consumer: $pools->get('consumer')); }, ['pools']); Server::setResource('queueForStatsUsage', function (Publisher $publisher) { @@ -339,29 +311,29 @@ Server::setResource('telemetry', fn () => new NoTelemetry()); -Server::setResource('deviceForSites', function (Document $project, Telemetry $telemetry) { - return new TelemetryDevice($telemetry, getDevice(APP_STORAGE_SITES . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +Server::setResource('deviceForSites', function (Document $project) { + return getDevice(APP_STORAGE_SITES . '/app-' . $project->getId()); +}, ['project']); -Server::setResource('deviceForImports', function (Document $project, Telemetry $telemetry) { - return new TelemetryDevice($telemetry, getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +Server::setResource('deviceForImports', function (Document $project) { + return getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId()); +}, ['project']); -Server::setResource('deviceForFunctions', function (Document $project, Telemetry $telemetry) { - return new TelemetryDevice($telemetry, getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +Server::setResource('deviceForFunctions', function (Document $project) { + return getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId()); +}, ['project']); -Server::setResource('deviceForFiles', function (Document $project, Telemetry $telemetry) { - return new TelemetryDevice($telemetry, getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +Server::setResource('deviceForFiles', function (Document $project) { + return getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId()); +}, ['project']); -Server::setResource('deviceForBuilds', function (Document $project, Telemetry $telemetry) { - return new TelemetryDevice($telemetry, getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +Server::setResource('deviceForBuilds', function (Document $project) { + return getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId()); +}, ['project']); -Server::setResource('deviceForCache', function (Document $project, Telemetry $telemetry) { - return new TelemetryDevice($telemetry, getDevice(APP_STORAGE_CACHE . '/app-' . $project->getId())); -}, ['project', 'telemetry']); +Server::setResource('deviceForCache', function (Document $project) { + return getDevice(APP_STORAGE_CACHE . '/app-' . $project->getId()); +}, ['project']); Server::setResource( 'isResourceBlocked', @@ -465,13 +437,6 @@ $worker = $platform->getWorker(); -$worker - ->shutdown() - ->inject('pools') - ->action(function (Group $pools) { - $pools->reclaim(); - }); - $worker ->error() ->inject('error') @@ -479,8 +444,7 @@ ->inject('log') ->inject('pools') ->inject('project') - ->action(function (Throwable $error, ?Logger $logger, Log $log, Group $pools, Document $project) use ($queueName) { - $pools->reclaim(); + ->action(function (Throwable $error, ?Logger $logger, Log $log, Group $pools, Document $project) use ($worker, $queueName) { $version = System::getEnv('_APP_VERSION', 'UNKNOWN'); if ($logger) { diff --git a/composer.json b/composer.json index d9109f40f89..b7f7809219c 100644 --- a/composer.json +++ b/composer.json @@ -54,20 +54,20 @@ "utopia-php/config": "0.2.*", "utopia-php/detector": "0.1.*", "utopia-php/database": "0.69.*", - "utopia-php/domains": "0.5.*", + "utopia-php/domains": "0.8.0", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", "utopia-php/fetch": "0.4.*", "utopia-php/image": "0.8.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", - "utopia-php/messaging": "0.17.*", + "utopia-php/messaging": "0.18.*", "utopia-php/migration": "0.9.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", "utopia-php/preloader": "0.2.*", - "utopia-php/queue": "0.9.*", + "utopia-php/queue": "0.11.*", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.18.*", "utopia-php/swoole": "0.8.*", @@ -76,17 +76,17 @@ "utopia-php/vcs": "0.10.*", "utopia-php/websocket": "0.3.*", "matomo/device-detector": "6.1.*", - "dragonmantank/cron-expression": "3.3.2", - "phpmailer/phpmailer": "6.9.1", - "chillerlan/php-qrcode": "4.3.4", - "adhocore/jwt": "1.1.2", + "dragonmantank/cron-expression": "3.3.*", + "phpmailer/phpmailer": "6.9.*", + "chillerlan/php-qrcode": "4.3.*", + "adhocore/jwt": "1.1.*", "spomky-labs/otphp": "^10.0", "webonyx/graphql-php": "14.11.*", "league/csv": "9.14.*" }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.40.*", + "appwrite/sdk-generator": "0.41.*", "phpunit/phpunit": "9.*", "swoole/ide-helper": "5.1.2", "phpstan/phpstan": "1.8.*", diff --git a/composer.lock b/composer.lock index a495c500347..729174e86ab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,27 +4,27 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "735023e2b70ce47fe65985f195b257bd", + "content-hash": "3230eea9e592f0b712e78c1ef5f5e244", "packages": [ { "name": "adhocore/jwt", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/adhocore/php-jwt.git", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899" + "reference": "ad417603d9d45578b6af2089ad5b78f101c82367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/6c434af7170090bb7a8880d2bc220a2254ba7899", - "reference": "6c434af7170090bb7a8880d2bc220a2254ba7899", + "url": "https://api.github.com/repos/adhocore/php-jwt/zipball/ad417603d9d45578b6af2089ad5b78f101c82367", + "reference": "ad417603d9d45578b6af2089ad5b78f101c82367", "shasum": "" }, "require": { "php": "^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.5" + "phpunit/phpunit": "^7.5 || ^8.5" }, "type": "library", "autoload": { @@ -53,15 +53,19 @@ ], "support": { "issues": "https://github.com/adhocore/php-jwt/issues", - "source": "https://github.com/adhocore/php-jwt/tree/1.1.2" + "source": "https://github.com/adhocore/php-jwt/tree/1.1.3" }, "funding": [ { "url": "https://paypal.me/ji10", "type": "custom" + }, + { + "url": "https://github.com/adhocore", + "type": "github" } ], - "time": "2021-02-20T09:56:44+00:00" + "time": "2025-02-18T01:00:50+00:00" }, { "name": "appwrite/appwrite", @@ -157,16 +161,16 @@ }, { "name": "appwrite/php-runtimes", - "version": "0.19.0", + "version": "0.19.1", "source": { "type": "git", "url": "https://github.com/appwrite/runtimes.git", - "reference": "8d21483efc19b9d977e323188989ee67a188464b" + "reference": "7bd0cc3cb97de625d7b07230bd91b121f88e72ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/runtimes/zipball/8d21483efc19b9d977e323188989ee67a188464b", - "reference": "8d21483efc19b9d977e323188989ee67a188464b", + "url": "https://api.github.com/repos/appwrite/runtimes/zipball/7bd0cc3cb97de625d7b07230bd91b121f88e72ae", + "reference": "7bd0cc3cb97de625d7b07230bd91b121f88e72ae", "shasum": "" }, "require": { @@ -206,9 +210,9 @@ ], "support": { "issues": "https://github.com/appwrite/runtimes/issues", - "source": "https://github.com/appwrite/runtimes/tree/0.19.0" + "source": "https://github.com/appwrite/runtimes/tree/0.19.1" }, - "time": "2025-03-25T22:37:51+00:00" + "time": "2025-05-27T07:12:56+00:00" }, { "name": "beberlei/assert", @@ -565,16 +569,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.2", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", "shasum": "" }, "require": { @@ -614,7 +618,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -622,7 +626,7 @@ "type": "github" } ], - "time": "2022-09-10T18:51:20+00:00" + "time": "2023-08-10T19:36:49+00:00" }, { "name": "giggsey/libphonenumber-for-php-lite", @@ -709,16 +713,16 @@ }, { "name": "google/protobuf", - "version": "v4.31.0", + "version": "v4.31.1", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "d59e31ce4bf0e4b48728e90c4d880839edb5be07" + "reference": "2b028ce8876254e2acbeceea7d9b573faad41864" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/d59e31ce4bf0e4b48728e90c4d880839edb5be07", - "reference": "d59e31ce4bf0e4b48728e90c4d880839edb5be07", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/2b028ce8876254e2acbeceea7d9b573faad41864", + "reference": "2b028ce8876254e2acbeceea7d9b573faad41864", "shasum": "" }, "require": { @@ -747,9 +751,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.31.0" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.31.1" }, - "time": "2025-05-14T16:17:23+00:00" + "time": "2025-05-28T18:52:35+00:00" }, { "name": "league/csv", @@ -1238,16 +1242,16 @@ }, { "name": "open-telemetry/exporter-otlp", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/exporter-otlp.git", - "reference": "19adf03d2b0f91f9e9b1c7f93db6c755c737cf6c" + "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/19adf03d2b0f91f9e9b1c7f93db6c755c737cf6c", - "reference": "19adf03d2b0f91f9e9b1c7f93db6c755c737cf6c", + "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/8b3ca1f86d01429c73b407bf1a2075d9c187001e", + "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e", "shasum": "" }, "require": { @@ -1298,7 +1302,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-12T00:36:35+00:00" + "time": "2025-05-21T12:02:20+00:00" }, { "name": "open-telemetry/gen-otlp-protobuf", @@ -1365,16 +1369,16 @@ }, { "name": "open-telemetry/sdk", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "939d3a28395c249a763676458140dad44b3a8011" + "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/939d3a28395c249a763676458140dad44b3a8011", - "reference": "939d3a28395c249a763676458140dad44b3a8011", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/cd0d7367599717fc29e04eb8838ec061e6c2c657", + "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657", "shasum": "" }, "require": { @@ -1451,7 +1455,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-07T12:32:21+00:00" + "time": "2025-05-22T02:33:34+00:00" }, { "name": "open-telemetry/sem-conv", @@ -2486,16 +2490,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -2508,7 +2512,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -2533,7 +2537,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -2549,20 +2553,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/http-client", - "version": "v7.2.4", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "78981a2ffef6437ed92d4d7e2a86a82f256c6dc6" + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/78981a2ffef6437ed92d4d7e2a86a82f256c6dc6", - "reference": "78981a2ffef6437ed92d4d7e2a86a82f256c6dc6", + "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", "shasum": "" }, "require": { @@ -2628,7 +2632,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.2.4" + "source": "https://github.com/symfony/http-client/tree/v7.3.0" }, "funding": [ { @@ -2644,20 +2648,20 @@ "type": "tidelift" } ], - "time": "2025-02-13T10:27:23+00:00" + "time": "2025-05-02T08:23:16+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v3.5.2", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645" + "reference": "75d7043853a42837e68111812f4d964b01e5101c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645", - "reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c", + "reference": "75d7043853a42837e68111812f4d964b01e5101c", "shasum": "" }, "require": { @@ -2670,7 +2674,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -2706,7 +2710,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.6.0" }, "funding": [ { @@ -2722,7 +2726,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T08:49:48+00:00" + "time": "2025-04-29T11:18:49+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -2883,16 +2887,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -2910,7 +2914,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -2946,7 +2950,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -2962,7 +2966,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "tbachert/spi", @@ -3499,16 +3503,16 @@ }, { "name": "utopia-php/database", - "version": "0.69.5", + "version": "0.69.7", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "4abe53609dfc23b2ea82884d12b149df6a8af2f5" + "reference": "3db51ec544b3f287511209e34bab3f5ec85fa56e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/4abe53609dfc23b2ea82884d12b149df6a8af2f5", - "reference": "4abe53609dfc23b2ea82884d12b149df6a8af2f5", + "url": "https://api.github.com/repos/utopia-php/database/zipball/3db51ec544b3f287511209e34bab3f5ec85fa56e", + "reference": "3db51ec544b3f287511209e34bab3f5ec85fa56e", "shasum": "" }, "require": { @@ -3549,22 +3553,22 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.69.5" + "source": "https://github.com/utopia-php/database/tree/0.69.7" }, - "time": "2025-05-17T08:01:51+00:00" + "time": "2025-05-30T14:41:25+00:00" }, { "name": "utopia-php/detector", - "version": "0.1.4", + "version": "0.1.5", "source": { "type": "git", "url": "https://github.com/utopia-php/detector.git", - "reference": "895a4147463965b5f9cbc083b764b6476f547879" + "reference": "b5d6ba51352485b524589bc0ee8d07a9efafe718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/detector/zipball/895a4147463965b5f9cbc083b764b6476f547879", - "reference": "895a4147463965b5f9cbc083b764b6476f547879", + "url": "https://api.github.com/repos/utopia-php/detector/zipball/b5d6ba51352485b524589bc0ee8d07a9efafe718", + "reference": "b5d6ba51352485b524589bc0ee8d07a9efafe718", "shasum": "" }, "require": { @@ -3594,30 +3598,31 @@ ], "support": { "issues": "https://github.com/utopia-php/detector/issues", - "source": "https://github.com/utopia-php/detector/tree/0.1.4" + "source": "https://github.com/utopia-php/detector/tree/0.1.5" }, - "time": "2025-04-09T11:50:45+00:00" + "time": "2025-05-19T11:01:28+00:00" }, { "name": "utopia-php/domains", - "version": "0.5.0", + "version": "0.8.0", "source": { "type": "git", "url": "https://github.com/utopia-php/domains.git", - "reference": "bf07f60326f8389f378ddf6fcde86217e5cfe18c" + "reference": "650463d2a1525273eb03223c48da9fb1a768bbf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/bf07f60326f8389f378ddf6fcde86217e5cfe18c", - "reference": "bf07f60326f8389f378ddf6fcde86217e5cfe18c", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/650463d2a1525273eb03223c48da9fb1a768bbf7", + "reference": "650463d2a1525273eb03223c48da9fb1a768bbf7", "shasum": "" }, "require": { "php": ">=8.0", - "utopia-php/framework": "0.*.*" + "utopia-php/framework": "0.33.*" }, "require-dev": { "laravel/pint": "1.2.*", + "phpstan/phpstan": "1.9.x-dev", "phpunit/phpunit": "^9.3" }, "type": "library", @@ -3654,9 +3659,9 @@ ], "support": { "issues": "https://github.com/utopia-php/domains/issues", - "source": "https://github.com/utopia-php/domains/tree/0.5.0" + "source": "https://github.com/utopia-php/domains/tree/0.8.0" }, - "time": "2024-01-03T22:04:27+00:00" + "time": "2025-05-16T10:03:59+00:00" }, { "name": "utopia-php/dsn", @@ -3746,16 +3751,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.19", + "version": "0.33.20", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "64c7b7bb8a8595ffe875fa8d4b7705684dbf46c0" + "reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/64c7b7bb8a8595ffe875fa8d4b7705684dbf46c0", - "reference": "64c7b7bb8a8595ffe875fa8d4b7705684dbf46c0", + "url": "https://api.github.com/repos/utopia-php/http/zipball/e1c7ab4e0b5b0a9a70256b1e00912e101e76a131", + "reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131", "shasum": "" }, "require": { @@ -3787,9 +3792,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.19" + "source": "https://github.com/utopia-php/http/tree/0.33.20" }, - "time": "2025-03-06T11:37:49+00:00" + "time": "2025-05-18T23:51:21+00:00" }, { "name": "utopia-php/image", @@ -3947,16 +3952,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.17.0", + "version": "0.18.0", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "c51915d0e030db3a3add37f1561751d18b2d9a85" + "reference": "c151aa5d4d475c788ca15c210b5b2017e21c41d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/c51915d0e030db3a3add37f1561751d18b2d9a85", - "reference": "c51915d0e030db3a3add37f1561751d18b2d9a85", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/c151aa5d4d475c788ca15c210b5b2017e21c41d6", + "reference": "c151aa5d4d475c788ca15c210b5b2017e21c41d6", "shasum": "" }, "require": { @@ -3992,9 +3997,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.17.0" + "source": "https://github.com/utopia-php/messaging/tree/0.18.0" }, - "time": "2025-05-12T16:14:08+00:00" + "time": "2025-05-15T05:00:03+00:00" }, { "name": "utopia-php/migration", @@ -4104,16 +4109,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.4", + "version": "0.7.8", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "a5b93d8177702ec458c3af9137663133c012b71b" + "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/a5b93d8177702ec458c3af9137663133c012b71b", - "reference": "a5b93d8177702ec458c3af9137663133c012b71b", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/e3a4536c46f10988b1a446ec6b8dd8a9914be854", + "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854", "shasum": "" }, "require": { @@ -4122,11 +4127,11 @@ "php": ">=8.0", "utopia-php/cli": "0.15.*", "utopia-php/framework": "0.33.*", - "utopia-php/queue": "0.9.*" + "utopia-php/queue": "0.11.*" }, "require-dev": { - "laravel/pint": "1.2.*", - "phpunit/phpunit": "^9.3" + "laravel/pint": "1.*", + "phpunit/phpunit": "9.*" }, "type": "library", "autoload": { @@ -4148,9 +4153,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.4" + "source": "https://github.com/utopia-php/platform/tree/0.7.8" }, - "time": "2025-03-13T13:00:12+00:00" + "time": "2025-05-30T10:05:43+00:00" }, { "name": "utopia-php/pools", @@ -4259,16 +4264,16 @@ }, { "name": "utopia-php/queue", - "version": "0.9.1", + "version": "0.11.1", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "32b6f84c55aae761db5a5ae76cc91ca8dbc8bc32" + "reference": "498bbbef418b1db71b51e1bb62f5d1d752ddd8d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/32b6f84c55aae761db5a5ae76cc91ca8dbc8bc32", - "reference": "32b6f84c55aae761db5a5ae76cc91ca8dbc8bc32", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/498bbbef418b1db71b51e1bb62f5d1d752ddd8d6", + "reference": "498bbbef418b1db71b51e1bb62f5d1d752ddd8d6", "shasum": "" }, "require": { @@ -4277,6 +4282,7 @@ "utopia-php/cli": "0.15.*", "utopia-php/fetch": "0.4.*", "utopia-php/framework": "0.33.*", + "utopia-php/pools": "0.8.*", "utopia-php/telemetry": "0.1.*" }, "require-dev": { @@ -4318,9 +4324,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.9.1" + "source": "https://github.com/utopia-php/queue/tree/0.11.1" }, - "time": "2025-03-28T19:49:36+00:00" + "time": "2025-05-30T11:50:34+00:00" }, { "name": "utopia-php/registry", @@ -4376,16 +4382,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.12", + "version": "0.18.13", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "9a2556c39b5f4d9f8e79111fd34ec889b7bb1e97" + "reference": "3d8ce53ae042173bf230445e996056c5f65ded22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/9a2556c39b5f4d9f8e79111fd34ec889b7bb1e97", - "reference": "9a2556c39b5f4d9f8e79111fd34ec889b7bb1e97", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/3d8ce53ae042173bf230445e996056c5f65ded22", + "reference": "3d8ce53ae042173bf230445e996056c5f65ded22", "shasum": "" }, "require": { @@ -4428,9 +4434,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.12" + "source": "https://github.com/utopia-php/storage/tree/0.18.13" }, - "time": "2025-05-15T07:55:58+00:00" + "time": "2025-05-26T13:10:35+00:00" }, { "name": "utopia-php/swoole", @@ -4814,16 +4820,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.40.17", + "version": "0.41.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "7e333c1003bfd4763e4d6f3a0a799fde5e7bc4de" + "reference": "96316272a3cee1a3abf5b9f05ae49ebbff03725e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/7e333c1003bfd4763e4d6f3a0a799fde5e7bc4de", - "reference": "7e333c1003bfd4763e4d6f3a0a799fde5e7bc4de", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/96316272a3cee1a3abf5b9f05ae49ebbff03725e", + "reference": "96316272a3cee1a3abf5b9f05ae49ebbff03725e", "shasum": "" }, "require": { @@ -4859,9 +4865,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.40.17" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.0" }, - "time": "2025-05-16T15:10:54+00:00" + "time": "2025-05-26T09:47:45+00:00" }, { "name": "doctrine/annotations", @@ -7260,23 +7266,24 @@ }, { "name": "symfony/console", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218", - "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^7.2" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -7333,7 +7340,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.6" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -7349,11 +7356,11 @@ "type": "tidelift" } ], - "time": "2025-04-07T19:09:28+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/filesystem", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -7399,7 +7406,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.2.0" + "source": "https://github.com/symfony/filesystem/tree/v7.3.0" }, "funding": [ { @@ -7419,16 +7426,16 @@ }, { "name": "symfony/finder", - "version": "v7.2.2", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb" + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb", + "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", "shasum": "" }, "require": { @@ -7463,7 +7470,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.2" + "source": "https://github.com/symfony/finder/tree/v7.3.0" }, "funding": [ { @@ -7479,20 +7486,20 @@ "type": "tidelift" } ], - "time": "2024-12-30T19:00:17+00:00" + "time": "2024-12-30T19:00:26+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50" + "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50", - "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/afb9a8038025e5dbc657378bfab9198d75f10fca", + "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca", "shasum": "" }, "require": { @@ -7530,7 +7537,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.2.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.0" }, "funding": [ { @@ -7546,7 +7553,7 @@ "type": "tidelift" } ], - "time": "2024-11-20T11:17:29+00:00" + "time": "2025-04-04T13:12:05+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7864,16 +7871,16 @@ }, { "name": "symfony/process", - "version": "v7.2.5", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", + "url": "https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", "shasum": "" }, "require": { @@ -7905,7 +7912,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.5" + "source": "https://github.com/symfony/process/tree/v7.3.0" }, "funding": [ { @@ -7921,20 +7928,20 @@ "type": "tidelift" } ], - "time": "2025-03-13T12:21:46+00:00" + "time": "2025-04-17T09:11:12+00:00" }, { "name": "symfony/string", - "version": "v7.2.6", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", - "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", "shasum": "" }, "require": { @@ -7992,7 +7999,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.6" + "source": "https://github.com/symfony/string/tree/v7.3.0" }, "funding": [ { @@ -8008,7 +8015,7 @@ "type": "tidelift" } ], - "time": "2025-04-20T20:18:16+00:00" + "time": "2025-04-20T20:19:01+00:00" }, { "name": "textalk/websocket", diff --git a/docker-compose.yml b/docker-compose.yml index 7b141030731..cefd082c2fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -213,7 +213,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:5.3.0-sites-rc.43 + image: appwrite/console:6.0.13 restart: unless-stopped networks: - appwrite @@ -951,7 +951,7 @@ services: hostname: exc1 <<: *x-logging stop_signal: SIGINT - image: openruntimes/executor:0.7.14 + image: openruntimes/executor:0.7.20 restart: unless-stopped networks: - appwrite diff --git a/docs/examples/1.7.x/client-android/java/databases/create-documents.md b/docs/examples/1.7.x/client-android/java/databases/create-documents.md new file mode 100644 index 00000000000..dbdc64f1115 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/create-documents.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setKey(""); // + +Databases databases = new Databases(client); + +databases.createDocuments( + "", // databaseId + "", // collectionId + listOf(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/java/databases/upsert-document.md b/docs/examples/1.7.x/client-android/java/databases/upsert-document.md new file mode 100644 index 00000000000..868576b9825 --- /dev/null +++ b/docs/examples/1.7.x/client-android/java/databases/upsert-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/create-documents.md b/docs/examples/1.7.x/client-android/kotlin/databases/create-documents.md new file mode 100644 index 00000000000..33635b4e4c3 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/create-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setKey("") // + +val databases = Databases(client) + +val result = databases.createDocuments( + databaseId = "", + collectionId = "", + documents = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.7.x/client-android/kotlin/databases/upsert-document.md new file mode 100644 index 00000000000..a31dfc87974 --- /dev/null +++ b/docs/examples/1.7.x/client-android/kotlin/databases/upsert-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-apple/examples/databases/create-documents.md b/docs/examples/1.7.x/client-apple/examples/databases/create-documents.md new file mode 100644 index 00000000000..b47247a3599 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setKey("") // + +let databases = Databases(client) + +let documentList = try await databases.createDocuments( + databaseId: "", + collectionId: "", + documents: [] +) + diff --git a/docs/examples/1.7.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.7.x/client-apple/examples/databases/upsert-document.md new file mode 100644 index 00000000000..3e1bf83a662 --- /dev/null +++ b/docs/examples/1.7.x/client-apple/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/create-documents.md b/docs/examples/1.7.x/client-flutter/examples/databases/create-documents.md new file mode 100644 index 00000000000..953553749ab --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/create-documents.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setKey(''); // + +Databases databases = Databases(client); + +DocumentList result = await databases.createDocuments( + databaseId: '', + collectionId: '', + documents: [], +); diff --git a/docs/examples/1.7.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.7.x/client-flutter/examples/databases/upsert-document.md new file mode 100644 index 00000000000..398a99cb1dc --- /dev/null +++ b/docs/examples/1.7.x/client-flutter/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/create-documents.md b/docs/examples/1.7.x/client-graphql/examples/databases/create-documents.md new file mode 100644 index 00000000000..3e3a50f3abf --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/create-documents.md @@ -0,0 +1,18 @@ +mutation { + databasesCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.7.x/client-graphql/examples/databases/upsert-document.md b/docs/examples/1.7.x/client-graphql/examples/databases/upsert-document.md new file mode 100644 index 00000000000..2ccab1c4909 --- /dev/null +++ b/docs/examples/1.7.x/client-graphql/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +mutation { + databasesUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/create-documents.md b/docs/examples/1.7.x/client-react-native/examples/databases/create-documents.md new file mode 100644 index 00000000000..08663b6dbe2 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setKey(''); // + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.7.x/client-react-native/examples/databases/upsert-document.md new file mode 100644 index 00000000000..ae423d12a78 --- /dev/null +++ b/docs/examples/1.7.x/client-react-native/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-rest/examples/databases/create-documents.md b/docs/examples/1.7.x/client-rest/examples/databases/create-documents.md new file mode 100644 index 00000000000..e4d2b956e0c --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/create-documents.md @@ -0,0 +1,11 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "documents": [] +} diff --git a/docs/examples/1.7.x/client-rest/examples/databases/upsert-document.md b/docs/examples/1.7.x/client-rest/examples/databases/upsert-document.md new file mode 100644 index 00000000000..f834802b7ec --- /dev/null +++ b/docs/examples/1.7.x/client-rest/examples/databases/upsert-document.md @@ -0,0 +1,12 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.7.x/client-web/examples/databases/create-documents.md b/docs/examples/1.7.x/client-web/examples/databases/create-documents.md new file mode 100644 index 00000000000..ec6bdf244a9 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setKey(''); // + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.7.x/client-web/examples/databases/upsert-document.md new file mode 100644 index 00000000000..cfefe062429 --- /dev/null +++ b/docs/examples/1.7.x/client-web/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 00000000000..a7eb9c5be3f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1 @@ +appwrite account createAnonymousSession diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-email-password-session.md b/docs/examples/1.7.x/console-cli/examples/account/create-email-password-session.md new file mode 100644 index 00000000000..951293b4b29 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-email-password-session.md @@ -0,0 +1,3 @@ +appwrite account createEmailPasswordSession \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-email-token.md b/docs/examples/1.7.x/console-cli/examples/account/create-email-token.md new file mode 100644 index 00000000000..0aaf2476c9f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-email-token.md @@ -0,0 +1,4 @@ +appwrite account createEmailToken \ + --userId \ + --email email@example.com \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/account/create-j-w-t.md new file mode 100644 index 00000000000..7b5337993de --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-j-w-t.md @@ -0,0 +1 @@ +appwrite account createJWT diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/console-cli/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 00000000000..69203b085d1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,5 @@ +appwrite account createMagicURLToken \ + --userId \ + --email email@example.com \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-authenticator.md new file mode 100644 index 00000000000..7634217700d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account createMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-challenge.md new file mode 100644 index 00000000000..8696be7ec12 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-challenge.md @@ -0,0 +1,2 @@ +appwrite account createMfaChallenge \ + --factor email diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 00000000000..0ef25446fd3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account createMfaRecoveryCodes diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2session.md new file mode 100644 index 00000000000..9159b8f25f6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2session.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Session \ + --provider amazon \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2token.md new file mode 100644 index 00000000000..b36f350d996 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-o-auth2token.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Token \ + --provider amazon \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-phone-token.md b/docs/examples/1.7.x/console-cli/examples/account/create-phone-token.md new file mode 100644 index 00000000000..23f7f19cac1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-phone-token.md @@ -0,0 +1,3 @@ +appwrite account createPhoneToken \ + --userId \ + --phone +12065550100 diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-phone-verification.md b/docs/examples/1.7.x/console-cli/examples/account/create-phone-verification.md new file mode 100644 index 00000000000..3c4402ba1fe --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-phone-verification.md @@ -0,0 +1 @@ +appwrite account createPhoneVerification diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-push-target.md b/docs/examples/1.7.x/console-cli/examples/account/create-push-target.md new file mode 100644 index 00000000000..41c380b2889 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-push-target.md @@ -0,0 +1,4 @@ +appwrite account createPushTarget \ + --targetId \ + --identifier \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-recovery.md b/docs/examples/1.7.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 00000000000..ea8c145abb5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,3 @@ +appwrite account createRecovery \ + --email email@example.com \ + --url https://example.com diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-session.md b/docs/examples/1.7.x/console-cli/examples/account/create-session.md new file mode 100644 index 00000000000..426713ef506 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-session.md @@ -0,0 +1,3 @@ +appwrite account createSession \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/create-verification.md b/docs/examples/1.7.x/console-cli/examples/account/create-verification.md new file mode 100644 index 00000000000..402038b4b6c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,2 @@ +appwrite account createVerification \ + --url https://example.com diff --git a/docs/examples/1.7.x/console-cli/examples/account/create.md b/docs/examples/1.7.x/console-cli/examples/account/create.md new file mode 100644 index 00000000000..09686a24545 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/create.md @@ -0,0 +1,5 @@ +appwrite account create \ + --userId \ + --email email@example.com \ + --password '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-identity.md b/docs/examples/1.7.x/console-cli/examples/account/delete-identity.md new file mode 100644 index 00000000000..acd8511dfba --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-identity.md @@ -0,0 +1,2 @@ +appwrite account deleteIdentity \ + --identityId diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/account/delete-mfa-authenticator.md new file mode 100644 index 00000000000..d4664855b5c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account deleteMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-push-target.md b/docs/examples/1.7.x/console-cli/examples/account/delete-push-target.md new file mode 100644 index 00000000000..610ea232d84 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-push-target.md @@ -0,0 +1,2 @@ +appwrite account deletePushTarget \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-session.md b/docs/examples/1.7.x/console-cli/examples/account/delete-session.md new file mode 100644 index 00000000000..97745524083 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,2 @@ +appwrite account deleteSession \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete-sessions.md b/docs/examples/1.7.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 00000000000..dd11877a5d0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1 @@ +appwrite account deleteSessions diff --git a/docs/examples/1.7.x/console-cli/examples/account/delete.md b/docs/examples/1.7.x/console-cli/examples/account/delete.md new file mode 100644 index 00000000000..dac412f7c29 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/delete.md @@ -0,0 +1 @@ +appwrite account delete diff --git a/docs/examples/1.7.x/console-cli/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 00000000000..0e61d658de8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account getMfaRecoveryCodes diff --git a/docs/examples/1.7.x/console-cli/examples/account/get-prefs.md b/docs/examples/1.7.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 00000000000..6569925d992 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1 @@ +appwrite account getPrefs diff --git a/docs/examples/1.7.x/console-cli/examples/account/get-session.md b/docs/examples/1.7.x/console-cli/examples/account/get-session.md new file mode 100644 index 00000000000..120dc8277fc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get-session.md @@ -0,0 +1,2 @@ +appwrite account getSession \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/account/get.md b/docs/examples/1.7.x/console-cli/examples/account/get.md new file mode 100644 index 00000000000..c8b46e34c77 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/get.md @@ -0,0 +1 @@ +appwrite account get diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-identities.md b/docs/examples/1.7.x/console-cli/examples/account/list-identities.md new file mode 100644 index 00000000000..877b443ea86 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-identities.md @@ -0,0 +1,2 @@ +appwrite account listIdentities \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-logs.md b/docs/examples/1.7.x/console-cli/examples/account/list-logs.md new file mode 100644 index 00000000000..e92f49063a0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-logs.md @@ -0,0 +1,2 @@ +appwrite account listLogs \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/console-cli/examples/account/list-mfa-factors.md new file mode 100644 index 00000000000..a29f287d240 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-mfa-factors.md @@ -0,0 +1 @@ +appwrite account listMfaFactors diff --git a/docs/examples/1.7.x/console-cli/examples/account/list-sessions.md b/docs/examples/1.7.x/console-cli/examples/account/list-sessions.md new file mode 100644 index 00000000000..87cbab0f666 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/list-sessions.md @@ -0,0 +1 @@ +appwrite account listSessions diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-email.md b/docs/examples/1.7.x/console-cli/examples/account/update-email.md new file mode 100644 index 00000000000..81938ff3a9e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-email.md @@ -0,0 +1,3 @@ +appwrite account updateEmail \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-m-f-a.md b/docs/examples/1.7.x/console-cli/examples/account/update-m-f-a.md new file mode 100644 index 00000000000..f714d4dbe9f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-m-f-a.md @@ -0,0 +1,2 @@ +appwrite account updateMFA \ + --mfa false diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/console-cli/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 00000000000..919bd70a302 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,3 @@ +appwrite account updateMagicURLSession \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-authenticator.md new file mode 100644 index 00000000000..b51796a79e7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite account updateMfaAuthenticator \ + --type totp \ + --otp diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-challenge.md new file mode 100644 index 00000000000..37e09ef4e8e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-challenge.md @@ -0,0 +1,3 @@ +appwrite account updateMfaChallenge \ + --challengeId \ + --otp diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 00000000000..a129ca6f988 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account updateMfaRecoveryCodes diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-name.md b/docs/examples/1.7.x/console-cli/examples/account/update-name.md new file mode 100644 index 00000000000..6f3b5977f47 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-name.md @@ -0,0 +1,2 @@ +appwrite account updateName \ + --name diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-password.md b/docs/examples/1.7.x/console-cli/examples/account/update-password.md new file mode 100644 index 00000000000..340baec5620 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-password.md @@ -0,0 +1,3 @@ +appwrite account updatePassword \ + --password '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-phone-session.md b/docs/examples/1.7.x/console-cli/examples/account/update-phone-session.md new file mode 100644 index 00000000000..d70f33fab50 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-phone-session.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneSession \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-phone-verification.md b/docs/examples/1.7.x/console-cli/examples/account/update-phone-verification.md new file mode 100644 index 00000000000..cef2b5a40db --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneVerification \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-phone.md b/docs/examples/1.7.x/console-cli/examples/account/update-phone.md new file mode 100644 index 00000000000..93a619a801d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-phone.md @@ -0,0 +1,3 @@ +appwrite account updatePhone \ + --phone +12065550100 \ + --password password diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-prefs.md b/docs/examples/1.7.x/console-cli/examples/account/update-prefs.md new file mode 100644 index 00000000000..568ac66e482 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,2 @@ +appwrite account updatePrefs \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-push-target.md b/docs/examples/1.7.x/console-cli/examples/account/update-push-target.md new file mode 100644 index 00000000000..f3aa1a906a8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-push-target.md @@ -0,0 +1,3 @@ +appwrite account updatePushTarget \ + --targetId \ + --identifier diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-recovery.md b/docs/examples/1.7.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 00000000000..903a99cc99f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,4 @@ +appwrite account updateRecovery \ + --userId \ + --secret \ + --password '' diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-session.md b/docs/examples/1.7.x/console-cli/examples/account/update-session.md new file mode 100644 index 00000000000..5fb6a2e8d52 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-session.md @@ -0,0 +1,2 @@ +appwrite account updateSession \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-status.md b/docs/examples/1.7.x/console-cli/examples/account/update-status.md new file mode 100644 index 00000000000..8886dbbc6a7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-status.md @@ -0,0 +1 @@ +appwrite account updateStatus diff --git a/docs/examples/1.7.x/console-cli/examples/account/update-verification.md b/docs/examples/1.7.x/console-cli/examples/account/update-verification.md new file mode 100644 index 00000000000..afdfaa83729 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,3 @@ +appwrite account updateVerification \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/assistant/chat.md b/docs/examples/1.7.x/console-cli/examples/assistant/chat.md new file mode 100644 index 00000000000..cf62d30515f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/assistant/chat.md @@ -0,0 +1,2 @@ +appwrite assistant chat \ + --prompt diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-browser.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-browser.md new file mode 100644 index 00000000000..6b4f0b8007d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-browser.md @@ -0,0 +1,5 @@ +appwrite avatars getBrowser \ + --code aa \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-credit-card.md new file mode 100644 index 00000000000..365568ba195 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-credit-card.md @@ -0,0 +1,5 @@ +appwrite avatars getCreditCard \ + --code amex \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-favicon.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-favicon.md new file mode 100644 index 00000000000..c658f1a4834 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-favicon.md @@ -0,0 +1,2 @@ +appwrite avatars getFavicon \ + --url https://example.com diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-flag.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-flag.md new file mode 100644 index 00000000000..9f11fef8407 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-flag.md @@ -0,0 +1,5 @@ +appwrite avatars getFlag \ + --code af \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-image.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-image.md new file mode 100644 index 00000000000..7df150610c8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-image.md @@ -0,0 +1,4 @@ +appwrite avatars getImage \ + --url https://example.com \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-initials.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-initials.md new file mode 100644 index 00000000000..b0b3da71c94 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +appwrite avatars getInitials \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/avatars/get-q-r.md b/docs/examples/1.7.x/console-cli/examples/avatars/get-q-r.md new file mode 100644 index 00000000000..01e50857329 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/avatars/get-q-r.md @@ -0,0 +1,5 @@ +appwrite avatars getQR \ + --text \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/console/get-resource.md b/docs/examples/1.7.x/console-cli/examples/console/get-resource.md new file mode 100644 index 00000000000..3e55163966f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/console/get-resource.md @@ -0,0 +1,3 @@ +appwrite console getResource \ + --value \ + --type rules diff --git a/docs/examples/1.7.x/console-cli/examples/console/variables.md b/docs/examples/1.7.x/console-cli/examples/console/variables.md new file mode 100644 index 00000000000..1c67cf5ad87 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/console/variables.md @@ -0,0 +1 @@ +appwrite console variables diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-boolean-attribute.md new file mode 100644 index 00000000000..6babbfb5af0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/create-collection.md new file mode 100644 index 00000000000..d97c424d163 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-collection.md @@ -0,0 +1,7 @@ +appwrite databases createCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-datetime-attribute.md new file mode 100644 index 00000000000..f6aaf54fa2d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-document.md b/docs/examples/1.7.x/console-cli/examples/databases/create-document.md new file mode 100644 index 00000000000..513cfc4f337 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-document.md @@ -0,0 +1,6 @@ +appwrite databases createDocument \ + --databaseId \ + --collectionId \ + --documentId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-documents.md b/docs/examples/1.7.x/console-cli/examples/databases/create-documents.md new file mode 100644 index 00000000000..e9e65b5c3c7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-documents.md @@ -0,0 +1,4 @@ +appwrite databases createDocuments \ + --databaseId \ + --collectionId \ + --documents one two three diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-email-attribute.md new file mode 100644 index 00000000000..5c23f940de4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-enum-attribute.md new file mode 100644 index 00000000000..5d3c6144105 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases createEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-float-attribute.md new file mode 100644 index 00000000000..5a6ef4e4eff --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-index.md b/docs/examples/1.7.x/console-cli/examples/databases/create-index.md new file mode 100644 index 00000000000..2dc95ea9217 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-index.md @@ -0,0 +1,8 @@ +appwrite databases createIndex \ + --databaseId \ + --collectionId \ + --key '' \ + --type key \ + --attributes one two three \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-integer-attribute.md new file mode 100644 index 00000000000..791f3770c91 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-ip-attribute.md new file mode 100644 index 00000000000..4f39d84bab0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-relationship-attribute.md new file mode 100644 index 00000000000..c7d8ae568a1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-relationship-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createRelationshipAttribute \ + --databaseId \ + --collectionId \ + --relatedCollectionId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-string-attribute.md new file mode 100644 index 00000000000..37b1db644af --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-string-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/create-url-attribute.md new file mode 100644 index 00000000000..4406ed7879b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create.md b/docs/examples/1.7.x/console-cli/examples/databases/create.md new file mode 100644 index 00000000000..9e7523974f4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/create.md @@ -0,0 +1,4 @@ +appwrite databases create \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-attribute.md new file mode 100644 index 00000000000..88e7df985fa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-attribute.md @@ -0,0 +1,4 @@ +appwrite databases deleteAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-collection.md new file mode 100644 index 00000000000..0db185a7d7b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-collection.md @@ -0,0 +1,3 @@ +appwrite databases deleteCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-document.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-document.md new file mode 100644 index 00000000000..3a96d357986 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-document.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocument \ + --databaseId \ + --collectionId \ + --documentId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-documents.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-documents.md new file mode 100644 index 00000000000..6f3463cbf9d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-documents.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete-index.md b/docs/examples/1.7.x/console-cli/examples/databases/delete-index.md new file mode 100644 index 00000000000..56485e7a782 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete-index.md @@ -0,0 +1,4 @@ +appwrite databases deleteIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/delete.md b/docs/examples/1.7.x/console-cli/examples/databases/delete.md new file mode 100644 index 00000000000..a24a3a04d37 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/delete.md @@ -0,0 +1,2 @@ +appwrite databases delete \ + --databaseId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/get-attribute.md new file mode 100644 index 00000000000..821698011f6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-attribute.md @@ -0,0 +1,4 @@ +appwrite databases getAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-collection-usage.md b/docs/examples/1.7.x/console-cli/examples/databases/get-collection-usage.md new file mode 100644 index 00000000000..b57e6c92a97 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-collection-usage.md @@ -0,0 +1,4 @@ +appwrite databases getCollectionUsage \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/get-collection.md new file mode 100644 index 00000000000..e763b5bbfbc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-collection.md @@ -0,0 +1,3 @@ +appwrite databases getCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-database-usage.md b/docs/examples/1.7.x/console-cli/examples/databases/get-database-usage.md new file mode 100644 index 00000000000..1001e9cd117 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite databases getDatabaseUsage \ + --databaseId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-document.md b/docs/examples/1.7.x/console-cli/examples/databases/get-document.md new file mode 100644 index 00000000000..35d96155032 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-document.md @@ -0,0 +1,5 @@ +appwrite databases getDocument \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-index.md b/docs/examples/1.7.x/console-cli/examples/databases/get-index.md new file mode 100644 index 00000000000..0071834a8c4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-index.md @@ -0,0 +1,4 @@ +appwrite databases getIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get-usage.md b/docs/examples/1.7.x/console-cli/examples/databases/get-usage.md new file mode 100644 index 00000000000..53c85fc8491 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get-usage.md @@ -0,0 +1,2 @@ +appwrite databases getUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/get.md b/docs/examples/1.7.x/console-cli/examples/databases/get.md new file mode 100644 index 00000000000..35480b64cc2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/get.md @@ -0,0 +1,2 @@ +appwrite databases get \ + --databaseId diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-attributes.md b/docs/examples/1.7.x/console-cli/examples/databases/list-attributes.md new file mode 100644 index 00000000000..a2382feb3ac --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-attributes.md @@ -0,0 +1,4 @@ +appwrite databases listAttributes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-collection-logs.md b/docs/examples/1.7.x/console-cli/examples/databases/list-collection-logs.md new file mode 100644 index 00000000000..eadac47a6be --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-collection-logs.md @@ -0,0 +1,4 @@ +appwrite databases listCollectionLogs \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-collections.md b/docs/examples/1.7.x/console-cli/examples/databases/list-collections.md new file mode 100644 index 00000000000..b05c330be26 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-collections.md @@ -0,0 +1,4 @@ +appwrite databases listCollections \ + --databaseId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-document-logs.md b/docs/examples/1.7.x/console-cli/examples/databases/list-document-logs.md new file mode 100644 index 00000000000..63b53946476 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-document-logs.md @@ -0,0 +1,5 @@ +appwrite databases listDocumentLogs \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-documents.md b/docs/examples/1.7.x/console-cli/examples/databases/list-documents.md new file mode 100644 index 00000000000..98e389579d3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-documents.md @@ -0,0 +1,4 @@ +appwrite databases listDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-indexes.md b/docs/examples/1.7.x/console-cli/examples/databases/list-indexes.md new file mode 100644 index 00000000000..50acb4d7ad5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-indexes.md @@ -0,0 +1,4 @@ +appwrite databases listIndexes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list-logs.md b/docs/examples/1.7.x/console-cli/examples/databases/list-logs.md new file mode 100644 index 00000000000..38547c7c3cf --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list-logs.md @@ -0,0 +1,3 @@ +appwrite databases listLogs \ + --databaseId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/list.md b/docs/examples/1.7.x/console-cli/examples/databases/list.md new file mode 100644 index 00000000000..e723bc32ec0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/list.md @@ -0,0 +1,3 @@ +appwrite databases list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-boolean-attribute.md new file mode 100644 index 00000000000..f5adb497ece --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-collection.md b/docs/examples/1.7.x/console-cli/examples/databases/update-collection.md new file mode 100644 index 00000000000..eab3617c803 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-collection.md @@ -0,0 +1,7 @@ +appwrite databases updateCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-datetime-attribute.md new file mode 100644 index 00000000000..fe4a4626649 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-document.md b/docs/examples/1.7.x/console-cli/examples/databases/update-document.md new file mode 100644 index 00000000000..a4ac55bf6b6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-document.md @@ -0,0 +1,6 @@ +appwrite databases updateDocument \ + --databaseId \ + --collectionId \ + --documentId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-documents.md b/docs/examples/1.7.x/console-cli/examples/databases/update-documents.md new file mode 100644 index 00000000000..935f6644403 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-documents.md @@ -0,0 +1,5 @@ +appwrite databases updateDocuments \ + --databaseId \ + --collectionId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-email-attribute.md new file mode 100644 index 00000000000..58510a6f8e5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-enum-attribute.md new file mode 100644 index 00000000000..21d56d3e64a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-float-attribute.md new file mode 100644 index 00000000000..a9bba3eb5e8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-integer-attribute.md new file mode 100644 index 00000000000..660cd4d1480 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-ip-attribute.md new file mode 100644 index 00000000000..a400eadc1ea --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-relationship-attribute.md new file mode 100644 index 00000000000..6e2dbd927d5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-relationship-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateRelationshipAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-string-attribute.md new file mode 100644 index 00000000000..526ece0b72e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-string-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/console-cli/examples/databases/update-url-attribute.md new file mode 100644 index 00000000000..e6f401b8ca6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/update.md b/docs/examples/1.7.x/console-cli/examples/databases/update.md new file mode 100644 index 00000000000..a1e0a844e58 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/update.md @@ -0,0 +1,4 @@ +appwrite databases update \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/upsert-document.md b/docs/examples/1.7.x/console-cli/examples/databases/upsert-document.md new file mode 100644 index 00000000000..40932014ba9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/upsert-document.md @@ -0,0 +1,6 @@ +appwrite databases upsertDocument \ + --databaseId \ + --collectionId \ + --documentId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/databases/upsert-documents.md b/docs/examples/1.7.x/console-cli/examples/databases/upsert-documents.md new file mode 100644 index 00000000000..cb1677b14ca --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/databases/upsert-documents.md @@ -0,0 +1,4 @@ +appwrite databases upsertDocuments \ + --databaseId \ + --collectionId \ + --documents one two three diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-deployment.md new file mode 100644 index 00000000000..6ac80bd73a3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,6 @@ +appwrite functions createDeployment \ + --functionId \ + --code 'path/to/file.png' \ + --activate false \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-duplicate-deployment.md new file mode 100644 index 00000000000..4839155bd22 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,4 @@ +appwrite functions createDuplicateDeployment \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-execution.md b/docs/examples/1.7.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 00000000000..febe88c5412 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,8 @@ +appwrite functions createExecution \ + --functionId \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-template-deployment.md new file mode 100644 index 00000000000..a6164a3d0b9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite functions createTemplateDeployment \ + --functionId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/create-variable.md new file mode 100644 index 00000000000..f35f228d41d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-variable.md @@ -0,0 +1,5 @@ +appwrite functions createVariable \ + --functionId \ + --key \ + --value \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/create-vcs-deployment.md new file mode 100644 index 00000000000..89f4caca66c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite functions createVcsDeployment \ + --functionId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/create.md b/docs/examples/1.7.x/console-cli/examples/functions/create.md new file mode 100644 index 00000000000..ebca5741ed5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/create.md @@ -0,0 +1,19 @@ +appwrite functions create \ + --functionId \ + --name \ + --runtime node-14.5 \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 00000000000..2c9a6aa04ac --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite functions deleteDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete-execution.md b/docs/examples/1.7.x/console-cli/examples/functions/delete-execution.md new file mode 100644 index 00000000000..2926b5aaf1c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete-execution.md @@ -0,0 +1,3 @@ +appwrite functions deleteExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/delete-variable.md new file mode 100644 index 00000000000..835d125dc65 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete-variable.md @@ -0,0 +1,3 @@ +appwrite functions deleteVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/delete.md b/docs/examples/1.7.x/console-cli/examples/functions/delete.md new file mode 100644 index 00000000000..0eea41c849f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/delete.md @@ -0,0 +1,2 @@ +appwrite functions delete \ + --functionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment-download.md new file mode 100644 index 00000000000..485b608623f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite functions getDeploymentDownload \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 00000000000..3da1605fea0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,3 @@ +appwrite functions getDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-execution.md b/docs/examples/1.7.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 00000000000..d593f07c43c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,3 @@ +appwrite functions getExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-template.md b/docs/examples/1.7.x/console-cli/examples/functions/get-template.md new file mode 100644 index 00000000000..15c6068f355 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-template.md @@ -0,0 +1,2 @@ +appwrite functions getTemplate \ + --templateId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-usage.md b/docs/examples/1.7.x/console-cli/examples/functions/get-usage.md new file mode 100644 index 00000000000..469db0f171f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-usage.md @@ -0,0 +1,3 @@ +appwrite functions getUsage \ + --functionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/get-variable.md new file mode 100644 index 00000000000..241a91d936c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get-variable.md @@ -0,0 +1,3 @@ +appwrite functions getVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/get.md b/docs/examples/1.7.x/console-cli/examples/functions/get.md new file mode 100644 index 00000000000..f678ef76634 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/get.md @@ -0,0 +1,2 @@ +appwrite functions get \ + --functionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-deployments.md b/docs/examples/1.7.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 00000000000..2befb86abc0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,4 @@ +appwrite functions listDeployments \ + --functionId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-executions.md b/docs/examples/1.7.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 00000000000..8d3136e6a49 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,3 @@ +appwrite functions listExecutions \ + --functionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-runtimes.md b/docs/examples/1.7.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 00000000000..15dc019c448 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1 @@ +appwrite functions listRuntimes diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-specifications.md b/docs/examples/1.7.x/console-cli/examples/functions/list-specifications.md new file mode 100644 index 00000000000..1d64bc68e76 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-specifications.md @@ -0,0 +1 @@ +appwrite functions listSpecifications diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-templates.md b/docs/examples/1.7.x/console-cli/examples/functions/list-templates.md new file mode 100644 index 00000000000..b48bab53e1f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-templates.md @@ -0,0 +1,5 @@ +appwrite functions listTemplates \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-usage.md b/docs/examples/1.7.x/console-cli/examples/functions/list-usage.md new file mode 100644 index 00000000000..8ae7855f45c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-usage.md @@ -0,0 +1,2 @@ +appwrite functions listUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list-variables.md b/docs/examples/1.7.x/console-cli/examples/functions/list-variables.md new file mode 100644 index 00000000000..21bf2eb5064 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list-variables.md @@ -0,0 +1,2 @@ +appwrite functions listVariables \ + --functionId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/list.md b/docs/examples/1.7.x/console-cli/examples/functions/list.md new file mode 100644 index 00000000000..3b7551266ea --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/list.md @@ -0,0 +1,3 @@ +appwrite functions list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/console-cli/examples/functions/update-deployment-status.md new file mode 100644 index 00000000000..06d2dcdcf06 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite functions updateDeploymentStatus \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/console-cli/examples/functions/update-function-deployment.md new file mode 100644 index 00000000000..652bfe809e4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update-function-deployment.md @@ -0,0 +1,3 @@ +appwrite functions updateFunctionDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update-variable.md b/docs/examples/1.7.x/console-cli/examples/functions/update-variable.md new file mode 100644 index 00000000000..a2b10491c6b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update-variable.md @@ -0,0 +1,6 @@ +appwrite functions updateVariable \ + --functionId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/functions/update.md b/docs/examples/1.7.x/console-cli/examples/functions/update.md new file mode 100644 index 00000000000..7ac63e0cd1e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/functions/update.md @@ -0,0 +1,19 @@ +appwrite functions update \ + --functionId \ + --name \ + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/graphql/mutation.md b/docs/examples/1.7.x/console-cli/examples/graphql/mutation.md new file mode 100644 index 00000000000..f6127a175cb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/graphql/mutation.md @@ -0,0 +1,2 @@ +appwrite graphql mutation \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/graphql/query.md b/docs/examples/1.7.x/console-cli/examples/graphql/query.md new file mode 100644 index 00000000000..1d84bcaa6ae --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/graphql/query.md @@ -0,0 +1,2 @@ +appwrite graphql query \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-antivirus.md b/docs/examples/1.7.x/console-cli/examples/health/get-antivirus.md new file mode 100644 index 00000000000..96dd7e78b20 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-antivirus.md @@ -0,0 +1 @@ +appwrite health getAntivirus diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-cache.md b/docs/examples/1.7.x/console-cli/examples/health/get-cache.md new file mode 100644 index 00000000000..ad1111ccf0c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-cache.md @@ -0,0 +1 @@ +appwrite health getCache diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-certificate.md b/docs/examples/1.7.x/console-cli/examples/health/get-certificate.md new file mode 100644 index 00000000000..4659415822b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-certificate.md @@ -0,0 +1,2 @@ +appwrite health getCertificate \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-d-b.md b/docs/examples/1.7.x/console-cli/examples/health/get-d-b.md new file mode 100644 index 00000000000..b0ea2d3eac2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-d-b.md @@ -0,0 +1 @@ +appwrite health getDB diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/console-cli/examples/health/get-failed-jobs.md new file mode 100644 index 00000000000..724299e384f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-failed-jobs.md @@ -0,0 +1,3 @@ +appwrite health getFailedJobs \ + --name v1-database \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-pub-sub.md b/docs/examples/1.7.x/console-cli/examples/health/get-pub-sub.md new file mode 100644 index 00000000000..aa1773b35b2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-pub-sub.md @@ -0,0 +1 @@ +appwrite health getPubSub diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-builds.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-builds.md new file mode 100644 index 00000000000..7204c2c8961 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-builds.md @@ -0,0 +1,2 @@ +appwrite health getQueueBuilds \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-certificates.md new file mode 100644 index 00000000000..203e8650cca --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-certificates.md @@ -0,0 +1,2 @@ +appwrite health getQueueCertificates \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-databases.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-databases.md new file mode 100644 index 00000000000..f30b941cbc3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-databases.md @@ -0,0 +1,3 @@ +appwrite health getQueueDatabases \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-deletes.md new file mode 100644 index 00000000000..1d44146dc49 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-deletes.md @@ -0,0 +1,2 @@ +appwrite health getQueueDeletes \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-functions.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-functions.md new file mode 100644 index 00000000000..4aca4673061 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-functions.md @@ -0,0 +1,2 @@ +appwrite health getQueueFunctions \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-logs.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-logs.md new file mode 100644 index 00000000000..3f1386b73a6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-logs.md @@ -0,0 +1,2 @@ +appwrite health getQueueLogs \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-mails.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-mails.md new file mode 100644 index 00000000000..a41f4c308b1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-mails.md @@ -0,0 +1,2 @@ +appwrite health getQueueMails \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-messaging.md new file mode 100644 index 00000000000..11b7ff832b4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-messaging.md @@ -0,0 +1,2 @@ +appwrite health getQueueMessaging \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-migrations.md new file mode 100644 index 00000000000..2f17bb56f4a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-migrations.md @@ -0,0 +1,2 @@ +appwrite health getQueueMigrations \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-resources.md new file mode 100644 index 00000000000..9cce9637489 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-stats-resources.md @@ -0,0 +1,2 @@ +appwrite health getQueueStatsResources \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-usage.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-usage.md new file mode 100644 index 00000000000..d021a3faa17 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-usage.md @@ -0,0 +1,2 @@ +appwrite health getQueueUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/console-cli/examples/health/get-queue-webhooks.md new file mode 100644 index 00000000000..471175bbe43 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-queue-webhooks.md @@ -0,0 +1,2 @@ +appwrite health getQueueWebhooks \ + diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-storage-local.md b/docs/examples/1.7.x/console-cli/examples/health/get-storage-local.md new file mode 100644 index 00000000000..b5df39fae08 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-storage-local.md @@ -0,0 +1 @@ +appwrite health getStorageLocal diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-storage.md b/docs/examples/1.7.x/console-cli/examples/health/get-storage.md new file mode 100644 index 00000000000..eccd21acc39 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-storage.md @@ -0,0 +1 @@ +appwrite health getStorage diff --git a/docs/examples/1.7.x/console-cli/examples/health/get-time.md b/docs/examples/1.7.x/console-cli/examples/health/get-time.md new file mode 100644 index 00000000000..067e5daf9ea --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get-time.md @@ -0,0 +1 @@ +appwrite health getTime diff --git a/docs/examples/1.7.x/console-cli/examples/health/get.md b/docs/examples/1.7.x/console-cli/examples/health/get.md new file mode 100644 index 00000000000..94c08e5aa31 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/health/get.md @@ -0,0 +1 @@ +appwrite health get diff --git a/docs/examples/1.7.x/console-cli/examples/locale/get.md b/docs/examples/1.7.x/console-cli/examples/locale/get.md new file mode 100644 index 00000000000..2002a06c206 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/get.md @@ -0,0 +1 @@ +appwrite locale get diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-codes.md b/docs/examples/1.7.x/console-cli/examples/locale/list-codes.md new file mode 100644 index 00000000000..5586d1566c6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-codes.md @@ -0,0 +1 @@ +appwrite locale listCodes diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-continents.md b/docs/examples/1.7.x/console-cli/examples/locale/list-continents.md new file mode 100644 index 00000000000..775af5d9dfa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-continents.md @@ -0,0 +1 @@ +appwrite locale listContinents diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-e-u.md new file mode 100644 index 00000000000..43b7eff7adf --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-e-u.md @@ -0,0 +1 @@ +appwrite locale listCountriesEU diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-phones.md new file mode 100644 index 00000000000..072516bf719 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-countries-phones.md @@ -0,0 +1 @@ +appwrite locale listCountriesPhones diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-countries.md b/docs/examples/1.7.x/console-cli/examples/locale/list-countries.md new file mode 100644 index 00000000000..ee7101df68d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-countries.md @@ -0,0 +1 @@ +appwrite locale listCountries diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-currencies.md b/docs/examples/1.7.x/console-cli/examples/locale/list-currencies.md new file mode 100644 index 00000000000..01b1b3c4b29 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-currencies.md @@ -0,0 +1 @@ +appwrite locale listCurrencies diff --git a/docs/examples/1.7.x/console-cli/examples/locale/list-languages.md b/docs/examples/1.7.x/console-cli/examples/locale/list-languages.md new file mode 100644 index 00000000000..d47622c5702 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/locale/list-languages.md @@ -0,0 +1 @@ +appwrite locale listLanguages diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-apns-provider.md new file mode 100644 index 00000000000..8b369f403d7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createApnsProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-email.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-email.md new file mode 100644 index 00000000000..2a8e03b7dab --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-email.md @@ -0,0 +1,13 @@ +appwrite messaging createEmail \ + --messageId \ + --subject \ + --content \ + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-fcm-provider.md new file mode 100644 index 00000000000..a19dcbe28c1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging createFcmProvider \ + --providerId \ + --name \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-mailgun-provider.md new file mode 100644 index 00000000000..6b073591945 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging createMailgunProvider \ + --providerId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-msg91provider.md new file mode 100644 index 00000000000..f687e364721 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging createMsg91Provider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-push.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-push.md new file mode 100644 index 00000000000..18d8ec5aeca --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-push.md @@ -0,0 +1,20 @@ +appwrite messaging createPush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 00000000000..de8d059abbb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createSendgridProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-sms.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-sms.md new file mode 100644 index 00000000000..dfc9b27ff30 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-sms.md @@ -0,0 +1,8 @@ +appwrite messaging createSms \ + --messageId \ + --content \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-smtp-provider.md new file mode 100644 index 00000000000..13f04fe6486 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging createSmtpProvider \ + --providerId \ + --name \ + --host \ + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-subscriber.md new file mode 100644 index 00000000000..5e65c36df74 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-subscriber.md @@ -0,0 +1,4 @@ +appwrite messaging createSubscriber \ + --topicId \ + --subscriberId \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-telesign-provider.md new file mode 100644 index 00000000000..783f7594fdd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTelesignProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-textmagic-provider.md new file mode 100644 index 00000000000..77185c71de7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTextmagicProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-topic.md new file mode 100644 index 00000000000..1d57e1cee09 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-topic.md @@ -0,0 +1,4 @@ +appwrite messaging createTopic \ + --topicId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-twilio-provider.md new file mode 100644 index 00000000000..91fdaae96be --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTwilioProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/create-vonage-provider.md new file mode 100644 index 00000000000..1939d1c04b8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/create-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createVonageProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete-provider.md new file mode 100644 index 00000000000..a93885573c5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete-provider.md @@ -0,0 +1,2 @@ +appwrite messaging deleteProvider \ + --providerId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete-subscriber.md new file mode 100644 index 00000000000..c535154df61 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging deleteSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete-topic.md new file mode 100644 index 00000000000..1fa387c6abf --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete-topic.md @@ -0,0 +1,2 @@ +appwrite messaging deleteTopic \ + --topicId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/delete.md b/docs/examples/1.7.x/console-cli/examples/messaging/delete.md new file mode 100644 index 00000000000..82ff141b038 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/delete.md @@ -0,0 +1,2 @@ +appwrite messaging delete \ + --messageId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-message.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-message.md new file mode 100644 index 00000000000..0144f79699b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-message.md @@ -0,0 +1,2 @@ +appwrite messaging getMessage \ + --messageId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-provider.md new file mode 100644 index 00000000000..9da9f2d8647 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-provider.md @@ -0,0 +1,2 @@ +appwrite messaging getProvider \ + --providerId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-subscriber.md new file mode 100644 index 00000000000..02f8bc0e579 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging getSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/get-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/get-topic.md new file mode 100644 index 00000000000..feb2dc66b64 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/get-topic.md @@ -0,0 +1,2 @@ +appwrite messaging getTopic \ + --topicId diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-message-logs.md new file mode 100644 index 00000000000..91366f35f73 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-message-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listMessageLogs \ + --messageId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-messages.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-messages.md new file mode 100644 index 00000000000..6ab04b0fd24 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-messages.md @@ -0,0 +1,3 @@ +appwrite messaging listMessages \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-provider-logs.md new file mode 100644 index 00000000000..0dee2e3f4b5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-provider-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listProviderLogs \ + --providerId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-providers.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-providers.md new file mode 100644 index 00000000000..0a2ce47a3fb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-providers.md @@ -0,0 +1,3 @@ +appwrite messaging listProviders \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscriber-logs.md new file mode 100644 index 00000000000..4a04ac43733 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listSubscriberLogs \ + --subscriberId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscribers.md new file mode 100644 index 00000000000..2eed8bd3f0b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-subscribers.md @@ -0,0 +1,4 @@ +appwrite messaging listSubscribers \ + --topicId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-targets.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-targets.md new file mode 100644 index 00000000000..7efa50ee3b2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-targets.md @@ -0,0 +1,3 @@ +appwrite messaging listTargets \ + --messageId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-topic-logs.md new file mode 100644 index 00000000000..f23c10aba66 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-topic-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listTopicLogs \ + --topicId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/list-topics.md b/docs/examples/1.7.x/console-cli/examples/messaging/list-topics.md new file mode 100644 index 00000000000..1810a7bd7b3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/list-topics.md @@ -0,0 +1,3 @@ +appwrite messaging listTopics \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-apns-provider.md new file mode 100644 index 00000000000..9e895a066a2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateApnsProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-email.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-email.md new file mode 100644 index 00000000000..934fd29213d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-email.md @@ -0,0 +1,13 @@ +appwrite messaging updateEmail \ + --messageId \ + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-fcm-provider.md new file mode 100644 index 00000000000..000022361f6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging updateFcmProvider \ + --providerId \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-mailgun-provider.md new file mode 100644 index 00000000000..f35c5e91573 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging updateMailgunProvider \ + --providerId \ + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-msg91provider.md new file mode 100644 index 00000000000..8e2d604a19e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateMsg91Provider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-push.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-push.md new file mode 100644 index 00000000000..1f4427cee7d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-push.md @@ -0,0 +1,20 @@ +appwrite messaging updatePush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 00000000000..7f2e97dbf7a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateSendgridProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-sms.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-sms.md new file mode 100644 index 00000000000..a30ff43d0ce --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-sms.md @@ -0,0 +1,8 @@ +appwrite messaging updateSms \ + --messageId \ + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-smtp-provider.md new file mode 100644 index 00000000000..4e0f7b6b8dc --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging updateSmtpProvider \ + --providerId \ + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-telesign-provider.md new file mode 100644 index 00000000000..0a92f2cacd8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTelesignProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-textmagic-provider.md new file mode 100644 index 00000000000..79160b24613 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTextmagicProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-topic.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-topic.md new file mode 100644 index 00000000000..d10b0edde33 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-topic.md @@ -0,0 +1,4 @@ +appwrite messaging updateTopic \ + --topicId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-twilio-provider.md new file mode 100644 index 00000000000..c967d724afe --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTwilioProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/console-cli/examples/messaging/update-vonage-provider.md new file mode 100644 index 00000000000..11f7963be2b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/messaging/update-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateVonageProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-appwrite-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-appwrite-migration.md new file mode 100644 index 00000000000..73e9ee62d8e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,5 @@ +appwrite migrations createAppwriteMigration \ + --resources one two three \ + --endpoint https://example.com \ + --projectId \ + --apiKey diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-csv-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-csv-migration.md new file mode 100644 index 00000000000..594bc85052b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-csv-migration.md @@ -0,0 +1,4 @@ +appwrite migrations createCsvMigration \ + --bucketId \ + --fileId \ + --resourceId [ID1:ID2] diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-firebase-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-firebase-migration.md new file mode 100644 index 00000000000..3dfb3aeac67 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-firebase-migration.md @@ -0,0 +1,3 @@ +appwrite migrations createFirebaseMigration \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-n-host-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-n-host-migration.md new file mode 100644 index 00000000000..d9598971099 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-n-host-migration.md @@ -0,0 +1,9 @@ +appwrite migrations createNHostMigration \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/create-supabase-migration.md b/docs/examples/1.7.x/console-cli/examples/migrations/create-supabase-migration.md new file mode 100644 index 00000000000..0620f3ba2eb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/create-supabase-migration.md @@ -0,0 +1,8 @@ +appwrite migrations createSupabaseMigration \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/delete.md b/docs/examples/1.7.x/console-cli/examples/migrations/delete.md new file mode 100644 index 00000000000..9dac1aa3db3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/delete.md @@ -0,0 +1,2 @@ +appwrite migrations delete \ + --migrationId diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-appwrite-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-appwrite-report.md new file mode 100644 index 00000000000..745e9fb98c6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-appwrite-report.md @@ -0,0 +1,5 @@ +appwrite migrations getAppwriteReport \ + --resources one two three \ + --endpoint https://example.com \ + --projectID \ + --key diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-firebase-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-firebase-report.md new file mode 100644 index 00000000000..73c7e1ca143 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-firebase-report.md @@ -0,0 +1,3 @@ +appwrite migrations getFirebaseReport \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-n-host-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-n-host-report.md new file mode 100644 index 00000000000..6b7e2eaff2e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-n-host-report.md @@ -0,0 +1,9 @@ +appwrite migrations getNHostReport \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get-supabase-report.md b/docs/examples/1.7.x/console-cli/examples/migrations/get-supabase-report.md new file mode 100644 index 00000000000..9754f38e248 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get-supabase-report.md @@ -0,0 +1,8 @@ +appwrite migrations getSupabaseReport \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/get.md b/docs/examples/1.7.x/console-cli/examples/migrations/get.md new file mode 100644 index 00000000000..8810646c7eb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/get.md @@ -0,0 +1,2 @@ +appwrite migrations get \ + --migrationId diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/list.md b/docs/examples/1.7.x/console-cli/examples/migrations/list.md new file mode 100644 index 00000000000..c120a61e808 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/list.md @@ -0,0 +1,3 @@ +appwrite migrations list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/migrations/retry.md b/docs/examples/1.7.x/console-cli/examples/migrations/retry.md new file mode 100644 index 00000000000..518f86cee72 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/migrations/retry.md @@ -0,0 +1,2 @@ +appwrite migrations retry \ + --migrationId diff --git a/docs/examples/1.7.x/console-cli/examples/project/create-variable.md b/docs/examples/1.7.x/console-cli/examples/project/create-variable.md new file mode 100644 index 00000000000..253d6ddf757 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/create-variable.md @@ -0,0 +1,4 @@ +appwrite project createVariable \ + --key \ + --value \ + diff --git a/docs/examples/1.7.x/console-cli/examples/project/delete-variable.md b/docs/examples/1.7.x/console-cli/examples/project/delete-variable.md new file mode 100644 index 00000000000..7fdda874fd9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/delete-variable.md @@ -0,0 +1,2 @@ +appwrite project deleteVariable \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/project/get-usage.md b/docs/examples/1.7.x/console-cli/examples/project/get-usage.md new file mode 100644 index 00000000000..9b4c296a8c7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/get-usage.md @@ -0,0 +1,4 @@ +appwrite project getUsage \ + --startDate '' \ + --endDate '' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/project/get-variable.md b/docs/examples/1.7.x/console-cli/examples/project/get-variable.md new file mode 100644 index 00000000000..b2d482586b8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/get-variable.md @@ -0,0 +1,2 @@ +appwrite project getVariable \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/project/list-variables.md b/docs/examples/1.7.x/console-cli/examples/project/list-variables.md new file mode 100644 index 00000000000..bd26c7db6be --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/list-variables.md @@ -0,0 +1 @@ +appwrite project listVariables diff --git a/docs/examples/1.7.x/console-cli/examples/project/update-variable.md b/docs/examples/1.7.x/console-cli/examples/project/update-variable.md new file mode 100644 index 00000000000..4365b648887 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/project/update-variable.md @@ -0,0 +1,5 @@ +appwrite project updateVariable \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-dev-key.md b/docs/examples/1.7.x/console-cli/examples/projects/create-dev-key.md new file mode 100644 index 00000000000..8b9ec8969ad --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-dev-key.md @@ -0,0 +1,4 @@ +appwrite projects createDevKey \ + --projectId \ + --name \ + --expire '' diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/projects/create-j-w-t.md new file mode 100644 index 00000000000..d703d36b65a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite projects createJWT \ + --projectId \ + --scopes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-key.md b/docs/examples/1.7.x/console-cli/examples/projects/create-key.md new file mode 100644 index 00000000000..fb986dcebcd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-key.md @@ -0,0 +1,5 @@ +appwrite projects createKey \ + --projectId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/create-platform.md new file mode 100644 index 00000000000..8727d21d64f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-platform.md @@ -0,0 +1,7 @@ +appwrite projects createPlatform \ + --projectId \ + --type web \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-smtp-test.md b/docs/examples/1.7.x/console-cli/examples/projects/create-smtp-test.md new file mode 100644 index 00000000000..66ce5880aa3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-smtp-test.md @@ -0,0 +1,11 @@ +appwrite projects createSmtpTest \ + --projectId \ + --emails one two three \ + --senderName \ + --senderEmail email@example.com \ + --host '' \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/create-webhook.md new file mode 100644 index 00000000000..03ecf4110dd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create-webhook.md @@ -0,0 +1,9 @@ +appwrite projects createWebhook \ + --projectId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/create.md b/docs/examples/1.7.x/console-cli/examples/projects/create.md new file mode 100644 index 00000000000..05047855033 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/create.md @@ -0,0 +1,14 @@ +appwrite projects create \ + --projectId '' \ + --name \ + --teamId \ + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-dev-key.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-dev-key.md new file mode 100644 index 00000000000..2859a3309f7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-dev-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteDevKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-email-template.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-email-template.md new file mode 100644 index 00000000000..01ce0fac68a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-email-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-key.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-key.md new file mode 100644 index 00000000000..6baf05706ed --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-platform.md new file mode 100644 index 00000000000..a85bd865ba8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-platform.md @@ -0,0 +1,3 @@ +appwrite projects deletePlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-sms-template.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-sms-template.md new file mode 100644 index 00000000000..3afcf649c74 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/delete-webhook.md new file mode 100644 index 00000000000..a67301ef076 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete-webhook.md @@ -0,0 +1,3 @@ +appwrite projects deleteWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/delete.md b/docs/examples/1.7.x/console-cli/examples/projects/delete.md new file mode 100644 index 00000000000..a4ffc70c918 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/delete.md @@ -0,0 +1,2 @@ +appwrite projects delete \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-dev-key.md b/docs/examples/1.7.x/console-cli/examples/projects/get-dev-key.md new file mode 100644 index 00000000000..cfc37ed4370 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-dev-key.md @@ -0,0 +1,3 @@ +appwrite projects getDevKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-email-template.md b/docs/examples/1.7.x/console-cli/examples/projects/get-email-template.md new file mode 100644 index 00000000000..6e4c21e52be --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-email-template.md @@ -0,0 +1,4 @@ +appwrite projects getEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-key.md b/docs/examples/1.7.x/console-cli/examples/projects/get-key.md new file mode 100644 index 00000000000..f69b51bbe2d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-key.md @@ -0,0 +1,3 @@ +appwrite projects getKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/get-platform.md new file mode 100644 index 00000000000..67648be0351 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-platform.md @@ -0,0 +1,3 @@ +appwrite projects getPlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-sms-template.md b/docs/examples/1.7.x/console-cli/examples/projects/get-sms-template.md new file mode 100644 index 00000000000..c655953c8e8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects getSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/get-webhook.md new file mode 100644 index 00000000000..890bf370691 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get-webhook.md @@ -0,0 +1,3 @@ +appwrite projects getWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/get.md b/docs/examples/1.7.x/console-cli/examples/projects/get.md new file mode 100644 index 00000000000..919321b81d5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/get.md @@ -0,0 +1,2 @@ +appwrite projects get \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-dev-keys.md b/docs/examples/1.7.x/console-cli/examples/projects/list-dev-keys.md new file mode 100644 index 00000000000..d552cb3bcaa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-dev-keys.md @@ -0,0 +1,3 @@ +appwrite projects listDevKeys \ + --projectId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-keys.md b/docs/examples/1.7.x/console-cli/examples/projects/list-keys.md new file mode 100644 index 00000000000..cc37680b5b4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-keys.md @@ -0,0 +1,2 @@ +appwrite projects listKeys \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-platforms.md b/docs/examples/1.7.x/console-cli/examples/projects/list-platforms.md new file mode 100644 index 00000000000..5fc2ea41067 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-platforms.md @@ -0,0 +1,2 @@ +appwrite projects listPlatforms \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list-webhooks.md b/docs/examples/1.7.x/console-cli/examples/projects/list-webhooks.md new file mode 100644 index 00000000000..dcf9953f80f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list-webhooks.md @@ -0,0 +1,2 @@ +appwrite projects listWebhooks \ + --projectId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/list.md b/docs/examples/1.7.x/console-cli/examples/projects/list.md new file mode 100644 index 00000000000..0d3dd7a5393 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/list.md @@ -0,0 +1,3 @@ +appwrite projects list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-api-status-all.md b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status-all.md new file mode 100644 index 00000000000..e5f63c59a35 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateApiStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-api-status.md b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status.md new file mode 100644 index 00000000000..01120957af3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-api-status.md @@ -0,0 +1,4 @@ +appwrite projects updateApiStatus \ + --projectId \ + --api rest \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-duration.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-duration.md new file mode 100644 index 00000000000..ad6f8ac97cb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-duration.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthDuration \ + --projectId \ + --duration 0 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-limit.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-limit.md new file mode 100644 index 00000000000..9d01fa5a1ae --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthLimit \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 00000000000..f477bba56d0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordDictionary \ + --projectId \ + --enabled false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-history.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-history.md new file mode 100644 index 00000000000..8b9b90a32a1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-password-history.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordHistory \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 00000000000..2a1294d17b5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthSessionsLimit \ + --projectId \ + --limit 1 diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-auth-status.md b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-status.md new file mode 100644 index 00000000000..848987b2f87 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-auth-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAuthStatus \ + --projectId \ + --method email-password \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-dev-key.md b/docs/examples/1.7.x/console-cli/examples/projects/update-dev-key.md new file mode 100644 index 00000000000..cc950303896 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-dev-key.md @@ -0,0 +1,5 @@ +appwrite projects updateDevKey \ + --projectId \ + --keyId \ + --name \ + --expire '' diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-email-template.md b/docs/examples/1.7.x/console-cli/examples/projects/update-email-template.md new file mode 100644 index 00000000000..a3acd066ec9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-email-template.md @@ -0,0 +1,9 @@ +appwrite projects updateEmailTemplate \ + --projectId \ + --type verification \ + --locale af \ + --subject \ + --message \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-key.md b/docs/examples/1.7.x/console-cli/examples/projects/update-key.md new file mode 100644 index 00000000000..6d3dc198dad --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-key.md @@ -0,0 +1,6 @@ +appwrite projects updateKey \ + --projectId \ + --keyId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-memberships-privacy.md b/docs/examples/1.7.x/console-cli/examples/projects/update-memberships-privacy.md new file mode 100644 index 00000000000..6c811ccfceb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-memberships-privacy.md @@ -0,0 +1,5 @@ +appwrite projects updateMembershipsPrivacy \ + --projectId \ + --userName false \ + --userEmail false \ + --mfa false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-mock-numbers.md b/docs/examples/1.7.x/console-cli/examples/projects/update-mock-numbers.md new file mode 100644 index 00000000000..733cc16887c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-mock-numbers.md @@ -0,0 +1,3 @@ +appwrite projects updateMockNumbers \ + --projectId \ + --numbers one two three diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-o-auth2.md b/docs/examples/1.7.x/console-cli/examples/projects/update-o-auth2.md new file mode 100644 index 00000000000..92f67189622 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-o-auth2.md @@ -0,0 +1,6 @@ +appwrite projects updateOAuth2 \ + --projectId \ + --provider amazon \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-personal-data-check.md b/docs/examples/1.7.x/console-cli/examples/projects/update-personal-data-check.md new file mode 100644 index 00000000000..21dca783698 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-personal-data-check.md @@ -0,0 +1,3 @@ +appwrite projects updatePersonalDataCheck \ + --projectId \ + --enabled false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-platform.md b/docs/examples/1.7.x/console-cli/examples/projects/update-platform.md new file mode 100644 index 00000000000..05b1602ae9e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-platform.md @@ -0,0 +1,7 @@ +appwrite projects updatePlatform \ + --projectId \ + --platformId \ + --name \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-service-status-all.md b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status-all.md new file mode 100644 index 00000000000..1ffb77e085e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateServiceStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-service-status.md b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status.md new file mode 100644 index 00000000000..03963a1214f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-service-status.md @@ -0,0 +1,4 @@ +appwrite projects updateServiceStatus \ + --projectId \ + --service account \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-session-alerts.md b/docs/examples/1.7.x/console-cli/examples/projects/update-session-alerts.md new file mode 100644 index 00000000000..bd23b7417aa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-session-alerts.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionAlerts \ + --projectId \ + --alerts false diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-sms-template.md b/docs/examples/1.7.x/console-cli/examples/projects/update-sms-template.md new file mode 100644 index 00000000000..fc8310eb25d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-sms-template.md @@ -0,0 +1,5 @@ +appwrite projects updateSmsTemplate \ + --projectId \ + --type verification \ + --locale af \ + --message diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-smtp.md b/docs/examples/1.7.x/console-cli/examples/projects/update-smtp.md new file mode 100644 index 00000000000..0afbe9cec98 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-smtp.md @@ -0,0 +1,11 @@ +appwrite projects updateSmtp \ + --projectId \ + --enabled false \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-team.md b/docs/examples/1.7.x/console-cli/examples/projects/update-team.md new file mode 100644 index 00000000000..49214ad9f38 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-team.md @@ -0,0 +1,3 @@ +appwrite projects updateTeam \ + --projectId \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-webhook-signature.md b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook-signature.md new file mode 100644 index 00000000000..6034ef01f61 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook-signature.md @@ -0,0 +1,3 @@ +appwrite projects updateWebhookSignature \ + --projectId \ + --webhookId diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update-webhook.md b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook.md new file mode 100644 index 00000000000..51c536d74c6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update-webhook.md @@ -0,0 +1,10 @@ +appwrite projects updateWebhook \ + --projectId \ + --webhookId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/projects/update.md b/docs/examples/1.7.x/console-cli/examples/projects/update.md new file mode 100644 index 00000000000..d4df289636a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/projects/update.md @@ -0,0 +1,12 @@ +appwrite projects update \ + --projectId \ + --name \ + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 00000000000..5746b94b1e2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,2 @@ +appwrite proxy createAPIRule \ + --domain '' diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-function-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-function-rule.md new file mode 100644 index 00000000000..380650c2089 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-function-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createFunctionRule \ + --domain '' \ + --functionId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-redirect-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-redirect-rule.md new file mode 100644 index 00000000000..f975ce686e7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-redirect-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createRedirectRule \ + --domain '' \ + --url https://example.com \ + --statusCode 301 diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/create-site-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/create-site-rule.md new file mode 100644 index 00000000000..eb41bd7158a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/create-site-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createSiteRule \ + --domain '' \ + --siteId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/delete-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/delete-rule.md new file mode 100644 index 00000000000..b11b6ca23e6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/delete-rule.md @@ -0,0 +1,2 @@ +appwrite proxy deleteRule \ + --ruleId diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/get-rule.md b/docs/examples/1.7.x/console-cli/examples/proxy/get-rule.md new file mode 100644 index 00000000000..85d11a50b11 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/get-rule.md @@ -0,0 +1,2 @@ +appwrite proxy getRule \ + --ruleId diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/list-rules.md b/docs/examples/1.7.x/console-cli/examples/proxy/list-rules.md new file mode 100644 index 00000000000..bc654bac5cf --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/list-rules.md @@ -0,0 +1,3 @@ +appwrite proxy listRules \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/proxy/update-rule-verification.md b/docs/examples/1.7.x/console-cli/examples/proxy/update-rule-verification.md new file mode 100644 index 00000000000..8200d15702d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/proxy/update-rule-verification.md @@ -0,0 +1,2 @@ +appwrite proxy updateRuleVerification \ + --ruleId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-deployment.md new file mode 100644 index 00000000000..a83d7f3cfe3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createDeployment \ + --siteId \ + --code 'path/to/file.png' \ + --activate false \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-duplicate-deployment.md new file mode 100644 index 00000000000..bab63ca8a3c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,3 @@ +appwrite sites createDuplicateDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-template-deployment.md new file mode 100644 index 00000000000..2aaaf445db4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createTemplateDeployment \ + --siteId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/create-variable.md new file mode 100644 index 00000000000..b640321317a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-variable.md @@ -0,0 +1,5 @@ +appwrite sites createVariable \ + --siteId \ + --key \ + --value \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/create-vcs-deployment.md new file mode 100644 index 00000000000..85c96f93ec6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite sites createVcsDeployment \ + --siteId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/create.md b/docs/examples/1.7.x/console-cli/examples/sites/create.md new file mode 100644 index 00000000000..bd7e86e70f7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/create.md @@ -0,0 +1,19 @@ +appwrite sites create \ + --siteId \ + --name \ + --framework analog \ + --buildRuntime node-14.5 \ + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/delete-deployment.md new file mode 100644 index 00000000000..c1cbf49637e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite sites deleteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete-log.md b/docs/examples/1.7.x/console-cli/examples/sites/delete-log.md new file mode 100644 index 00000000000..6769be255c2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete-log.md @@ -0,0 +1,3 @@ +appwrite sites deleteLog \ + --siteId \ + --logId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/delete-variable.md new file mode 100644 index 00000000000..60d9ecf4eb9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete-variable.md @@ -0,0 +1,3 @@ +appwrite sites deleteVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/delete.md b/docs/examples/1.7.x/console-cli/examples/sites/delete.md new file mode 100644 index 00000000000..90714548504 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/delete.md @@ -0,0 +1,2 @@ +appwrite sites delete \ + --siteId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment-download.md new file mode 100644 index 00000000000..1fae298796f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite sites getDeploymentDownload \ + --siteId \ + --deploymentId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment.md new file mode 100644 index 00000000000..93680ff70df --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-deployment.md @@ -0,0 +1,3 @@ +appwrite sites getDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-log.md b/docs/examples/1.7.x/console-cli/examples/sites/get-log.md new file mode 100644 index 00000000000..7867aba05e5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-log.md @@ -0,0 +1,3 @@ +appwrite sites getLog \ + --siteId \ + --logId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-template.md b/docs/examples/1.7.x/console-cli/examples/sites/get-template.md new file mode 100644 index 00000000000..e04dd2e120d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-template.md @@ -0,0 +1,2 @@ +appwrite sites getTemplate \ + --templateId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-usage.md b/docs/examples/1.7.x/console-cli/examples/sites/get-usage.md new file mode 100644 index 00000000000..6de7d6bde8a --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-usage.md @@ -0,0 +1,3 @@ +appwrite sites getUsage \ + --siteId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/get-variable.md new file mode 100644 index 00000000000..b60b577c384 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get-variable.md @@ -0,0 +1,3 @@ +appwrite sites getVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/get.md b/docs/examples/1.7.x/console-cli/examples/sites/get.md new file mode 100644 index 00000000000..7922efa5f0e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/get.md @@ -0,0 +1,2 @@ +appwrite sites get \ + --siteId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-deployments.md b/docs/examples/1.7.x/console-cli/examples/sites/list-deployments.md new file mode 100644 index 00000000000..5ab2cdc1040 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-deployments.md @@ -0,0 +1,4 @@ +appwrite sites listDeployments \ + --siteId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-frameworks.md b/docs/examples/1.7.x/console-cli/examples/sites/list-frameworks.md new file mode 100644 index 00000000000..1d9b6b4b872 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-frameworks.md @@ -0,0 +1 @@ +appwrite sites listFrameworks diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-logs.md b/docs/examples/1.7.x/console-cli/examples/sites/list-logs.md new file mode 100644 index 00000000000..f13864fe6b0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-logs.md @@ -0,0 +1,3 @@ +appwrite sites listLogs \ + --siteId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-specifications.md b/docs/examples/1.7.x/console-cli/examples/sites/list-specifications.md new file mode 100644 index 00000000000..dc1a16c9dc6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-specifications.md @@ -0,0 +1 @@ +appwrite sites listSpecifications diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-templates.md b/docs/examples/1.7.x/console-cli/examples/sites/list-templates.md new file mode 100644 index 00000000000..9d93913d94d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-templates.md @@ -0,0 +1,5 @@ +appwrite sites listTemplates \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-usage.md b/docs/examples/1.7.x/console-cli/examples/sites/list-usage.md new file mode 100644 index 00000000000..a6f43f61e76 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-usage.md @@ -0,0 +1,2 @@ +appwrite sites listUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list-variables.md b/docs/examples/1.7.x/console-cli/examples/sites/list-variables.md new file mode 100644 index 00000000000..13a258b054e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list-variables.md @@ -0,0 +1,2 @@ +appwrite sites listVariables \ + --siteId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/list.md b/docs/examples/1.7.x/console-cli/examples/sites/list.md new file mode 100644 index 00000000000..0cad70e8941 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/list.md @@ -0,0 +1,3 @@ +appwrite sites list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/console-cli/examples/sites/update-deployment-status.md new file mode 100644 index 00000000000..7923b384f6f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite sites updateDeploymentStatus \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/console-cli/examples/sites/update-site-deployment.md new file mode 100644 index 00000000000..de877d8ae7e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update-site-deployment.md @@ -0,0 +1,3 @@ +appwrite sites updateSiteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update-variable.md b/docs/examples/1.7.x/console-cli/examples/sites/update-variable.md new file mode 100644 index 00000000000..e9687710567 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update-variable.md @@ -0,0 +1,6 @@ +appwrite sites updateVariable \ + --siteId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/sites/update.md b/docs/examples/1.7.x/console-cli/examples/sites/update.md new file mode 100644 index 00000000000..192ee26e3e3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/sites/update.md @@ -0,0 +1,19 @@ +appwrite sites update \ + --siteId \ + --name \ + --framework analog \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/create-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 00000000000..878c10d2532 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,11 @@ +appwrite storage createBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/create-file.md b/docs/examples/1.7.x/console-cli/examples/storage/create-file.md new file mode 100644 index 00000000000..67bd4da2c0e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,5 @@ +appwrite storage createFile \ + --bucketId \ + --fileId \ + --file 'path/to/file.png' \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/delete-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 00000000000..e51797e12cb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,2 @@ +appwrite storage deleteBucket \ + --bucketId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/delete-file.md b/docs/examples/1.7.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 00000000000..79c03e82885 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,3 @@ +appwrite storage deleteFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-bucket-usage.md b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket-usage.md new file mode 100644 index 00000000000..df3659c60aa --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket-usage.md @@ -0,0 +1,3 @@ +appwrite storage getBucketUsage \ + --bucketId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 00000000000..cf8725b35d7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,2 @@ +appwrite storage getBucket \ + --bucketId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md new file mode 100644 index 00000000000..79f3368d87c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,4 @@ +appwrite storage getFileDownload \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md new file mode 100644 index 00000000000..de437af65b7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,15 @@ +appwrite storage getFilePreview \ + --bucketId \ + --fileId \ + + + + + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md new file mode 100644 index 00000000000..689cf1233ba --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,4 @@ +appwrite storage getFileView \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file.md new file mode 100644 index 00000000000..641c20d2b0c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,3 @@ +appwrite storage getFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-usage.md b/docs/examples/1.7.x/console-cli/examples/storage/get-usage.md new file mode 100644 index 00000000000..29466e02f01 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-usage.md @@ -0,0 +1,2 @@ +appwrite storage getUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/list-buckets.md b/docs/examples/1.7.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 00000000000..a5cad1988f1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,3 @@ +appwrite storage listBuckets \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/list-files.md b/docs/examples/1.7.x/console-cli/examples/storage/list-files.md new file mode 100644 index 00000000000..0e1c2f09c05 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,4 @@ +appwrite storage listFiles \ + --bucketId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/update-bucket.md b/docs/examples/1.7.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 00000000000..b006a7bf74f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,11 @@ +appwrite storage updateBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/update-file.md b/docs/examples/1.7.x/console-cli/examples/storage/update-file.md new file mode 100644 index 00000000000..593ea658a0e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +appwrite storage updateFile \ + --bucketId \ + --fileId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/create-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 00000000000..0d0fc8df098 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,8 @@ +appwrite teams createMembership \ + --teamId \ + --roles one two three \ + + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/create.md b/docs/examples/1.7.x/console-cli/examples/teams/create.md new file mode 100644 index 00000000000..e0f9a126f28 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/create.md @@ -0,0 +1,4 @@ +appwrite teams create \ + --teamId \ + --name \ + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/delete-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 00000000000..58d0adbac70 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,3 @@ +appwrite teams deleteMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/delete.md b/docs/examples/1.7.x/console-cli/examples/teams/delete.md new file mode 100644 index 00000000000..5b018158cd4 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/delete.md @@ -0,0 +1,2 @@ +appwrite teams delete \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/get-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 00000000000..5e6af4c1a1b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,3 @@ +appwrite teams getMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/get-prefs.md b/docs/examples/1.7.x/console-cli/examples/teams/get-prefs.md new file mode 100644 index 00000000000..2ab1f1dc015 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/get-prefs.md @@ -0,0 +1,2 @@ +appwrite teams getPrefs \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/get.md b/docs/examples/1.7.x/console-cli/examples/teams/get.md new file mode 100644 index 00000000000..c8e75b7543f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/get.md @@ -0,0 +1,2 @@ +appwrite teams get \ + --teamId diff --git a/docs/examples/1.7.x/console-cli/examples/teams/list-logs.md b/docs/examples/1.7.x/console-cli/examples/teams/list-logs.md new file mode 100644 index 00000000000..66149350d89 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/list-logs.md @@ -0,0 +1,3 @@ +appwrite teams listLogs \ + --teamId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/list-memberships.md b/docs/examples/1.7.x/console-cli/examples/teams/list-memberships.md new file mode 100644 index 00000000000..050ea961d22 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/list-memberships.md @@ -0,0 +1,4 @@ +appwrite teams listMemberships \ + --teamId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/list.md b/docs/examples/1.7.x/console-cli/examples/teams/list.md new file mode 100644 index 00000000000..dfffc4d4dd5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/list.md @@ -0,0 +1,3 @@ +appwrite teams list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-membership-status.md b/docs/examples/1.7.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 00000000000..aa4acf94571 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,5 @@ +appwrite teams updateMembershipStatus \ + --teamId \ + --membershipId \ + --userId \ + --secret diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-membership.md b/docs/examples/1.7.x/console-cli/examples/teams/update-membership.md new file mode 100644 index 00000000000..6cfda92920c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-membership.md @@ -0,0 +1,4 @@ +appwrite teams updateMembership \ + --teamId \ + --membershipId \ + --roles one two three diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-name.md b/docs/examples/1.7.x/console-cli/examples/teams/update-name.md new file mode 100644 index 00000000000..8c73e00d7b9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-name.md @@ -0,0 +1,3 @@ +appwrite teams updateName \ + --teamId \ + --name diff --git a/docs/examples/1.7.x/console-cli/examples/teams/update-prefs.md b/docs/examples/1.7.x/console-cli/examples/teams/update-prefs.md new file mode 100644 index 00000000000..b6fc5a8f6e2 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/teams/update-prefs.md @@ -0,0 +1,3 @@ +appwrite teams updatePrefs \ + --teamId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md b/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md new file mode 100644 index 00000000000..8de8d7ac6c5 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md @@ -0,0 +1,4 @@ +appwrite tokens createFileToken \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/delete.md b/docs/examples/1.7.x/console-cli/examples/tokens/delete.md new file mode 100644 index 00000000000..c25ea4a4b4f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/delete.md @@ -0,0 +1,2 @@ +appwrite tokens delete \ + --tokenId diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/get.md b/docs/examples/1.7.x/console-cli/examples/tokens/get.md new file mode 100644 index 00000000000..2c48280b0dd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/get.md @@ -0,0 +1,2 @@ +appwrite tokens get \ + --tokenId diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/list.md b/docs/examples/1.7.x/console-cli/examples/tokens/list.md new file mode 100644 index 00000000000..a808e545ca8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/list.md @@ -0,0 +1,4 @@ +appwrite tokens list \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/update.md b/docs/examples/1.7.x/console-cli/examples/tokens/update.md new file mode 100644 index 00000000000..73f21609b63 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/tokens/update.md @@ -0,0 +1,3 @@ +appwrite tokens update \ + --tokenId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-argon2user.md b/docs/examples/1.7.x/console-cli/examples/users/create-argon2user.md new file mode 100644 index 00000000000..b0c7494e201 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-argon2user.md @@ -0,0 +1,5 @@ +appwrite users createArgon2User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-bcrypt-user.md new file mode 100644 index 00000000000..b5686721b5d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-bcrypt-user.md @@ -0,0 +1,5 @@ +appwrite users createBcryptUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-j-w-t.md b/docs/examples/1.7.x/console-cli/examples/users/create-j-w-t.md new file mode 100644 index 00000000000..220086bb1a8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite users createJWT \ + --userId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-m-d5user.md b/docs/examples/1.7.x/console-cli/examples/users/create-m-d5user.md new file mode 100644 index 00000000000..ba37a78be2c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-m-d5user.md @@ -0,0 +1,5 @@ +appwrite users createMD5User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 00000000000..4dbd98ff8a1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users createMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-p-h-pass-user.md new file mode 100644 index 00000000000..9dc378dc992 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-p-h-pass-user.md @@ -0,0 +1,5 @@ +appwrite users createPHPassUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-s-h-a-user.md new file mode 100644 index 00000000000..57483625e96 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-s-h-a-user.md @@ -0,0 +1,6 @@ +appwrite users createSHAUser \ + --userId \ + --email email@example.com \ + --password password \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-modified-user.md new file mode 100644 index 00000000000..25fc60b6e16 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,8 @@ +appwrite users createScryptModifiedUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordSaltSeparator \ + --passwordSignerKey \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-user.md new file mode 100644 index 00000000000..3fc56b1ee3e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-scrypt-user.md @@ -0,0 +1,10 @@ +appwrite users createScryptUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordCpu null \ + --passwordMemory null \ + --passwordParallel null \ + --passwordLength null \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-session.md b/docs/examples/1.7.x/console-cli/examples/users/create-session.md new file mode 100644 index 00000000000..c8938fa7068 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-session.md @@ -0,0 +1,2 @@ +appwrite users createSession \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-target.md b/docs/examples/1.7.x/console-cli/examples/users/create-target.md new file mode 100644 index 00000000000..8d9306b00e3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-target.md @@ -0,0 +1,7 @@ +appwrite users createTarget \ + --userId \ + --targetId \ + --providerType email \ + --identifier \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create-token.md b/docs/examples/1.7.x/console-cli/examples/users/create-token.md new file mode 100644 index 00000000000..9962e72c730 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create-token.md @@ -0,0 +1,4 @@ +appwrite users createToken \ + --userId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/create.md b/docs/examples/1.7.x/console-cli/examples/users/create.md new file mode 100644 index 00000000000..e828f56ecb7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/create.md @@ -0,0 +1,6 @@ +appwrite users create \ + --userId \ + + + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-identity.md b/docs/examples/1.7.x/console-cli/examples/users/delete-identity.md new file mode 100644 index 00000000000..f3d2d6d980f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-identity.md @@ -0,0 +1,2 @@ +appwrite users deleteIdentity \ + --identityId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-cli/examples/users/delete-mfa-authenticator.md new file mode 100644 index 00000000000..edc67d0b9a0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite users deleteMfaAuthenticator \ + --userId \ + --type totp diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-session.md b/docs/examples/1.7.x/console-cli/examples/users/delete-session.md new file mode 100644 index 00000000000..9f1fbdbfb31 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,3 @@ +appwrite users deleteSession \ + --userId \ + --sessionId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-sessions.md b/docs/examples/1.7.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 00000000000..4c683d270a7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,2 @@ +appwrite users deleteSessions \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete-target.md b/docs/examples/1.7.x/console-cli/examples/users/delete-target.md new file mode 100644 index 00000000000..e9780911fdb --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete-target.md @@ -0,0 +1,3 @@ +appwrite users deleteTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/users/delete.md b/docs/examples/1.7.x/console-cli/examples/users/delete.md new file mode 100644 index 00000000000..293a5b040d7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/delete.md @@ -0,0 +1,2 @@ +appwrite users delete \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 00000000000..cefcce607ad --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users getMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-prefs.md b/docs/examples/1.7.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 00000000000..324aa4f508d --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,2 @@ +appwrite users getPrefs \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-target.md b/docs/examples/1.7.x/console-cli/examples/users/get-target.md new file mode 100644 index 00000000000..b80dbd97288 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-target.md @@ -0,0 +1,3 @@ +appwrite users getTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.7.x/console-cli/examples/users/get-usage.md b/docs/examples/1.7.x/console-cli/examples/users/get-usage.md new file mode 100644 index 00000000000..ad7895d3aad --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get-usage.md @@ -0,0 +1,2 @@ +appwrite users getUsage \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/get.md b/docs/examples/1.7.x/console-cli/examples/users/get.md new file mode 100644 index 00000000000..47002c50630 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/get.md @@ -0,0 +1,2 @@ +appwrite users get \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-identities.md b/docs/examples/1.7.x/console-cli/examples/users/list-identities.md new file mode 100644 index 00000000000..c6cd6d5e280 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-identities.md @@ -0,0 +1,3 @@ +appwrite users listIdentities \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-logs.md b/docs/examples/1.7.x/console-cli/examples/users/list-logs.md new file mode 100644 index 00000000000..0b0bc1f50fd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-logs.md @@ -0,0 +1,3 @@ +appwrite users listLogs \ + --userId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-memberships.md b/docs/examples/1.7.x/console-cli/examples/users/list-memberships.md new file mode 100644 index 00000000000..119f446ec94 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-memberships.md @@ -0,0 +1,4 @@ +appwrite users listMemberships \ + --userId \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/console-cli/examples/users/list-mfa-factors.md new file mode 100644 index 00000000000..e5d111b8ee6 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-mfa-factors.md @@ -0,0 +1,2 @@ +appwrite users listMfaFactors \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-sessions.md b/docs/examples/1.7.x/console-cli/examples/users/list-sessions.md new file mode 100644 index 00000000000..cb85d15ff62 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-sessions.md @@ -0,0 +1,2 @@ +appwrite users listSessions \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/list-targets.md b/docs/examples/1.7.x/console-cli/examples/users/list-targets.md new file mode 100644 index 00000000000..9b5614bd324 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list-targets.md @@ -0,0 +1,3 @@ +appwrite users listTargets \ + --userId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/users/list.md b/docs/examples/1.7.x/console-cli/examples/users/list.md new file mode 100644 index 00000000000..e5fdb9e5c5f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/list.md @@ -0,0 +1,3 @@ +appwrite users list \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-email-verification.md b/docs/examples/1.7.x/console-cli/examples/users/update-email-verification.md new file mode 100644 index 00000000000..990436f38b8 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-email-verification.md @@ -0,0 +1,3 @@ +appwrite users updateEmailVerification \ + --userId \ + --emailVerification false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-email.md b/docs/examples/1.7.x/console-cli/examples/users/update-email.md new file mode 100644 index 00000000000..cce20e9ebf3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-email.md @@ -0,0 +1,3 @@ +appwrite users updateEmail \ + --userId \ + --email email@example.com diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-labels.md b/docs/examples/1.7.x/console-cli/examples/users/update-labels.md new file mode 100644 index 00000000000..ca60c596837 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-labels.md @@ -0,0 +1,3 @@ +appwrite users updateLabels \ + --userId \ + --labels one two three diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-cli/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 00000000000..63fb7f25eb7 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users updateMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-mfa.md b/docs/examples/1.7.x/console-cli/examples/users/update-mfa.md new file mode 100644 index 00000000000..3ccdbd8fdf9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-mfa.md @@ -0,0 +1,3 @@ +appwrite users updateMfa \ + --userId \ + --mfa false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-name.md b/docs/examples/1.7.x/console-cli/examples/users/update-name.md new file mode 100644 index 00000000000..9bf20eb1173 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-name.md @@ -0,0 +1,3 @@ +appwrite users updateName \ + --userId \ + --name diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-password.md b/docs/examples/1.7.x/console-cli/examples/users/update-password.md new file mode 100644 index 00000000000..c05197b3c2e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-password.md @@ -0,0 +1,3 @@ +appwrite users updatePassword \ + --userId \ + --password '' diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-phone-verification.md b/docs/examples/1.7.x/console-cli/examples/users/update-phone-verification.md new file mode 100644 index 00000000000..b88a282d48c --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite users updatePhoneVerification \ + --userId \ + --phoneVerification false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-phone.md b/docs/examples/1.7.x/console-cli/examples/users/update-phone.md new file mode 100644 index 00000000000..118c8e3557b --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-phone.md @@ -0,0 +1,3 @@ +appwrite users updatePhone \ + --userId \ + --number +12065550100 diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-prefs.md b/docs/examples/1.7.x/console-cli/examples/users/update-prefs.md new file mode 100644 index 00000000000..f3fa995e4dd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,3 @@ +appwrite users updatePrefs \ + --userId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-status.md b/docs/examples/1.7.x/console-cli/examples/users/update-status.md new file mode 100644 index 00000000000..b587b70e9e3 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-status.md @@ -0,0 +1,3 @@ +appwrite users updateStatus \ + --userId \ + --status false diff --git a/docs/examples/1.7.x/console-cli/examples/users/update-target.md b/docs/examples/1.7.x/console-cli/examples/users/update-target.md new file mode 100644 index 00000000000..d6541a06006 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/users/update-target.md @@ -0,0 +1,6 @@ +appwrite users updateTarget \ + --userId \ + --targetId \ + + + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/create-repository-detection.md b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository-detection.md new file mode 100644 index 00000000000..d12a093d2d1 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository-detection.md @@ -0,0 +1,5 @@ +appwrite vcs createRepositoryDetection \ + --installationId \ + --providerRepositoryId \ + --type runtime \ + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/create-repository.md b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository.md new file mode 100644 index 00000000000..a4934d5ef5f --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/create-repository.md @@ -0,0 +1,4 @@ +appwrite vcs createRepository \ + --installationId \ + --name \ + --private false diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/delete-installation.md b/docs/examples/1.7.x/console-cli/examples/vcs/delete-installation.md new file mode 100644 index 00000000000..f7d3a92001e --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/delete-installation.md @@ -0,0 +1,2 @@ +appwrite vcs deleteInstallation \ + --installationId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/get-installation.md b/docs/examples/1.7.x/console-cli/examples/vcs/get-installation.md new file mode 100644 index 00000000000..df51853ea42 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/get-installation.md @@ -0,0 +1,2 @@ +appwrite vcs getInstallation \ + --installationId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/get-repository-contents.md b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository-contents.md new file mode 100644 index 00000000000..7d378d7efa9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository-contents.md @@ -0,0 +1,4 @@ +appwrite vcs getRepositoryContents \ + --installationId \ + --providerRepositoryId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/get-repository.md b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository.md new file mode 100644 index 00000000000..9f88e18eefd --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/get-repository.md @@ -0,0 +1,3 @@ +appwrite vcs getRepository \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/list-installations.md b/docs/examples/1.7.x/console-cli/examples/vcs/list-installations.md new file mode 100644 index 00000000000..a0af28dfbb0 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/list-installations.md @@ -0,0 +1,3 @@ +appwrite vcs listInstallations \ + + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/list-repositories.md b/docs/examples/1.7.x/console-cli/examples/vcs/list-repositories.md new file mode 100644 index 00000000000..15c3a643bb9 --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/list-repositories.md @@ -0,0 +1,4 @@ +appwrite vcs listRepositories \ + --installationId \ + --type runtime \ + diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/list-repository-branches.md b/docs/examples/1.7.x/console-cli/examples/vcs/list-repository-branches.md new file mode 100644 index 00000000000..ea2fbd29fba --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/list-repository-branches.md @@ -0,0 +1,3 @@ +appwrite vcs listRepositoryBranches \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.7.x/console-cli/examples/vcs/update-external-deployments.md b/docs/examples/1.7.x/console-cli/examples/vcs/update-external-deployments.md new file mode 100644 index 00000000000..417b59431db --- /dev/null +++ b/docs/examples/1.7.x/console-cli/examples/vcs/update-external-deployments.md @@ -0,0 +1,4 @@ +appwrite vcs updateExternalDeployments \ + --installationId \ + --repositoryId \ + --providerPullRequestId diff --git a/docs/examples/1.7.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/1.7.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 00000000000..113f882e802 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-email-password-session.md b/docs/examples/1.7.x/console-web/examples/account/create-email-password-session.md new file mode 100644 index 00000000000..36a503164b7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-email-token.md b/docs/examples/1.7.x/console-web/examples/account/create-email-token.md new file mode 100644 index 00000000000..9517000af3f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-j-w-t.md b/docs/examples/1.7.x/console-web/examples/account/create-j-w-t.md new file mode 100644 index 00000000000..9fc0e6da5eb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.7.x/console-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 00000000000..6b1891855ea --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 00000000000..923eb1ee3c1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-mfa-challenge.md b/docs/examples/1.7.x/console-web/examples/account/create-mfa-challenge.md new file mode 100644 index 00000000000..fd6af6ec195 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 00000000000..d7c122b79cc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2session.md new file mode 100644 index 00000000000..a11bd9880b9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/console-web/examples/account/create-o-auth2token.md b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2token.md new file mode 100644 index 00000000000..9eb7cfab67e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.7.x/console-web/examples/account/create-phone-token.md b/docs/examples/1.7.x/console-web/examples/account/create-phone-token.md new file mode 100644 index 00000000000..25216ca73c8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-phone-verification.md b/docs/examples/1.7.x/console-web/examples/account/create-phone-verification.md new file mode 100644 index 00000000000..03185e3e915 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-push-target.md b/docs/examples/1.7.x/console-web/examples/account/create-push-target.md new file mode 100644 index 00000000000..ee35566f8a7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-recovery.md b/docs/examples/1.7.x/console-web/examples/account/create-recovery.md new file mode 100644 index 00000000000..c2bb4422fa4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-session.md b/docs/examples/1.7.x/console-web/examples/account/create-session.md new file mode 100644 index 00000000000..1c8d8a44803 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create-verification.md b/docs/examples/1.7.x/console-web/examples/account/create-verification.md new file mode 100644 index 00000000000..f6eacdce1f3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/create.md b/docs/examples/1.7.x/console-web/examples/account/create.md new file mode 100644 index 00000000000..d220aed8d0e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-identity.md b/docs/examples/1.7.x/console-web/examples/account/delete-identity.md new file mode 100644 index 00000000000..6808b32a1d0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 00000000000..54610a810c3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-push-target.md b/docs/examples/1.7.x/console-web/examples/account/delete-push-target.md new file mode 100644 index 00000000000..f530b64dadd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-session.md b/docs/examples/1.7.x/console-web/examples/account/delete-session.md new file mode 100644 index 00000000000..4eba0515e42 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete-sessions.md b/docs/examples/1.7.x/console-web/examples/account/delete-sessions.md new file mode 100644 index 00000000000..b9904d612f0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/delete.md b/docs/examples/1.7.x/console-web/examples/account/delete.md new file mode 100644 index 00000000000..2fc730f9f05 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/delete.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.delete(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 00000000000..bee039c48d0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get-prefs.md b/docs/examples/1.7.x/console-web/examples/account/get-prefs.md new file mode 100644 index 00000000000..3a013e6615c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get-session.md b/docs/examples/1.7.x/console-web/examples/account/get-session.md new file mode 100644 index 00000000000..d5da237783a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/get.md b/docs/examples/1.7.x/console-web/examples/account/get.md new file mode 100644 index 00000000000..35661e483bf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-identities.md b/docs/examples/1.7.x/console-web/examples/account/list-identities.md new file mode 100644 index 00000000000..675e902c9f2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-logs.md b/docs/examples/1.7.x/console-web/examples/account/list-logs.md new file mode 100644 index 00000000000..72a0ee12dd8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-mfa-factors.md b/docs/examples/1.7.x/console-web/examples/account/list-mfa-factors.md new file mode 100644 index 00000000000..7cbc52ec713 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/list-sessions.md b/docs/examples/1.7.x/console-web/examples/account/list-sessions.md new file mode 100644 index 00000000000..6a24e372c5a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-email.md b/docs/examples/1.7.x/console-web/examples/account/update-email.md new file mode 100644 index 00000000000..df1c7f480aa --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-m-f-a.md b/docs/examples/1.7.x/console-web/examples/account/update-m-f-a.md new file mode 100644 index 00000000000..b813b60bb4a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.7.x/console-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 00000000000..e0ecd667408 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 00000000000..b9606759143 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-mfa-challenge.md b/docs/examples/1.7.x/console-web/examples/account/update-mfa-challenge.md new file mode 100644 index 00000000000..5314959f252 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 00000000000..654d9fb0fa9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-name.md b/docs/examples/1.7.x/console-web/examples/account/update-name.md new file mode 100644 index 00000000000..cd36ece1132 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-password.md b/docs/examples/1.7.x/console-web/examples/account/update-password.md new file mode 100644 index 00000000000..863c5f28b3e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-phone-session.md b/docs/examples/1.7.x/console-web/examples/account/update-phone-session.md new file mode 100644 index 00000000000..d23c10bbda7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-phone-verification.md b/docs/examples/1.7.x/console-web/examples/account/update-phone-verification.md new file mode 100644 index 00000000000..1a05386a9d4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-phone.md b/docs/examples/1.7.x/console-web/examples/account/update-phone.md new file mode 100644 index 00000000000..380279d0570 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-prefs.md b/docs/examples/1.7.x/console-web/examples/account/update-prefs.md new file mode 100644 index 00000000000..13d857468df --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-push-target.md b/docs/examples/1.7.x/console-web/examples/account/update-push-target.md new file mode 100644 index 00000000000..566d754db7c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-recovery.md b/docs/examples/1.7.x/console-web/examples/account/update-recovery.md new file mode 100644 index 00000000000..53d75f95d2d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-session.md b/docs/examples/1.7.x/console-web/examples/account/update-session.md new file mode 100644 index 00000000000..207fc026d8c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-status.md b/docs/examples/1.7.x/console-web/examples/account/update-status.md new file mode 100644 index 00000000000..c1377dc4a60 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/account/update-verification.md b/docs/examples/1.7.x/console-web/examples/account/update-verification.md new file mode 100644 index 00000000000..4861ca2b814 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/assistant/chat.md b/docs/examples/1.7.x/console-web/examples/assistant/chat.md new file mode 100644 index 00000000000..98032043a5b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/assistant/chat.md @@ -0,0 +1,13 @@ +import { Client, Assistant } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const assistant = new Assistant(client); + +const result = await assistant.chat( + '' // prompt +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 00000000000..65e7c826ff4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 00000000000..bda5407b276 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-favicon.md b/docs/examples/1.7.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 00000000000..b23e99a5519 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 00000000000..f6c0814abd9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-image.md b/docs/examples/1.7.x/console-web/examples/avatars/get-image.md new file mode 100644 index 00000000000..209e1ea8364 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-initials.md b/docs/examples/1.7.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 00000000000..6ec70b2143a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-q-r.md b/docs/examples/1.7.x/console-web/examples/avatars/get-q-r.md new file mode 100644 index 00000000000..a255cdc531e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/console/get-resource.md b/docs/examples/1.7.x/console-web/examples/console/get-resource.md new file mode 100644 index 00000000000..94a47070818 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/console/get-resource.md @@ -0,0 +1,14 @@ +import { Client, Console, ConsoleResourceType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.getResource( + '', // value + ConsoleResourceType.Rules // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/console/variables.md b/docs/examples/1.7.x/console-web/examples/console/variables.md new file mode 100644 index 00000000000..1dce6c02602 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/console/variables.md @@ -0,0 +1,11 @@ +import { Client, Console } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.variables(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-boolean-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-boolean-attribute.md new file mode 100644 index 00000000000..5b161c6f518 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-collection.md b/docs/examples/1.7.x/console-web/examples/databases/create-collection.md new file mode 100644 index 00000000000..cd28cf86160 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-datetime-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-datetime-attribute.md new file mode 100644 index 00000000000..c431105bdfc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-document.md b/docs/examples/1.7.x/console-web/examples/databases/create-document.md new file mode 100644 index 00000000000..4524017dd57 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('') // Your secret API key + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-documents.md b/docs/examples/1.7.x/console-web/examples/databases/create-documents.md new file mode 100644 index 00000000000..9651a997759 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setKey(''); // Your secret API key + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-email-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-email-attribute.md new file mode 100644 index 00000000000..f11c1a96496 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-enum-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-enum-attribute.md new file mode 100644 index 00000000000..d180b1b9f2d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-float-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-float-attribute.md new file mode 100644 index 00000000000..036d3fc201a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-index.md b/docs/examples/1.7.x/console-web/examples/databases/create-index.md new file mode 100644 index 00000000000..6a35f553490 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-index.md @@ -0,0 +1,19 @@ +import { Client, Databases, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIndex( + '', // databaseId + '', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md new file mode 100644 index 00000000000..25f474d0aad --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-ip-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-ip-attribute.md new file mode 100644 index 00000000000..e8abc80f91e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-relationship-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-relationship-attribute.md new file mode 100644 index 00000000000..358a2df5fc6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-relationship-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-string-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-string-attribute.md new file mode 100644 index 00000000000..ba94b0348b8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createStringAttribute( + '', // databaseId + '', // collectionId + '', // key + 1, // size + false, // required + '', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-url-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/create-url-attribute.md new file mode 100644 index 00000000000..da80e392d30 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create.md b/docs/examples/1.7.x/console-web/examples/databases/create.md new file mode 100644 index 00000000000..6d709ddd561 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/create.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.create( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/delete-attribute.md new file mode 100644 index 00000000000..df12b0d2f04 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-collection.md b/docs/examples/1.7.x/console-web/examples/databases/delete-collection.md new file mode 100644 index 00000000000..f490ae10967 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-document.md b/docs/examples/1.7.x/console-web/examples/databases/delete-document.md new file mode 100644 index 00000000000..a56a4f23c51 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-documents.md b/docs/examples/1.7.x/console-web/examples/databases/delete-documents.md new file mode 100644 index 00000000000..ec520c6cf9e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete-index.md b/docs/examples/1.7.x/console-web/examples/databases/delete-index.md new file mode 100644 index 00000000000..cdd96a31f03 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/delete.md b/docs/examples/1.7.x/console-web/examples/databases/delete.md new file mode 100644 index 00000000000..3bd69657f93 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/delete.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.delete( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/get-attribute.md new file mode 100644 index 00000000000..9dac2ad1339 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-collection-usage.md b/docs/examples/1.7.x/console-web/examples/databases/get-collection-usage.md new file mode 100644 index 00000000000..a2f736377a4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-collection-usage.md @@ -0,0 +1,15 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollectionUsage( + '', // databaseId + '', // collectionId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-collection.md b/docs/examples/1.7.x/console-web/examples/databases/get-collection.md new file mode 100644 index 00000000000..56d29f05cb1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-database-usage.md b/docs/examples/1.7.x/console-web/examples/databases/get-database-usage.md new file mode 100644 index 00000000000..13038ab755f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-database-usage.md @@ -0,0 +1,14 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDatabaseUsage( + '', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-document.md b/docs/examples/1.7.x/console-web/examples/databases/get-document.md new file mode 100644 index 00000000000..0e90cf785ef --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-index.md b/docs/examples/1.7.x/console-web/examples/databases/get-index.md new file mode 100644 index 00000000000..4c8c3794af9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get-usage.md b/docs/examples/1.7.x/console-web/examples/databases/get-usage.md new file mode 100644 index 00000000000..a0dd3ce9834 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/get.md b/docs/examples/1.7.x/console-web/examples/databases/get.md new file mode 100644 index 00000000000..5c72c5639c9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/get.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.get( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-attributes.md b/docs/examples/1.7.x/console-web/examples/databases/list-attributes.md new file mode 100644 index 00000000000..0c2cd4092c9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listAttributes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-collection-logs.md b/docs/examples/1.7.x/console-web/examples/databases/list-collection-logs.md new file mode 100644 index 00000000000..b2ef92d6772 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-collection-logs.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollectionLogs( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-collections.md b/docs/examples/1.7.x/console-web/examples/databases/list-collections.md new file mode 100644 index 00000000000..f9a0511e3ea --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollections( + '', // databaseId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-document-logs.md b/docs/examples/1.7.x/console-web/examples/databases/list-document-logs.md new file mode 100644 index 00000000000..ddb789b3f02 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-document-logs.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocumentLogs( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-documents.md b/docs/examples/1.7.x/console-web/examples/databases/list-documents.md new file mode 100644 index 00000000000..3a77c05faa6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-indexes.md b/docs/examples/1.7.x/console-web/examples/databases/list-indexes.md new file mode 100644 index 00000000000..fbbef1a9d88 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listIndexes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list-logs.md b/docs/examples/1.7.x/console-web/examples/databases/list-logs.md new file mode 100644 index 00000000000..12ccccf87ef --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listLogs( + '', // databaseId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/list.md b/docs/examples/1.7.x/console-web/examples/databases/list.md new file mode 100644 index 00000000000..58ec7209a3c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/list.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-boolean-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-boolean-attribute.md new file mode 100644 index 00000000000..95207fd2abd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-collection.md b/docs/examples/1.7.x/console-web/examples/databases/update-collection.md new file mode 100644 index 00000000000..ced992baf47 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-datetime-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-datetime-attribute.md new file mode 100644 index 00000000000..7c413ee5323 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-document.md b/docs/examples/1.7.x/console-web/examples/databases/update-document.md new file mode 100644 index 00000000000..85898ea2a76 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-documents.md b/docs/examples/1.7.x/console-web/examples/databases/update-documents.md new file mode 100644 index 00000000000..67be1e405c3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocuments( + '', // databaseId + '', // collectionId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-email-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-email-attribute.md new file mode 100644 index 00000000000..e54dba99bd2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-enum-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-enum-attribute.md new file mode 100644 index 00000000000..aa5330af04b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-float-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-float-attribute.md new file mode 100644 index 00000000000..344ddb8815b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-integer-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-integer-attribute.md new file mode 100644 index 00000000000..72565bd5f40 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-ip-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-ip-attribute.md new file mode 100644 index 00000000000..ff6dded552a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-relationship-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-relationship-attribute.md new file mode 100644 index 00000000000..acce3fd741d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-string-attribute.md new file mode 100644 index 00000000000..05601bd4a23 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateStringAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update-url-attribute.md b/docs/examples/1.7.x/console-web/examples/databases/update-url-attribute.md new file mode 100644 index 00000000000..78b4d92a287 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/update.md b/docs/examples/1.7.x/console-web/examples/databases/update.md new file mode 100644 index 00000000000..a29475b8163 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/update.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.update( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.7.x/console-web/examples/databases/upsert-documents.md new file mode 100644 index 00000000000..c58bd1e99c6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.upsertDocuments( + '', // databaseId + '', // collectionId + [] // documents (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 00000000000..62309d5e987 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDeployment( + '', // functionId + document.getElementById('uploader').files[0], // code + false, // activate + '', // entrypoint (optional) + '' // commands (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-duplicate-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-duplicate-deployment.md new file mode 100644 index 00000000000..1b48c27a6fc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDuplicateDeployment( + '', // functionId + '', // deploymentId + '' // buildId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-execution.md b/docs/examples/1.7.x/console-web/examples/functions/create-execution.md new file mode 100644 index 00000000000..813e1fd0a7d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-template-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-template-deployment.md new file mode 100644 index 00000000000..98bf957eb13 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createTemplateDeployment( + '', // functionId + '', // repository + '', // owner + '', // rootDirectory + '', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-variable.md b/docs/examples/1.7.x/console-web/examples/functions/create-variable.md new file mode 100644 index 00000000000..0b562cb93dc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVariable( + '', // functionId + '', // key + '', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create-vcs-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/create-vcs-deployment.md new file mode 100644 index 00000000000..6a12653de44 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVcsDeployment( + '', // functionId + VCSDeploymentType.Branch, // type + '', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/create.md b/docs/examples/1.7.x/console-web/examples/functions/create.md new file mode 100644 index 00000000000..1d9915f978a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/create.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.create( + '', // functionId + '', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 00000000000..1bc26feab06 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete-execution.md b/docs/examples/1.7.x/console-web/examples/functions/delete-execution.md new file mode 100644 index 00000000000..08164346372 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete-variable.md b/docs/examples/1.7.x/console-web/examples/functions/delete-variable.md new file mode 100644 index 00000000000..878d15d235e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/delete.md b/docs/examples/1.7.x/console-web/examples/functions/delete.md new file mode 100644 index 00000000000..86d616d267e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/delete.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.delete( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-deployment-download.md b/docs/examples/1.7.x/console-web/examples/functions/get-deployment-download.md new file mode 100644 index 00000000000..1ad8fd30cd5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Functions, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '', // functionId + '', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 00000000000..75cb11f7419 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-execution.md b/docs/examples/1.7.x/console-web/examples/functions/get-execution.md new file mode 100644 index 00000000000..58ab917bbd1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-template.md b/docs/examples/1.7.x/console-web/examples/functions/get-template.md new file mode 100644 index 00000000000..13c95210abe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-template.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getTemplate( + '' // templateId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-usage.md b/docs/examples/1.7.x/console-web/examples/functions/get-usage.md new file mode 100644 index 00000000000..bc010c3bd98 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getUsage( + '', // functionId + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get-variable.md b/docs/examples/1.7.x/console-web/examples/functions/get-variable.md new file mode 100644 index 00000000000..d80b2bccbf2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/get.md b/docs/examples/1.7.x/console-web/examples/functions/get.md new file mode 100644 index 00000000000..9b852849eb0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/get.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.get( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-deployments.md b/docs/examples/1.7.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 00000000000..b9f2ec0eafe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listDeployments( + '', // functionId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-executions.md b/docs/examples/1.7.x/console-web/examples/functions/list-executions.md new file mode 100644 index 00000000000..7d8a6c7a985 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-runtimes.md b/docs/examples/1.7.x/console-web/examples/functions/list-runtimes.md new file mode 100644 index 00000000000..cdd1e08cad1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listRuntimes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-specifications.md b/docs/examples/1.7.x/console-web/examples/functions/list-specifications.md new file mode 100644 index 00000000000..fe671c54bbe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-templates.md b/docs/examples/1.7.x/console-web/examples/functions/list-templates.md new file mode 100644 index 00000000000..ab7f84b34d0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listTemplates( + [], // runtimes (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-usage.md b/docs/examples/1.7.x/console-web/examples/functions/list-usage.md new file mode 100644 index 00000000000..14a880692b0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listUsage( + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list-variables.md b/docs/examples/1.7.x/console-web/examples/functions/list-variables.md new file mode 100644 index 00000000000..5651dbd1c55 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listVariables( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/list.md b/docs/examples/1.7.x/console-web/examples/functions/list.md new file mode 100644 index 00000000000..462214449d2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/list.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update-deployment-status.md b/docs/examples/1.7.x/console-web/examples/functions/update-deployment-status.md new file mode 100644 index 00000000000..ba4f37fabf2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateDeploymentStatus( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update-function-deployment.md b/docs/examples/1.7.x/console-web/examples/functions/update-function-deployment.md new file mode 100644 index 00000000000..2d714fb43c2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateFunctionDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update-variable.md b/docs/examples/1.7.x/console-web/examples/functions/update-variable.md new file mode 100644 index 00000000000..a6be7c0dd20 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateVariable( + '', // functionId + '', // variableId + '', // key + '', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/functions/update.md b/docs/examples/1.7.x/console-web/examples/functions/update.md new file mode 100644 index 00000000000..66d3cd8e8fa --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/functions/update.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.update( + '', // functionId + '', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/graphql/mutation.md b/docs/examples/1.7.x/console-web/examples/graphql/mutation.md new file mode 100644 index 00000000000..5360139b078 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/graphql/query.md b/docs/examples/1.7.x/console-web/examples/graphql/query.md new file mode 100644 index 00000000000..15434872abf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-antivirus.md b/docs/examples/1.7.x/console-web/examples/health/get-antivirus.md new file mode 100644 index 00000000000..30e142a63d2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getAntivirus(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-cache.md b/docs/examples/1.7.x/console-web/examples/health/get-cache.md new file mode 100644 index 00000000000..1c0bb182e24 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCache(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-certificate.md b/docs/examples/1.7.x/console-web/examples/health/get-certificate.md new file mode 100644 index 00000000000..288c0f8732b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-d-b.md b/docs/examples/1.7.x/console-web/examples/health/get-d-b.md new file mode 100644 index 00000000000..855e73466c8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getDB(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-failed-jobs.md b/docs/examples/1.7.x/console-web/examples/health/get-failed-jobs.md new file mode 100644 index 00000000000..d96a5545aa2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-failed-jobs.md @@ -0,0 +1,14 @@ +import { Client, Health, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-pub-sub.md b/docs/examples/1.7.x/console-web/examples/health/get-pub-sub.md new file mode 100644 index 00000000000..0ccce8e4d89 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getPubSub(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-builds.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-builds.md new file mode 100644 index 00000000000..dfbbfd91a61 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-certificates.md new file mode 100644 index 00000000000..b0397f4422e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-databases.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-databases.md new file mode 100644 index 00000000000..1b958a9c75e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDatabases( + '', // name (optional) + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-deletes.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-deletes.md new file mode 100644 index 00000000000..3f34bc22285 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-functions.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-functions.md new file mode 100644 index 00000000000..2ea37014626 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-logs.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-logs.md new file mode 100644 index 00000000000..73bd18589ad --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-mails.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-mails.md new file mode 100644 index 00000000000..a6d86c04c78 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-messaging.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-messaging.md new file mode 100644 index 00000000000..d25979713da --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-migrations.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-migrations.md new file mode 100644 index 00000000000..3619c56028c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-resources.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-resources.md new file mode 100644 index 00000000000..cf1c3ee5dfb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-usage.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-usage.md new file mode 100644 index 00000000000..f79fd3b5ad4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/1.7.x/console-web/examples/health/get-queue-webhooks.md new file mode 100644 index 00000000000..72bcc44c9ad --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-storage-local.md b/docs/examples/1.7.x/console-web/examples/health/get-storage-local.md new file mode 100644 index 00000000000..e6bdf62c503 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorageLocal(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-storage.md b/docs/examples/1.7.x/console-web/examples/health/get-storage.md new file mode 100644 index 00000000000..1d8941490e3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorage(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get-time.md b/docs/examples/1.7.x/console-web/examples/health/get-time.md new file mode 100644 index 00000000000..826eaf5a8c8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get-time.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getTime(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/health/get.md b/docs/examples/1.7.x/console-web/examples/health/get.md new file mode 100644 index 00000000000..b510d8a891b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/health/get.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/get.md b/docs/examples/1.7.x/console-web/examples/locale/get.md new file mode 100644 index 00000000000..4b0331787ee --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-codes.md b/docs/examples/1.7.x/console-web/examples/locale/list-codes.md new file mode 100644 index 00000000000..d20399af4ab --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-continents.md b/docs/examples/1.7.x/console-web/examples/locale/list-continents.md new file mode 100644 index 00000000000..d769e88f1c4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-countries-e-u.md b/docs/examples/1.7.x/console-web/examples/locale/list-countries-e-u.md new file mode 100644 index 00000000000..ce8746421b0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-countries-phones.md b/docs/examples/1.7.x/console-web/examples/locale/list-countries-phones.md new file mode 100644 index 00000000000..457867707ce --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-countries.md b/docs/examples/1.7.x/console-web/examples/locale/list-countries.md new file mode 100644 index 00000000000..298e25ee814 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-currencies.md b/docs/examples/1.7.x/console-web/examples/locale/list-currencies.md new file mode 100644 index 00000000000..05ff041cbba --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/locale/list-languages.md b/docs/examples/1.7.x/console-web/examples/locale/list-languages.md new file mode 100644 index 00000000000..1a2db31b55d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-apns-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-apns-provider.md new file mode 100644 index 00000000000..9b238afc9e0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createApnsProvider( + '', // providerId + '', // name + '', // authKey (optional) + '', // authKeyId (optional) + '', // teamId (optional) + '', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-email.md b/docs/examples/1.7.x/console-web/examples/messaging/create-email.md new file mode 100644 index 00000000000..108517c89da --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createEmail( + '', // messageId + '', // subject + '', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-fcm-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-fcm-provider.md new file mode 100644 index 00000000000..9d67e89fd69 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createFcmProvider( + '', // providerId + '', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-mailgun-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-mailgun-provider.md new file mode 100644 index 00000000000..dc165af859b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMailgunProvider( + '', // providerId + '', // name + '', // apiKey (optional) + '', // domain (optional) + false, // isEuRegion (optional) + '', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-msg91provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-msg91provider.md new file mode 100644 index 00000000000..cab468a0893 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMsg91Provider( + '', // providerId + '', // name + '', // templateId (optional) + '', // senderId (optional) + '', // authKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-push.md b/docs/examples/1.7.x/console-web/examples/messaging/create-push.md new file mode 100644 index 00000000000..79c3a20e83f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createPush( + '', // messageId + '', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 00000000000..b93c84b2581 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-sms.md b/docs/examples/1.7.x/console-web/examples/messaging/create-sms.md new file mode 100644 index 00000000000..7146ee4ac95 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-smtp-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-smtp-provider.md new file mode 100644 index 00000000000..b4bcf14d0b5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-subscriber.md b/docs/examples/1.7.x/console-web/examples/messaging/create-subscriber.md new file mode 100644 index 00000000000..b1f72394132 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-telesign-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-telesign-provider.md new file mode 100644 index 00000000000..355bc22f859 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-textmagic-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-textmagic-provider.md new file mode 100644 index 00000000000..d79cffc3161 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/create-topic.md new file mode 100644 index 00000000000..274714a63b1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-twilio-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-twilio-provider.md new file mode 100644 index 00000000000..9b8f4407435 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/create-vonage-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/create-vonage-provider.md new file mode 100644 index 00000000000..6e115e8eb90 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/delete-provider.md new file mode 100644 index 00000000000..f71eb65f29c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete-subscriber.md b/docs/examples/1.7.x/console-web/examples/messaging/delete-subscriber.md new file mode 100644 index 00000000000..ace96702115 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/delete-topic.md new file mode 100644 index 00000000000..8f8e5460d3d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/delete.md b/docs/examples/1.7.x/console-web/examples/messaging/delete.md new file mode 100644 index 00000000000..17324cca7ed --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-message.md b/docs/examples/1.7.x/console-web/examples/messaging/get-message.md new file mode 100644 index 00000000000..3282adbe57d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/get-provider.md new file mode 100644 index 00000000000..97ac5fd127a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-subscriber.md b/docs/examples/1.7.x/console-web/examples/messaging/get-subscriber.md new file mode 100644 index 00000000000..b718558d715 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/get-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/get-topic.md new file mode 100644 index 00000000000..802ec1fba43 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-message-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-message-logs.md new file mode 100644 index 00000000000..8679b267ce1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-messages.md b/docs/examples/1.7.x/console-web/examples/messaging/list-messages.md new file mode 100644 index 00000000000..a537844f813 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-provider-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-provider-logs.md new file mode 100644 index 00000000000..2e4acb38cf7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-providers.md b/docs/examples/1.7.x/console-web/examples/messaging/list-providers.md new file mode 100644 index 00000000000..5c91f01bbc8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-subscriber-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-subscriber-logs.md new file mode 100644 index 00000000000..f722c9a9edd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-subscribers.md b/docs/examples/1.7.x/console-web/examples/messaging/list-subscribers.md new file mode 100644 index 00000000000..f120e9d96d2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-targets.md b/docs/examples/1.7.x/console-web/examples/messaging/list-targets.md new file mode 100644 index 00000000000..89baf87cb00 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-topic-logs.md b/docs/examples/1.7.x/console-web/examples/messaging/list-topic-logs.md new file mode 100644 index 00000000000..bc23a09a919 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/list-topics.md b/docs/examples/1.7.x/console-web/examples/messaging/list-topics.md new file mode 100644 index 00000000000..d23cca3171e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-apns-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-apns-provider.md new file mode 100644 index 00000000000..bc69c3ad1eb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-email.md b/docs/examples/1.7.x/console-web/examples/messaging/update-email.md new file mode 100644 index 00000000000..ba9bc7eb486 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-fcm-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-fcm-provider.md new file mode 100644 index 00000000000..d2e73825613 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-mailgun-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-mailgun-provider.md new file mode 100644 index 00000000000..cc48ac52f34 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-msg91provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-msg91provider.md new file mode 100644 index 00000000000..c2a6faec24d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-push.md b/docs/examples/1.7.x/console-web/examples/messaging/update-push.md new file mode 100644 index 00000000000..e479dcc4259 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 00000000000..efe8263718f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-sms.md b/docs/examples/1.7.x/console-web/examples/messaging/update-sms.md new file mode 100644 index 00000000000..2c535a014e5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-smtp-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-smtp-provider.md new file mode 100644 index 00000000000..0274337a7bd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-telesign-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-telesign-provider.md new file mode 100644 index 00000000000..5d8bc1602d2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-textmagic-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-textmagic-provider.md new file mode 100644 index 00000000000..564ad4fc690 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-topic.md b/docs/examples/1.7.x/console-web/examples/messaging/update-topic.md new file mode 100644 index 00000000000..e0edbae7145 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-twilio-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-twilio-provider.md new file mode 100644 index 00000000000..544a52e4fd9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/messaging/update-vonage-provider.md b/docs/examples/1.7.x/console-web/examples/messaging/update-vonage-provider.md new file mode 100644 index 00000000000..e831c03184c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-appwrite-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-appwrite-migration.md new file mode 100644 index 00000000000..db9a4cd0e00 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createAppwriteMigration( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectId + '<API_KEY>' // apiKey +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-csv-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-csv-migration.md new file mode 100644 index 00000000000..544f6c8ef66 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-csv-migration.md @@ -0,0 +1,15 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createCsvMigration( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '[ID1:ID2]' // resourceId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-firebase-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-firebase-migration.md new file mode 100644 index 00000000000..20ce3a8b3c4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-firebase-migration.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createFirebaseMigration( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-n-host-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-n-host-migration.md new file mode 100644 index 00000000000..23b22ff3718 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-n-host-migration.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createNHostMigration( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/create-supabase-migration.md b/docs/examples/1.7.x/console-web/examples/migrations/create-supabase-migration.md new file mode 100644 index 00000000000..18c326ca7e1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/create-supabase-migration.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createSupabaseMigration( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/delete.md b/docs/examples/1.7.x/console-web/examples/migrations/delete.md new file mode 100644 index 00000000000..bb013ddf279 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/delete.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.delete( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-appwrite-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-appwrite-report.md new file mode 100644 index 00000000000..a70b6a45fb6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-appwrite-report.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getAppwriteReport( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectID + '<KEY>' // key +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-firebase-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-firebase-report.md new file mode 100644 index 00000000000..bf1c85eeb63 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-firebase-report.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getFirebaseReport( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-n-host-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-n-host-report.md new file mode 100644 index 00000000000..a983088f0d6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-n-host-report.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getNHostReport( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get-supabase-report.md b/docs/examples/1.7.x/console-web/examples/migrations/get-supabase-report.md new file mode 100644 index 00000000000..d6ea7a97122 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get-supabase-report.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getSupabaseReport( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/get.md b/docs/examples/1.7.x/console-web/examples/migrations/get.md new file mode 100644 index 00000000000..e2c67eb884f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/get.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.get( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/list.md b/docs/examples/1.7.x/console-web/examples/migrations/list.md new file mode 100644 index 00000000000..a978e1843e1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/list.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/migrations/retry.md b/docs/examples/1.7.x/console-web/examples/migrations/retry.md new file mode 100644 index 00000000000..f489168d7e5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/migrations/retry.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.retry( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/create-variable.md b/docs/examples/1.7.x/console-web/examples/project/create-variable.md new file mode 100644 index 00000000000..aa7361ffc22 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.createVariable( + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/delete-variable.md b/docs/examples/1.7.x/console-web/examples/project/delete-variable.md new file mode 100644 index 00000000000..224691691dc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.deleteVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/get-usage.md b/docs/examples/1.7.x/console-web/examples/project/get-usage.md new file mode 100644 index 00000000000..300311dd8f9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Project, ProjectUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getUsage( + '', // startDate + '', // endDate + ProjectUsageRange.OneHour // period (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/get-variable.md b/docs/examples/1.7.x/console-web/examples/project/get-variable.md new file mode 100644 index 00000000000..bc30baa3252 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/list-variables.md b/docs/examples/1.7.x/console-web/examples/project/list-variables.md new file mode 100644 index 00000000000..9c17f8514e7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/list-variables.md @@ -0,0 +1,11 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.listVariables(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/project/update-variable.md b/docs/examples/1.7.x/console-web/examples/project/update-variable.md new file mode 100644 index 00000000000..9dcd62a7c28 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/project/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.updateVariable( + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-dev-key.md b/docs/examples/1.7.x/console-web/examples/projects/create-dev-key.md new file mode 100644 index 00000000000..28f89aea49e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-dev-key.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createDevKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '' // expire +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-j-w-t.md b/docs/examples/1.7.x/console-web/examples/projects/create-j-w-t.md new file mode 100644 index 00000000000..7175e266ae0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createJWT( + '<PROJECT_ID>', // projectId + [], // scopes + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-key.md b/docs/examples/1.7.x/console-web/examples/projects/create-key.md new file mode 100644 index 00000000000..25bcc125ed4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-platform.md b/docs/examples/1.7.x/console-web/examples/projects/create-platform.md new file mode 100644 index 00000000000..7e23dd6f9e0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects, PlatformType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createPlatform( + '<PROJECT_ID>', // projectId + PlatformType.Web, // type + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-smtp-test.md b/docs/examples/1.7.x/console-web/examples/projects/create-smtp-test.md new file mode 100644 index 00000000000..ab0e184432b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-smtp-test.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createSmtpTest( + '<PROJECT_ID>', // projectId + [], // emails + '<SENDER_NAME>', // senderName + 'email@example.com', // senderEmail + '', // host + 'email@example.com', // replyTo (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/create-webhook.md new file mode 100644 index 00000000000..62fdac56cdd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create-webhook.md @@ -0,0 +1,20 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createWebhook( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/create.md b/docs/examples/1.7.x/console-web/examples/projects/create.md new file mode 100644 index 00000000000..58efd0b75fe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/create.md @@ -0,0 +1,25 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.create( + '', // projectId + '<NAME>', // name + '<TEAM_ID>', // teamId + .Default, // region (optional) + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-dev-key.md b/docs/examples/1.7.x/console-web/examples/projects/delete-dev-key.md new file mode 100644 index 00000000000..fc2ca4f1a77 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-dev-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-email-template.md b/docs/examples/1.7.x/console-web/examples/projects/delete-email-template.md new file mode 100644 index 00000000000..10e3d302aef --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-key.md b/docs/examples/1.7.x/console-web/examples/projects/delete-key.md new file mode 100644 index 00000000000..7ea7dc6fdcb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-platform.md b/docs/examples/1.7.x/console-web/examples/projects/delete-platform.md new file mode 100644 index 00000000000..5c71747a64d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deletePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-sms-template.md b/docs/examples/1.7.x/console-web/examples/projects/delete-sms-template.md new file mode 100644 index 00000000000..eef3cccae9a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/delete-webhook.md new file mode 100644 index 00000000000..24abaafc66e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/delete.md b/docs/examples/1.7.x/console-web/examples/projects/delete.md new file mode 100644 index 00000000000..d868616db23 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/delete.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.delete( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-dev-key.md b/docs/examples/1.7.x/console-web/examples/projects/get-dev-key.md new file mode 100644 index 00000000000..a9c38df45a2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-dev-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-email-template.md b/docs/examples/1.7.x/console-web/examples/projects/get-email-template.md new file mode 100644 index 00000000000..1d27c8c6827 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-key.md b/docs/examples/1.7.x/console-web/examples/projects/get-key.md new file mode 100644 index 00000000000..79359e298b5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-platform.md b/docs/examples/1.7.x/console-web/examples/projects/get-platform.md new file mode 100644 index 00000000000..a17bcb122d9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getPlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-sms-template.md b/docs/examples/1.7.x/console-web/examples/projects/get-sms-template.md new file mode 100644 index 00000000000..0badf1cca4e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/get-webhook.md new file mode 100644 index 00000000000..6b6530a04ed --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/get.md b/docs/examples/1.7.x/console-web/examples/projects/get.md new file mode 100644 index 00000000000..dbec5dd5438 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/get.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.get( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-dev-keys.md b/docs/examples/1.7.x/console-web/examples/projects/list-dev-keys.md new file mode 100644 index 00000000000..d3b17706cd6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-dev-keys.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listDevKeys( + '<PROJECT_ID>', // projectId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-keys.md b/docs/examples/1.7.x/console-web/examples/projects/list-keys.md new file mode 100644 index 00000000000..5701133ba4e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-keys.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listKeys( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-platforms.md b/docs/examples/1.7.x/console-web/examples/projects/list-platforms.md new file mode 100644 index 00000000000..214092b6b34 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-platforms.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listPlatforms( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list-webhooks.md b/docs/examples/1.7.x/console-web/examples/projects/list-webhooks.md new file mode 100644 index 00000000000..11639bfccf3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listWebhooks( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/list.md b/docs/examples/1.7.x/console-web/examples/projects/list.md new file mode 100644 index 00000000000..0ade65189a3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/list.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-api-status-all.md b/docs/examples/1.7.x/console-web/examples/projects/update-api-status-all.md new file mode 100644 index 00000000000..a51ed2df2b1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-api-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-api-status.md b/docs/examples/1.7.x/console-web/examples/projects/update-api-status.md new file mode 100644 index 00000000000..9cc7dfe8abe --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-api-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatus( + '<PROJECT_ID>', // projectId + .Rest, // api + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-duration.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-duration.md new file mode 100644 index 00000000000..d0d8c67b288 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-duration.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthDuration( + '<PROJECT_ID>', // projectId + 0 // duration +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-limit.md new file mode 100644 index 00000000000..80f73f871f2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthLimit( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 00000000000..1e878c22467 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordDictionary( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-history.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-history.md new file mode 100644 index 00000000000..26a3adcfdee --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-password-history.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordHistory( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 00000000000..c1b0e14e912 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthSessionsLimit( + '<PROJECT_ID>', // projectId + 1 // limit +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-auth-status.md b/docs/examples/1.7.x/console-web/examples/projects/update-auth-status.md new file mode 100644 index 00000000000..d4862282a6f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-auth-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, AuthMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthStatus( + '<PROJECT_ID>', // projectId + AuthMethod.EmailPassword, // method + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-dev-key.md b/docs/examples/1.7.x/console-web/examples/projects/update-dev-key.md new file mode 100644 index 00000000000..9c004742620 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-dev-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + '' // expire +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-email-template.md b/docs/examples/1.7.x/console-web/examples/projects/update-email-template.md new file mode 100644 index 00000000000..44467c4f8a3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-email-template.md @@ -0,0 +1,20 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af, // locale + '<SUBJECT>', // subject + '<MESSAGE>', // message + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com' // replyTo (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-key.md b/docs/examples/1.7.x/console-web/examples/projects/update-key.md new file mode 100644 index 00000000000..492a0ac23d4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-key.md @@ -0,0 +1,17 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-memberships-privacy.md b/docs/examples/1.7.x/console-web/examples/projects/update-memberships-privacy.md new file mode 100644 index 00000000000..31adcd38552 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-memberships-privacy.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMembershipsPrivacy( + '<PROJECT_ID>', // projectId + false, // userName + false, // userEmail + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-mock-numbers.md b/docs/examples/1.7.x/console-web/examples/projects/update-mock-numbers.md new file mode 100644 index 00000000000..245a20c19bc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-mock-numbers.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMockNumbers( + '<PROJECT_ID>', // projectId + [] // numbers +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/1.7.x/console-web/examples/projects/update-o-auth2.md new file mode 100644 index 00000000000..0671ee38bd0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-o-auth2.md @@ -0,0 +1,17 @@ +import { Client, Projects, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateOAuth2( + '<PROJECT_ID>', // projectId + OAuthProvider.Amazon, // provider + '<APP_ID>', // appId (optional) + '<SECRET>', // secret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-personal-data-check.md b/docs/examples/1.7.x/console-web/examples/projects/update-personal-data-check.md new file mode 100644 index 00000000000..fb0fcffc163 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-personal-data-check.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePersonalDataCheck( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-platform.md b/docs/examples/1.7.x/console-web/examples/projects/update-platform.md new file mode 100644 index 00000000000..2f9cc0a4fdc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>', // platformId + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-service-status-all.md b/docs/examples/1.7.x/console-web/examples/projects/update-service-status-all.md new file mode 100644 index 00000000000..672a1491bc7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-service-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-service-status.md b/docs/examples/1.7.x/console-web/examples/projects/update-service-status.md new file mode 100644 index 00000000000..5d2189e3396 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-service-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, ApiService } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatus( + '<PROJECT_ID>', // projectId + ApiService.Account, // service + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-session-alerts.md b/docs/examples/1.7.x/console-web/examples/projects/update-session-alerts.md new file mode 100644 index 00000000000..65aa353b2b3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-session-alerts.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSessionAlerts( + '<PROJECT_ID>', // projectId + false // alerts +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-sms-template.md b/docs/examples/1.7.x/console-web/examples/projects/update-sms-template.md new file mode 100644 index 00000000000..cc801a67c51 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-sms-template.md @@ -0,0 +1,16 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af, // locale + '<MESSAGE>' // message +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-smtp.md b/docs/examples/1.7.x/console-web/examples/projects/update-smtp.md new file mode 100644 index 00000000000..605ba0f5e36 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-smtp.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmtp( + '<PROJECT_ID>', // projectId + false, // enabled + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com', // replyTo (optional) + '', // host (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-team.md b/docs/examples/1.7.x/console-web/examples/projects/update-team.md new file mode 100644 index 00000000000..b7c5d934e23 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-team.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateTeam( + '<PROJECT_ID>', // projectId + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/1.7.x/console-web/examples/projects/update-webhook-signature.md new file mode 100644 index 00000000000..593c6c0fce1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-webhook-signature.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhookSignature( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update-webhook.md b/docs/examples/1.7.x/console-web/examples/projects/update-webhook.md new file mode 100644 index 00000000000..18d10051e96 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update-webhook.md @@ -0,0 +1,21 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>', // webhookId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/projects/update.md b/docs/examples/1.7.x/console-web/examples/projects/update.md new file mode 100644 index 00000000000..8b2d2823caa --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/projects/update.md @@ -0,0 +1,23 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.update( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 00000000000..e248ebea3df --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createAPIRule( + '' // domain +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-function-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-function-rule.md new file mode 100644 index 00000000000..2bb0b83f089 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-function-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createFunctionRule( + '', // domain + '<FUNCTION_ID>', // functionId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-redirect-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-redirect-rule.md new file mode 100644 index 00000000000..43b3f79d8a0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-redirect-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createRedirectRule( + '', // domain + 'https://example.com', // url + .MovedPermanently301 // statusCode +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/create-site-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/create-site-rule.md new file mode 100644 index 00000000000..4ea806ecebf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/create-site-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createSiteRule( + '', // domain + '<SITE_ID>', // siteId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/delete-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/delete-rule.md new file mode 100644 index 00000000000..783f06d95cc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/delete-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.deleteRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/get-rule.md b/docs/examples/1.7.x/console-web/examples/proxy/get-rule.md new file mode 100644 index 00000000000..e69c8210cee --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/get-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.getRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/list-rules.md b/docs/examples/1.7.x/console-web/examples/proxy/list-rules.md new file mode 100644 index 00000000000..8c071682926 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/list-rules.md @@ -0,0 +1,14 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.listRules( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/proxy/update-rule-verification.md b/docs/examples/1.7.x/console-web/examples/proxy/update-rule-verification.md new file mode 100644 index 00000000000..349535cec8c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/proxy/update-rule-verification.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.updateRuleVerification( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-deployment.md new file mode 100644 index 00000000000..5bc597c20eb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + document.getElementById('uploader').files[0], // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-duplicate-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-duplicate-deployment.md new file mode 100644 index 00000000000..3b8347fbf69 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-template-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-template-deployment.md new file mode 100644 index 00000000000..990d7cf98b4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-variable.md b/docs/examples/1.7.x/console-web/examples/sites/create-variable.md new file mode 100644 index 00000000000..d605f2e4aa2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create-vcs-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/create-vcs-deployment.md new file mode 100644 index 00000000000..dd595db14d0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Sites, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/create.md b/docs/examples/1.7.x/console-web/examples/sites/create.md new file mode 100644 index 00000000000..7880ba361bf --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/create.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/delete-deployment.md new file mode 100644 index 00000000000..357b69c04e4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete-log.md b/docs/examples/1.7.x/console-web/examples/sites/delete-log.md new file mode 100644 index 00000000000..25defd15460 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete-variable.md b/docs/examples/1.7.x/console-web/examples/sites/delete-variable.md new file mode 100644 index 00000000000..f6201738d88 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/delete.md b/docs/examples/1.7.x/console-web/examples/sites/delete.md new file mode 100644 index 00000000000..e3eff9cbb93 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/delete.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-deployment-download.md b/docs/examples/1.7.x/console-web/examples/sites/get-deployment-download.md new file mode 100644 index 00000000000..17707eded08 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Sites, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/get-deployment.md new file mode 100644 index 00000000000..c3453446e8d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-log.md b/docs/examples/1.7.x/console-web/examples/sites/get-log.md new file mode 100644 index 00000000000..eb1cd654c9e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-template.md b/docs/examples/1.7.x/console-web/examples/sites/get-template.md new file mode 100644 index 00000000000..4220390d953 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-template.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getTemplate( + '<TEMPLATE_ID>' // templateId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-usage.md b/docs/examples/1.7.x/console-web/examples/sites/get-usage.md new file mode 100644 index 00000000000..582a754e07e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getUsage( + '<SITE_ID>', // siteId + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get-variable.md b/docs/examples/1.7.x/console-web/examples/sites/get-variable.md new file mode 100644 index 00000000000..c0d95326cc2 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/get.md b/docs/examples/1.7.x/console-web/examples/sites/get.md new file mode 100644 index 00000000000..102cade4c65 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/get.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-deployments.md b/docs/examples/1.7.x/console-web/examples/sites/list-deployments.md new file mode 100644 index 00000000000..8c0bd8ea2d7 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-frameworks.md b/docs/examples/1.7.x/console-web/examples/sites/list-frameworks.md new file mode 100644 index 00000000000..aceadcc8c9b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listFrameworks(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-logs.md b/docs/examples/1.7.x/console-web/examples/sites/list-logs.md new file mode 100644 index 00000000000..458cc69b2b8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-specifications.md b/docs/examples/1.7.x/console-web/examples/sites/list-specifications.md new file mode 100644 index 00000000000..9bbb35d76d6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-templates.md b/docs/examples/1.7.x/console-web/examples/sites/list-templates.md new file mode 100644 index 00000000000..58f46bbb4a8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listTemplates( + [], // frameworks (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-usage.md b/docs/examples/1.7.x/console-web/examples/sites/list-usage.md new file mode 100644 index 00000000000..7182d788802 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listUsage( + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list-variables.md b/docs/examples/1.7.x/console-web/examples/sites/list-variables.md new file mode 100644 index 00000000000..de62195aeac --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/list.md b/docs/examples/1.7.x/console-web/examples/sites/list.md new file mode 100644 index 00000000000..fafe3cb2293 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/list.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update-deployment-status.md b/docs/examples/1.7.x/console-web/examples/sites/update-deployment-status.md new file mode 100644 index 00000000000..8205c863b03 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update-site-deployment.md b/docs/examples/1.7.x/console-web/examples/sites/update-site-deployment.md new file mode 100644 index 00000000000..d63541702e5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update-variable.md b/docs/examples/1.7.x/console-web/examples/sites/update-variable.md new file mode 100644 index 00000000000..1ea94817373 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/sites/update.md b/docs/examples/1.7.x/console-web/examples/sites/update.md new file mode 100644 index 00000000000..b20a19526d6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/sites/update.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/create-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 00000000000..a01bb0945fd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/create-file.md b/docs/examples/1.7.x/console-web/examples/storage/create-file.md new file mode 100644 index 00000000000..8048772389c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/delete-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 00000000000..20084fd7e3b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/delete-file.md b/docs/examples/1.7.x/console-web/examples/storage/delete-file.md new file mode 100644 index 00000000000..41afa9e375a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/1.7.x/console-web/examples/storage/get-bucket-usage.md new file mode 100644 index 00000000000..1007454c2e0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-bucket-usage.md @@ -0,0 +1,14 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucketUsage( + '<BUCKET_ID>', // bucketId + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 00000000000..ec77dd2bf57 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 00000000000..8e98105ef33 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 00000000000..b14a02769e5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 00000000000..03db75f044a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file.md b/docs/examples/1.7.x/console-web/examples/storage/get-file.md new file mode 100644 index 00000000000..76658edb0ba --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-usage.md b/docs/examples/1.7.x/console-web/examples/storage/get-usage.md new file mode 100644 index 00000000000..b57f8f8b034 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getUsage( + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/list-buckets.md b/docs/examples/1.7.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 00000000000..f82c01a8793 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/list-files.md b/docs/examples/1.7.x/console-web/examples/storage/list-files.md new file mode 100644 index 00000000000..9076b8997fd --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/update-bucket.md b/docs/examples/1.7.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 00000000000..d6c125a213d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/update-file.md b/docs/examples/1.7.x/console-web/examples/storage/update-file.md new file mode 100644 index 00000000000..79830f77d23 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/create-membership.md b/docs/examples/1.7.x/console-web/examples/teams/create-membership.md new file mode 100644 index 00000000000..18f6b0ab4df --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/create.md b/docs/examples/1.7.x/console-web/examples/teams/create.md new file mode 100644 index 00000000000..a33e71ad5f5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/delete-membership.md b/docs/examples/1.7.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 00000000000..a63ed467496 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/delete.md b/docs/examples/1.7.x/console-web/examples/teams/delete.md new file mode 100644 index 00000000000..e97cc05cc78 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/get-membership.md b/docs/examples/1.7.x/console-web/examples/teams/get-membership.md new file mode 100644 index 00000000000..bc31ee1470b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/get-prefs.md b/docs/examples/1.7.x/console-web/examples/teams/get-prefs.md new file mode 100644 index 00000000000..394848c5c33 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/get.md b/docs/examples/1.7.x/console-web/examples/teams/get.md new file mode 100644 index 00000000000..8c752a9828e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/list-logs.md b/docs/examples/1.7.x/console-web/examples/teams/list-logs.md new file mode 100644 index 00000000000..004e627f0df --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listLogs( + '<TEAM_ID>', // teamId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/list-memberships.md b/docs/examples/1.7.x/console-web/examples/teams/list-memberships.md new file mode 100644 index 00000000000..22fb731175d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/list.md b/docs/examples/1.7.x/console-web/examples/teams/list.md new file mode 100644 index 00000000000..c51dfaf3899 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-membership-status.md b/docs/examples/1.7.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 00000000000..c8e608278e9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-membership.md b/docs/examples/1.7.x/console-web/examples/teams/update-membership.md new file mode 100644 index 00000000000..d3e0164a179 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-name.md b/docs/examples/1.7.x/console-web/examples/teams/update-name.md new file mode 100644 index 00000000000..43703d0c982 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/teams/update-prefs.md b/docs/examples/1.7.x/console-web/examples/teams/update-prefs.md new file mode 100644 index 00000000000..e0acff0a30b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md b/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md new file mode 100644 index 00000000000..bac4863159e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/delete.md b/docs/examples/1.7.x/console-web/examples/tokens/delete.md new file mode 100644 index 00000000000..0a871d0fe40 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/get.md b/docs/examples/1.7.x/console-web/examples/tokens/get.md new file mode 100644 index 00000000000..ee83fb83c2a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/get.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/list.md b/docs/examples/1.7.x/console-web/examples/tokens/list.md new file mode 100644 index 00000000000..33077e26dd1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/list.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/update.md b/docs/examples/1.7.x/console-web/examples/tokens/update.md new file mode 100644 index 00000000000..ce3b80dd220 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/tokens/update.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-argon2user.md b/docs/examples/1.7.x/console-web/examples/users/create-argon2user.md new file mode 100644 index 00000000000..c190225d4b6 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-bcrypt-user.md b/docs/examples/1.7.x/console-web/examples/users/create-bcrypt-user.md new file mode 100644 index 00000000000..9c51181890b --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-j-w-t.md b/docs/examples/1.7.x/console-web/examples/users/create-j-w-t.md new file mode 100644 index 00000000000..7d50fbce034 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-m-d5user.md b/docs/examples/1.7.x/console-web/examples/users/create-m-d5user.md new file mode 100644 index 00000000000..610f795ab01 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 00000000000..ea52af9cf83 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-p-h-pass-user.md b/docs/examples/1.7.x/console-web/examples/users/create-p-h-pass-user.md new file mode 100644 index 00000000000..c9437c5c381 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-s-h-a-user.md b/docs/examples/1.7.x/console-web/examples/users/create-s-h-a-user.md new file mode 100644 index 00000000000..b70f09c133c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +import { Client, Users, PasswordHash } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-scrypt-modified-user.md b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-modified-user.md new file mode 100644 index 00000000000..c0a0435b67d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-scrypt-user.md b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-user.md new file mode 100644 index 00000000000..f1cb93637ae --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-session.md b/docs/examples/1.7.x/console-web/examples/users/create-session.md new file mode 100644 index 00000000000..5393c4408dc --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-target.md b/docs/examples/1.7.x/console-web/examples/users/create-target.md new file mode 100644 index 00000000000..4c8eac9c45d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-target.md @@ -0,0 +1,18 @@ +import { Client, Users, MessagingProviderType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create-token.md b/docs/examples/1.7.x/console-web/examples/users/create-token.md new file mode 100644 index 00000000000..58e8c9f035c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create-token.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/create.md b/docs/examples/1.7.x/console-web/examples/users/create.md new file mode 100644 index 00000000000..131ef1290c5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/create.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-identity.md b/docs/examples/1.7.x/console-web/examples/users/delete-identity.md new file mode 100644 index 00000000000..cf7425c8437 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-mfa-authenticator.md b/docs/examples/1.7.x/console-web/examples/users/delete-mfa-authenticator.md new file mode 100644 index 00000000000..023686ae269 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Users, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-session.md b/docs/examples/1.7.x/console-web/examples/users/delete-session.md new file mode 100644 index 00000000000..ca6880431b1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-sessions.md b/docs/examples/1.7.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 00000000000..1137a8b29b3 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete-target.md b/docs/examples/1.7.x/console-web/examples/users/delete-target.md new file mode 100644 index 00000000000..386d8a90b56 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/delete.md b/docs/examples/1.7.x/console-web/examples/users/delete.md new file mode 100644 index 00000000000..1d4b1d0e1ca --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/delete.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 00000000000..02d17649c80 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-prefs.md b/docs/examples/1.7.x/console-web/examples/users/get-prefs.md new file mode 100644 index 00000000000..b24f2bd3aee --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-target.md b/docs/examples/1.7.x/console-web/examples/users/get-target.md new file mode 100644 index 00000000000..cfa7d3d5cda --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get-usage.md b/docs/examples/1.7.x/console-web/examples/users/get-usage.md new file mode 100644 index 00000000000..bd87faf10f1 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Users, UserUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getUsage( + UserUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/get.md b/docs/examples/1.7.x/console-web/examples/users/get.md new file mode 100644 index 00000000000..77f5006890a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/get.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-identities.md b/docs/examples/1.7.x/console-web/examples/users/list-identities.md new file mode 100644 index 00000000000..34b92900a7e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-logs.md b/docs/examples/1.7.x/console-web/examples/users/list-logs.md new file mode 100644 index 00000000000..85e6cf50719 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-memberships.md b/docs/examples/1.7.x/console-web/examples/users/list-memberships.md new file mode 100644 index 00000000000..01ce2443612 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-mfa-factors.md b/docs/examples/1.7.x/console-web/examples/users/list-mfa-factors.md new file mode 100644 index 00000000000..fe1dd23594a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-sessions.md b/docs/examples/1.7.x/console-web/examples/users/list-sessions.md new file mode 100644 index 00000000000..e3d5d6e51de --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list-targets.md b/docs/examples/1.7.x/console-web/examples/users/list-targets.md new file mode 100644 index 00000000000..58f4079aee0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/list.md b/docs/examples/1.7.x/console-web/examples/users/list.md new file mode 100644 index 00000000000..d2189b9c939 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/list.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-email-verification.md b/docs/examples/1.7.x/console-web/examples/users/update-email-verification.md new file mode 100644 index 00000000000..3fedd4b86f5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-email.md b/docs/examples/1.7.x/console-web/examples/users/update-email.md new file mode 100644 index 00000000000..99223767784 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-email.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-labels.md b/docs/examples/1.7.x/console-web/examples/users/update-labels.md new file mode 100644 index 00000000000..4fc268fc3c4 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.7.x/console-web/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 00000000000..041cd9098be --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-mfa.md b/docs/examples/1.7.x/console-web/examples/users/update-mfa.md new file mode 100644 index 00000000000..af710ecd488 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-name.md b/docs/examples/1.7.x/console-web/examples/users/update-name.md new file mode 100644 index 00000000000..b57cb33730d --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-name.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-password.md b/docs/examples/1.7.x/console-web/examples/users/update-password.md new file mode 100644 index 00000000000..e9c7f9b51d5 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-password.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-phone-verification.md b/docs/examples/1.7.x/console-web/examples/users/update-phone-verification.md new file mode 100644 index 00000000000..a29e38591cb --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-phone.md b/docs/examples/1.7.x/console-web/examples/users/update-phone.md new file mode 100644 index 00000000000..a87780161b0 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-prefs.md b/docs/examples/1.7.x/console-web/examples/users/update-prefs.md new file mode 100644 index 00000000000..7d9993bbb19 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-status.md b/docs/examples/1.7.x/console-web/examples/users/update-status.md new file mode 100644 index 00000000000..5e823e7a48a --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-status.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/users/update-target.md b/docs/examples/1.7.x/console-web/examples/users/update-target.md new file mode 100644 index 00000000000..ed33fe9bb00 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/users/update-target.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/create-repository-detection.md b/docs/examples/1.7.x/console-web/examples/vcs/create-repository-detection.md new file mode 100644 index 00000000000..84de3ffb26e --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/create-repository-detection.md @@ -0,0 +1,16 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepositoryDetection( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + VCSDetectionType.Runtime, // type + '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/create-repository.md b/docs/examples/1.7.x/console-web/examples/vcs/create-repository.md new file mode 100644 index 00000000000..1d08ac5b09f --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/create-repository.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepository( + '<INSTALLATION_ID>', // installationId + '<NAME>', // name + false // private +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/delete-installation.md b/docs/examples/1.7.x/console-web/examples/vcs/delete-installation.md new file mode 100644 index 00000000000..3f760c09b66 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/delete-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.deleteInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/get-installation.md b/docs/examples/1.7.x/console-web/examples/vcs/get-installation.md new file mode 100644 index 00000000000..4230f2bd9a8 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/get-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/get-repository-contents.md b/docs/examples/1.7.x/console-web/examples/vcs/get-repository-contents.md new file mode 100644 index 00000000000..8a04ba1ae45 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/get-repository-contents.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepositoryContents( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/get-repository.md b/docs/examples/1.7.x/console-web/examples/vcs/get-repository.md new file mode 100644 index 00000000000..516265a0c84 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/get-repository.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepository( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/list-installations.md b/docs/examples/1.7.x/console-web/examples/vcs/list-installations.md new file mode 100644 index 00000000000..1ba1e646157 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/list-installations.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listInstallations( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.7.x/console-web/examples/vcs/list-repositories.md new file mode 100644 index 00000000000..f414ec316b9 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/list-repositories.md @@ -0,0 +1,15 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositories( + '<INSTALLATION_ID>', // installationId + VCSDetectionType.Runtime, // type + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/list-repository-branches.md b/docs/examples/1.7.x/console-web/examples/vcs/list-repository-branches.md new file mode 100644 index 00000000000..ba6b86a053c --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/list-repository-branches.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositoryBranches( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/vcs/update-external-deployments.md b/docs/examples/1.7.x/console-web/examples/vcs/update-external-deployments.md new file mode 100644 index 00000000000..31425cb8832 --- /dev/null +++ b/docs/examples/1.7.x/console-web/examples/vcs/update-external-deployments.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.updateExternalDeployments( + '<INSTALLATION_ID>', // installationId + '<REPOSITORY_ID>', // repositoryId + '<PROVIDER_PULL_REQUEST_ID>' // providerPullRequestId +); + +console.log(result); diff --git a/docs/references/databases/upsert-document.md b/docs/references/databases/upsert-document.md new file mode 100644 index 00000000000..a67694cfa6f --- /dev/null +++ b/docs/references/databases/upsert-document.md @@ -0,0 +1 @@ +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. \ No newline at end of file diff --git a/docs/sdks/android/CHANGELOG.md b/docs/sdks/android/CHANGELOG.md index fa4d35e687c..8406e637b0e 100644 --- a/docs/sdks/android/CHANGELOG.md +++ b/docs/sdks/android/CHANGELOG.md @@ -1 +1,8 @@ -# Change Log \ No newline at end of file +# Change Log + +## 8.0.0 + +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Update default `quality` for `getFilePreview` from 0 to -1 +* Remove `Gif` from ImageFormat enum +* Remove `search` param from `listExecutions` method \ No newline at end of file diff --git a/docs/sdks/apple/CHANGELOG.md b/docs/sdks/apple/CHANGELOG.md index fa4d35e687c..bc30d56a4b2 100644 --- a/docs/sdks/apple/CHANGELOG.md +++ b/docs/sdks/apple/CHANGELOG.md @@ -1 +1,8 @@ -# Change Log \ No newline at end of file +# Change Log + +## 10.0.0 + +* Add `<REGION>` to doc examples due to the new multi region endpoints +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Remove `search` param from `listExecutions` method +* Remove `Gif` from ImageFormat enum \ No newline at end of file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index c41413b9ec7..57a53e5f75c 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,3 +1,17 @@ +# Change Log + +## 16.0.0 + +* Add `<REGION>` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Update enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Remove `search` param from `listExecutions` method + ## 14.0.0 * Breaking changes: diff --git a/docs/sdks/deno/CHANGELOG.md b/docs/sdks/deno/CHANGELOG.md index fa4d35e687c..e46648db823 100644 --- a/docs/sdks/deno/CHANGELOG.md +++ b/docs/sdks/deno/CHANGELOG.md @@ -1 +1,13 @@ -# Change Log \ No newline at end of file +# Change Log + +## 15.0.0 + +* Add `<REGION>` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Updates enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Removes `search` param from `listExecutions` method \ No newline at end of file diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 357b9ff0653..f707c645e64 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,22 @@ +# Change Log + +## 16.1.1 + +* Update `flutter_web_auth_2` dependency to version 4.1.0 +* Update `auth.html` example in README.md to align with `flutter_web_auth_2` documentation + +## 16.1.0 + +* Add `setDevKey` method to Client service +* Add `upsertDocument` method to Databases service + +## 16.0.0 + +* Remove `Gif` from ImageFormat enum +* Remove `search` param from `listExecutions` method +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Update default `quality` for `getFilePreview` from 0 to -1 + ## 15.0.2 * Avoid setting empty `User-Agent` header and only encode it when present. diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 8d239402b34..c3a1a8d33d2 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -56,13 +56,25 @@ For web in order to capture the OAuth2 callback URL and send it to the applicati ```html <!DOCTYPE html> <title>Authentication complete -

Authentication is complete. If this does not happen automatically, please -close the window. +

Authentication is complete. If this does not happen automatically, please close the window.

``` diff --git a/docs/sdks/nodejs/CHANGELOG.md b/docs/sdks/nodejs/CHANGELOG.md index fa4d35e687c..c8a8a16c8ef 100644 --- a/docs/sdks/nodejs/CHANGELOG.md +++ b/docs/sdks/nodejs/CHANGELOG.md @@ -1 +1,13 @@ -# Change Log \ No newline at end of file +# Change Log + +## 17.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Add doc examples and methods for bulk api transactions: `createDocuments`, `deleteDocuments` etc. +* Add doc examples, class and methods for new `Sites` service +* Add doc examples, class and methods for new `Tokens` service +* Add enums for `BuildRuntime `, `Adapter`, `Framework`, `DeploymentDownloadType` and `VCSDeploymentType` +* Updates enum for `runtimes` with Pythonml312, Dart219, Flutter327 and Flutter329 +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Add `queries` and `search` params to `listMemberships` method +* Removes `search` param from `listExecutions` method \ No newline at end of file diff --git a/docs/sdks/react-native/CHANGELOG.md b/docs/sdks/react-native/CHANGELOG.md index f720e11ac6a..1bc7d893733 100644 --- a/docs/sdks/react-native/CHANGELOG.md +++ b/docs/sdks/react-native/CHANGELOG.md @@ -1,5 +1,12 @@ # Change log +## 0.9.0 + +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Update default `quality` for `getFilePreview` from 0 to -1 +* Remove `Gif` from ImageFormat enum +* Remove `search` param from `listExecutions` method + ## 0.7.4 * Upgrade dependencies to resolve PlatformConstants error with Expo 53 diff --git a/docs/sdks/web/CHANGELOG.md b/docs/sdks/web/CHANGELOG.md index fa4d35e687c..5923160f8fa 100644 --- a/docs/sdks/web/CHANGELOG.md +++ b/docs/sdks/web/CHANGELOG.md @@ -1 +1,9 @@ -# Change Log \ No newline at end of file +# Change Log + +## 18.0.0 + +* Add `` to doc examples due to the new multi region endpoints +* Remove `Gif` from ImageFormat enum +* Remove `search` param from `listExecutions` method +* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage +* Improve CORS error catching in `client.call` method \ No newline at end of file diff --git a/public/images/sites/templates/gallery-for-lynx-dark.png b/public/images/sites/templates/gallery-for-lynx-dark.png new file mode 100644 index 00000000000..9dfd2789856 Binary files /dev/null and b/public/images/sites/templates/gallery-for-lynx-dark.png differ diff --git a/public/images/sites/templates/gallery-for-lynx-light.png b/public/images/sites/templates/gallery-for-lynx-light.png new file mode 100644 index 00000000000..9dfd2789856 Binary files /dev/null and b/public/images/sites/templates/gallery-for-lynx-light.png differ diff --git a/src/Appwrite/Certificates/Adapter.php b/src/Appwrite/Certificates/Adapter.php index 711e4c09b90..ab673e9cfe2 100644 --- a/src/Appwrite/Certificates/Adapter.php +++ b/src/Appwrite/Certificates/Adapter.php @@ -6,9 +6,9 @@ interface Adapter { - public function issueCertificate(string $certName, string $domain): ?string; + public function issueCertificate(string $certName, string $domain, ?string $domainType): ?string; - public function isRenewRequired(string $domain, Log $log): bool; + public function isRenewRequired(string $domain, ?string $domainType, Log $log): bool; public function deleteCertificate(string $domain): void; } diff --git a/src/Appwrite/Certificates/LetsEncrypt.php b/src/Appwrite/Certificates/LetsEncrypt.php index 3896eab0225..76638d98165 100644 --- a/src/Appwrite/Certificates/LetsEncrypt.php +++ b/src/Appwrite/Certificates/LetsEncrypt.php @@ -18,7 +18,7 @@ public function __construct(string $email) } - public function issueCertificate(string $certName, string $domain): ?string + public function issueCertificate(string $certName, string $domain, ?string $domainType): ?string { $stdout = ''; $stderr = ''; @@ -84,7 +84,7 @@ public function issueCertificate(string $certName, string $domain): ?string return DateTime::addSeconds($dt, -60 * 60 * 24 * 30); } - public function isRenewRequired(string $domain, Log $log): bool + public function isRenewRequired(string $domain, ?string $domainType, Log $log): bool { $certPath = APP_STORAGE_CERTIFICATES . '/' . $domain . '/cert.pem'; if (\file_exists($certPath)) { diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index d699a45417d..2c735ef2d42 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -286,13 +286,6 @@ public function setParam(string $key, mixed $value): self return $this; } - public function setParamSensitive(string $key): self - { - $this->sensitive[$key] = true; - - return $this; - } - /** * Get param of event. * diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 296434ed57d..3af6d9962cc 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -124,6 +124,8 @@ class Exception extends \Exception /** Membership */ public const MEMBERSHIP_NOT_FOUND = 'membership_not_found'; public const MEMBERSHIP_ALREADY_CONFIRMED = 'membership_already_confirmed'; + public const MEMBERSHIP_DELETION_PROHIBITED = 'membership_deletion_prohibited'; + public const MEMBERSHIP_DOWNGRADE_PROHIBITED = 'membership_downgrade_prohibited'; /** Avatars */ public const AVATAR_SET_NOT_FOUND = 'avatar_set_not_found'; diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 568132ceb14..d122841d687 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -2,14 +2,14 @@ namespace Appwrite\Messaging\Adapter; -use Appwrite\Messaging\Adapter; +use Appwrite\Messaging\Adapter as MessagingAdapter; +use Appwrite\PubSub\Adapter\Pool as PubSubPool; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Role; -use Utopia\Pools\Pool; -class Realtime extends Adapter +class Realtime extends MessagingAdapter { /** * Connection Tree @@ -36,12 +36,12 @@ class Realtime extends Adapter */ public array $subscriptions = []; - private Pool $pubsubPool; + private PubSubPool $pubSubPool; public function __construct() { global $register; - $this->pubsubPool = $register->get('pools')->get('pubsub'); + $this->pubSubPool = new PubSubPool($register->get('pools')->get('pubsub')); } /** @@ -132,11 +132,12 @@ public function hasSubscriber(string $projectId, string $role, string $channel = * Sends an event to the Realtime Server * @param string $projectId * @param array $payload - * @param string $event + * @param array $events * @param array $channels * @param array $roles * @param array $options * @return void + * @throws \Exception */ public function send(string $projectId, array $payload, array $events, array $channels, array $roles, array $options = []): void { @@ -147,7 +148,7 @@ public function send(string $projectId, array $payload, array $events, array $ch $permissionsChanged = array_key_exists('permissionsChanged', $options) && $options['permissionsChanged']; $userId = array_key_exists('userId', $options) ? $options['userId'] : null; - $message = [ + $this->pubSubPool->publish('realtime', json_encode([ 'project' => $projectId, 'roles' => $roles, 'permissionsChanged' => $permissionsChanged, @@ -158,9 +159,7 @@ public function send(string $projectId, array $payload, array $events, array $ch 'timestamp' => DateTime::formatTz(DateTime::now()), 'payload' => $payload ] - ]; - - $this->pubsubPool->use(fn (\Appwrite\PubSub\Adapter $pubsub) => $pubsub->publish('realtime', json_encode($message))); + ])); } /** @@ -175,8 +174,9 @@ public function send(string $projectId, array $payload, array $events, array $ch * - 1,121.328 ms (±0.84%) | 1,000,000 Connections / 10,000,000 Subscriptions * * @param array $event + * @return int[]|string[] */ - public function getSubscribers(array $event) + public function getSubscribers(array $event): array { $receivers = []; @@ -230,7 +230,7 @@ public static function convertChannels(array $channels, string $userId): array foreach ($channels as $key => $value) { switch (true) { - case strpos($key, 'account.') === 0: + case \str_starts_with($key, 'account.'): unset($channels[$key]); break; @@ -353,7 +353,6 @@ public static function fromPayload(string $event, Document $payload, Document $p } break; - case 'sites': if ($parts[2] === 'deployments') { $channels[] = 'console'; @@ -361,7 +360,6 @@ public static function fromPayload(string $event, Document $payload, Document $p $projectId = 'console'; $roles = [Role::team($project->getAttribute('teamId'))->toString()]; } - break; case 'migrations': $channels[] = 'console'; diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 096c23ad921..26b0a0301fa 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -82,9 +82,13 @@ abstract class Migration '1.5.11' => 'V20', '1.6.0' => 'V21', '1.6.1' => 'V21', - '1.6.2' => 'V22', - '1.7.0-RC1' => 'V23', - '1.7.0' => 'V23', + '1.6.2' => 'V21', + '1.7.0-RC1' => 'V22', + '1.7.0' => 'V22', + '1.7.1' => 'V22', + '1.7.2' => 'V22', + '1.7.3' => 'V22', + '1.7.4' => 'V22', ]; /** @@ -385,6 +389,10 @@ public function createIndexFromCollection(Database $database, string $collection default => 'projects', }; + if ($from === 'files') { + $collectionType = 'buckets'; + } + $collection = $this->collections[$collectionType][$from] ?? null; if ($collection === null) { diff --git a/src/Appwrite/Migration/Version/V21.php b/src/Appwrite/Migration/Version/V21.php index 5a5a30bb6f4..38e8a8d513a 100644 --- a/src/Appwrite/Migration/Version/V21.php +++ b/src/Appwrite/Migration/Version/V21.php @@ -74,6 +74,27 @@ private function migrateCollections(): void Console::warning("'accessedAt' from {$id}: {$th->getMessage()}"); } break; + case 'rules': + $attributesToCreate = ['owner', 'region']; + foreach ($attributesToCreate as $attribute) { + // Create attribute + try { + $this->createAttributeFromCollection($this->dbForProject, $id, $attribute); + } catch (Throwable $th) { + Console::warning("'$attribute' from {$id}: {$th->getMessage()}"); + } + } + + $indexesToCreate = ['_key_owner', '_key_region']; + foreach ($indexesToCreate as $index) { + // Create index + try { + $this->createIndexFromCollection($this->dbForProject, $id, $index); + } catch (Throwable $th) { + Console::warning("'$index' from {$id}: {$th->getMessage()}"); + } + } + break; case 'platforms': // Increase 'type' length to 255 try { @@ -82,6 +103,17 @@ private function migrateCollections(): void Console::warning("'type' from {$id}: {$th->getMessage()}"); } break; + case 'installations': + $attributesToCreate = ['personalAccessToken', 'personalAccessTokenExpiry', 'personalRefreshToken']; + foreach ($attributesToCreate as $attribute) { + // Create attribute + try { + $this->createAttributeFromCollection($this->dbForProject, $id, $attribute); + } catch (Throwable $th) { + Console::warning("'$attribute' from {$id}: {$th->getMessage()}"); + } + } + break; case 'migrations': // Create destination attribute try { @@ -197,11 +229,15 @@ protected function fixDocument(Document $document): Document $document->setAttribute('accessedAt', DateTime::now()); break; case 'functions': - // Add scopes attribute - $document->setAttribute('scopes', []); + // Set scopes attribute + if (empty($document->getAttribute('scopes', []))) { + $document->setAttribute('scopes', []); + } - // Add size attribute - $document->setAttribute('specification', APP_COMPUTE_SPECIFICATION_DEFAULT); + // Set specification attribute + if (empty($document->getAttribute('specification'))) { + $document->setAttribute('specification', APP_COMPUTE_SPECIFICATION_DEFAULT); + } } return $document; @@ -214,15 +250,34 @@ protected function fixDocument(Document $document): Document */ private function migrateBuckets(): void { - foreach ($this->documentsIterator('buckets') as $bucket) { + $this->dbForProject->forEach('buckets', function (Document $bucket) { $bucketId = 'bucket_' . $bucket['$internalId']; + Console::log("Migrating Bucket {$bucketId} {$bucket->getId()} ({$bucket->getAttribute('name')})"); + try { $this->dbForProject->updateAttribute($bucketId, 'metadata', size: 65534); + } catch (\Throwable $th) { + Console::warning("'metadata' from {$bucketId}: {$th->getMessage()}"); + } + + try { + $this->createAttributeFromCollection($this->dbForProject, $bucketId, 'transformedAt', 'files'); + } catch (\Throwable $th) { + Console::warning("'transformedAt' from {$bucketId}: {$th->getMessage()}"); + } + + try { + $this->createIndexFromCollection($this->dbForProject, $bucketId, '_key_transformedAt', 'files'); + } catch (\Throwable $th) { + Console::warning("'_key_transformedAt' from {$bucketId}: {$th->getMessage()}"); + } + + try { $this->dbForProject->purgeCachedCollection($bucketId); } catch (\Throwable $th) { - Console::warning("'bucketId' from {$bucketId}: {$th->getMessage()}"); + Console::warning("purging {$bucketId}: {$th->getMessage()}"); } - } + }); } } diff --git a/src/Appwrite/Migration/Version/V22.php b/src/Appwrite/Migration/Version/V22.php index a5474ff80ce..cfe4f1fe576 100644 --- a/src/Appwrite/Migration/Version/V22.php +++ b/src/Appwrite/Migration/Version/V22.php @@ -7,6 +7,12 @@ use Throwable; use Utopia\CLI\Console; use Utopia\Database\Database; +use Utopia\Database\Document; +use Utopia\Database\Exception\Conflict; +use Utopia\Database\Exception\Structure; +use Utopia\Database\Exception\Timeout; +use Utopia\Database\Query; +use Utopia\System\System; class V22 extends Migration { @@ -16,9 +22,9 @@ class V22 extends Migration public function execute(): void { /** - * Disable SubQueries for Performance. - */ - foreach (['subQueryIndexes', 'subQueryPlatforms', 'subQueryDomains', 'subQueryKeys', 'subQueryWebhooks', 'subQuerySessions', 'subQueryTokens', 'subQueryMemberships', 'subQueryVariables', 'subQueryChallenges', 'subQueryProjectVariables', 'subQueryTargets', 'subQueryTopicTargets'] as $name) { + * Disable SubQueries for Performance. + */ + foreach (['subQueryIndexes', 'subQueryPlatforms', 'subQueryDomains', 'subQueryKeys', 'subQueryDevKeys', 'subQueryWebhooks', 'subQuerySessions', 'subQueryTokens', 'subQueryMemberships', 'subQueryVariables', 'subQueryChallenges', 'subQueryProjectVariables', 'subQueryTargets', 'subQueryTopicTargets'] as $name) { Database::addFilter( $name, fn () => null, @@ -26,8 +32,14 @@ public function execute(): void ); } - Console::info('Migrating Collections'); + Console::info('Migrating collections'); $this->migrateCollections(); + + Console::info('Migrating documents'); + $this->forEachDocument($this->migrateDocument(...)); + + Console::info('Cleaning up collections'); + $this->cleanCollections(); } /** @@ -38,46 +50,605 @@ public function execute(): void */ private function migrateCollections(): void { - $internalProjectId = $this->project->getInternalId(); - $collectionType = match ($internalProjectId) { + $projectInternalId = $this->project->getInternalId(); + + if (empty($projectInternalId)) { + throw new Exception('Project ID is null'); + } + + $collectionType = match ($projectInternalId) { 'console' => 'console', default => 'projects', }; $collections = $this->collections[$collectionType]; + foreach ($collections as $collection) { $id = $collection['$id']; - Console::log("Migrating Collection \"{$id}\""); + if (empty($id)) { + continue; + } - $this->dbForProject->setNamespace("_$internalProjectId"); + Console::log("Migrating collection \"{$id}\""); switch ($id) { - case 'installations': - // Create personalAccessToken attribute + case '_metadata': + $this->createCollection('sites'); + $this->createCollection('resourceTokens'); + if ($projectInternalId === 'console') { + $this->createCollection('devKeys'); + } + break; + case 'identities': + $attributes = [ + 'scopes', + 'expire', + ]; + try { + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + $this->dbForProject->purgeCachedCollection($id); + break; + case 'projects': + try { + $attributes = [ + 'devKeys', + ]; + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + $this->dbForProject->purgeCachedCollection($id); + break; + case 'rules': + $attributes = [ + 'type', + 'trigger', + 'redirectUrl', + 'redirectStatusCode', + 'deploymentResourceType', + 'deploymentId', + 'deploymentInternalId', + 'deploymentResourceId', + 'deploymentResourceInternalId', + 'deploymentVcsProviderBranch', + 'search' + ]; + try { + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + + $indexes = [ + '_key_search', + '_key_type', + '_key_trigger', + '_key_deploymentResourceType', + '_key_deploymentResourceId', + '_key_deploymentResourceInternalId', + '_key_deploymentId', + '_key_deploymentInternalId', + '_key_deploymentVcsProviderBranch', + ]; + + foreach ($indexes as $index) { + try { + $this->createIndexFromCollection($this->dbForProject, $id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); + } + } + $this->dbForProject->purgeCachedCollection($id); + break; + case 'memberships': + $indexes = [ + '_key_roles', + ]; + foreach ($indexes as $index) { + try { + $this->dbForProject->deleteIndex($id, $index); + } catch (Throwable $th) { + Console::warning("Failed to delete index \"$index\" from {$id}: {$th->getMessage()}"); + } + } + $this->dbForProject->purgeCachedCollection($id); + break; + case 'migrations': + $attributes = [ + 'options', + 'resourceId', + 'resourceType' + ]; + try { + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + + $indexes = [ + '_key_resource_id', + ]; + + foreach ($indexes as $index) { + try { + $this->createIndexFromCollection($this->dbForProject, $id, $index); + } catch (Throwable $th) { + Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); + } + } + + $this->dbForProject->purgeCachedCollection($id); + break; + case 'functions': + $attributes = [ + 'deploymentId', + 'deploymentCreatedAt', + 'latestDeploymentId', + 'latestDeploymentInternalId', + 'latestDeploymentCreatedAt', + 'latestDeploymentStatus', + ]; + try { + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + + $indexes = [ + '_key_deploymentId', + ]; + + foreach ($indexes as $index) { + try { + $this->createIndexFromCollection($this->dbForProject, $id, $index); + } catch (Throwable $th) { + Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); + } + } + + $this->dbForProject->purgeCachedCollection($id); + break; + case 'deployments': + $attributes = [ + 'buildCommands', + 'sourcePath', + 'buildOutput', + 'adapter', + 'fallbackFile', + 'sourceSize', + 'sourceMetadata', + 'sourceChunksTotal', + 'sourceChunksUploaded', + 'screenshotLight', + 'screenshotDark', + 'buildStartedAt', + 'buildEndedAt', + 'buildDuration', + 'buildSize', + 'status', + 'buildPath', + 'buildLogs', + 'totalSize', + ]; try { - $this->createAttributeFromCollection($this->dbForProject, $id, 'personalAccessToken'); - } catch (Throwable $th) { - Console::warning("'personalAccessToken' from {$id}: {$th->getMessage()}"); + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + + $indexes = [ + '_key_sourceSize', + '_key_buildSize', + '_key_totalSize', + '_key_buildDuration', + '_key_type', + '_key_status', + ]; + + foreach ($indexes as $index) { + try { + $this->createIndexFromCollection($this->dbForProject, $id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); + } } - // Create personalAccessTokenExpiry attribute + $this->dbForProject->purgeCachedCollection($id); + break; + case 'executions': + $attributes = [ + 'resourceInternalId', + 'resourceId', + 'resourceType' + ]; try { - $this->createAttributeFromCollection($this->dbForProject, $id, 'personalAccessTokenExpiry'); - } catch (Throwable $th) { - Console::warning("'personalAccessTokenExpiry' from {$id}: {$th->getMessage()}"); + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + + $indexes = [ + '_key_resource', + ]; + foreach ($indexes as $index) { + try { + $this->createIndexFromCollection($this->dbForProject, $id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); + } } - // Create personalRefreshToken attribute + $this->dbForProject->purgeCachedCollection($id); + break; + case 'variables': + $attributes = [ + 'secret', + ]; try { - $this->createAttributeFromCollection($this->dbForProject, $id, 'personalRefreshToken'); - } catch (Throwable $th) { - Console::warning("'personalRefreshToken' from {$id}: {$th->getMessage()}"); + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); } + + $this->dbForProject->purgeCachedCollection($id); + break; + default: break; } + } + } + + /** + * Fix run on each document + * + * @param Document $document + * @return Document + * @throws Conflict + * @throws Structure + * @throws Timeout + * @throws \Utopia\Database\Exception + * @throws \Utopia\Database\Exception\Authorization + * @throws \Utopia\Database\Exception\Query + */ + private function migrateDocument(Document $document): Document + { + switch ($document->getCollection()) { + case 'rules': + /* + 1. Convert "resourceType" to "type". Convert "function" to "deployment" + 2. Convert "resourceId" to "deploymentResourceId" + 3. Convert "resourceInternalId" to "deploymentResourceInternalId" + 4. Fill "trigger" with "manual" + 5. Fill "deploymentResourceType". If "resourceType" is "function", set "deploymentResourceType" to "function" + 6. Fill "search" with "{$id} {domain}" + 7. Set "region" to project region + 8. Fill "owner" with "Appwrite" if "domain" ends with "functions" or "sites" + 9. Fill "deploymentId" and "deploymentInternalId". If "deploymentResourceType" is "function", get project DB, and find function with ID "resourceId". Then fill rule's "deploymentId" with function's "deployment", and "deploymentId" as backup + */ + + $deploymentResourceType = null; + + $type = $document->getAttribute('resourceType', $document->getAttribute('type', '')); + if ($type === 'function') { + $type = 'deployment'; + $deploymentResourceType = 'function'; + } + + $resourceId = $document->getAttribute('resourceId', $document->getAttribute('deploymentResourceId')); + $resourceInternalId = $document->getAttribute('resourceInternalId', $document->getAttribute('deploymentResourceInternalId')); + + $document + ->setAttribute('type', $type) + ->setAttribute('trigger', 'manual') + ->setAttribute('deploymentResourceId', $resourceId) + ->setAttribute('deploymentResourceInternalId', $resourceInternalId) + ->setAttribute('deploymentResourceType', $document->getAttribute('deploymentResourceType', $deploymentResourceType)) + ->setAttribute('search', \implode(' ', [$document->getId(), $document->getAttribute('domain', '')])); + + $project = $this->dbForProject->getDocument('projects', $document->getAttribute('projectId')); + + if ($project->isEmpty()) { + Console::warning("Project \"{$document->getAttribute('projectId')}\" not found for rule \"{$document->getId()}\""); + $document->setAttribute('region', System::getEnv('_APP_REGION', 'default')); + break; + } + + $document->setAttribute('region', $project->getAttribute('region', System::getEnv('_APP_REGION', 'default'))); + + $domain = $document->getAttribute('domain', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $owner = $document->getAttribute('owner', ''); + if ( + empty($owner) && + (!empty($functionsDomain) && \str_ends_with($domain, $functionsDomain)) || + (!empty($sitesDomain) && \str_ends_with($domain, $sitesDomain)) + ) { + $document->setAttribute('owner', 'Appwrite'); + } - usleep(50000); + if ($deploymentResourceType === 'function') { + $dbForOwnerProject = ($this->getProjectDB)($project); + $function = $dbForOwnerProject->getDocument('functions', $resourceId); + + if ($function->isEmpty()) { + Console::warning("Function \"{$resourceId}\" not found for rule \"{$document->getId()}\""); + break; + } + + $deploymentId = $function->getAttribute('deployment', $function->getAttribute('deploymentId', $document->getAttribute('deploymentId', ''))); + $deploymentInternalId = $function->getAttribute('deploymentInternalId', $document->getAttribute('deploymentInternalId', '')); + + $document + ->setAttribute('deploymentId', $deploymentId) + ->setAttribute('deploymentInternalId', $deploymentInternalId); + } + break; + case 'variables': + /* + 1. Fill "secret" with "false" + */ + $document->setAttribute('secret', $document->getAttribute('secret', false)); + break; + case 'executions': + /* + 1. Convert "functionInternalId" to "resourceInternalId" + 2. Convert "functionId" to "resourceId" + 3. Fill "resourceType" with "functions" + */ + $document + ->setAttribute('resourceInternalId', $document->getAttribute('functionInternalId', $document->getAttribute('resourceInternalId'))) + ->setAttribute('resourceId', $document->getAttribute('functionId', $document->getAttribute('resourceId', ''))) + ->setAttribute('resourceType', $document->getAttribute('resourceType', 'functions')); + break; + case 'functions': + /* + 1. Convert "deployment" to "deploymentId" + --- Fetch activeDeployment from "deploymentId" + 2. Fill "deploymentCreatedAt" with deployment's "$createdAt" + --- Fetch latestDeployment using find() + 3. Fill latestDeploymentId with latestDeployment's "$id" + 4. Fill latestDeploymentInternalId with latestDeployment's "$internalId" + 5. Fill latestDeploymentCreatedAt with latestDeployment's "$createdAt" + 6. Fill latestDeploymentStatus with latestDeployment's build's "status" + */ + if (empty($document->getAttribute('deployment'))) { + break; + } + + $document->setAttribute('deploymentId', $document->getAttribute('deployment', $document->getAttribute('deploymentId', ''))); + $deploymentId = $document->getAttribute('deploymentId'); + $deployment = $this->dbForProject->getDocument('deployments', $deploymentId); + + if ($deployment->isEmpty()) { + Console::warning("Deployment \"{$deploymentId}\" not found for function \"{$document->getId()}\""); + break; + } + + $document->setAttribute('deploymentCreatedAt', $deployment->getCreatedAt()); + + $latestDeployment = $this->dbForProject->findOne('deployments', [ + Query::orderDesc(), + Query::equal('resourceId', [$document->getId()]), + Query::equal('resourceType', ['functions']), + ]); + + if ($latestDeployment->isEmpty()) { + Console::warning("Latest deployment not found for function \"{$document->getId()}\""); + break; + } + + $latestBuild = $this->dbForProject->getDocument('builds', $latestDeployment->getAttribute('buildId', '')); + + if ($latestBuild->isEmpty()) { + Console::warning("Build \"{$latestDeployment->getAttribute('buildId')}\" not found for deployment \"{$latestDeployment->getId()}\""); + break; + } + + $document + ->setAttribute('latestDeploymentId', $latestDeployment->getId()) + ->setAttribute('latestDeploymentInternalId', $latestDeployment->getInternalId()) + ->setAttribute('latestDeploymentCreatedAt', $latestDeployment->getCreatedAt()) + ->setAttribute('latestDeploymentStatus', $latestBuild->getAttribute('status', $document->getAttribute('latestDeploymentStatus', ''))); + break; + case 'deployments': + /* + 6. Convert "commands" to "buildCommands" + 7. Convert "path" to "sourcePath" + 8. Convert "size" to "sourceSize" + 9. Convert "metadata" to "sourceMetadata" + 10. Convert "chunksTotal" to "sourceChunksTotal" + 11. Convert "chunksUploaded" to "sourceChunksUploaded" + --- Get build of deployment + 12. Convert build's "startTime" to "buildStartedAt" + 13. Convert build's "endTime" to "buildEndedAt" + 14. Convert build's "duration" to "buildDuration" + 15. Convert build's "size" to "buildSize" + 16. Convert build's "status" to "status" + 17. Convert build's "path" to "buildPath" + 18. Convert build's "logs" to "buildLogs" + 19. Fill "totalSize" with "buildSize" plus "sourceSize" + */ + + $document + ->setAttribute('buildCommands', $document->getAttribute('commands', $document->getAttribute('buildCommands', ''))) + ->setAttribute('sourcePath', $document->getAttribute('path', $document->getAttribute('sourcePath', ''))) + ->setAttribute('sourceSize', $document->getAttribute('size', $document->getAttribute('sourceSize', 0))) + ->setAttribute('sourceMetadata', $document->getAttribute('metadata', $document->getAttribute('sourceMetadata', []))) + ->setAttribute('sourceChunksTotal', $document->getAttribute('chunksTotal', $document->getAttribute('sourceChunksTotal', 0))) + ->setAttribute('sourceChunksUploaded', $document->getAttribute('chunksUploaded', $document->getAttribute('sourceChunksUploaded', 0))); + + $build = new Document(); + if (!empty($document->getAttribute('buildId'))) { + $build = $this->dbForProject->getDocument('builds', $document->getAttribute('buildId')); + } + + $document + ->setAttribute('buildStartedAt', $build->getAttribute('startTime', $document->getAttribute('buildStartTime', ''))) + ->setAttribute('buildEndedAt', $build->getAttribute('endTime', $document->getAttribute('buildEndTime', ''))) + ->setAttribute('buildDuration', $build->getAttribute('duration', $document->getAttribute('buildDuration', 0))) + ->setAttribute('buildSize', $build->getAttribute('size', $document->getAttribute('buildSize', 0))) + ->setAttribute('status', $build->getAttribute('status', $document->getAttribute('status', ''))) + ->setAttribute('buildPath', $build->getAttribute('path', $document->getAttribute('buildPath', ''))) + ->setAttribute('buildLogs', $build->getAttribute('logs', $document->getAttribute('buildLogs', ''))); + + $totalSize = $document->getAttribute('buildSize', 0) + + $document->getAttribute('sourceSize', 0); + + $document->setAttribute('totalSize', $totalSize); + break; + case 'migrations': + /* + 1. Fill "options" with "[]" + */ + $document->setAttribute('options', $document->getAttribute('options', [])); + break; + default: + break; + } + return $document; + } + + private function cleanCollections(): void + { + $projectInternalId = $this->project->getInternalId(); + + $collectionType = match ($projectInternalId) { + 'console' => 'console', + default => 'projects', + }; + + $collections = $this->collections[$collectionType]; + foreach ($collections as $collection) { + $id = $collection['$id']; + + Console::log("Cleaning up collection \"{$id}\""); + + switch ($id) { + case '_metadata': + if (!$this->dbForProject->getCollection('builds')->isEmpty()) { + $this->dbForProject->deleteCollection('builds'); + } + break; + case 'rules': + $attributes = [ + 'resourceId', + 'resourceInternalId', + 'resourceType', + ]; + foreach ($attributes as $attribute) { + try { + $this->dbForProject->deleteAttribute($id, $attribute); + } catch (\Throwable $th) { + Console::warning("Failed to delete attribute \"$attribute\" from collection {$id}: {$th->getMessage()}"); + } + } + + $indexesToDelete = [ + '_key_resourceId', + '_key_resourceInternalId', + '_key_resourceType', + ]; + foreach ($indexesToDelete as $index) { + try { + $this->dbForProject->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); + } + } + + $this->dbForProject->purgeCachedCollection($id); + break; + case 'functions': + try { + $this->dbForProject->deleteAttribute($id, 'deployment'); + } catch (\Throwable $th) { + Console::warning("Failed to delete attribute \"deployment\" from collection {$id}: {$th->getMessage()}"); + } + + $indexesToDelete = [ + '_key_deployment' + ]; + foreach ($indexesToDelete as $index) { + try { + $this->dbForProject->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); + } + } + + $this->dbForProject->purgeCachedCollection($id); + break; + case 'deployments': + $attributes = [ + 'buildInternalId', + 'buildId', + 'commands', + 'path', + 'size', + 'metadata', + 'chunksTotal', + 'chunksUploaded', + 'search' + ]; + foreach ($attributes as $attribute) { + try { + $this->dbForProject->deleteAttribute($id, $attribute); + } catch (\Throwable $th) { + Console::warning("Failed to delete attribute \"$attribute\" from collection {$id}: {$th->getMessage()}"); + } + } + + $indexesToDelete = [ + '_key_buildId', + '_key_size', + '_key_search' + ]; + foreach ($indexesToDelete as $index) { + try { + $this->dbForProject->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); + } + } + + $this->dbForProject->purgeCachedCollection($id); + break; + case 'executions': + $attributes = [ + 'functionId', + 'functionInternalId', + 'search' + ]; + foreach ($attributes as $attribute) { + try { + $this->dbForProject->deleteAttribute($id, $attribute); + } catch (\Throwable $th) { + Console::warning("Failed to delete attribute \"$attribute\" from collection {$id}: {$th->getMessage()}"); + } + } + + $indexesToDelete = [ + '_key_function', + '_fulltext_search' + ]; + foreach ($indexesToDelete as $index) { + try { + $this->dbForProject->deleteIndex($id, $index); + } catch (\Throwable $th) { + Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); + } + } + + $this->dbForProject->purgeCachedCollection($id); + break; + default: + break; + } } } } diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php deleted file mode 100644 index 400b223756d..00000000000 --- a/src/Appwrite/Migration/Version/V23.php +++ /dev/null @@ -1,607 +0,0 @@ - null, - fn () => [] - ); - } - - Console::info('Migrating collections'); - $this->migrateCollections(); - - Console::info('Migrating documents'); - $this->forEachDocument($this->migrateDocument(...)); - - Console::info('Cleaning up collections'); - $this->cleanCollections(); - } - - /** - * Migrate Collections. - * - * @return void - * @throws Exception|Throwable - */ - private function migrateCollections(): void - { - $projectInternalId = $this->project->getInternalId(); - - if (empty($projectInternalId)) { - throw new Exception('Project ID is null'); - } - - $collectionType = match ($projectInternalId) { - 'console' => 'console', - default => 'projects', - }; - - $collections = $this->collections[$collectionType]; - - foreach ($collections as $collection) { - $id = $collection['$id']; - - if (empty($id)) { - continue; - } - - Console::log("Migrating collection \"{$id}\""); - - switch ($id) { - case '_metadata': - $this->createCollection('sites'); - $this->createCollection('resourceTokens'); - if ($projectInternalId === 'console') { - $this->createCollection('devKeys'); - } - break; - case 'identities': - $attributes = [ - 'scopes', - 'expire', - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - $this->dbForProject->purgeCachedCollection($id); - break; - case 'projects': - try { - $attributes = [ - 'devKeys', - ]; - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - $this->dbForProject->purgeCachedCollection($id); - break; - case 'rules': - $attributes = [ - 'type', - 'trigger', - 'redirectUrl', - 'redirectStatusCode', - 'deploymentResourceType', - 'deploymentId', - 'deploymentInternalId', - 'deploymentResourceId', - 'deploymentResourceInternalId', - 'deploymentVcsProviderBranch', - 'search' - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - - $indexes = [ - '_key_search', - '_key_type', - '_key_trigger', - '_key_deploymentResourceType', - '_key_deploymentResourceId', - '_key_deploymentResourceInternalId', - '_key_deploymentId', - '_key_deploymentInternalId', - '_key_deploymentVcsProviderBranch', - ]; - - foreach ($indexes as $index) { - try { - $this->createIndexFromCollection($this->dbForProject, $id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - } - } - $this->dbForProject->purgeCachedCollection($id); - break; - case 'memberships': - $indexes = [ - '_key_roles', - ]; - foreach ($indexes as $index) { - try { - $this->createIndexFromCollection($this->dbForProject, $id, $index); - } catch (Throwable $th) { - Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - } - } - $this->dbForProject->purgeCachedCollection($id); - break; - case 'migrations': - $attributes = [ - 'options', - 'resourceId', - 'resourceType' - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - - $indexes = [ - '_key_resource_id', - ]; - - foreach ($indexes as $index) { - try { - $this->createIndexFromCollection($this->dbForProject, $id, $index); - } catch (Throwable $th) { - Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'functions': - $attributes = [ - 'deploymentId', - 'deploymentCreatedAt', - 'latestDeploymentId', - 'latestDeploymentInternalId', - 'latestDeploymentCreatedAt', - 'latestDeploymentStatus', - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - - $indexes = [ - '_key_deploymentId', - ]; - - foreach ($indexes as $index) { - try { - $this->createIndexFromCollection($this->dbForProject, $id, $index); - } catch (Throwable $th) { - Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'deployments': - $attributes = [ - 'buildCommands', - 'sourcePath', - 'buildOutput', - 'adapter', - 'fallbackFile', - 'sourceSize', - 'sourceMetadata', - 'sourceChunksTotal', - 'sourceChunksUploaded', - 'screenshotLight', - 'screenshotDark', - 'buildStartedAt', - 'buildEndedAt', - 'buildDuration', - 'buildSize', - 'status', - 'buildPath', - 'buildLogs', - 'totalSize', - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - - $indexes = [ - '_key_sourceSize', - '_key_buildSize', - '_key_totalSize', - '_key_buildDuration', - '_key_type', - '_key_status', - ]; - - foreach ($indexes as $index) { - try { - $this->createIndexFromCollection($this->dbForProject, $id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'executions': - $attributes = [ - 'resourceInternalId', - 'resourceId', - 'resourceType' - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - - $indexes = [ - '_key_resource', - ]; - foreach ($indexes as $index) { - try { - $this->createIndexFromCollection($this->dbForProject, $id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to create index \"$index\" from {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'variables': - $attributes = [ - 'secret', - ]; - try { - $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); - } catch (\Throwable $th) { - Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); - } - - $this->dbForProject->purgeCachedCollection($id); - break; - default: - break; - } - } - } - - /** - * Fix run on each document - * - * @param Document $document - * @return Document - * @throws Conflict - * @throws Structure - * @throws Timeout - * @throws \Utopia\Database\Exception - * @throws \Utopia\Database\Exception\Authorization - * @throws \Utopia\Database\Exception\Query - */ - private function migrateDocument(Document $document): Document - { - switch ($document->getCollection()) { - case 'rules': - /* - 1. Convert "resourceType" to "type". Convert "function" to "deployment" - 2. Convert "resourceId" to "deploymentResourceId" - 3. Convert "resourceInternalId" to "deploymentResourceInternalId" - 4. Fill "trigger" with "manual" - 5. Fill "deploymentResourceType". If "resourceType" is "function", set "deploymentResourceType" to "function" - 6. Fill "search" with "{$id} {domain}" - 7. Fill "deploymentId" and "deploymentInternalId". If "deploymentResourceType" is "function", get project DB, and find function with ID "resourceId". Then fill rule's "deploymentId" with function's "deployment", and "deploymentId" as backup - */ - - $deploymentResourceType = null; - - $type = $document->getAttribute('resourceType', $document->getAttribute('type', '')); - if ($type === 'function') { - $type = 'deployment'; - $deploymentResourceType = 'function'; - } - - $resourceId = $document->getAttribute('resourceId', $document->getAttribute('deploymentResourceId')); - $resourceInternalId = $document->getAttribute('resourceInternalId', $document->getAttribute('deploymentResourceInternalId')); - - $document - ->setAttribute('type', $type) - ->setAttribute('trigger', 'manual') - ->setAttribute('deploymentResourceId', $resourceId) - ->setAttribute('deploymentResourceInternalId', $resourceInternalId) - ->setAttribute('deploymentResourceType', $document->getAttribute('deploymentResourceType', $deploymentResourceType)) - ->setAttribute('search', \implode(' ', [$document->getId(), $document->getAttribute('domain', '')])); - - if ($deploymentResourceType === 'function') { - $project = $this->dbForProject->getDocument('projects', $document->getAttribute('projectId')); - $dbForOwnerProject = ($this->getProjectDB)($project); - $function = $dbForOwnerProject->getDocument('functions', $resourceId); - $deploymentId = $function->getAttribute('deployment', $function->getAttribute('deploymentId', $document->getAttribute('deploymentId'))); - $deploymentInternalId = $function->getAttribute('deploymentInternalId', $document->getAttribute('deploymentInternalId', '')); - - $document - ->setAttribute('deploymentId', $deploymentId) - ->setAttribute('deploymentInternalId', $deploymentInternalId); - } - break; - case 'variables': - /* - 1. Fill "secret" with "false" - */ - $document->setAttribute('secret', $document->getAttribute('secret', false)); - break; - case 'executions': - /* - 1. Convert "functionInternalId" to "resourceInternalId" - 2. Convert "functionId" to "resourceId" - 3. Fill "resourceType" with "functions" - */ - $document - ->setAttribute('resourceInternalId', $document->getAttribute('functionInternalId', $document->getAttribute('resourceInternalId'))) - ->setAttribute('resourceId', $document->getAttribute('functionId', $document->getAttribute('resourceId', ''))) - ->setAttribute('resourceType', $document->getAttribute('resourceType', 'functions')); - break; - case 'functions': - /* - 1. Convert "deployment" to "deploymentId" - --- Fetch activeDeployment from "deploymentId" - 2. Fill "deploymentCreatedAt" with deployment's "$createdAt" - --- Fetch latestDeployment using find() - 3. Fill latestDeploymentId with latestDeployment's "$id" - 4. Fill latestDeploymentInternalId with latestDeployment's "$internalId" - 5. Fill latestDeploymentCreatedAt with latestDeployment's "$createdAt" - 6. Fill latestDeploymentStatus with latestDeployment's build's "status" - */ - if ($document->getAttribute('deployment')) { - $document->setAttribute('deploymentId', $document->getAttribute('deployment', $document->getAttribute('deploymentId', ''))); - } - - $deploymentId = $document->getAttribute('deploymentId'); - $deployment = $this->dbForProject->getDocument('deployments', $deploymentId); - $document->setAttribute('deploymentCreatedAt', $deployment->getCreatedAt()); - - $latestDeployment = $this->dbForProject->findOne('deployments', [ - Query::orderDesc(), - Query::equal('resourceId', [$document->getId()]), - Query::equal('resourceType', ['functions']), - ]); - - $latestBuild = $this->dbForProject->getDocument('builds', $latestDeployment->getAttribute('buildId', '')); - - $document - ->setAttribute('latestDeploymentId', $latestDeployment->getId()) - ->setAttribute('latestDeploymentInternalId', $latestDeployment->getInternalId()) - ->setAttribute('latestDeploymentCreatedAt', $latestDeployment->getCreatedAt()) - ->setAttribute('latestDeploymentStatus', $latestBuild->getAttribute('status', $document->getAttribute('latestDeploymentStatus', ''))); - break; - case 'deployments': - /* - 6. Convert "commands" to "buildCommands" - 7. Convert "path" to "sourcePath" - 8. Convert "size" to "sourceSize" - 9. Convert "metadata" to "sourceMetadata" - 10. Convert "chunksTotal" to "sourceChunksTotal" - 11. Convert "chunksUploaded" to "sourceChunksUploaded" - --- Get build of deployment - 12. Convert build's "startTime" to "buildStartedAt" - 13. Convert build's "endTime" to "buildEndedAt" - 14. Convert build's "duration" to "buildDuration" - 15. Convert build's "size" to "buildSize" - 16. Convert build's "status" to "status" - 17. Convert build's "path" to "buildPath" - 18. Convert build's "logs" to "buildLogs" - 19. Fill "totalSize" with "buildSize" plus "sourceSize" - */ - - $document - ->setAttribute('buildCommands', $document->getAttribute('commands', $document->getAttribute('buildCommands', ''))) - ->setAttribute('sourcePath', $document->getAttribute('path', $document->getAttribute('sourcePath', ''))) - ->setAttribute('sourceSize', $document->getAttribute('size', $document->getAttribute('sourceSize', 0))) - ->setAttribute('sourceMetadata', $document->getAttribute('metadata', $document->getAttribute('sourceMetadata', []))) - ->setAttribute('sourceChunksTotal', $document->getAttribute('chunksTotal', $document->getAttribute('sourceChunksTotal', 0))) - ->setAttribute('sourceChunksUploaded', $document->getAttribute('chunksUploaded', $document->getAttribute('sourceChunksUploaded', 0))); - - $build = new Document(); - if (!empty($document->getAttribute('buildId'))) { - $build = $this->dbForProject->getDocument('builds', $document->getAttribute('buildId')); - } - - $document - ->setAttribute('buildStartedAt', $build->getAttribute('startTime', $document->getAttribute('buildStartTime', ''))) - ->setAttribute('buildEndedAt', $build->getAttribute('endTime', $document->getAttribute('buildEndTime', ''))) - ->setAttribute('buildDuration', $build->getAttribute('duration', $document->getAttribute('buildDuration', 0))) - ->setAttribute('buildSize', $build->getAttribute('size', $document->getAttribute('buildSize', 0))) - ->setAttribute('status', $build->getAttribute('status', $document->getAttribute('status', ''))) - ->setAttribute('buildPath', $build->getAttribute('path', $document->getAttribute('buildPath', ''))) - ->setAttribute('buildLogs', $build->getAttribute('logs', $document->getAttribute('buildLogs', ''))); - - $totalSize = $document->getAttribute('buildSize', 0) - + $document->getAttribute('sourceSize', 0); - - $document->setAttribute('totalSize', $totalSize); - break; - case 'migrations': - /* - 1. Fill "options" with "[]" - */ - $document->setAttribute('options', $document->getAttribute('options', [])); - break; - default: - break; - } - return $document; - } - - private function cleanCollections(): void - { - $projectInternalId = $this->project->getInternalId(); - - $collectionType = match ($projectInternalId) { - 'console' => 'console', - default => 'projects', - }; - - $collections = $this->collections[$collectionType]; - foreach ($collections as $collection) { - $id = $collection['$id']; - - Console::log("Cleaning up collection \"{$id}\""); - - switch ($id) { - case '_metadata': - if (!$this->dbForProject->getCollection('builds')->isEmpty()) { - $this->dbForProject->deleteCollection('builds'); - } - break; - case 'rules': - $attributes = [ - 'resourceId', - 'resourceInternalId', - 'resourceType', - ]; - foreach ($attributes as $attribute) { - try { - $this->dbForProject->deleteAttribute($id, $attribute); - } catch (\Throwable $th) { - Console::warning("Failed to delete attribute \"$attribute\" from collection {$id}: {$th->getMessage()}"); - } - } - - $indexesToDelete = [ - '_key_resourceId', - '_key_resourceInternalId', - '_key_resourceType', - ]; - foreach ($indexesToDelete as $index) { - try { - $this->dbForProject->deleteIndex($id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'functions': - try { - $this->dbForProject->deleteAttribute($id, 'deployment'); - } catch (\Throwable $th) { - Console::warning("Failed to delete attribute \"deployment\" from collection {$id}: {$th->getMessage()}"); - } - - $indexesToDelete = [ - '_key_deployment' - ]; - foreach ($indexesToDelete as $index) { - try { - $this->dbForProject->deleteIndex($id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'deployments': - $attributes = [ - 'buildInternalId', - 'buildId', - 'commands', - 'path', - 'size', - 'metadata', - 'chunksTotal', - 'chunksUploaded', - 'search' - ]; - foreach ($attributes as $attribute) { - try { - $this->dbForProject->deleteAttribute($id, $attribute); - } catch (\Throwable $th) { - Console::warning("Failed to delete attribute \"$attribute\" from collection {$id}: {$th->getMessage()}"); - } - } - - $indexesToDelete = [ - '_key_buildId', - '_key_size', - '_key_search' - ]; - foreach ($indexesToDelete as $index) { - try { - $this->dbForProject->deleteIndex($id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - case 'executions': - $attributes = [ - 'functionId', - 'functionInternalId', - 'search' - ]; - foreach ($attributes as $attribute) { - try { - $this->dbForProject->deleteAttribute($id, $attribute); - } catch (\Throwable $th) { - Console::warning("Failed to delete attribute \"$attribute\" from collection {$id}: {$th->getMessage()}"); - } - } - - $indexesToDelete = [ - '_key_function', - '_fulltext_search' - ]; - foreach ($indexesToDelete as $index) { - try { - $this->dbForProject->deleteIndex($id, $index); - } catch (\Throwable $th) { - Console::warning("Failed to delete index \"$index\" from collection {$id}: {$th->getMessage()}"); - } - } - - $this->dbForProject->purgeCachedCollection($id); - break; - default: - break; - } - } - } -} diff --git a/src/Appwrite/Platform/Modules/Compute/Base.php b/src/Appwrite/Platform/Modules/Compute/Base.php index 542b29bcd52..0541df551a2 100644 --- a/src/Appwrite/Platform/Modules/Compute/Base.php +++ b/src/Appwrite/Platform/Modules/Compute/Base.php @@ -4,7 +4,6 @@ use Appwrite\Event\Build; use Appwrite\Extend\Exception; -use Appwrite\Query; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; @@ -90,7 +89,6 @@ public function redeployVcsFunction(Request $request, Document $function, Docume 'providerCommitUrl' => $commitDetails['commitUrl'] ?? '', 'providerBranch' => $providerBranch, 'providerRootDirectory' => $function->getAttribute('providerRootDirectory', ''), - 'search' => implode(' ', [$deploymentId, $entrypoint]), 'activate' => $activate, ])); @@ -190,7 +188,6 @@ public function redeployVcsSite(Request $request, Document $site, Document $proj 'providerCommitUrl' => $commitDetails['commitUrl'] ?? '', 'providerBranch' => $providerBranch, 'providerRootDirectory' => $site->getAttribute('providerRootDirectory', ''), - 'search' => implode(' ', [$deploymentId]), 'activate' => $activate, ])); @@ -237,38 +234,4 @@ public function redeployVcsSite(Request $request, Document $site, Document $proj return $deployment; } - - protected function listRules(Document $project, array $queries, Database $database, callable $callback): void - { - $limit = 100; - $cursor = null; - - do { - $queries = \array_merge([ - Query::limit($limit), - Query::equal("projectInternalId", [$project->getInternalId()]) - ], $queries); - - if ($cursor !== null) { - $queries[] = Query::cursorAfter($cursor); - } - - $results = $database->find('rules', $queries); - - $total = \count($results); - if ($total > 0) { - $cursor = $results[$total - 1]; - } - - if ($total < $limit) { - $cursor = null; - } - - foreach ($results as $document) { - if (is_callable($callback)) { - $callback($document); - } - } - } while (!\is_null($cursor)); - } } diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php index 54894f2caa7..1f3febbfeff 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php @@ -86,6 +86,7 @@ public function __construct() ->inject('deviceForFunctions') ->inject('deviceForLocal') ->inject('queueForBuilds') + ->inject('plan') ->callback([$this, 'action']); } @@ -102,7 +103,8 @@ public function action( Document $project, Device $deviceForFunctions, Device $deviceForLocal, - Build $queueForBuilds + Build $queueForBuilds, + array $plan ) { $activate = \strval($activate) === 'true' || \strval($activate) === '1'; @@ -135,8 +137,14 @@ public function action( throw new Exception(Exception::STORAGE_FILE_EMPTY, 'No file sent'); } + $functionSizeLimit = (int) System::getEnv('_APP_COMPUTE_SIZE_LIMIT', '30000000'); + + if (isset($plan['deploymentSize'])) { + $functionSizeLimit = $plan['deploymentSize'] * 1000 * 1000; + } + $fileExt = new FileExt([FileExt::TYPE_GZIP]); - $fileSizeValidator = new FileSize(System::getEnv('_APP_COMPUTE_SIZE_LIMIT', '30000000')); + $fileSizeValidator = new FileSize($functionSizeLimit); $upload = new Upload(); // Make sure we handle a single file and multiple files the same way @@ -174,7 +182,7 @@ public function action( } } - if (!$fileSizeValidator->isValid($fileSize)) { // Check if file size is exceeding allowed limit + if (!$fileSizeValidator->isValid($fileSize) && $functionSizeLimit !== 0) { // Check if file size is exceeding allowed limit throw new Exception(Exception::STORAGE_INVALID_FILE_SIZE); } diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index bc0f1b2dab6..fd8da657eb5 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -2,8 +2,12 @@ namespace Appwrite\Platform\Modules\Functions\Http\Functions; +use Appwrite\Event\Build; use Appwrite\Event\Event; +use Appwrite\Event\Func; +use Appwrite\Event\Realtime; use Appwrite\Event\Validator\FunctionEvent; +use Appwrite\Event\Webhook; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; use Appwrite\Platform\Modules\Compute\Validator\Specification; @@ -13,6 +17,7 @@ use Appwrite\Task\Validator\Cron; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response; +use Appwrite\Utopia\Response\Model\Rule; use Utopia\Abuse\Abuse; use Utopia\Config\Config; use Utopia\Database\Database; @@ -25,12 +30,14 @@ use Utopia\Database\Validator\Roles; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; +use Utopia\Request; use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; +use Utopia\VCS\Adapter\Git\GitHub; class Create extends Base { @@ -91,12 +98,22 @@ public function __construct() System::getEnv('_APP_COMPUTE_CPUS', 0), System::getEnv('_APP_COMPUTE_MEMORY', 0) ), 'Runtime specification for the function and builds.', true, ['plan']) + ->param('templateRepository', '', new Text(128, 0), 'Repository name of the template.', true, deprecated: true) + ->param('templateOwner', '', new Text(128, 0), 'The name of the owner of the template.', true, deprecated: true) + ->param('templateRootDirectory', '', new Text(128, 0), 'Path to function code in the template repo.', true, deprecated: true) + ->param('templateVersion', '', new Text(128, 0), 'Version (tag) for the repo linked to the function template.', true, deprecated: true) ->inject('response') ->inject('dbForProject') ->inject('timelimit') ->inject('project') ->inject('queueForEvents') + ->inject('queueForBuilds') + ->inject('queueForRealtime') + ->inject('queueForWebhooks') + ->inject('queueForFunctions') ->inject('dbForPlatform') + ->inject('request') + ->inject('gitHub') ->callback([$this, 'action']); } @@ -119,12 +136,22 @@ public function action( bool $providerSilentMode, string $providerRootDirectory, string $specification, + string $templateRepository, + string $templateOwner, + string $templateRootDirectory, + string $templateVersion, Response $response, Database $dbForProject, callable $timelimit, Document $project, Event $queueForEvents, - Database $dbForPlatform + Build $queueForBuilds, + Realtime $queueForRealtime, + Webhook $queueForWebhooks, + Func $queueForFunctions, + Database $dbForPlatform, + Request $request, + GitHub $github ) { // Temporary abuse check @@ -251,6 +278,136 @@ public function action( $function = $dbForProject->updateDocument('functions', $function->getId(), $function); + // Backwards compatibility with 1.6 behaviour + $requestFormat = $request->getHeader('x-appwrite-response-format', System::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); + if ($requestFormat && version_compare($requestFormat, '1.7.0', '<')) { + // build from template + $template = new Document([]); + if ( + !empty($templateRepository) + && !empty($templateOwner) + && !empty($templateRootDirectory) + && !empty($templateVersion) + ) { + $template->setAttribute('repositoryName', $templateRepository) + ->setAttribute('ownerName', $templateOwner) + ->setAttribute('rootDirectory', $templateRootDirectory) + ->setAttribute('version', $templateVersion); + } + + if (!empty($providerRepositoryId)) { + // Deploy VCS + $template = new Document(); + + $installation = $dbForPlatform->getDocument('installations', $function->getAttribute('installationId')); + $deployment = $this->redeployVcsFunction( + request: $request, + function: $function, + project: $project, + installation: $installation, + dbForProject: $dbForProject, + queueForBuilds: $queueForBuilds, + template: $template, + github: $github, + activate: true, + reference: $providerBranch, + referenceType: 'branch' + ); + + $function = $function + ->setAttribute('latestDeploymentId', $deployment->getId()) + ->setAttribute('latestDeploymentInternalId', $deployment->getInternalId()) + ->setAttribute('latestDeploymentCreatedAt', $deployment->getCreatedAt()) + ->setAttribute('latestDeploymentStatus', $deployment->getAttribute('status', '')); + $dbForProject->updateDocument('functions', $function->getId(), $function); + } elseif (!$template->isEmpty()) { + // Deploy non-VCS from template + $deploymentId = ID::unique(); + $deployment = $dbForProject->createDocument('deployments', new Document([ + '$id' => $deploymentId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'resourceId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), + 'resourceType' => 'functions', + 'entrypoint' => $function->getAttribute('entrypoint', ''), + 'buildCommands' => $function->getAttribute('commands', ''), + 'type' => 'manual', + 'activate' => true, + ])); + + $function = $function + ->setAttribute('latestDeploymentId', $deployment->getId()) + ->setAttribute('latestDeploymentInternalId', $deployment->getInternalId()) + ->setAttribute('latestDeploymentCreatedAt', $deployment->getCreatedAt()) + ->setAttribute('latestDeploymentStatus', $deployment->getAttribute('status', '')); + $dbForProject->updateDocument('functions', $function->getId(), $function); + + $queueForBuilds + ->setType(BUILD_TYPE_DEPLOYMENT) + ->setResource($function) + ->setDeployment($deployment) + ->setTemplate($template); + } + + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + if (!empty($functionsDomain)) { + $routeSubdomain = ID::unique(); + $domain = "{$routeSubdomain}.{$functionsDomain}"; + // TODO: @christyjacob remove once we migrate the rules in 1.7.x + $ruleId = System::getEnv('_APP_RULES_FORMAT') === 'md5' ? md5($domain) : ID::unique(); + + $rule = Authorization::skip( + fn () => $dbForPlatform->createDocument('rules', new Document([ + '$id' => $ruleId, + 'projectId' => $project->getId(), + 'projectInternalId' => $project->getInternalId(), + 'domain' => $domain, + 'status' => 'verified', + 'type' => 'deployment', + 'trigger' => 'manual', + 'deploymentId' => !isset($deployment) || $deployment->isEmpty() ? '' : $deployment->getId(), + 'deploymentInternalId' => !isset($deployment) || $deployment->isEmpty() ? '' : $deployment->getInternalId(), + 'deploymentResourceType' => 'function', + 'deploymentResourceId' => $function->getId(), + 'deploymentResourceInternalId' => $function->getInternalId(), + 'deploymentVcsProviderBranch' => '', + 'certificateId' => '', + 'search' => implode(' ', [$ruleId, $domain]), + 'owner' => 'Appwrite', + 'region' => $project->getAttribute('region') + ])) + ); + + $ruleModel = new Rule(); + $ruleCreate = + $queueForEvents + ->setProject($project) + ->setEvent('rules.[ruleId].create') + ->setParam('ruleId', $rule->getId()) + ->setPayload($rule->getArrayCopy(array_keys($ruleModel->getRules()))); + + /** Trigger Webhook */ + $queueForWebhooks + ->from($ruleCreate) + ->trigger(); + + /** Trigger Functions */ + $queueForFunctions + ->from($ruleCreate) + ->trigger(); + + /** Trigger Realtime Events */ + $queueForRealtime + ->from($ruleCreate) + ->setSubscribers(['console', $project->getId()]) + ->trigger(); + } + } + $queueForEvents->setParam('functionId', $function->getId()); $response diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php index 6de71cfae60..e840441774e 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php @@ -5,7 +5,6 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; -use Appwrite\Query; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; @@ -13,6 +12,7 @@ use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; +use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; @@ -89,8 +89,6 @@ public function action( throw new Exception(Exception::BUILD_NOT_READY); } - $oldDeploymentInternalId = $function->getAttribute('deploymentInternalId', ''); - $function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [ 'deploymentInternalId' => $deployment->getInternalId(), 'deploymentId' => $deployment->getId(), @@ -106,24 +104,20 @@ public function action( Authorization::skip(fn () => $dbForPlatform->updateDocument('schedules', $schedule->getId(), $schedule)); $queries = [ - Query::equal('trigger', 'manual'), + Query::equal('trigger', ['manual']), Query::equal("type", ["deployment"]), Query::equal("deploymentResourceType", ["function"]), Query::equal("deploymentResourceInternalId", [$function->getInternalId()]), + Query::equal("deploymentVcsProviderBranch", [""]), + Query::equal("projectInternalId", [$project->getInternalId()]) ]; - if (empty($oldDeploymentInternalId)) { - $queries[] = Query::equal("deploymentInternalId", [""]); - } else { - $queries[] = Query::equal("deploymentInternalId", [$oldDeploymentInternalId]); - } - - $this->listRules($project, $queries, $dbForPlatform, function (Document $rule) use ($dbForPlatform, $deployment) { + Authorization::skip(fn () => $dbForPlatform->foreach('rules', function (Document $rule) use ($dbForPlatform, $deployment) { $rule = $rule ->setAttribute('deploymentId', $deployment->getId()) ->setAttribute('deploymentInternalId', $deployment->getInternalId()); - $dbForPlatform->updateDocument('rules', $rule->getId(), $rule); - }); + Authorization::skip(fn () => $dbForPlatform->updateDocument('rules', $rule->getId(), $rule)); + }, $queries)); $queueForEvents ->setParam('functionId', $function->getId()) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index da6f0062652..de5543c9f3a 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -57,6 +57,7 @@ public function __construct() { $this ->desc('Builds worker') + ->groups(['builds']) ->inject('message') ->inject('project') ->inject('dbForPlatform') @@ -73,6 +74,7 @@ public function __construct() ->inject('deviceForFiles') ->inject('log') ->inject('executor') + ->inject('plan') ->callback([$this, 'action']); } @@ -92,6 +94,7 @@ public function __construct() * @param Device $deviceForFiles * @param Log $log * @param Executor $executor + * @param array $plan * @return void * @throws \Utopia\Database\Exception */ @@ -111,7 +114,8 @@ public function action( callable $isResourceBlocked, Device $deviceForFiles, Log $log, - Executor $executor + Executor $executor, + array $plan ): void { $payload = $message->getPayload() ?? []; @@ -150,7 +154,8 @@ public function action( $template, $isResourceBlocked, $log, - $executor + $executor, + $plan ); break; @@ -177,6 +182,7 @@ public function action( * @param Document $template * @param Log $log * @param Executor $executor + * @param array $plan * @return void * @throws \Utopia\Database\Exception * @@ -200,7 +206,8 @@ protected function buildDeployment( Document $template, callable $isResourceBlocked, Log $log, - Executor $executor + Executor $executor, + array $plan ): void { $resourceKey = match ($resource->getCollection()) { 'functions' => 'functionId', @@ -476,8 +483,12 @@ protected function buildDeployment( $directorySize = $localDevice->getDirectorySize($tmpDirectory); $sizeLimit = (int)System::getEnv('_APP_COMPUTE_SIZE_LIMIT', '30000000'); - if ($directorySize > $sizeLimit) { - throw new \Exception('Repository directory size should be less than ' . number_format($sizeLimit / 1048576, 2) . ' MBs.'); + if (isset($plan['deploymentSize'])) { + $sizeLimit = (int) $plan['deploymentSize'] * 1000 * 1000; + } + + if ($directorySize > $sizeLimit && $sizeLimit !== 0) { + throw new \Exception('Repository directory size should be less than ' . number_format($sizeLimit / (1000 * 1000), 2) . ' MBs.'); } Console::execute('find ' . \escapeshellarg($tmpDirectory) . ' -type d -name ".git" -exec rm -rf {} +', '', $stdout, $stderr); @@ -659,6 +670,28 @@ protected function buildDeployment( if ($version === 'v2') { $command = 'tar -zxf /tmp/code.tar.gz -C /usr/code && cd /usr/local/src/ && ./build.sh'; } else { + if ($resource->getCollection() === 'sites') { + $listFilesCommand = ''; + + // Start separation, enter build folder + $listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build'; + + // Enter output directory, if set + if (!empty($resource->getAttribute('outputDirectory', ''))) { + $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory', '')); + } + + // Print files, and end separation + $listFilesCommand .= ' && find . -name \'node_modules\' -prune -o -type f -print && echo "{APPWRITE_DETECTION_SEPARATOR_END}"'; + + // Use SSR file listing + if (empty($command)) { + $command = $listFilesCommand; + } else { + $command .= ' && ' . $listFilesCommand; + } + } + $command = 'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh ' . \trim(\escapeshellarg($command)); } @@ -671,7 +704,7 @@ protected function buildDeployment( cpus: $cpus, memory: $memory, timeout: $timeout, - remove: false, + remove: true, entrypoint: $deployment->getAttribute('entrypoint', ''), destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}", variables: $vars, @@ -684,11 +717,13 @@ protected function buildDeployment( }), Co\go(function () use ($executor, $project, &$deployment, &$response, $dbForProject, $timeout, &$err, $queueForRealtime, &$isCanceled) { try { + $insideSeparation = false; + $executor->getLogs( deploymentId: $deployment->getId(), projectId: $project->getId(), timeout: $timeout, - callback: function ($logs) use (&$response, &$err, $dbForProject, &$isCanceled, &$deployment, $queueForRealtime) { + callback: function ($logs) use (&$response, &$err, $dbForProject, &$isCanceled, &$deployment, $queueForRealtime, &$insideSeparation) { if ($isCanceled) { return; } @@ -706,7 +741,29 @@ protected function buildDeployment( // Get only valid UTF8 part - removes leftover half-multibytes causing SQL errors $logs = \mb_substr($logs, 0, null, 'UTF-8'); + // Do not stream logs added for SSR detection + if (!$insideSeparation) { + $separator = \strpos($logs, '{APPWRITE_DETECTION_SEPARATOR_START}'); + if ($separator !== false) { + $logs = \substr($logs, 0, $separator); + $insideSeparation = true; + } + } else { + $separator = \strpos($logs, '{APPWRITE_DETECTION_SEPARATOR_END}'); + if ($separator !== false) { + $logs = \substr($logs, $separator + strlen('{APPWRITE_DETECTION_SEPARATOR_END}')); + $insideSeparation = false; + } else { + $logs = ''; + } + } + + if (empty($logs)) { + return; + } + $currentLogs = $deployment->getAttribute('buildLogs', ''); + $affected = false; $streamLogs = \str_replace("\\n", "{APPWRITE_LINEBREAK_PLACEHOLDER}", $logs); foreach (\explode("\n", $streamLogs) as $streamLog) { @@ -719,14 +776,20 @@ protected function buildDeployment( // TODO: use part[0] as timestamp when switching to dbForLogs for build logs $currentLogs .= $streamParts[1]; + + if (!empty($streamParts[1])) { + $affected = true; + } } - $deployment = $deployment->setAttribute('buildLogs', $currentLogs); - $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); + if ($affected) { + $deployment = $deployment->setAttribute('buildLogs', $currentLogs); + $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); - $queueForRealtime - ->setPayload($deployment->getArrayCopy()) - ->trigger(); + $queueForRealtime + ->setPayload($deployment->getArrayCopy()) + ->trigger(); + } } } ); @@ -751,21 +814,46 @@ protected function buildDeployment( $durationEnd = \microtime(true); $buildSizeLimit = (int)System::getEnv('_APP_COMPUTE_BUILD_SIZE_LIMIT', '2000000000'); - if ($response['size'] > $buildSizeLimit) { - throw new \Exception('Build size should be less than ' . number_format($buildSizeLimit / 1048576, 2) . ' MBs.'); + if (isset($plan['buildSize'])) { + $buildSizeLimit = $plan['buildSize'] * 1000 * 1000; + } + if ($response['size'] > $buildSizeLimit && $buildSizeLimit !== 0) { + throw new \Exception('Build size should be less than ' . number_format($buildSizeLimit / (1000 * 1000), 2) . ' MBs.'); + } + + /** Update the build document */ + $deployment->setAttribute('buildStartedAt', DateTime::format((new \DateTime())->setTimestamp(floor($response['startTime'])))); + $deployment->setAttribute('buildEndedAt', $endTime); + $deployment->setAttribute('buildDuration', \intval(\ceil($durationEnd - $durationStart))); + $deployment->setAttribute('buildPath', $response['path']); + $deployment->setAttribute('buildSize', $response['size']); + $deployment->setAttribute('totalSize', $deployment->getAttribute('buildSize', 0) + $deployment->getAttribute('sourceSize', 0)); + + $logs = ''; + foreach ($response['output'] as $log) { + $logs .= $log['content']; + } + + // Separate logs for SSR detection + $detectionLogs = ''; + $separator = \strpos($logs, '{APPWRITE_DETECTION_SEPARATOR_START}'); + if ($separator !== false) { + $detectionLogs = \substr($logs, $separator + strlen('{APPWRITE_DETECTION_SEPARATOR}')); + $separatorEnd = \strpos($detectionLogs, '{APPWRITE_DETECTION_SEPARATOR_END}'); + $logs .= \substr($detectionLogs, $separatorEnd + strlen('{APPWRITE_DETECTION_SEPARATOR_END}')); + $detectionLogs = \substr($detectionLogs, 0, $separatorEnd); + $logs = \substr($logs, 0, $separator); } if ($resource->getCollection() === 'sites') { - // TODO: Refactor with structured command in future, using utopia library (CLI) - $listFilesCommand = "cd /usr/local/build && cd " . \escapeshellarg($resource->getAttribute('outputDirectory', './')) . " && find . -name 'node_modules' -prune -o -type f -print"; - $command = $executor->createCommand( - deploymentId: $deployment->getId(), - projectId: $project->getId(), - command: $listFilesCommand, - timeout: 15 - ); + $date = \date('H:i:s'); + $logs .= "[$date] [appwrite] Screenshot capturing started. \n"; + } + + $deployment->setAttribute('buildLogs', $logs); - $files = \explode("\n", $command['output']); // Parse output + if ($resource->getCollection() === 'sites' && !empty($detectionLogs)) { + $files = \explode("\n", $detectionLogs); // Parse output $files = \array_filter($files); // Remove empty $files = \array_map(fn ($file) => \trim($file), $files); // Remove whitepsaces $files = \array_map(fn ($file) => \str_starts_with($file, './') ? \substr($file, 2) : $file, $files); // Remove beginning ./ @@ -777,7 +865,6 @@ protected function buildDeployment( $detection = $detector->detect(); $adapter = $resource->getAttribute('adapter', ''); - if (empty($adapter)) { $resource->setAttribute('adapter', $detection->getName()); $resource->setAttribute('fallbackFile', $detection->getFallbackFile() ?? ''); @@ -785,34 +872,11 @@ protected function buildDeployment( $deployment->setAttribute('adapter', $detection->getName()); $deployment->setAttribute('fallbackFile', $detection->getFallbackFile() ?? ''); - $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); } elseif ($adapter === 'ssr' && $detection->getName() === 'static') { throw new \Exception('Adapter mismatch. Detected: ' . $detection->getName() . ' does not match with the set adapter: ' . $adapter); } } - $executor->deleteRuntime($project->getId(), $deployment->getId(), '-build'); - - /** Update the build document */ - $deployment->setAttribute('buildStartedAt', DateTime::format((new \DateTime())->setTimestamp(floor($response['startTime'])))); - $deployment->setAttribute('buildEndedAt', $endTime); - $deployment->setAttribute('buildDuration', \intval(\ceil($durationEnd - $durationStart))); - $deployment->setAttribute('buildPath', $response['path']); - $deployment->setAttribute('buildSize', $response['size']); - $deployment->setAttribute('totalSize', $deployment->getAttribute('buildSize', 0) + $deployment->getAttribute('sourceSize', 0)); - - $logs = ''; - foreach ($response['output'] as $log) { - $logs .= $log['content']; - } - - if ($resource->getCollection() === 'sites') { - $date = \date('H:i:s'); - $logs .= "[$date] [appwrite] Screenshot capturing started. \n"; - } - - $deployment->setAttribute('buildLogs', $logs); - $deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment); $queueForRealtime @@ -1011,8 +1075,6 @@ protected function buildDeployment( $resource->setAttribute('live', true); switch ($resource->getCollection()) { case 'functions': - $oldDeploymentInternalId = $resource->getAttribute('deploymentInternalId', ''); - $resource->setAttribute('deploymentId', $deployment->getId()); $resource->setAttribute('deploymentInternalId', $deployment->getInternalId()); $resource->setAttribute('deploymentCreatedAt', $deployment->getCreatedAt()); @@ -1024,26 +1086,20 @@ protected function buildDeployment( Query::equal("deploymentResourceInternalId", [$resource->getInternalId()]), Query::equal('deploymentResourceType', ['function']), Query::equal('trigger', ['manual']), + Query::equal('deploymentVcsProviderBranch', ['']), + Query::equal("projectInternalId", [$project->getInternalId()]) ]; - if (empty($oldDeploymentInternalId)) { - $queries[] = Query::equal("deploymentInternalId", [""]); - } else { - $queries[] = Query::equal("deploymentInternalId", [$oldDeploymentInternalId]); - } - $rulesUpdated = false; - $this->listRules($project, $queries, $dbForPlatform, function (Document $rule) use ($dbForPlatform, $deployment, &$rulesUpdated) { + $dbForPlatform->forEach('rules', function (Document $rule) use ($dbForPlatform, $deployment, &$rulesUpdated) { $rulesUpdated = true; $rule = $rule ->setAttribute('deploymentId', $deployment->getId()) ->setAttribute('deploymentInternalId', $deployment->getInternalId()); $dbForPlatform->updateDocument('rules', $rule->getId(), $rule); - }); + }, $queries); break; case 'sites': - $oldDeploymentInternalId = $resource->getAttribute('deploymentInternalId', ''); - $resource->setAttribute('deploymentId', $deployment->getId()); $resource->setAttribute('deploymentInternalId', $deployment->getInternalId()); $resource->setAttribute('deploymentScreenshotDark', $deployment->getAttribute('screenshotDark', '')); @@ -1056,20 +1112,16 @@ protected function buildDeployment( Query::equal("deploymentResourceInternalId", [$resource->getInternalId()]), Query::equal('deploymentResourceType', ['site']), Query::equal('trigger', ['manual']), + Query::equal('deploymentVcsProviderBranch', ['']), + Query::equal("projectInternalId", [$project->getInternalId()]) ]; - if (empty($oldDeploymentInternalId)) { - $queries[] = Query::equal("deploymentInternalId", [""]); - } else { - $queries[] = Query::equal("deploymentInternalId", [$oldDeploymentInternalId]); - } - - $this->listRules($project, $queries, $dbForPlatform, function (Document $rule) use ($dbForPlatform, $deployment) { + $dbForPlatform->forEach('rules', function (Document $rule) use ($dbForPlatform, $deployment) { $rule = $rule ->setAttribute('deploymentId', $deployment->getId()) ->setAttribute('deploymentInternalId', $deployment->getInternalId()); $dbForPlatform->updateDocument('rules', $rule->getId(), $rule); - }); + }, $queries); break; } @@ -1080,7 +1132,13 @@ protected function buildDeployment( $branchName = $deployment->getAttribute('providerBranch'); if (!empty($branchName)) { $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); - $domain = "branch-{$branchName}-{$resource->getId()}-{$project->getId()}.{$sitesDomain}"; + $branchPrefix = substr($branchName, 0, 16); + if (strlen($branchName) > 16) { + $remainingChars = substr($branchName, 16); + $branchPrefix .= '-' . substr(hash('sha256', $remainingChars), 0, 7); + } + $resourceProjectHash = substr(hash('sha256', $resource->getId() . $project->getId()), 0, 7); + $domain = "branch-{$branchPrefix}-{$resourceProjectHash}.{$sitesDomain}"; $ruleId = md5($domain); try { @@ -1111,19 +1169,22 @@ protected function buildDeployment( $dbForPlatform->updateDocument('rules', $rule->getId(), $rule); } - $this->listRules($project, [ + $queries = [ Query::equal("projectInternalId", [$project->getInternalId()]), Query::equal("type", ["deployment"]), Query::equal("deploymentResourceInternalId", [$resource->getInternalId()]), Query::equal('deploymentResourceType', ['site']), Query::equal("deploymentVcsProviderBranch", [$branchName]), Query::equal("trigger", ['manual']), - ], $dbForPlatform, function (Document $rule) use ($dbForPlatform, $deployment) { + Query::equal("projectInternalId", [$project->getInternalId()]) + ]; + + $dbForPlatform->foreach('rules', function (Document $rule) use ($dbForPlatform, $deployment) { $rule = $rule ->setAttribute('deploymentId', $deployment->getId()) ->setAttribute('deploymentInternalId', $deployment->getInternalId()); $dbForPlatform->updateDocument('rules', $rule->getId(), $rule); - }); + }, $queries); } } @@ -1161,13 +1222,29 @@ protected function buildDeployment( $message = "" . $message; } + $separator = \strpos($message, '{APPWRITE_DETECTION_SEPARATOR_START}'); + if ($separator !== false) { + $error = \substr($message, $separator + strlen('{APPWRITE_DETECTION_SEPARATOR_START}')); + $message = \substr($message, 0, $separator); + $message .= "\n" . $error; + } + + // Combine with previous logs if deployment got past build process + $previousLogs = ''; + if (!empty($deployment->getAttribute('buildEndedAt', ''))) { + $previousLogs = $deployment->getAttribute('buildLogs', ''); + if (!empty($previousLogs)) { + $message = $previousLogs . "\n" . $message; + } + } + $endTime = DateTime::now(); $durationEnd = \microtime(true); $deployment->setAttribute('buildEndedAt', $endTime); $deployment->setAttribute('buildDuration', \intval(\ceil($durationEnd - $durationStart))); $deployment->setAttribute('status', 'failed'); - $deployment->setAttribute('buildLogs', $message); + $deployment->setAttribute('buildLogs', $message); $deployment = $dbForProject->updateDocument('deployments', $deploymentId, $deployment); if ($deployment->getInternalId() === $resource->getAttribute('latestDeploymentInternalId', '')) { @@ -1410,38 +1487,4 @@ protected function runGitAction( } } } - - protected function listRules(Document $project, array $queries, Database $database, callable $callback): void - { - $limit = 100; - $cursor = null; - - do { - $queries = \array_merge([ - Query::limit($limit), - Query::equal("projectInternalId", [$project->getInternalId()]) - ], $queries); - - if ($cursor !== null) { - $queries[] = Query::cursorAfter($cursor); - } - - $results = $database->find('rules', $queries); - - $total = \count($results); - if ($total > 0) { - $cursor = $results[$total - 1]; - } - - if ($total < $limit) { - $cursor = null; - } - - foreach ($results as $document) { - if (is_callable($callback)) { - $callback($document); - } - } - } while (!\is_null($cursor)); - } } diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php index 443a5db35e5..e4d0d2899f1 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php @@ -122,7 +122,7 @@ public function action(string $domain, Response $response, Document $project, Ce if ($status === 'created') { $validators = []; $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); - if (!$targetCNAME->isKnown() || $targetCNAME->isTest()) { + if ($targetCNAME->isKnown() && !$targetCNAME->isTest()) { $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); } if ((new IP(IP::V4))->isValid(System::getEnv('_APP_DOMAIN_TARGET_A', ''))) { @@ -173,7 +173,8 @@ public function action(string $domain, Response $response, Document $project, Ce if ($rule->getAttribute('status', '') === 'verifying') { $queueForCertificates ->setDomain(new Document([ - 'domain' => $rule->getAttribute('domain') + 'domain' => $rule->getAttribute('domain'), + 'domainType' => $rule->getAttribute('deploymentResourceType', $rule->getAttribute('type')), ])) ->trigger(); } diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php index 039f5831502..6c5a87a68d8 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php @@ -134,7 +134,7 @@ public function action(string $domain, string $functionId, string $branch, Respo if ($status === 'created') { $validators = []; $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); - if (!$targetCNAME->isKnown() || $targetCNAME->isTest()) { + if ($targetCNAME->isKnown() && !$targetCNAME->isTest()) { $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); } if ((new IP(IP::V4))->isValid(System::getEnv('_APP_DOMAIN_TARGET_A', ''))) { @@ -191,7 +191,8 @@ public function action(string $domain, string $functionId, string $branch, Respo if ($rule->getAttribute('status', '') === 'verifying') { $queueForCertificates ->setDomain(new Document([ - 'domain' => $rule->getAttribute('domain') + 'domain' => $rule->getAttribute('domain'), + 'domainType' => $rule->getAttribute('deploymentResourceType', $rule->getAttribute('type')), ])) ->trigger(); } diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php index a693e3ec303..d0c9dbbbe36 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php @@ -126,7 +126,7 @@ public function action(string $domain, string $url, int $statusCode, Response $r if ($status === 'created') { $validators = []; $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); - if (!$targetCNAME->isKnown() || $targetCNAME->isTest()) { + if ($targetCNAME->isKnown() && !$targetCNAME->isTest()) { $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); } if ((new IP(IP::V4))->isValid(System::getEnv('_APP_DOMAIN_TARGET_A', ''))) { @@ -179,7 +179,8 @@ public function action(string $domain, string $url, int $statusCode, Response $r if ($rule->getAttribute('status', '') === 'verifying') { $queueForCertificates ->setDomain(new Document([ - 'domain' => $rule->getAttribute('domain') + 'domain' => $rule->getAttribute('domain'), + 'domainType' => $rule->getAttribute('deploymentResourceType', $rule->getAttribute('type')), ])) ->trigger(); } diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php index ac55b709e8e..894c954a327 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php @@ -134,7 +134,7 @@ public function action(string $domain, string $siteId, string $branch, Response if ($status === 'created') { $validators = []; $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); - if (!$targetCNAME->isKnown() || $targetCNAME->isTest()) { + if ($targetCNAME->isKnown() && !$targetCNAME->isTest()) { $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); } if ((new IP(IP::V4))->isValid(System::getEnv('_APP_DOMAIN_TARGET_A', ''))) { @@ -191,7 +191,8 @@ public function action(string $domain, string $siteId, string $branch, Response if ($rule->getAttribute('status', '') === 'verifying') { $queueForCertificates ->setDomain(new Document([ - 'domain' => $rule->getAttribute('domain') + 'domain' => $rule->getAttribute('domain'), + 'domainType' => $rule->getAttribute('deploymentResourceType', $rule->getAttribute('type')), ])) ->trigger(); } diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php index 7400d86e740..d78d43aec7f 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php @@ -85,6 +85,7 @@ public function __construct() ->inject('deviceForSites') ->inject('deviceForLocal') ->inject('queueForBuilds') + ->inject('plan') ->callback([$this, 'action']); } @@ -103,7 +104,8 @@ public function action( Event $queueForEvents, Device $deviceForSites, Device $deviceForLocal, - Build $queueForBuilds + Build $queueForBuilds, + array $plan ) { $activate = \strval($activate) === 'true' || \strval($activate) === '1'; @@ -136,8 +138,14 @@ public function action( throw new Exception(Exception::STORAGE_FILE_EMPTY, 'No file sent'); } + $siteSizeLimit = (int) System::getEnv('_APP_COMPUTE_SIZE_LIMIT', '30000000'); + + if (isset($plan['deploymentSize'])) { + $siteSizeLimit = $plan['deploymentSize'] * 1000 * 1000; + } + $fileExt = new FileExt([FileExt::TYPE_GZIP]); - $fileSizeValidator = new FileSize(System::getEnv('_APP_COMPUTE_SIZE_LIMIT', '30000000')); + $fileSizeValidator = new FileSize($siteSizeLimit); $upload = new Upload(); // Make sure we handle a single file and multiple files the same way @@ -175,7 +183,7 @@ public function action( } } - if (!$fileSizeValidator->isValid($fileSize)) { // Check if file size is exceeding allowed limit + if (!$fileSizeValidator->isValid($fileSize) && $siteSizeLimit !== 0) { // Check if file size is exceeding allowed limit throw new Exception(Exception::STORAGE_INVALID_FILE_SIZE); } @@ -339,10 +347,16 @@ public function action( 'domain' => $domain, 'type' => 'deployment', 'trigger' => 'deployment', - 'value' => $deployment->getId(), + 'deploymentId' => $deployment->isEmpty() ? '' : $deployment->getId(), + 'deploymentInternalId' => $deployment->isEmpty() ? '' : $deployment->getInternalId(), + 'deploymentResourceType' => 'site', + 'deploymentResourceId' => $site->getId(), + 'deploymentResourceInternalId' => $site->getInternalId(), 'status' => 'verified', 'certificateId' => '', 'search' => implode(' ', [$ruleId, $domain]), + 'owner' => 'Appwrite', + 'region' => $project->getAttribute('region') ])) ); } else { diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Sites/Deployment/Update.php b/src/Appwrite/Platform/Modules/Sites/Http/Sites/Deployment/Update.php index 7f1681c0f1f..a54d0c78898 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Sites/Deployment/Update.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Sites/Deployment/Update.php @@ -5,13 +5,14 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Compute\Base; -use Appwrite\Query; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Document; +use Utopia\Database\Query; +use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; @@ -86,8 +87,6 @@ public function action( throw new Exception(Exception::BUILD_NOT_READY); } - $oldDeploymentInternalId = $site->getAttribute('deploymentInternalId', ''); - $site = $dbForProject->updateDocument('sites', $site->getId(), new Document(array_merge($site->getArrayCopy(), [ 'deploymentInternalId' => $deployment->getInternalId(), 'deploymentId' => $deployment->getId(), @@ -97,24 +96,20 @@ public function action( ]))); $queries = [ - Query::equal('trigger', 'manual'), + Query::equal('trigger', ['manual']), Query::equal("type", ["deployment"]), Query::equal("deploymentResourceType", ["site"]), Query::equal("deploymentResourceInternalId", [$site->getInternalId()]), + Query::equal("deploymentVcsProviderBranch", [""]), + Query::equal("projectInternalId", [$project->getInternalId()]) ]; - if (empty($oldDeploymentInternalId)) { - $queries[] = Query::equal("deploymentInternalId", [""]); - } else { - $queries[] = Query::equal("deploymentInternalId", [$oldDeploymentInternalId]); - } - - $this->listRules($project, $queries, $dbForPlatform, function (Document $rule) use ($dbForPlatform, $deployment) { + Authorization::skip(fn () => $dbForPlatform->foreach('rules', function (Document $rule) use ($dbForPlatform, $deployment) { $rule = $rule ->setAttribute('deploymentId', $deployment->getId()) ->setAttribute('deploymentInternalId', $deployment->getInternalId()); - $dbForPlatform->updateDocument('rules', $rule->getId(), $rule); - }); + Authorization::skip(fn () => $dbForPlatform->updateDocument('rules', $rule->getId(), $rule)); + }, $queries)); $queueForEvents ->setParam('siteId', $site->getId()) diff --git a/src/Appwrite/Platform/Modules/Tokens/Http/Tokens/Buckets/Files/Create.php b/src/Appwrite/Platform/Modules/Tokens/Http/Tokens/Buckets/Files/Create.php index 4b3b4216968..fb96849ed27 100644 --- a/src/Appwrite/Platform/Modules/Tokens/Http/Tokens/Buckets/Files/Create.php +++ b/src/Appwrite/Platform/Modules/Tokens/Http/Tokens/Buckets/Files/Create.php @@ -48,7 +48,7 @@ public function __construct() group: 'files', name: 'createFileToken', description: <<get('pools'); /** @var \Utopia\Pools\Group $pools */ + /** @var Group $pools */ + $pools = $register->get('pools'); $configs = [ 'Console.DB' => Config::getParam('pools-console'), @@ -149,20 +151,22 @@ public function action(Registry $register): void foreach ($configs as $key => $config) { foreach ($config as $database) { try { - $adapter = $pools->get($database)->pop()->getResource(); + $adapter = new DatabasePool($pools->get($database)); if ($adapter->ping()) { Console::success('🟢 ' . str_pad("{$key}({$database})", 50, '.') . 'connected'); } else { Console::error('🔴 ' . str_pad("{$key}({$database})", 47, '.') . 'disconnected'); } - } catch (\Throwable $th) { + } catch (\Throwable) { Console::error('🔴 ' . str_pad("{$key}.({$database})", 47, '.') . 'disconnected'); } } } - $pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */ + /** @var Group $pools */ + $pools = $register->get('pools'); + $configs = [ 'Cache' => Config::getParam('pools-cache'), 'Queue' => Config::getParam('pools-queue'), @@ -172,15 +176,18 @@ public function action(Registry $register): void foreach ($configs as $key => $config) { foreach ($config as $pool) { try { - /** @var Adapter $adapter */ - $adapter = $pools->get($pool)->pop()->getResource(); + $adapter = match($key) { + 'Cache' => new CachePool($pools->get($pool)), + 'Queue' => new BrokerPool($pools->get($pool)), + 'PubSub' => new PubSubPool($pools->get($pool)), + }; if ($adapter->ping()) { Console::success('🟢 ' . str_pad("{$key}({$pool})", 50, '.') . 'connected'); } else { Console::error('🔴 ' . str_pad("{$key}({$pool})", 47, '.') . 'disconnected'); } - } catch (\Throwable $th) { + } catch (\Throwable) { Console::error('🔴 ' . str_pad("{$key}({$pool})", 47, '.') . 'disconnected'); } } @@ -198,13 +205,14 @@ public function action(Registry $register): void } else { Console::error('🔴 ' . str_pad("Antivirus", 47, '.') . 'disconnected'); } - } catch (\Throwable $th) { + } catch (\Throwable) { Console::error('🔴 ' . str_pad("Antivirus", 47, '.') . 'disconnected'); } } try { - $mail = $register->get('smtp'); /* @var $mail \PHPMailer\PHPMailer\PHPMailer */ + /* @var PHPMailer $mail */ + $mail = $register->get('smtp'); $mail->addAddress('demo@example.com', 'Example.com'); $mail->Subject = 'Test SMTP Connection'; @@ -213,7 +221,7 @@ public function action(Registry $register): void $mail->send(); Console::success('🟢 ' . str_pad("SMTP", 50, '.') . 'connected'); - } catch (\Throwable $th) { + } catch (\Throwable) { Console::error('🔴 ' . str_pad("SMTP", 47, '.') . 'disconnected'); } @@ -287,7 +295,7 @@ public function action(Registry $register): void Console::error('Failed to check for a newer version' . "\n"); } } - } catch (\Throwable $th) { + } catch (\Throwable) { Console::error('Failed to check for a newer version' . "\n"); } } diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index cf917ae96b0..a0009fd59fb 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -312,7 +312,5 @@ public function action(?string $selectedPlatform, ?string $selectedSDK, ?string } } } - - Console::exit(); } } diff --git a/src/Appwrite/Platform/Tasks/ScheduleBase.php b/src/Appwrite/Platform/Tasks/ScheduleBase.php index 3cf89f9f44a..28c77c1832d 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleBase.php +++ b/src/Appwrite/Platform/Tasks/ScheduleBase.php @@ -12,6 +12,7 @@ use Utopia\Database\Validator\Authorization; use Utopia\Platform\Action; use Utopia\Pools\Group; +use Utopia\Queue\Broker\Pool as BrokerPool; use Utopia\System\System; use Utopia\Telemetry\Adapter as Telemetry; use Utopia\Telemetry\Gauge; @@ -24,6 +25,8 @@ abstract class ScheduleBase extends Action protected array $schedules = []; + protected BrokerPool $publisher; + private ?Histogram $collectSchedulesTelemetryDuration = null; private ?Gauge $collectSchedulesTelemetryCount = null; private ?Gauge $scheduleTelemetryCount = null; @@ -68,6 +71,7 @@ public function action(Group $pools, Database $dbForPlatform, callable $getProje Console::title(\ucfirst(static::getSupportedResource()) . ' scheduler V1'); Console::success(APP_NAME . ' ' . \ucfirst(static::getSupportedResource()) . ' scheduler v1 has started'); + $this->publisher = new BrokerPool($pools->get('publisher')); $this->scheduleTelemetryCount = $telemetry->createGauge('task.schedule.count'); $this->collectSchedulesTelemetryDuration = $telemetry->createHistogram('task.schedule.collect_schedules.duration', 's'); $this->collectSchedulesTelemetryCount = $telemetry->createGauge('task.schedule.collect_schedules.count'); @@ -75,16 +79,16 @@ public function action(Group $pools, Database $dbForPlatform, callable $getProje // start with "0" to load all active documents. $lastSyncUpdate = "0"; - $this->collectSchedules($pools, $dbForPlatform, $getProjectDB, $lastSyncUpdate); + $this->collectSchedules($dbForPlatform, $getProjectDB, $lastSyncUpdate); Console::success("Starting timers at " . DateTime::now()); /** * The timer synchronize $schedules copy with database collection. */ - Timer::tick(static::UPDATE_TIMER * 1000, function () use ($pools, $dbForPlatform, $getProjectDB, &$lastSyncUpdate) { + Timer::tick(static::UPDATE_TIMER * 1000, function () use ($dbForPlatform, $getProjectDB, &$lastSyncUpdate) { $time = DateTime::now(); Console::log("Sync tick: Running at $time"); - $this->collectSchedules($pools, $dbForPlatform, $getProjectDB, $lastSyncUpdate); + $this->collectSchedules($dbForPlatform, $getProjectDB, $lastSyncUpdate); }); while (true) { @@ -99,7 +103,7 @@ public function action(Group $pools, Database $dbForPlatform, callable $getProje } } - private function collectSchedules(Group $pools, Database $dbForPlatform, callable $getProjectDB, string &$lastSyncUpdate): void + private function collectSchedules(Database $dbForPlatform, callable $getProjectDB, string &$lastSyncUpdate): void { // If we haven't synced yet, load all active schedules $initialLoad = $lastSyncUpdate === "0"; @@ -111,7 +115,7 @@ private function collectSchedules(Group $pools, Database $dbForPlatform, callabl * @throws Exception * @var Document $schedule */ - $getSchedule = function (Document $schedule) use ($pools, $dbForPlatform, $getProjectDB): array { + $getSchedule = function (Document $schedule) use ($dbForPlatform, $getProjectDB): array { $project = $dbForPlatform->getDocument('projects', $schedule->getAttribute('projectId')); $resource = $getProjectDB($project)->getDocument( @@ -119,8 +123,6 @@ private function collectSchedules(Group $pools, Database $dbForPlatform, callabl $schedule->getAttribute('resourceId') ); - $pools->reclaim(); - return [ '$internalId' => $schedule->getInternalId(), '$id' => $schedule->getId(), diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 2a8fd99b7f9..6bf2f93afe7 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -29,9 +29,7 @@ public static function getCollectionId(): string protected function enqueueResources(Group $pools, Database $dbForPlatform, callable $getProjectDB): void { - $queue = $pools->get('publisher')->pop(); - $connection = $queue->getResource(); - $queueForFunctions = new Func($connection); + $queueForFunctions = new Func($this->publisher); $intervalEnd = (new \DateTime())->modify('+' . self::ENQUEUE_TIMER . ' seconds'); foreach ($this->schedules as $schedule) { @@ -85,7 +83,5 @@ protected function enqueueResources(Group $pools, Database $dbForPlatform, calla unset($this->schedules[$schedule['$internalId']]); } - - $queue->reclaim(); } } diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 6788748f3d9..7812b278328 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -76,12 +76,9 @@ protected function enqueueResources(Group $pools, Database $dbForPlatform, calla } foreach ($delayedExecutions as $delay => $schedules) { - \go(function () use ($delay, $schedules, $pools, $dbForPlatform) { + \go(function () use ($delay, $schedules, $dbForPlatform) { \sleep($delay); // in seconds - $queue = $pools->get('publisher')->pop(); - $connection = $queue->getResource(); - foreach ($schedules as $delayConfig) { $scheduleKey = $delayConfig['key']; // Ensure schedule was not deleted @@ -93,7 +90,7 @@ protected function enqueueResources(Group $pools, Database $dbForPlatform, calla $this->updateProjectAccess($schedule['project'], $dbForPlatform); - $queueForFunctions = new Func($connection); + $queueForFunctions = new Func($this->publisher); $queueForFunctions ->setType('schedule') @@ -105,8 +102,6 @@ protected function enqueueResources(Group $pools, Database $dbForPlatform, calla $this->recordEnqueueDelay($delayConfig['nextDate']); } - - $queue->reclaim(); }); } diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index a15df6ed5b4..d23e3de575a 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -40,10 +40,8 @@ protected function enqueueResources(Group $pools, Database $dbForPlatform, calla continue; } - \go(function () use ($schedule, $scheduledAt, $pools, $dbForPlatform) { - $queue = $pools->get('publisher')->pop(); - $connection = $queue->getResource(); - $queueForMessaging = new Messaging($connection); + \go(function () use ($schedule, $scheduledAt, $dbForPlatform) { + $queueForMessaging = new Messaging($this->publisher); $this->updateProjectAccess($schedule['project'], $dbForPlatform); @@ -58,7 +56,6 @@ protected function enqueueResources(Group $pools, Database $dbForPlatform, calla $schedule['$id'], ); - $queue->reclaim(); $this->recordEnqueueDelay($scheduledAt); unset($this->schedules[$schedule['$internalId']]); }); diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 76c9db079ac..4876e8d96cf 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -101,6 +101,12 @@ public function action(string $version, string $mode): void 'name' => 'X-Appwrite-Session', 'description' => 'The user session to authenticate with', 'in' => 'header', + ], + 'DevKey' => [ + 'type' => 'apiKey', + 'name' => 'X-Appwrite-Dev-Key', + 'description' => 'Your secret dev API key', + 'in' => 'header', ] ], APP_PLATFORM_SERVER => [ diff --git a/src/Appwrite/Platform/Workers/Certificates.php b/src/Appwrite/Platform/Workers/Certificates.php index 0c0229b88a2..0dce51cb525 100644 --- a/src/Appwrite/Platform/Workers/Certificates.php +++ b/src/Appwrite/Platform/Workers/Certificates.php @@ -55,7 +55,7 @@ public function __construct() ->inject('log') ->inject('certificates') ->inject('plan') - ->callback([$this, 'action']); + ->callback($this->action(...)); } /** @@ -96,11 +96,14 @@ public function action( $log->addTag('domain', $domain->get()); - $this->execute($domain, $dbForPlatform, $queueForMails, $queueForEvents, $queueForWebhooks, $queueForFunctions, $queueForRealtime, $log, $certificates, $skipRenewCheck, $plan); + $domainType = $document->getAttribute('domainType'); + + $this->execute($domain, $domainType, $dbForPlatform, $queueForMails, $queueForEvents, $queueForWebhooks, $queueForFunctions, $queueForRealtime, $log, $certificates, $skipRenewCheck, $plan); } /** * @param Domain $domain + * @param ?string $domainType * @param Database $dbForPlatform * @param Mail $queueForMails * @param Event $queueForEvents @@ -115,6 +118,7 @@ public function action( */ private function execute( Domain $domain, + ?string $domainType, Database $dbForPlatform, Mail $queueForMails, Event $queueForEvents, @@ -174,7 +178,7 @@ private function execute( $this->validateDomain($domain, $isMainDomain, $log); // If certificate exists already, double-check expiry date. Skip if job is forced - if (!$certificates->isRenewRequired($domain->get(), $log)) { + if (!$certificates->isRenewRequired($domain->get(), $domainType, $log)) { Console::info("Skipping, renew isn't required"); return; } @@ -182,7 +186,7 @@ private function execute( // Prepare unique cert name. Using this helps prevent miss-match in configuration when renewing certificates. $certName = ID::unique(); - $renewDate = $certificates->issueCertificate($certName, $domain->get()); + $renewDate = $certificates->issueCertificate($certName, $domain->get(), $domainType); // Command succeeded, store all data into document $certificate->setAttribute('logs', 'Certificate successfully generated.'); @@ -300,7 +304,7 @@ private function validateDomain(Domain $domain, bool $isMainDomain, Log $log): v $validators = []; $targetCNAME = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', '')); - if (!$targetCNAME->isKnown() || $targetCNAME->isTest()) { + if ($targetCNAME->isKnown() && !$targetCNAME->isTest()) { $validators[] = new DNS($targetCNAME->get(), DNS::RECORD_CNAME); } if ((new IP(IP::V4))->isValid(System::getEnv('_APP_DOMAIN_TARGET_A', ''))) { diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 12143b41063..43bc55583d7 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -63,7 +63,7 @@ public function __construct() ->inject('executionRetention') ->inject('auditRetention') ->inject('log') - ->callback([$this, 'action']); + ->callback($this->action(...)); } /** diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 07131593e20..25c80fabdc7 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -357,7 +357,7 @@ private function reduce(Document $project, Document $document, array &$metrics, break; } } catch (Throwable $e) { - console::error("[reducer] " . " {DateTime::now()} " . " {$project->getInternalId()} " . " {$e->getMessage()}"); + Console::error("[reducer] " . " {DateTime::now()} " . " {$project->getInternalId()} " . " {$e->getMessage()}"); } } @@ -376,7 +376,7 @@ public function commitToDb(callable $getProjectDB): void continue; } - console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); try { foreach ($stats['keys'] ?? [] as $key => $value) { @@ -413,7 +413,7 @@ public function commitToDb(callable $getProjectDB): void } } } catch (Exception $e) { - console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); + Console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); } } @@ -437,7 +437,7 @@ public function commitToDb(callable $getProjectDB): void } - protected function prepareForLogsDB(Document $project, Document $stat) + protected function prepareForLogsDB(Document $project, Document $stat): void { if (System::getEnv('_APP_STATS_USAGE_DUAL_WRITING', 'disabled') === 'disabled') { return; @@ -462,8 +462,7 @@ protected function writeToLogsDB(): void return; } - $dbForLogs = call_user_func($this->getLogsDB); - $dbForLogs + $dbForLogs = ($this->getLogsDB)() ->setTenant(null) ->setTenantPerDocument(true); @@ -478,6 +477,5 @@ protected function writeToLogsDB(): void } catch (Throwable $th) { Console::error($th->getMessage()); } - $this->register->get('pools')->get('logs')->reclaim(); } } diff --git a/src/Appwrite/Platform/Workers/StatsUsageDump.php b/src/Appwrite/Platform/Workers/StatsUsageDump.php index b9d486e0d89..77ec3f13e60 100644 --- a/src/Appwrite/Platform/Workers/StatsUsageDump.php +++ b/src/Appwrite/Platform/Workers/StatsUsageDump.php @@ -70,9 +70,9 @@ class StatsUsageDump extends Action ]; /** - * @var callable + * @var callable(Document): Database */ - protected mixed $getLogsDB; + protected $getLogsDB; protected array $periods = [ '1h' => 'Y-m-d H:00', @@ -126,10 +126,10 @@ public function action(Message $message, callable $getProjectDB, callable $getLo continue; } - console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); + Console::log('['.DateTime::now().'] Id: '.$project->getId(). ' InternalId: '.$project->getInternalId(). ' Db: '.$project->getAttribute('database').' ReceivedAt: '.$receivedAt. ' Keys: '.$numberOfKeys); try { - /** @var \Utopia\Database\Database $dbForProject */ + /** @var Database $dbForProject */ $dbForProject = $getProjectDB($project); foreach ($stats['keys'] ?? [] as $key => $value) { if ($value == 0) { @@ -169,7 +169,7 @@ public function action(Message $message, callable $getProjectDB, callable $getLo } } } catch (\Exception $e) { - console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); + Console::error('[' . DateTime::now() . '] project [' . $project->getInternalId() . '] database [' . $project['database'] . '] ' . ' ' . $e->getMessage()); } } } @@ -190,8 +190,7 @@ protected function writeToLogsDB(Document $project, Document $document): void } } - /** @var \Utopia\Database\Database $dbForLogs*/ - $dbForLogs = call_user_func($this->getLogsDB, $project); + $dbForLogs = ($this->getLogsDB)($project); try { $dbForLogs->createOrUpdateDocumentsWithIncrease( @@ -203,7 +202,5 @@ protected function writeToLogsDB(Document $project, Document $document): void } catch (\Throwable $th) { Console::error($th->getMessage()); } - - $this->register->get('pools')->get('logs')->reclaim(); } } diff --git a/src/Appwrite/PubSub/Adapter/Pool.php b/src/Appwrite/PubSub/Adapter/Pool.php new file mode 100644 index 00000000000..a498118dae0 --- /dev/null +++ b/src/Appwrite/PubSub/Adapter/Pool.php @@ -0,0 +1,46 @@ +delegate(__FUNCTION__, \func_get_args()); + } + + public function subscribe($channels, $callback): void + { + $this->delegate(__FUNCTION__, \func_get_args()); + } + + public function publish($channel, $message): void + { + $this->delegate(__FUNCTION__, \func_get_args()); + } + + /** + * Forward method calls to the internal adapter instance via the pool. + * + * Required because __call() can't be used to implement abstract methods. + * + * @param string $method + * @param array $args + * @return mixed + * @throws DatabaseException + */ + public function delegate(string $method, array $args): mixed + { + return $this->pool->use(function (Adapter $adapter) use ($method, $args) { + return $adapter->{$method}(...$args); + }); + } +} diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index f486a61ce5b..19742ee3eea 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -309,6 +309,10 @@ public function parse(): array $bodyRequired = []; foreach ($route->getParams() as $name => $param) { // Set params + if (($param['deprecated'] ?? false) === true) { + continue; + } + /** * @var \Utopia\Validator $validator */ diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 948798ef0be..bac483ffee5 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -314,6 +314,10 @@ public function parse(): array ); foreach ($parameters as $name => $param) { // Set params + if (($param['deprecated'] ?? false) === true) { + continue; + } + /** @var Validator $validator */ $validator = (\is_callable($param['validator'])) ? ($param['validator'])(...$this->app->getResources($param['injections'])) diff --git a/src/Appwrite/Utopia/Request/Filters/V19.php b/src/Appwrite/Utopia/Request/Filters/V19.php index 31296b2eb21..8680cd642ca 100644 --- a/src/Appwrite/Utopia/Request/Filters/V19.php +++ b/src/Appwrite/Utopia/Request/Filters/V19.php @@ -10,6 +10,16 @@ class V19 extends Filter public function parse(array $content, string $model): array { switch ($model) { + case 'functions.list': + $content = $this->convertQueryAttribute($content, 'deployment', 'deploymentId'); + break; + case 'functions.listDeployments': + $content = $this->convertQueryAttribute($content, 'size', 'deploymentSize'); + break; + case 'proxy.listRules': + $content = $this->convertQueryAttribute($content, 'resourceType', 'deploymentResourceType'); + $content = $this->convertQueryAttribute($content, 'resourceId', 'deploymentResourceId'); + break; case 'functions.create': unset($content['templateRepository']); unset($content['templateOwner']); @@ -19,7 +29,28 @@ public function parse(array $content, string $model): array case 'functions.listExecutions': unset($content['search']); break; + case 'project.createVariable': + case 'project.listVariables': + case 'functions.createVariable': + case 'functions.updateVariable': + $content['secret'] = false; + break; + } + return $content; + } + + public function convertQueryAttribute(array $content, string $old, string $new) + { + if (isset($content['queries']) && is_array($content['queries'])) { + foreach ($content['queries'] as $index => $query) { + $query = \json_decode($query, true); + if (($query['attribute'] ?? '') === $old) { + $query['attribute'] = $new; + } + $content['queries'][$index] = \json_encode($query); + } } + return $content; } } diff --git a/src/Appwrite/Utopia/Response/Filters/V19.php b/src/Appwrite/Utopia/Response/Filters/V19.php index 8ab430e5694..2025cb629d9 100644 --- a/src/Appwrite/Utopia/Response/Filters/V19.php +++ b/src/Appwrite/Utopia/Response/Filters/V19.php @@ -16,14 +16,19 @@ public function parse(array $content, string $model): array Response::MODEL_FUNCTION => $this->parseFunction($content), Response::MODEL_FUNCTION_LIST => $this->handleList($content, 'functions', fn ($item) => $this->parseFunction($item)), Response::MODEL_DEPLOYMENT => $this->parseDeployment($content), + Response::MODEL_DEPLOYMENT_LIST => $this->handleList($content, 'deployments', fn ($item) => $this->parseDeployment($item)), Response::MODEL_PROXY_RULE => $this->parseProxyRule($content), + Response::MODEL_PROXY_RULE_LIST => $this->handleList($content, 'rules', fn ($item) => $this->parseProxyRule($item)), Response::MODEL_MIGRATION => $this->parseMigration($content), + Response::MODEL_MIGRATION_LIST => $this->handleList($content, 'migrations', fn ($item) => $this->parseMigration($item)), Response::MODEL_PROJECT => $this->parseProject($content), + Response::MODEL_PROJECT_LIST => $this->handleList($content, 'projects', fn ($item) => $this->parseProject($item)), Response::MODEL_PROVIDER_REPOSITORY => $this->parseProviderRepository($content), Response::MODEL_TEMPLATE_VARIABLE => $this->parseTemplateVariable($content), Response::MODEL_USAGE_FUNCTION => $this->parseUsageFunction($content), Response::MODEL_USAGE_FUNCTIONS => $this->parseUsageFunctions($content), Response::MODEL_VARIABLE => $this->parseVariable($content), + Response::MODEL_VARIABLE_LIST => $this->handleList($content, 'variables', fn ($item) => $this->parseVariable($item)), default => $parsedResponse, }; diff --git a/src/Appwrite/Vcs/Comment.php b/src/Appwrite/Vcs/Comment.php index 62f6ef61d00..7c550ad5287 100644 --- a/src/Appwrite/Vcs/Comment.php +++ b/src/Appwrite/Vcs/Comment.php @@ -36,6 +36,7 @@ public function addBuild(Document $project, Document $resource, string $resource $this->builds[$id] = [ 'projectName' => $project->getAttribute('name'), 'projectId' => $project->getId(), + 'region' => $project->getAttribute('region', 'default'), 'resourceName' => $resource->getAttribute('name'), 'resourceId' => $resource->getId(), 'resourceType' => $resourceType, @@ -66,6 +67,7 @@ public function generateComment(): string if ($build['resourceType'] === 'site') { $projects[$build['projectId']]['site'][$build['resourceId']] = [ 'name' => $build['resourceName'], + 'region' => $build['region'], 'status' => $build['buildStatus'], 'deploymentId' => $build['deploymentId'], 'action' => $build['action'], @@ -74,6 +76,7 @@ public function generateComment(): string } elseif ($build['resourceType'] === 'function') { $projects[$build['projectId']]['function'][$build['resourceId']] = [ 'name' => $build['resourceName'], + 'region' => $build['region'], 'status' => $build['buildStatus'], 'deploymentId' => $build['deploymentId'], 'action' => $build['action'], @@ -114,7 +117,7 @@ public function generateComment(): string }; if ($site['action']['type'] === 'logs') { - $action = '[View Logs](' . $protocol . '://' . $hostname . '/console/project-' . $projectId . '/sites/site-' . $siteId . '/deployments/deployment-' . $site['deploymentId'] . ')'; + $action = '[View Logs](' . $protocol . '://' . $hostname . '/console/project-' . $site['region'] . '-' . $projectId . '/sites/site-' . $siteId . '/deployments/deployment-' . $site['deploymentId'] . ')'; } else { $action = '[Authorize](' . $site['action']['url'] . ')'; } @@ -146,12 +149,12 @@ public function generateComment(): string $text .= "| :- | :- | :- | :- |\n"; foreach ($project['function'] as $functionId => $function) { - $extension = $site['status'] === 'building' ? 'gif' : 'png'; + $extension = $function['status'] === 'building' ? 'gif' : 'png'; - $pathLight = '/images/vcs/status-' . $site['status'] . '-light.' . $extension; - $pathDark = '/images/vcs/status-' . $site['status'] . '-dark.' . $extension; + $pathLight = '/images/vcs/status-' . $function['status'] . '-light.' . $extension; + $pathDark = '/images/vcs/status-' . $function['status'] . '-dark.' . $extension; - $status = match ($site['status']) { + $status = match ($function['status']) { 'waiting' => $this->generatImage($pathLight, $pathDark, 'Queued', 85) . ' _Queued_', 'processing' => $this->generatImage($pathLight, $pathDark, 'Processing', 85) . ' _Processing_', 'building' => $this->generatImage($pathLight, $pathDark, 'Building', 85) . ' _Building_', @@ -160,7 +163,7 @@ public function generateComment(): string }; if ($function['action']['type'] === 'logs') { - $action = '[View Logs](' . $protocol . '://' . $hostname . '/console/project-' . $projectId . '/functions/function-' . $functionId . '/deployment-' . $function['deploymentId'] . ')'; + $action = '[View Logs](' . $protocol . '://' . $hostname . '/console/project-' . $function['region'] . '-' . $projectId . '/functions/function-' . $functionId . '/deployment-' . $function['deploymentId'] . ')'; } else { $action = '[Authorize](' . $function['action']['url'] . ')'; } diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index c381ceeae36..5b204c19109 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -37,7 +37,8 @@ public function __construct(callable $endpointSelector) $this->headers = [ 'content-type' => 'application/json', 'authorization' => 'Bearer ' . System::getEnv('_APP_EXECUTOR_SECRET', ''), - 'x-opr-addressing-method' => 'anycast-efficient' + 'x-opr-addressing-method' => 'anycast-efficient', + 'x-edge-bypass-gateway' => '1' ]; } diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index fe600cd0f8d..620409bb397 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -31,7 +31,7 @@ public function testOptions() $this->assertEquals(204, $response['headers']['status-code']); $this->assertEquals('Appwrite', $response['headers']['server']); $this->assertEquals('GET, POST, PUT, PATCH, DELETE', $response['headers']['access-control-allow-methods']); - $this->assertEquals('Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent', $response['headers']['access-control-allow-headers']); + $this->assertEquals('Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Dev-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent', $response['headers']['access-control-allow-headers']); $this->assertEquals('X-Appwrite-Session, X-Fallback-Cookies', $response['headers']['access-control-expose-headers']); $this->assertEquals('http://localhost', $response['headers']['access-control-allow-origin']); $this->assertEquals('true', $response['headers']['access-control-allow-credentials']); diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 2b60dee856b..7c0060ecaa0 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -12,7 +12,6 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Datetime as DatetimeValidator; -use Utopia\Validator\JSON; trait DatabasesBase { @@ -1683,6 +1682,308 @@ public function testCreateDocument(array $data): array return $data; } + /** + * @depends testCreateIndexes + */ + public function testUpsertDocument(array $data): void + { + $databaseId = $data['databaseId']; + $documentId = ID::unique(); + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertCount(3, $document['body']['$permissions']); + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Love and Thunder', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Love and Thunder', $document['body']['title']); + + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals('Thor: Love and Thunder', $document['body']['title']); + + // removing permission to read and delete + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Love and Thunder', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::update(Role::users()) + ], + ]); + // shouldn't be able to read as no read permission + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + switch ($this->getSide()) { + case 'client': + $this->assertEquals(404, $document['headers']['status-code']); + break; + case 'server': + $this->assertEquals(200, $document['headers']['status-code']); + break; + } + // shouldn't be able to delete as no delete permission + $document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + // simulating for the client + // the document should not be allowed to be deleted as needed downward + if ($this->getSide() === 'client') { + $this->assertEquals(401, $document['headers']['status-code']); + } + // giving the delete permission + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Love and Thunder', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()) + ], + ]); + $document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(204, $document['headers']['status-code']); + + // relationship behaviour + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => 'person-upsert', + 'name' => 'person', + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + Permission::create(Role::users()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $person['headers']['status-code']); + + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => 'library-upsert', + 'name' => 'library', + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::create(Role::users()), + Permission::delete(Role::users()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $library['headers']['status-code']); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'fullName', + 'size' => 255, + 'required' => false, + ]); + + sleep(1); // Wait for worker + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => 'library-upsert', + 'type' => Database::RELATION_ONE_TO_ONE, + 'key' => 'library', + 'twoWay' => true, + 'onDelete' => Database::RELATION_MUTATE_CASCADE, + ]); + + sleep(1); // Wait for worker + + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $library['body']['$id'] . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'libraryName', + 'size' => 255, + 'required' => true, + ]); + + sleep(1); // Wait for worker + + $this->assertEquals(202, $libraryName['headers']['status-code']); + + // upserting values + $documentId = ID::unique(); + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents/'.$documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library1', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'libraryName' => 'Library 1', + ], + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ]); + + $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString(), + Query::equal('library', ['library1'])->toString(), + ], + ]); + + $this->assertEquals(1, $documents['body']['total']); + $this->assertEquals('Library 1', $documents['body']['documents'][0]['library']['libraryName']); + + + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents/'.$documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library1', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'libraryName' => 'Library 2', + ], + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ]); + + // data should get updated + $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString(), + Query::equal('library', ['library1'])->toString(), + ], + ]); + + $this->assertEquals(1, $documents['body']['total']); + $this->assertEquals('Library 2', $documents['body']['documents'][0]['library']['libraryName']); + + + // data should get added + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents/'.ID::unique(), array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library2', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'libraryName' => 'Library 2', + ], + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ]); + + $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString() + ], + ]); + $this->assertEquals(2, $documents['body']['total']); + } + /** * @depends testCreateDocument */ diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index 3f7099e7035..9a7ba74ec1d 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -6,8 +6,8 @@ use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; -use Utopia\App; use Utopia\Database\Query; +use Utopia\System\System; class ProxyCustomServerTest extends Scope { @@ -328,7 +328,7 @@ public function testCreateFunctionBranchRule(): void public function testUpdateRule(): void { // Create function appwrite-network domain - $domain = \uniqid() . '-cname-api.' . App::getEnv('_APP_DOMAIN_FUNCTIONS'); + $domain = \uniqid() . '-cname-api.' . System::getEnv('_APP_DOMAIN_FUNCTIONS'); $rule = $this->createAPIRule($domain); $this->assertEquals(201, $rule['headers']['status-code']); @@ -337,7 +337,7 @@ public function testUpdateRule(): void $this->cleanupRule($rule['body']['$id']); // Create site appwrite-network domain - $domain = \uniqid() . '-cname-api.' . App::getEnv('_APP_DOMAIN_SITES'); + $domain = \uniqid() . '-cname-api.' . System::getEnv('_APP_DOMAIN_SITES'); $rule = $this->createAPIRule($domain); $this->assertEquals(201, $rule['headers']['status-code']); diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 01de2782a5f..ba2d18694a3 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -607,15 +607,6 @@ public function testCreateDeployment() $this->assertContains("projects.{$projectId}", $response['data']['channels']); $this->assertArrayHasKey('buildLogs', $response['data']['payload']); - // Ignore comparasion for first payload - if ($previousBuildLogs !== null) { - $this->assertNotEquals($previousBuildLogs, $response['data']['payload']['buildLogs']); - } - - $previousBuildLogs = $response['data']['payload']['buildLogs']; - - $this->assertEquals('building', $response['data']['payload']['status']); - if (!empty($response['data']['payload']['buildEndedAt'])) { $this->assertNotEmpty($response['data']['payload']['buildEndedAt']); $this->assertNotEmpty($response['data']['payload']['buildStartedAt']); @@ -626,6 +617,15 @@ public function testCreateDeployment() $this->assertNotEmpty($response['data']['payload']['buildLogs']); break; } + + // Ignore comparasion for first payload + if ($previousBuildLogs !== null) { + $this->assertNotEquals($previousBuildLogs, $response['data']['payload']['buildLogs']); + } + + $previousBuildLogs = $response['data']['payload']['buildLogs']; + + $this->assertEquals('building', $response['data']['payload']['status']); } $response = json_decode($client->receive(), true); diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index f9d5b4acdff..8459e46c6f3 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -1446,7 +1446,7 @@ public function testSiteStatic(): void $this->assertEquals(404, $response['headers']['status-code']); $this->assertStringContainsString("Page not found", $response['body']); // Title $this->assertStringContainsString("Go to homepage", $response['body']); // Button - $this->assertStringContainsString("Powered by", $response['body']); // Brand + $this->assertStringNotContainsString("Powered by", $response['body']); // Brand $this->cleanupSite($siteId); } @@ -1502,7 +1502,7 @@ public function testSiteStaticSPA(): void $this->assertEquals(200, $response['headers']['status-code']); $this->assertStringContainsString("Customized 404 page", $response['body']); - $this->assertStringNotContainsString("Powered by", $response['body']); // Brand + $this->assertStringNotContainsString("Powered by", $response['body']); //brand $this->cleanupSite($siteId); } @@ -2646,9 +2646,51 @@ public function testOutputDirectoryMissing(): void $this->assertEventually(function () use ($siteId, $deploymentId) { $deployment = $this->getDeployment($siteId, $deploymentId); $this->assertEquals('failed', $deployment['body']['status'], 'Deployment status does not match: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); - $this->assertStringContainsString('Error:', $deployment['body']['buildLogs'], 'Deployment logs do not match: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); + $this->assertStringContainsString('No such file or directory', $deployment['body']['buildLogs'], 'Deployment logs do not match: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); }, 100000, 500); $this->cleanupSite($siteId); } + + public function testBuildErrorLogs(): void + { + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Astro SSR site', + 'framework' => 'astro', + 'buildRuntime' => 'node-22', + 'outputDirectory' => './dist', + 'buildCommand' => 'npm run build', + 'installCommand' => 'echo "custom error" && npm install', + 'adapter' => 'ssr', + ]); + $this->assertNotEmpty($siteId); + + $site = $this->getSite($siteId); + $this->assertEquals('200', $site['headers']['status-code']); + + $domain = $this->setupSiteDomain($siteId); + $this->assertNotEmpty($domain); + + $deployment = $this->createDeployment($siteId, [ + 'code' => $this->packageSite('astro-static'), + 'activate' => true + ]); + $this->assertEquals(202, $deployment['headers']['status-code']); + + $deploymentId = $deployment['body']['$id']; + $this->assertNotEmpty($deploymentId); + + $this->assertEventually(function () use ($siteId, $deploymentId) { + $deployment = $this->getDeployment($siteId, $deploymentId); + $this->assertEquals('failed', $deployment['body']['status'], 'Deployment status is failed, deployment: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); + }, 100000, 500); + + $deployment = $this->getDeployment($siteId, $deploymentId); + $this->assertEquals(200, $deployment['headers']['status-code']); + $this->assertStringContainsString('custom error', $deployment['body']['buildLogs']); + $this->assertStringContainsString('Adapter mismatch', $deployment['body']['buildLogs']); + + $this->cleanupSite($siteId); + } } diff --git a/tests/e2e/Services/Teams/TeamsBase.php b/tests/e2e/Services/Teams/TeamsBase.php index 80ac1621ee9..fccfded1e1d 100644 --- a/tests/e2e/Services/Teams/TeamsBase.php +++ b/tests/e2e/Services/Teams/TeamsBase.php @@ -64,7 +64,7 @@ public function testCreateTeam(): array // Step 4: Assert failure — cannot remove the only OWNER from a team $this->assertEquals(400, $response['headers']['status-code']); - $this->assertEquals('general_argument_invalid', $response['body']['type']); + $this->assertEquals('membership_downgrade_prohibited', $response['body']['type']); $this->assertEquals('There must be at least one owner in the organization.', $response['body']['message']); } diff --git a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php index f096831a761..7949761d7f0 100644 --- a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php +++ b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php @@ -65,7 +65,7 @@ public function testTeamMembershipPerms($data): array /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ + $developer = $this->client->call(Client::METHOD_POST, '/teams/' . $teamUid . '/memberships', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -75,7 +75,8 @@ public function testTeamMembershipPerms($data): array 'url' => 'http://localhost:5000/join-us#title' ]); - $this->assertEquals(201, $response['headers']['status-code']); + $developerUserId = $developer['body']['$id']; + $this->assertEquals(201, $developer['headers']['status-code']); $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ 'content-type' => 'application/json', @@ -90,13 +91,26 @@ public function testTeamMembershipPerms($data): array $this->assertEquals(200, $response['headers']['status-code']); - $ownerMembershipUid = $response['body']['memberships'][1]['$id']; + $ownerMembershipUid = $response['body']['memberships'][0]['$id']; $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid . '/memberships/' . $ownerMembershipUid, array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); + + $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals('membership_deletion_prohibited', $response['body']['type']); + $this->assertEquals('There must be at least one owner in the organization.', $response['body']['message']); + + // Remove the excess developer member to reduce the membership count in `TeamsBaseClient` tests. + // This is necessary because the only owner cannot be removed in the console project / top level team / organization. + $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid . '/memberships/' . $developerUserId, array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(204, $response['headers']['status-code']); return $data; @@ -109,21 +123,6 @@ public function testUpdateTeamMembershipRoles($data): array $membershipUid = $data['membershipUid'] ?? ''; $session = $data['session'] ?? ''; - /** - * Test for FAILURE - */ - $roles = ['developer']; - $response = $this->client->call(Client::METHOD_PATCH, '/teams/' . $teamUid . '/memberships/' . $membershipUid, array_merge([ - 'origin' => 'http://localhost', - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'roles' => $roles - ]); - - $this->assertEquals(400, $response['headers']['status-code']); - $this->assertEquals('There must be at least one owner in the organization.', $response['body']['message']); - /** * Test for unknown team */ @@ -132,7 +131,7 @@ public function testUpdateTeamMembershipRoles($data): array 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'roles' => $roles + 'roles' => ['developer'] ]); $this->assertEquals(404, $response['headers']['status-code']); @@ -145,7 +144,7 @@ public function testUpdateTeamMembershipRoles($data): array 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'roles' => $roles + 'roles' => ['developer'] ]); $this->assertEquals(404, $response['headers']['status-code']); @@ -160,7 +159,7 @@ public function testUpdateTeamMembershipRoles($data): array 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ], [ - 'roles' => $roles + 'roles' => ['developer'] ]); $this->assertEquals(401, $response['headers']['status-code']); @@ -168,4 +167,89 @@ public function testUpdateTeamMembershipRoles($data): array return $data; } + + /** + * @depends testUpdateTeamMembershipRoles + */ + public function testDeleteTeamMembership($data): array + { + $teamUid = $data['teamUid'] ?? ''; + $membershipUid = $data['membershipUid'] ?? ''; + $session = $data['session'] ?? ''; + + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(3, $response['body']['total']); + + $ownerMembershipUid = $response['body']['memberships'][0]['$id']; + + /** + * Test deleting a membership that does not exists + */ + $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid . '/memberships/dne', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ]); + + $this->assertEquals(404, $response['headers']['status-code']); + + /** + * Test deleting another user's membership + */ + $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid . '/memberships/' . $ownerMembershipUid, [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals('The current user is not authorized to perform the requested action.', $response['body']['message']); + + $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid . '/memberships/' . $membershipUid, [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ]); + + $this->assertEquals(204, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, $response['body']['total']); + + /** + * Test for when the owner tries to delete their membership + */ + $response = $this->client->call(Client::METHOD_DELETE, '/teams/' . $teamUid . '/memberships/' . $ownerMembershipUid, array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals('membership_deletion_prohibited', $response['body']['type']); + $this->assertEquals('There must be at least one owner in the organization.', $response['body']['message']); + + $response = $this->client->call(Client::METHOD_GET, '/teams/' . $teamUid . '/memberships/' . $ownerMembershipUid, array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + return []; + } } diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index 4bbca3e9c06..039ffb731ab 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -35,7 +35,7 @@ services: - VERSION=dev restart: unless-stopped ports: - - 9501:80 + - "9501:80" networks: - appwrite labels: @@ -52,15 +52,12 @@ services: - ./phpunit.xml:/usr/src/code/phpunit.xml - ./tests:/usr/src/code/tests - ./app:/usr/src/code/app - # - ./vendor:/usr/src/code/vendor - ./docs:/usr/src/code/docs - ./public:/usr/src/code/public - ./src:/usr/src/code/src - - ./debug:/tmp depends_on: - mariadb - redis - # - clamav environment: - _APP_COMPRESSION_MIN_SIZE_BYTES - _APP_ENV @@ -353,33 +350,6 @@ services: volumes: - appwrite-redis:/data:rw - # clamav: - # image: appwrite/clamav:1.2.0 - # container_name: appwrite-clamav - # restart: unless-stopped - # networks: - # - appwrite - # volumes: - # - appwrite-uploads:/storage/uploads - - - # redis-commander: - # image: rediscommander/redis-commander:latest - # restart: unless-stopped - # networks: - # - appwrite - # environment: - # - REDIS_HOSTS=redis - # ports: - # - "8081:8081" - - # webgrind: - # image: 'jokkedk/webgrind:latest' - # volumes: - # - './debug:/tmp' - # ports: - # - '3001:80' - networks: gateway: appwrite: