Compare commits

...
Author SHA1 Message Date
Binyamin Yawitz dfcfb4403a fix: casting values 2024-09-19 10:25:50 -04:00
Steven NguyenandGitHub e406dead9a Merge pull request #8686 from appwrite/1.6.x
Sync 1.6.x into main
2024-09-18 13:19:30 -07:00
Christy JacobandGitHub d633ad2bfb Merge branch 'main' into 1.6.x 2024-09-18 22:48:42 +04:00
Christy JacobandGitHub e0686894f1 Merge pull request #8685 from appwrite/chore-sync-main-into-1.6.x
Sync main into 1.6.x
2024-09-18 21:50:31 +04:00
Steven NguyenandGitHub b8fbbf3710 Merge branch 'main' into chore-sync-main-into-1.6.x 2024-09-18 16:43:05 +00:00
Christy JacobandGitHub 507f8c6955 Merge pull request #8683 from appwrite/update-executor
Update executor
2024-09-18 20:04:56 +04:00
Christy JacobandGitHub d0f704480b Merge pull request #8681 from appwrite/fix-add-missing-template-scopes
fix: add missing template scopes
2024-09-18 20:04:02 +04:00
Christy Jacob 4a29091ff4 chroe: update executor 2024-09-18 15:46:39 +00:00
Christy Jacob 156617d147 chroe: update executor 2024-09-18 15:46:21 +00:00
loks0n a0c6ab3541 fix: add missing template scopes 2024-09-18 13:30:27 +01:00
Christy JacobandGitHub 086e9bfab4 Merge pull request #8677 from appwrite/feat-1.6.0-release-prep
Prepare 1.6.0 release
2024-09-18 13:24:46 +04:00
Christy JacobandGitHub 5030307715 Merge pull request #8678 from appwrite/fix-certificate-email-var-question
Fix missing question for _APP_EMAIL_CERTIFICATES during install
2024-09-18 13:24:05 +04:00
Christy JacobandGitHub bc068466c1 Merge pull request #8679 from appwrite/chore-bump-docker-base
Bump docker base
2024-09-18 13:22:55 +04:00
Steven Nguyen b36fc1c2f8 chore: bump docker base 2024-09-17 22:44:20 -07:00
Steven Nguyen bde1ad9b05 fix: missing question for _APP_EMAIL_CERTIFICATES during install
Because the variable is required and there is no default, the user is
prompted to supply a value, but because there is no question set, the
user won't know what to fill in.
2024-09-17 22:35:07 -07:00
Steven Nguyen 1f5ac2add0 Add 1.6.0 to CHANGES.md 2024-09-17 21:52:19 -07:00
Steven Nguyen f555939de6 Bump appwrite version to 1.6.0 2024-09-17 20:21:45 -07:00
Christy JacobandGitHub 1c8245de99 Merge pull request #8585 from appwrite/chore-bump-console
chore: bump console to 5.0.6
2024-09-18 01:48:09 +04:00
Christy Jacob 607d723037 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into chore-bump-console 2024-09-17 21:47:28 +00:00
Christy Jacob 8ce9e79cc1 chore:update console 2024-09-17 21:46:23 +00:00
Christy JacobandGitHub af126a28ae Merge pull request #8639 from appwrite/fix-scheduled-executions
Fix: scheduled executions data
2024-09-18 01:40:31 +04:00
Steven NguyenandGitHub dfeca259c5 Merge pull request #8674 from appwrite/fix-messaging-metrics
Fix messaging metrics
2024-09-17 12:55:54 -07:00
Steven Nguyen a26f08a32b fix(messaging): ensure metric includes provider name 2024-09-17 12:20:30 -07:00
Steven Nguyen 9c088f974a fix(messaging): use count of delivery errors for metrics
`$deliveryErrors` is an array so we need to get a count before using it
in metrics.
2024-09-17 11:57:22 -07:00
Christy JacobandGitHub 154993dafd Merge pull request #8672 from appwrite/extrnal-messaging-usage
External messaging usage count
2024-09-17 19:24:39 +04:00
shimon 638d79c326 Merge branch '1.6.x' of github.com:appwrite/appwrite into extrnal-messaging-usage 2024-09-17 14:27:05 +03:00
shimon 4654c09edc fix 2024-09-17 14:13:09 +03:00
shimon 4cbbd19cf9 linter 2024-09-17 12:33:06 +03:00
shimon 25f82895c5 adding external messages usage 2024-09-17 12:20:55 +03:00
shimon 0791b68149 adding external messages usage 2024-09-17 11:45:07 +03:00
Christy JacobandGitHub b591eac230 Merge pull request #8662 from appwrite/fix-retention
Add retention env vars to deletes worker
2024-09-17 10:07:09 +02:00
shimon f6d7a3d5cc Merge branch '1.6.x' of github.com:appwrite/appwrite into extrnal-messaging-usage
# Conflicts:
#	app/config/specs/swagger2-1.6.x-client.json
#	app/config/specs/swagger2-1.6.x-console.json
2024-09-17 10:29:14 +03:00
shimon 3f48ec7e48 sync with 1.6.x 2024-09-17 10:28:21 +03:00
Torsten DittmannandGitHub 49cc99a556 Merge pull request #8668 from appwrite/fix-function-storage-metrics
fix: function storage metrics
2024-09-16 14:21:52 +02:00
Torsten Dittmann c5dae9f018 fix: backwards compatibility 2024-09-16 13:49:13 +02:00
Torsten Dittmann a5516765b3 fix: architecture agnostic runtimes in cli 2024-09-16 12:43:59 +02:00
Torsten Dittmann b3ea0bbb6b chore: update compose lock file 2024-09-16 12:04:56 +02:00
Torsten Dittmann 4112880330 chore: run formatter 2024-09-16 12:03:18 +02:00
Torsten Dittmann 7c4a954166 chore: generate specs 2024-09-16 12:00:17 +02:00
Torsten Dittmann 8ac2f64353 fix: function storage metrics 2024-09-16 11:58:08 +02:00
Matej Bačo 9680aae30f Update twig version 2024-09-16 07:28:02 +00:00
Matej Bačo c4991b9941 Merge remote-tracking branch 'origin/1.6.x' into fix-scheduled-executions 2024-09-14 10:28:30 +00:00
Matej Bačo 056a646c26 Fix failing tests 2024-09-14 10:28:14 +00:00
Steven Nguyen d1296dcc08 fix: add retention env vars to deletes worker
The resources are injected in the deletes worker so the env vars need to be passed to the container.
2024-09-13 16:37:04 +02:00
Steven NguyenandGitHub 80247ddce9 Merge pull request #8642 from feschaffa/fix-docker-compose-usage-dump-restart
Fix: Update docker-compose to restart usage-dump
2024-09-11 21:48:35 +02:00
Christy JacobandGitHub a00c771be0 Merge pull request #8643 from appwrite/chore-prettyprint-specs
Chores: Prettyprint specs
2024-09-10 14:52:43 +04:00
Matej Bačo 627ea74134 Update specs 2024-09-10 10:51:18 +00:00
Matej Bačo d25ac4998a Merge remote-tracking branch 'origin/1.6.x' into chore-prettyprint-specs 2024-09-10 10:50:26 +00:00
Christy JacobandGitHub ca9af0510a Merge pull request #8627 from appwrite/fix-functions-logging
Fix: logging behaviour for Functions
2024-09-10 14:49:06 +04:00
Matej Bačo e387ab966f Prettyprint specs 2024-09-10 10:48:42 +00:00
Christy JacobandGitHub 876bb6e2c8 Merge pull request #8631 from appwrite/feat-vcs-env-vars
Feat: VCS vars to deployments & executions
2024-09-10 14:48:22 +04:00
Matej Bačo 8a2083feb5 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into fix-scheduled-executions 2024-09-10 10:38:01 +00:00
Christy JacobandGitHub d82572acbe Merge pull request #8640 from appwrite/fix-vcs-deployment-size
Fix: vcs deployment size
2024-09-10 14:37:59 +04:00
Christy JacobandGitHub e744a7e022 Merge pull request #8641 from appwrite/fix-scheduler-across-projects
Fix: cross-project scheduler stability
2024-09-10 14:23:26 +04:00
Jake Barnby 5a8adcc0f6 Update database 2024-09-10 22:21:52 +12:00
Jake Barnby 31cc4350a2 Revert version 2024-09-10 15:09:57 +12:00
Steven NguyenandGitHub 16bed9de22 Merge pull request #8649 from appwrite/fix-create-mfa-challenge-rate-limit
Update abuse-key for mfa challenge endpoints
2024-09-09 16:46:40 +02:00
Steven NguyenandGitHub 9febb06052 fix: update abuse-key for mfa challenge endpoints
Because the key was not specific enough, when one user triggered the
rate limit, all users were affected.
2024-09-09 14:10:58 +00:00
Christy JacobandGitHub c7dd8574e4 Merge pull request #8648 from appwrite/phone_auth_metric_rename
Phone auth metric rename
2024-09-09 17:42:11 +04:00
shimon 36486dd3f4 sms messages rename 2024-09-09 15:05:11 +02:00
shimon de8e82926a sms messages rename 2024-09-09 14:54:32 +02:00
Jake BarnbyandGitHub 923252ea05 Merge pull request #8646 from appwrite/1.6.1
Update version
2024-09-09 23:08:13 +12:00
Jake Barnby 7e303399c7 Update version 2024-09-09 23:00:22 +12:00
Jake BarnbyandGitHub 453ce461f9 Merge pull request #8630 from appwrite/1.6.1
1.6.1
2024-09-09 22:45:24 +12:00
Jake Barnby 70c231dc5c Update specs 2024-09-09 22:43:05 +12:00
Jake Barnby f86b75733e Revert body validator 2024-09-09 22:34:24 +12:00
Jake Barnby b0bc888e6c Revert phpunit stop on failure 2024-09-09 21:11:11 +12:00
Jake Barnby fe62cf857c Update docs 2024-09-09 20:38:15 +12:00
Jake Barnby 5511e3d0ec Update console 2024-09-09 20:37:52 +12:00
Jake Barnby a6d2fe6d39 Update SDK generator 2024-09-09 20:37:41 +12:00
Jake Barnby cad78159ea Update SDK versions 2024-09-09 20:37:32 +12:00
Jake Barnby af7bd705f4 Update console SDK version 2024-09-09 19:17:47 +12:00
Matej Bačo 8160e39154 Prettyprint specs 2024-09-08 07:24:17 +00:00
FernandoandGitHub 20cf7643dc Update docker-compose to restart usage-dump
Currently, docker doesn't restart the usage-dump container after a system reboot, causing appwrite to not show usage correctly. This fix makes it restart along with the other containers.
2024-09-07 14:44:16 -03:00
Matej Bačo 3aa2bd6aa3 Use schedule ID as unique memory cache key 2024-09-07 17:31:17 +00:00
Matej Bačo da4c4184bc Fix vcs deployment size 2024-09-07 17:08:09 +00:00
Matej BačoandGitHub b3ada0b017 Update src/Appwrite/Platform/Tasks/ScheduleExecutions.php 2024-09-07 19:02:38 +02:00
Matej Bačo b1769ed5ca Fix scheduled executions data 2024-09-07 12:20:23 +02:00
Matej Bačo ff1d64a36a Add VCS vars to deployments & executions 2024-09-06 10:50:29 +00:00
Jake Barnby e73053d5b2 Merge remote-tracking branch 'origin/1.6.x' into 1.6.1 2024-09-06 22:26:01 +12:00
Christy JacobandGitHub 0533792b00 Merge pull request #8629 from appwrite/update-console
chore: update console
2024-09-06 00:24:11 +04:00
Christy Jacob 730cb5280d chore: update console 2024-09-06 00:15:48 +04:00
Christy Jacob d8c15079b6 chore: update console 2024-09-06 00:08:22 +04:00
Christy JacobandGitHub 60b3b3a061 Merge pull request #8622 from appwrite/fix-function-template-async-test
Fix: Add Functions templates async test
2024-09-05 21:04:20 +04:00
Christy JacobandGitHub 3cef3a76ce Merge pull request #8625 from appwrite/fix-router-logging
Fix: router function execution logging
2024-09-05 21:03:07 +04:00
Christy JacobandGitHub 52bda3945d Merge pull request #8628 from appwrite/fix-session-alert-copy
Fix: Improve mail datetime format
2024-09-05 20:47:20 +04:00
Matej Bačo 9891f61610 Improve mail datetime format 2024-09-05 16:33:16 +02:00
Matej Bačo 4ae5e82d6f Fix logging behaviour; new tests 2024-09-05 13:23:24 +00:00
Matej Bačo fbe824af10 Fix router function execution logging 2024-09-05 10:17:30 +00:00
Jake BarnbyandGitHub 583bb7d512 Merge pull request #8544 from appwrite/feat-renaming-attributes
Implement Renaming Attributes in the API
2024-09-05 21:48:02 +12:00
Jake Barnby 3f99f01953 Recreate original on create failure with new key 2024-09-05 20:41:50 +12:00
Matej BačoandGitHub 30a69641cb Merge branch '1.6.x' into fix-function-template-async-test 2024-09-05 10:40:04 +02:00
Jake Barnby a28f19ff3c Merge fix 2024-09-05 16:16:28 +12:00
Jake Barnby d930fed475 Generate console SDK 2024-09-05 15:48:38 +12:00
Jake Barnby 57c5925526 Wrap attribute recreate in transaction 2024-09-05 15:45:28 +12:00
Jake Barnby d39729d830 Param reorder 2024-09-05 15:45:13 +12:00
Jake Barnby df7fa7c344 Revert payload to text 2024-09-05 15:44:49 +12:00
Jake Barnby 24746de9ba Merge remote-tracking branch 'origin/1.6.1' into feat-renaming-attributes
# Conflicts:
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
#	app/controllers/api/databases.php
2024-09-05 15:31:04 +12:00
Jake BarnbyandGitHub f9992c2f64 Merge pull request #8624 from appwrite/fix-tenant-not-removed
Remove tenant in document filter
2024-09-05 15:29:48 +12:00
Jake BarnbyandGitHub 2a3ae69f1c Merge pull request #8597 from appwrite/feat-string-attribute-resizing
Feat string attribute resizing
2024-09-05 15:03:21 +12:00
Jake Barnby 501e7c2fa0 Add assertion 2024-09-05 14:28:15 +12:00
Jake Barnby c58fa78962 Remove tenant in filter 2024-09-05 14:25:11 +12:00
Matej Bačo 0fcaaf99da Add async dynamic key template test 2024-09-04 18:12:11 +00:00
Torsten DittmannandGitHub e11cbd222e Merge pull request #8619 from appwrite/fix-console-redirect-query-params
Update console redirect to include query params
2024-09-04 19:05:02 +02:00
Jake Barnby d29938107c Merge branch '1.6.1' into feat-renaming-attributes
# Conflicts:
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-1.6.x-console.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
#	composer.lock
2024-09-04 21:18:51 +12:00
Jake Barnby e90b1d219e Lint 2024-09-04 21:06:59 +12:00
Jake Barnby 72d6fb3901 Merge branch '1.6.1' into feat-string-attribute-resizing
# Conflicts:
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
#	composer.lock
2024-09-04 21:06:21 +12:00
Steven NguyenandGitHub afdf34c45c fix: update console redirect to include query params
Use `$request->getParams()` because `$request->getURI()` does not include
the query string.
2024-09-04 00:18:59 +00:00
Christy JacobandGitHub 0e2679f07b Merge pull request #8618 from appwrite/update-init-copy
chore: Update Init copy in readme
2024-09-03 21:21:40 +04:00
Aditya OberaiandGitHub c9bd16a353 chore: Update Init copy in readme 2024-09-03 22:46:21 +05:30
Christy JacobandGitHub 6ff1758873 Merge pull request #8616 from appwrite/feat-upload-methodtype
feat: upload methodtype to createdeployment
2024-09-03 18:10:24 +04:00
loks0n 31c21a6a88 chore: specs 1.6.x 2024-09-03 15:01:17 +01:00
loks0n 2bf5809505 feat: add methodType upload to create deployment 2024-09-03 14:44:11 +01:00
Christy JacobandGitHub f16638503a Merge pull request #8615 from appwrite/update-geodb
feat: update geodb
2024-09-03 13:57:25 +04:00
Christy Jacob 4023613bb7 feat: update geodb file name 2024-09-03 11:42:40 +04:00
Christy Jacob 89aceb1db5 feat: update geodb 2024-09-03 11:37:58 +04:00
Jake BarnbyandGitHub 74c447877f Merge pull request #8608 from appwrite/fix-domain-execution-stats
Fix domain execution stats
2024-09-02 23:18:08 +12:00
Bradley SchofieldandGitHub f3878e0f8b Merge branch '1.6.x' into fix-domain-execution-stats 2024-09-02 19:25:06 +09:00
Bradley Schofield e17f391f25 Improve Test Reliabiltiy 2024-09-02 18:57:02 +09:00
Jake BarnbyandGitHub 6bd83c8a70 Merge pull request #8609 from appwrite/fix-deadlock
Fix deadlock
2024-09-02 18:40:39 +12:00
Jake Barnby 98dee5f70d Merge remote-tracking branch 'origin/1.6.x' into fix-deadlock 2024-09-02 18:35:50 +12:00
Jake Barnby a2ce65a5ea Update database for deadlock fix 2024-09-02 18:33:45 +12:00
Bradley SchofieldandGitHub a8b5a8a038 Merge branch '1.6.x' into fix-domain-execution-stats 2024-09-02 13:51:33 +09:00
Bradley Schofield 87e12d028d Increase timer, run linter. 2024-09-02 13:50:58 +09:00
Bradley Schofield cdfc6e640a Add Tests 2024-09-02 13:18:19 +09:00
Bradley Schofield 5820787afc Run Linter 2024-08-30 19:21:26 +09:00
Bradley Schofield 627cbe285f Address Comments 2024-08-30 19:18:45 +09:00
Bradley Schofield 38bc2bb925 Generate New Specs 2024-08-30 18:52:18 +09:00
Bradley Schofield 36c9749098 Add Tests 2024-08-30 18:50:42 +09:00
Bradley Schofield 40b1c28db0 Implement String Attribute Resizing 2024-08-30 18:22:17 +09:00
Christy JacobandGitHub 373144e229 Merge pull request #8593 from appwrite/feat-aws-marketplace
feat: adding aws to one-clicks
2024-08-30 11:57:32 +04:00
Bradley Schofield c4d64a52d6 Fix Bandwidth and other metrics not being tracked for custom domain executions 2024-08-30 12:55:25 +09:00
Christy JacobandGitHub 5374336048 Merge pull request #8594 from appwrite/feat-payload-validator
feat: payload validator
2024-08-29 18:52:17 +04:00
loks0n fc630bf3da feat: payload validator 2024-08-29 15:46:18 +01:00
Binyamin Yawitz 6fb104016f feat: adding aws to one-clicks 2024-08-29 10:38:28 -04:00
Jake BarnbyandGitHub 8cf96ff551 Merge pull request #8589 from appwrite/1.5.x
Sync main with 1.5.x
2024-08-28 13:40:49 +12:00
Torsten DittmannandGitHub 5c58ef2691 Merge pull request #8587 from appwrite/docs-add-dart-and-flutter-changelogs
docs: add changelogs for dart and flutter
2024-08-27 16:05:36 +02:00
Torsten Dittmann 3c94e07bbb docs: add changelogs for dart and flutter 2024-08-27 15:25:26 +02:00
Torsten Dittmann b1c047df47 chore: bump console to 5.0.6 2024-08-27 14:27:52 +02:00
Christy JacobandGitHub 78be575048 Merge pull request #8582 from appwrite/update-sdk-versions
chore: update sdks
2024-08-27 16:11:37 +04:00
Christy Jacob 3ef150ff08 Merge branch 'update-sdk-versions' of github.com:appwrite/appwrite into update-sdk-versions 2024-08-27 16:09:55 +04:00
Christy Jacob d13b5ca57e feat: review comments 2024-08-27 16:09:34 +04:00
8e07ea2c69 Update Dockerfile
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
2024-08-27 16:09:07 +04:00
Christy Jacob f8c281dfc0 feat: update cache buster 2024-08-27 15:58:19 +04:00
Christy Jacob 53a86e62d2 Merge branch 'update-sdk-versions' of github.com:appwrite/appwrite into update-sdk-versions 2024-08-27 15:56:52 +04:00
Christy Jacob fec30cc614 feat: update SDK version 2024-08-27 15:56:15 +04:00
Christy JacobandGitHub 9553dc0a85 Merge branch '1.6.x' into update-sdk-versions 2024-08-27 14:52:17 +04:00
Christy Jacob 2ccf617dd8 feat: update SDK version 2024-08-27 14:25:25 +04:00
Jake BarnbyandGitHub 607c5c7638 Merge pull request #8443 from appwrite/feat-1.5.x-impl-deployment-storage-projects-usage
Merge deployments and build storage metrics together in API
2024-08-27 19:38:56 +12:00
Bradley Schofield a02a092faf Merge branch '1.6.x' into feat-1.5.x-impl-deployment-storage-projects-usage
# Conflicts:
#	app/controllers/api/project.php
#	src/Appwrite/Utopia/Response/Model/UsageProject.php
2024-08-27 15:49:21 +09:00
Christy Jacob a2030c170b chore: update sdks 2024-08-26 20:33:43 +04:00
Torsten DittmannandGitHub 8aebad1c01 Merge pull request #8581 from appwrite/chore-bump-console-sdk
chore: bump console sdk
2024-08-26 18:09:09 +02:00
Torsten Dittmann 588475cddf chore: bump console version 2024-08-26 17:51:03 +02:00
Torsten Dittmann e78767f1a0 chore: bump console sdk 2024-08-26 17:16:39 +02:00
Christy JacobandGitHub 1ec3215900 Merge pull request #8580 from appwrite/1.6.x-logging-test
1.6.x logging test
2024-08-26 16:37:23 +04:00
Christy Jacob e8125b4070 feat: linter 2024-08-26 15:05:50 +04:00
Christy Jacob d2c9ce65e3 feat: remove var_dumps 2024-08-26 14:56:30 +04:00
Christy Jacob 4f8e6d7005 feat: update experimental logging provider 2024-08-26 14:42:48 +04:00
Christy Jacob 03031805a9 feat: add logs 2024-08-26 13:33:51 +04:00
Torsten DittmannandGitHub 5b4444804b Merge pull request #8575 from appwrite/chore-upgrade-console
chore: upgrade console
2024-08-23 22:19:34 +02:00
Torsten Dittmann b215ab07fc chore: bump console to 5.0.1 2024-08-23 22:12:27 +02:00
Torsten Dittmann 853bd9a67c chore: upgrade console 2024-08-23 22:11:37 +02:00
Torsten DittmannandGitHub 6208d78146 Merge pull request #8562 from appwrite/feat-react-native-platform
feat: react native platform
2024-08-23 22:09:30 +02:00
Torsten Dittmann 14dedb9392 chore: bump web sdk for console 2024-08-23 21:49:50 +02:00
Torsten Dittmann 6ef600deb9 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into feat-react-native-platform 2024-08-23 21:44:58 +02:00
Christy JacobandGitHub c12854b369 Merge pull request #8574 from appwrite/chore-latest-database
chore: versions update
2024-08-23 21:35:46 +04:00
Binyamin Yawitz 5cdb8388a1 chore: versions update 2024-08-23 13:02:54 -04:00
Binyamin Yawitz 42631aa85e chore: versions update 2024-08-23 11:55:21 -04:00
Christy JacobandGitHub 18664a73b2 Merge pull request #8573 from appwrite/feat-update-database
Bump database
2024-08-23 13:44:44 +04:00
Jake Barnby ec1c78894c Bump database 2024-08-23 14:47:16 +12:00
Christy JacobandGitHub cf6110530a Merge pull request #8572 from appwrite/fix-go-runtime
fix: go runtime
2024-08-22 19:47:38 +04:00
Matej Bačo 6b940bad05 gix go runtime 2024-08-22 15:44:58 +00:00
Christy JacobandGitHub f10f020d95 Merge pull request #8571 from appwrite/fix-go-version
Fix: go version
2024-08-22 19:17:35 +04:00
Matej Bačo 9d1a9c39d8 fix go version 2024-08-22 15:14:37 +00:00
Christy JacobandGitHub 7b8c1c2892 Merge pull request #8561 from appwrite/feat-benchmark-headers
Feat: Headers validator benchmark
2024-08-22 17:54:06 +04:00
Matej Bačo 31e4a24a76 Merge remote-tracking branch 'origin/1.6.x' into feat-benchmark-headers 2024-08-22 12:58:05 +00:00
Christy JacobandGitHub 44174f8e3d Merge pull request #8556 from appwrite/feat-separate-function-sizes
Feat: Separate deployment sizes
2024-08-22 16:50:25 +04:00
Matej Bačo f98184405b Upgrade OPR versions 2024-08-22 12:15:38 +00:00
Matej Bačo df43553857 Update specs and lockfile 2024-08-22 11:01:31 +00:00
Matej Bačo 8b3fa4a170 Merge remote-tracking branch 'origin/1.6.x' into feat-separate-function-sizes 2024-08-22 10:56:57 +00:00
Matej Bačo 2a6873b756 Fix test 2024-08-22 10:51:08 +00:00
Matej BačoandGitHub 287a501f8d Merge branch '1.6.x' into feat-benchmark-headers 2024-08-21 14:36:27 +02:00
Christy JacobandGitHub 9c71f5acad Merge pull request #8567 from ItzNotABug/update-docs
Update Docs
2024-08-21 16:30:07 +04:00
Matej Bačo 37e3c3ee19 Lockfile update 2024-08-21 12:27:11 +00:00
Matej Bačo d0cf2e26d6 Merge remote-tracking branch 'origin/1.6.x' into feat-benchmark-headers 2024-08-21 12:26:59 +00:00
Matej Bačo 59afa21735 Remove bench file 2024-08-21 12:19:15 +00:00
ItzNotABug 3c5bc03acc update: rebuild sdks. 2024-08-21 17:47:19 +05:30
ItzNotABug 706865ccb8 Merge branch '1.6.x' into update-docs 2024-08-21 17:33:02 +05:30
Torsten Dittmann 90c2bb10ff Merge branch 'feat-react-native-platform' of https://github.com/appwrite/appwrite into feat-react-native-platform 2024-08-21 13:22:30 +02:00
Torsten Dittmann 04181ec9ce fix: increase platform type size and add migration 2024-08-21 13:22:24 +02:00
Christy JacobandGitHub f9d131e1b6 Merge pull request #8551 from appwrite/update-sdks-1.6
feat: update sdks
2024-08-21 14:58:31 +04:00
Luke B. SilverandGitHub 14b40ace27 Merge branch '1.6.x' into feat-react-native-platform 2024-08-21 11:55:51 +01:00
Christy Jacob 88b0ab9184 Merge branch '1.6.x' of github.com:appwrite/appwrite into update-sdks-1.6 2024-08-21 14:53:34 +04:00
Christy Jacob bf2ff4be0f feat: update SDKs and docs 2024-08-21 14:53:05 +04:00
Christy JacobandGitHub 40e060bec4 Merge pull request #8564 from appwrite/feat-atomic-updates
Update database stack
2024-08-21 14:12:29 +04:00
ItzNotABug 2a5dfa2dd4 update: rebuild docs with correct syntax. 2024-08-21 14:46:51 +05:30
Jake Barnby 867d814d47 Update to release versions 2024-08-21 20:26:21 +12:00
Matej Bačo 67afb41702 Update lockfile 2024-08-21 07:31:05 +00:00
Matej Bačo 573aaa1613 Merge remote-tracking branch 'origin/1.6.x' into feat-benchmark-headers 2024-08-21 07:29:11 +00:00
Matej Bačo 4424955e64 Update lockfile 2024-08-21 07:27:46 +00:00
Matej Bačo 8e9c1991dd PR review changes 2024-08-21 07:21:55 +00:00
Matej Bačo 695844faa1 Merge remote-tracking branch 'origin/1.6.x' into feat-separate-function-sizes 2024-08-21 07:17:46 +00:00
Steven NguyenandGitHub 9301bddd8b Merge pull request #6876 from btme0011/feature-5232-Trivy-Security-Scan
feature-5232-Trivy-Security-Scans
2024-08-20 23:26:28 -07:00
Jake Barnby d2c7be19d0 Update database stack 2024-08-21 17:31:13 +12:00
Christy JacobandGitHub 39b87fba64 Merge pull request #8553 from appwrite/feat-sync-1.6.x-filters-migrations
Sync 1.6.x Filters and Migrations with latest
2024-08-21 01:13:55 +04:00
Christy Jacob 5799892f12 feat: update SDKs and docs 2024-08-21 00:25:59 +04:00
Christy Jacob c760fb7d3f feat: update SDKs and docs 2024-08-21 00:25:30 +04:00
Torsten Dittmann 129c1e7c4f Merge branch '1.6.x' of https://github.com/appwrite/appwrite into feat-react-native-platform 2024-08-20 16:04:40 +02:00
Torsten Dittmann cb374eb9f6 chore: upgrade sdk-generator 2024-08-20 16:02:49 +02:00
Matej Bačo 35b954c335 Fix empty size, cancelled builds 2024-08-20 11:38:42 +00:00
Torsten Dittmann f3874e680b fix: react native platform for ios adn android 2024-08-20 13:03:03 +02:00
Bradley SchofieldandGitHub f4f07860c3 Merge branch '1.6.x' into feat-sync-1.6.x-filters-migrations 2024-08-20 19:57:19 +09:00
Christy Jacob a6748be70f Merge branch '1.6.x' of github.com:appwrite/appwrite into update-sdks-1.6 2024-08-20 14:53:08 +04:00
Christy Jacob 95feb59e0a chore: update SDKs 2024-08-20 14:50:57 +04:00
Christy JacobandGitHub 8f4b66679c Merge pull request #8563 from appwrite/fix-revert-create-execution-sdk-request-type
Revert request type to json in create execution
2024-08-20 14:50:08 +04:00
Khushboo Verma d7cca0e25f Revert request type to json in create execution 2024-08-20 16:16:03 +05:30
Jake BarnbyandGitHub df67192f2f Merge pull request #8384 from appwrite/feat-runtime-controls-1.5.x
Feat runtime controls
2024-08-20 22:27:55 +12:00
Matej Bačo f81800b414 Merge branch 'feat-separate-function-sizes' of https://github.com/appwrite/appwrite into feat-separate-function-sizes 2024-08-20 10:22:18 +00:00
Matej Bačo ddb8ee433d Specs updates 2024-08-20 10:21:56 +00:00
Torsten Dittmann f065022cab feat: react native platform 2024-08-20 12:01:20 +02:00
Bradley SchofieldandGitHub 9e44722b9c Merge branch '1.6.x' into feat-runtime-controls-1.5.x 2024-08-20 18:36:11 +09:00
6d230e7c03 Update src/Appwrite/Utopia/Response/Model/Specification.php
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
2024-08-20 18:35:55 +09:00
Matej Bačo 2d9266d915 Fix benchmark vaalidator failure 2024-08-20 09:24:19 +00:00
Matej Bačo eadfa1dda7 Merge branch 'feat-benchmark-headers' of https://github.com/appwrite/appwrite into feat-benchmark-headers 2024-08-20 09:21:37 +00:00
Matej Bačo 9e64c1753b formatting fix 2024-08-20 09:21:29 +00:00
Matej Bačo bbefdc3405 Improve headers validator 2024-08-20 09:19:31 +00:00
Matej BačoandGitHub 89ca56afd7 Merge branch '1.6.x' into feat-benchmark-headers 2024-08-20 10:53:07 +02:00
Matej BačoandGitHub ba1effdcbf Merge branch '1.6.x' into feat-separate-function-sizes 2024-08-20 10:52:59 +02:00
Matej Bačo 22b054453c Add CI/CD 2024-08-20 08:52:51 +00:00
Matej Bačo 69977138da Add headers validator benchmark 2024-08-20 08:47:50 +00:00
Christy JacobandGitHub 9f49e264dc Merge pull request #8550 from appwrite/fix-session-alerts-bug
chore: fix session alerts
2024-08-20 12:44:13 +04:00
Bradley Schofield dc149761d8 Address Jake's Comments 2024-08-20 13:23:11 +09:00
Bradley SchofieldandGitHub e4147e11b3 Merge branch '1.6.x' into feat-sync-1.6.x-filters-migrations 2024-08-20 13:12:27 +09:00
Bradley Schofield 99ffcdd199 Merge branch '1.6.x' into feat-renaming-attributes
# Conflicts:
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-1.6.X-client.json
#	app/config/specs/swagger2-1.6.X-console.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
#	app/controllers/shared/api.php
#	app/realtime.php
#	composer.lock
#	src/Appwrite/Platform/Workers/Deletes.php
2024-08-20 13:07:55 +09:00
Steven NguyenandGitHub 90bc303c7c Merge pull request #8525 from appwrite/EVDOG4LIFE-patch-2
Permissions + Comment Fix
2024-08-19 15:25:28 -07:00
Matej Bačo d87f47ee3c Improve tests 2024-08-19 14:18:57 +00:00
Christy JacobandGitHub fdd0e2e457 Merge pull request #8557 from appwrite/update-init-copy
chore: Update Init copy
2024-08-19 17:39:37 +04:00
Aditya OberaiandGitHub 11c275fa53 Update Init copy 2024-08-19 19:04:42 +05:30
Bradley SchofieldandGitHub 8780c378e6 Merge branch '1.6.x' into feat-runtime-controls-1.5.x 2024-08-19 20:54:48 +09:00
Bradley Schofield 4e2b95aecc Update to the latest version of the executor 2024-08-19 20:23:59 +09:00
Matej Bačo 32191334c7 Merge remote-tracking branch 'origin/1.6.x' into feat-separate-function-sizes 2024-08-19 11:08:26 +00:00
Matej Bačo 12b6351060 Separate deployment and build sizes 2024-08-19 11:06:58 +00:00
Eldad A. FuxandGitHub cdef3e0cde Merge pull request #8555 from appwrite/fix-env-vars
Fix: Env vars functiosn test
2024-08-19 07:05:34 -04:00
Bradley Schofield 3ed9dd288e Test 8GB 8192MB 2024-08-19 19:12:25 +09:00
Bradley Schofield e37c79cf3c Update to 65534 2024-08-19 18:43:50 +09:00
Christy Jacob c0eefc3b46 Merge branch '1.6.x' of github.com:appwrite/appwrite into update-sdks-1.6 2024-08-19 13:41:01 +04:00
Bradley Schofield 4e5a2f71cc Change self-hosted update to 75K 2024-08-19 18:34:52 +09:00
Bradley Schofield 04e7434932 Address Christy's Comments 2024-08-19 18:07:10 +09:00
Matej BačoandGitHub 06f2f96747 Merge branch '1.6.x' into fix-env-vars 2024-08-19 11:02:12 +02:00
Matej Bačo 7c35464f73 Fix tests 2024-08-19 09:00:56 +00:00
Christy JacobandGitHub f53156a57c Merge pull request #8554 from appwrite/fix-env-vars
Fix missing function variables
2024-08-19 12:59:49 +04:00
Bradley Schofield d52ab783d0 Add specification to response filter 2024-08-19 17:51:16 +09:00
Matej Bačo ef8075f86b Fix missing function variables 2024-08-19 08:50:30 +00:00
Bradley Schofield 0488a4582b Add tests 2024-08-19 14:56:43 +09:00
Bradley Schofield eb7f712379 Sync with 1.6.x changes
- Added migration for `files` metadata size increase
- Disabled `specification` migration until variable runtime specs are ready
- Unset `key` for runtimes in response filters
- Set the correct attribute `scopes` to be optional, reverting it for key and setting it for functions.
2024-08-19 14:52:07 +09:00
Bradley Schofield f4bf57efcb Merge remote-tracking branch 'origin/1.6.x' into feat-runtime-controls-1.5.x
# Conflicts:
#	app/config/specs/open-api3-latest-client.json
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-1.6.x-client.json
#	app/config/specs/swagger2-1.6.x-console.json
#	app/config/specs/swagger2-latest-client.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
2024-08-19 14:05:56 +09:00
Bradley Schofield c97de246f3 Deal with Git name case stuff 2024-08-19 14:02:46 +09:00
Bradley Schofield b855baded2 Add total for getSpecifications 2024-08-19 13:18:45 +09:00
Bradley Schofield 09f1a378dc Merge branch '1.6.x' into feat-runtime-controls-1.5.x
# Conflicts:
#	app/config/specs/swagger2-latest-client.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
2024-08-19 11:57:34 +09:00
Christy JacobandGitHub 07525350b2 Merge pull request #8547 from appwrite/fix-templateBranch-in-request-filter
Default fallback to  for templateBranch
2024-08-18 18:41:48 +04:00
Khushboo VermaandGitHub 9175e39292 Merge branch '1.6.x' into fix-templateBranch-in-request-filter 2024-08-18 20:03:45 +05:30
Christy Jacob 4621a7da74 feat: update sdks 2024-08-18 13:25:08 +04:00
Christy Jacob 77c8ab7e5f feat: update sdks 2024-08-18 13:21:23 +04:00
Christy Jacob 044fac3d2a chore: fix session alerts 2024-08-17 11:01:10 +00:00
EvanandGitHub 19c81aa76f Scan Refactor 2024-08-16 16:21:16 -07:00
Christy Jacob fb55fb1136 chupdate cache buster 2024-08-16 21:15:48 +00:00
Christy Jacob a5ccba7561 chore: update console and specs 2024-08-16 20:58:55 +00:00
Christy JacobandGitHub 94070fdc71 Merge pull request #8542 from appwrite/refactor-changing-function-sdk-types
Refactor changing function sdk types
2024-08-17 00:27:12 +04:00
Binyamin Yawitz f60992e81f chore: matching latest specs 2024-08-16 16:26:20 -04:00
Binyamin Yawitz 2de3803796 Merge branch 'refs/heads/1.6.x' into refactor-changing-function-sdk-types
# Conflicts:
#	app/config/specs/open-api3-latest-client.json
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-latest-client.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
2024-08-16 16:20:30 -04:00
Binyamin Yawitz db359e5892 Merge remote-tracking branch 'origin/refactor-changing-function-sdk-types' into refactor-changing-function-sdk-types 2024-08-16 16:19:59 -04:00
Christy JacobandGitHub 911b152d4f Merge pull request #8485 from appwrite/update-docker-base
chore: update docker base image
2024-08-17 00:16:25 +04:00
Khushboo VermaandGitHub 73819ced1b Merge branch '1.6.x' into fix-templateBranch-in-request-filter 2024-08-16 22:17:30 +05:30
Christy JacobandGitHub b115b6fb67 Merge pull request #8546 from appwrite/fix-seconds-precision-exception
Feat: Add seconds precision to scheduledAt
2024-08-16 20:21:27 +04:00
Khushboo Verma 0960a0cd3c Update tests 2024-08-16 18:01:15 +05:30
Khushboo Verma e36c8786ea Add test for response format 2024-08-16 17:50:19 +05:30
Khushboo Verma f4fb3e3c75 Default fallback to for templateBranch 2024-08-16 17:26:19 +05:30
Matej Bačo d5db9253cd Fix breaking changes in lib 2024-08-16 11:25:01 +00:00
Matej Bačo d17efb0180 Upgrade libs 2024-08-16 11:03:54 +00:00
Matej Bačo 8999c2d3f2 Fix failing tests 2024-08-16 10:17:35 +00:00
Matej Bačo edbef8200e Merge remote-tracking branch 'origin/1.6.x' into fix-seconds-precision-exception 2024-08-16 09:15:10 +00:00
Matej Bačo 894a2bb646 Add seconds precision to scheduledAt 2024-08-16 09:11:13 +00:00
Christy JacobandGitHub a114977100 Merge pull request #8543 from appwrite/fix-anyof-validator-specs
Fix: anyof validator specs
2024-08-16 13:01:05 +04:00
Bradley Schofield 9f52fc4e3b Update to use new database abuse adapter 2024-08-16 08:18:57 +00:00
Bradley Schofield 5e5c8007e2 Merge branch '1.6.x' into feat-renaming-attributes 2024-08-16 15:22:11 +09:00
Bradley Schofield 8770638d71 Implement Renaming Attributes in the API 2024-08-16 15:18:52 +09:00
Bradley Schofield 4128d4f221 Merge 1.6.x into feat-runtime-controls 2024-08-16 04:39:21 +00:00
Christy JacobandGitHub 22a3508c24 Merge pull request #8217 from appwrite/feat-extract-team-deletion
Feat Sync team deletion
2024-08-15 23:51:36 +04:00
Matej Bačo 616123868d Revert unwanted change 2024-08-15 14:30:32 +00:00
Matej Bačo 9bac44850e Upgrade lib 2024-08-15 14:22:19 +00:00
Matej Bačo 92c423f744 Fix specs of AnyOf validator 2024-08-15 12:12:15 +00:00
Christy JacobandGitHub e8f40342b1 Merge pull request #8358 from appwrite/fix-16x-qa
fix: Remaning 1.6 bugs
2024-08-15 14:08:40 +04:00
Matej BačoandGitHub c54daae118 Merge branch '1.6.x' into fix-16x-qa 2024-08-15 11:46:54 +02:00
Matej Bačo 56a43c8f74 PR review changes 2024-08-15 09:10:03 +00:00
Matej Bačo 9619d59a13 Update specs 2024-08-15 09:08:00 +00:00
Christy JacobandGitHub 9416f3c12a Merge pull request #8540 from appwrite/fix-reorder-runtimes
fix: reorder runtimes
2024-08-15 13:05:19 +04:00
Matej Bačo bc83b3e5ed Merge remote-tracking branch 'origin/1.6.x' into fix-16x-qa 2024-08-15 09:02:09 +00:00
Christy JacobandGitHub 78af3ab867 Merge pull request #8527 from appwrite/fix-manual-templates
Fix: Manual templates
2024-08-15 12:55:56 +04:00
Damodar LohaniandGitHub 899ffd4086 Merge pull request #8526 from appwrite/lohanidamodar-patch-4
Trigger functions event only if event is not paused
2024-08-15 10:42:27 +05:45
Bradley SchofieldandGitHub 6b9b1286a4 Merge branch '1.6.x' into feat-runtime-controls-1.5.x 2024-08-15 11:17:50 +09:00
Matej BačoandGitHub f55ae4f485 Merge branch '1.6.x' into refactor-changing-function-sdk-types 2024-08-14 21:58:45 +02:00
Binyamin Yawitz 77329e79e0 feat: generating the latest specs 2024-08-14 14:34:00 -04:00
Binyamin Yawitz b5f55ac5a5 feat: generating latest specs 2024-08-14 14:17:03 -04:00
Binyamin Yawitz cf237d5130 refactor: changing create execution sdk types 2024-08-14 14:16:46 -04:00
Matej Bačo d6676c2e4d Fix tests 2024-08-14 16:35:24 +00:00
Matej Bačo f45f2f127b Merge remote-tracking branch 'origin/1.6.x' into fix-manual-templates 2024-08-14 16:00:34 +00:00
Matej Bačo 9d8c0d37f6 PR review changes 2024-08-14 16:00:13 +00:00
Matej Bačo e7b9218db8 Fix test 2024-08-14 14:52:00 +00:00
Matej Bačo a7df513d33 Faster test 2024-08-14 14:38:41 +00:00
Matej Bačo dae977acd7 Improve test 2024-08-14 14:38:15 +00:00
Christy JacobandGitHub 0d2fbaca45 Merge pull request #8539 from appwrite/fix-header-for-multipart
Add boundary to multipart header
2024-08-14 18:27:02 +04:00
Matej Bačo 839ed27158 Improve failure test logs 2024-08-14 14:19:08 +00:00
Matej Bačo c91bfebbe7 Flaky test improvement 2024-08-14 13:32:15 +00:00
Matej Bačo a7e68836e9 Make flaky test consistent 2024-08-14 13:32:05 +00:00
loks0n bcafec734d fix: reorder templates 2024-08-14 14:11:14 +01:00
Matej Bačo 71840c1f93 Fix tests 2024-08-14 12:58:28 +00:00
Matej Bačo af9acf9f70 Fix tests 2024-08-14 12:50:25 +00:00
Matej Bačo c8e9f2e913 Add template deployment test 2024-08-14 12:14:07 +00:00
Bradley Schofield 3e451c21ae Run Linter 2024-08-14 19:43:16 +09:00
Bradley Schofield 5285ef9939 Merge remote-tracking branch 'origin/1.6.x' into feat-runtime-controls-1.5.x 2024-08-14 19:36:15 +09:00
Matej Bačo b1d6ff4bcc Merge branch 'fix-16x-qa' of https://github.com/appwrite/appwrite into fix-16x-qa 2024-08-14 10:26:13 +00:00
Matej BačoandGitHub 468a540d17 Merge branch '1.6.x' into fix-16x-qa 2024-08-14 12:25:57 +02:00
Matej Bačo 365edae7a9 Fix failing test 2024-08-14 10:12:57 +00:00
Matej Bačo 9964631bb7 Apply new terminology for template branch 2024-08-14 10:01:04 +00:00
Khushboo Verma 59aa5fb7ce Add test for boundary 2024-08-14 15:23:07 +05:30
Matej Bačo 72e4534025 Merge remote-tracking branch 'origin/1.6.x' into fix-manual-templates 2024-08-14 09:50:46 +00:00
Khushboo Verma 95e6f148da Merge branch '1.6.x' into fix-header-for-multipart 2024-08-14 15:12:46 +05:30
Khushboo Verma 60e42c2e07 Add boundary to multipart header 2024-08-14 15:09:55 +05:30
Christy JacobandGitHub b523521434 Merge pull request #8537 from appwrite/1.6.x-update-migration-specifications
Update size to specification for variable runtimes
2024-08-14 12:47:07 +04:00
Matej Bačo 3b20e53818 Merge remote-tracking branch 'origin/1.6.x' into fix-16x-qa 2024-08-14 08:06:10 +00:00
Bradley Schofield 79a757297d Update size to specification for variable runtimes 2024-08-14 11:48:40 +09:00
Christy JacobandGitHub c3199210fa Merge pull request #8528 from appwrite/fix-tempaltes-cors
Fix: Templates CORS
2024-08-14 00:53:30 +04:00
Christy JacobandGitHub bf63ab8f18 Merge pull request #8529 from appwrite/sync-1.6-main
Sync 1.6 with main
2024-08-14 00:09:56 +04:00
Christy Jacob 748c298e06 chore: generate specs 2024-08-13 15:59:04 +00:00
Christy Jacob bfa253297b Merge branch 'main' of https://github.com/appwrite/appwrite into sync-1.6-main 2024-08-13 15:36:13 +00:00
Christy JacobandGitHub 83fe982901 Merge pull request #8509 from appwrite/1.5.x
Sync 1.5.x into main
2024-08-13 19:09:03 +04:00
Matej Bačo c1e62a4e11 Add api group to templates 2024-08-13 12:59:37 +00:00
Matej Bačo 380dc8a106 Fix manual templates 2024-08-13 10:50:58 +00:00
Matej Bačo 6406cb485f Post-merge sync 2024-08-13 09:06:46 +00:00
Matej Bačo 1bf879f16a Merge remote-tracking branch 'origin/main' into fix-16x-qa 2024-08-13 09:05:53 +00:00
Damodar LohaniandGitHub b06cffac45 trigger functions event only if event is not paused 2024-08-13 14:37:06 +05:45
EvanandGitHub 2968e74714 Permissions + Comment Fix 2024-08-12 16:20:49 -07:00
Christy JacobandGitHub 282f5088db Merge pull request #8523 from appwrite/refactor-console-links
Refactor console links
2024-08-13 01:12:31 +04:00
Christy JacobandGitHub 603430a013 Merge pull request #8522 from appwrite/feat-1.5.10-release-prep
Prepare 1.5.10 release
2024-08-13 00:51:33 +04:00
Christy JacobandGitHub 3da1cc69d7 Merge pull request #8484 from appwrite/fix-missing-build-logs
Fix: missing build logs
2024-08-13 00:38:23 +04:00
Binyamin Yawitz 4373e72262 fix: typo 2024-08-12 16:37:49 -04:00
Christy JacobandGitHub 87d6900f48 Merge pull request #8517 from appwrite/fix-deploy-from-git-with-space
Fix deploy from git with space
2024-08-13 00:36:52 +04:00
Binyamin Yawitz fbd55eb17e review: addressing 2024-08-12 16:36:16 -04:00
Binyamin Yawitz aa27a37064 review: addressing 2024-08-12 16:33:00 -04:00
Christy JacobandGitHub 2de6a93b77 Merge pull request #8477 from appwrite/feat-add-multipart-support
Add multipart support
2024-08-13 00:31:45 +04:00
Binyamin Yawitz 0690e05807 chore: Updating console version 2024-08-12 16:27:44 -04:00
Binyamin Yawitz 22deb883c1 refactor: console links 2024-08-12 15:59:42 -04:00
Steven NguyenandGitHub 92fea47bf4 Add 1.5.10 to CHANGES.md 2024-08-12 19:58:25 +00:00
Steven NguyenandGitHub f47af1626c Bump appwrite version to 1.5.10 2024-08-12 19:55:22 +00:00
Steven NguyenandGitHub 672dfd9a26 Merge pull request #8519 from appwrite/fix-8518-migration-stuck
Fix migration stuck at "Starting Data Migration [...]"
2024-08-12 12:54:36 -07:00
Steven NguyenandGitHub e8c303e3cd Merge pull request #8520 from appwrite/chore-bump-console-4.3.30
Bump console to version 4.3.30
2024-08-12 12:50:21 -07:00
Steven NguyenandGitHub 0d451ec123 Bump console to version 4.3.30 2024-08-12 19:44:55 +00:00
Steven NguyenandGitHub a52626e5d3 fix(upgrade): fix migration stuck at "Starting Data Migration [...]"
The iterator was in the loop so it was always reset to null and the
same data set to be scanned.

For cases where this happened, the iterator was not empty, but the keys
returned from the scan was empty. According to [redis](https://redis.io/docs/latest/commands/scan/#number-of-elements-returned-at-every-scan-call),
this is expected behavior.

> SCAN family functions do not guarantee that the number of elements returned per call are in a given range. The commands are also allowed to return zero elements, and the client should not consider the iteration complete as long as the returned cursor is not zero.

As such, we must make sure we're using the new iterator returned to
continue scanning the keys.
2024-08-12 19:34:23 +00:00
Binyamin Yawitz 5bf9794cb2 chore: pint 2024-08-12 15:00:19 -04:00
Binyamin Yawitz 9b79b14821 fix: github cloning and archiving of functions with space 2024-08-12 14:46:12 -04:00
Khushboo Verma cd5a9c5c84 Update proxy version 2024-08-12 23:41:33 +05:30
Khushboo Verma e4cfcd00fd Updated composer.json 2024-08-12 23:17:22 +05:30
Christy JacobandGitHub ad43e1c419 Merge pull request #8412 from appwrite/feat-schedule-execution-improvements
feat: schedule execution improvements
2024-08-12 19:59:56 +04:00
Christy JacobandGitHub 6d7fe6e28d Merge pull request #8452 from appwrite/fix-buckets-metadata
fix: Increasing buckets metadata
2024-08-12 19:10:36 +04:00
Christy JacobandGitHub 856abeb76b Merge pull request #8466 from appwrite/feat-adding-email
Feat changing emails
2024-08-12 19:01:33 +04:00
Binyamin Yawitz c0770621cf fix: reviews 2024-08-12 07:36:15 -04:00
Christy JacobandGitHub 8671609944 Merge pull request #8497 from appwrite/chore-upgrading-logger
chore: Upgrading logger
2024-08-12 15:23:28 +04:00
Christy JacobandGitHub ec56ef9831 Merge pull request #8500 from appwrite/fix-keep-git
Fix keep git
2024-08-12 15:22:00 +04:00
Christy JacobandGitHub 891e709ba2 Merge pull request #8501 from appwrite/feat-adding-email-templates
Feat adding email templates
2024-08-12 14:35:41 +04:00
Christy JacobandGitHub a3238568ed Merge pull request #8515 from appwrite/chore-allow-more-deployment-attributes
Allow deployment queries on type and size
2024-08-12 14:34:56 +04:00
Khushboo Verma 468a97bcd2 Merge branch '1.6.x' into feat-add-multipart-support 2024-08-12 15:39:46 +05:30
Khushboo Verma 285b48a9e8 Replace regex with ctype function 2024-08-12 15:39:35 +05:30
Khushboo Verma 70c0c7707a Add tests for negative size and invalid-string 2024-08-12 15:27:50 +05:30
Khushboo Verma 1a5b5f15b0 Merge branch '1.6.x' into chore-allow-more-deployment-attributes 2024-08-12 15:21:21 +05:30
Khushboo Verma 6f1655a420 Add tests for querying deployments with size and type 2024-08-12 15:20:24 +05:30
Luke B. SilverandGitHub 4b5d8b4102 Merge branch '1.6.x' into feat-schedule-execution-improvements 2024-08-12 10:42:52 +01:00
Christy JacobandGitHub 4f0a265520 Merge pull request #8503 from appwrite/feat-base-runtimes
feat: base runtimes key
2024-08-12 13:41:54 +04:00
Christy JacobandGitHub 70c933f8d8 Merge pull request #8492 from appwrite/feat-dynamic-keys-build
Feat: Dynamic keys in builds
2024-08-12 13:24:30 +04:00
Khushboo Verma 74615f6d1c Merge branch '1.6.x' into chore-allow-more-deployment-attributes 2024-08-12 14:53:16 +05:30
Christy JacobandGitHub 4abb6bcabf Merge pull request #8493 from appwrite/fix-4xx-executions-status
Fix: 4XX execution status
2024-08-12 13:20:33 +04:00
Khushboo Verma 34fc855c8a Allow deployment queries on type and size 2024-08-12 14:49:16 +05:30
Matej BačoandGitHub 47a0998211 Merge branch '1.6.x' into fix-4xx-executions-status 2024-08-12 09:54:55 +02:00
Matej Bačo 1334cf116b Speed up new test 2024-08-12 07:26:20 +00:00
Matej BačoandGitHub e6664fde7a Merge branch '1.6.x' into feat-dynamic-keys-build 2024-08-12 09:20:30 +02:00
Khushboo Verma d895e62c81 Fixed GraphQL tests 2024-08-11 23:06:05 +05:30
Khushboo Verma f6530fd6a5 Simplified headers validator 2024-08-11 18:32:14 +05:30
Khushboo Verma a8973ab26b Improved header tests 2024-08-11 18:15:10 +05:30
Khushboo Verma 8667e9f821 Make application/json as default 2024-08-11 17:56:02 +05:30
Khushboo Verma c8d04c11eb Added more tests to headers validator 2024-08-11 02:25:03 +05:30
Khushboo Verma 2b006ba7af Merge branch '1.6.x' into feat-add-multipart-support 2024-08-10 22:59:31 +05:30
Steven NguyenandGitHub 4dc2b57502 Merge pull request #8507 from appwrite/feat-update-benchmark-comment
Feat update benchmark comment
2024-08-09 17:16:38 -07:00
Steven NguyenandGitHub b5fad9f234 Merge pull request #8505 from appwrite/feat-1.5.9-release-prep
Prepare 1.5.9 release
2024-08-09 14:43:15 -07:00
Christy JacobandGitHub 7669f2c485 Merge pull request #8504 from appwrite/chore-bump-console-4.3.29
Bump console to version 4.3.29
2024-08-10 00:47:06 +04:00
Binyamin Yawitz 6f1e3722bb fix: checking another package 2024-08-09 14:44:51 -04:00
Binyamin Yawitz bd30c9c153 fix: checking other package 2024-08-09 14:19:30 -04:00
Binyamin Yawitz 738b08aab5 fix: Updating benchmark comment instead of a new one 2024-08-09 12:43:05 -04:00
Steven NguyenandGitHub 0a18f77e68 Add 1.5.9 to CHANGES.md 2024-08-09 16:06:02 +00:00
Steven NguyenandGitHub 2b9f3c4638 Bump appwrite version to 1.5.9 2024-08-09 16:06:02 +00:00
Steven NguyenandGitHub 8eb707be2c Bump console to version 4.3.29 2024-08-09 15:53:26 +00:00
Khushboo Verma deeffa2a6b Updated test 2024-08-09 20:38:50 +05:30
Steven NguyenandGitHub ae7b004b26 Merge pull request #8502 from appwrite/chore-bump-executor
Bump executor version from 0.5.5 to 0.5.7
2024-08-09 07:50:39 -07:00
Khushboo VermaandGitHub f3e4987f6c Merge branch '1.6.x' into feat-add-multipart-support 2024-08-09 19:38:26 +05:30
Binyamin Yawitz 24137abd42 fix: Adding otp session email customizing 2024-08-09 09:05:35 -04:00
loks0n 0e773fefdf feat: improve test 2024-08-09 13:10:07 +01:00
loks0n e1c8cfc4a1 chore: refactor $key/$id names 2024-08-09 12:59:43 +01:00
loks0n f6dec62c50 feat: add base/key runtime 2024-08-09 12:56:55 +01:00
loks0n 1024c98bb2 Merge branch 'feat-schedule-execution-improvements' of https://github.com/appwrite/appwrite into feat-schedule-execution-improvements 2024-08-09 11:30:16 +01:00
loks0n 464e1e247c test: fix expect 400 2024-08-09 11:30:01 +01:00
Luke B. SilverandGitHub a1df29d5f6 Merge branch '1.6.x' into feat-schedule-execution-improvements 2024-08-09 10:44:38 +01:00
loks0n 30132e7e93 test: fix body check, not possible 2024-08-09 10:43:08 +01:00
Bradley Schofield a59ba219ad Update specification consts 2024-08-09 17:17:13 +09:00
Steven NguyenandGitHub 6a4fa91aac chore: bump executor version from 0.5.5 to 0.5.7 2024-08-08 22:55:35 +00:00
Steven NguyenandGitHub 324d615536 Merge pull request #8495 from appwrite/fix-migrations
fix: Moving migration to be inside coroutine completely
2024-08-08 15:53:26 -07:00
Steven NguyenandGitHub 71cfdd74f1 Merge pull request #8499 from ItzNotABug/main
Merge `main` to `1.5.x`
2024-08-08 15:51:01 -07:00
Binyamin Yawitz 850052b92f fix: Adding otp session email customizing 2024-08-08 14:30:07 -04:00
Binyamin Yawitz 95fe939136 feat: adding explanation 2024-08-08 13:50:25 -04:00
Binyamin Yawitz 1c6b735a27 feat: disconnecting git only when provider it is an empty string 2024-08-08 13:48:45 -04:00
Christy JacobandGitHub ce438f182c Merge pull request #8496 from appwrite/fix-add-scopes-to-function-template
Add scopes to function template
2024-08-08 18:30:54 +04:00
Khushboo Verma 7cfdf40b47 Fix tests 2024-08-08 19:38:59 +05:30
Binyamin Yawitz 01f27874b2 fix: Addressing review 2024-08-08 10:03:10 -04:00
Binyamin Yawitz 844ec11bd3 Merge branch 'refs/heads/1.6.x' into feat-extract-team-deletion 2024-08-08 09:58:30 -04:00
Binyamin Yawitz 9e81e5fe3c chore: Upgrading logger 2024-08-08 09:53:18 -04:00
Khushboo VermaandGitHub 107c9189b7 Merge branch '1.6.x' into fix-add-scopes-to-function-template 2024-08-08 19:17:10 +05:30
Khushboo Verma caa234f140 Add scopes to function template 2024-08-08 19:15:00 +05:30
Christy JacobandGitHub 07b695fae9 Merge pull request #8459 from appwrite/refactor-session-alerts
refactor: no session alerts for otp and magic-url logins
2024-08-08 17:42:43 +04:00
Binyamin Yawitz 8e7cc6ed14 fix: Moving migration to be inside coroutine completely 2024-08-08 09:25:56 -04:00
Luke B. SilverandGitHub f1013a79e8 Merge branch '1.6.x' into feat-schedule-execution-improvements 2024-08-08 13:32:58 +01:00
Khushboo Verma 516d05402f Merge branch 'feat-add-multipart-support' of github.com:appwrite/appwrite into feat-add-multipart-support 2024-08-08 15:43:35 +05:30
Khushboo Verma e6473db96c Update create execution body limit to 10MB 2024-08-08 15:42:58 +05:30
Matej Bačo 47316a250b Edge case for test case 2024-08-08 09:15:53 +00:00
Matej Bačo 90b9d176ba Fix unit test placement 2024-08-08 09:02:49 +00:00
Matej Bačo bc4a250813 Fix bug in response filter 2024-08-08 08:51:38 +00:00
Matej Bačo a9a6f65f8e Merge remote-tracking branch 'origin/1.6.x' into feat-dynamic-keys-build 2024-08-08 08:50:11 +00:00
Matej Bačo f561311d76 Fix failing test 2024-08-08 08:50:01 +00:00
Matej Bačo f8fb98d377 Update response filter 2024-08-08 08:42:38 +00:00
Matej Bačo b20ee17fea Merge remote-tracking branch 'origin/1.6.x' into fix-4xx-executions-status 2024-08-08 08:38:20 +00:00
Matej Bačo 25f5c83594 Fix 4XX execution status 2024-08-08 08:38:15 +00:00
Khushboo VermaandGitHub e297371aa4 Merge branch '1.6.x' into feat-add-multipart-support 2024-08-08 14:07:12 +05:30
Christy JacobandGitHub 5534c4fddb Merge pull request #8490 from appwrite/fix-deployment-method
Fix: Deployment method
2024-08-08 12:35:23 +04:00
Matej Bačo 5d9804f42a Update 1.6 specs 2024-08-08 08:23:43 +00:00
Khushboo Verma 066dc59064 Update error message 2024-08-08 13:49:33 +05:30
Khushboo Verma 41de522d04 Merge branch '1.6.x' into feat-add-multipart-support 2024-08-08 13:47:11 +05:30
Matej Bačo 5b184236c1 Dynamic keys in builds 2024-08-08 09:38:37 +02:00
Matej Bačo 288e718890 Update specs 2024-08-08 09:11:33 +02:00
Matej Bačo 90c7ab5c05 Rename deployment method 2024-08-08 09:07:27 +02:00
Steven NguyenandGitHub 6410b2062c Merge pull request #8472 from ItzNotABug/fix-proxy-rules-check
Fix Domain Check
2024-08-07 22:17:45 -07:00
Bradley Schofield 9900f998bc Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-08 12:39:56 +09:00
Bradley Schofield 0116c1baf6 Update specs 2024-08-08 11:31:34 +09:00
Bradley Schofield 110b6f7989 Merge branch 'feat-runtime-controls-1.5.x' of https://github.com/appwrite/appwrite into feat-runtime-controls-1.5.x 2024-08-08 11:28:59 +09:00
Bradley Schofield 81efc4aff9 Update test 2024-08-08 11:28:57 +09:00
078b159942 Update src/Appwrite/Platform/Workers/Builds.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-08-08 11:28:03 +09:00
948fbc0916 Update src/Appwrite/Utopia/Response/Model/Func.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-08-08 11:27:49 +09:00
Jake BarnbyandGitHub 314b27493f Merge pull request #8488 from appwrite/1.5.x
Sync 1.5.x into main
2024-08-08 13:28:58 +12:00
Christy JacobandGitHub 1452e168bf Merge pull request #8396 from appwrite/fix-build-size-limits
fix: build size limits
2024-08-08 01:43:44 +04:00
Steven NguyenandGitHub 8f0294f9cb Merge pull request #8361 from appwrite/feat-1.5.8-release-prep
Prepare 1.5.8 release
2024-08-07 13:00:40 -07:00
loks0n b87cabfc49 test: fix unused var 2024-08-07 17:49:03 +01:00
loks0n e2ed0b2693 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into feat-schedule-execution-improvements 2024-08-07 17:43:07 +01:00
loks0n f1b40c69cd Merge branch '1.6.x' of https://github.com/appwrite/appwrite into fix-build-size-limits 2024-08-07 17:31:51 +01:00
loks0n da2c2e6f1d chore: update desc 2024-08-07 17:30:56 +01:00
Matej Bačo 870cbbb019 Add commments 2024-08-07 15:13:24 +00:00
Christy JacobandGitHub f20851e8f7 Merge pull request #8483 from appwrite/fix-template-variable
Add value to variables template
2024-08-07 18:05:34 +04:00
Khushboo Verma 2f56c123c9 Merge branch '1.6.x' into feat-add-multipart-support 2024-08-07 18:46:46 +05:30
Khushboo Verma dcf1684c8c Update dynamic response method 2024-08-07 18:45:53 +05:30
Christy Jacob 9ad86b5711 chore: update docker base image 2024-08-07 13:06:28 +00:00
Christy JacobandGitHub 75e6e2e734 Merge pull request #8422 from appwrite/feat-mock-numbers-review
feat: address review comments
2024-08-07 17:05:33 +04:00
Matej Bačo 8e3fbfc00d Fix missing build logs 2024-08-07 10:53:40 +02:00
Bradley Schofield 2926ae281a Add missing specs and update executor 2024-08-07 17:08:51 +09:00
Khushboo Verma 5eacde84ae Add value to variables template 2024-08-07 00:01:54 +05:30
Khushboo Verma 22853b7b59 Fixed test 2024-08-06 23:49:09 +05:30
Khushboo Verma d4cb90c608 Addressed PR comments 2024-08-06 23:01:09 +05:30
Christy JacobandGitHub 7ca654d35e Merge pull request #8482 from appwrite/chore-bump-console-4.3.27 2024-08-06 21:09:06 +04:00
Steven NguyenandGitHub 203b6e7b56 chore: regenerate latest and 1.5.x specs 2024-08-06 16:14:19 +00:00
Steven NguyenandGitHub 7e13e380f1 Add 1.5.8 to CHANGES.md 2024-08-06 16:14:19 +00:00
Steven NguyenandGitHub d900e88e7e Merge pull request #8416 from appwrite/fix-realtime-permission-change
Fix realtime permission change
2024-08-06 09:12:11 -07:00
Steven NguyenandGitHub ab7f0b1348 Bump console to version 4.3.27 2024-08-06 16:03:53 +00:00
Christy JacobandGitHub a019ada0e7 Merge branch '1.6.x' into feat-mock-numbers-review 2024-08-06 19:32:30 +04:00
Bradley Schofield 9da682ec48 Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-06 18:57:55 +09:00
Bradley Schofield e51f912ab1 Address Jake's comments and add 0.5 cpu spec 2024-08-06 18:54:46 +09:00
Khushboo Verma ccdfc8b1ea Resolve merge conflicts 2024-08-06 14:02:48 +05:30
Khushboo Verma 6691c985dd Add headers validator 2024-08-06 13:49:28 +05:30
Binyamin Yawitz 834fad78e1 refactor: Variables names 2024-08-05 16:20:52 -04:00
Binyamin Yawitz 4ca3ef020f Merge branch 'refs/heads/1.6.x' into refactor-session-alerts
# Conflicts:
#	app/controllers/api/account.php
2024-08-05 16:19:41 -04:00
Binyamin Yawitz 47d1bc44e5 refactor: Variables names 2024-08-05 16:16:59 -04:00
18a519f32d typo
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
2024-08-05 15:46:23 -04:00
e12e28c1f1 typo
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
2024-08-05 15:46:12 -04:00
Christy JacobandGitHub 21ece879b2 Merge pull request #8473 from appwrite/feat-functions-autorestart
Feat: Functions autorestart
2024-08-05 18:11:31 +04:00
Christy JacobandGitHub ad9586e7c7 Merge pull request #8434 from appwrite/fix-redeployments
Fix: function redeployments
2024-08-05 17:38:44 +04:00
Matej BačoandGitHub 9d271effdb Merge branch '1.6.x' into feat-functions-autorestart 2024-08-05 15:27:49 +02:00
Khushboo Verma 6c6ef78238 Resolve conflict 2024-08-05 18:41:35 +05:30
Khushboo Verma 3190384d24 Add multipart support 2024-08-05 18:38:41 +05:30
Christy JacobandGitHub 085efb02c5 Merge pull request #8445 from appwrite/fix-template-tags
Fix: template tags
2024-08-05 17:04:12 +04:00
Christy JacobandGitHub 6120391eb5 Merge pull request #8399 from appwrite/feat-session-alert-improvements
feat: session alert improvements
2024-08-05 13:44:54 +04:00
Bradley Schofield 6415533365 Update Specifications.php 2024-08-05 18:01:28 +09:00
Bradley Schofield 19e7769d8c Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-05 17:38:14 +09:00
Bradley Schofield fb474734fe Ditch using an enum, use class 2024-08-05 16:16:24 +09:00
Bradley Schofield 4c56de8348 Move specification enum into an autoloaded directory 2024-08-05 15:53:09 +09:00
Jake BarnbyandGitHub 8f608e205f Merge pull request #8463 from appwrite/fix-1.5.x-fix-domains-events
Fix queueForUsage not triggering for domain executions
2024-08-05 16:04:18 +12:00
Bradley Schofield 3a91fee41b Run Linter 2024-08-05 12:24:27 +09:00
Bradley Schofield 4801fb816a Fix Tests 2024-08-05 12:21:10 +09:00
Matej Bačo bce06a6178 Supply autorestart to executor 2024-08-03 09:14:19 +00:00
Christy Jacob 32a1aaca24 chore: revertomposer 2024-08-03 07:49:11 +00:00
Christy Jacob 7be4196a58 chore: refactor code 2024-08-03 07:22:34 +00:00
Christy JacobandGitHub 877a6a3f54 Merge pull request #8467 from appwrite/chore-updating-dbip
chore: Upgrading dbip to latest version
2024-08-03 11:02:09 +04:00
ItzNotABug b0441e5465 fix: domain check. 2024-08-03 12:26:21 +05:30
Binyamin Yawitz 2aa1511bbf chore: Upgrading dbip to latest version 2024-08-02 10:19:23 -04:00
Binyamin Yawitz 73ecec099d feat: adding team email and changing base to noreplay 2024-08-02 08:59:47 -04:00
Bradley Schofield eaef82b613 Update functions.php 2024-08-02 17:00:42 +09:00
Bradley Schofield 275ecc9f83 Fix specifications and make builds memory minimum 1024 2024-08-02 16:45:22 +09:00
Bradley Schofield f5571b4caa Add Metric Tests to Domain Executions 2024-08-02 16:24:54 +09:00
Bradley Schofield 906de6a802 Fix queueForUsage not triggering for domain executions 2024-08-02 15:28:39 +09:00
Bradley Schofield aa21a1a200 Update RuntimeSpecification.php 2024-08-02 12:05:07 +09:00
Steven NguyenandGitHub 5ddc705099 Merge pull request #8433 from appwrite/PR_SecurityScan_Action
Adding PR Security Scan
2024-08-01 17:07:24 -07:00
EvanandGitHub 4726c5cec3 Security Scan Refactor 2024-08-01 15:38:15 -07:00
Binyamin Yawitz be1753a198 refactor: no session alerts for otp and magic-url logins 2024-08-01 14:36:21 -04:00
Bradley Schofield 6e5e249e09 Update specs 2024-08-01 19:24:01 +09:00
Bradley Schofield dcbf8356c0 Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-01 19:23:56 +09:00
Bradley Schofield 1574bfdc9a Update functions.php 2024-08-01 18:40:36 +09:00
Bradley Schofield facb1ad174 Cleanup leftovers and use hook for determining billing stuff 2024-08-01 15:30:24 +09:00
Christy JacobandGitHub 0ae40748fe Merge branch '1.6.x' into feat-schedule-execution-improvements 2024-08-01 01:01:43 +04:00
Christy Jacob cf4030095f chore: linter 2024-07-31 20:48:59 +00:00
Christy JacobandGitHub 2686e06e68 Merge branch '1.6.x' into feat-session-alert-improvements 2024-08-01 00:44:39 +04:00
Christy Jacob de1d205341 chore: update changes from merge 2024-07-31 20:43:28 +00:00
Christy Jacob 654b73c966 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into feat-schedule-execution-improvements 2024-07-31 20:41:42 +00:00
Christy JacobandGitHub 58aa2b0571 Merge pull request #8395 from appwrite/migration-clean-cache
Clean projects cache while migrating
2024-07-31 19:31:44 +04:00
Bradley Schofield 2060d3f09c Rename everything to use specification instead of size 2024-07-31 20:27:32 +09:00
shimon 00fc34a2a4 get project db key by region 2024-07-31 13:23:51 +03:00
Bradley Schofield 198a7973c7 Implement Eldad's Suggestions 2024-07-31 15:21:07 +09:00
EvanandGitHub 52c63248dd Update pr-scan.yml 2024-07-30 17:47:42 -07:00
EvanandGitHub ad2e53920f Update pr-scan.yml 2024-07-30 17:46:09 -07:00
Binyamin Yawitz 821d0bee19 feat: Purging collection cache 2024-07-30 20:36:29 -04:00
Binyamin Yawitz 999c2cfac7 fix: reviews 2024-07-30 17:39:32 -04:00
Binyamin Yawitz 1559fec29a fix: Increasing buckets metadata 2024-07-30 16:53:18 -04:00
shimon 29e169fe95 Merge branch '1.5.x' of github.com:appwrite/appwrite into migration-clean-cache 2024-07-30 22:29:35 +03:00
Christy JacobandGitHub e31bae7644 Merge pull request #8449 from appwrite/feat-1.5.x-mbSeconds-2
Move mbSeconds into 1.5.x
2024-07-30 13:25:37 +04:00
Bradley Schofield fddfcac0ea Regenerate Specs 2024-07-30 17:57:06 +09:00
Bradley Schofield f46e210000 Move mbSeconds into 1.5.x 2024-07-30 17:53:28 +09:00
Matej Bačo 85fa7268b5 Upgrade lib version 2024-07-30 07:51:57 +00:00
Matej Bačo e33a035a81 Upgrade lib 2024-07-29 21:01:32 +02:00
Matej Bačo 35a3542a9b Merge branch '1.5.x' into fix-template-tags 2024-07-29 20:00:18 +02:00
Steven NguyenandGitHub d1fbf8f571 Merge pull request #8442 from appwrite/1.5.x-update-migrations
Update lock file with new migrations version
2024-07-29 10:58:28 -07:00
Matej Bačo cb9e5bd0ae Upgrade VCS and support 0.1.x tags 2024-07-29 19:28:15 +02:00
Christy JacobandGitHub 4809f49aeb Merge pull request #8415 from appwrite/feat-strip-mail-vars
Feat strip mail vars
2024-07-29 19:03:27 +04:00
Bradley Schofield 16cd971682 Merge deployments and build storage metrics together 2024-07-29 12:03:41 +09:00
Bradley Schofield 6590d13fca Update lock file 2024-07-29 11:14:17 +09:00
Matej Bačo 75db8946a6 Fix function redeployments 2024-07-25 08:36:11 +00:00
Evan 4034598b1c Adding PR Security Scan 2024-07-24 22:12:07 +00:00
Damodar LohaniandGitHub faf184f86e Merge pull request #8431 from appwrite/fix-calculations
Fix calculations
2024-07-24 18:19:09 +05:45
Damodar LohaniandGitHub e21165f216 Fix file size calculation 2024-07-24 16:21:09 +05:45
Bradley SchofieldandGitHub cb0baee4ad Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-07-24 12:00:17 +09:00
Binyamin Yawitz 4eee8689d3 fixes: Clean URL variables 2024-07-22 09:37:28 -04:00
Christy JacobandGitHub b98102dc46 Merge pull request #8424 from appwrite/feat-add-new-audit-events
Add new audit events
2024-07-22 13:30:56 +04:00
Bradley Schofield 7d2a65f87e Run linter and address more comments 2024-07-22 18:17:38 +09:00
Bradley Schofield f0c1a62aa2 Remove CPU/Memory from document, add envs, add tests 2024-07-22 18:12:43 +09:00
Christy Jacob eb4e259be5 chore: linter 2024-07-22 13:08:02 +04:00
Christy Jacob 7614a356a2 feat: address review comments 2024-07-22 12:55:15 +04:00
Bradley Schofield 3792f816ad Add new audit events 2024-07-22 17:03:53 +09:00
Christy Jacob 98b8e13add feat: address review comments 2024-07-21 23:45:39 +04:00
Christy Jacob 711ca8801a feat: address review comments 2024-07-21 23:30:06 +04:00
shimon 2ef358e8dc linter 2024-07-21 09:27:12 +03:00
shimon 088ef769a5 Merge branch '1.5.x' of github.com:appwrite/appwrite into migration-clean-cache 2024-07-21 09:23:33 +03:00
loks0n 9022606242 Merge branch 'feat-session-alert-improvements' of https://github.com/appwrite/appwrite into feat-session-alert-improvements 2024-07-19 22:19:55 +01:00
loks0n 2060b23379 feat: improve date 2024-07-19 22:19:52 +01:00
Luke B. SilverandGitHub 79aca9f4cd Merge branch '1.6.x' into feat-session-alert-improvements 2024-07-19 21:58:52 +01:00
loks0n 76aaa50ad6 chore: matej suggested test 2024-07-19 10:54:20 +01:00
loks0n 5a56131efa chore: binyamin review 2024-07-19 10:22:50 +01:00
Steven NguyenandGitHub 80769a0b65 fix(realtime): unsubscribe before resubscribing on permission change
Unsubcribe to remove subscriptions related to the old permissions.
2024-07-19 00:06:14 +00:00
Steven NguyenandGitHub 5aa944ee82 fix(realtime): add userId to queueForEvents
In order for realtime to detect and process a changed permission, the
userId param must be set.
2024-07-19 00:02:43 +00:00
Binyamin Yawitz 262c9a10f7 feat: Clean mail variables 2024-07-18 18:09:39 -04:00
Christy JacobandGitHub 4ce737e914 Merge pull request #8408 from appwrite/fix-vsc-deployments-path
fix: Setting `path` for vsc function deployments
2024-07-19 01:30:26 +04:00
loks0n d0a0329cc8 test: smaller sleep 2024-07-18 13:12:39 +01:00
loks0n f02bf6ac5a feat: use coroutines delay system 2024-07-18 13:03:24 +01:00
Luke B. SilverandGitHub 52d9057d1f Merge branch '1.6.x' into feat-session-alert-improvements 2024-07-18 12:35:17 +01:00
Binyamin Yawitz 17c708a056 fix: Setting path for vsc function deployments 2024-07-17 13:44:07 -04:00
loks0n 339a615359 feat: improve description 2024-07-17 10:25:50 +01:00
Bradley Schofield 667b69e146 Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-07-17 17:04:04 +09:00
Jake BarnbyandGitHub 497272622e Merge pull request #8258 from appwrite/feat-sn-implement-deployment-metric
Implement deploymentsStorage metric for projects API
2024-07-17 14:59:44 +12:00
loks0n 67778d5e96 fix: typo 2024-07-16 14:45:34 +01:00
loks0n d765c76576 fix: typo 2024-07-16 14:42:46 +01:00
loks0n 46fa5dbb74 test: update session alert tests 2024-07-16 13:31:32 +01:00
loks0n 20e77a1e9e feat: optimise 2024-07-16 13:03:26 +01:00
loks0n 67ec4b49ed feat: only send after first session 2024-07-16 13:01:23 +01:00
loks0n 612aa1421b feat: improve copy 2024-07-16 12:56:52 +01:00
loks0n 137d81be9e feat: add to templates 2024-07-16 12:49:30 +01:00
Bradley Schofield a57cc0a18e Address Christy's comments 2024-07-16 20:00:00 +09:00
740da0342f Update app/config/runtimes/enum.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-07-16 19:41:47 +09:00
Bradley Schofield 372ad6ce43 Update mbSeconds calculation to use cpu cores 2024-07-16 19:12:40 +09:00
Bradley Schofield 4b1d3b0dfa Run Linter 2024-07-16 19:01:31 +09:00
Bradley Schofield 5f14500e48 Use Enums instead 2024-07-16 18:59:54 +09:00
Luke B. SilverandGitHub 1025c575f6 Merge branch '1.6.x' into fix-build-size-limits 2024-07-16 10:23:44 +01:00
Bradley Schofield 5507233582 Update Tests 2024-07-16 14:31:18 +09:00
Bradley Schofield e3b123d559 Implement Runtime Sizes instead of individual memory and cpu 2024-07-16 14:26:53 +09:00
loks0n 67fa2c9e39 feat: max build size 2024-07-15 10:53:29 +01:00
shimon ada1746466 clean migration project cache 2024-07-15 12:20:01 +03:00
shimon 278fdf5823 clean migration project cache 2024-07-15 12:17:10 +03:00
Jake BarnbyandGitHub 68ea4593ad Merge pull request #8385 from appwrite/feat-gb-hours-1.5.x
Implement MBSeconds Metric on 1.5.X
2024-07-15 18:27:57 +12:00
Bradley Schofield f40d0fd515 Merge branch 'feat-runtime-controls-1.5.x' into feat-gb-hours-1.5.x 2024-07-15 14:11:24 +09:00
Bradley Schofield 59b239c128 Fix synchronous executions 2024-07-15 14:11:08 +09:00
Bradley Schofield 8222aa74ca Merge branch '1.5.x' into feat-sn-implement-deployment-metric 2024-07-15 13:59:47 +09:00
Bradley Schofield a710e9bfe4 Update UsageTest.php 2024-07-15 13:57:36 +09:00
Bradley Schofield 98ae495879 Fix Tests 2024-07-15 12:54:59 +09:00
Bradley Schofield 8ef309a4aa Run Linter 2024-07-15 11:59:02 +09:00
Bradley Schofield fce118ff34 Move GBHours to 1.5.x 2024-07-12 19:02:32 +09:00
Bradley Schofield 387828e3a7 Regenerate Specs 2024-07-12 18:29:06 +09:00
Bradley Schofield 824a70f936 Move Runtime Controls PR to 1.5.x 2024-07-12 18:25:57 +09:00
Steven NguyenandGitHub d98e04cf63 Merge pull request #8381 from appwrite/improve-event-data
improve: events data
2024-07-11 16:43:37 -07:00
Steven NguyenandGitHub 60fd178ea6 Merge pull request #8266 from appwrite/chore-deploy-dotnet
Deploy dotnet
2024-07-11 14:57:23 -07:00
Binyamin Yawitz 0988fd7581 improve: events data 2024-07-11 11:03:28 -04:00
Jake BarnbyandGitHub f17a9357fb Merge pull request #8377 from appwrite/feat-update-migrations
Update Migrations to 0.5
2024-07-10 18:23:08 +12:00
Bradley Schofield d84d227c2b Update Migrations to 0.5 2024-07-10 14:59:31 +09:00
Eldad A. FuxandGitHub 169629de9a Merge pull request #8374 from appwrite/feat-remove-detailed-trace
Remove detailed trace
2024-07-09 23:03:06 -04:00
Jake Barnby e74a5cbf6e Remove detailed trace from error logs 2024-07-09 15:15:03 +12:00
Steven NguyenandGitHub c55cab7dd9 Merge pull request #8363 from appwrite/chore-bump-console-4.3.23
Bump console to version 4.3.23
2024-07-08 19:57:13 -07:00
Matej Bačo e02261d09f Fix download deployment 2024-07-08 10:06:01 +02:00
Steven NguyenandGitHub 555579be92 Bump console to version 4.3.23 2024-07-05 18:46:59 +00:00
Steven NguyenandGitHub f32cfa6827 Merge pull request #8346 from appwrite/update-functions-api
docs: update functions api reference
2024-07-03 21:57:58 -07:00
Steven NguyenandGitHub 343052eb90 Merge pull request #8305 from appwrite/update-acct-api-reference
Documentation: Update Account API Reference
2024-07-03 21:53:33 -07:00
Matej Bačo 8a11183cf8 Fix env var in domain execution 2024-07-03 19:01:00 +02:00
Matej Bačo 2e9436aeae Add missing dynamic key 2024-07-03 18:52:25 +02:00
Torsten DittmannandGitHub 98f0f86fa6 Merge pull request #8352 from appwrite/main
Sync main into 1.5.x
2024-07-03 18:38:41 +02:00
Binyamin Yawitz 363c8a7b9e fix: Sentry scheme 2024-07-03 11:51:58 -04:00
Matej Bačo b9cebae561 Fix activate param 2024-07-03 17:14:59 +02:00
Binyamin Yawitz 46316c08bd fix: Logger version 2024-07-03 10:06:06 -04:00
RichardandGitHub b2468a60f0 Merge branch 'main' into update-functions-api 2024-07-03 09:05:31 -04:00
RichardandGitHub 1539fc2b7c Merge branch 'main' into update-acct-api-reference 2024-07-03 09:04:45 -04:00
Jake BarnbyandGitHub 04ae166e54 Merge branch '1.5.x' into chore-deploy-dotnet 2024-07-03 14:05:48 +12:00
choir27 dc07b5d028 docs: update functions api reference 2024-07-01 15:35:55 -04:00
Binyamin Yawitz 4e4fcc06fd refactor: Project deletion in worker 2024-06-27 18:27:04 -04:00
Binyamin Yawitz 5e14cdef11 test: Testing team delete removes membership 2024-06-26 13:28:41 -04:00
Binyamin Yawitz f8869efa42 test: Testing team delete removes membership 2024-06-26 13:19:41 -04:00
Binyamin Yawitz d113fb2751 test: Testing team delete removes membership 2024-06-26 13:17:08 -04:00
Binyamin Yawitz 93d4efbc0e test: Testing team delete removes membership 2024-06-26 13:08:36 -04:00
Binyamin Yawitz 9b951e86e9 test: Testing team delete removes membership 2024-06-26 13:06:10 -04:00
Binyamin Yawitz 184d76fc9e Merge branch 'refs/heads/1.6.x' into feat-extract-team-deletion 2024-06-26 12:28:12 -04:00
Christy JacobandGitHub 8dbf887ab1 Merge pull request #8324 from appwrite/refactor-usage-sn
Sync refactor-usage-sn into 1.5.x
2024-06-25 22:50:42 +04:00
Christy JacobandGitHub 1a860e846f Merge pull request #8264 from appwrite/fix-cache-client-expires-header
Update Expires header via cache shared api
2024-06-25 21:02:13 +04:00
Torsten DittmannandGitHub 10444ab7c6 Merge pull request #8322 from appwrite/feat-1.5.8-release-prep
Prepare 1.5.8 release
2024-06-25 17:02:27 +02:00
Binyamin Yawitz b849d82772 refactor: Singular 2024-06-25 09:18:17 -04:00
Binyamin Yawitz 9cf0af5b45 refactor: Naming parameters 2024-06-25 09:17:34 -04:00
Binyamin Yawitz d62d5662f6 refactor: Naming parameters 2024-06-25 09:16:27 -04:00
RichardandGitHub e030ec6e3e Merge branch 'main' into update-acct-api-reference 2024-06-25 09:10:57 -04:00
Christy JacobandGitHub b9b48e7b91 Merge pull request #8312 from appwrite/fix-test-for-cl
increase longtext
2024-06-25 15:17:29 +04:00
Steven NguyenandGitHub 0df347d670 chore: regenerate specs 2024-06-25 04:13:38 +00:00
Steven NguyenandGitHub 66bf7086e6 Add 1.5.8 to CHANGES.md 2024-06-25 04:06:28 +00:00
Steven NguyenandGitHub 556d30a9fb Bump appwrite version to 1.5.8 2024-06-25 04:04:14 +00:00
Damodar Lohani d19141fc6a sleep after password change 2024-06-24 07:49:18 +00:00
Damodar Lohani e9cfd0ac8b fix health service test 2024-06-24 06:09:39 +00:00
Damodar Lohani e5af708dbc update health certificate test 2024-06-24 06:02:54 +00:00
Damodar Lohani d33048b792 adding 10 rows 2024-06-24 05:58:29 +00:00
Damodar Lohani 92bc795d7a reset test 2024-06-24 05:07:25 +00:00
Damodar Lohani e88b7742c6 filter 2024-06-24 05:04:51 +00:00
Damodar Lohani 6cf10fa43f partial test 2024-06-24 04:47:32 +00:00
Damodar Lohani 7f8656be6f fix scheme 2024-06-24 04:46:24 +00:00
Damodar Lohani 592ada23d0 increase longtext 2024-06-24 04:45:53 +00:00
choir27 6a406454ba docs: update api reference 2024-06-21 10:41:46 -04:00
shimon 4bedb2f52a Update Expires header via cache shared api 2024-06-13 09:40:36 +03:00
shimon 3f42b03f8e Update Expires header via cache shared api 2024-06-13 09:40:03 +03:00
Jake Barnby df6b39c9d0 Deploy dotnet 2024-06-13 15:01:41 +12:00
shimon d2a2caedbd Update Expires header via cache shared api 2024-06-12 18:42:04 +03:00
Bradley Schofield 9113f265b7 Fix Tests 2024-06-11 06:40:37 +00:00
Bradley Schofield d8b893c7c9 Small fixes 2024-06-11 14:52:21 +09:00
Bradley Schofield 94330cd539 Update Specs 2024-06-11 14:50:03 +09:00
Bradley Schofield 98ca5faef1 Add Tests 2024-06-11 14:36:32 +09:00
Bradley Schofield 83d093805f Implement deploymentsStorage metric for projects API 2024-06-11 14:14:38 +09:00
Binyamin Yawitz 18ca583df8 feat: Deleting teams in sync 2024-05-29 15:52:22 -04:00
56e261023c Update .github/workflows/trivy.yml
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
2024-01-19 12:54:22 +05:30
Steven NguyenandGitHub 84d24504d8 Merge branch 'main' into feature-5232-Trivy-Security-Scan 2023-10-13 16:12:34 -07:00
Akhil AnandandGitHub 1d4fbfdf37 Merge branch 'main' into feature-5232-Trivy-Security-Scan 2023-10-10 18:34:38 +05:30
Akhil Anand 9ce24ff32c feature-5232-Trivy-Security-Scans 2023-10-10 18:28:39 +05:30
4423 changed files with 373810 additions and 8357 deletions
+4 -3
View File
@@ -9,7 +9,8 @@ _APP_CONSOLE_WHITELIST_IPS=
_APP_CONSOLE_COUNTRIES_DENYLIST=AQ
_APP_CONSOLE_HOSTNAMES=localhost,appwrite.io,*.appwrite.io
_APP_SYSTEM_EMAIL_NAME=Appwrite
_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io
_APP_SYSTEM_EMAIL_ADDRESS=noreply@appwrite.io
_APP_SYSTEM_TEAM_EMAIL=team@appwrite.io
_APP_EMAIL_SECURITY=security@appwrite.io
_APP_EMAIL_CERTIFICATES=certificates@appwrite.io
_APP_SYSTEM_RESPONSE_FORMAT=
@@ -68,8 +69,8 @@ _APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000
_APP_FUNCTIONS_TIMEOUT=900
_APP_FUNCTIONS_BUILD_TIMEOUT=900
_APP_FUNCTIONS_CPUS=1
_APP_FUNCTIONS_MEMORY=1024
_APP_FUNCTIONS_CPUS=8
_APP_FUNCTIONS_MEMORY=8192
_APP_FUNCTIONS_INACTIVE_THRESHOLD=600
_APP_FUNCTIONS_MAINTENANCE_INTERVAL=600
_APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes
+47
View File
@@ -0,0 +1,47 @@
name: Nightly Security Scan
on:
schedule:
- cron: '0 0 * * *' # 12am UTC daily runtime
workflow_dispatch:
jobs:
scan-image:
name: Scan Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build the Docker image
run: docker build . -t appwrite_image:latest
- name: Run Trivy vulnerability scanner on image
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: 'appwrite_image:latest'
format: 'sarif'
output: 'trivy-image-results.sarif'
ignore-unfixed: 'false'
severity: 'CRITICAL,HIGH'
- name: Upload Docker Image Scan Results
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-image-results.sarif'
scan-code:
name: Scan Code
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner on filesystem
uses: aquasecurity/trivy-action@0.20.0
with:
scan-type: 'fs'
format: 'sarif'
output: 'trivy-fs-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload Code Scan Results
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-fs-results.sarif'
+105
View File
@@ -0,0 +1,105 @@
name: PR Security Scan
on:
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
scan:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Build the Docker image
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: pr_image:${{ github.sha }}
- name: Run Trivy vulnerability scanner on image
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: 'pr_image:${{ github.sha }}'
format: 'json'
output: 'trivy-image-results.json'
severity: 'CRITICAL,HIGH'
- name: Run Trivy vulnerability scanner on source code
uses: aquasecurity/trivy-action@0.20.0
with:
scan-type: 'fs'
scan-ref: '.'
format: 'json'
output: 'trivy-fs-results.json'
severity: 'CRITICAL,HIGH'
- name: Process Trivy scan results
id: process-results
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
let commentBody = '## Security Scan Results for PR\n\n';
function processResults(results, title) {
let sectionBody = `### ${title}\n\n`;
if (results.Results && results.Results.some(result => result.Vulnerabilities && result.Vulnerabilities.length > 0)) {
sectionBody += '| Package | Version | Vulnerability | Severity |\n';
sectionBody += '|---------|---------|----------------|----------|\n';
const uniqueVulns = new Set();
results.Results.forEach(result => {
if (result.Vulnerabilities) {
result.Vulnerabilities.forEach(vuln => {
const vulnKey = `${vuln.PkgName}-${vuln.InstalledVersion}-${vuln.VulnerabilityID}`;
if (!uniqueVulns.has(vulnKey)) {
uniqueVulns.add(vulnKey);
sectionBody += `| ${vuln.PkgName} | ${vuln.InstalledVersion} | [${vuln.VulnerabilityID}](https://nvd.nist.gov/vuln/detail/${vuln.VulnerabilityID}) | ${vuln.Severity} |\n`;
}
});
}
});
} else {
sectionBody += '🎉 No vulnerabilities found!\n';
}
return sectionBody;
}
try {
const imageResults = JSON.parse(fs.readFileSync('trivy-image-results.json', 'utf8'));
const fsResults = JSON.parse(fs.readFileSync('trivy-fs-results.json', 'utf8'));
commentBody += processResults(imageResults, "Docker Image Scan Results");
commentBody += '\n';
commentBody += processResults(fsResults, "Source Code Scan Results");
} catch (error) {
commentBody += `There was an error while running the security scan: ${error.message}\n`;
commentBody += 'Please contact the core team for assistance.';
}
core.setOutput('comment-body', commentBody);
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Security Scan Results for PR
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
body: ${{ steps.process-results.outputs.comment-body }}
edit-mode: replace
+13 -3
View File
@@ -212,7 +212,17 @@ jobs:
name: benchmark.json
path: benchmark.json
retention-days: 7
- name: Comment on PR
uses: thollander/actions-comment-pull-request@v2
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
filePath: benchmark.txt
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Benchmark results
- name: Comment on PR
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: benchmark.txt
edit-mode: replace
+225
View File
@@ -1,3 +1,228 @@
# Version 1.6.0
## What's Changed
### Notable changes
* Allow execution filter attributes in [#7607](https://github.com/appwrite/appwrite/pull/7607)
* Add dynamic API keys for function executions in [#7512](https://github.com/appwrite/appwrite/pull/7512)
* Add metrics for successful and failed builds in [#8210](https://github.com/appwrite/appwrite/pull/8210)
* Update logging config to use a DSN approach in [#8187](https://github.com/appwrite/appwrite/pull/8187)
* Add projects.createJWT endpoint for dynamic keys in [#8213](https://github.com/appwrite/appwrite/pull/8213)
* Add users.createJWT() endpoint for local function development in [#8207](https://github.com/appwrite/appwrite/pull/8207)
* Added cancel build endpoint in [#7605](https://github.com/appwrite/appwrite/pull/7605)
* Add CLI as a function deployment type in [#8215](https://github.com/appwrite/appwrite/pull/8215)
* Add vcs.getRepositoryContents() endpoint in [#8330](https://github.com/appwrite/appwrite/pull/8330)
* Add appwrite version in function variables in [#8336](https://github.com/appwrite/appwrite/pull/8336)
* Add support for scheduled executions in [#8243](https://github.com/appwrite/appwrite/pull/8243)
* Add endpoint to delete execution in [#8337](https://github.com/appwrite/appwrite/pull/8337)
* OPR v4 support in [#8323](https://github.com/appwrite/appwrite/pull/8323)
* Mock OTP and phone numbers in [#7565](https://github.com/appwrite/appwrite/pull/7565)
* Support scheduled executions in [#8355](https://github.com/appwrite/appwrite/pull/8355)
* Add alert for new sessions in [#8315](https://github.com/appwrite/appwrite/pull/8315)
* Update delete authenticator to remove OTP Validation in [#8367](https://github.com/appwrite/appwrite/pull/8367)
* Track project last activity in [#8366](https://github.com/appwrite/appwrite/pull/8366)
* Containerize the console in [#8406](https://github.com/appwrite/appwrite/pull/8406)
* Implement MBSeconds Metric on 1.5.X in [#8385](https://github.com/appwrite/appwrite/pull/8385)
* Support JWTs without session ID in [#8420](https://github.com/appwrite/appwrite/pull/8420)
* 1.6.x sdks in [#8359](https://github.com/appwrite/appwrite/pull/8359)
* Base migration for 1.6.x in [#8417](https://github.com/appwrite/appwrite/pull/8417)
* 1.6.x migrations and filters in [#8403](https://github.com/appwrite/appwrite/pull/8403)
* Add APPWRITE_REGION in function variables in [#8394](https://github.com/appwrite/appwrite/pull/8394)
* Support dynamic keys for domain executions in [#8428](https://github.com/appwrite/appwrite/pull/8428)
* Bump DBIP to latest version in [#8467](https://github.com/appwrite/appwrite/pull/8467)
* Automatically restart function on crash in [#8473](https://github.com/appwrite/appwrite/pull/8473)
* Don't send session alerts for otp and magic-url logins in [#8459](https://github.com/appwrite/appwrite/pull/8459)
* Mark 4XX executions as successful in [#8493](https://github.com/appwrite/appwrite/pull/8493)
* Add dynamic keys in builds in [#8492](https://github.com/appwrite/appwrite/pull/8492)
* Allow deployment queries on type and size in [#8515](https://github.com/appwrite/appwrite/pull/8515)
* Add OTP email template in [#8501](https://github.com/appwrite/appwrite/pull/8501)
* Update console links in [#8523](https://github.com/appwrite/appwrite/pull/8523)
* Add multipart support in [#8477](https://github.com/appwrite/appwrite/pull/8477)
* Separate deployment sizes in [#8556](https://github.com/appwrite/appwrite/pull/8556)
* Add go runtime in [#8572](https://github.com/appwrite/appwrite/pull/8572)
* Add react native platform in [#8562](https://github.com/appwrite/appwrite/pull/8562)
* Merge deployments and build storage metrics together in API in [#8443](https://github.com/appwrite/appwrite/pull/8443)
* Support string attribute resizing in [#8597](https://github.com/appwrite/appwrite/pull/8597)
* Support renaming attributes in [#8544](https://github.com/appwrite/appwrite/pull/8544)
* Add VCS vars to deployments & executions in [#8631](https://github.com/appwrite/appwrite/pull/8631)
* Function storage metrics in [#8668](https://github.com/appwrite/appwrite/pull/8668)
* External messaging usage count in [#8672](https://github.com/appwrite/appwrite/pull/8672)
### Fixes
* Fix execution duration in [#8357](https://github.com/appwrite/appwrite/pull/8357)
* Fix file size calculations in [#8432](https://github.com/appwrite/appwrite/pull/8432)
* Fix disabled function logging in [#8398](https://github.com/appwrite/appwrite/pull/8398)
* Fix function redeployments in [#8434](https://github.com/appwrite/appwrite/pull/8434)
* Add value to variables template in [#8483](https://github.com/appwrite/appwrite/pull/8483)
* Fix build size limits in [#8396](https://github.com/appwrite/appwrite/pull/8396)
* Fix deployment method name in [#8490](https://github.com/appwrite/appwrite/pull/8490)
* Fix function disconnecting from git in [#8500](https://github.com/appwrite/appwrite/pull/8500)
* Increase buckets metadata in [#8452](https://github.com/appwrite/appwrite/pull/8452)
* Fix deploy from git with space in [#8517](https://github.com/appwrite/appwrite/pull/8517)
* Fix missing build logs in [#8484](https://github.com/appwrite/appwrite/pull/8484)
* Delete team memberships synchronously in [#8217](https://github.com/appwrite/appwrite/pull/8217)
* Fix Anyof validator in specs in [#8543](https://github.com/appwrite/appwrite/pull/8543)
* Fix missing function variables in [#8554](https://github.com/appwrite/appwrite/pull/8554)
* Fix deadlock in [#8609](https://github.com/appwrite/appwrite/pull/8609)
* Fix domain execution stats in [#8608](https://github.com/appwrite/appwrite/pull/8608)
* Update console redirect to include query params in [#8619](https://github.com/appwrite/appwrite/pull/8619)
* Update abuse-key for mfa challenge endpoints in [#8649](https://github.com/appwrite/appwrite/pull/8649)
* Fix cross-project scheduler stability in [#8641](https://github.com/appwrite/appwrite/pull/8641)
* Fix vcs deployment size in [#8640](https://github.com/appwrite/appwrite/pull/8640)
* Fix logging behaviour for Functions in [#8627](https://github.com/appwrite/appwrite/pull/8627)
* Add retention env vars to deletes worker in [#8662](https://github.com/appwrite/appwrite/pull/8662)
* Fix scheduled executions data in [#8639](https://github.com/appwrite/appwrite/pull/8639)
### Miscellaneous
* Sync 1.6.x with main in [#8163](https://github.com/appwrite/appwrite/pull/8163)
* Remove build ID from rebuild deployment endpoint in [#8214](https://github.com/appwrite/appwrite/pull/8214)
* 1.6.x specs in [#8304](https://github.com/appwrite/appwrite/pull/8304)
* Sync with main in [#8295](https://github.com/appwrite/appwrite/pull/8295)
* Fix 1.6.x failing tests in [#8333](https://github.com/appwrite/appwrite/pull/8333)
* Ensure CI/CD works in [#8350](https://github.com/appwrite/appwrite/pull/8350)
* Update specs in [#8356](https://github.com/appwrite/appwrite/pull/8356)
* Sync main to 1.6.x in [#8430](https://github.com/appwrite/appwrite/pull/8430)
* Add scheduledAt in execution response model in [#8425](https://github.com/appwrite/appwrite/pull/8425)
* Move functions marketplace to appwrite in [#8427](https://github.com/appwrite/appwrite/pull/8427)
* Refactor deployment check in function tests in [#8444](https://github.com/appwrite/appwrite/pull/8444)
* Add ci/cd benchmark in [#8414](https://github.com/appwrite/appwrite/pull/8414)
* Upgrade SDK version in [#8465](https://github.com/appwrite/appwrite/pull/8465)
* Improve session alert in [#8399](https://github.com/appwrite/appwrite/pull/8399)
* Address review comments in [#8422](https://github.com/appwrite/appwrite/pull/8422)
* Add scopes to function template in [#8496](https://github.com/appwrite/appwrite/pull/8496)
* Update benchmark comment in [#8507](https://github.com/appwrite/appwrite/pull/8507)
* Add key to runtime model in [#8503](https://github.com/appwrite/appwrite/pull/8503)
* Upgrade logger in [#8497](https://github.com/appwrite/appwrite/pull/8497)
* Change default email addresses in [#8466](https://github.com/appwrite/appwrite/pull/8466)
* Improve scheduled executions in [#8412](https://github.com/appwrite/appwrite/pull/8412)
* Sync 1.5.x into main in [#8509](https://github.com/appwrite/appwrite/pull/8509)
* Sync 1.6 with main in [#8529](https://github.com/appwrite/appwrite/pull/8529)
* Fix templates CORS in [#8528](https://github.com/appwrite/appwrite/pull/8528)
* Update size to specification for variable runtimes in [#8537](https://github.com/appwrite/appwrite/pull/8537)
* Add boundary to multipart header in [#8539](https://github.com/appwrite/appwrite/pull/8539)
* Support manual templates in [#8527](https://github.com/appwrite/appwrite/pull/8527)
* Reorder runtimes in [#8540](https://github.com/appwrite/appwrite/pull/8540)
* Fix 1.6 bugs in [#8358](https://github.com/appwrite/appwrite/pull/8358)
* Add seconds precision to scheduledAt in [#8546](https://github.com/appwrite/appwrite/pull/8546)
* Update docker base image in [#8485](https://github.com/appwrite/appwrite/pull/8485)
* Update create execution return type in [#8542](https://github.com/appwrite/appwrite/pull/8542)
* Default fallback to for templateBranch in [#8547](https://github.com/appwrite/appwrite/pull/8547)
* Fix env vars functions test in [#8555](https://github.com/appwrite/appwrite/pull/8555)
* Fix session alerts in [#8550](https://github.com/appwrite/appwrite/pull/8550)
* Add runtime controls in [#8384](https://github.com/appwrite/appwrite/pull/8384)
* Revert request type to json in create execution in [#8563](https://github.com/appwrite/appwrite/pull/8563)
* Sync 1.6.x Filters and Migrations with latest in [#8553](https://github.com/appwrite/appwrite/pull/8553)
* Update sdks in [#8551](https://github.com/appwrite/appwrite/pull/8551)
* Update Docs in [#8567](https://github.com/appwrite/appwrite/pull/8567)
* Headers validator benchmark in [#8561](https://github.com/appwrite/appwrite/pull/8561)
* Fix go version in [#8571](https://github.com/appwrite/appwrite/pull/8571)
* Update dependencies in [#8574](https://github.com/appwrite/appwrite/pull/8574)
* Upgrade console in [#8575](https://github.com/appwrite/appwrite/pull/8575)
* 1.6.x logging test in [#8580](https://github.com/appwrite/appwrite/pull/8580)
* Bump console sdk in [#8581](https://github.com/appwrite/appwrite/pull/8581)
* Update sdks in [#8582](https://github.com/appwrite/appwrite/pull/8582)
* Add changelogs for dart and flutter in [#8587](https://github.com/appwrite/appwrite/pull/8587)
* Add payload validator in [#8594](https://github.com/appwrite/appwrite/pull/8594)
* Update geodb in [#8615](https://github.com/appwrite/appwrite/pull/8615)
* Update createdeployment methodtype to upload in [#8616](https://github.com/appwrite/appwrite/pull/8616)
* Remove tenant in document filter in [#8624](https://github.com/appwrite/appwrite/pull/8624)
* Improve mail datetime format in [#8628](https://github.com/appwrite/appwrite/pull/8628)
* Fix router function execution logging in [#8625](https://github.com/appwrite/appwrite/pull/8625)
* Add Functions templates async test in [#8622](https://github.com/appwrite/appwrite/pull/8622)
* Update console in [#8629](https://github.com/appwrite/appwrite/pull/8629)
* 1.6.1 in [#8630](https://github.com/appwrite/appwrite/pull/8630)
* Update version in [#8646](https://github.com/appwrite/appwrite/pull/8646)
* Phone auth metric rename in [#8648](https://github.com/appwrite/appwrite/pull/8648)
* Pretty print specs in [#8643](https://github.com/appwrite/appwrite/pull/8643)
* Fix messaging metrics in [#8674](https://github.com/appwrite/appwrite/pull/8674)
* Bump console to 5.0.6 in [#8585](https://github.com/appwrite/appwrite/pull/8585)
# Version 1.5.10
## What's Changed
### Notable changes
* Bump console to version 4.3.30 in [#8520](https://github.com/appwrite/appwrite/pull/8520)
### Fixes
* Fix migration stuck at "Starting Data Migration [...]" in [#8519](https://github.com/appwrite/appwrite/pull/8519)
# Version 1.5.9
## What's Changed
### Notable changes
* Add Darija (Moroccan Arabic) translation file in [7501](https://github.com/appwrite/appwrite/pull/7501)
* Bump console to version 4.3.29 in [8504](https://github.com/appwrite/appwrite/pull/8504)
### Fixes
* Fix domain check in [8472](https://github.com/appwrite/appwrite/pull/8472)
* Fix "API must be called in the coroutine" in [8495](https://github.com/appwrite/appwrite/pull/8495)
* Bump executor version from 0.5.5 to 0.5.7 in [8502](https://github.com/appwrite/appwrite/pull/8502)
### Miscellaneous
* Add profiler for debugging in [8397](https://github.com/appwrite/appwrite/pull/8397)
* Document APIs that don't support redirects in [8233](https://github.com/appwrite/appwrite/pull/8233)
# Version 1.5.8
## What's Changed
### Notable changes
* Support Twilio messaging service SID in [8222](https://github.com/appwrite/appwrite/pull/8222)
* Improve cache performance in [8230](https://github.com/appwrite/appwrite/pull/8230)
* Add hk in translations in [8179](https://github.com/appwrite/appwrite/pull/8179)
* Update pwd abuse in [8255](https://github.com/appwrite/appwrite/pull/8255)
* Remove detailed trace in [8374](https://github.com/appwrite/appwrite/pull/8374)
* Remove relationship attributes from realtime event payloads in [8381](https://github.com/appwrite/appwrite/pull/8381)
* Sanitize URLs in emails in [8415](https://github.com/appwrite/appwrite/pull/8415)
* Bump console to version 4.3.27 in [8482](https://github.com/appwrite/appwrite/pull/8482)
### Fixes
* Ensure usage is counted for errors in [8120](https://github.com/appwrite/appwrite/pull/8120)
* Fix MFA for OAuth2 only accounts in [8245](https://github.com/appwrite/appwrite/pull/8245)
* Delete Expired Targets Per Project in [8239](https://github.com/appwrite/appwrite/pull/8239)
* Don't set the target field if the existing target document is false in [8236](https://github.com/appwrite/appwrite/pull/8236)
* Disable validation for project DBs during migration in [8298](https://github.com/appwrite/appwrite/pull/8298)
* Add `default` to Collection Attributes in Migration in [8271](https://github.com/appwrite/appwrite/pull/8271)
* Fix Create bucket endpoint validator for maximum file size in [8275](https://github.com/appwrite/appwrite/pull/8275)
* Disable validation for subquery to prevent error in [8297](https://github.com/appwrite/appwrite/pull/8297)
* Fix 'Missing required attribute "expire"' on `users.createSession()` in [8308](https://github.com/appwrite/appwrite/pull/8308)
* Fix certificate emails in [8292](https://github.com/appwrite/appwrite/pull/8292)
* Fix browser-cached deleted file in [8264](https://github.com/appwrite/appwrite/pull/8264)
* Fix migration of firebase users [8377](https://github.com/appwrite/appwrite/pull/8377)
* Fix `path` for vcs function deployments in [8408](https://github.com/appwrite/appwrite/pull/8408)
* Fix calculations in [8431](https://github.com/appwrite/appwrite/pull/8431)
* Fix bugs with migrations in [8442](https://github.com/appwrite/appwrite/pull/8442)
* Fix queueForUsage not triggering for domain executions in [8463](https://github.com/appwrite/appwrite/pull/8463)
* Fix realtime permission change in [8416](https://github.com/appwrite/appwrite/pull/8416)
### Miscellaneous
* Bump base image from 0.9.0 to 0.9.1 in [8238](https://github.com/appwrite/appwrite/pull/8238)
* Use latest Platform and add Core module in [7936](https://github.com/appwrite/appwrite/pull/7936)
* Add Test to Validate Headers aren't Overridden in [8228](https://github.com/appwrite/appwrite/pull/8228)
* Fix hyperlink in storage docs in [8269](https://github.com/appwrite/appwrite/pull/8269)
* Update cache & database in [8285](https://github.com/appwrite/appwrite/pull/8285)
* Fix flaky certificate test in [8316](https://github.com/appwrite/appwrite/pull/8316)
* Fix flaky function test in [8317](https://github.com/appwrite/appwrite/pull/8317)
* Update account API reference in [8305](https://github.com/appwrite/appwrite/pull/8305)
* Update functions API reference in [8346](https://github.com/appwrite/appwrite/pull/8346)
* Implement deploymentsStorage metric for projects API in [8258](https://github.com/appwrite/appwrite/pull/8258)
* Add new audit events in [8424](https://github.com/appwrite/appwrite/pull/8424)
* Move mbSeconds into 1.5.x in [8449](https://github.com/appwrite/appwrite/pull/8449)
* Clean projects cache while migrating in [8395](https://github.com/appwrite/appwrite/pull/8395)
* Use git tags for function template in [8445](https://github.com/appwrite/appwrite/pull/8445)
# Version 1.5.7
## What's Changed
+6
View File
@@ -553,6 +553,12 @@ To run end-2-end tests for a specific service use:
docker compose exec appwrite test /usr/src/code/tests/e2e/Services/[ServiceName]
```
To run one specific test:
```bash
docker compose exec appwrite vendor/bin/phpunit --filter [FunctionName]
```
## Benchmarking
You can use WRK Docker image to benchmark the server performance. Benchmarking is extremely useful when you want to compare how the server behaves before and after a change has been applied. Replace [APPWRITE_HOSTNAME_OR_IP] with your Appwrite server hostname or IP. Note that localhost is not accessible from inside the WRK container.
+2 -2
View File
@@ -1,4 +1,4 @@
FROM composer:2.0 as composer
FROM composer:2.0 AS composer
ARG TESTING=false
ENV TESTING=$TESTING
@@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
FROM appwrite/base:0.9.1 as final
FROM appwrite/base:0.9.3 AS final
LABEL maintainer="team@appwrite.io"
+3 -3
View File
@@ -67,7 +67,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.5.7
appwrite/appwrite:1.6.0
```
### Windows
@@ -79,7 +79,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.5.7
appwrite/appwrite:1.6.0
```
#### PowerShell
@@ -89,7 +89,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.5.7
appwrite/appwrite:1.6.0
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
+10 -4
View File
@@ -1,4 +1,4 @@
> Our Appwrite Init event has concluded. You can check out all the new and upcoming features [on our Init website](https://appwrite.io/init) 🚀
> Appwrite Init has concluded! You can check out all the latest announcements [on our Init website](https://appwrite.io/init) 🚀
<br />
<p align="center">
@@ -75,7 +75,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.5.7
appwrite/appwrite:1.6.0
```
### Windows
@@ -87,7 +87,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.5.7
appwrite/appwrite:1.6.0
```
#### PowerShell
@@ -97,7 +97,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.5.7
appwrite/appwrite:1.6.0
```
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.
@@ -134,6 +134,12 @@ Choose from one of the providers below:
<br /><sub><b>Akamai Compute</b></sub></a>
</a>
</td>
<td align="center" width="100" height="100">
<a href="https://aws.amazon.com/marketplace/pp/prodview-2hiaeo2px4md6">
<img width="50" height="39" src="public/images/integrations/aws-logo.svg" alt="AWS Logo" />
<br /><sub><b>AWS Marketplace</b></sub></a>
</a>
</td>
</tr>
</table>
Binary file not shown.
Binary file not shown.
+7 -2
View File
@@ -1,12 +1,12 @@
<?php
require_once __DIR__ . '/init.php';
require_once __DIR__ . '/controllers/general.php';
use Appwrite\Event\Certificate;
use Appwrite\Event\Delete;
use Appwrite\Event\Func;
use Appwrite\Platform\Appwrite;
use Appwrite\Runtimes\Runtimes;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
use Utopia\CLI\CLI;
@@ -23,6 +23,12 @@ use Utopia\Queue\Connection;
use Utopia\Registry\Registry;
use Utopia\System\System;
// overwriting runtimes to be architectur agnostic for CLI
Config::setParam('runtimes', (new Runtimes('v4'))->getAll(supported: false));
// require controllers after overwriting runtimes
require_once __DIR__ . '/controllers/general.php';
Authorization::disable();
CLI::setResource('register', fn () => $register);
@@ -185,7 +191,6 @@ CLI::setResource('logError', function (Registry $register) {
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->setAction($action);
+17 -6
View File
@@ -3055,14 +3055,25 @@ $projectCollections = array_merge([
'default' => null,
'filters' => [],
],
[
'array' => false,
'$id' => ID::custom('specification'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => false,
'required' => false,
'default' => APP_FUNCTION_SPECIFICATION_DEFAULT,
'filters' => [],
],
[
'$id' => ID::custom('scopes'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => true,
'default' => null,
'required' => false,
'default' => [],
'array' => true,
'filters' => [],
],
@@ -4677,7 +4688,7 @@ $consoleCollections = array_merge([
'$id' => ID::custom('type'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
@@ -4784,8 +4795,8 @@ $consoleCollections = array_merge([
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => [],
'required' => true,
'default' => null,
'array' => true,
'filters' => [],
],
@@ -5772,7 +5783,7 @@ $bucketCollections = [
'$id' => ID::custom('metadata'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384, // https://tools.ietf.org/html/rfc4288#section-4.2
'size' => 75000, // https://tools.ietf.org/html/rfc4288#section-4.2
'signed' => true,
'required' => false,
'default' => null,
+5
View File
@@ -699,6 +699,11 @@ return [
'description' => 'The relationship value is invalid.',
'code' => 400,
],
Exception::ATTRIBUTE_INVALID_RESIZE => [
'name' => Exception::ATTRIBUTE_INVALID_RESIZE,
'description' => "Existing data is too large for new size, truncate your existing data then try again.",
'code' => 400,
],
/** Indexes */
Exception::INDEX_NOT_FOUND => [
+127 -107
View File
@@ -5,14 +5,6 @@ const TEMPLATE_RUNTIMES = [
'name' => 'node',
'versions' => ['21.0', '20.0', '19.0', '18.0', '16.0', '14.5']
],
'PHP' => [
'name' => 'php',
'versions' => ['8.3', '8.2', '8.1', '8.0']
],
'RUBY' => [
'name' => 'ruby',
'versions' => ['3.3', '3.2', '3.1', '3.0']
],
'PYTHON' => [
'name' => 'python',
'versions' => ['3.12', '3.11', '3.10', '3.9', '3.8']
@@ -21,14 +13,22 @@ const TEMPLATE_RUNTIMES = [
'name' => 'dart',
'versions' => ['3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16', '2.16']
],
'GO' => [
'name' => 'go',
'versions' => ['1.23']
],
'PHP' => [
'name' => 'php',
'versions' => ['8.3', '8.2', '8.1', '8.0']
],
'BUN' => [
'name' => 'bun',
'versions' => ['1.0']
],
'GO' => [
'name' => 'go',
'versions' => ['1.22']
]
'RUBY' => [
'name' => 'ruby',
'versions' => ['3.3', '3.2', '3.1', '3.0']
],
];
function getRuntimes($runtime, $commands, $entrypoint, $providerRootDirectory, $versionsDenyList = [])
@@ -59,13 +59,6 @@ return [
'useCases' => ['starter'],
'runtimes' => [
...getRuntimes(TEMPLATE_RUNTIMES['NODE'], 'npm install', 'src/main.js', 'node/starter'),
...getRuntimes(
TEMPLATE_RUNTIMES['PHP'],
'composer install',
'src/index.php',
'php/starter'
),
...getRuntimes(TEMPLATE_RUNTIMES['RUBY'], 'bundle install', 'lib/main.rb', 'ruby/starter'),
...getRuntimes(
TEMPLATE_RUNTIMES['PYTHON'],
'pip install -r requirements.txt',
@@ -73,16 +66,23 @@ return [
'python/starter'
),
...getRuntimes(TEMPLATE_RUNTIMES['DART'], 'dart pub get', 'lib/main.dart', 'dart/starter'),
...getRuntimes(TEMPLATE_RUNTIMES['GO'], '', 'main.go', 'go/starter'),
...getRuntimes(
TEMPLATE_RUNTIMES['PHP'],
'composer install',
'src/index.php',
'php/starter'
),
...getRuntimes(TEMPLATE_RUNTIMES['BUN'], 'bun install', 'src/main.ts', 'bun/starter'),
...getRuntimes(TEMPLATE_RUNTIMES['GO'], '', 'main.go', 'go/starter')
...getRuntimes(TEMPLATE_RUNTIMES['RUBY'], 'bundle install', 'lib/main.rb', 'ruby/starter'),
],
'instructions' => 'For documentation and instructions check out <a target="_blank" rel="noopener noreferrer" class="link" href="https://github.com/appwrite/templates/tree/main/node/starter">file</a>.',
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [],
'scopes' => ["users.read"]
'scopes' => ['users.read']
],
[
'icon' => 'icon-upstash',
@@ -106,7 +106,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'UPSTASH_URL',
@@ -125,7 +125,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-redis',
@@ -149,7 +150,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'REDIS_HOST',
@@ -167,7 +168,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-neo4j',
@@ -191,7 +193,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'NEO4J_URI',
@@ -217,7 +219,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-mongodb',
@@ -242,7 +245,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'MONGO_URI',
@@ -253,7 +256,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-neon',
@@ -278,7 +282,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'PGHOST',
@@ -320,7 +324,8 @@ return [
'required' => true,
'type' => 'text'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-open-ai',
@@ -362,7 +367,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'OPENAI_API_KEY',
@@ -380,7 +385,8 @@ return [
'required' => false,
'type' => 'number'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-discord',
@@ -416,7 +422,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'DISCORD_PUBLIC_KEY',
@@ -442,7 +448,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-perspective-api',
@@ -466,7 +473,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'PERSPECTIVE_API_KEY',
@@ -476,7 +483,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-pangea',
@@ -513,7 +521,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'PANGEA_REDACT_TOKEN',
@@ -523,7 +531,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-document',
@@ -542,8 +551,9 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'variables' => []
'providerVersion' => '0.2.*',
'variables' => [],
'scopes' => []
],
[
'icon' => 'icon-github',
@@ -568,7 +578,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'GITHUB_TOKEN',
@@ -586,7 +596,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-bookmark',
@@ -610,7 +621,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -637,7 +648,7 @@ return [
'type' => 'url'
]
],
'scopes' => ["databases.read", "databases.write", "collections.write", "attributes.write", "documents.read", "documents.write"]
'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write']
],
[
'icon' => 'icon-algolia',
@@ -673,7 +684,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -718,7 +729,7 @@ return [
'type' => 'password'
],
],
'scopes' => ["databases.read", "collections.read", "documents.read"]
'scopes' => ['databases.read', 'collections.read', 'documents.read']
],
[
'icon' => 'icon-meilisearch',
@@ -766,7 +777,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -811,7 +822,7 @@ return [
'type' => 'text'
],
],
'scopes' => ["databases.read", "collections.read", "documents.read"]
'scopes' => ['databases.read', 'collections.read', 'documents.read']
],
[
'icon' => 'icon-vonage',
@@ -836,6 +847,12 @@ return [
'src/main.py',
'python/whatsapp_with_vonage'
),
...getRuntimes(
TEMPLATE_RUNTIMES['DART'],
'dart pub get',
'lib/main.dart',
'dart/whatsapp-with-vonage'
),
...getRuntimes(
TEMPLATE_RUNTIMES['PHP'],
'composer install',
@@ -843,10 +860,10 @@ return [
'php/whatsapp-with-vonage'
),
...getRuntimes(
TEMPLATE_RUNTIMES['DART'],
'dart pub get',
'lib/main.dart',
'dart/whatsapp-with-vonage'
TEMPLATE_RUNTIMES['BUN'],
'bun install',
'src/main.ts',
'bun/whatsapp-with-vonage'
),
...getRuntimes(
TEMPLATE_RUNTIMES['RUBY'],
@@ -854,18 +871,12 @@ return [
'lib/main.rb',
'ruby/whatsapp-with-vonage'
),
...getRuntimes(
TEMPLATE_RUNTIMES['BUN'],
'bun install',
'src/main.ts',
'bun/whatsapp-with-vonage'
)
],
'instructions' => 'For documentation and instructions check out <a target="_blank" rel="noopener noreferrer" class="link" href="https://github.com/appwrite/templates/tree/main/node/whatsapp-with-vonage">file</a>.',
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'VONAGE_API_KEY',
@@ -896,7 +907,8 @@ return [
'required' => true,
'type' => 'phone'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-bell',
@@ -920,7 +932,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'FCM_PROJECT_ID',
@@ -951,7 +963,8 @@ return [
'required' => true,
'type' => 'url'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-mail',
@@ -987,7 +1000,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'SMTP_HOST',
@@ -1033,7 +1046,8 @@ return [
'required' => false,
'type' => 'text'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-stripe',
@@ -1057,7 +1071,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'STRIPE_SECRET_KEY',
@@ -1074,7 +1088,7 @@ return [
'type' => 'password'
]
],
'scopes' => ["users.read", "sessions.write", "users.write"]
'scopes' => ['users.read', 'sessions.write', 'users.write']
],
[
'icon' => 'icon-stripe',
@@ -1098,7 +1112,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'STRIPE_SECRET_KEY',
@@ -1131,7 +1145,7 @@ return [
'type' => 'text'
]
],
'scopes' => ["databases.read", "databases.write", "collections.write", "attributes.write", "documents.read", "documents.write"]
'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write']
],
[
'icon' => 'icon-chat',
@@ -1155,7 +1169,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'HUGGINGFACE_ACCESS_TOKEN',
@@ -1164,7 +1178,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-translate',
@@ -1188,7 +1203,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'HUGGINGFACE_ACCESS_TOKEN',
@@ -1197,7 +1212,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-eye',
@@ -1221,7 +1237,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -1255,7 +1271,7 @@ return [
'type' => 'password'
]
],
'scopes' => ["databases.read", "databases.write", "collections.read", "collections.write", "attributes.write", "documents.read", "documents.write", "buckets.read", "buckets.write", "files.read"]
'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read']
],
[
'icon' => 'icon-eye',
@@ -1279,7 +1295,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -1313,7 +1329,7 @@ return [
'type' => 'password'
]
],
"scopes" => ["databases.read", "databases.write", "collections.read", "collections.write", "attributes.write", "documents.read", "documents.write", "buckets.read", "buckets.write", "files.read"]
'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read']
],
[
'icon' => 'icon-text',
@@ -1337,7 +1353,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -1371,7 +1387,7 @@ return [
'type' => 'password'
]
],
"scopes" => ["databases.read", "databases.write", "collections.read", "collections.write", "attributes.write", "documents.read", "documents.write", "buckets.read", "buckets.write", "files.read"]
'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read']
],
[
'icon' => 'icon-chat',
@@ -1395,7 +1411,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -1429,7 +1445,7 @@ return [
'type' => 'password'
]
],
"scopes" => ["buckets.read", "buckets.write", "files.read", "files.write"]
'scopes' => ['buckets.read', 'buckets.write', 'files.read', 'files.write']
],
[
'icon' => 'icon-chip',
@@ -1453,7 +1469,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'REPLICATE_API_KEY',
@@ -1463,7 +1479,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-chip',
@@ -1487,7 +1504,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'TOGETHER_API_KEY',
@@ -1505,7 +1522,7 @@ return [
'type' => 'text'
]
],
"scopes" => ["buckets.write", "files.read", "files.write"]
'scopes' => ['buckets.write', 'files.read', 'files.write']
],
[
'icon' => 'icon-chip',
@@ -1529,7 +1546,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'PERPLEXITY_API_KEY',
@@ -1569,7 +1586,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'REPLICATE_API_KEY',
@@ -1579,7 +1596,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-document-search',
@@ -1603,7 +1621,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'OPENAI_API_KEY',
@@ -1642,7 +1660,7 @@ return [
'type' => 'text'
]
],
"scopes" => ["databases.read", "collections.read", "documents.read"]
'scopes' => ['databases.read', 'collections.read', 'documents.read']
],
[
'icon' => 'icon-chip',
@@ -1666,7 +1684,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'OPENAI_API_KEY',
@@ -1705,7 +1723,7 @@ return [
'type' => 'text'
]
],
"scopes" => ["databases.read", "collections.read", "documents.read"]
'scopes' => ['databases.read', 'collections.read', 'documents.read']
],
[
'icon' => 'icon-chat',
@@ -1729,7 +1747,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'ELEVENLABS_API_KEY',
@@ -1760,7 +1778,7 @@ return [
'type' => 'text'
]
],
"scopes" => ["buckets.read", "buckets.write", "files.read", "files.write"]
'scopes' => ['buckets.read', 'buckets.write', 'files.read', 'files.write']
],
[
'icon' => 'icon-chip',
@@ -1784,7 +1802,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'LMNT_API_KEY',
@@ -1801,7 +1819,7 @@ return [
'type' => 'text'
]
],
"scopes" => ["buckets.read", "buckets.write", "files.read", "files.write"]
'scopes' => ['buckets.read', 'buckets.write', 'files.read', 'files.write']
],
[
'icon' => 'icon-chip',
@@ -1825,7 +1843,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'ANYSCALE_API_KEY',
@@ -1841,7 +1859,8 @@ return [
'required' => false,
'type' => 'number'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-music-note',
@@ -1865,7 +1884,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_BUCKET_ID',
@@ -1883,7 +1902,7 @@ return [
'type' => 'password'
]
],
"scopes" => ["buckets.read", "buckets.write", "files.read", "files.write"]
'scopes' => ['buckets.read', 'buckets.write', 'files.read', 'files.write']
],
[
'icon' => 'icon-chip',
@@ -1907,7 +1926,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'FAL_API_KEY',
@@ -1917,7 +1936,8 @@ return [
'required' => true,
'type' => 'password'
]
]
],
'scopes' => []
],
[
'icon' => 'icon-currency-dollar',
@@ -1941,7 +1961,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'LEMON_SQUEEZY_API_KEY',
@@ -1972,7 +1992,7 @@ return [
'type' => 'text'
]
],
"scopes" => ["users.read", "users.write"]
'scopes' => ['users.read', 'users.write']
],
[
'icon' => 'icon-currency-dollar',
@@ -1996,7 +2016,7 @@ return [
'vcsProvider' => 'github',
'providerRepositoryId' => 'templates',
'providerOwner' => 'appwrite',
'providerBranch' => 'main',
'providerVersion' => '0.2.*',
'variables' => [
[
'name' => 'APPWRITE_DATABASE_ID',
@@ -2043,6 +2063,6 @@ return [
'type' => 'text'
]
],
"scopes" => ["users.read", "users.write"]
'scopes' => ['users.read', 'users.write']
]
];
+3 -1
View File
@@ -6,7 +6,9 @@ return [
'magicSession',
'recovery',
'invitation',
'mfaChallenge'
'mfaChallenge',
'sessionAlert',
'otpSession'
],
'sms' => [
'verification',
@@ -11,4 +11,4 @@
<p>{{footer}}</p>
<p style="margin-bottom: 0px;">{{thanks}}</p>
<p style="margin-top: 0px;">{{signature}}</p>
<p style="margin-top: 0px;">{{signature}}</p>
+3 -3
View File
@@ -18,13 +18,13 @@
"emails.magicSession.securityPhrase": "Security phrase for this email is {{b}}{{phrase}}{{/b}}. You can trust this email if this phrase matches the phrase shown during sign in.",
"emails.magicSession.thanks": "Thanks,",
"emails.magicSession.signature": "{{project}} team",
"emails.sessionAlert.subject": "New session alert for {{project}}",
"emails.sessionAlert.subject": "Security alert: new session on your {{project}} account",
"emails.sessionAlert.hello":"Hello {{user}}",
"emails.sessionAlert.body": "We're writing to inform you that a new session has been initiated on your {{b}}{{project}}{{/b}} account, on {{b}}{{dateTime}}{{/b}}. \nHere are the details of the new session: ",
"emails.sessionAlert.body": "A new session has been created on your {{b}}{{project}}{{/b}} account, {{b}}on {{date}}, {{year}} at {{time}} UTC{{/b}}.\nHere are the details of the new session: ",
"emails.sessionAlert.listDevice": "Device: {{b}}{{device}}{{/b}}",
"emails.sessionAlert.listIpAddress": "IP Address: {{b}}{{ipAddress}}{{/b}}",
"emails.sessionAlert.listCountry": "Country: {{b}}{{country}}{{/b}}",
"emails.sessionAlert.footer": "If you didn't request the sign in, you can safely ignore this email. If you suspect unauthorized activity, please secure your account immediately.",
"emails.sessionAlert.footer": "If this was you, there's nothing more you need to do.\nIf you didn't initiate this session or suspect any unauthorized activity, please secure your account.",
"emails.sessionAlert.thanks": "Thanks,",
"emails.sessionAlert.signature": "{{project}} team",
"emails.otpSession.subject": "OTP for {{project}} Login",
+18 -36
View File
@@ -15,7 +15,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '16.0.0-rc.1',
'version' => '16.0.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
@@ -63,7 +63,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '13.0.0-rc.1',
'version' => '13.0.0',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@@ -81,7 +81,7 @@ return [
[
'key' => 'apple',
'name' => 'Apple',
'version' => '6.0.0',
'version' => '7.0.0',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
@@ -116,7 +116,7 @@ return [
[
'key' => 'android',
'name' => 'Android',
'version' => '5.1.1',
'version' => '6.0.0',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
@@ -138,7 +138,7 @@ return [
[
'key' => 'react-native',
'name' => 'React Native',
'version' => '0.4.0',
'version' => '0.5.0',
'url' => 'https://github.com/appwrite/sdk-for-react-native',
'package' => 'https://npmjs.com/package/react-native-appwrite',
'enabled' => true,
@@ -203,7 +203,7 @@ return [
[
'key' => 'web',
'name' => 'Console',
'version' => '0.6.3',
'version' => '1.1.0',
'url' => 'https://github.com/appwrite/sdk-for-console',
'package' => '',
'enabled' => true,
@@ -214,14 +214,14 @@ return [
'prism' => 'javascript',
'source' => \realpath(__DIR__ . '/../sdks/console-web'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-console.git',
'gitBranch' => 'main',
'gitBranch' => 'dev',
'gitRepoName' => 'sdk-for-console',
'gitUserName' => 'appwrite',
],
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '6.0.0-rc.4',
'version' => '6.0.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@@ -249,7 +249,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '14.0.0-rc.1',
'version' => '14.1.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@@ -267,7 +267,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '11.0.0',
'version' => '12.1.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@@ -285,7 +285,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '11.0.2',
'version' => '12.0.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@@ -303,7 +303,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '5.0.3',
'version' => '6.1.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@@ -321,7 +321,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '11.0.2',
'version' => '12.1.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@@ -339,7 +339,7 @@ return [
[
'key' => 'go',
'name' => 'Go',
'version' => '4.0.1',
'version' => '0.2.0',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => 'https://github.com/appwrite/sdk-for-go',
'enabled' => true,
@@ -354,28 +354,10 @@ return [
'gitUserName' => 'appwrite',
'gitBranch' => 'dev',
],
[
'key' => 'java',
'name' => 'Java',
'version' => '4.0.2',
'url' => 'https://github.com/appwrite/sdk-for-java',
'package' => '',
'enabled' => false,
'beta' => true,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'java',
'source' => \realpath(__DIR__ . '/../sdks/server-java'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-java.git',
'gitRepoName' => 'sdk-for-java',
'gitUserName' => 'appwrite',
'gitBranch' => 'dev',
],
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.8.2',
'version' => '0.10.0',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
@@ -393,7 +375,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '12.0.0-rc.1',
'version' => '12.1.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@@ -411,7 +393,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '5.0.2',
'version' => '6.1.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@@ -433,7 +415,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '5.0.2',
'version' => '6.1.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,
+51
View File
@@ -0,0 +1,51 @@
<?php
use Appwrite\Functions\Specification;
return [
Specification::S_05VCPU_512MB => [
'slug' => Specification::S_05VCPU_512MB,
'memory' => 512,
'cpus' => 0.5
],
Specification::S_1VCPU_512MB => [
'slug' => Specification::S_1VCPU_512MB,
'memory' => 512,
'cpus' => 1
],
Specification::S_1VCPU_1GB => [
'slug' => Specification::S_1VCPU_1GB,
'memory' => 1024,
'cpus' => 1
],
Specification::S_2VCPU_2GB => [
'slug' => Specification::S_2VCPU_2GB,
'memory' => 2048,
'cpus' => 2
],
Specification::S_2VCPU_4GB => [
'slug' => Specification::S_2VCPU_4GB,
'memory' => 4096,
'cpus' => 2
],
Specification::S_4VCPU_4GB => [
'slug' => Specification::S_4VCPU_4GB,
'memory' => 4096,
'cpus' => 4
],
Specification::S_4VCPU_8GB => [
'slug' => Specification::S_4VCPU_8GB,
'memory' => 8192,
'cpus' => 4
],
Specification::S_8VCPU_4GB => [
'slug' => Specification::S_8VCPU_4GB,
'memory' => 4096,
'cpus' => 8
],
Specification::S_8VCPU_8GB => [
'slug' => Specification::S_8VCPU_8GB,
'memory' => 8192,
'cpus' => 8
]
];
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+21 -3
View File
@@ -144,8 +144,17 @@ return [
],
[
'name' => '_APP_SYSTEM_EMAIL_ADDRESS',
'description' => 'This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is \'team@appwrite.io\'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users\' SPAM folders.',
'description' => 'This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is \'noreply@appwrite.io\'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users\' SPAM folders.',
'introduction' => '0.7.0',
'default' => 'noreply@appwrite.io',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_SYSTEM_TEAM_EMAIL',
'description' => 'This is the sender email address that will appear in the generated specs. The default value is \'team@appwrite.io\'.',
'introduction' => '1.6.0',
'default' => 'team@appwrite.io',
'required' => false,
'question' => '',
@@ -184,7 +193,7 @@ return [
'introduction' => '1.5.1',
'default' => '',
'required' => true,
'question' => '',
'question' => 'Enter an email that will be used when registering for SSL certificates',
'filter' => ''
],
[
@@ -711,13 +720,22 @@ return [
'variables' => [
[
'name' => '_APP_FUNCTIONS_SIZE_LIMIT',
'description' => 'The maximum size deployment in bytes. The default value is 30MB.',
'description' => 'The maximum size of a function in bytes. The default value is 30MB.',
'introduction' => '0.13.0',
'default' => '30000000',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_FUNCTIONS_BUILD_SIZE_LIMIT',
'description' => 'The maximum size of a built deployment in bytes. The default value is 2,000,000,000 (2GB), and the maximum value is 4,294,967,295 (4.2GB).',
'introduction' => '1.6.0',
'default' => '2000000000',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_FUNCTIONS_TIMEOUT',
'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds. This is the global limit, timeout for individual functions are configured in the function\'s settings or in appwrite.json.',
+35 -14
View File
@@ -55,8 +55,8 @@ use Utopia\Validator\Text;
use Utopia\Validator\URL;
use Utopia\Validator\WhiteList;
$oauthDefaultSuccess = '/auth/oauth2/success';
$oauthDefaultFailure = '/auth/oauth2/failure';
$oauthDefaultSuccess = '/console/auth/oauth2/success';
$oauthDefaultFailure = '/console/auth/oauth2/failure';
function sendSessionAlert(Locale $locale, Document $user, Document $project, Document $session, Mail $queueForMails)
{
@@ -124,7 +124,9 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc
$emailVariables = [
'direction' => $locale->getText('settings.direction'),
'dateTime' => DateTime::format(new \DateTime(), 'Y-m-d H:i:s'),
'date' => (new \DateTime())->format('F j'),
'year' => (new \DateTime())->format('YYYY'),
'time' => (new \DateTime())->format('H:i:s'),
'user' => $user->getAttribute('name'),
'project' => $project->getAttribute('name'),
'device' => $session->getAttribute('clientName'),
@@ -204,7 +206,6 @@ $createSession = function (string $userId, string $secret, Request $request, Res
Permission::delete(Role::user($user->getId())),
]));
$dbForProject->purgeCachedDocument('users', $user->getId());
Authorization::skip(fn () => $dbForProject->deleteDocument('tokens', $verifiedToken->getId()));
$dbForProject->purgeCachedDocument('users', $user->getId());
@@ -223,7 +224,21 @@ $createSession = function (string $userId, string $secret, Request $request, Res
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed saving user to DB');
}
if ($project->getAttribute('auths', [])['sessionAlerts'] ?? false) {
$isAllowedTokenType = match ($verifiedToken->getAttribute('type')) {
Auth::TOKEN_TYPE_MAGIC_URL,
Auth::TOKEN_TYPE_EMAIL => false,
default => true
};
$hasUserEmail = $user->getAttribute('email', false) !== false;
$isSessionAlertsEnabled = $project->getAttribute('auths', [])['sessionAlerts'] ?? false;
$isNotFirstSession = $dbForProject->count('sessions', [
Query::equal('userId', [$user->getId()]),
]) !== 1;
if ($isAllowedTokenType && $hasUserEmail && $isSessionAlertsEnabled && $isNotFirstSession) {
sendSessionAlert($locale, $user, $project, $session, $queueForMails);
}
@@ -379,7 +394,7 @@ App::post('/v1/account')
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$email]),
]);
if($existingTarget) {
if ($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
@@ -904,7 +919,11 @@ App::post('/v1/account/sessions/email')
;
if ($project->getAttribute('auths', [])['sessionAlerts'] ?? false) {
sendSessionAlert($locale, $user, $project, $session, $queueForMails);
if ($dbForProject->count('sessions', [
Query::equal('userId', [$user->getId()]),
]) !== 1) {
sendSessionAlert($locale, $user, $project, $session, $queueForMails);
}
}
$response->dynamic($session, Response::MODEL_SESSION);
@@ -1767,10 +1786,10 @@ App::post('/v1/account/tokens/magic-url')
->inject('queueForEvents')
->inject('queueForMails')
->action(function (string $userId, string $email, string $url, bool $phrase, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails) {
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
}
$url = htmlentities($url);
if ($phrase === true) {
$phrase = Phrase::generate();
@@ -1860,7 +1879,7 @@ App::post('/v1/account/tokens/magic-url')
$dbForProject->purgeCachedDocument('users', $user->getId());
if (empty($url)) {
$url = $request->getProtocol() . '://' . $request->getHostname() . '/auth/magic-url';
$url = $request->getProtocol() . '://' . $request->getHostname() . '/console/auth/magic-url';
}
$url = Template::parseURL($url);
@@ -2967,6 +2986,7 @@ App::post('/v1/account/recovery')
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
}
$url = htmlentities($url);
$roles = Authorization::getRoles();
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
@@ -3230,6 +3250,7 @@ App::post('/v1/account/verification')
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
}
$url = htmlentities($url);
if ($user->getAttribute('emailVerification')) {
throw new Exception(Exception::USER_EMAIL_ALREADY_VERIFIED);
}
@@ -3551,7 +3572,7 @@ App::post('/v1/account/verification/phone')
});
App::put('/v1/account/verification/phone')
->desc('Create phone verification (confirmation)')
->desc('Update phone verification (confirmation)')
->groups(['api', 'account'])
->label('scope', 'public')
->label('event', 'users.[userId].verification.[tokenId].update')
@@ -3694,7 +3715,7 @@ App::get('/v1/account/mfa/factors')
});
App::post('/v1/account/mfa/authenticators/:type')
->desc('Add Authenticator')
->desc('Create Authenticator')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.mfa')
->label('scope', 'account')
@@ -3982,7 +4003,7 @@ App::delete('/v1/account/mfa/authenticators/:type')
});
App::post('/v1/account/mfa/challenge')
->desc('Create 2FA Challenge')
->desc('Create MFA Challenge')
->groups(['api', 'account', 'mfa'])
->label('scope', 'account')
->label('event', 'users.[userId].challenges.[challengeId].create')
@@ -3997,7 +4018,7 @@ App::post('/v1/account/mfa/challenge')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_MFA_CHALLENGE)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},token:{param-token}')
->label('abuse-key', 'url:{url},userId:{userId}')
->param('factor', '', new WhiteList([Type::EMAIL, Type::PHONE, Type::TOTP, Type::RECOVERY_CODE]), 'Factor used for verification. Must be one of following: `' . Type::EMAIL . '`, `' . Type::PHONE . '`, `' . Type::TOTP . '`, `' . Type::RECOVERY_CODE . '`.')
->inject('response')
->inject('dbForProject')
@@ -4184,7 +4205,7 @@ App::put('/v1/account/mfa/challenge')
->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT)
->label('sdk.response.model', Response::MODEL_SESSION)
->label('abuse-limit', 10)
->label('abuse-key', 'userId:{param-userId}')
->label('abuse-key', 'url:{url},challengeId:{param-challengeId}')
->param('challengeId', '', new Text(256), 'ID of the challenge.')
->param('otp', '', new Text(256), 'Valid verification token.')
->inject('project')
+125 -36
View File
@@ -20,12 +20,15 @@ use Utopia\Audit\Audit;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Exception as DatabaseException;
use Utopia\Database\Exception\Authorization as AuthorizationException;
use Utopia\Database\Exception\Conflict as ConflictException;
use Utopia\Database\Exception\Duplicate as DuplicateException;
use Utopia\Database\Exception\Limit as LimitException;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Exception\Restricted as RestrictedException;
use Utopia\Database\Exception\Structure as StructureException;
use Utopia\Database\Exception\Truncate as TruncateException;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -228,13 +231,15 @@ function updateAttribute(
Database $dbForProject,
Event $queueForEvents,
string $type,
int $size = null,
string $filter = null,
string|bool|int|float $default = null,
bool $required = null,
int|float $min = null,
int|float $max = null,
array $elements = null,
array $options = []
array $options = [],
string $newKey = null,
): Document {
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
@@ -280,6 +285,10 @@ function updateAttribute(
->setAttribute('default', $default)
->setAttribute('required', $required);
if (!empty($size)) {
$attribute->setAttribute('size', $size);
}
$formatOptions = $attribute->getAttribute('formatOptions');
switch ($attribute->getAttribute('format')) {
@@ -345,6 +354,7 @@ function updateAttribute(
$dbForProject->updateRelationship(
collection: $collectionId,
id: $key,
newKey: $newKey,
onDelete: $primaryDocumentOptions['onDelete'],
);
@@ -352,22 +362,52 @@ function updateAttribute(
$relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']);
$relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey']);
if (!empty($newKey) && $newKey !== $key) {
$options['twoWayKey'] = $newKey;
}
$relatedOptions = \array_merge($relatedAttribute->getAttribute('options'), $options);
$relatedAttribute->setAttribute('options', $relatedOptions);
$dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute);
$dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId());
}
} else {
$dbForProject->updateAttribute(
collection: $collectionId,
id: $key,
required: $required,
default: $default,
formatOptions: $options ?? null
);
try {
$dbForProject->updateAttribute(
collection: $collectionId,
id: $key,
size: $size,
required: $required,
default: $default,
formatOptions: $options ?? null,
newKey: $newKey ?? null
);
} catch (TruncateException) {
throw new Exception(Exception::ATTRIBUTE_INVALID_RESIZE);
}
}
if (!empty($newKey) && $key !== $newKey) {
// Delete attribute and recreate since we can't modify IDs
$original = clone $attribute;
$dbForProject->deleteDocument('attributes', $attribute->getId());
$attribute
->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $newKey))
->setAttribute('key', $newKey);
try {
$attribute = $dbForProject->createDocument('attributes', $attribute);
} catch (DatabaseException|PDOException) {
$attribute = $dbForProject->createDocument('attributes', $original);
}
} else {
$attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute);
}
$attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute);
$dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collection->getId());
$queueForEvents
@@ -1152,6 +1192,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string
'filters' => $filters,
]), $response, $dbForProject, $queueForDatabase, $queueForEvents);
$response
->setStatusCode(Response::STATUS_CODE_ACCEPTED)
->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING);
@@ -1859,10 +1900,12 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('size', null, new Integer(), 'Maximum size of the string attribute.', true)
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
@@ -1871,8 +1914,10 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin
dbForProject: $dbForProject,
queueForEvents: $queueForEvents,
type: Database::VAR_STRING,
size: $size,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -1898,10 +1943,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Email()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -1911,7 +1957,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email
type: Database::VAR_STRING,
filter: APP_DATABASE_ATTRIBUTE_EMAIL,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -1938,10 +1985,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/
->param('elements', null, new ArrayList(new Text(DATABASE::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . DATABASE::LENGTH_KEY . ' characters long.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -1952,7 +2000,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/
filter: APP_DATABASE_ATTRIBUTE_ENUM,
default: $default,
required: $required,
elements: $elements
elements: $elements,
newKey: $newKey
);
$response
@@ -1978,10 +2027,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new IP()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -1991,7 +2041,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k
type: Database::VAR_STRING,
filter: APP_DATABASE_ATTRIBUTE_IP,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2017,10 +2068,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new URL()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2030,7 +2082,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:
type: Database::VAR_STRING,
filter: APP_DATABASE_ATTRIBUTE_URL,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2058,10 +2111,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ
->param('min', null, new Integer(), 'Minimum value to enforce on new documents')
->param('max', null, new Integer(), 'Maximum value to enforce on new documents')
->param('default', null, new Nullable(new Integer()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2072,7 +2126,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ
default: $default,
required: $required,
min: $min,
max: $max
max: $max,
newKey: $newKey
);
$formatOptions = $attribute->getAttribute('formatOptions', []);
@@ -2107,10 +2162,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float
->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents')
->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents')
->param('default', null, new Nullable(new FloatValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2121,7 +2177,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float
default: $default,
required: $required,
min: $min,
max: $max
max: $max,
newKey: $newKey
);
$formatOptions = $attribute->getAttribute('formatOptions', []);
@@ -2154,10 +2211,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new Boolean()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2166,7 +2224,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole
queueForEvents: $queueForEvents,
type: Database::VAR_BOOLEAN,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2192,10 +2251,11 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('default', null, new Nullable(new DatetimeValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) {
$attribute = updateAttribute(
databaseId: $databaseId,
collectionId: $collectionId,
@@ -2204,7 +2264,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet
queueForEvents: $queueForEvents,
type: Database::VAR_DATETIME,
default: $default,
required: $required
required: $required,
newKey: $newKey
);
$response
@@ -2229,6 +2290,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
->param('key', '', new Key(), 'Attribute Key.')
->param('onDelete', null, new WhiteList([Database::RELATION_MUTATE_CASCADE, Database::RELATION_MUTATE_RESTRICT, Database::RELATION_MUTATE_SET_NULL], true), 'Constraints option', true)
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
@@ -2237,6 +2299,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
string $collectionId,
string $key,
?string $onDelete,
?string $newKey,
Response $response,
Database $dbForProject,
Event $queueForEvents
@@ -2251,7 +2314,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/
required: false,
options: [
'onDelete' => $onDelete
]
],
newKey: $newKey
);
$options = $attribute->getAttribute('options', []);
@@ -2943,17 +3007,26 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
$processDocument($collection, $document);
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($document, Response::MODEL_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
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($document, Response::MODEL_DOCUMENT);
});
App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
@@ -3524,15 +3597,23 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
$processDocument($collection, $document);
$response->dynamic($document, Response::MODEL_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)
;
$response->dynamic($document, Response::MODEL_DOCUMENT);
->setPayload($response->getPayload(), sensitive: $relationships);
});
App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId')
@@ -3628,6 +3709,14 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
$processDocument($collection, $document);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
\array_filter(
$collection->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);
$queueForDeletes
->setType(DELETE_TYPE_AUDIT)
->setDocument($document);
@@ -3638,7 +3727,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
->setParam('documentId', $document->getId())
->setContext('collection', $collection)
->setContext('database', $database)
->setPayload($response->output($document, Response::MODEL_DOCUMENT));
->setPayload($response->output($document, Response::MODEL_DOCUMENT), sensitive: $relationships);
$response->noContent();
});
+224 -37
View File
@@ -10,6 +10,9 @@ use Appwrite\Event\Usage;
use Appwrite\Event\Validator\FunctionEvent;
use Appwrite\Extend\Exception;
use Appwrite\Extend\Exception as AppwriteException;
use Appwrite\Functions\Validator\Headers;
use Appwrite\Functions\Validator\Payload;
use Appwrite\Functions\Validator\RuntimeSpecification;
use Appwrite\Messaging\Adapter\Realtime;
use Appwrite\Platform\Tasks\ScheduleExecutions;
use Appwrite\Task\Validator\Cron;
@@ -44,9 +47,11 @@ use Utopia\Storage\Validator\FileSize;
use Utopia\Storage\Validator\Upload;
use Utopia\Swoole\Request;
use Utopia\System\System;
use Utopia\Validator\AnyOf;
use Utopia\Validator\ArrayList;
use Utopia\Validator\Assoc;
use Utopia\Validator\Boolean;
use Utopia\Validator\Nullable;
use Utopia\Validator\Range;
use Utopia\Validator\Text;
use Utopia\Validator\WhiteList;
@@ -162,7 +167,13 @@ App::post('/v1/functions')
->param('templateRepository', '', new Text(128, 0), 'Repository name of the template.', true)
->param('templateOwner', '', new Text(128, 0), 'The name of the owner of the template.', true)
->param('templateRootDirectory', '', new Text(128, 0), 'Path to function code in the template repo.', true)
->param('templateBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function template.', true)
->param('templateVersion', '', new Text(128, 0), 'Version (tag) for the repo linked to the function template.', true)
->param('specification', APP_FUNCTION_SPECIFICATION_DEFAULT, fn (array $plan) => new RuntimeSpecification(
$plan,
Config::getParam('runtime-specifications', []),
floatval(App::getEnv('_APP_FUNCTIONS_CPUS', APP_FUNCTION_CPUS_DEFAULT)),
intval(App::getEnv('_APP_FUNCTIONS_MEMORY', APP_FUNCTION_MEMORY_DEFAULT))
), 'Runtime specification for the function and builds.', true, ['plan'])
->inject('request')
->inject('response')
->inject('dbForProject')
@@ -172,7 +183,7 @@ App::post('/v1/functions')
->inject('queueForBuilds')
->inject('dbForConsole')
->inject('gitHub')
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateBranch, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateVersion, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
$functionId = ($functionId == 'unique()') ? ID::unique() : $functionId;
$allowList = \array_filter(\explode(',', System::getEnv('_APP_FUNCTIONS_RUNTIMES', '')));
@@ -187,12 +198,12 @@ App::post('/v1/functions')
!empty($templateRepository)
&& !empty($templateOwner)
&& !empty($templateRootDirectory)
&& !empty($templateBranch)
&& !empty($templateVersion)
) {
$template->setAttribute('repositoryName', $templateRepository)
->setAttribute('ownerName', $templateOwner)
->setAttribute('rootDirectory', $templateRootDirectory)
->setAttribute('branch', $templateBranch);
->setAttribute('version', $templateVersion);
}
$installation = $dbForConsole->getDocument('installations', $installationId);
@@ -233,6 +244,7 @@ App::post('/v1/functions')
'providerBranch' => $providerBranch,
'providerRootDirectory' => $providerRootDirectory,
'providerSilentMode' => $providerSilentMode,
'specification' => $specification
]));
$schedule = Authorization::skip(
@@ -281,9 +293,34 @@ App::post('/v1/functions')
$function = $dbForProject->updateDocument('functions', $function->getId(), $function);
// Redeploy vcs logic
if (!empty($providerRepositoryId)) {
// Deploy VCS
$redeployVcs($request, $function, $project, $installation, $dbForProject, $queueForBuilds, $template, $github);
} 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', ''),
'commands' => $function->getAttribute('commands', ''),
'type' => 'manual',
'search' => implode(' ', [$deploymentId, $function->getAttribute('entrypoint', '')]),
'activate' => true,
]));
$queueForBuilds
->setType(BUILD_TYPE_DEPLOYMENT)
->setResource($function)
->setDeployment($deployment)
->setTemplate($template);
}
$functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', '');
@@ -431,13 +468,13 @@ App::get('/v1/functions/runtimes')
$allowList = \array_filter(\explode(',', System::getEnv('_APP_FUNCTIONS_RUNTIMES', '')));
$allowed = [];
foreach ($runtimes as $key => $runtime) {
if (!empty($allowList) && !\in_array($key, $allowList)) {
foreach ($runtimes as $id => $runtime) {
if (!empty($allowList) && !\in_array($id, $allowList)) {
continue;
}
$runtimes[$key]['$id'] = $key;
$allowed[] = $runtimes[$key];
$runtime['$id'] = $id;
$allowed[] = $runtime;
}
$response->dynamic(new Document([
@@ -446,6 +483,42 @@ App::get('/v1/functions/runtimes')
]), Response::MODEL_RUNTIME_LIST);
});
App::get('/v1/functions/specifications')
->groups(['api', 'functions'])
->desc('List available function runtime specifications')
->label('scope', 'functions.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'functions')
->label('sdk.method', 'listSpecifications')
->label('sdk.description', '/docs/references/functions/list-specifications.md')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_SPECIFICATION_LIST)
->inject('response')
->inject('plan')
->action(function (Response $response, array $plan) {
$allRuntimeSpecs = Config::getParam('runtime-specifications', []);
$runtimeSpecs = [];
foreach ($allRuntimeSpecs as $spec) {
$spec['enabled'] = true;
if (array_key_exists('runtimeSpecifications', $plan)) {
$spec['enabled'] = in_array($spec['slug'], $plan['runtimeSpecifications']);
}
// Only add specs that are within the limits set by environment variables
if ($spec['cpus'] <= System::getEnv('_APP_FUNCTIONS_CPUS', 1) && $spec['memory'] <= System::getEnv('_APP_FUNCTIONS_MEMORY', 512)) {
$runtimeSpecs[] = $spec;
}
}
$response->dynamic(new Document([
'specifications' => $runtimeSpecs,
'total' => count($runtimeSpecs)
]), Response::MODEL_SPECIFICATION_LIST);
});
App::get('/v1/functions/:functionId')
->groups(['api', 'functions'])
->desc('Get function')
@@ -503,6 +576,8 @@ App::get('/v1/functions/:functionId/usage')
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_MB_SECONDS),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS)
];
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
@@ -565,6 +640,10 @@ App::get('/v1/functions/:functionId/usage')
'buildsTime' => $usage[$metrics[4]]['data'],
'executions' => $usage[$metrics[5]]['data'],
'executionsTime' => $usage[$metrics[6]]['data'],
'buildsMbSecondsTotal' => $usage[$metrics[7]]['total'],
'buildsMbSeconds' => $usage[$metrics[7]]['data'],
'executionsMbSeconds' => $usage[$metrics[8]]['data'],
'executionsMbSecondsTotal' => $usage[$metrics[8]]['total']
]), Response::MODEL_USAGE_FUNCTION);
});
@@ -595,6 +674,8 @@ App::get('/v1/functions/usage')
METRIC_BUILDS_COMPUTE,
METRIC_EXECUTIONS,
METRIC_EXECUTIONS_COMPUTE,
METRIC_BUILDS_MB_SECONDS,
METRIC_EXECUTIONS_MB_SECONDS,
];
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
@@ -658,6 +739,10 @@ App::get('/v1/functions/usage')
'buildsTime' => $usage[$metrics[5]]['data'],
'executions' => $usage[$metrics[6]]['data'],
'executionsTime' => $usage[$metrics[7]]['data'],
'buildsMbSecondsTotal' => $usage[$metrics[8]]['total'],
'buildsMbSeconds' => $usage[$metrics[8]]['data'],
'executionsMbSeconds' => $usage[$metrics[9]]['data'],
'executionsMbSecondsTotal' => $usage[$metrics[9]]['total'],
]), Response::MODEL_USAGE_FUNCTIONS);
});
@@ -688,10 +773,16 @@ App::put('/v1/functions/:functionId')
->param('commands', '', new Text(8192, 0), 'Build Commands.', true)
->param('scopes', [], new ArrayList(new WhiteList(array_keys(Config::getParam('scopes')), true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'List of scopes allowed for API Key auto-generated for every execution. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' scopes are allowed.', true)
->param('installationId', '', new Text(128, 0), 'Appwrite Installation ID for VCS (Version Controle System) deployment.', true)
->param('providerRepositoryId', '', new Text(128, 0), 'Repository ID of the repo linked to the function', true)
->param('providerRepositoryId', null, new Nullable(new Text(128, 0)), 'Repository ID of the repo linked to the function', true)
->param('providerBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function', true)
->param('providerSilentMode', false, new Boolean(), 'Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.', true)
->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo.', true)
->param('specification', APP_FUNCTION_SPECIFICATION_DEFAULT, fn (array $plan) => new RuntimeSpecification(
$plan,
Config::getParam('runtime-specifications', []),
floatval(App::getEnv('_APP_FUNCTIONS_CPUS', APP_FUNCTION_CPUS_DEFAULT)),
intval(App::getEnv('_APP_FUNCTIONS_MEMORY', APP_FUNCTION_MEMORY_DEFAULT))
), 'Runtime specification for the function and builds.', true, ['plan'])
->inject('request')
->inject('response')
->inject('dbForProject')
@@ -700,9 +791,8 @@ App::put('/v1/functions/:functionId')
->inject('queueForBuilds')
->inject('dbForConsole')
->inject('gitHub')
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, ?string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
// TODO: If only branch changes, re-deploy
$function = $dbForProject->getDocument('functions', $functionId);
if ($function->isEmpty()) {
@@ -738,8 +828,8 @@ App::put('/v1/functions/:functionId')
$isConnected = !empty($function->getAttribute('providerRepositoryId', ''));
// Git disconnect logic
if ($isConnected && empty($providerRepositoryId)) {
// Git disconnect logic. Disconnecting only when providerRepositoryId is empty, allowing for continue updates without disconnecting git
if ($isConnected && ($providerRepositoryId !== null && empty($providerRepositoryId))) {
$repositories = $dbForConsole->find('repositories', [
Query::equal('projectInternalId', [$project->getInternalId()]),
Query::equal('resourceInternalId', [$function->getInternalId()]),
@@ -800,6 +890,21 @@ App::put('/v1/functions/:functionId')
$live = false;
}
$spec = Config::getParam('runtime-specifications')[$specification] ?? [];
// Enforce Cold Start if spec limits change.
if ($function->getAttribute('specification') !== $specification && !empty($function->getAttribute('deployment'))) {
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
try {
$executor->deleteRuntime($project->getId(), $function->getAttribute('deployment'));
} catch (\Throwable $th) {
// Don't throw if the deployment doesn't exist
if ($th->getCode() !== 404) {
throw $th;
}
}
}
$function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [
'execute' => $execute,
'name' => $name,
@@ -821,6 +926,7 @@ App::put('/v1/functions/:functionId')
'providerBranch' => $providerBranch,
'providerRootDirectory' => $providerRootDirectory,
'providerSilentMode' => $providerSilentMode,
'specification' => $specification,
'search' => implode(' ', [$functionId, $name, $runtime]),
])));
@@ -844,12 +950,12 @@ App::put('/v1/functions/:functionId')
App::get('/v1/functions/:functionId/deployments/:deploymentId/download')
->groups(['api', 'functions'])
->desc('Download Deployment')
->desc('Download deployment')
->label('scope', 'functions.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY])
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT])
->label('sdk.namespace', 'functions')
->label('sdk.method', 'downloadDeployment')
->label('sdk.description', '/docs/references/functions/download-deployment.md')
->label('sdk.method', 'getDeploymentDownload')
->label('sdk.description', '/docs/references/functions/get-deployment-download.md')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', '*/*')
->label('sdk.methodType', 'location')
@@ -929,7 +1035,7 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId/download')
App::patch('/v1/functions/:functionId/deployments/:deploymentId')
->groups(['api', 'functions'])
->desc('Update function deployment')
->desc('Update deployment')
->label('scope', 'functions.write')
->label('event', 'functions.[functionId].deployments.[deploymentId].update')
->label('audits.event', 'deployment.update')
@@ -1046,6 +1152,7 @@ App::post('/v1/functions/:functionId/deployments')
->label('sdk.auth', [APP_AUTH_TYPE_KEY])
->label('sdk.namespace', 'functions')
->label('sdk.method', 'createDeployment')
->label('sdk.methodType', 'upload')
->label('sdk.description', '/docs/references/functions/create-deployment.md')
->label('sdk.packaging', true)
->label('sdk.request.type', 'multipart/form-data')
@@ -1065,9 +1172,9 @@ App::post('/v1/functions/:functionId/deployments')
->inject('deviceForFunctions')
->inject('deviceForLocal')
->inject('queueForBuilds')
->action(function (string $functionId, ?string $entrypoint, ?string $commands, mixed $code, bool $activate, Request $request, Response $response, Database $dbForProject, Event $queueForEvents, Document $project, Device $deviceForFunctions, Device $deviceForLocal, Build $queueForBuilds) {
->action(function (string $functionId, ?string $entrypoint, ?string $commands, mixed $code, mixed $activate, Request $request, Response $response, Database $dbForProject, Event $queueForEvents, Document $project, Device $deviceForFunctions, Device $deviceForLocal, Build $queueForBuilds) {
$activate = filter_var($activate, FILTER_VALIDATE_BOOLEAN);
$activate = \strval($activate) === 'true' || \strval($activate) === '1';
$function = $dbForProject->getDocument('functions', $functionId);
@@ -1165,7 +1272,6 @@ App::post('/v1/functions/:functionId/deployments')
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed moving file');
}
$activate = (bool) filter_var($activate, FILTER_VALIDATE_BOOLEAN);
$type = $request->getHeader('x-sdk-language') === 'cli' ? 'cli' : 'manual';
if ($chunksUploaded === $chunks) {
@@ -1322,7 +1428,8 @@ App::get('/v1/functions/:functionId/deployments')
$result->setAttribute('status', $build->getAttribute('status', 'processing'));
$result->setAttribute('buildLogs', $build->getAttribute('logs', ''));
$result->setAttribute('buildTime', $build->getAttribute('duration', 0));
$result->setAttribute('size', $result->getAttribute('size', 0) + $build->getAttribute('size', 0));
$result->setAttribute('buildSize', $build->getAttribute('size', 0));
$result->setAttribute('size', $result->getAttribute('size', 0));
}
$response->dynamic(new Document([
@@ -1368,7 +1475,8 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId')
$deployment->setAttribute('status', $build->getAttribute('status', 'waiting'));
$deployment->setAttribute('buildLogs', $build->getAttribute('logs', ''));
$deployment->setAttribute('buildTime', $build->getAttribute('duration', 0));
$deployment->setAttribute('size', $deployment->getAttribute('size', 0) + $build->getAttribute('size', 0));
$deployment->setAttribute('buildSize', $build->getAttribute('size', 0));
$deployment->setAttribute('size', $deployment->getAttribute('size', 0));
$response->dynamic($deployment, Response::MODEL_DEPLOYMENT);
});
@@ -1459,7 +1567,8 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/build')
->inject('project')
->inject('queueForEvents')
->inject('queueForBuilds')
->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds) {
->inject('deviceForFunctions')
->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds, Device $deviceForFunctions) {
$function = $dbForProject->getDocument('functions', $functionId);
if ($function->isEmpty()) {
@@ -1471,13 +1580,23 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/build')
throw new Exception(Exception::DEPLOYMENT_NOT_FOUND);
}
$path = $deployment->getAttribute('path');
if (empty($path) || !$deviceForFunctions->exists($path)) {
throw new Exception(Exception::DEPLOYMENT_NOT_FOUND);
}
$deploymentId = ID::unique();
$destination = $deviceForFunctions->getPath($deploymentId . '.' . \pathinfo('code.tar.gz', PATHINFO_EXTENSION));
$deviceForFunctions->transfer($path, $destination, $deviceForFunctions);
$deployment->removeAttribute('$internalId');
$deployment = $dbForProject->createDocument('deployments', $deployment->setAttributes([
'$internalId' => '',
'$id' => $deploymentId,
'buildId' => '',
'buildInternalId' => '',
'path' => $destination,
'entrypoint' => $function->getAttribute('entrypoint'),
'commands' => $function->getAttribute('commands', ''),
'search' => implode(' ', [$deploymentId, $function->getAttribute('entrypoint')]),
@@ -1565,8 +1684,17 @@ App::patch('/v1/functions/:functionId/deployments/:deploymentId/build')
]));
}
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
$deleteBuild = $executor->deleteRuntime($project->getId(), $deploymentId . "-build");
$dbForProject->purgeCachedDocument('deployments', $deployment->getId());
try {
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
$executor->deleteRuntime($project->getId(), $deploymentId . "-build");
} catch (\Throwable $th) {
// Don't throw if the deployment doesn't exist
if ($th->getCode() !== 404) {
throw $th;
}
}
$queueForEvents
->setParam('functionId', $function->getId())
@@ -1585,16 +1713,18 @@ App::post('/v1/functions/:functionId/executions')
->label('sdk.method', 'createExecution')
->label('sdk.description', '/docs/references/functions/create-execution.md')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.type', Response::CONTENT_TYPE_MULTIPART)
->label('sdk.response.model', Response::MODEL_EXECUTION)
->label('sdk.request.type', Response::CONTENT_TYPE_JSON)
->param('functionId', '', new UID(), 'Function ID.')
->param('body', '', new Text(0, 0), 'HTTP body of execution. Default value is empty string.', true)
->param('body', '', new Payload(10485760, 0), 'HTTP body of execution. Default value is empty string.', true)
->param('async', false, new Boolean(), 'Execute code in the background. Default value is false.', true)
->param('path', '/', new Text(2048), 'HTTP path of execution. Path can include query params. Default value is /', true)
->param('method', 'POST', new Whitelist(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], true), 'HTTP method of execution. Default value is GET.', true)
->param('headers', [], new Assoc(), 'HTTP headers of execution. Defaults to empty.', true)
->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true), 'Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true)
->param('headers', [], new AnyOf([new Assoc(), new Text(65535)], AnyOf::TYPE_MIXED), 'HTTP headers of execution. Defaults to empty.', true)
->param('scheduledAt', null, new DatetimeValidator(true, DateTimeValidator::PRECISION_MINUTES, 60), 'Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.', true)
->inject('response')
->inject('request')
->inject('project')
->inject('dbForProject')
->inject('dbForConsole')
@@ -1603,12 +1733,35 @@ App::post('/v1/functions/:functionId/executions')
->inject('queueForUsage')
->inject('queueForFunctions')
->inject('geodb')
->action(function (string $functionId, string $body, bool $async, string $path, string $method, array $headers, ?string $scheduledAt, Response $response, Document $project, Database $dbForProject, Database $dbForConsole, Document $user, Event $queueForEvents, Usage $queueForUsage, Func $queueForFunctions, Reader $geodb) {
->action(function (string $functionId, string $body, bool $async, string $path, string $method, mixed $headers, ?string $scheduledAt, Response $response, Request $request, Document $project, Database $dbForProject, Database $dbForConsole, Document $user, Event $queueForEvents, Usage $queueForUsage, Func $queueForFunctions, Reader $geodb) {
if(!$async && !is_null($scheduledAt)) {
if (!$async && !is_null($scheduledAt)) {
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Scheduled executions must run asynchronously. Set scheduledAt to a future date, or set async to true.');
}
/**
* @var array<string, mixed> $headers
*/
$assocParams = ['headers'];
foreach ($assocParams as $assocParam) {
if (!empty('headers') && !is_array($$assocParam)) {
$$assocParam = \json_decode($$assocParam, true);
}
}
$booleanParams = ['async'];
foreach ($booleanParams as $booleamParam) {
if (!empty($$booleamParam) && !is_bool($$booleamParam)) {
$$booleamParam = $$booleamParam === "true" ? true : false;
}
}
// 'headers' validator
$validator = new Headers();
if (!$validator->isValid($headers)) {
throw new Exception($validator->getDescription(), 400);
}
$function = Authorization::skip(fn () => $dbForProject->getDocument('functions', $functionId));
$isAPIKey = Auth::isAppUser(Authorization::getRoles());
@@ -1620,6 +1773,7 @@ App::post('/v1/functions/:functionId/executions')
$version = $function->getAttribute('version', 'v2');
$runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []);
$spec = Config::getParam('runtime-specifications')[$function->getAttribute('specification', APP_FUNCTION_SPECIFICATION_DEFAULT)];
$runtime = (isset($runtimes[$function->getAttribute('runtime', '')])) ? $runtimes[$function->getAttribute('runtime', '')] : null;
@@ -1714,7 +1868,7 @@ App::post('/v1/functions/:functionId/executions')
$status = $async ? 'waiting' : 'processing';
if(!is_null($scheduledAt)) {
if (!is_null($scheduledAt)) {
$status = 'scheduled';
}
@@ -1744,7 +1898,7 @@ App::post('/v1/functions/:functionId/executions')
->setContext('function', $function);
if ($async) {
if(is_null($scheduledAt)) {
if (is_null($scheduledAt)) {
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
$queueForFunctions
->setType('http')
@@ -1766,7 +1920,7 @@ App::post('/v1/functions/:functionId/executions')
'path' => $path,
'method' => $method,
'body' => $body,
'jwt' => $jwt,
'userId' => $user->getId()
];
$schedule = $dbForConsole->createDocument('schedules', new Document([
@@ -1831,8 +1985,23 @@ App::post('/v1/functions/:functionId/executions')
'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(),
'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '',
'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '',
'APPWRITE_FUNCTION_CPUS' => $spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT,
'APPWRITE_FUNCTION_MEMORY' => $spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT,
'APPWRITE_VERSION' => APP_VERSION_STABLE,
'APPWRITE_REGION' => $project->getAttribute('region'),
'APPWRITE_DEPLOYMENT_TYPE' => $deployment->getAttribute('type', ''),
'APPWRITE_VCS_REPOSITORY_ID' => $deployment->getAttribute('providerRepositoryId', ''),
'APPWRITE_VCS_REPOSITORY_NAME' => $deployment->getAttribute('providerRepositoryName', ''),
'APPWRITE_VCS_REPOSITORY_OWNER' => $deployment->getAttribute('providerRepositoryOwner', ''),
'APPWRITE_VCS_REPOSITORY_URL' => $deployment->getAttribute('providerRepositoryUrl', ''),
'APPWRITE_VCS_REPOSITORY_BRANCH' => $deployment->getAttribute('providerBranch', ''),
'APPWRITE_VCS_REPOSITORY_BRANCH_URL' => $deployment->getAttribute('providerBranchUrl', ''),
'APPWRITE_VCS_COMMIT_HASH' => $deployment->getAttribute('providerCommitHash', ''),
'APPWRITE_VCS_COMMIT_MESSAGE' => $deployment->getAttribute('providerCommitMessage', ''),
'APPWRITE_VCS_COMMIT_URL' => $deployment->getAttribute('providerCommitUrl', ''),
'APPWRITE_VCS_COMMIT_AUTHOR_NAME' => $deployment->getAttribute('providerCommitAuthor', ''),
'APPWRITE_VCS_COMMIT_AUTHOR_URL' => $deployment->getAttribute('providerCommitAuthorUrl', ''),
'APPWRITE_VCS_ROOT_DIRECTORY' => $deployment->getAttribute('providerRootDirectory', ''),
]);
/** Execute function */
@@ -1855,6 +2024,8 @@ App::post('/v1/functions/:functionId/executions')
method: $method,
headers: $headers,
runtimeEntrypoint: $command,
cpus: $spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT,
memory: $spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT,
logging: $function->getAttribute('logging', true),
requestTimeout: 30
);
@@ -1867,7 +2038,7 @@ App::post('/v1/functions/:functionId/executions')
}
/** Update execution status */
$status = $executionResponse['statusCode'] >= 400 ? 'failed' : 'completed';
$status = $executionResponse['statusCode'] >= 500 ? 'failed' : 'completed';
$execution->setAttribute('status', $status);
$execution->setAttribute('responseStatusCode', $executionResponse['statusCode']);
$execution->setAttribute('responseHeaders', $headersFiltered);
@@ -1893,6 +2064,8 @@ App::post('/v1/functions/:functionId/executions')
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS), 1)
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
->addMetric(METRIC_EXECUTIONS_MB_SECONDS, (int)(($spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT)))
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS), (int)(($spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT)))
;
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
@@ -1915,6 +2088,17 @@ App::post('/v1/functions/:functionId/executions')
$execution->setAttribute('responseBody', $executionResponse['body'] ?? '');
$execution->setAttribute('responseHeaders', $headers);
$acceptTypes = \explode(', ', $request->getHeader('accept'));
foreach ($acceptTypes as $acceptType) {
if (\str_starts_with($acceptType, 'application/json') || \str_starts_with($acceptType, 'application/*')) {
$response->setContentType(Response::CONTENT_TYPE_JSON);
break;
} elseif (\str_starts_with($acceptType, 'multipart/form-data') || \str_starts_with($acceptType, 'multipart/*')) {
$response->setContentType(Response::CONTENT_TYPE_MULTIPART);
break;
}
}
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($execution, Response::MODEL_EXECUTION);
@@ -2358,10 +2542,12 @@ App::delete('/v1/functions/:functionId/variables/:variableId')
});
App::get('/v1/functions/templates')
->groups(['api'])
->desc('List function templates')
->label('scope', 'public')
->label('sdk.namespace', 'functions')
->label('sdk.method', 'listTemplates')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.description', '/docs/references/functions/list-templates.md')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
@@ -2398,6 +2584,7 @@ App::get('/v1/functions/templates/:templateId')
->label('scope', 'public')
->label('sdk.namespace', 'functions')
->label('sdk.method', 'getTemplate')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.description', '/docs/references/functions/get-template.md')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
+107 -3
View File
@@ -40,18 +40,24 @@ App::get('/v1/project/usage')
$metrics = [
'total' => [
METRIC_EXECUTIONS,
METRIC_EXECUTIONS_MB_SECONDS,
METRIC_BUILDS_MB_SECONDS,
METRIC_DOCUMENTS,
METRIC_DATABASES,
METRIC_USERS,
METRIC_BUCKETS,
METRIC_FILES_STORAGE
METRIC_FILES_STORAGE,
METRIC_DEPLOYMENTS_STORAGE,
METRIC_BUILDS_STORAGE
],
'period' => [
METRIC_NETWORK_REQUESTS,
METRIC_NETWORK_INBOUND,
METRIC_NETWORK_OUTBOUND,
METRIC_USERS,
METRIC_EXECUTIONS
METRIC_EXECUTIONS,
METRIC_EXECUTIONS_MB_SECONDS,
METRIC_BUILDS_MB_SECONDS
]
];
@@ -128,6 +134,38 @@ App::get('/v1/project/usage')
];
}, $dbForProject->find('functions'));
$executionsMbSecondsBreakdown = array_map(function ($function) use ($dbForProject) {
$id = $function->getId();
$name = $function->getAttribute('name');
$metric = str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS);
$value = $dbForProject->findOne('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', ['inf'])
]);
return [
'resourceId' => $id,
'name' => $name,
'value' => $value['value'] ?? 0,
];
}, $dbForProject->find('functions'));
$buildsMbSecondsBreakdown = array_map(function ($function) use ($dbForProject) {
$id = $function->getId();
$name = $function->getAttribute('name');
$metric = str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_MB_SECONDS);
$value = $dbForProject->findOne('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', ['inf'])
]);
return [
'resourceId' => $id,
'name' => $name,
'value' => $value['value'] ?? 0,
];
}, $dbForProject->find('functions'));
$bucketsBreakdown = array_map(function ($bucket) use ($dbForProject) {
$id = $bucket->getId();
$name = $bucket->getAttribute('name');
@@ -144,6 +182,62 @@ App::get('/v1/project/usage')
];
}, $dbForProject->find('buckets'));
$functionsStorageBreakdown = array_map(function ($function) use ($dbForProject) {
$id = $function->getId();
$name = $function->getAttribute('name');
$deploymentMetric = str_replace(['{resourceType}', '{resourceInternalId}'], ['functions', $function->getInternalId()], METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE);
$deploymentValue = $dbForProject->findOne('stats', [
Query::equal('metric', [$deploymentMetric]),
Query::equal('period', ['inf'])
]);
$buildMetric = str_replace(['{functionInternalId}'], [$function->getInternalId()], METRIC_FUNCTION_ID_BUILDS_STORAGE);
$buildValue = $dbForProject->findOne('stats', [
Query::equal('metric', [$buildMetric]),
Query::equal('period', ['inf'])
]);
$value = ($buildValue['value'] ?? 0) + ($deploymentValue['value'] ?? 0);
return [
'resourceId' => $id,
'name' => $name,
'value' => $value,
];
}, $dbForProject->find('functions'));
$executionsMbSecondsBreakdown = array_map(function ($function) use ($dbForProject) {
$id = $function->getId();
$name = $function->getAttribute('name');
$metric = str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS);
$value = $dbForProject->findOne('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', ['inf'])
]);
return [
'resourceId' => $id,
'name' => $name,
'value' => $value['value'] ?? 0,
];
}, $dbForProject->find('functions'));
$buildsMbSecondsBreakdown = array_map(function ($function) use ($dbForProject) {
$id = $function->getId();
$name = $function->getAttribute('name');
$metric = str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_MB_SECONDS);
$value = $dbForProject->findOne('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', ['inf'])
]);
return [
'resourceId' => $id,
'name' => $name,
'value' => $value['value'] ?? 0,
];
}, $dbForProject->find('functions'));
// merge network inbound + outbound
$projectBandwidth = [];
foreach ($usage[METRIC_NETWORK_INBOUND] as $item) {
@@ -171,13 +265,23 @@ App::get('/v1/project/usage')
'users' => ($usage[METRIC_USERS]),
'executions' => ($usage[METRIC_EXECUTIONS]),
'executionsTotal' => $total[METRIC_EXECUTIONS],
'executionsMbSecondsTotal' => $total[METRIC_EXECUTIONS_MB_SECONDS],
'buildsMbSecondsTotal' => $total[METRIC_BUILDS_MB_SECONDS],
'documentsTotal' => $total[METRIC_DOCUMENTS],
'databasesTotal' => $total[METRIC_DATABASES],
'usersTotal' => $total[METRIC_USERS],
'bucketsTotal' => $total[METRIC_BUCKETS],
'filesStorageTotal' => $total[METRIC_FILES_STORAGE],
'functionsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE] + $total[METRIC_BUILDS_STORAGE],
'buildsStorageTotal' => $total[METRIC_BUILDS_STORAGE],
'deploymentsStorageTotal' => $total[METRIC_DEPLOYMENTS_STORAGE],
'executionsBreakdown' => $executionsBreakdown,
'bucketsBreakdown' => $bucketsBreakdown
'executionsMbSecondsBreakdown' => $executionsMbSecondsBreakdown,
'buildsMbSecondsBreakdown' => $buildsMbSecondsBreakdown,
'bucketsBreakdown' => $bucketsBreakdown,
'executionsMbSecondsBreakdown' => $executionsMbSecondsBreakdown,
'buildsMbSecondsBreakdown' => $buildsMbSecondsBreakdown,
'functionsStorageBreakdown' => $functionsStorageBreakdown,
]), Response::MODEL_USAGE_PROJECT);
});
+14 -2
View File
@@ -16,7 +16,7 @@ use Appwrite\Utopia\Database\Validator\Queries\Projects;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use PHPMailer\PHPMailer\PHPMailer;
use Utopia\Abuse\Adapters\TimeLimit;
use Utopia\Abuse\Adapters\Database\TimeLimit;
use Utopia\App;
use Utopia\Audit\Audit;
use Utopia\Cache\Cache;
@@ -59,6 +59,7 @@ App::init()
App::post('/v1/projects')
->desc('Create project')
->groups(['api', 'projects'])
->label('audits.event', 'projects.create')
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
@@ -876,6 +877,14 @@ App::patch('/v1/projects/:projectId/auth/mock-numbers')
->inject('dbForConsole')
->action(function (string $projectId, array $numbers, Response $response, Database $dbForConsole) {
$uniqueNumbers = [];
foreach ($numbers as $number) {
if (isset($uniqueNumbers[$number['phone']])) {
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Duplicate phone numbers are not allowed.');
}
$uniqueNumbers[$number['phone']] = $number['otp'];
}
$project = $dbForConsole->getDocument('projects', $projectId);
if ($project->isEmpty()) {
@@ -894,6 +903,7 @@ App::patch('/v1/projects/:projectId/auth/mock-numbers')
App::delete('/v1/projects/:projectId')
->desc('Delete project')
->groups(['api', 'projects'])
->label('audits.event', 'projects.delete')
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
@@ -1425,6 +1435,7 @@ App::post('/v1/projects/:projectId/jwts')
App::post('/v1/projects/:projectId/platforms')
->desc('Create platform')
->groups(['api', 'projects'])
->label('audits.event', 'platforms.create')
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
@@ -1433,7 +1444,7 @@ App::post('/v1/projects/:projectId/platforms')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_PLATFORM)
->param('projectId', '', new UID(), 'Project unique ID.')
->param('type', null, new WhiteList([Origin::CLIENT_TYPE_WEB, Origin::CLIENT_TYPE_FLUTTER_WEB, Origin::CLIENT_TYPE_FLUTTER_IOS, Origin::CLIENT_TYPE_FLUTTER_ANDROID, Origin::CLIENT_TYPE_FLUTTER_LINUX, Origin::CLIENT_TYPE_FLUTTER_MACOS, Origin::CLIENT_TYPE_FLUTTER_WINDOWS, Origin::CLIENT_TYPE_APPLE_IOS, Origin::CLIENT_TYPE_APPLE_MACOS, Origin::CLIENT_TYPE_APPLE_WATCHOS, Origin::CLIENT_TYPE_APPLE_TVOS, Origin::CLIENT_TYPE_ANDROID, Origin::CLIENT_TYPE_UNITY], true), 'Platform type.')
->param('type', null, new WhiteList([Origin::CLIENT_TYPE_WEB, Origin::CLIENT_TYPE_FLUTTER_WEB, Origin::CLIENT_TYPE_FLUTTER_IOS, Origin::CLIENT_TYPE_FLUTTER_ANDROID, Origin::CLIENT_TYPE_FLUTTER_LINUX, Origin::CLIENT_TYPE_FLUTTER_MACOS, Origin::CLIENT_TYPE_FLUTTER_WINDOWS, Origin::CLIENT_TYPE_APPLE_IOS, Origin::CLIENT_TYPE_APPLE_MACOS, Origin::CLIENT_TYPE_APPLE_WATCHOS, Origin::CLIENT_TYPE_APPLE_TVOS, Origin::CLIENT_TYPE_ANDROID, Origin::CLIENT_TYPE_UNITY, Origin::CLIENT_TYPE_REACT_NATIVE_IOS, Origin::CLIENT_TYPE_REACT_NATIVE_ANDROID], true), 'Platform type.')
->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.')
->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true)
->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true)
@@ -1588,6 +1599,7 @@ App::put('/v1/projects/:projectId/platforms/:platformId')
App::delete('/v1/projects/:projectId/platforms/:platformId')
->desc('Delete platform')
->groups(['api', 'projects'])
->label('audits.event', 'platforms.delete')
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
+1 -1
View File
@@ -51,7 +51,7 @@ App::post('/v1/proxy/rules')
}
$functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', '');
if (str_ends_with($domain, $functionsDomain)) {
if ($functionsDomain != '' && str_ends_with($domain, $functionsDomain)) {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your functions domain or it\'s subdomain to specific resource. Please use different domain.');
}
+18 -5
View File
@@ -10,6 +10,7 @@ use Appwrite\Event\Mail;
use Appwrite\Event\Messaging;
use Appwrite\Extend\Exception;
use Appwrite\Network\Validator\Email;
use Appwrite\Platform\Workers\Deletes;
use Appwrite\Template\Template;
use Appwrite\Utopia\Database\Validator\CustomId;
use Appwrite\Utopia\Database\Validator\Queries\Memberships;
@@ -338,10 +339,12 @@ App::delete('/v1/teams/:teamId')
->label('sdk.response.model', Response::MODEL_NONE)
->param('teamId', '', new UID(), 'Team ID.')
->inject('response')
->inject('getProjectDB')
->inject('dbForProject')
->inject('queueForEvents')
->inject('queueForDeletes')
->action(function (string $teamId, Response $response, Database $dbForProject, Event $queueForEvents, Delete $queueForDeletes) {
->inject('queueForEvents')
->inject('project')
->action(function (string $teamId, Response $response, callable $getProjectDB, Database $dbForProject, Delete $queueForDeletes, Event $queueForEvents, Document $project) {
$team = $dbForProject->getDocument('teams', $teamId);
@@ -353,9 +356,14 @@ App::delete('/v1/teams/:teamId')
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove team from DB');
}
$queueForDeletes
->setType(DELETE_TYPE_DOCUMENT)
->setDocument($team);
$deletes = new Deletes();
$deletes->deleteMemberships($getProjectDB, $team, $project);
if ($project->getId() === 'console') {
$queueForDeletes
->setType(DELETE_TYPE_TEAM_PROJECTS)
->setDocument($team);
}
$queueForEvents
->setParam('teamId', $team->getId())
@@ -401,6 +409,7 @@ App::post('/v1/teams/:teamId/memberships')
$isAPIKey = Auth::isAppUser(Authorization::getRoles());
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles());
$url = htmlentities($url);
if (empty($url)) {
if (!$isAPIKey && !$isPrivilegedUser) {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'URL is required');
@@ -668,6 +677,7 @@ App::post('/v1/teams/:teamId/memberships')
}
$queueForEvents
->setParam('userId', $invitee->getId())
->setParam('teamId', $team->getId())
->setParam('membershipId', $membership->getId())
;
@@ -901,6 +911,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId')
$dbForProject->purgeCachedDocument('users', $profile->getId());
$queueForEvents
->setParam('userId', $profile->getId())
->setParam('teamId', $team->getId())
->setParam('membershipId', $membership->getId());
@@ -1026,6 +1037,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status')
Authorization::skip(fn () => $dbForProject->increaseDocumentAttribute('teams', $team->getId(), 'total', 1));
$queueForEvents
->setParam('userId', $user->getId())
->setParam('teamId', $team->getId())
->setParam('membershipId', $membership->getId())
;
@@ -1107,6 +1119,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId')
}
$queueForEvents
->setParam('userId', $user->getId())
->setParam('teamId', $team->getId())
->setParam('membershipId', $membership->getId())
->setPayload($response->output($membership, Response::MODEL_MEMBERSHIP))
+3 -3
View File
@@ -140,7 +140,7 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$email]),
]);
if($existingTarget) {
if ($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
@@ -164,7 +164,7 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$phone]),
]);
if($existingTarget) {
if ($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
@@ -2124,7 +2124,7 @@ App::post('/v1/users/:userId/jwts')
$sessions = $user->getAttribute('sessions', []);
$session = new Document();
if($sessionId === 'recent') {
if ($sessionId === 'recent') {
// Get most recent
$session = \count($sessions) > 0 ? $sessions[\count($sessions) - 1] : new Document();
} else {
+2 -2
View File
@@ -96,7 +96,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
$commentStatus = $isAuthorized ? 'waiting' : 'failed';
$authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}";
$authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}";
$action = $isAuthorized ? ['type' => 'logs'] : ['type' => 'authorize', 'url' => $authorizeUrl];
@@ -509,7 +509,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
$vcsContents = [];
foreach ($contents as $content) {
$isDirectory = false;
if($content['type'] === GitHub::CONTENTS_DIRECTORY) {
if ($content['type'] === GitHub::CONTENTS_DIRECTORY) {
$isDirectory = true;
}
+54 -15
View File
@@ -32,6 +32,7 @@ use Utopia\Database\Validator\Authorization;
use Utopia\Domains\Domain;
use Utopia\DSN\DSN;
use Utopia\Locale\Locale;
use Utopia\Logger\Adapter\Sentry;
use Utopia\Logger\Log;
use Utopia\Logger\Log\User;
use Utopia\Logger\Logger;
@@ -96,6 +97,9 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
$type = $route->getAttribute('resourceType');
if ($type === 'function') {
$utopia->getRoute()?->label('sdk.namespace', 'functions');
$utopia->getRoute()?->label('sdk.method', 'createExecution');
if (System::getEnv('_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS', 'disabled') === 'enabled') { // Force HTTPS
if ($request->getProtocol() !== 'https') {
if ($request->getMethod() !== Request::METHOD_GET) {
@@ -133,6 +137,7 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
$version = $function->getAttribute('version', 'v2');
$runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []);
$spec = Config::getParam('runtime-specifications')[$function->getAttribute('specification', APP_FUNCTION_SPECIFICATION_DEFAULT)];
$runtime = (isset($runtimes[$function->getAttribute('runtime', '')])) ? $runtimes[$function->getAttribute('runtime', '')] : null;
@@ -266,8 +271,23 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(),
'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '',
'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '',
'APPWRITE_FUNCTION_CPUS' => $spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT,
'APPWRITE_FUNCTION_MEMORY' => $spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT,
'APPWRITE_VERSION' => APP_VERSION_STABLE,
'APPWRITE_REGION' => $project->getAttribute('region'),
'APPWRITE_DEPLOYMENT_TYPE' => $deployment->getAttribute('type', ''),
'APPWRITE_VCS_REPOSITORY_ID' => $deployment->getAttribute('providerRepositoryId', ''),
'APPWRITE_VCS_REPOSITORY_NAME' => $deployment->getAttribute('providerRepositoryName', ''),
'APPWRITE_VCS_REPOSITORY_OWNER' => $deployment->getAttribute('providerRepositoryOwner', ''),
'APPWRITE_VCS_REPOSITORY_URL' => $deployment->getAttribute('providerRepositoryUrl', ''),
'APPWRITE_VCS_REPOSITORY_BRANCH' => $deployment->getAttribute('providerBranch', ''),
'APPWRITE_VCS_REPOSITORY_BRANCH_URL' => $deployment->getAttribute('providerBranchUrl', ''),
'APPWRITE_VCS_COMMIT_HASH' => $deployment->getAttribute('providerCommitHash', ''),
'APPWRITE_VCS_COMMIT_MESSAGE' => $deployment->getAttribute('providerCommitMessage', ''),
'APPWRITE_VCS_COMMIT_URL' => $deployment->getAttribute('providerCommitUrl', ''),
'APPWRITE_VCS_COMMIT_AUTHOR_NAME' => $deployment->getAttribute('providerCommitAuthor', ''),
'APPWRITE_VCS_COMMIT_AUTHOR_URL' => $deployment->getAttribute('providerCommitAuthorUrl', ''),
'APPWRITE_VCS_ROOT_DIRECTORY' => $deployment->getAttribute('providerRootDirectory', ''),
]);
/** Execute function */
@@ -290,6 +310,8 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
method: $method,
headers: $headers,
runtimeEntrypoint: $command,
cpus: $spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT,
memory: $spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT,
logging: $function->getAttribute('logging', true),
requestTimeout: 30
);
@@ -302,7 +324,7 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
}
/** Update execution status */
$status = $executionResponse['statusCode'] >= 400 ? 'failed' : 'completed';
$status = $executionResponse['statusCode'] >= 500 ? 'failed' : 'completed';
$execution->setAttribute('status', $status);
$execution->setAttribute('responseStatusCode', $executionResponse['statusCode']);
$execution->setAttribute('responseHeaders', $headersFiltered);
@@ -324,17 +346,27 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
throw $th;
}
} finally {
$fileSize = 0;
$file = $request->getFiles('file');
if (!empty($file)) {
$fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size'];
}
$queueForUsage
->addMetric(METRIC_NETWORK_REQUESTS, 1)
->addMetric(METRIC_NETWORK_INBOUND, $request->getSize() + $fileSize)
->addMetric(METRIC_NETWORK_OUTBOUND, $response->getSize())
->addMetric(METRIC_EXECUTIONS, 1)
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS), 1)
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
->addMetric(METRIC_EXECUTIONS_MB_SECONDS, (int)(($spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT)))
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS), (int)(($spec['memory'] ?? APP_FUNCTION_MEMORY_DEFAULT) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_FUNCTION_CPUS_DEFAULT)))
->setProject($project)
->trigger()
;
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
$execution->setAttribute('logs', '');
@@ -745,16 +777,24 @@ App::error()
$providerName = System::getEnv('_APP_EXPERIMENT_LOGGING_PROVIDER', '');
$providerConfig = System::getEnv('_APP_EXPERIMENT_LOGGING_CONFIG', '');
if (!(empty($providerName) || empty($providerConfig))) {
if (!Logger::hasProvider($providerName)) {
throw new Exception("Logging provider not supported. Logging is disabled");
}
try {
$loggingProvider = new DSN($providerConfig ?? '');
$providerName = $loggingProvider->getScheme();
$classname = '\\Utopia\\Logger\\Adapter\\' . \ucfirst($providerName);
$adapter = new $classname($providerConfig);
$logger = new Logger($adapter);
$logger->setSample(0.04);
$publish = true;
if (!empty($providerName) && $providerName === 'sentry') {
$key = $loggingProvider->getPassword();
$projectId = $loggingProvider->getUser() ?? '';
$host = 'https://' . $loggingProvider->getHost();
$adapter = new Sentry($projectId, $key, $host);
$logger = new Logger($adapter);
$logger->setSample(0.04);
$publish = true;
} else {
throw new \Exception('Invalid experimental logging provider');
}
} catch (\Throwable $th) {
Console::warning('Failed to initialize logging provider: ' . $th->getMessage());
}
}
@@ -815,7 +855,6 @@ App::error()
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->addExtra('roles', Authorization::getRoles());
$action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD");
+15 -9
View File
@@ -18,7 +18,7 @@ use Appwrite\Messaging\Adapter\Realtime;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use Utopia\Abuse\Abuse;
use Utopia\Abuse\Adapters\TimeLimit;
use Utopia\Abuse\Adapters\Database\TimeLimit;
use Utopia\App;
use Utopia\Cache\Adapter\Filesystem;
use Utopia\Cache\Cache;
@@ -207,14 +207,14 @@ App::init()
}
// Remove after migration
if(!\str_contains($apiKey, '_')) {
if (!\str_contains($apiKey, '_')) {
$keyType = API_KEY_STANDARD;
$authKey = $apiKey;
} else {
[ $keyType, $authKey ] = \explode('_', $apiKey, 2);
}
if($keyType === API_KEY_DYNAMIC) {
if ($keyType === API_KEY_DYNAMIC) {
// Dynamic key
$jwtObj = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 3600, 0);
@@ -244,7 +244,7 @@ App::init()
Authorization::setRole(Auth::USER_ROLE_APPS);
Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys.
}
} elseif($keyType === API_KEY_STANDARD) {
} elseif ($keyType === API_KEY_STANDARD) {
// No underline means no prefix. Backwards compatibility.
// Regular key
@@ -508,7 +508,12 @@ App::init()
->setContentType($cacheLog->getAttribute('mimeType'))
->send($data);
} else {
$response->addHeader('X-Appwrite-Cache', 'miss');
$response
->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate')
->addHeader('Pragma', 'no-cache')
->addHeader('Expires', 0)
->addHeader('X-Appwrite-Cache', 'miss')
;
}
}
});
@@ -597,10 +602,11 @@ App::shutdown()
/**
* Trigger functions.
*/
$queueForFunctions
->from($queueForEvents)
->trigger();
if (!$queueForEvents->isPaused()) {
$queueForFunctions
->from($queueForEvents)
->trigger();
}
/**
* Trigger webhooks.
*/
+3 -2
View File
@@ -32,8 +32,9 @@ App::get('/')
->action(function (Request $request, Response $response) {
$url = parse_url($request->getURI());
$target = "/console{$url['path']}";
if ($url['query'] ?? false) {
$target .= "?{$url['query']}";
$params = $request->getParams();
if (!empty($params)) {
$target .= "?" . \http_build_query($params);
}
if ($url['fragment'] ?? false) {
$target .= "#{$url['fragment']}";
+1 -2
View File
@@ -9,7 +9,7 @@ use Swoole\Http\Request as SwooleRequest;
use Swoole\Http\Response as SwooleResponse;
use Swoole\Http\Server;
use Swoole\Process;
use Utopia\Abuse\Adapters\TimeLimit;
use Utopia\Abuse\Adapters\Database\TimeLimit;
use Utopia\App;
use Utopia\Audit\Audit;
use Utopia\CLI\Console;
@@ -290,7 +290,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
$log->addExtra('file', $th->getFile());
$log->addExtra('line', $th->getLine());
$log->addExtra('trace', $th->getTraceAsString());
$log->addExtra('detailedTrace', $th->getTrace());
$log->addExtra('roles', Authorization::getRoles());
$action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD");
+44 -15
View File
@@ -33,6 +33,7 @@ use Appwrite\Event\Messaging;
use Appwrite\Event\Migration;
use Appwrite\Event\Usage;
use Appwrite\Extend\Exception;
use Appwrite\Functions\Specification;
use Appwrite\GraphQL\Promises\Adapter\Swoole;
use Appwrite\GraphQL\Schema;
use Appwrite\Hooks\Hooks;
@@ -117,7 +118,7 @@ const APP_KEY_ACCESS = 24 * 60 * 60; // 24 hours
const APP_USER_ACCESS = 24 * 60 * 60; // 24 hours
const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 4314;
const APP_CACHE_BUSTER = 4318;
const APP_VERSION_STABLE = '1.6.0';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
@@ -147,6 +148,9 @@ const APP_SOCIAL_DEV = 'https://dev.to/appwrite';
const APP_SOCIAL_STACKSHARE = 'https://stackshare.io/appwrite';
const APP_SOCIAL_YOUTUBE = 'https://www.youtube.com/c/appwrite?sub_confirmation=1';
const APP_HOSTNAME_INTERNAL = 'appwrite';
const APP_FUNCTION_SPECIFICATION_DEFAULT = Specification::S_05VCPU_512MB;
const APP_FUNCTION_CPUS_DEFAULT = 0.5;
const APP_FUNCTION_MEMORY_DEFAULT = 512;
// Database Reconnect
const DATABASE_RECONNECT_SLEEP = 2;
@@ -172,7 +176,7 @@ const DELETE_TYPE_PROJECTS = 'projects';
const DELETE_TYPE_FUNCTIONS = 'functions';
const DELETE_TYPE_DEPLOYMENTS = 'deployments';
const DELETE_TYPE_USERS = 'users';
const DELETE_TYPE_TEAMS = 'teams';
const DELETE_TYPE_TEAM_PROJECTS = 'teams_projects';
const DELETE_TYPE_EXECUTIONS = 'executions';
const DELETE_TYPE_AUDIT = 'audit';
const DELETE_TYPE_ABUSE = 'abuse';
@@ -219,8 +223,18 @@ const API_KEY_DYNAMIC = 'dynamic';
// Usage metrics
const METRIC_TEAMS = 'teams';
const METRIC_USERS = 'users';
const METRIC_MESSAGES = 'messages';
const METRIC_MESSAGES_COUNTRY_CODE = '{countryCode}.messages';
const METRIC_AUTH_METHOD_PHONE = 'auth.method.phone';
const METRIC_AUTH_METHOD_PHONE_COUNTRY_CODE = METRIC_AUTH_METHOD_PHONE . '.{countryCode}';
const METRIC_MESSAGES = 'messages';
const METRIC_MESSAGES_SENT = METRIC_MESSAGES . '.sent';
const METRIC_MESSAGES_FAILED = METRIC_MESSAGES . '.failed';
const METRIC_MESSAGES_TYPE = METRIC_MESSAGES . '.{type}';
const METRIC_MESSAGES_TYPE_SENT = METRIC_MESSAGES . '.{type}.sent';
const METRIC_MESSAGES_TYPE_FAILED = METRIC_MESSAGES . '.{type}.failed';
const METRIC_MESSAGES_TYPE_PROVIDER = METRIC_MESSAGES . '.{type}.{provider}';
const METRIC_MESSAGES_TYPE_PROVIDER_SENT = METRIC_MESSAGES . '.{type}.{provider}.sent';
const METRIC_MESSAGES_TYPE_PROVIDER_FAILED = METRIC_MESSAGES . '.{type}.{provider}.failed';
const METRIC_SESSIONS = 'sessions';
const METRIC_DATABASES = 'databases';
const METRIC_COLLECTIONS = 'collections';
@@ -243,6 +257,7 @@ const METRIC_BUILDS_STORAGE = 'builds.storage';
const METRIC_BUILDS_COMPUTE = 'builds.compute';
const METRIC_BUILDS_COMPUTE_SUCCESS = 'builds.compute.success';
const METRIC_BUILDS_COMPUTE_FAILED = 'builds.compute.failed';
const METRIC_BUILDS_MB_SECONDS = 'builds.mbSeconds';
const METRIC_FUNCTION_ID_BUILDS = '{functionInternalId}.builds';
const METRIC_FUNCTION_ID_BUILDS_SUCCESS = '{functionInternalId}.builds.success';
const METRIC_FUNCTION_ID_BUILDS_FAILED = '{functionInternalId}.builds.failed';
@@ -252,10 +267,13 @@ const METRIC_FUNCTION_ID_BUILDS_COMPUTE_SUCCESS = '{functionInternalId}.builds.
const METRIC_FUNCTION_ID_BUILDS_COMPUTE_FAILED = '{functionInternalId}.builds.compute.failed';
const METRIC_FUNCTION_ID_DEPLOYMENTS = '{resourceType}.{resourceInternalId}.deployments';
const METRIC_FUNCTION_ID_DEPLOYMENTS_STORAGE = '{resourceType}.{resourceInternalId}.deployments.storage';
const METRIC_FUNCTION_ID_BUILDS_MB_SECONDS = '{functionInternalId}.builds.mbSeconds';
const METRIC_EXECUTIONS = 'executions';
const METRIC_EXECUTIONS_COMPUTE = 'executions.compute';
const METRIC_EXECUTIONS_MB_SECONDS = 'executions.mbSeconds';
const METRIC_FUNCTION_ID_EXECUTIONS = '{functionInternalId}.executions';
const METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE = '{functionInternalId}.executions.compute';
const METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS = '{functionInternalId}.executions.mbSeconds';
const METRIC_NETWORK_REQUESTS = 'network.requests';
const METRIC_NETWORK_INBOUND = 'network.inbound';
const METRIC_NETWORK_OUTBOUND = 'network.outbound';
@@ -303,6 +321,7 @@ Config::load('storage-logos', __DIR__ . '/config/storage/logos.php');
Config::load('storage-mimes', __DIR__ . '/config/storage/mimes.php');
Config::load('storage-inputs', __DIR__ . '/config/storage/inputs.php');
Config::load('storage-outputs', __DIR__ . '/config/storage/outputs.php');
Config::load('runtime-specifications', __DIR__ . '/config/runtimes/specifications.php');
Config::load('function-templates', __DIR__ . '/config/function-templates.php');
/**
@@ -746,12 +765,13 @@ $register->set('logger', function () {
$providerName = $loggingProvider->getScheme();
$providerConfig = match ($providerName) {
'sentry' => ['key' => $loggingProvider->getPassword(), 'projectId' => $loggingProvider->getUser() ?? '', 'host' => $loggingProvider->getHost()],
'sentry' => ['key' => $loggingProvider->getPassword(), 'projectId' => $loggingProvider->getUser() ?? '', 'host' => 'https://' . $loggingProvider->getHost()],
'logowl' => ['ticket' => $loggingProvider->getUser() ?? '', 'host' => $loggingProvider->getHost()],
default => ['key' => $loggingProvider->getHost()],
};
} catch (Throwable) {
} catch (Throwable $th) {
// Fallback for older Appwrite versions up to 1.5.x that use _APP_LOGGING_PROVIDER and _APP_LOGGING_CONFIG environment variables
Console::warning('Using deprecated logging configuration. Please update your configuration to use DSN format.' . $th->getMessage());
$configChunks = \explode(";", $providerConfig);
$providerConfig = match ($providerName) {
@@ -769,13 +789,22 @@ $register->set('logger', function () {
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Logging provider not supported. Logging is disabled");
}
$adapter = match ($providerName) {
'sentry' => new Sentry($providerConfig['projectId'], $providerConfig['key'], $providerConfig['host']),
'logowl' => new LogOwl($providerConfig['ticket'], $providerConfig['host']),
'raygun' => new Raygun($providerConfig['key']),
'appsignal' => new AppSignal($providerConfig['key']),
default => throw new Exception('Provider "' . $providerName . '" not supported.')
};
try {
$adapter = match ($providerName) {
'sentry' => new Sentry($providerConfig['projectId'], $providerConfig['key'], $providerConfig['host']),
'logowl' => new LogOwl($providerConfig['ticket'], $providerConfig['host']),
'raygun' => new Raygun($providerConfig['key']),
'appsignal' => new AppSignal($providerConfig['key']),
default => null
};
} catch (Throwable $th) {
$adapter = null;
}
if ($adapter === null) {
Console::error("Logging provider not supported. Logging is disabled");
return;
}
return new Logger($adapter);
});
@@ -999,7 +1028,7 @@ $register->set('smtp', function () {
return $mail;
});
$register->set('geodb', function () {
return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2024-02.mmdb');
return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2024-09.mmdb');
});
$register->set('passwordsDictionary', function () {
$content = \file_get_contents(__DIR__ . '/assets/security/10k-common-passwords');
@@ -1248,7 +1277,7 @@ App::setResource('user', function ($mode, $project, $console, $request, $respons
}
$jwtSessionId = $payload['sessionId'] ?? '';
if(!empty($jwtSessionId)) {
if (!empty($jwtSessionId)) {
if (empty($user->find('$id', $jwtSessionId, 'sessions'))) { // Match JWT to active token
$user = new Document([]);
}
+4 -3
View File
@@ -13,7 +13,7 @@ use Swoole\Runtime;
use Swoole\Table;
use Swoole\Timer;
use Utopia\Abuse\Abuse;
use Utopia\Abuse\Adapters\TimeLimit;
use Utopia\Abuse\Adapters\Database\TimeLimit;
use Utopia\App;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
@@ -178,7 +178,6 @@ $logError = function (Throwable $error, string $action) use ($register) {
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->setAction($action);
@@ -381,8 +380,10 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
$user = $database->getDocument('users', $userId);
$roles = Auth::getRoles($user);
$channels = $realtime->connections[$connection]['channels'];
$realtime->subscribe($projectId, $connection, $roles, $realtime->connections[$connection]['channels']);
$realtime->unsubscribe($connection);
$realtime->subscribe($projectId, $connection, $roles, $channels);
$register->get('pools')->reclaim();
}
+8 -2
View File
@@ -166,7 +166,7 @@ $image = $this->getParam('image', '');
appwrite-console:
<<: *x-logging
container_name: appwrite-console
image: <?php echo $organization; ?>/console:appwrite/console:5.0.0-rc.11
image: <?php echo $organization; ?>/console:5.0.12
restart: unless-stopped
networks:
- appwrite
@@ -336,6 +336,9 @@ $image = $this->getParam('image', '');
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_MAINTENANCE_RETENTION_ABUSE
- _APP_MAINTENANCE_RETENTION_AUDIT
- _APP_MAINTENANCE_RETENTION_EXECUTION
appwrite-worker-databases:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
@@ -475,6 +478,8 @@ $image = $this->getParam('image', '');
- _APP_ENV
- _APP_WORKER_PER_CORE
- _APP_OPENSSL_KEY_V1
- _APP_DOMAIN
- _APP_OPTIONS_FORCE_HTTPS
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_REDIS_USER
@@ -674,6 +679,7 @@ $image = $this->getParam('image', '');
entrypoint: worker-usage-dump
<<: *x-logging
container_name: appwrite-worker-usage-dump
restart: unless-stopped
networks:
- appwrite
depends_on:
@@ -787,7 +793,7 @@ $image = $this->getParam('image', '');
<<: *x-logging
restart: unless-stopped
stop_signal: SIGINT
image: openruntimes/executor:0.6.2
image: openruntimes/executor:0.6.11
networks:
- appwrite
- runtimes
-1
View File
@@ -341,7 +341,6 @@ $worker
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->addExtra('roles', Authorization::getRoles());
$isProduction = System::getEnv('_APP_ENV', 'development') === 'production';
+11 -9
View File
@@ -13,7 +13,8 @@
"scripts": {
"test": "vendor/bin/phpunit",
"lint": "vendor/bin/pint --test",
"format": "vendor/bin/pint"
"format": "vendor/bin/pint",
"bench": "vendor/bin/phpbench run --report=benchmark"
},
"autoload": {
"psr-4": {
@@ -42,24 +43,24 @@
"ext-openssl": "*",
"ext-zlib": "*",
"ext-sockets": "*",
"appwrite/php-runtimes": "0.14.*",
"appwrite/php-runtimes": "0.15.*",
"appwrite/php-clamav": "2.0.*",
"utopia-php/abuse": "0.38.*",
"utopia-php/abuse": "0.43.0",
"utopia-php/analytics": "0.10.*",
"utopia-php/audit": "0.40.*",
"utopia-php/audit": "0.43.0",
"utopia-php/cache": "0.10.*",
"utopia-php/cli": "0.15.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.50.*",
"utopia-php/database": "0.53.*",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "0.33.*",
"utopia-php/fetch": "0.2.*",
"utopia-php/image": "0.6.*",
"utopia-php/locale": "0.4.*",
"utopia-php/logger": "0.5.*",
"utopia-php/logger": "0.6.*",
"utopia-php/messaging": "0.12.*",
"utopia-php/migration": "0.4.*",
"utopia-php/migration": "0.5.*",
"utopia-php/orchestration": "0.9.*",
"utopia-php/platform": "0.7.*",
"utopia-php/pools": "0.5.*",
@@ -69,7 +70,7 @@
"utopia-php/storage": "0.18.*",
"utopia-php/swoole": "0.8.*",
"utopia-php/system": "0.8.*",
"utopia-php/vcs": "0.7.*",
"utopia-php/vcs": "0.8.*",
"utopia-php/websocket": "0.1.*",
"matomo/device-detector": "6.1.*",
"dragonmantank/cron-expression": "3.3.2",
@@ -86,7 +87,8 @@
"phpunit/phpunit": "9.5.20",
"swoole/ide-helper": "5.1.2",
"textalk/websocket": "1.5.7",
"laravel/pint": "^1.14"
"laravel/pint": "^1.14",
"phpbench/phpbench": "^1.2"
},
"provide": {
"ext-phpiredis": "*"
Generated
+1556 -154
View File
File diff suppressed because it is too large Load Diff
+4 -3
View File
@@ -103,6 +103,7 @@ services:
- _APP_CONSOLE_HOSTNAMES
- _APP_SYSTEM_EMAIL_NAME
- _APP_SYSTEM_EMAIL_ADDRESS
- _APP_SYSTEM_TEAM_EMAIL
- _APP_EMAIL_SECURITY
- _APP_SYSTEM_RESPONSE_FORMAT
- _APP_OPTIONS_ABUSE
@@ -195,7 +196,7 @@ services:
appwrite-console:
<<: *x-logging
container_name: appwrite-console
image: appwrite/console:5.0.0-rc.11
image: appwrite/console:5.0.12
restart: unless-stopped
networks:
- appwrite
@@ -873,7 +874,7 @@ services:
hostname: exc1
<<: *x-logging
stop_signal: SIGINT
image: openruntimes/executor:0.6.2
image: openruntimes/executor:0.6.11
restart: unless-stopped
networks:
- appwrite
@@ -923,7 +924,7 @@ services:
hostname: proxy
<<: *x-logging
stop_signal: SIGINT
image: openruntimes/proxy:0.3.1
image: openruntimes/proxy:0.5.5
networks:
- appwrite
- runtimes
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -5,7 +5,7 @@ import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -5,7 +5,7 @@ import io.appwrite.enums.AuthenticationFactor;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -5,7 +5,7 @@ import io.appwrite.enums.OAuthProvider;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -5,7 +5,7 @@ import io.appwrite.enums.OAuthProvider;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -5,13 +5,12 @@ import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.deleteMfaAuthenticator(
AuthenticatorType.TOTP, // type
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -5,7 +5,7 @@ import io.appwrite.enums.AuthenticatorType;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
@@ -4,7 +4,7 @@ import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("&lt;YOUR_PROJECT_ID&gt;"); // Your project ID
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);

Some files were not shown because too many files have changed in this diff Show More