Compare commits

...
Author SHA1 Message Date
Torsten DittmannandGitHub 0180aff4f5 Merge pull request #5123 from appwrite/feat-release-console-1-2-1
feat: bump console to 2.2.0
2023-02-14 20:34:46 +01:00
Torsten Dittmann 92a20a2241 chore: add to changelog 2023-02-14 18:56:06 +01:00
Torsten Dittmann 397d4937ea feat: bump console to 2.2.0 2023-02-14 18:53:11 +01:00
Torsten DittmannandGitHub 439467347e Merge pull request #5119 from appwrite/release-1.2.1
Release 1.2.1
2023-02-14 15:23:51 +01:00
Steven Nguyen c340fae696 Update CHANGES.md 2023-02-13 16:59:05 -08:00
Steven Nguyen bbd39582ba Update API specs 2023-02-13 16:21:45 -08:00
Steven Nguyen 7790079bb2 Bump version to 1.2.1 2023-02-13 15:55:54 -08:00
Steven Nguyen e90e007da1 Merge branch 'master' into release-1.2.1 2023-02-13 15:46:30 -08:00
Christy JacobandGitHub 08fca62767 Merge pull request #5111 from appwrite/feat-add-growth-endpoint-envar
Expose Growth Env Var
2023-02-13 22:31:46 +05:30
Bradley Schofield 1e9bbdbda0 Add Default growth server 2023-02-13 14:52:58 +00:00
Bradley Schofield 5a665f3ad1 Update Dockerfile 2023-02-13 14:18:04 +00:00
Torsten DittmannandGitHub 3abb0013e7 Merge pull request #5089 from appwrite/fix-validator-origin
Fix validating origin for apple platforms
2023-02-07 19:28:05 +01:00
Torsten DittmannandGitHub 799c527661 Merge pull request #5090 from appwrite/sync-1.2.x
Sync 1.2.x
2023-02-07 19:27:50 +01:00
Torsten DittmannandGitHub 8f8e2b4aa3 Merge pull request #5091 from appwrite/refactor-update-messaging
Update messaging + SDK generator
2023-02-07 19:25:24 +01:00
Jake Barnby 5ddce5fbda Update lock 2023-02-07 19:48:33 +13:00
Jake Barnby e2a58dfade Fix validating origin for apple platforms
(cherry picked from commit 702472a8c77717619d477801a52d6038daa30da1)
2023-02-07 19:39:07 +13:00
Eldad A. FuxandGitHub 661581a7f3 Merge pull request #5071 from appwrite/fix-readme-badge
fix(readme): tests badge
2023-02-02 19:14:47 +02:00
Torsten DittmannandGitHub 213d3dc721 fix(readme): readme-cn 2023-02-02 18:02:12 +01:00
Torsten DittmannandGitHub abeb4973e4 fix(readme): tests badge 2023-02-02 18:00:12 +01:00
Christy JacobandGitHub 6a26d9db39 Merge pull request #5056 from appwrite/christyjacob4-patch-4
Update CONTRIBUTING.md
2023-02-01 12:55:41 +05:30
Christy JacobandGitHub e5a6db6133 Merge pull request #4890 from appwrite/doc-clarify-permission
Update permission and ID param descriptions for grammar and clarity.
2023-01-28 04:15:20 +05:30
Christy JacobandGitHub feef53a43a Merge pull request #4556 from motasimmakki/motasim
docs: Removed unnecessary $ symbol and spaced correctly.
2023-01-27 22:50:04 +05:30
Christy Jacob 569776a1f6 Merge branch 'master' of https://github.com/appwrite/appwrite into motasim 2023-01-27 14:57:37 +00:00
Christy JacobandGitHub e9e254bb41 Merge pull request #4314 from tusharxoxoxo/patch-3
Update add-route.md
2023-01-27 18:49:03 +05:30
Christy JacobandGitHub 844690e904 Merge pull request #4315 from tusharxoxoxo/patch-4
Update add-runtime.md
2023-01-27 18:47:40 +05:30
Christy Jacob 0a73a76919 Merge branch 'master' of https://github.com/appwrite/appwrite into patch-3 2023-01-27 13:16:43 +00:00
Christy Jacob 2d8ba5438a Merge branch 'master' of https://github.com/appwrite/appwrite into patch-4 2023-01-27 13:13:10 +00:00
Christy JacobandGitHub 17ce9f532a Merge pull request #4316 from tusharxoxoxo/patch-5
Update add-storage-adapter.md
2023-01-27 18:37:44 +05:30
Christy JacobandGitHub e1dd5295f4 Update CONTRIBUTING.md 2023-01-27 18:36:20 +05:30
Christy Jacob 35ba33cb49 chore: review comments 2023-01-27 13:02:17 +00:00
Christy Jacob 148473e662 Merge branch 'master' of https://github.com/appwrite/appwrite into patch-5 2023-01-27 12:52:56 +00:00
Torsten DittmannandGitHub 00bd3bb9bb Merge pull request #4992 from appwrite/feat-4803-flutter-web-platform-type
Add flutter-web as a platform type
2023-01-27 13:27:35 +01:00
Torsten Dittmann 24a7caf936 Merge branch 'master' of https://github.com/appwrite/appwrite into feat-4803-flutter-web-platform-type 2023-01-27 13:24:41 +01:00
Torsten DittmannandGitHub eee2c0c4ff Merge pull request #4994 from aayushbisen/fix-4986-add-appwrite-worker-messaging-restart-policy
add restart policy for worker-messaging container
2023-01-27 13:21:35 +01:00
Christy JacobandGitHub c393e130ac Merge pull request #4983 from appwrite/fix-collection-delete
Fix deletes worker not deleting database collections
2023-01-27 14:40:14 +05:30
Christy JacobandGitHub c56f8277c9 Merge pull request #4984 from appwrite/fix-project-delete
Fix deletes worker not deleting project database tables
2023-01-27 13:45:07 +05:30
Jake Barnby c9f4b7ca23 Delete project domains and certificates 2023-01-27 16:46:38 +13:00
Christy JacobandGitHub 81b08de407 Merge pull request #5049 from appwrite/feat-update-dbip
Update DBIP Database
2023-01-26 22:15:02 +05:30
Bradley Schofield ade2e10994 Update DBIP Database 2023-01-26 14:57:02 +00:00
Christy JacobandGitHub 54f4bef67a Merge pull request #5004 from appwrite/feat-remove-validators
Replace Appwrite Validators with backported Utopia ones
2023-01-26 16:03:06 +05:30
Christy JacobandGitHub 860542deae Merge pull request #4669 from eltociear/patch-2
Fix typo in Model/Locale.php
2023-01-26 16:01:31 +05:30
Christy JacobandGitHub 7c2c68c5ec Merge pull request #4988 from appwrite/fix-storage-device-case
Convert _APP_STORAGE_DEVICE env var to lowercase
2023-01-26 15:24:26 +05:30
Christy JacobandGitHub 4ea82fb2d0 Merge pull request #4795 from appwrite/fix-compression-logic
feat: use constants in switch case
2023-01-23 17:50:33 +05:30
Vincent (Wen Yu) Ge efcaa8ba77 update specs 2023-01-20 17:27:14 -05:00
Vincent (Wen Yu) Ge b25dc38a63 clarify custom ID vs unique ID 2023-01-20 22:22:16 +00:00
Christy JacobandGitHub 2f252ecee7 Merge pull request #4754 from appwrite/feat-pr-template
Update PR Template
2023-01-21 02:01:26 +05:30
StevenandGitHub e14f4404e0 Merge branch 'master' into feat-4803-flutter-web-platform-type 2023-01-20 12:04:58 -08:00
Christy JacobandGitHub b645f42881 Merge pull request #4515 from Akshay-Rana-Gujjar/fix-4446-updated-timestamp-format-to-ISO-in-realtime-payload
updated timestamp format to ISO string in realtime payload
2023-01-20 18:16:30 +05:30
Christy Jacob 58c4c3da1e feat: update changelog 2023-01-20 09:52:11 +00:00
Christy Jacob 0a98ad6042 Merge branch 'master' of https://github.com/appwrite/appwrite into fix-4446-updated-timestamp-format-to-ISO-in-realtime-payload 2023-01-20 09:51:19 +00:00
Christy JacobandGitHub e72c5511b6 Merge pull request #4654 from appwrite/fix-test-warnings
Fix null warnings
2023-01-17 17:45:10 +05:30
Bradley SchofieldandGitHub 4cc135e8e2 Merge branch 'master' into fix-test-warnings 2023-01-17 10:16:53 +00:00
Jake Barnby 536d36be7d Fix delete recursion 2023-01-17 17:31:14 +13:00
Aayush Bisen 4975a769e7 add restart policy in root compose file
Fixes #4986
2023-01-14 09:39:29 +00:00
Vincent (Wen Yu) Ge d9edc65e9d Generate specs for 1.2.x 2023-01-13 15:30:48 -05:00
Vincent (Wen Yu) Ge 45aea5b941 Update branch with master 2023-01-13 14:53:54 -05:00
Vincent (Wen Yu) Ge 92a384e31c Fix descriptions for ID and regen 1.2.x specs 2023-01-13 14:27:08 -05:00
Bradley Schofield f5715f4df8 Update Spec generator 2023-01-13 15:43:57 +00:00
Bradley Schofield 7910149053 Remove tests and update other references to old validators 2023-01-13 15:42:29 +00:00
Bradley Schofield 31b718d829 Replace Appwrite Validators with backported Utopia ones
+ Updated Utopia Framework to 0.26.0
+ Replaced Appwrite Validators with Utopia ones
2023-01-13 15:28:04 +00:00
cb9b94ff04 Update Platform Model type property description
Co-authored-by: Ian Koerich Maciel <ianmaciel@gmail.com>
2023-01-12 11:33:29 -08:00
Jake Barnby 004bb82688 Fix functions + builds not deleted 2023-01-12 22:42:07 +13:00
Jake Barnby d49de9c6cf Use getProjectDB instead of new function 2023-01-12 22:27:20 +13:00
Christy JacobandGitHub a35cf0b4c0 Merge pull request #4991 from appwrite/fix-function-timeout-example
Function default timeout example fix
2023-01-12 13:53:25 +05:30
Eldad A. FuxandGitHub f0bb8dcc33 Merge pull request #4859 from appwrite/refactor-mails-next
refactor: make mails event and worker general
2023-01-12 09:07:43 +02:00
Aayush Bisen c9664e2d19 add restart policy for worker-messaging container
Fixes #4986
2023-01-12 06:51:50 +00:00
Steven Nguyen be77b10549 Add flutter-web as a platform type
Having a dedicated type for flutter-web will allow us to differentiate
between Flutter Web and Web in the Appwrite Console.
2023-01-11 15:47:49 -08:00
Vincent (Wen Yu) Ge a1cb81abb6 Function default timeout example to 15s, so it doesn't look like a timestamp. 2023-01-11 21:49:15 +00:00
Steven Nguyen 2b4dbfb4b9 Convert _APP_STORAGE_DEVICE env var to lowercase
This is done for backwards compatibility. Up to utopia-php/storage
version 0.12.X, the devices were not lowercase. Starting 0.13.X, they
are all converted to lowercase, but people would still have the old
case in their .env file. This change makes the value check insensitive
so that the value from older versions still works.
2023-01-11 11:41:26 -08:00
Jake Barnby 4b0ef4598b Fix deletes worker not deleting project database tables 2023-01-11 19:37:06 +13:00
Jake Barnby da8af68e1e Fix deletes worker not deleting database collections 2023-01-11 17:20:43 +13:00
Eldad A. FuxandGitHub 514b42bea2 Merge pull request #4741 from appwrite/fix-update-contribution-guide
Update contributing guide to include submodule update command
2023-01-08 13:37:14 +02:00
Eldad A. FuxandGitHub 3ca0ff66d6 Merge pull request #4964 from appwrite/fix-3433-bump-storage
Bump utopia-php/storage
2023-01-08 13:36:42 +02:00
Steven Nguyen 04fa436dca Bump utopia-php/storage
Update storage to fix bug with S3 provider paths
2023-01-06 10:28:40 -08:00
Eldad A. FuxandGitHub fe84af90b6 Merge pull request #4934 from appwrite/doc-editing-agency
Updates readme and contributing guide according to suggestions from editing agency
2022-12-30 17:10:24 +02:00
Vincent (Wen Yu) Ge ae6736222c Remove eldad's name 2022-12-30 15:02:21 +00:00
5e090c4cd4 Update CONTRIBUTING.md
Co-authored-by: Eldad A. Fux <eldad.fux@gmail.com>
2022-12-30 09:38:18 -05:00
Vincent (Wen Yu) Ge eccae13651 Contribution guide updated 2022-12-29 22:40:53 +00:00
Vincent (Wen Yu) Ge 7eae5c300d Updates readme according to suggestions from editing agency 2022-12-29 21:46:03 +00:00
Eldad A. FuxandGitHub bc2d8c44c5 Merge pull request #4928 from appwrite/fix-graphql-examples
Update graphql examples to recursively show nested fields
2022-12-28 19:29:38 +02:00
Steven Nguyen b7ceae67b9 Update graphql examples to recursively show nested fields 2022-12-28 09:04:11 -08:00
Torsten DittmannandGitHub 76cc9af5a3 Merge pull request #4926 from appwrite/eldadfux-patch-1
Update README.md
2022-12-28 10:37:34 +01:00
Eldad A. FuxandGitHub a79e9efa78 Update README.md 2022-12-28 11:36:29 +02:00
Eldad A. FuxandGitHub 528bae3c53 Merge pull request #4925 from appwrite/fix-graphql-examples
Fix graphql examples to include _ for internal attributes
2022-12-28 08:52:03 +02:00
Steven Nguyen 79cfb49320 Fix graphql examples to include _ for internal attributes 2022-12-27 15:59:44 -08:00
Eldad A. FuxandGitHub 14fb586c4b Merge pull request #4923 from appwrite/fix-missing-var-category
Fix missing env var category
2022-12-28 01:05:57 +02:00
Matej Bačo 014457636c Fix missing env var category 2022-12-27 23:58:30 +01:00
Eldad A. FuxandGitHub 0aa853fdcf Merge pull request #4922 from appwrite/fix-docs
Fix:getting started docs
2022-12-28 00:58:06 +02:00
Eldad A. FuxandGitHub 070fb9b7cb Merge pull request #4920 from appwrite/feat-upgrade-sdk-generator
Feat: Upgrade SDK generator
2022-12-27 23:31:01 +02:00
Matej Bačo 7931253033 Fix flutter getting started docs 2022-12-27 22:30:49 +01:00
Matej Bačo 9e74be61d4 Upgrade SDK generator 2022-12-27 22:02:34 +01:00
Eldad A. FuxandGitHub 5bd90c57f1 Merge pull request #4919 from appwrite/fix-sdk-changelogs
Fix: SDK changelogs
2022-12-27 22:51:23 +02:00
Eldad A. FuxandGitHub 4d9901babb Merge pull request #4918 from appwrite/fix-nested-graphql-escaping
Fix: nested escaping
2022-12-27 22:51:08 +02:00
Matej Bačo 2405377593 Update SDK changelogs 2022-12-27 21:40:10 +01:00
Matej Bačo 0865b240c4 Fix linter 2022-12-27 20:33:16 +01:00
Matej Bačo 991c6dea64 Fix nested escaping 2022-12-27 20:15:22 +01:00
Eldad A. FuxandGitHub c74e5dcb1a Merge pull request #4891 from appwrite/1.2.x
1.2.x
2022-12-27 18:24:31 +02:00
Eldad A. FuxandGitHub 7c7e7c7bca Merge pull request #4917 from appwrite/1.2.x-fix-deps-version
Fix: 1.2.x deps version
2022-12-27 17:36:13 +02:00
Matej Bačo f77e150fe0 Fix version 2022-12-27 16:33:28 +01:00
Eldad A. FuxandGitHub 55031f8f43 Merge pull request #4916 from appwrite/doc-session-limit
Update descriptions for create session endpoints about session limits
2022-12-27 17:22:06 +02:00
Matej Bačo df0409d25c Update specs 2022-12-27 16:18:55 +01:00
Matej Bačo 0e80a548c7 Merge branch '1.2.x' into doc-session-limit 2022-12-27 16:16:17 +01:00
Vincent (Wen Yu) GeandGitHub ee432192de Update create-session-oauth2.md 2022-12-27 10:05:28 -05:00
Vincent (Wen Yu) Ge f9491a73a4 Update descriptions for create session endpoints about session limits 2022-12-27 15:04:06 +00:00
Eldad A. FuxandGitHub 8681acfeab Merge pull request #4912 from appwrite/fix-auth-session-limit-model
Fix: auth session limit model
2022-12-27 16:38:41 +02:00
Torsten DittmannandGitHub fa969dedbc Merge pull request #4915 from appwrite/fix-1.2.x-migration
Fix: 1.2.x migration
2022-12-27 15:04:31 +01:00
Matej Bačo 070edcf55a Fix buckets migration 2022-12-27 14:55:32 +01:00
Torsten DittmannandGitHub a528b66232 Merge pull request #4914 from appwrite/feat-console-upgrade-2.1.1
Feat: console upgrade 2.1.1
2022-12-27 13:00:13 +01:00
Matej Bačo c2d597e8c6 Upgrade console version 2022-12-27 12:56:26 +01:00
Torsten DittmannandGitHub 616348a312 Merge pull request #4913 from appwrite/feat-1.2.x-upgrade-console
Upgrade console
2022-12-27 12:25:29 +01:00
Matej Bačo 0384b705f9 Upgrade console 2022-12-27 12:19:02 +01:00
Matej Bačo d722bf01ea Code review changes 2022-12-27 11:40:24 +01:00
Matej Bačo 02d86cee84 Fix bug and update test 2022-12-27 11:33:38 +01:00
Torsten DittmannandGitHub 0347a8a1df Merge pull request #4910 from appwrite/fix-1.2.x-conflicts
Fix: 1.2.x merge conflicts
2022-12-27 10:49:53 +01:00
Torsten DittmannandGitHub a9e9fe3e67 Merge pull request #4911 from appwrite/feat-1.2.x-migrations
Feat: 1.2.x migrations
2022-12-27 10:33:08 +01:00
Matej BačoandGitHub 7532309bbb Apply suggestions from code review 2022-12-27 10:31:49 +01:00
Matej Bačo a922f7f0e1 Fix test 2022-12-27 09:15:05 +01:00
Matej Bačo 39cb846ae0 Fix failing test 2022-12-27 09:09:47 +01:00
Matej Bačo d63c429d3e Implement 1.2 migration 2022-12-27 08:35:55 +01:00
Matej Bačo ccc9432219 Merge branch 'master' into fix-1.2.x-conflicts 2022-12-27 08:29:10 +01:00
Matej Bačo 804dbb867c Re-add migration, add missing env vars 2022-12-27 08:24:34 +01:00
Eldad A. FuxandGitHub d4091e82e0 Merge pull request #4909 from appwrite/1.2.x-release-preps
Feat: 1.2.x release preps
2022-12-26 14:22:26 +02:00
Matej Bačo 65fec6b954 Update generated docs 2022-12-26 13:17:28 +01:00
Matej Bačo 3826937a7b Update 1.2 specs 2022-12-26 13:16:12 +01:00
Matej Bačo 4d33ba6db1 Fix big in migration class 2022-12-26 13:16:01 +01:00
Matej Bačo 14b6aa0e8e Update SDK versions 2022-12-26 13:08:31 +01:00
Matej Bačo bbe29e9aa7 Preparations for 1.2.0 2022-12-26 13:06:35 +01:00
Matej Bačo 18c4f2b92a Upgrade sdk-generator 2022-12-26 13:03:32 +01:00
Eldad A. FuxandGitHub 213d17ffad Merge pull request #974 from appwrite/feat-graphql-support
Feat graphql support
2022-12-26 13:27:48 +02:00
Matej Bačo 614d7d878f Add missing ENV var to docker compose 2022-12-26 11:14:35 +01:00
Eldad A. FuxandGitHub f9371ee4f3 Merge pull request #4896 from appwrite/fix-max-session-method
Fix max session method
2022-12-23 23:49:26 +02:00
Vincent (Wen Yu) Ge 1a92bf1923 regen specs 2022-12-22 23:00:29 +00:00
Eldad A. FuxandGitHub 054ebc699c Merge pull request #4783 from pomarec/fix-4782-email-body-fr-translation
Fix : translation french "emails.recovery.body"
2022-12-22 14:25:19 +02:00
Jake Barnby 27b1ae912a Merge remote-tracking branch 'origin/fix-max-session-method' into feat-graphql-support 2022-12-22 21:11:35 +13:00
Jake Barnby 43c850bd9b Deduplicate SDK method name 2022-12-22 21:03:06 +13:00
Jake Barnby 9694b79f03 Update changelog 2022-12-22 19:59:29 +13:00
Jake Barnby cbf1d9deb6 Fix indentation 2022-12-22 19:16:03 +13:00
Jake Barnby 4699d78112 Remove redundant import 2022-12-22 19:15:02 +13:00
Jake Barnby 89fb5dceb2 Remove redundant logo 2022-12-22 19:02:20 +13:00
Jake Barnby e86994b597 Add retries for flaky tests 2022-12-22 16:12:45 +13:00
Jake Barnby 6adbeb8b0d Revert test change 2022-12-22 15:32:14 +13:00
Jake Barnby dc49e1dcf3 Update user test type 2022-12-22 12:52:54 +13:00
StevenandGitHub 9167b10c81 Merge branch 'master' into fix-4782-email-body-fr-translation 2022-12-21 11:45:50 -08:00
Vincent (Wen Yu) Ge 93b489fe2c revert composer lock update 2022-12-21 19:22:03 +00:00
Jake Barnby 524a6db72d Hide get method from SDKs 2022-12-21 20:45:34 +13:00
Jake Barnby 2ee9f2607f Remove redundant code 2022-12-21 19:15:42 +13:00
Vincent (Wen Yu) Ge 8239113b95 Grammarly check 2022-12-20 21:43:55 +00:00
Vincent (Wen Yu) Ge 37fc5114ab Update permission param descriptions for grammar and clarity. 2022-12-20 21:39:41 +00:00
Christy JacobandGitHub 37ce513b87 Merge pull request #4341 from megatank58/patch-1
fix: correctly handle `=` in .env
2022-12-20 16:32:29 +05:30
Christy JacobandGitHub 8fdafdce45 Merge pull request #4533 from vimode/doc-windows-powershell-installation-new-line-fix
docs: update windows powershell commands
2022-12-20 15:40:37 +05:30
Christy JacobandGitHub cb0a927e34 Merge pull request #4050 from geisterfurz007/fix-3916-empty-payload-returned-as-object
fix: empty payload returned as list
2022-12-20 13:37:24 +05:30
Christy JacobandGitHub 6b31edfdef Merge pull request #4506 from karniv00l/user-not-found-exception
Fix User not found exception
2022-12-20 13:25:35 +05:30
Christy JacobandGitHub 1e94400a7b Merge pull request #4332 from Sushrut1101/master
workflows: Update actions/checkout to v3
2022-12-20 13:23:08 +05:30
Christy JacobandGitHub 36e6b7e5c0 Merge pull request #4317 from tusharxoxoxo/patch-6
Update add-translations.md
2022-12-20 02:39:16 +05:30
Christy JacobandGitHub a8b36f8259 Merge pull request #4298 from kalpeshT101/doc-fix-readme
Remove invalid link
2022-12-20 02:35:50 +05:30
Christy JacobandGitHub adb21683e0 Merge pull request #4285 from vrabe/update-zh-tw-translation
update zh-tw translation
2022-12-20 02:31:41 +05:30
Christy JacobandGitHub 7cf49ac1f6 Merge pull request #4534 from sarthakroy2002/master
workflows: Update codeql-action to v3
2022-12-20 00:17:50 +05:30
vimodeandGitHub fc1b0b0196 Merge branch 'master' into doc-windows-powershell-installation-new-line-fix 2022-12-19 18:37:04 +00:00
Christy JacobandGitHub 3e3cb638f4 Merge pull request #4537 from keul/patch-1
Fixed README documentation
2022-12-19 20:20:54 +05:30
Jake Barnby 09a6726afa Update specs 2022-12-19 20:52:14 +13:00
Jake Barnby 56a903577f Remove docs false 2022-12-19 20:51:34 +13:00
Jake Barnby 11ef344216 Remove get method from SDKs 2022-12-19 19:07:04 +13:00
Jake Barnby bcceee9a7d Update for SDK generator changes
(cherry picked from commit d6bd0f466b76229e1bf5915d2fb5642cde7d3b69)
2022-12-19 19:06:57 +13:00
Damodar Lohani 12302d5b3d refactor: remove empty param 2022-12-16 06:34:03 +00:00
Damodar Lohani b7d17e82da fix: membership invite email 2022-12-16 06:15:23 +00:00
Damodar Lohani 495da1bfd4 fix: template path 2022-12-16 06:11:12 +00:00
ea241ceaf5 Update app/workers/certificates.php
Co-authored-by: Eldad A. Fux <eldad.fux@gmail.com>
2022-12-16 11:33:16 +05:45
Damodar Lohani 5d195659bd refactor: mails refactor 2022-12-15 09:22:05 +00:00
Jake Barnby d107b92748 Remove debug flags on production instead of abuse enabled 2022-12-15 13:44:23 +13:00
Jake Barnby ab08f0ca40 Fix prism settings for graphql platforms 2022-12-15 13:39:13 +13:00
Jake Barnby 64b74d4100 Add alias route to allow for multiple SDK method names 2022-12-15 13:36:47 +13:00
Damodar Lohani 5741a960c7 refactor: use refactored maile event and worker 2022-12-14 06:35:04 +00:00
Damodar Lohani 42c855cb41 feat: make mails event and worker general 2022-12-14 06:23:14 +00:00
Jake Barnby ff33068906 Merge remote-tracking branch 'origin/1.2.x' into feat-graphql-support 2022-12-13 21:37:21 +13:00
Eldad A. FuxandGitHub e05fbb23a9 Merge pull request #4831 from appwrite/feat-user-session-limits
feat (projects): auth session limit
2022-12-13 10:34:59 +02:00
Jake Barnby cf9d67e9cc Fix assoc input for account prefs 2022-12-13 20:04:05 +13:00
Jake Barnby 5e9eccacd1 Allow create deployment from explorer 2022-12-13 19:49:20 +13:00
Damodar Lohani 255c4043d6 fix lint errors 2022-12-13 06:33:26 +00:00
Damodar Lohani ae24689b89 default auth session limit 10 2022-12-13 06:26:25 +00:00
Damodar Lohani 2c46cdcc3c add session default and comment 2022-12-13 06:08:38 +00:00
Jake Barnby 478c37ef97 Remove coming soon from architecture diagram 2022-12-13 18:23:23 +13:00
Jake Barnby aa7e326ce9 Allow file uploads from explorer 2022-12-13 15:43:29 +13:00
Jake Barnby 4868b8f8ec Update explorer image 2022-12-13 01:47:07 +13:00
Damodar Lohani c60a3a66a0 feat: session limit separate default and max value 2022-12-12 05:07:18 +00:00
Damodar Lohani ca39ed37d8 reset limit on test 2022-12-12 05:02:48 +00:00
Damodar Lohani e0be09ded6 refactor: use session group for session limit 2022-12-11 08:33:52 +00:00
Damodar Lohani 3885e0452c fix: session limit test 2022-12-11 08:26:31 +00:00
Damodar Lohani a6afc41c99 fix: update test 2022-12-11 07:15:47 +00:00
Damodar Lohani fd93c8aebd feat: add auth session limit param 2022-12-11 07:15:18 +00:00
Damodar Lohani 509aef16bd fix: delete user document cache 2022-12-11 07:13:39 +00:00
Damodar Lohani 65bacc6983 fix: naming and use constant 2022-12-11 07:13:11 +00:00
Damodar Lohani cda8e53386 feat: add test for max sessions 2022-12-09 11:54:23 +00:00
Damodar Lohani cbcc17ded6 refactor: add whitespace 2022-12-09 11:36:39 +00:00
Damodar Lohani f070f0974a session limit check on shutdown 2022-12-09 11:33:26 +00:00
Jake Barnby ccc5f7776d Cast to array for stdClass case 2022-12-08 18:02:35 +13:00
Jake Barnby ddbd03388e Remove prefixed items from additional data 2022-12-08 16:10:49 +13:00
Jake Barnby fd52cdc45f Revert prefix to _ 2022-12-08 16:08:57 +13:00
Jake Barnby da2821b4a8 Fix blacklist entries 2022-12-08 13:10:35 +13:00
Jake Barnby 4de3289ebb Remove redundant function 2022-12-07 19:29:24 +13:00
Jake Barnby e4f546eae0 Fix contribution merge changes 2022-12-07 19:28:37 +13:00
Jake Barnby 15654f8c99 Merge remote-tracking branch 'origin/1.2.x' into feat-graphql-support 2022-12-07 19:19:59 +13:00
Christy JacobandGitHub 2b72771781 Merge pull request #4736 from appwrite/sync-1.2.x
Sync 1.2.x
2022-12-06 20:57:13 +04:00
Damodar Lohani 27d7f4f083 fix (projects): session limits
Set max session limits to 100 and default session limits to 10
2022-12-06 10:52:17 +00:00
Damodar Lohani 1da3f7770f feat (projects): auth session limit
Add endpoint on project to set max number of sessions for project users.
2022-12-06 10:45:04 +00:00
Jake Barnby a12eaf12b4 Merge remote-tracking branch 'origin/master' into sync-1.2.x 2022-12-06 20:40:32 +13:00
Jake Barnby b6723b7c83 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/init.php
2022-12-06 20:38:09 +13:00
Christy Jacob 77d4627d42 feat: use constants in switch case 2022-11-26 19:45:29 +04:00
P.O Marec 31089b76fb Fix : translation french "emails.certificate.body" 2022-11-26 13:04:46 +01:00
P.O.M 0cd67229a1 Fix : translation french "emails.recovery.body"
Wrong reference to project variable
2022-11-26 13:04:44 +01:00
Steven Nguyen 3e0456291f Update PR template
1. Ask for why in description to help with troubleshooting in the future
2. Change related PRs to a list so it renders nicer
3. Remove changes.md task in favor of just using milestones to track changes
4. Add reminder to check if API specs need to be updated
2022-11-22 09:42:54 -08:00
Steven Nguyen 7b09fa3f17 Update contributing guide to include submodule update command 2022-11-21 08:28:29 -08:00
Jake Barnby ce1b41b312 Merge branch 'master' into sync-1.2.x 2022-11-21 17:28:43 +13:00
Jake Barnby 5a84a37a9e Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/init.php
2022-11-18 12:41:48 +13:00
Jake Barnby 163cbc5052 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	composer.json
#	composer.lock
2022-11-17 21:41:56 +13:00
Jake Barnby f9d2976c1d Merge remote-tracking branch 'origin/1.1.x' into feat-graphql-support
# Conflicts:
#	CHANGES.md
#	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
#	app/init.php
#	app/tasks/sdks.php
#	composer.lock
#	docker-compose.yml
2022-11-16 19:37:35 +13:00
Jake Barnby dd6c5c056f Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	CHANGES.md
2022-11-16 19:31:40 +13:00
Bradley Schofield a19e668d79 Update storage.php 2022-11-14 13:11:43 +00:00
Ikko AshimineandGitHub 956db2ec2f Fix typo in Model/Locale.php
Europian -> European
2022-11-14 21:31:08 +09:00
Bradley Schofield bc915483ff Update CHANGES.md 2022-11-09 13:52:46 +00:00
Bradley Schofield a0ab934328 Fix another null warning 2022-11-09 13:23:14 +00:00
Bradley Schofield 29c30a361b Fix null warnings
- Fixed Avatars isset operator
- Added isset operator to openSSL data in files
- dns_get_record does not throw errors, instead it logs a warning and returns false. Altered code accordingly. PHP Bug Report: https://bugs.php.net/bug.php?id=73149
-
2022-11-09 11:45:15 +00:00
Jake Barnby a47bfe71bf Merge remote-tracking branch 'origin/1.2.x' into feat-graphql-support
# Conflicts:
#	CHANGES.md
#	composer.json
#	composer.lock
#	tests/e2e/Services/Functions/FunctionsCustomServerTest.php
2022-11-04 21:32:57 +13:00
Christy JacobandGitHub de63618842 Merge pull request #4621 from appwrite/sync-1.2.x
Sync 1.2.x
2022-11-04 09:17:31 +05:30
Christy Jacob 8e99c44c59 Merge branch 'master' of github.com:appwrite/appwrite into sync-1.2.x 2022-11-02 20:39:20 +05:30
Christy Jacob 360a51ec20 Merge branch '1.1.x' of github.com:appwrite/appwrite into sync-1.2.x 2022-11-02 10:16:27 +05:30
Christy Jacob e9239717d7 Merge branch 'master' of github.com:appwrite/appwrite into sync-1.2.x 2022-11-02 10:16:16 +05:30
Kalpesh cbe7b35436 Update README-CN.md 2022-11-01 16:20:29 +05:30
Jake Barnby 8a4fd3307d Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	composer.json
#	composer.lock
2022-11-01 11:38:23 +13:00
Jake Barnby 03f85c3b74 Merge remote-tracking branch 'origin/1.1.x' into feat-graphql-support
# 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
#	composer.json
#	composer.lock
#	src/Appwrite/Utopia/Response/Model/Provider.php
2022-11-01 11:07:51 +13:00
Damodar LohaniandJake Barnby a97a476296 assert buildTime is greater than 0
(cherry picked from commit 24a140c3af)
2022-11-01 11:04:42 +13:00
Damodar LohaniandJake Barnby 11f3474cb8 buildTime attribute to deployment
(cherry picked from commit 7989518eec)
2022-11-01 11:04:27 +13:00
geisterfurz007 e891424c17 fix: empty payload deleting single user session 2022-10-31 21:01:49 +01:00
Jake Barnby 6234ff20f4 Add test for rate limit enforced when using graphql 2022-10-28 20:13:48 +13:00
Jake Barnby db49e962f4 Use abuse status instead of dev/prod for graphql abuse check 2022-10-28 20:12:11 +13:00
Jake Barnby c23cca950a Merge branch 'fix-provider-model' into feat-graphql-support 2022-10-28 11:30:15 +13:00
Jake Barnby 9274ec6880 Fix type error 2022-10-28 11:26:32 +13:00
Jake Barnby 323c0c5ab7 Revert debug changes 2022-10-28 10:25:59 +13:00
Jake Barnby e46eeb3e16 Remove namespace from var name 2022-10-28 10:19:09 +13:00
Jake Barnby 2a96056b8d Remove redundant import and sort 2022-10-28 10:06:09 +13:00
Jake Barnby 89b4d0026a Move shutdown hook to graphql controller 2022-10-28 10:04:31 +13:00
Jake Barnby 2469a42d1d Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-10-27 12:25:37 +13:00
Jake Barnby e632731c4e Merge remote-tracking branch 'origin/1.1.x' into feat-graphql-support 2022-10-27 12:24:57 +13:00
Jake Barnby 9620dcbc07 Update specs 2022-10-26 16:22:01 +13:00
Jake Barnby c8b19bd84d Update lock 2022-10-26 16:21:24 +13:00
Jake Barnby c5bda4d2ff Add REST to platforms and SDKs 2022-10-26 16:19:30 +13:00
Jake Barnby 9fbf8d6aee Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	tests/e2e/General/HTTPTest.php
2022-10-26 13:54:52 +13:00
Jake Barnby 2f444ead34 Revert "Review revert unrelated change"
This reverts commit bf064fa5c9.
2022-10-25 18:31:51 +13:00
Jake Barnby b6e7e84d50 Comments 2022-10-25 16:35:00 +13:00
Jake Barnby e3b5919e40 Review doc fixes 2022-10-25 15:53:15 +13:00
Jake Barnby 34bd0fe93d Review remove redundant registry injection 2022-10-25 15:45:08 +13:00
Jake Barnby bf064fa5c9 Review revert unrelated change 2022-10-25 15:44:19 +13:00
Jake Barnby e2840a1c84 Remove docs to reduce PR size 2022-10-25 12:51:22 +13:00
Jake Barnby 889db82ad4 Fix spec tests 2022-10-25 12:34:57 +13:00
motasimmakki 66893be752 docs: Removed unnecessary $ symbol and spaced correctly. 2022-10-22 10:07:18 +05:30
Jake Barnby 2d6974da82 Fix empty examples 2022-10-21 15:28:06 +13:00
Jake Barnby f9a32f6011 Fix reserved attribute selections 2022-10-21 13:53:54 +13:00
Luca FabbriandGitHub a174c6aca6 Fixed README documentatio
See https://github.com/appwrite/sdk-for-node/pull/43
2022-10-20 10:17:54 +02:00
Jake Barnby 81e1d2ac82 Fix examples 2022-10-20 19:58:24 +13:00
Jake Barnby 40be56b35f Set isSDK false for graphql 2022-10-20 18:52:51 +13:00
Jake Barnby 99b8769151 Fix family 2022-10-20 18:40:34 +13:00
Jake Barnby 3d2ff6b587 Fix doc extensions 2022-10-20 18:02:33 +13:00
Jake Barnby f0bfdf3a1b Add initial 1.2.x docs 2022-10-20 16:52:52 +13:00
Jake Barnby 455b9ca5df Add initial 1.2.x specs 2022-10-20 16:22:30 +13:00
Jake Barnby 2eed73395a Add GraphQL platform 2022-10-20 16:21:16 +13:00
Jake Barnby 19123257fc Strip $ instead of replace to match SDK models 2022-10-20 15:29:56 +13:00
Jake Barnby 6a4f3d6a6b Merge remote-tracking branch 'origin/master' into feat-graphql-support
# 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
2022-10-20 12:41:24 +13:00
Jake Barnby 120b788343 Update resolvers for framework changes 2022-10-20 12:22:46 +13:00
Jake Barnby ce76fb58b1 Update request/response extensions for framework changes 2022-10-20 12:12:09 +13:00
Jake Barnby f54aa1f4c2 Update framework + swoole 2022-10-20 12:10:41 +13:00
Sarthak RoyandGitHub c57da64feb workflows: Update codeql-action to v3 2022-10-19 21:59:12 +05:30
vimo c772844bcb docs: update windows powershell commands 2022-10-19 16:37:46 +05:30
Jake Barnby 5a2dc60420 Fix options test 2022-10-19 22:23:08 +13:00
Jake Barnby f6dc7b2068 Add OAuth to blacklist 2022-10-19 13:23:42 +13:00
Jake Barnby c2e0ef3f98 Merge remote-tracking branch 'origin/1.0.x' into feat-graphql-support
# Conflicts:
#	CHANGES.md
2022-10-19 13:21:06 +13:00
Jake Barnby a2b1941a47 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	CONTRIBUTING.md
#	composer.json
#	composer.lock
#	docs/references/teams/list-teams.md
2022-10-19 13:17:56 +13:00
Jake Barnby 61e5014ff0 Add sdk graphql header to allowed headers list 2022-10-19 13:01:39 +13:00
Akshay Rana 641a4af8d4 upated the timestamp code 2022-10-18 22:40:50 +05:30
c08f2e65e6 Updated timestamp format
Co-authored-by: Steven <1477010+stnguyen90@users.noreply.github.com>
2022-10-18 22:22:01 +05:30
megatank58andGitHub 819ba45836 chore(tests): add test case for value ending in = 2022-10-17 16:02:24 +05:30
megatank58andGitHub d1e9e7b396 chore(tests): update .env 2022-10-17 16:01:28 +05:30
Akshay Rana 1fcc5eccb1 updated timestamp format to ISO string in realtime payload 2022-10-17 12:44:44 +05:30
Jake Barnby e0f6b8c105 Update specs 2022-10-17 14:43:27 +13:00
Jake Barnby fb5d2fc25c Abstract setting params to init 2022-10-17 13:27:15 +13:00
Jake Barnby fb68ed377e Fix imports 2022-10-17 12:13:35 +13:00
Jake Barnby cecc6dada2 Merge remote-tracking branch 'origin/1.1.x' into feat-graphql-support
# 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
#	app/init.php
#	composer.json
#	composer.lock
2022-10-17 12:04:13 +13:00
Piotr Rogowski b65a8c86c5 Add tests 2022-10-15 22:09:10 +02:00
vrabe f260836100 Update the name of Eswatini (Swaziland) 2022-10-15 19:14:20 +08:00
Piotr Rogowski 833e3f8ce1 Fix User not found exception 2022-10-14 18:17:00 +02:00
Jake Barnby d163217d1f Remove Appwrite URL dependency from resolvers 2022-10-14 18:04:23 +13:00
Jake Barnby a1718e8a44 Remove database dependency from mapper 2022-10-14 18:01:39 +13:00
Jake Barnby 09e0e948b5 Remove resolver database dependency 2022-10-14 18:00:22 +13:00
Jake Barnby 3f98cef633 Fix spec test 2022-10-14 14:40:34 +13:00
Jake Barnby a99ade13c0 Don't flatten batch results 2022-10-14 14:33:42 +13:00
Jake Barnby 742fc98cfc Controller cleanup 2022-10-14 14:32:16 +13:00
Jake Barnby 444c68e07e Remove redundant error 2022-10-14 13:23:21 +13:00
Jake Barnby 44e4f1e05b Make param errors consistent 2022-10-14 13:18:08 +13:00
Jake Barnby 64ad2211c7 Update specs + sdk generator 2022-10-13 17:42:53 +13:00
Jake Barnby e4673aaa50 Fix requests using x-sdk-graphql header 2022-10-13 17:33:55 +13:00
Jake Barnby 4e60db0598 Use upstream raw payload function 2022-10-13 16:56:12 +13:00
Jake Barnby 143c53cb20 Always set 200 status code to match spec 2022-10-13 14:52:08 +13:00
Jake Barnby 9c372d7335 Fix checking content type with postfixes 2022-10-13 14:32:06 +13:00
Jake Barnby a2b532ed22 Set dirty property instead of in registry from shutdown 2022-10-13 12:59:32 +13:00
Jake Barnby 5c5bdac3d9 Add route blacklist instead of individual cases 2022-10-13 12:58:28 +13:00
Jake Barnby aa5e9d7b2d Update service doc 2022-10-12 22:24:10 +13:00
Jake Barnby 9ae9213a97 Disable custom entity tests 2022-10-12 21:49:58 +13:00
Jake Barnby 9821cc5e18 Check if value has then function when setting result to check external promise types 2022-10-12 21:48:58 +13:00
Jake Barnby bb64bcc1c1 Allow cloning a request 2022-10-12 20:55:43 +13:00
Jake Barnby 597885028a Use request setters 2022-10-12 20:55:04 +13:00
Jake Barnby 5debe2c13c Alias + name fixes 2022-10-12 20:20:44 +13:00
Jake Barnby b6621f5e87 Restructure schema building 2022-10-12 14:04:11 +13:00
Jake Barnby 39fcbe4d76 Restructure exception 2022-10-12 13:59:35 +13:00
Jake Barnby 4bc44183b6 Restructure type related helpers 2022-10-12 13:57:37 +13:00
Jake Barnby ee2e8fcc23 Generify promises 2022-10-12 13:55:43 +13:00
Jake Barnby 20bee94175 Fix unit test 2022-10-11 14:20:19 +13:00
Jake Barnby bf194c30e9 Review updates 2022-10-11 13:38:06 +13:00
Jake Barnby d5dd83ea91 Fix tests for union and none types 2022-10-11 12:34:43 +13:00
Jake Barnby 62038bd2a9 Passthru JSON objects 2022-10-11 12:32:04 +13:00
Jake Barnby 0716c430d6 Fix getting union implementations 2022-10-11 12:31:12 +13:00
Jake Barnby 96bce27642 Cherrypick empty model rules 2022-10-11 12:28:46 +13:00
Jake Barnby fd8d4f4a1b Add type property to hash algorithms to allow resolving union type implementation 2022-10-11 12:27:03 +13:00
Jake Barnby 575b882b30 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	.github/workflows/tests.yml
#	composer.lock
2022-10-10 18:41:40 +13:00
Tushar DahiyaandGitHub 4100a3acdc Merge pull request #5 from tusharxoxoxo/tusharxoxoxo-patch-5
Update add-storage-adapter.md
2022-10-09 17:00:02 +05:30
Tushar DahiyaandGitHub 25f46908b6 Update add-storage-adapter.md 2022-10-09 16:59:48 +05:30
Tushar DahiyaandGitHub 9cec0f5907 Merge pull request #4 from tusharxoxoxo/tusharxoxoxo-patch-4
Update add-route.md
2022-10-09 16:55:28 +05:30
Tushar DahiyaandGitHub 765dca4a3e Update add-route.md 2022-10-09 16:55:17 +05:30
Tushar DahiyaandGitHub 5775bef5b5 Merge pull request #3 from tusharxoxoxo/tusharxoxoxo-patch-3
Update add-runtime.md
2022-10-09 16:53:35 +05:30
Tushar DahiyaandGitHub 7536818ec2 Update add-runtime.md 2022-10-09 16:53:25 +05:30
Tushar DahiyaandGitHub 214c3e96a7 Merge pull request #2 from tusharxoxoxo/tusharxoxoxo-patch-2
Update add-storage-adapter.md
2022-10-09 16:50:22 +05:30
Tushar DahiyaandGitHub 7982a49332 Update add-storage-adapter.md 2022-10-09 16:50:11 +05:30
Tushar DahiyaandGitHub 5d89feec61 Merge pull request #1 from tusharxoxoxo/tusharxoxoxo-patch-1
Update add-translations.md
2022-10-09 16:48:46 +05:30
Tushar DahiyaandGitHub b085b78d69 Update add-translations.md 2022-10-09 16:48:29 +05:30
megatank58andGitHub d898ccd8e0 fix: correctly handle = in .env 2022-10-09 11:29:00 +05:30
Sushrut1101andGitHub a0d1a12f1e workflows: Update actions/checkout to v3 2022-10-08 12:32:58 +05:30
kalpesh 6d82f04493 Update README-CN.md 2022-10-08 12:20:46 +05:30
kalpesh 8209615609 Update README-CN.md 2022-10-08 12:19:41 +05:30
Tushar DahiyaandGitHub b4e0fe0735 Update add-translations.md 2022-10-07 09:47:04 +05:30
Tushar DahiyaandGitHub c1f567a9ef Update add-storage-adapter.md 2022-10-07 09:42:45 +05:30
Tushar DahiyaandGitHub f7db9f8ab2 Update add-runtime.md 2022-10-07 09:38:46 +05:30
Tushar DahiyaandGitHub b271a98867 Update add-route.md 2022-10-07 09:30:58 +05:30
kalpesh 01f4805bef Update README-CN.md 2022-10-05 19:32:34 +05:30
kalpesh 00f3902cc4 Revert "remove dead link"
This reverts commit 7b38e8cdf6.
2022-10-05 19:30:22 +05:30
kalpesh 7b38e8cdf6 remove dead link 2022-10-05 19:20:25 +05:30
vrabe 5236b48f34 你 to 您, for consistency 2022-10-04 20:41:46 +08:00
vrabe 018e4fe54b update zh-tw translation 2022-10-04 20:25:40 +08:00
Jake Barnby 6ac4d4f490 Handle response model union type rules 2022-09-30 19:59:20 +13:00
Jake Barnby 1fbcedec42 Move mapping functions to TypeMapper 2022-09-30 19:58:26 +13:00
Jake Barnby f1429e8155 Move custom types to their own class 2022-09-30 19:51:27 +13:00
Jake Barnby df651c3c78 Match class names instead of strings 2022-09-29 19:28:41 +13:00
Jake Barnby b176929557 Sort schema 2022-09-29 19:27:57 +13:00
Jake Barnby fe0bd6a66e Fix env 2022-09-29 17:59:41 +13:00
Jake Barnby 0471bf1c90 Only allow default values for optional params 2022-09-29 17:54:48 +13:00
Jake Barnby 73d0f033b8 Skip new models with no rules 2022-09-29 17:53:53 +13:00
Jake Barnby e5b9e261c5 Upcase type names 2022-09-29 17:53:07 +13:00
Jake Barnby 6c81069b27 Custom type serialization fixes 2022-09-29 17:51:53 +13:00
Jake Barnby 471f12b8ba Only apply max depth and complexity in production to allow introspection 2022-09-29 17:46:01 +13:00
Jake Barnby a3b75a374b Update variables and defaults 2022-09-23 15:55:10 +12:00
Jake Barnby 63a4853563 Fix list complexity calculations 2022-09-23 15:53:25 +12:00
Jake Barnby 318bea760e Fix defualt arg types nullability 2022-09-23 13:52:19 +12:00
Jake Barnby eb818d15e0 Fix custom entity update 2022-09-23 13:49:36 +12:00
Jake Barnby 6e4bad5969 Fix custom entity delete 2022-09-23 13:46:39 +12:00
Jake Barnby 8cd36b2721 Fix custom entity list 2022-09-22 22:48:22 +12:00
Jake Barnby 5f0f136e6e Refactor methods for clarity 2022-09-22 20:59:47 +12:00
Jake Barnby 5bd420a823 Remove redundant test class prefixes 2022-09-22 20:29:42 +12:00
Jake Barnby a5b31b1956 Fix auth test 2022-09-22 20:22:10 +12:00
Jake Barnby f7e5ccf296 Merge remote-tracking branch 'origin/fix-team-get-membership-model' into feat-graphql-support
# Conflicts:
#	CONTRIBUTING.md
2022-09-22 20:12:17 +12:00
Jake Barnby 2d1cd7cb50 Add queries validators 2022-09-22 18:54:58 +12:00
Jake Barnby f2af301f16 Update functions vars -> variables 2022-09-22 14:16:13 +12:00
Jake Barnby 734561c6b6 Fix users queries phone -> number 2022-09-22 13:57:31 +12:00
Jake Barnby a2778e410f Fix team get membership queries 2022-09-22 13:55:31 +12:00
Jake Barnby 76614d8659 Update ID usages 2022-09-22 13:53:41 +12:00
Jake Barnby 8af0983274 Handle role validator 2022-09-21 21:12:23 +12:00
Jake Barnby 6aee9e0ddb Update errors 2022-09-21 21:11:05 +12:00
Jake Barnby 390453aa9b Add datetime attribute test 2022-09-21 21:08:20 +12:00
Jake Barnby 4d21323001 Update permissions 2022-09-21 21:03:14 +12:00
Jake Barnby 7167ea2a5f Update permissions 2022-09-21 20:17:17 +12:00
Jake Barnby b69217bb39 Update avatar size 2022-09-21 19:52:09 +12:00
Jake Barnby 6a1dcfa3c8 Update abuse test 2022-09-21 19:37:43 +12:00
Jake Barnby b217cf20d7 Update get team membership query 2022-09-21 19:22:15 +12:00
Jake Barnby 0389cc9ef2 Update permissions 2022-09-21 19:11:49 +12:00
Jake Barnby 9f008a18ea Update number -> phone usages 2022-09-21 19:05:35 +12:00
Jake Barnby 378d02f269 Update get -> list usages 2022-09-21 19:03:28 +12:00
Jake Barnby 6c9ac29f37 Fix attribute unpacking 2022-09-21 19:01:01 +12:00
Jake Barnby e2f86aec62 Add graphql scope back for guests 2022-09-21 18:54:47 +12:00
Jake Barnby 144e723431 Update error handling 2022-09-21 18:36:43 +12:00
Jake Barnby 5cefda4ff2 Fix key replacements 2022-09-21 18:24:47 +12:00
Jake Barnby 544413dddf More 1.0 migrations 2022-09-20 20:25:05 +12:00
Jake Barnby bf0b416183 Update permissions and queries for 1.0 2022-09-20 19:51:22 +12:00
Jake Barnby fbcaa1f60a Update database test queries 2022-09-20 19:40:21 +12:00
Jake Barnby fd37df5f9c Handle datetime model rules 2022-09-20 19:24:54 +12:00
Jake Barnby 48ede78894 Fix roles 2022-09-20 19:03:04 +12:00
Jake Barnby e9f75d32a1 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	Dockerfile
#	app/config/errors.php
#	app/config/roles.php
#	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
#	app/controllers/api/graphql.php
#	app/controllers/shared/api.php
#	app/init.php
#	composer.lock
#	docker-compose.yml
#	src/Appwrite/Extend/Exception.php
#	src/Appwrite/Migration/Migration.php
2022-09-20 15:43:09 +12:00
Jake Barnby 8841f8fe76 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/controllers/general.php
#	app/controllers/shared/api.php
#	composer.json
#	composer.lock
2022-08-22 21:13:29 +12:00
Jake Barnby f3d8a7338a Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	composer.lock
2022-07-26 13:55:25 +12:00
Jake Barnby 185624fda1 Return schema by ref 2022-07-25 16:27:07 +12:00
Jake Barnby fd79922284 Per project keys 2022-07-25 16:26:46 +12:00
Jake Barnby d69e77d572 Add additional batch tests 2022-07-25 11:20:04 +12:00
Jake Barnby 24d0d84bd1 JSON decode packed query 2022-07-22 16:09:23 +12:00
Jake Barnby 2c69dbcc22 Allow SDK graphql header in access control 2022-07-22 16:09:15 +12:00
Jake Barnby 427b25dfb7 Unpack query if request is coming from an SDK 2022-07-22 11:38:28 +12:00
Jake Barnby f8649a1a8d Add graphql sdk method type 2022-07-21 16:37:34 +12:00
Jake Barnby 1899b3ccd2 Fix order types param 2022-07-21 16:37:21 +12:00
Jake Barnby 58f9ccb023 Use test cache again 2022-07-20 13:10:30 +12:00
Jake Barnby e67029829a Generate specs 2022-07-20 01:30:21 +12:00
Jake Barnby 09d3159439 Add doc references 2022-07-20 01:30:12 +12:00
Jake Barnby 11ff88e44f Add account benchmarks 2022-07-20 01:30:01 +12:00
Jake Barnby b4b76b72ff Update framework branch 2022-07-20 01:29:15 +12:00
Jake Barnby 8320fc0686 Use labels parameters to add extra methods to spec 2022-07-20 01:28:47 +12:00
Jake Barnby c05c759eac Add --no-cache for tests 2022-07-19 14:25:14 +12:00
Jake Barnby 2d0bc9c193 Add get tests 2022-07-19 14:11:58 +12:00
Jake Barnby 5e4dc6ad13 Format 2022-07-19 13:51:30 +12:00
Jake Barnby 37c832134b Encode get query params for test 2022-07-19 13:41:31 +12:00
Jake Barnby d3565b673e Add get route test 2022-07-19 13:31:14 +12:00
Jake Barnby 4cf5797827 Expose upload as seperate endpoint for SDKs 2022-07-19 13:30:01 +12:00
Jake Barnby ca62d67d37 Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-07-19 11:55:29 +12:00
Jake Barnby 404ed4cb1f Update benchmarks 2022-07-19 00:44:02 +12:00
Jake Barnby 604396a029 Increase function deployment sleep time to reduce test flakiness 2022-07-18 22:35:34 +12:00
Jake Barnby 47c8088fb7 Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-07-18 21:38:23 +12:00
Jake Barnby e3bed0c636 Test fixes 2022-07-18 21:38:13 +12:00
Jake Barnby f37bddbc6d Ensure user creating team with custom roles is always owner as well 2022-07-18 20:55:59 +12:00
Jake Barnby b8bd81e232 Add back fullBody params for testing 2022-07-18 19:31:07 +12:00
Jake Barnby adbb1a1d79 Account for limit param when calculating query complexity 2022-07-18 19:30:54 +12:00
Jake Barnby 03a2a00b30 Check if path contains key before replacing 2022-07-18 19:29:51 +12:00
Jake Barnby 3530d3dfe0 Update env defaults 2022-07-18 19:29:37 +12:00
Jake Barnby 31081b01cb Fix chained promises 2022-07-18 18:47:08 +12:00
Jake Barnby 410d9b0f0c Use statics for anonymous functions 2022-07-18 14:53:49 +12:00
Jake Barnby b3600ae576 Remove redundant param parameters 2022-07-18 14:53:06 +12:00
Jake Barnby 1dc557042f Fix lazy matching route replacement parameters 2022-07-18 14:52:41 +12:00
Jake Barnby 16851be3e4 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	composer.lock
2022-07-15 11:14:37 +12:00
Jake Barnby 0b7b5496f3 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/init.php
2022-07-14 20:13:41 +12:00
Jake Barnby 221e7b59c4 Add abuse test 2022-07-14 20:11:39 +12:00
Jake Barnby 13ff5ca45e Add malformed request body tests 2022-07-14 15:58:17 +12:00
Jake Barnby 4f5c7ddada Add invalid query exception 2022-07-14 15:57:51 +12:00
Jake Barnby 4ee7f80433 Add too many queries exception 2022-07-14 15:57:34 +12:00
Jake Barnby ded46774bc Add max batch size env var 2022-07-14 15:56:02 +12:00
Jake Barnby c154ea3fc6 Add benchmark scripts 2022-07-14 13:47:32 +12:00
Jake Barnby 814298c549 Remove redundant injections 2022-07-14 01:38:16 +12:00
Jake Barnby 3896cd3d39 No content responses 2022-07-14 01:34:25 +12:00
Jake Barnby 4ca6750309 Cleanup controller 2022-07-13 23:21:02 +12:00
Jake Barnby d862de8e7f Remove redundant env var 2022-07-13 22:30:24 +12:00
Jake Barnby cdd7569e86 Contrib updates 2022-07-13 22:22:18 +12:00
Jake Barnby a656699fa7 Code cleanup 2022-07-13 21:34:56 +12:00
Jake Barnby 92c8e2c3a1 Fix flaky function deployment timing 2022-07-13 19:48:01 +12:00
Jake Barnby 306f89ff94 Fix database client test 2022-07-13 19:45:54 +12:00
Jake Barnby 83dfbf377d Fix database delete query 2022-07-13 19:38:44 +12:00
Jake Barnby 0f2cb5ed0d Add scope specific tests 2022-07-13 19:38:23 +12:00
Jake Barnby d7a1b7b3fc Add auth specific tests 2022-07-13 19:38:11 +12:00
Jake Barnby ac8e47ac2d Lint 2022-07-13 17:21:41 +12:00
Jake Barnby 4732127777 Fix parameters 2022-07-13 17:06:48 +12:00
Jake Barnby 3f2037a906 Reduce type re-scanning 2022-07-13 16:44:11 +12:00
Jake Barnby eeed6d6038 Remove redundant variable 2022-07-13 16:41:40 +12:00
Jake Barnby bf284f4fde Add content-type tests 2022-07-13 15:50:25 +12:00
Jake Barnby d0874e7612 Reset CI sleep time 2022-07-13 15:50:11 +12:00
Jake Barnby 9909493bfc Support query batching 2022-07-13 15:49:59 +12:00
Jake Barnby 9e29d5f22d Check if time is the issue 2022-07-12 18:41:24 +12:00
Jake Barnby d28131469d Increase test startup wait time 2022-07-12 18:29:08 +12:00
Jake Barnby ace6badfed Doc updates 2022-07-12 17:06:11 +12:00
Jake Barnby 78cd903543 Update to framework fork for CI 2022-07-12 12:15:56 +12:00
Jake Barnby 10a5c24a63 Format and lint 2022-07-12 09:52:00 +12:00
Jake Barnby 7259f21cf1 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	composer.lock
2022-07-12 09:18:58 +12:00
Jake Barnby de5d0eec06 Get current request context utopia instance in cached resolvers 2022-07-11 18:51:08 +12:00
Jake Barnby 8a9a5bec1e Remove redundant output redirection 2022-07-11 18:43:55 +12:00
Jake Barnby 4d60904cff Resolve request and response from resources 2022-07-11 18:43:15 +12:00
Jake Barnby c15a90f709 Update logging 2022-07-11 18:41:21 +12:00
Jake Barnby da71aec774 Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/controllers/api/databases.php
#	composer.lock
2022-07-08 17:50:16 +12:00
Jake Barnby a589681c3d WIP caching and lazy re-building schema 2022-07-08 17:48:00 +12:00
Jake Barnby 5b3c4921d6 Add schema group shutdown hook to set dirty flag in register 2022-07-08 17:43:20 +12:00
Jake Barnby ae32d89a0f Formatting 2022-07-07 19:55:07 +12:00
Jake Barnby b5e8273839 Fix custom entity id properties 2022-07-07 19:39:42 +12:00
Jake Barnby 8762bcba90 Abstract upload functionality 2022-07-07 18:13:12 +12:00
Jake Barnby 5e02355215 Storage test fixes 2022-07-07 17:51:20 +12:00
Jake Barnby a193f96b8d Functions tests fixes 2022-07-07 17:50:49 +12:00
Jake Barnby 380dbb32e9 Handle file uploads 2022-07-07 16:53:09 +12:00
Jake Barnby 32399ff52c Fix get deployment response type 2022-07-07 16:49:44 +12:00
Jake Barnby 4ec637f889 Update input file scalar definition 2022-07-07 12:54:59 +12:00
Jake Barnby 23c52da9f8 Fix input file switch reference 2022-07-07 12:54:44 +12:00
Jake Barnby d0f81c9621 Client database test fixes 2022-07-07 12:53:58 +12:00
Jake Barnby 67807f8c6f WIP input file handling 2022-07-06 20:56:58 +12:00
Jake Barnby 81265ab458 Fix custom entity tests 2022-07-06 17:12:12 +12:00
Jake Barnby 8bbe5abd72 Fix attribute databaseId 2022-07-06 17:11:26 +12:00
Jake Barnby 39233cfe1c Handle event validator parsing 2022-07-06 15:57:14 +12:00
Jake Barnby 99262e28fe Call server create bucket for client storage tests 2022-07-06 15:52:33 +12:00
Jake Barnby ce3180433d Database query fixes 2022-07-06 15:52:06 +12:00
Jake Barnby 5ac634b68d Enable users update phone test 2022-07-06 15:51:49 +12:00
Jake Barnby 61035a98a6 Format 2022-07-06 15:51:37 +12:00
Jake Barnby 96e86f6e4e Explicitly enforce content type of API response on GQL response 2022-07-06 15:51:03 +12:00
Jake Barnby bc098d73fa Databases API fixes 2022-07-06 15:50:27 +12:00
Jake Barnby 58ffde5326 Fix doubled shutdown calls firing events twice 2022-07-06 15:27:00 +12:00
Jake Barnby 608ad18bb9 Add health service tests 2022-07-04 18:38:04 +12:00
Jake Barnby cf1fe63a61 Revert status code checks for teams 2022-07-04 18:17:11 +12:00
Jake Barnby 4a0042f3d6 Add avatars service tests 2022-07-04 18:16:32 +12:00
Jake Barnby c22ffc1dfe Add locale service tests 2022-07-04 18:16:16 +12:00
Jake Barnby ac10ed31ac Split function tests 2022-07-04 18:16:06 +12:00
Jake Barnby 7b547456fe Add graphql functions server tests 2022-07-04 16:14:37 +12:00
Jake Barnby fd4e741c84 Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-07-04 12:09:46 +12:00
Jake Barnby 4ba33daf46 WIP storage service tests 2022-07-01 18:58:15 +12:00
Jake Barnby fb53acbf2a Database test fixes 2022-07-01 18:58:03 +12:00
Jake Barnby bdd65ed448 User test updates for 0.15 2022-07-01 12:02:59 +12:00
Jake Barnby 845e32e5e1 Account phone test updates for 0.15 2022-07-01 11:54:18 +12:00
Jake Barnby 1d797dacc6 Fix account tests for 0.15 2022-07-01 11:37:46 +12:00
Jake Barnby 7c8cc39d07 Update database queries for 0.15 2022-07-01 10:44:41 +12:00
Jake Barnby 9d134a949f Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/controllers/api/databases.php
#	app/controllers/general.php
#	app/init.php
#	composer.json
#	composer.lock
#	docker-compose.yml
#	phpunit.xml
2022-07-01 00:05:44 +12:00
Jake Barnby b61764693f WIP database service tests 2022-07-01 00:00:00 +12:00
Jake Barnby ee9e204410 Add teams service tests 2022-06-30 22:48:15 +12:00
Jake Barnby fead0f89b9 Remove redundant tests 2022-06-30 21:27:06 +12:00
Jake Barnby 2b3ba0370b Add users service tests 2022-06-30 21:26:46 +12:00
Jake Barnby 61913f9e46 Add account service tests 2022-06-30 21:26:23 +12:00
Jake Barnby 65f82b47fe Add extra account and user queries 2022-06-30 21:25:16 +12:00
Jake Barnby be0fd7d1f4 Explicit visibility for route keys + add extras for account and user 2022-06-30 21:24:40 +12:00
Jake Barnby f85169452a Add session ID to scope user state 2022-06-30 21:23:38 +12:00
Jake Barnby e36192388d Fix params for GET requests 2022-06-30 21:22:54 +12:00
Jake Barnby 8db6148297 Handle delete routes 2022-06-30 21:22:34 +12:00
Jake Barnby 2eb74d2898 Add data json string property to models with additional data 2022-06-30 21:22:16 +12:00
Jake Barnby b09e5aac8a Test fixes 2022-06-27 18:46:01 +12:00
Jake Barnby d019937e4f Merge remote-tracking branch 'origin/fix-role-clobbering' into feat-graphql-support
# Conflicts:
#	composer.lock
2022-06-27 14:52:39 +12:00
Jake Barnby 09d30ec249 Fix role clobbering for error messages 2022-06-27 14:51:43 +12:00
Jake Barnby 4367d1bafc Fix collection test syntax 2022-06-27 14:21:58 +12:00
Jake Barnby 32e530e757 Fix status code not proxied to outer request on exception 2022-06-27 14:21:44 +12:00
Jake Barnby 5ea41a0253 Print with debug flags if not production 2022-06-22 16:44:58 +12:00
Jake Barnby a117e7c1f4 Remove redundant files 2022-06-22 13:42:56 +12:00
Jake Barnby d6f48261d5 Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-06-22 13:21:07 +12:00
Jake Barnby 09c89ecd12 Test updates 2022-06-20 13:15:02 +12:00
Jake Barnby e865f77a6b Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	CONTRIBUTING.md
#	app/config/errors.php
#	app/controllers/api/account.php
#	app/controllers/api/graphql.php
#	app/init.php
#	composer.json
#	composer.lock
2022-06-20 11:15:22 +12:00
Jake Barnby 7689f7ef6f WIP allow processing routes with no response 2022-05-04 21:45:36 +12:00
Jake Barnby 9d2aad1134 WIP client test updates 2022-05-04 21:19:36 +12:00
Jake Barnby d94d5d53bf WIP server test updates 2022-05-04 21:19:28 +12:00
Jake Barnby 1055a00090 Proxy headers, cookies and status code from inner to outer request 2022-05-04 21:19:04 +12:00
Jake Barnby f7c1a6c4a6 IDE method hint 2022-05-04 21:17:19 +12:00
Jake Barnby cdefbef05c Remove redundant flags 2022-05-04 18:48:04 +12:00
Jake Barnby 54e672498e Remove redundant function 2022-05-04 18:47:34 +12:00
Jake Barnby 9deaf335cf Update document list resolution 2022-05-04 18:47:04 +12:00
Jake Barnby 4180784033 Update document get resolution 2022-05-04 18:46:43 +12:00
Jake Barnby 40d8760dd5 Delegate update to create with patch instead of post 2022-05-04 18:46:22 +12:00
Jake Barnby f02b73c109 Update delete document resolution 2022-05-04 18:45:37 +12:00
Jake Barnby 4f00b30fca Add common resolve 2022-05-04 18:45:14 +12:00
Jake Barnby 5b555c8aac Update document resolve 2022-05-04 18:44:45 +12:00
Jake Barnby 7edbb428d0 Use exposed nested validator 2022-05-04 18:43:51 +12:00
Jake Barnby 6138e4af5d Static map for default args 2022-05-04 18:42:12 +12:00
Jake Barnby 4020c4413d Remove redundant param 2022-05-04 18:41:18 +12:00
Jake Barnby 248f19f61e Allow routes with path params to execute by running match on the modified request 2022-05-03 23:15:41 +12:00
Jake Barnby 85873c9efb Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-05-03 23:06:04 +12:00
Jake Barnby 21dd2935dd Fix parameters 2022-05-03 18:27:41 +12:00
Jake Barnby b78b71b260 Update mutate delete for db collection 2022-05-03 17:41:13 +12:00
Jake Barnby 71a0cb59b5 Defer mutate update to mutate create 2022-05-03 17:41:02 +12:00
Jake Barnby 87333e2eb0 Update mutate create for db collection 2022-05-03 17:40:44 +12:00
Jake Barnby f31080f52c Update query list for db collection 2022-05-03 17:40:26 +12:00
Jake Barnby 4b216fccb9 Update query get for db collection 2022-05-03 17:40:12 +12:00
Jake Barnby fba936c2dc Correct get list default values 2022-05-03 17:39:47 +12:00
Jake Barnby c00f20f212 Resolve lower-level attribute inline 2022-05-03 17:39:24 +12:00
Jake Barnby 0c497f2600 Merge remote-tracking branch 'origin/master' into feat-graphql-support 2022-05-02 21:34:25 +12:00
Jake Barnby b60627e06d WIP test updates 2022-05-02 21:34:10 +12:00
Jake Barnby af2895dd9b Set content type null on inner response to circumvent echo's 2022-05-02 20:54:48 +12:00
Jake Barnby 2ee5762bc7 Update promise result output 2022-05-02 20:21:40 +12:00
Jake Barnby e3824170b1 Resolve fields directly 2022-05-02 19:44:59 +12:00
Jake Barnby d07fff5c3e Return self on then if callback is null 2022-05-02 19:43:43 +12:00
Jake Barnby ab44874626 Fix inline promise creation 2022-05-02 19:42:57 +12:00
Jake Barnby 383edd1fe1 Fixed promise all 2022-05-02 18:24:51 +12:00
Jake Barnby 5127602c9e Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	composer.lock
2022-04-26 19:50:49 +12:00
Jake Barnby dbb49ac7bf Async resolution fixes 2022-04-26 19:49:36 +12:00
Jake Barnby 5b1f973b45 Fix promise adapter all resolving on a started scheduler 2022-04-22 22:08:30 +12:00
Jake Barnby 1057d7e3aa Resolve fields as top-level promises for fixed passed through types 2022-04-22 22:06:53 +12:00
Jake Barnby e79343bae7 Fix type check 2022-04-22 17:49:46 +12:00
Jake Barnby 4a2b620611 Fix using closed request (rebuild API schema per request) 2022-04-22 17:47:27 +12:00
Jake Barnby 601576a9e3 WIP fix individual param resolution 2022-04-20 22:30:48 +12:00
Jake Barnby 5010317d8b WIP update get defer to route 2022-04-12 18:47:40 +12:00
Jake Barnby b4ff4aa123 Add GET endpoint as required by spec 2022-04-11 23:08:57 +12:00
Jake Barnby d4a77504c0 Inject read/write args for mutations 2022-04-09 02:08:36 +12:00
Jake Barnby 9250a735d9 Test updates 2022-04-09 01:52:20 +12:00
Jake Barnby 58241d6fe8 Check content type header exists before checking its type 2022-04-08 23:08:44 +12:00
Jake Barnby f81e69d7d6 Remove coroutines for easier debug 2022-04-08 23:08:20 +12:00
Jake Barnby d95a1b277f Expose swoole request instead of stealing it 2022-04-08 19:16:35 +12:00
Jake Barnby af128ede7c Pass-thru graphql args as request parameters 2022-04-08 19:05:59 +12:00
Jake Barnby 47642f63ff Fix API schema build arg types 2022-04-08 19:04:15 +12:00
Jake Barnby d1fd776076 Name fixes 2022-04-08 17:55:29 +12:00
Jake Barnby a1d877b726 Fix operation name empty 2022-04-08 17:55:17 +12:00
Jake Barnby af98bb9c4a Rename types 2022-04-08 17:54:51 +12:00
Jake Barnby 40b04a3721 Fix collection type arg and type setting 2022-04-08 02:02:48 +12:00
Jake Barnby b1521a2b33 Inject request to API schema build 2022-04-08 00:54:00 +12:00
Jake Barnby 75fec18356 Fix setting nested promise 2022-04-08 00:23:45 +12:00
Jake Barnby 10449822ce Check promise all equal 2022-04-07 18:41:53 +12:00
Jake Barnby 831429f00c Capture resolve vars 2022-04-07 18:41:36 +12:00
Jake Barnby 29266ce83e Append project schema on request 2022-04-07 18:40:49 +12:00
Jake Barnby c75d6b7b69 Wait for promise completion 2022-04-07 18:40:28 +12:00
Jake Barnby 196c763421 Add abuse limits 2022-04-07 18:39:42 +12:00
Jake Barnby 4a34971043 Update route labels 2022-04-07 18:39:33 +12:00
Jake Barnby 13c16dc18c Add validations 2022-04-07 18:39:15 +12:00
Jake Barnby eb85ff8e1e Update graphql resources 2022-04-07 18:38:38 +12:00
Jake Barnby c2ee34584e Add variables 2022-04-07 18:37:46 +12:00
Jake Barnby d9c0d1d556 Update service def 2022-04-07 17:54:10 +12:00
Jake Barnby 8ee96c575e Merge remote-tracking branch 'origin/fix-yasd-idea' into feat-graphql-support 2022-04-07 11:53:00 +12:00
Jake Barnby ede4fa8f69 Fix yasd for intellij 2022-04-07 11:51:30 +12:00
Jake Barnby 48ba76f365 Add resolvers for get, list, create, update, delete for user collections 2022-04-07 11:23:20 +12:00
Jake Barnby 69e7c2fed9 Async query resolution 2022-04-06 01:48:51 +12:00
Jake Barnby 48c610348e Merge remote-tracking branch 'origin/master' into feat-graphql-support
# Conflicts:
#	app/controllers/api/account.php
#	app/controllers/api/graphql.php
#	app/controllers/api/projects.php
#	app/controllers/api/users.php
#	app/controllers/general.php
#	app/http.php
#	app/init.php
#	composer.lock
#	src/Appwrite/Utopia/Response.php
2022-04-05 16:44:38 +12:00
Jake Barnby 82f368f0d9 WIP schema extension POC 2021-11-25 21:04:39 +13:00
Christy Jacob a50f099ba3 feat: sync graphQL with master 2021-11-16 15:45:24 +04:00
Christy Jacob 8141043946 Merge branch 'master' into feat-graphql-support 2021-11-16 11:09:21 +04:00
Christy Jacob b7b63b1b2d feat: sync graphQL branch 2021-06-15 08:59:39 +05:30
Christy Jacob e419e4bc1c Merge branch 'master' of github.com:appwrite/appwrite into feat-graphql-support 2021-06-14 21:53:29 +05:30
Christy Jacob 20e006ad73 feat: updated altair version 2021-03-23 23:37:21 +05:30
Christy Jacob 457ab656e7 feat: fixed some issues and updated docker-compose 2021-03-23 23:30:42 +05:30
Christy Jacob b47e57b1a0 feat: added some more tests 2021-03-22 17:51:59 +05:30
Christy Jacob fc41c2c33d feat: added null check for previous Error 2021-03-19 02:40:15 +05:30
Christy Jacob 9f6eb9ba67 feat: some more refactoring 2021-03-19 02:14:00 +05:30
Christy Jacob 925162fc4b feat: refactoring 2021-03-19 02:02:16 +05:30
Christy Jacob 08da222c46 feat: updated tests 2021-03-19 01:47:25 +05:30
Christy Jacob 053440c81e feat: added test for delete user 2021-03-19 01:44:18 +05:30
Christy Jacob 22558f9e8f feat: refactoring 2021-03-19 01:23:24 +05:30
Christy Jacob bbee14862b feat: removed getArgs function 2021-03-19 01:18:19 +05:30
Christy Jacob 207c06e912 feat: formatted doc blocks 2021-03-19 01:11:38 +05:30
Christy Jacob 8c9d6edff2 feat: refactored errors 2021-03-19 00:56:45 +05:30
Christy Jacob 772f110eee feat: refactor noContent() 2021-03-19 00:25:43 +05:30
Christy Jacob 455ba3ff18 feat: support for delete mutation 2021-03-18 02:47:50 +05:30
Christy Jacob 99ade8ec13 feat: added getCurrentModel() 2021-03-18 02:15:47 +05:30
Christy Jacob bf57280503 feat: refactor createTypeMapping 2021-03-17 01:35:48 +05:30
Christy Jacob 28337dc1cc feat: added tests for role based auth 2021-03-16 23:46:33 +05:30
Christy Jacob 60b863311b feat: refactoring 2021-03-16 20:04:43 +05:30
Christy Jacob 4c49fb1b05 feat: added tests for scope based auth 2021-03-16 19:04:11 +05:30
Christy Jacob 15558f997d feat: added more tests 2021-03-13 01:47:29 +05:30
Christy Jacob 96bb4613e4 feat: code cleanup 2021-03-13 00:30:43 +05:30
Christy Jacob b1c58e2fc4 feat: code cleanup 2021-03-12 23:39:25 +05:30
Christy Jacob d0c3111844 feat: added some tests and code cleanup 2021-03-12 23:30:41 +05:30
Christy Jacob b3f96c6b4c feat: refactoring and code clean up 2021-03-11 21:14:04 +05:30
Eldad Fux 7319a1eeb9 Refactoring 2021-03-10 17:22:19 +02:00
Eldad A. FuxandGitHub 2eb024200e Merge pull request #944 from christyjacob4/graphql
GraphQL Support in Appwrite
2021-03-10 16:08:06 +02:00
Christy Jacob 99d0074280 feat: refactoring and code clean up 2021-03-10 19:37:02 +05:30
Christy Jacob f1a7e9092c Merge branch 'feat-graphql-support' of https://github.com/appwrite/appwrite into graphql 2021-03-10 19:36:43 +05:30
Eldad Fux 2823c95929 Merge branch 'dev' of github.com:appwrite/appwrite into feat-graphql-support 2021-03-10 16:03:06 +02:00
Christy Jacob 2b9f974125 feat: refactoring and code clean up 2021-03-10 19:21:03 +05:30
Christy Jacob 3b0884e628 feat: refactoring and code clean up 2021-03-10 13:12:45 +05:30
Christy Jacob 4eae1f6f02 feat: added support for JSON types 2021-03-10 01:18:32 +05:30
Christy Jacob 293b1b3c8a feat: handle document response type 2021-03-08 20:13:28 +05:30
Christy Jacob 42d6194ed9 feat: error handling for graphQL 2021-03-05 00:10:52 +05:30
Christy Jacob b3a0df734e feat: added content type check in dynamic 2021-02-27 00:55:52 +05:30
Christy Jacob f11e431341 feat: got locale_getContinents working 2021-02-26 03:26:38 +05:30
Christy Jacob f378bcf48a Merge branch 'master' of https://github.com/appwrite/appwrite into graphql 2021-02-26 02:14:56 +05:30
Christy Jacob bb050e75d3 feat: defined logic for schema building 2021-02-26 02:13:21 +05:30
Eldad Fux b7674e3278 Fixed TODO list 2021-01-17 08:36:11 +02:00
Eldad Fux 1349a1a8b5 Changed public dev port 2021-01-11 00:25:07 +02:00
Eldad Fux e9529bb93a Updated GraphQL version 2021-01-11 00:24:59 +02:00
Eldad Fux 945e5ea9ac Merge branch '0.7.x' of github.com:appwrite/appwrite into graphql 2021-01-11 00:16:16 +02:00
Eldad Fux a4097081ab Merge branch 'master' of github.com:appwrite/appwrite into graphql 2020-07-15 14:45:19 +03:00
Eldad Fux 8458438465 Merge branch 'master' of github.com:appwrite/appwrite into graphql 2020-07-07 15:03:29 +03:00
Eldad Fux 1364d89cae Merge branch 'response-refactor' of github.com:appwrite/appwrite into graphql 2020-06-25 23:26:40 +03:00
Eldad Fux 81e61c9cc9 Updated deps 2020-06-25 23:13:13 +03:00
Eldad Fux 981e6527c3 Merge branch 'response-refactor' of github.com:appwrite/appwrite into graphql 2020-06-25 23:12:11 +03:00
Eldad Fux 63fa19b73a Tests 2020-06-24 15:55:05 +03:00
Eldad Fux f07b8ca296 Updated comments 2020-06-24 07:08:10 +03:00
Eldad Fux 437cff3efb Merge branch 'response-refactor' of github.com:appwrite/appwrite into graphql 2020-06-23 23:55:18 +03:00
Eldad Fux 77d0f2b37a First GraphQL parser POC 2020-06-22 15:04:19 +03:00
Eldad Fux a050b7ebb8 Added graphiql container 2020-06-22 15:03:36 +03:00
2702 changed files with 50916 additions and 1532 deletions
+3
View File
@@ -81,6 +81,9 @@ _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000
_APP_USAGE_STATS=enabled
_APP_LOGGING_PROVIDER=
_APP_LOGGING_CONFIG=
_APP_GRAPHQL_MAX_BATCH_SIZE=10
_APP_GRAPHQL_MAX_COMPLEXITY=250
_APP_GRAPHQL_MAX_DEPTH=3
DOCKERHUB_PULL_USERNAME=
DOCKERHUB_PULL_PASSWORD=
DOCKERHUB_PULL_EMAIL=
+7 -28
View File
@@ -1,28 +1,7 @@
app/config/* linguist-detectable=false
app/config/*/* linguist-detectable=false
app/config/*/*/* linguist-detectable=false
app/config/*/*/*/* linguist-detectable=false
app/views/* linguist-detectable=false
app/views/*/* linguist-detectable=false
app/views/*/*/* linguist-detectable=false
app/views/*/*/*/* linguist-detectable=false
app/controllers/* linguist-detectable=false
app/controllers/*/* linguist-detectable=false
app/controllers/*/*/* linguist-detectable=false
app/controllers/*/*/*/* linguist-detectable=false
app/controllers/*/*/*/*/* linguist-detectable=false
src/* linguist-detectable=false
src/*/* linguist-detectable=false
src/*/*/* linguist-detectable=false
src/*/*/*/* linguist-detectable=false
src/*/*/*/*/* linguist-detectable=false
tests/* linguist-detectable=false
tests/*/* linguist-detectable=false
tests/*/*/* linguist-detectable=false
tests/*/*/*/* linguist-detectable=false
tests/*/*/*/*/* linguist-detectable=false
tests/*/*/*/*/*/* linguist-detectable=false
public/scripts/* linguist-detectable=false
public/scripts/*/*/* linguist-detectable=false
public/scripts/*/*/*/* linguist-detectable=false
public/dist/scripts/* linguist-detectable=false
app/config/** linguist-detectable=false
app/views/** linguist-detectable=false
app/controllers/** linguist-detectable=false
src/** linguist-detectable=false
tests/** linguist-detectable=false
public/scripts/** linguist-detectable=false
public/dist/scripts/** linguist-detectable=false
+6 -10
View File
@@ -11,21 +11,17 @@ Happy contributing!
## What does this PR do?
(Provide a description of what this PR does.)
(Provide a description of what this PR does and why it's needed.)
## Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)
## Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
- (Related PR or issue)
### Have you added your change to the [Changelog](https://github.com/appwrite/appwrite/blob/master/CHANGES.md)?
## Checklist
(The CHANGES.md file tracks all the changes that make it to the `main` branch. Add your change to this file in the following format)
- One line description of your PR [#pr_number](Link to your PR)
### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)?
(Write your answer here.)
- [ ] Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)?
- [ ] If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?
+4 -4
View File
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -38,14 +38,14 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -59,4 +59,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
+2
View File
@@ -5,6 +5,8 @@
/tests/resources/functions/**/code.tar.gz
/app/sdks/*
/.idea/
!/.idea/workspace.xml
!/.idea/php.xml
.DS_Store
.php_cs.cache
debug/
+1 -1
View File
@@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 2.0.2
branch = 2.2.0
+27 -4
View File
@@ -1,7 +1,32 @@
- Fix invited account verified status [#4776](https://github.com/appwrite/appwrite/pull/4776)
# Version 1.2.1
## Changes
- Upgrade Console to [2.2.0](https://github.com/appwrite/console/releases/tag/2.2.0)
- Update DBIP Database [#5049](https://github.com/appwrite/appwrite/pull/5049)
## Bugs
- Fix a few null safety warnings [#4654](https://github.com/appwrite/appwrite/pull/4654)
- Fix timestamp format in Realtime response [#4515](https://github.com/appwrite/appwrite/pull/4515)
- Add flutter-web as a platform type [#4992](https://github.com/appwrite/appwrite/pull/4992)
- Fix typo in Model/Locale.php [#4669](https://github.com/appwrite/appwrite/pull/4669)
- Fix deletes worker not deleting project database tables [#4984](https://github.com/appwrite/appwrite/pull/4984)
- Fix deletes worker not deleting database collections [#4983](https://github.com/appwrite/appwrite/pull/4983)
- Fix restart policy for worker-messaging container [#4994](https://github.com/appwrite/appwrite/pull/4994)
- Fix validating origin for apple platforms [#5089](https://github.com/appwrite/appwrite/pull/5089)
# Version 1.2.0
## Features
- Added GraphQL API [#974](https://github.com/appwrite/appwrite/pull/974)
- Added GraphQL Explorer [#974](https://github.com/appwrite/appwrite/pull/974)
- Added ability to set max sessions per user per project [#4831](https://github.com/appwrite/appwrite/pull/4831)
## Changes
- Get default region from environment on project create [#4780](https://github.com/appwrite/appwrite/pull/4780)
- Fix french translation [#4782](https://github.com/appwrite/appwrite/pull/4782)
- Fix max mimetype size [#4814](https://github.com/appwrite/appwrite/pull/4814)
## Bugs
- Fix invited account verified status [#4776](https://github.com/appwrite/appwrite/pull/4776)
# Version 1.1.2
## Changes
- Released `appwrite/console` [2.0.2](https://github.com/appwrite/console/releases/tag/2.0.2)
@@ -28,14 +53,12 @@
## Bugs
- Fix license detection for Flutter and Dart SDKs [#4435](https://github.com/appwrite/appwrite/pull/4435)
- Fix missing realtime event for create function deployment [#4574](https://github.com/appwrite/appwrite/pull/4574)
- Fix missing `status`, `buildStderr` and `buildStderr` from get deployment response [#4611](https://github.com/appwrite/appwrite/pull/4611)
- Fix project pagination in DB usage aggregation [#4517](https://github.com/appwrite/appwrite/pull/4517)
- Fix missing file permissions due to cache [#4661](https://github.com/appwrite/appwrite/pull/4661)
- Fix usage stats for async function executions [#4674](https://github.com/appwrite/appwrite/pull/4674)
# Features
- Added Auth Duration API to allow users to set the duration of their sessions. [#4618](https://github.com/appwrite/appwrite/pull/4618)
# Version 1.0.3
## Bugs
- Fix document audit deletion [#4429](https://github.com/appwrite/appwrite/pull/4429)
+77 -69
View File
@@ -1,18 +1,18 @@
# Contributing
We would ❤️ for you to contribute to Appwrite and help make it better! We want contributing to Appwrite to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, new docs as well as updates and tweaks, blog posts, workshops, and more.
We would ❤️ you to contribute to Appwrite and help make it better! We want contributing to Appwrite to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, and new docs, as well as updates and tweaks, blog posts, workshops, and more.
## How to Start?
If you are worried or dont know where to start, check out our next section explaining what kind of help we could use and where can you get involved. You can reach out with questions to [Eldad Fux (@eldadfux)](https://twitter.com/eldadfux) or [@appwrite](https://twitter.com/appwrite) on Twitter, and anyone from the [Appwrite team on Discord](https://discord.gg/GSeTUeA). You can also submit an issue, and a maintainer can guide you!
If you are worried or dont know where to start, check out the next section that explains what kind of help we could use and where you can get involved. You can send your questions to [@appwrite](https://twitter.com/appwrite) on Twitter or to anyone from the [Appwrite team on Discord](https://appwrite.io/discord). You can also submit an issue, and a maintainer can guide you!
## Code of Conduct
Help us keep Appwrite open and inclusive. Please read and follow our [Code of Conduct](/https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md).
Help us keep Appwrite open and inclusive. Please read and follow our [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md).
## Submit a Pull Request 🚀
Branch naming convention is as follows
Branch naming convention is as following
`TYPE-ISSUE_ID-DESCRIPTION`
@@ -24,7 +24,7 @@ doc-548-submit-a-pull-request-section-to-contribution-guide
When `TYPE` can be:
- **feat** - is a new feature
- **feat** - a new feature
- **doc** - documentation only changes
- **cicd** - changes related to CI/CD system
- **fix** - a bug fix
@@ -40,33 +40,33 @@ For the initial start, fork the project and use git clone command to do
$ git pull
```
2. Create new branch from `master` like: `doc-548-submit-a-pull-request-section-to-contribution-guide`<br/>
2. Create a new branch from `master` like: `doc-548-submit-a-pull-request-section-to-contribution-guide`.<br/>
```
$ git checkout -b [name_of_your_new_branch]
```
3. Work - commit - repeat ( be sure to be in your branch )
3. Work - commit - repeat (make sure you're on the correct branch!)
4. Before you push your changes, make sure your code follows the `PSR12` coding standards, which is the standard Appwrite follows currently. You can easily do this by running the formatter.
4. Before you push your changes, make sure your code follows the `PSR12` coding standards, which is the standard that Appwrite currently follows. You can easily do this by running the formatter.
```bash
composer format <your file path>
```
Now, go a step further by running the linter by the following command to manually fix the issues the formatter wasn't able to fix.
Now, go a step further by running the linter using the following command to manually fix the issues the formatter wasn't able to.
```bash
composer lint <your file path>
```
This will give you a list of errors for you to rectify, if there is an instance you need more information on the errors being displayed you can pass in additional command line arguments. More list of available arguments can be found [here](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage). A very useful command line argument is `--report=diff`. This will give you the expected changes by the linter for easy fixing of formatting issues.
This will give you a list of errors to rectify. If you need more information on the errors, you can pass in additional command line arguments to get more verbose information. More lists of available arguments can be found [here](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage). A very useful command line argument is `--report=diff`. This will give you the expected changes by the linter for easy fixing of formatting issues.
```bash
composer lint --report=diff <your file path>
```
5. Push changes to GitHub
5. Push changes to GitHub.
```
$ git push origin [name_of_your_new_branch]
@@ -76,23 +76,23 @@ $ git push origin [name_of_your_new_branch]
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
7. Start a Pull Request
Now submit the pull request and click on `Create pull request`.
8. Get a code review approval/reject
9. After approval, merge your PR
8. Get a code review approval/reject.
9. After approval, merge your PR.
10. GitHub will automatically delete the branch after the merge is done. (they can still be restored).
## Setup From Source
To set up a working **development environment**, just fork the project git repository and install the backend and frontend dependencies using the proper package manager and create run the docker-compose stack.
> If you just want to install Appwrite for day-to-day usage and not as a code maintainer use this [installation guide](https://github.com/appwrite/appwrite#installation).
Please note that these instructions are for setting a functional dev environment. If you want to set up an Appwrite instance to integrate into your app, you should probably try and install Appwrite by using the instructions in the [getting started guide](https://appwrite.io/docs/getting-started-for-web) or in the main [README](README.md) file.
> If you just want to install Appwrite for day-to-day use and not as a contributor, you can reference the [installation guide](https://github.com/appwrite/appwrite#installation), the [getting started guide](https://appwrite.io/docs/getting-started-for-web), or the main [README](README.md) file.
```bash
git clone git@github.com:[YOUR_FORK_HERE]/appwrite.git
cd appwrite
git submodule update --init
docker compose build
docker compose up -d
```
@@ -117,7 +117,7 @@ After finishing the installation process, you can start writing and editing code
#### Advanced Topics
We love to create issues that are good for beginners and label them as `good first issue` or `hacktoberfest`, but some more advanced topics might require extra knowledge. Below is a list of links you can use to learn more about some of the more advanced topics that will help you master the Appwrite codebase.
We love to create issues that are good for beginners and label them as `good first issue` or `hacktoberfest`, but some more advanced topics might require extra knowledge. Below is a list of links you can use to learn about the more advanced topics that will help you master the Appwrite codebase.
##### Tools and Libs
@@ -150,7 +150,7 @@ Learn more at our [Technology Stack](#technology-stack) section.
## Architecture
Appwrite's current structure is a combination of both [Monolithic](https://en.wikipedia.org/wiki/Monolithic_application) and [Microservice](https://en.wikipedia.org/wiki/Microservices) architectures, but our final goal, as we grow, is to be using only microservices.
Appwrite's current structure is a combination of both [Monolithic](https://en.wikipedia.org/wiki/Monolithic_application) and [Microservice](https://en.wikipedia.org/wiki/Microservices) architectures.
---
@@ -188,20 +188,23 @@ Appwrite's current structure is a combination of both [Monolithic](https://en.wi
├── src # Supporting libraries (each lib has one role, common libs are released as individual projects)
│ └── Appwrite
│ ├── Auth
│ ├── Database
│ ├── Detector
│ ├── Docker
| ├── DSN
│ ├── Event
│ ├── Extend
│ ├── GraphQL
│ ├── Messaging
│ ├── Migration
│ ├── Network
│ ├── OpenSSL
│ ├── Realtime
│ ├── Promises
│ ├── Resque
│ ├── Specification
│ ├── Task
│ ├── Template
│ ├── URL
│ ├── Usage
│ └── Utopia
└── tests # End to end & unit tests
├── e2e
@@ -213,13 +216,13 @@ Appwrite's current structure is a combination of both [Monolithic](https://en.wi
Appwrite's main API container is designed as a monolithic app. This is a decision we made to allow us to develop the project faster while still being a very small team.
Although the Appwrite API is a monolithic app, it has a very clear separation of concern as each internal service or worker is separated by its container, which will allow us as we grow to start breaking services for better maintenance and scalability.
Although the Appwrite API is a monolithic app, it has a very clear separation of concern as each internal service or worker is separated by its container, which allows us to start breaking services for better maintenance and scalability as we grow.
### The Microservice Part
Each container in Appwrite is a microservice on its own. Each service is an independent process that can scale without regard to any of the other services.
Currently, all of the Appwrite microservices are intended to communicate using the TCP protocol over a private network. You should be aware to not expose any of the services to the public-facing network, besides the public port 80 and 443, who, by default, are used to expose the Appwrite HTTP API.
Currently, all the Appwrite microservices are intended to communicate using the TCP protocol over a private network. With the exception of the public-facing port 80 and 443, which by default are used to expose the Appwrite HTTP API, you should **avoid exposing any other services' ports**.
## Ports
@@ -227,43 +230,43 @@ Appwrite dev version uses ports 80 and 443 as an entry point to the Appwrite API
## Technology Stack
To start helping us to improve the Appwrite server by submitting code, prior knowledge of Appwrite's technology stack can help you with getting started.
To start helping us to improve the Appwrite server by submitting code, prior knowledge of Appwrite's technology stack can help you get started.
Appwrite stack is combined from a variety of open-source technologies and tools. Appwrite backend API is written primarily with PHP version 7 and above on top of the [Utopia PHP framework](https://github.com/utopia-php/framework). The Appwrite frontend is built with tools like gulp, less, and [litespeed.js](https://github.com/litespeed-js). We use Docker as the container technology to package the Appwrite server for easy integration on-cloud, on-premise, or on-localhosts.
Appwrite stack is a combination of a variety of open-source technologies and tools. Appwrite backend API is written primarily with PHP version 7 and above, on top of the [Utopia PHP framework](https://github.com/utopia-php/framework). The Appwrite frontend is built with tools like gulp, less, and [litespeed.js](https://github.com/litespeed-js). We use Docker as the container technology to package the Appwrite server for easy on-cloud, on-premise, or on-localhost integration.
### Other Technologies
- Redis - for managing cache and in-memory data (currently, we do not use Redis for persistent data)
- MariaDB - for database storage and queries
- InfluxDB - for managing stats and time-series based data
- Statsd - for sending data over UDP protocol (using Telegraf)
- ClamAV - for validating and scanning storage files
- Redis - for managing cache and in-memory data (currently, we do not use Redis for persistent data).
- MariaDB - for database storage and queries.
- InfluxDB - for managing stats and time-series based data.
- Statsd - for sending data over UDP protocol (using Telegraf).
- ClamAV - for validating and scanning storage files.
- Imagemagick - for manipulating and managing image media files.
- Webp - for better compression of images on supporting clients
- SMTP - for sending email messages and alerts
- Resque - for managing data queues and scheduled tasks over a Redis server
- Webp - for better compression of images on supporting clients.
- SMTP - for sending email messages and alerts.
- Resque - for managing data queues and scheduled tasks over a Redis server.
## Package Managers
Appwrite uses a package manager for managing code dependencies for both backend and frontend development. We try our best to avoid creating any unnecessary, and any new dependency to the project is subjected to a lead developer review and approval.
Appwrite uses a package manager for managing code dependencies for both backend and frontend development. We try our best to avoid creating any unnecessary dependencies. New dependency to the project is subjected to a lead developer's review and approval.
Many of Appwrite's internal modules are also used as dependencies to allow other Appwrite's projects to reuse them and as a way to contribute them back to the community.
Many of Appwrite's internal modules are also used as dependencies to allow other Appwrite projects to reuse them and as a way to contribute back to the community.
Appwrite uses [PHP's Composer](https://getcomposer.org/) for managing dependencies on the server-side and [JS NPM](https://www.npmjs.com/) for managing dependencies on the frontend side.
## Coding Standards
Appwrite is following the [PHP-FIG standards](https://www.php-fig.org/). Currently, we are using both PSR-0 and PSR-12 for coding standards and autoloading standards.
Appwrite follows the [PHP-FIG standards](https://www.php-fig.org/). Currently, we use both PSR-0 and PSR-12 for coding standards and autoloading standards.
We use prettier for our JS coding standards and auto-formatting our code.
We use prettier for our JS coding standards and auto-formatting for our code.
## Scalability, Speed, and Performance
Appwrite is built to scale. Please keep in mind that the Appwrite stack can run in different environments and different scales.
We wish Appwrite will be as easy to set up and in a single, localhost, and easy to grow to a large environment with dozens and even hundreds of instances.
We intend Appwrite to be as easy to set up as possible in a single localhost, and to grow easily into a large environment with dozens and even hundreds of instances.
When contributing code, please take into account the following considerations:
When contributing code, please take into account the following:
- Response Time
- Throughput
@@ -274,25 +277,25 @@ When contributing code, please take into account the following considerations:
- Background Jobs
- Task Execution Time
## Security & Privacy
## Security and Privacy
Security and privacy are extremely important to Appwrite, developers, and users alike. Make sure to follow the best industry standards and practices.
## Dependencies
Please avoid introducing new dependencies to Appwrite without consulting the team. New dependencies can be very helpful but also introduce new security and privacy issues, complexity, and impact total docker image size.
Please avoid introducing new dependencies to Appwrite without consulting the team. New dependencies can be very helpful, but they also introduce new security and privacy risks, add complexity, and impact the total docker image size.
Adding a new dependency should have vital value on the product with minimum possible risk.
Adding a new dependency should have vital value for the product with minimum possible risk.
## Introducing New Features
We would 💖 you to contribute to Appwrite, but we would also like to make sure Appwrite is as great as possible and loyal to its vision and mission statement 🙏.
We would 💖 you to contribute to Appwrite, but we also want to ensure Appwrite is loyal to its vision and mission statement 🙏.
For us to find the right balance, please open an issue explaining your ideas before introducing a new pull request.
This will allow the Appwrite community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
This will allow the Appwrite community to sufficiently discuss the new feature value and how it fits within the product roadmap and vision.
This is also important for the Appwrite lead developers to be able to give technical input and different emphasis regarding the feature design and architecture. Some bigger features might need to go through our [RFC process](https://github.com/appwrite/rfc).
This is also important for the Appwrite lead developers to be able to provide technical input and potentially a different emphasis regarding the feature design and architecture. Some bigger features might need to go through our [RFC process](https://github.com/appwrite/rfc).
## Build
@@ -316,30 +319,35 @@ The Runtimes for all supported cloud functions (multicore builds) can be found a
## Generate SDK
For generating a new console SDK follow the next steps:
The following steps are used to generate a new console SDK:
1. Update the console spec file located at `app/config/specs/swagger2-<version-number>.console.json` using Appwrite Tasks. Run the `php app/cli.php specs <version-number> normal` command in a running `appwrite/appwrite` container.
2. Generate a new SDK using the command `php app/cli.php sdks`
3. Change your working dir using `cd app/sdks/console-web`
4. Build the new SDK `npm run build`
5. Copy `iife/sdk.js` to `appwrite.js`
6. Go back to the root of the project `run npm run build`
2. Generate a new SDK using the command `php app/cli.php sdks`.
3. Change your working dir using `cd app/sdks/console-web`.
4. Build the new SDK `npm run build`.
5. Copy `iife/sdk.js` to `appwrite.js`.
6. Go back to the root of the project `run npm run build`.
## Checklist for Releasing SDKs
Things to remember when releasing SDKs
Things to remember when releasing SDKs:
- Update the Changelogs in **docs/sdks** (right now only Dart and Flutter are using these)
- Update **GETTING_STARTED.md** in **docs/sdks** for each SDKs if any changes in the related APIs in there
- Update SDK versions as required on **app/config/platforms.php**
- Generate SDKs using the command `php app/cli.php sdks` and follow the instructions
- Release new tags on GitHub repository for each SDKs
- Update the Changelogs in **docs/sdks** (right now only Dart and Flutter are using these).
- Update **GETTING_STARTED.md** in **docs/sdks** for each SDKs if any changes in the related APIs are in there.
- Update SDK versions as required on **app/config/platforms.php**.
- Generate SDKs using the command `php app/cli.php sdks` and follow the instructions.
- Release new tags on GitHub repository for each SDK.
## Debug
Appwrite uses [yasd](https://github.com/swoole/yasd) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension or if you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection.
Appwrite uses [yasd](https://github.com/swoole/yasd) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code's [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension.
First, you need to create an init file. Duplicate **dev/yasd_init.php.stub** file and name it **dev/yasd_init.php** and then change the IP address to your development machine's IP. Without the proper IP address debugger won't connect. And you also need to set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
If you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection:
1. Create an init file.
2. Duplicate **dev/yasd_init.php.stub** file and name it **dev/yasd_init.php**.
3. Change the IP address to your development machine's IP. Without the proper IP address, the debugger won't connect.
4. Set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
### VS Code Launch Configuration
@@ -357,7 +365,7 @@ First, you need to create an init file. Duplicate **dev/yasd_init.php.stub** fil
### PHPStorm Setup
In settings, go to **Languages & Frameworks** > **PHP** > **Debug**, there under **Xdebug** set the debug port to **9005** and enable **can accept external connections** checkbox.
In settings, go to **Languages & Frameworks** > **PHP** > **Debug**, under **Xdebug** set the debug port to **9005** and enable the **can accept external connections** checkbox.
## Tests
@@ -433,34 +441,34 @@ composer lint <your file path>
From time to time, our team will add tutorials that will help contributors find their way in the Appwrite source code. Below is a list of currently available tutorials:
- [Adding Support for a New OAuth2 Provider](./docs/tutorials/add-oauth2-provider.md)
- [Appwrite Environment Variables](./docs/tutorials/environment-variables.md)
- [Running in Production](./docs/tutorials/running-in-production.md)
- [Appwrite Environment Variables](./docs/tutorials/add-environment-variable.md)
- [Running in Production](https://appwrite.io/docs/production)
- [Adding Storage Adapter](./docs/tutorials/add-storage-adapter.md)
## Other Ways to Help
Pull requests are great, but there are many other areas where you can help Appwrite.
Pull requests are great, but there are many other ways you can help Appwrite.
### Blogging & Speaking
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite](https://twitter.com/appwrite) on Twitter and/or [email team@appwrite.io](mailto:team@appwrite.io) so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
Blogging, speaking about, or creating tutorials about one of Appwrites many features are great ways to get the word out about Appwrite. Mention [@appwrite](https://twitter.com/appwrite) on Twitter and/or [email team@appwrite.io](mailto:team@appwrite.io) so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
### Presenting at Meetups
Presenting at meetups and conferences about your Appwrite projects. Your unique challenges and successes in building things with Appwrite can provide great speaking material. Wed love to review your talk abstract/CFP, so get in touch with us if youd like some help!
We encourage our contributors to present at meetups and conferences about your Appwrite projects. Your unique challenges and successes in building things with Appwrite can provide great speaking material. Wed love to review your talk abstract/CFP, so get in touch with us if youd like some help!
### Sending Feedbacks & Reporting Bugs
### Sending Feedbacks and Reporting Bugs
Sending feedback is a great way for us to understand your different use cases of Appwrite better. If you had any issues, bugs, or want to share about your experience, feel free to do so on our GitHub issues page or at our [Discord channel](https://discord.gg/GSeTUeA).
Sending feedback is a great way for us to understand your different use cases of Appwrite better. If you had any issues, bugs, or want to share your experience, feel free to do so on our GitHub issues page or at our [Discord channel](https://discord.gg/GSeTUeA).
### Submitting New Ideas
If you think Appwrite could use a new feature, please open an issue on our GitHub repository, stating as much information as you can think about your new idea and it's implications. We would also use this issue to gather more information, get more feedback from the community, and have a proper discussion about the new feature.
If you think Appwrite could use a new feature, please open an issue on our GitHub repository, stating as much information as you have about your new idea and its implications. We would also use this issue to gather more information, get more feedback from the community, and have a proper discussion about the new feature.
### Improving Documentation
Submitting documentation updates, enhancements, designs, or bug fixes. Spelling or grammar fixes will be very much appreciated.
Submitting documentation updates, enhancements, designs, or bug fixes, as well as spelling or grammar fixes is much appreciated.
### Helping Someone
Searching for Appwrite on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to Appwrite's repo!
Consider searching for Appwrite on Discord, GitHub, or StackOverflow to help someone who needs help. You can also help by teaching others how to contribute to Appwrite's repo!
+2
View File
@@ -20,9 +20,11 @@ WORKDIR /usr/local/src/console
ARG VITE_GA_PROJECT
ARG VITE_CONSOLE_MODE
ARG VITE_APPWRITE_GROWTH_ENDPOINT=https://growth.appwrite.io/v1
ENV VITE_GA_PROJECT=$VITE_GA_PROJECT
ENV VITE_CONSOLE_MODE=$VITE_CONSOLE_MODE
ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT
RUN npm ci
RUN npm run build
+9 -9
View File
@@ -12,7 +12,7 @@
[![Hacktoberfest](https://img.shields.io/static/v1?label=hacktoberfest&message=friendly&color=191120&style=flat-square)](https://hacktoberfest.appwrite.io)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord?r=Github)
[![Build Status](https://img.shields.io/github/workflow/status/appwrite/appwrite/Tests?label=tests&style=flat-square)](https://github.com/appwrite/appwrite/actions)
[![Build Status](https://img.shields.io/github/actions/workflow/status/appwrite/appwrite/tests.yml?branch=master&label=tests&style=flat-square)](https://github.com/appwrite/appwrite/actions)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
<!-- [![Docker Pulls](https://img.shields.io/docker/pulls/appwrite/appwrite?color=f02e65&style=flat-square)](https://hub.docker.com/r/appwrite/appwrite) -->
@@ -64,7 +64,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.1.2
appwrite/appwrite:1.2.1
```
### Windows
@@ -76,17 +76,17 @@ 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.1.2
appwrite/appwrite:1.2.1
```
#### PowerShell
```powershell
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.1.2
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.2.1
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
@@ -169,7 +169,7 @@ Appwrite API 界面层利用后台缓存和任务委派来提供极速的响应
## 订阅我们
加入我们在世界各地不断发展的社区!请参阅我们的官方 [博客](https://medium.com/appwrite-io)。在 [Twitter](https://twitter.com/appwrite)、[Facebook 页面](https://www.facebook.com/appwrite.io)、[Facebook 群组](https://www.facebook)、[开发者社区](https://dev.to/appwrite) 等平台订阅我们或加入我们的 [Discord 社区](https://discord.gg/GSeTUeA) 以获得更多帮助,想法和讨论。
加入我们在世界各地不断发展的社区!请参阅我们的官方 [博客](https://medium.com/appwrite-io)。在 [Twitter](https://twitter.com/appwrite)、[Facebook 页面](https://www.facebook.com/appwrite.io)、[Facebook 群组](https://www.facebook.com/appwrite.io/groups/)、[开发者社区](https://dev.to/appwrite) 等平台订阅我们或加入我们的 [Discord 社区](https://discord.gg/GSeTUeA) 以获得更多帮助,想法和讨论。
## 版权说明
+19 -19
View File
@@ -16,7 +16,7 @@
[![Hacktoberfest](https://img.shields.io/static/v1?label=hacktoberfest&message=ready&color=191120&style=flat-square)](https://hacktoberfest.appwrite.io)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord?r=Github)
[![Build Status](https://img.shields.io/github/workflow/status/appwrite/appwrite/Tests?label=tests&style=flat-square)](https://github.com/appwrite/appwrite/actions)
[![Build Status](https://img.shields.io/github/actions/workflow/status/appwrite/appwrite/tests.yml?branch=master&label=tests&style=flat-square)](https://github.com/appwrite/appwrite/actions)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
<!-- [![Docker Pulls](https://img.shields.io/docker/pulls/appwrite/appwrite?color=f02e65&style=flat-square)](https://hub.docker.com/r/appwrite/appwrite) -->
@@ -25,11 +25,11 @@
English | [简体中文](README-CN.md)
[**Appwrite Console 2.0 has been released! Learn what's new!**](https://medium.com/appwrite-io/announcing-console-2-0-2e0e96891cb0?source=friends_link&sk=7a82b4069778e3adc165dc026e960fe1)
[**Announcing Appwrite 1.2 with GraphQL support! Learn what's new!**](https://appwrite.io/graphql)
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker<nobr> microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.
Using Appwrite, you can easily integrate your app with user authentication & multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, Cloud Functions, and [more services](https://appwrite.io/docs).
Using Appwrite, you can easily integrate your app with user authentication and multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, Cloud Functions, and [more services](https://appwrite.io/docs).
<p align="center">
<br />
@@ -64,7 +64,7 @@ Table of Contents:
## Installation
Appwrite backend server is designed to run in a container environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool like Kubernetes, Docker Swarm, or Rancher.
Appwrite is designed to run in a containerized environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool, such as Kubernetes, Docker Swarm, or Rancher.
The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command, make sure you have [Docker](https://www.docker.com/products/docker-desktop) installed on your machine:
@@ -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.1.2
appwrite/appwrite:1.2.1
```
### 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.1.2
appwrite/appwrite:1.2.1
```
#### PowerShell
@@ -97,10 +97,10 @@ 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.1.2
appwrite/appwrite:1.2.1
```
Once the Docker installation completes, 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 installation completes.
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.
For advanced production and custom installation, check out our Docker [environment variables](https://appwrite.io/docs/environment-variables) docs. You can also use our public [docker-compose.yml](https://appwrite.io/install/compose) and [.env](https://appwrite.io/install/env) files to manually set up an environment.
@@ -110,7 +110,7 @@ If you are upgrading your Appwrite server from an older version, you should use
## One-Click Setups
In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running with Appwrite quickly without installing Docker on your local machine.
In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running quickly with Appwrite without installing Docker on your local machine.
Choose from one of the providers below:
@@ -147,18 +147,18 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
- [**Account**](https://appwrite.io/docs/client/account) - Manage current user authentication and account. Track and manage the user sessions, devices, sign-in methods, and security logs.
- [**Users**](https://appwrite.io/docs/server/users) - Manage and list all project users when building backend integrations with Server SDKs.
- [**Teams**](https://appwrite.io/docs/client/teams) - Manage and group users in teams. Manage memberships, invites, and user roles within a team.
- [**Databases**](https://appwrite.io/docs/client/databases) - Manage databases, collections and documents. Read, create, update, and delete documents and filter lists of document collections using advanced filters.
- [**Storage**](https://appwrite.io/docs/client/storage) - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to fit your app perfectly. All files are scanned by ClamAV and stored in a secure and encrypted way.
- [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event, manually or using a CRON schedule.
- [**Realtime**](https://appwrite.io/docs/realtime) - Listen to real-time events for any of your Appwrite services including users, storage, functions, databases and more.
- [**Locale**](https://appwrite.io/docs/client/locale) - Track your user's location, and manage your app locale-based data.
- [**Avatars**](https://appwrite.io/docs/client/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols, and generate QR codes.
- [**Databases**](https://appwrite.io/docs/client/databases) - Manage databases, collections, and documents. Read, create, update, and delete documents and filter lists of document collections using advanced filters.
- [**Storage**](https://appwrite.io/docs/client/storage) - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to perfectly fit your app. All files are scanned by ClamAV and stored in a secure and encrypted way.
- [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event either manually or using a CRON schedule.
- [**Realtime**](https://appwrite.io/docs/realtime) - Listen to real-time events for any of your Appwrite services including users, storage, functions, databases, and more.
- [**Locale**](https://appwrite.io/docs/client/locale) - Track your user's location and manage your app locale-based data.
- [**Avatars**](https://appwrite.io/docs/client/avatars) - Manage your users' avatars, countries' flags, browser icons, and credit card symbols. Generate QR codes from links or plaintext strings.
For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io) and [Discord Server](https://discord.gg/GSeTUeA).
### SDKs
Below is a list of currently supported platforms and languages. If you wish to help us add support to your platform of choice, you can go over to our [SDK Generator](https://github.com/appwrite/sdk-generator) project and view our [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md).
Below is a list of currently supported platforms and languages. If you would like to help us add support to your platform of choice, you can go over to our [SDK Generator](https://github.com/appwrite/sdk-generator) project and view our [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md).
#### Client
@@ -190,13 +190,13 @@ Looking for more SDKs? - Help us by contributing a pull request to our [SDK Gene
![Appwrite Architecture](docs/specs/overview.drawio.svg)
Appwrite uses a microservices architecture that was designed for easy scaling and delegation of responsibilities. In addition, Appwrite supports multiple APIs (REST, WebSocket, and GraphQL-soon) to allow you to interact with your resources by leveraging your existing knowledge and protocols of choice.
Appwrite uses a microservices architecture that was designed for easy scaling and delegation of responsibilities. In addition, Appwrite supports multiple APIs, such as REST, WebSocket, and GraphQL to allow you to interact with your resources by leveraging your existing knowledge and protocols of choice.
The Appwrite API layer was designed to be extremely fast by leveraging in-memory caching and delegating any heavy-lifting tasks to the Appwrite background workers. The background workers also allow you to precisely control your compute capacity and costs using a message queue to handle the load. You can learn more about our architecture in the [contribution guide](CONTRIBUTING.md#architecture-1).
## Contributing
All code contributions - including those of people having commit access - must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.
All code contributions, including those of people having commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the [contribution guide](CONTRIBUTING.md).
@@ -206,7 +206,7 @@ For security issues, kindly email us at [security@appwrite.io](mailto:security@a
## Follow Us
Join our growing community around the world! See our official [Blog](https://medium.com/appwrite-io). Follow us on [Twitter](https://twitter.com/appwrite), [Facebook Page](https://www.facebook.com/appwrite.io), [Facebook Group](https://www.facebook.com/groups/appwrite.developers/), [Dev Community](https://dev.to/appwrite) or join our live [Discord server](https://discord.gg/GSeTUeA) for more help, ideas, and discussions.
Join our growing community around the world! Check out our official [Blog](https://medium.com/appwrite-io). Follow us on [Twitter](https://twitter.com/appwrite), [Facebook Page](https://www.facebook.com/appwrite.io), [Facebook Group](https://www.facebook.com/groups/appwrite.developers/), [Dev Community](https://dev.to/appwrite) or join our live [Discord server](https://discord.gg/GSeTUeA) for more help, ideas, and discussions.
## License
+7 -6
View File
@@ -2,12 +2,13 @@
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| <= 0.14 | :x: |
| 1.15.x | :white_check_mark: |
| 1.0.x | :white_check_mark: |
| 1.1.x | :white_check_mark: |
| Version | Supported |
| --------- | ------------------ |
| <= 0.14.x | :x: |
| 0.15.x | :white_check_mark: |
| 1.0.x | :white_check_mark: |
| 1.1.x | :white_check_mark: |
| 1.2.x | :white_check_mark: |
## Reporting a Vulnerability
Binary file not shown.
Binary file not shown.
+10
View File
@@ -549,4 +549,14 @@ return [
'description' => 'Domain verification for the requested domain has failed.',
'code' => 401,
],
Exception::GRAPHQL_NO_QUERY => [
'name' => Exception::GRAPHQL_NO_QUERY,
'description' => 'Param "query" is not optional.',
'code' => 400,
],
Exception::GRAPHQL_TOO_MANY_QUERIES => [
'name' => Exception::GRAPHQL_TOO_MANY_QUERIES,
'description' => 'Too many queries.',
'code' => 400,
],
];
+2 -2
View File
@@ -17,7 +17,7 @@
"emails.magicSession.signature": "L'équipe {{project}}",
"emails.recovery.subject": "Réinitialisation du mot de passe",
"emails.recovery.hello": "Bonjour {{name}}",
"emails.recovery.body": "Suivez ce lien pour réinitialiser votre mot de passe pour {{projet}}.",
"emails.recovery.body": "Suivez ce lien pour réinitialiser votre mot de passe pour {{project}}.",
"emails.recovery.footer": "Si vous n'avez pas demandé à réinitialiser votre mot de passe, vous pouvez ignorer ce message.",
"emails.recovery.thanks": "Merci",
"emails.recovery.signature": "L'équipe {{project}}",
@@ -29,7 +29,7 @@
"emails.invitation.signature": "L'équipe {{project}}",
"emails.certificate.subject": "Échec du certificat pour %s",
"emails.certificate.hello": "Bonjour",
"emails.certificate.body": "Le certificate pour votre domaine '{{domain}}' n'a pas pu être généré. Ceci est la tentative {{tentative}} et l'échec a été causé par : {{erreur}}",
"emails.certificate.body": "Le certificate pour votre domaine '{{domain}}' n'a pas pu être généré. Ceci est la tentative {{attempt}} et l'échec a été causé par : {{error}}",
"emails.certificate.footer": "Votre certificat précédent sera valide pendant 30 jours à compter de la première défaillance. Nous vous recommandons fortement d'enquêter sur ce cas, sinon votre domaine se retrouvera sans communication SSL valide.",
"emails.certificate.thanks": "Merci",
"emails.certificate.signature": "L'équipe {{project}}",
+102 -96
View File
@@ -5,57 +5,63 @@
"emails.sender": "%s 小組",
"emails.verification.subject": "帳戶驗證",
"emails.verification.hello": "嗨 {{name}}",
"emails.verification.body": "按照此鏈接驗證您的電子郵件地址。",
"emails.verification.body": "按照此連結驗證您的電子郵件地址。",
"emails.verification.footer": "如果您沒有要求驗證此地址,則可以忽略此消息。",
"emails.verification.thanks": "謝謝",
"emails.verification.signature": "{{project}} 團隊",
"emails.magicSession.subject": "登",
"emails.magicSession.hello": "嗨",
"emails.magicSession.body": "點此鏈接登錄。",
"emails.magicSession.footer": "如果您沒有要求使用此電子郵件登,則可以忽略此消息。",
"emails.magicSession.subject": "登",
"emails.magicSession.hello": "嗨",
"emails.magicSession.body": "點此連結登入。",
"emails.magicSession.footer": "如果您沒有要求使用此電子郵件登,則可以忽略此消息。",
"emails.magicSession.thanks": "謝謝",
"emails.magicSession.signature": "{{project}} 團隊",
"emails.recovery.subject": "重設密碼",
"emails.recovery.hello": "好 {{name}}",
"emails.recovery.body": "按照此鏈接重置您的 {{project}} 密碼.",
"emails.recovery.hello": "好 {{name}}",
"emails.recovery.body": "按照此連結重置您的 {{project}} 密碼",
"emails.recovery.footer": "如果您沒有要求重置密碼,則可以忽略此消息。",
"emails.recovery.thanks": "謝謝",
"emails.recovery.signature": "{{project}} 團隊",
"emails.invitation.subject": "邀請 %s 團隊在 %s",
"emails.invitation.hello": "好",
"emails.invitation.body": "這封郵件發送給您是因為 {{owner}} 想邀請您成為 {{team}} 團隊在 {{project}}.",
"emails.invitation.hello": "好",
"emails.invitation.body": "發送這封郵件給您是因為 {{owner}} 想邀請您成為 {{team}} 團隊在 {{project}}",
"emails.invitation.footer": "如果您不感興趣,可以忽略此消息。",
"emails.invitation.thanks": "謝謝",
"emails.invitation.signature": "{{project}} 團隊",
"emails.certificate.subject": "%s 的憑證更新失敗",
"emails.certificate.hello": "您好",
"emails.certificate.body": "無法產生您的域名 '{{domain}}' 的憑證。這是第 {{attempt}} 次嘗試,失敗原因是:{{error}}",
"emails.certificate.footer": "您的上一個憑證將會在第一次失敗的 30 天後失效。我們強烈建議您調查這件事情,否則您的域名將會無法進行有效的 SSL 通訊。",
"emails.certificate.thanks": "謝謝",
"emails.certificate.signature": "{{project}} 團隊",
"locale.country.unknown": "未知",
"countries.af": "阿富汗",
"countries.ao": "安哥拉",
"countries.al": "阿爾巴尼亞",
"countries.ad": "安道爾",
"countries.ae": "阿拉伯聯合酋長國",
"countries.ae": "阿拉伯聯合大公國",
"countries.ar": "阿根廷",
"countries.am": "亞美尼亞",
"countries.ag": "安提瓜和巴布達",
"countries.au": "澳大利亞",
"countries.ag": "安地卡及巴布達",
"countries.au": "澳",
"countries.at": "奧地利",
"countries.az": "塞拜",
"countries.bi": "布隆迪",
"countries.az": "塞拜",
"countries.bi": "蒲隆地",
"countries.be": "比利時",
"countries.bj": "貝",
"countries.bf": "布納法索",
"countries.bd": "孟加拉",
"countries.bj": "貝",
"countries.bf": "布納法索",
"countries.bd": "孟加拉",
"countries.bg": "保加利亞",
"countries.bh": "巴林",
"countries.bs": "巴哈馬",
"countries.ba": "波",
"countries.by": "白羅斯",
"countries.bz": "伯利茲",
"countries.ba": "波士尼亞與赫塞哥維納",
"countries.by": "白羅斯",
"countries.bz": "貝里斯",
"countries.bo": "玻利維亞",
"countries.br": "巴西",
"countries.bb": "巴巴多斯",
"countries.bn": "萊",
"countries.bb": "巴貝多",
"countries.bn": "萊",
"countries.bt": "不丹",
"countries.bw": "博茨瓦納",
"countries.bw": "波札那",
"countries.cf": "中非共和國",
"countries.ca": "加拿大",
"countries.ch": "瑞士",
@@ -66,42 +72,42 @@
"countries.cd": "剛果民主共和國",
"countries.cg": "剛果共和國",
"countries.co": "哥倫比亞",
"countries.km": "摩",
"countries.cv": "佛得角",
"countries.cr": "哥斯黎加",
"countries.km": "摩",
"countries.cv": "維德角",
"countries.cr": "哥斯黎加",
"countries.cu": "古巴",
"countries.cy": "塞浦路斯",
"countries.cy": "賽普勒斯",
"countries.cz": "捷克",
"countries.de": "德國",
"countries.dj": "吉布",
"countries.dj": "吉布",
"countries.dm": "多米尼克",
"countries.dk": "丹麥",
"countries.do": "多明尼加共和國",
"countries.dz": "阿爾及利亞",
"countries.ec": "厄瓜多",
"countries.ec": "厄瓜多",
"countries.eg": "埃及",
"countries.er": "厄立特裏亞",
"countries.er": "厄利垂亞",
"countries.es": "西班牙",
"countries.ee": "愛沙尼亞",
"countries.et": "埃塞俄比亞",
"countries.et": "衣索比亞",
"countries.fi": "芬蘭",
"countries.fj": "斐濟",
"countries.fr": "法國",
"countries.fm": "密克羅尼西亞",
"countries.ga": "加",
"countries.ga": "加",
"countries.gb": "英國",
"countries.ge": "格魯吉亞",
"countries.gh": "納",
"countries.ge": "喬治亞",
"countries.gh": "納",
"countries.gn": "幾內亞",
"countries.gm": "比亞",
"countries.gw": "幾內亞比",
"countries.gm": "比亞",
"countries.gw": "幾內亞比",
"countries.gq": "赤道幾內亞",
"countries.gr": "希臘",
"countries.gd": "格林納達",
"countries.gt": "地馬拉",
"countries.gy": "亞那",
"countries.hn": "都拉斯",
"countries.hr": "克羅亞",
"countries.gd": "格瑞那達",
"countries.gt": "地馬拉",
"countries.gy": "亞那",
"countries.hn": "都拉斯",
"countries.hr": "克羅埃西亞",
"countries.ht": "海地",
"countries.hu": "匈牙利",
"countries.id": "印度尼西亞",
@@ -111,26 +117,26 @@
"countries.iq": "伊拉克",
"countries.is": "冰島",
"countries.il": "以色列",
"countries.it": "大利",
"countries.it": "大利",
"countries.jm": "牙買加",
"countries.jo": "約旦",
"countries.jp": "日本",
"countries.kz": "哈薩克斯坦",
"countries.ke": "肯亞",
"countries.kg": "吉爾吉斯斯坦",
"countries.kz": "哈薩克",
"countries.ke": "肯亞",
"countries.kg": "吉爾吉斯",
"countries.kh": "柬埔寨",
"countries.ki": "基裏巴斯",
"countries.kn": "聖基茨和尼維斯",
"countries.ki": "吉里巴斯",
"countries.kn": "聖克里斯多福及尼維斯",
"countries.kr": "韓國",
"countries.kw": "科威特",
"countries.la": "老撾",
"countries.la": "寮國",
"countries.lb": "黎巴嫩",
"countries.lr": "利比裏亞",
"countries.lr": "賴比瑞亞",
"countries.ly": "利比亞",
"countries.lc": "聖西亞",
"countries.li": "列支敦登",
"countries.lk": "斯蘭卡",
"countries.ls": "索托",
"countries.lc": "聖西亞",
"countries.li": "列支敦登",
"countries.lk": "斯蘭卡",
"countries.ls": "索托",
"countries.lt": "立陶宛",
"countries.lu": "盧森堡",
"countries.lv": "拉脫維亞",
@@ -138,90 +144,90 @@
"countries.mc": "摩納哥",
"countries.md": "摩爾多瓦",
"countries.mg": "馬達加斯加",
"countries.mv": "馬爾夫",
"countries.mv": "馬爾夫",
"countries.mx": "墨西哥",
"countries.mh": "馬紹爾群島",
"countries.mk": "馬其頓共和國",
"countries.ml": "馬",
"countries.mt": "馬他",
"countries.ml": "馬",
"countries.mt": "馬他",
"countries.mm": "緬甸",
"countries.me": "黑山",
"countries.me": "蒙特內哥羅",
"countries.mn": "蒙古",
"countries.mz": "莫比克",
"countries.mr": "毛裏塔尼亞",
"countries.mu": "毛裏求斯",
"countries.mw": "馬拉",
"countries.mz": "莫比克",
"countries.mr": "茅利塔尼亞",
"countries.mu": "模里西斯",
"countries.mw": "馬拉",
"countries.my": "馬來西亞",
"countries.na": "納米比亞",
"countries.ne": "尼日",
"countries.ng": "尼日利亞",
"countries.ne": "尼日",
"countries.ng": "奈及利亞",
"countries.ni": "尼加拉瓜",
"countries.nl": "荷蘭",
"countries.no": "挪威",
"countries.np": "尼泊爾",
"countries.nr": "魯",
"countries.nz": "西蘭",
"countries.nr": "魯",
"countries.nz": "西蘭",
"countries.om": "阿曼",
"countries.pk": "巴基斯坦",
"countries.pa": "巴拿馬",
"countries.pe": "秘魯",
"countries.ph": "菲律賓",
"countries.pw": "帕勞",
"countries.pg": "巴布亞幾內亞",
"countries.pw": "帛琉",
"countries.pg": "巴布亞幾內亞",
"countries.pl": "波蘭",
"countries.kp": "北朝鮮",
"countries.kp": "北",
"countries.pt": "葡萄牙",
"countries.py": "巴拉圭",
"countries.qa": "卡塔爾",
"countries.qa": "卡",
"countries.ro": "羅馬尼亞",
"countries.ru": "俄羅斯",
"countries.rw": "盧達",
"countries.sa": "沙阿拉伯",
"countries.rw": "盧達",
"countries.sa": "沙烏地阿拉伯",
"countries.sd": "蘇丹",
"countries.sn": "塞內加爾",
"countries.sg": "新加坡",
"countries.sb": "羅門群島",
"countries.sl": "塞拉利昂",
"countries.sb": "羅門群島",
"countries.sl": "獅子山",
"countries.sv": "薩爾瓦多",
"countries.sm": "聖馬諾",
"countries.so": "索馬",
"countries.sm": "聖馬諾",
"countries.so": "索馬利亞",
"countries.rs": "塞爾維亞",
"countries.ss": "南蘇丹",
"countries.st": "聖多美普林西比",
"countries.sr": "蘇南",
"countries.st": "聖多美普林西比",
"countries.sr": "蘇南",
"countries.sk": "斯洛伐克",
"countries.si": "斯洛尼亞",
"countries.si": "斯洛尼亞",
"countries.se": "瑞典",
"countries.sz": "斯威士蘭",
"countries.sc": "塞爾",
"countries.sz": "史瓦帝尼",
"countries.sc": "塞爾",
"countries.sy": "敘利亞",
"countries.td": "乍得",
"countries.td": "查德",
"countries.tg": "多哥",
"countries.th": "泰國",
"countries.tj": "塔吉克斯坦",
"countries.tm": "土庫曼斯坦",
"countries.tj": "塔吉克",
"countries.tm": "土庫曼",
"countries.tl": "東帝汶",
"countries.to": "加",
"countries.tt": "特立尼達和多巴哥",
"countries.tn": "突尼",
"countries.to": "加",
"countries.tt": "千里達及托巴哥",
"countries.tn": "突尼西亞",
"countries.tr": "土耳其",
"countries.tv": "圖瓦盧",
"countries.tz": "坦尼亞",
"countries.ug": "烏達",
"countries.tv": "吐瓦魯",
"countries.tz": "坦尼亞",
"countries.ug": "烏達",
"countries.ua": "烏克蘭",
"countries.uy": "烏拉圭",
"countries.us": "美國",
"countries.uz": "烏茲別克",
"countries.uz": "烏茲別克",
"countries.va": "梵蒂岡",
"countries.vc": "聖文森特和格林納丁斯",
"countries.vc": "聖文森及格瑞那丁",
"countries.ve": "委內瑞拉",
"countries.vn": "越南",
"countries.vu": "瓦努阿圖",
"countries.vu": "萬那杜",
"countries.ws": "薩摩亞",
"countries.ye": "門",
"countries.ye": "門",
"countries.za": "南非",
"countries.zm": "比亞",
"countries.zw": "津巴布韋",
"countries.zm": "比亞",
"countries.zw": "辛巴威",
"continents.af": "非洲",
"continents.an": "南極洲",
"continents.as": "亞洲",
@@ -229,4 +235,4 @@
"continents.na": "北美洲",
"continents.oc": "大洋洲",
"continents.sa": "南美洲"
}
}
+94 -33
View File
@@ -15,7 +15,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '10.1.0',
'version' => '10.2.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' => '8.1.0',
'version' => '8.2.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' => '1.1.0',
'version' => '1.2.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' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
@@ -135,21 +135,44 @@ return [
'Java' => 'java',
],
],
// [
// 'key' => 'java',
// 'name' => 'Java',
// 'url' => '',
// 'enabled' => false,
// 'beta' => false,
// 'dev' => false,
// 'hidden' => false,
// 'family' => APP_PLATFORM_CLIENT,
// 'prism' => 'java',
// 'source' => false,
// 'gitUrl' => 'git@github.com:appwrite/sdk-for-java.git',
// 'gitRepoName' => 'sdk-for-java',
// 'gitUserName' => 'appwrite',
// ],
[
'key' => 'graphql',
'name' => 'GraphQL',
'version' => 'October 2021',
'url' => '',
'package' => '',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'graphql',
'source' => \realpath(__DIR__ . '/../sdks/client-graphql'),
'gitUrl' => '',
'gitRepoName' => '',
'gitUserName' => '',
'gitBranch' => '',
'isSDK' => false,
],
[
'key' => 'rest',
'name' => 'REST',
'version' => '',
'url' => '',
'package' => '',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'http',
'source' => \realpath(__DIR__ . '/../sdks/client-rest'),
'gitUrl' => '',
'gitRepoName' => '',
'gitUserName' => '',
'gitBranch' => '',
'isSDK' => false,
],
],
],
@@ -162,7 +185,7 @@ return [
[
'key' => 'web',
'name' => 'Console',
'version' => '7.1.0',
'version' => '7.2.0',
'url' => 'https://github.com/appwrite/sdk-for-console',
'package' => '',
'enabled' => true,
@@ -172,8 +195,8 @@ return [
'family' => APP_PLATFORM_CONSOLE,
'prism' => 'console',
'source' => \realpath(__DIR__ . '/../sdks/console-web'),
'gitUrl' => null,
'gitBranch' => null,
'gitUrl' => '',
'gitBranch' => '',
'gitRepoName' => 'sdk-for-console',
'gitUserName' => 'appwrite',
],
@@ -208,7 +231,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '8.1.0',
'version' => '8.2.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@@ -226,7 +249,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '6.1.0',
'version' => '6.2.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@@ -244,7 +267,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '7.1.0',
'version' => '7.2.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@@ -262,7 +285,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@@ -280,7 +303,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '7.1.0',
'version' => '7.2.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@@ -298,7 +321,7 @@ return [
[
'key' => 'go',
'name' => 'Go',
'version' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => '',
'enabled' => false,
@@ -316,7 +339,7 @@ return [
[
'key' => 'java',
'name' => 'Java',
'version' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-java',
'package' => '',
'enabled' => false,
@@ -334,7 +357,7 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => false,
@@ -352,7 +375,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '7.1.0',
'version' => '7.2.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@@ -370,7 +393,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@@ -392,7 +415,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '1.1.0',
'version' => '1.2.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,
@@ -407,6 +430,44 @@ return [
'gitUserName' => 'appwrite',
'gitBranch' => 'main',
],
[
'key' => 'graphql',
'name' => 'GraphQL',
'version' => 'October 2021',
'url' => '',
'package' => '',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_SERVER,
'prism' => 'graphql',
'source' => \realpath(__DIR__ . '/../sdks/server-graphql'),
'gitUrl' => '',
'gitRepoName' => '',
'gitUserName' => '',
'gitBranch' => '',
'isSDK' => false,
],
[
'key' => 'rest',
'name' => 'REST',
'version' => '',
'url' => '',
'package' => '',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_SERVER,
'prism' => 'http',
'source' => \realpath(__DIR__ . '/../sdks/server-rest'),
'gitUrl' => '',
'gitRepoName' => '',
'gitUserName' => '',
'gitBranch' => '',
'isSDK' => false,
],
],
],
];
+4 -1
View File
@@ -6,6 +6,7 @@ $member = [
'public',
'home',
'console',
'graphql',
'account',
'teams.read',
'teams.write',
@@ -22,6 +23,7 @@ $member = [
];
$admins = [
'graphql',
'teams.read',
'teams.write',
'documents.read',
@@ -58,6 +60,7 @@ return [
'public',
'home',
'console',
'graphql',
'documents.read',
'documents.write',
'files.read',
@@ -85,6 +88,6 @@ return [
],
Auth::USER_ROLE_APPS => [
'label' => 'Applications',
'scopes' => ['health.read'],
'scopes' => ['health.read', 'graphql'],
],
];
+7 -7
View File
@@ -176,14 +176,14 @@ return [
'graphql' => [
'key' => 'graphql',
'name' => 'GraphQL',
'subtitle' => 'Appwrite\'s GraphQL Endpoint',
'description' => 'GraphQL Endpoint',
'subtitle' => 'The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.',
'description' => '/docs/services/graphql.md',
'controller' => 'api/graphql.php',
'sdk' => false,
'docs' => false,
'docsUrl' => '',
'sdk' => true,
'docs' => true,
'docsUrl' => 'https://appwrite.io/docs/graphql',
'tests' => true,
'optional' => false,
'icon' => '',
'optional' => true,
'icon' => '/images/services/graphql.png',
],
];
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
+35 -2
View File
@@ -482,9 +482,9 @@ return [
],
[
'name' => '_APP_STORAGE_DEVICE',
'description' => 'Select default storage device. The default value is \'Local\'. List of supported adapters are \'Local\', \'S3\', \'DOSpaces\', \'Backblaze\', \'Linode\' and \'Wasabi\'.',
'description' => 'Select default storage device. The default value is \'local\'. List of supported adapters are \'local\', \'s3\', \'dospaces\', \'backblaze\', \'linode\' and \'wasabi\'.',
'introduction' => '0.13.0',
'default' => 'Local',
'default' => 'local',
'required' => false,
'question' => '',
],
@@ -869,4 +869,37 @@ return [
],
],
],
[
'category' => 'GraphQL',
'description' => '',
'variables' => [
[
'name' => '_APP_GRAPHQL_MAX_BATCH_SIZE',
'description' => 'Maximum number of batched queries per request. The default value is 10.',
'introduction' => '1.2.0',
'default' => '10',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_GRAPHQL_MAX_COMPLEXITY',
'description' => 'Maximum complexity of a GraphQL query. One field adds one to query complexity. Lists multiply the complexity by the number of items requested. The default value is 250.',
'introduction' => '1.2.0',
'default' => '250',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_GRAPHQL_MAX_DEPTH',
'description' => 'Maximum depth of a GraphQL query. One nested field level adds one to query depth. The default value is 3.',
'introduction' => '1.2.0',
'default' => '3',
'required' => false,
'question' => '',
'filter' => ''
],
],
],
];
+85 -19
View File
@@ -10,8 +10,8 @@ use Appwrite\Event\Mail;
use Appwrite\Event\Phone as EventPhone;
use Appwrite\Extend\Exception;
use Appwrite\Network\Validator\Email;
use Appwrite\Network\Validator\Host;
use Appwrite\Network\Validator\URL;
use Utopia\Validator\Host;
use Utopia\Validator\URL;
use Appwrite\OpenSSL\OpenSSL;
use Appwrite\Template\Template;
use Appwrite\URL\URL as URLParser;
@@ -62,7 +62,7 @@ App::post('/v1/account')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_ACCOUNT)
->label('abuse-limit', 10)
->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password. Must be at least 8 chars.')
->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true)
@@ -140,7 +140,7 @@ App::post('/v1/account')
App::post('/v1/account/sessions/email')
->alias('/v1/account/sessions')
->desc('Create Email Session')
->groups(['api', 'account', 'auth'])
->groups(['api', 'account', 'auth', 'session'])
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('scope', 'public')
->label('auth.type', 'emailPassword')
@@ -365,7 +365,7 @@ App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId')
App::get('/v1/account/sessions/oauth2/:provider/redirect')
->desc('OAuth2 Redirect')
->groups(['api', 'account'])
->groups(['api', 'account', 'session'])
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('scope', 'public')
@@ -621,7 +621,7 @@ App::post('/v1/account/sessions/magic-url')
->label('sdk.response.model', Response::MODEL_TOKEN)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},email:{param-email}')
->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('url', '', fn($clients) => new Host($clients), 'URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', true, ['clients'])
->inject('request')
@@ -713,11 +713,33 @@ App::post('/v1/account/sessions/magic-url')
$url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $user->getId(), 'secret' => $loginSecret, 'expire' => $expire, 'project' => $project->getId()]);
$url = Template::unParseURL($url);
$from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $project->getAttribute('name'));
$body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl');
$subject = $locale->getText("emails.magicSession.subject");
$body
->setParam('{{subject}}', $subject)
->setParam('{{hello}}', $locale->getText("emails.magicSession.hello"))
->setParam('{{name}}', '')
->setParam('{{body}}', $locale->getText("emails.magicSession.body"))
->setParam('{{redirect}}', $url)
->setParam('{{footer}}', $locale->getText("emails.magicSession.footer"))
->setParam('{{thanks}}', $locale->getText("emails.magicSession.thanks"))
->setParam('{{signature}}', $locale->getText("emails.magicSession.signature"))
->setParam('{{project}}', $project->getAttribute('name'))
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{text-content}}', '#000000');
$body = $body->render();
$mails
->setType(MAIL_TYPE_MAGIC_SESSION)
->setSubject($subject)
->setBody($body)
->setFrom($from)
->setRecipient($user->getAttribute('email'))
->setUrl($url)
->setLocale($locale->default)
->trigger()
;
@@ -739,7 +761,7 @@ App::post('/v1/account/sessions/magic-url')
App::put('/v1/account/sessions/magic-url')
->desc('Create Magic URL session (confirmation)')
->groups(['api', 'account'])
->groups(['api', 'account', 'session'])
->label('scope', 'public')
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('audits.event', 'session.update')
@@ -876,7 +898,7 @@ App::post('/v1/account/sessions/phone')
->label('sdk.response.model', Response::MODEL_TOKEN)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},email:{param-email}')
->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('phone', '', new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.')
->inject('request')
->inject('response')
@@ -981,7 +1003,7 @@ App::post('/v1/account/sessions/phone')
App::put('/v1/account/sessions/phone')
->desc('Create Phone Session (confirmation)')
->groups(['api', 'account'])
->groups(['api', 'account', 'session'])
->label('scope', 'public')
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('usage.metric', 'sessions.{scope}.requests.create')
@@ -1096,7 +1118,7 @@ App::put('/v1/account/sessions/phone')
App::post('/v1/account/sessions/anonymous')
->desc('Create Anonymous Session')
->groups(['api', 'account', 'auth'])
->groups(['api', 'account', 'auth', 'session'])
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('scope', 'public')
->label('auth.type', 'anonymous')
@@ -1991,12 +2013,35 @@ App::post('/v1/account/recovery')
$url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $profile->getId(), 'secret' => $secret, 'expire' => $expire]);
$url = Template::unParseURL($url);
$projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]');
$from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName);
$body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl');
$subject = $locale->getText("emails.recovery.subject");
$body
->setParam('{{subject}}', $subject)
->setParam('{{hello}}', $locale->getText("emails.recovery.hello"))
->setParam('{{name}}', $profile->getAttribute('name'))
->setParam('{{body}}', $locale->getText("emails.recovery.body"))
->setParam('{{redirect}}', $url)
->setParam('{{footer}}', $locale->getText("emails.recovery.footer"))
->setParam('{{thanks}}', $locale->getText("emails.recovery.thanks"))
->setParam('{{signature}}', $locale->getText("emails.recovery.signature"))
->setParam('{{project}}', $projectName)
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{text-content}}', '#000000');
$body = $body->render();
$mails
->setType(MAIL_TYPE_RECOVERY)
->setRecipient($profile->getAttribute('email', ''))
->setUrl($url)
->setLocale($locale->default)
->setName($profile->getAttribute('name'))
->setBody($body)
->setFrom($from)
->setSubject($subject)
->trigger();
;
@@ -2151,11 +2196,32 @@ App::post('/v1/account/verification')
$url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $user->getId(), 'secret' => $verificationSecret, 'expire' => $expire]);
$url = Template::unParseURL($url);
$projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]');
$from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName);
$body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl');
$subject = $locale->getText("emails.verification.subject");
$body
->setParam('{{subject}}', $subject)
->setParam('{{hello}}', $locale->getText("emails.verification.hello"))
->setParam('{{name}}', $user->getAttribute('name'))
->setParam('{{body}}', $locale->getText("emails.verification.body"))
->setParam('{{redirect}}', $url)
->setParam('{{footer}}', $locale->getText("emails.verification.footer"))
->setParam('{{thanks}}', $locale->getText("emails.verification.thanks"))
->setParam('{{signature}}', $locale->getText("emails.verification.signature"))
->setParam('{{project}}', $projectName)
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{text-content}}', '#000000');
$body = $body->render();
$mails
->setType(MAIL_TYPE_VERIFICATION)
->setSubject($subject)
->setBody($body)
->setFrom($from)
->setRecipient($user->getAttribute('email'))
->setUrl($url)
->setLocale($locale->default)
->setName($user->getAttribute('name'))
->trigger()
;
+3 -3
View File
@@ -1,7 +1,7 @@
<?php
use Appwrite\Extend\Exception;
use Appwrite\Network\Validator\URL;
use Utopia\Validator\URL;
use Appwrite\URL\URL as URLParse;
use Appwrite\Utopia\Response;
use chillerlan\QRCode\QRCode;
@@ -242,8 +242,8 @@ App::get('/v1/avatars/favicon')
case 'jpeg':
$size = \explode('x', \strtolower($sizes));
$sizeWidth = (int) $size[0] ?? 0;
$sizeHeight = (int) $size[1] ?? 0;
$sizeWidth = (int) ($size[0] ?? 0);
$sizeHeight = (int) ($size[1] ?? 0);
if (($sizeWidth * $sizeHeight) >= $space) {
$space = $sizeWidth * $sizeHeight;
+26 -28
View File
@@ -33,8 +33,8 @@ use Utopia\Database\Exception\Structure as StructureException;
use Utopia\Locale\Locale;
use Appwrite\Auth\Auth;
use Appwrite\Network\Validator\Email;
use Appwrite\Network\Validator\IP;
use Appwrite\Network\Validator\URL;
use Utopia\Validator\IP;
use Utopia\Validator\URL;
use Appwrite\Utopia\Database\Validator\CustomId;
use Appwrite\Utopia\Database\Validator\Query\Limit;
use Appwrite\Utopia\Database\Validator\Query\Offset;
@@ -69,7 +69,6 @@ function createAttribute(string $databaseId, string $collectionId, Document $att
$filters = $attribute->getAttribute('filters', []); // filters are hidden from the endpoint
$default = $attribute->getAttribute('default');
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
if ($db->isEmpty()) {
@@ -163,7 +162,7 @@ App::post('/v1/databases')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_DATABASE) // Model for database needs to be created
->param('databaseId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.')
->inject('response')
->inject('dbForProject')
@@ -384,7 +383,7 @@ App::get('/v1/databases/:databaseId/logs')
App::put('/v1/databases/:databaseId')
->desc('Update Database')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('scope', 'databases.write')
->label('event', 'databases.[databaseId].update')
->label('audits.event', 'database.update')
@@ -398,7 +397,7 @@ App::put('/v1/databases/:databaseId')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_DATABASE)
->param('databaseId', '', new UID(), 'Database ID.')
->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.')
->param('name', null, new Text(128), 'Database name. Max length: 128 chars.')
->inject('response')
->inject('dbForProject')
->inject('events')
@@ -427,7 +426,7 @@ App::put('/v1/databases/:databaseId')
App::delete('/v1/databases/:databaseId')
->desc('Delete Database')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('scope', 'databases.write')
->label('event', 'databases.[databaseId].delete')
->label('audits.event', 'database.delete')
@@ -489,9 +488,9 @@ App::post('/v1/databases/:databaseId/collections')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_COLLECTION)
->param('databaseId', '', new UID(), 'Database ID.')
->param('collectionId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('collectionId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true)
->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).', true)
->inject('response')
->inject('dbForProject')
@@ -729,7 +728,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs')
App::put('/v1/databases/:databaseId/collections/:collectionId')
->alias('/v1/database/collections/:collectionId', ['databaseId' => 'default'])
->desc('Update Collection')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('scope', 'collections.write')
->label('event', 'databases.[databaseId].collections.[collectionId].update')
->label('audits.event', 'collection.update')
@@ -746,7 +745,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId')
->param('databaseId', '', new UID(), 'Database ID.')
->param('collectionId', '', new UID(), 'Collection ID.')
->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default the current permission are inherited. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).', true)
->param('enabled', true, new Boolean(), 'Is collection enabled?', true)
->inject('response')
@@ -797,7 +796,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId')
App::delete('/v1/databases/:databaseId/collections/:collectionId')
->alias('/v1/database/collections/:collectionId', ['databaseId' => 'default'])
->desc('Delete Collection')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('scope', 'collections.write')
->label('event', 'databases.[databaseId].collections.[collectionId].delete')
->label('audits.event', 'collection.delete')
@@ -854,7 +853,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId')
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string')
->alias('/v1/database/collections/:collectionId/attributes/string', ['databaseId' => 'default'])
->desc('Create String Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -904,7 +903,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email')
->alias('/v1/database/collections/:collectionId/attributes/email', ['databaseId' => 'default'])
->desc('Create Email Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -948,7 +947,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email'
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum')
->alias('/v1/database/collections/:collectionId/attributes/enum', ['databaseId' => 'default'])
->desc('Create Enum Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -1008,7 +1007,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum')
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip')
->alias('/v1/database/collections/:collectionId/attributes/ip', ['databaseId' => 'default'])
->desc('Create IP Address Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -1052,7 +1051,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip')
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url')
->alias('/v1/database/collections/:collectionId/attributes/url', ['databaseId' => 'default'])
->desc('Create URL Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -1096,7 +1095,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url')
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/integer')
->alias('/v1/database/collections/:collectionId/attributes/integer', ['databaseId' => 'default'])
->desc('Create Integer Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -1169,7 +1168,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float')
->alias('/v1/database/collections/:collectionId/attributes/float', ['databaseId' => 'default'])
->desc('Create Float Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -1245,7 +1244,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float'
App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean')
->alias('/v1/database/collections/:collectionId/attributes/boolean', ['databaseId' => 'default'])
->desc('Create Boolean Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create')
->label('scope', 'collections.write')
->label('audits.event', 'attribute.create')
@@ -1444,7 +1443,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key')
App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key')
->alias('/v1/database/collections/:collectionId/attributes/:key', ['databaseId' => 'default'])
->desc('Delete Attribute')
->groups(['api', 'database'])
->groups(['api', 'database', 'schema'])
->label('scope', 'collections.write')
->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete')
->label('audits.event', 'attribute.delete')
@@ -1753,15 +1752,14 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key')
$indexes = $collection->getAttribute('indexes');
// Search for index
$indexIndex = array_search($key, array_column($indexes, 'key'));
$indexIndex = array_search($key, array_map(fn($idx) => $idx['key'], $indexes));
if ($indexIndex === false) {
throw new Exception(Exception::INDEX_NOT_FOUND);
}
$index = new Document([\array_merge($indexes[$indexIndex], [
'collectionId' => $database->getInternalId() . '_' . $collectionId,
])]);
$index = $indexes[$indexIndex];
$index->setAttribute('collectionId', $database->getInternalId() . '_' . $collectionId);
$response->dynamic($index, Response::MODEL_INDEX);
});
@@ -1855,10 +1853,10 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_DOCUMENT)
->param('databaseId', '', new UID(), 'Database ID.')
->param('documentId', '', new CustomId(), 'Document ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->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). Make sure to define attributes before creating documents.')
->param('data', [], new JSON(), 'Document data as JSON object.')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default the current user is granted with all permissions. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).', true)
->inject('response')
->inject('dbForProject')
->inject('user')
@@ -2246,7 +2244,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
->param('collectionId', '', new UID(), 'Collection ID.')
->param('documentId', '', new UID(), 'Document ID.')
->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->inject('response')
->inject('dbForProject')
->inject('events')
+10 -4
View File
@@ -61,7 +61,7 @@ App::post('/v1/functions')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_FUNCTION)
->param('functionId', '', new CustomId(), 'Function ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('functionId', '', new CustomId(), 'Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', '', new Text(128), 'Function name. Max length: 128 chars.')
->param('execute', [], new Roles(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of strings with execution roles. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 64 characters long.')
->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.')
@@ -619,14 +619,20 @@ App::post('/v1/functions/:functionId/deployments')
}
$file = $request->getFiles('code');
$fileExt = new FileExt([FileExt::TYPE_GZIP]);
$fileSizeValidator = new FileSize(App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', 0));
$upload = new Upload();
// GraphQL multipart spec adds files with index keys
if (empty($file)) {
$file = $request->getFiles(0);
}
if (empty($file)) {
throw new Exception(Exception::STORAGE_FILE_EMPTY, 'No file sent');
}
$fileExt = new FileExt([FileExt::TYPE_GZIP]);
$fileSizeValidator = new FileSize(App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', 0));
$upload = new Upload();
// Make sure we handle a single file and multiple files the same way
$fileName = (\is_array($file['name']) && isset($file['name'][0])) ? $file['name'][0] : $file['name'];
$fileTmpName = (\is_array($file['tmp_name']) && isset($file['tmp_name'][0])) ? $file['tmp_name'][0] : $file['tmp_name'];
+288 -15
View File
@@ -1,24 +1,297 @@
<?php
/**
* TODO:
* 1. Map all objects, object-params, object-fields
* 2. Parse GraphQL request payload (use: https://github.com/webonyx/graphql-php)
* 3. Route request to relevant controllers (of REST API?) / resolvers and aggergate data
* 4. Handle errors if any
* 5. Returen JSON response
* 6. Write tests!
*/
use Appwrite\Extend\Exception;
use Appwrite\GraphQL\Promises\Adapter;
use Appwrite\GraphQL\Schema;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use GraphQL\Error\DebugFlag;
use GraphQL\GraphQL;
use GraphQL\Type\Schema as GQLSchema;
use GraphQL\Validator\Rules\DisableIntrospection;
use GraphQL\Validator\Rules\QueryComplexity;
use GraphQL\Validator\Rules\QueryDepth;
use Swoole\Coroutine\WaitGroup;
use Utopia\App;
use Utopia\Database\Document;
use Utopia\Validator\JSON;
use Utopia\Validator\Text;
App::get('/v1/graphql')
->desc('GraphQL Endpoint')
->groups(['graphql'])
->label('scope', 'graphql')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT])
->label('sdk.namespace', 'graphql')
->label('sdk.hide', true)
->label('sdk.description', '/docs/references/graphql/get.md')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_ANY)
->label('abuse-limit', 60)
->label('abuse-time', 60)
->param('query', '', new Text(0), 'The query to execute.')
->param('operationName', '', new Text(256), 'The name of the operation to execute.', true)
->param('variables', '', new Text(0), 'The JSON encoded variables to use in the query.', true)
->inject('request')
->inject('response')
->inject('schema')
->inject('promiseAdapter')
->action(function (string $query, string $operationName, string $variables, Request $request, Response $response, GQLSchema $schema, Adapter $promiseAdapter) {
$query = [
'query' => $query,
];
if (!empty($operationName)) {
$query['operationName'] = $operationName;
}
if (!empty($variables)) {
$query['variables'] = \json_decode($variables, true);
}
$output = execute($schema, $promiseAdapter, $query);
$response
->setStatusCode(Response::STATUS_CODE_OK)
->json($output);
});
App::post('/v1/graphql/mutation')
->desc('GraphQL Endpoint')
->groups(['graphql'])
->label('scope', 'graphql')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT])
->label('sdk.namespace', 'graphql')
->label('sdk.method', 'mutation')
->label('sdk.methodType', 'graphql')
->label('sdk.description', '/docs/references/graphql/post.md')
->label('sdk.parameters', [
'query' => ['default' => [], 'validator' => new JSON(), 'description' => 'The query or queries to execute.', 'optional' => false],
])
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_ANY)
->label('abuse-limit', 60)
->label('abuse-time', 60)
->inject('request')
->inject('response')
->inject('schema')
->inject('promiseAdapter')
->action(function (Request $request, Response $response, GQLSchema $schema, Adapter $promiseAdapter) {
$query = $request->getParams();
if ($request->getHeader('x-sdk-graphql') == 'true') {
$query = $query['query'];
}
$type = $request->getHeader('content-type');
if (\str_starts_with($type, 'application/graphql')) {
$query = parseGraphql($request);
}
if (\str_starts_with($type, 'multipart/form-data')) {
$query = parseMultipart($query, $request);
}
$output = execute($schema, $promiseAdapter, $query);
$response
->setStatusCode(Response::STATUS_CODE_OK)
->json($output);
});
App::post('/v1/graphql')
->desc('GraphQL Endpoint')
->groups(['api', 'graphql'])
->label('scope', 'public')
->action(
function () {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'GraphQL support is coming soon!', 503);
->groups(['graphql'])
->label('scope', 'graphql')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT])
->label('sdk.namespace', 'graphql')
->label('sdk.method', 'query')
->label('sdk.methodType', 'graphql')
->label('sdk.description', '/docs/references/graphql/post.md')
->label('sdk.parameters', [
'query' => ['default' => [], 'validator' => new JSON(), 'description' => 'The query or queries to execute.', 'optional' => false],
])
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_ANY)
->label('abuse-limit', 60)
->label('abuse-time', 60)
->inject('request')
->inject('response')
->inject('schema')
->inject('promiseAdapter')
->action(function (Request $request, Response $response, GQLSchema $schema, Adapter $promiseAdapter) {
$query = $request->getParams();
if ($request->getHeader('x-sdk-graphql') == 'true') {
$query = $query['query'];
}
$type = $request->getHeader('content-type');
if (\str_starts_with($type, 'application/graphql')) {
$query = parseGraphql($request);
}
if (\str_starts_with($type, 'multipart/form-data')) {
$query = parseMultipart($query, $request);
}
$output = execute($schema, $promiseAdapter, $query);
$response
->setStatusCode(Response::STATUS_CODE_OK)
->json($output);
});
/**
* Execute a GraphQL request
*
* @param GQLSchema $schema
* @param Adapter $promiseAdapter
* @param array $query
* @return array
* @throws Exception
*/
function execute(
GQLSchema $schema,
Adapter $promiseAdapter,
array $query
): array {
$maxBatchSize = App::getEnv('_APP_GRAPHQL_MAX_BATCH_SIZE', 10);
$maxComplexity = App::getEnv('_APP_GRAPHQL_MAX_COMPLEXITY', 250);
$maxDepth = App::getEnv('_APP_GRAPHQL_MAX_DEPTH', 3);
if (!empty($query) && !isset($query[0])) {
$query = [$query];
}
if (empty($query)) {
throw new Exception(Exception::GRAPHQL_NO_QUERY);
}
if (\count($query) > $maxBatchSize) {
throw new Exception(Exception::GRAPHQL_TOO_MANY_QUERIES);
}
foreach ($query as $item) {
if (empty($item['query'])) {
throw new Exception(Exception::GRAPHQL_NO_QUERY);
}
}
$flags = DebugFlag::INCLUDE_DEBUG_MESSAGE | DebugFlag::INCLUDE_TRACE;
$validations = GraphQL::getStandardValidationRules();
if (App::getEnv('_APP_OPTIONS_ABUSE', 'enabled') !== 'disabled') {
$validations[] = new DisableIntrospection();
$validations[] = new QueryComplexity($maxComplexity);
$validations[] = new QueryDepth($maxDepth);
}
if (App::getMode() === App::MODE_TYPE_PRODUCTION) {
$flags = DebugFlag::NONE;
}
$promises = [];
foreach ($query as $indexed) {
$promises[] = GraphQL::promiseToExecute(
$promiseAdapter,
$schema,
$indexed['query'],
variableValues: $indexed['variables'] ?? null,
operationName: $indexed['operationName'] ?? null,
validationRules: $validations
);
}
$output = [];
$wg = new WaitGroup();
$wg->add();
$promiseAdapter->all($promises)->then(
function (array $results) use (&$output, &$wg, $flags) {
try {
$output = processResult($results, $flags);
} finally {
$wg->done();
}
}
);
$wg->wait();
return $output;
}
/**
* Parse an "application/graphql" type request
*
* @param Request $request
* @return array
*/
function parseGraphql(Request $request): array
{
return ['query' => $request->getRawPayload()];
}
/**
* Parse an "multipart/form-data" type request
*
* @param array $query
* @param Request $request
* @return array
*/
function parseMultipart(array $query, Request $request): array
{
$operations = \json_decode($query['operations'], true);
$map = \json_decode($query['map'], true);
foreach ($map as $fileKey => $locations) {
foreach ($locations as $location) {
$items = &$operations;
foreach (\explode('.', $location) as $key) {
if (!isset($items[$key]) || !\is_array($items[$key])) {
$items[$key] = [];
}
$items = &$items[$key];
}
$items = $request->getFiles($fileKey);
}
}
$query['query'] = $operations['query'];
$query['variables'] = $operations['variables'];
unset($query['operations']);
unset($query['map']);
return $query;
}
/**
* Process an array of results for output.
*
* @param $result
* @param $debugFlags
* @return array
*/
function processResult($result, $debugFlags): array
{
// Only one query, return the result
if (!isset($result[1])) {
return $result[0]->toArray($debugFlags);
}
// Batched queries, return an array of results
return \array_map(
static function ($item) use ($debugFlags) {
return $item->toArray($debugFlags);
},
$result
);
}
App::shutdown()
->groups(['schema'])
->inject('project')
->action(function (Document $project) {
Schema::setDirty($project->getId());
});
+36 -5
View File
@@ -6,9 +6,9 @@ use Appwrite\Event\Certificate;
use Appwrite\Event\Delete;
use Appwrite\Event\Validator\Event;
use Appwrite\Network\Validator\CNAME;
use Appwrite\Network\Validator\Domain as DomainValidator;
use Utopia\Validator\Domain as DomainValidator;
use Appwrite\Network\Validator\Origin;
use Appwrite\Network\Validator\URL;
use Utopia\Validator\URL;
use Appwrite\Utopia\Database\Validator\CustomId;
use Appwrite\Utopia\Response;
use Utopia\Abuse\Adapters\TimeLimit;
@@ -56,7 +56,7 @@ App::post('/v1/projects')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_PROJECT)
->param('projectId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('projectId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', null, new Text(128), 'Project name. Max length: 128 chars.')
->param('teamId', '', new UID(), 'Team unique ID.')
->param('region', App::getEnv('_APP_REGION', 'default'), new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn($config) => !$config['disabled']))), 'Project Region.', true)
@@ -81,7 +81,7 @@ App::post('/v1/projects')
}
$auth = Config::getParam('auth', []);
$auths = ['limit' => 0, 'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG];
$auths = ['limit' => 0, 'maxSessions' => APP_LIMIT_USER_SESSIONS_DEFAULT, 'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG];
foreach ($auth as $index => $method) {
$auths[$method['key'] ?? ''] = true;
}
@@ -576,6 +576,37 @@ App::patch('/v1/projects/:projectId/auth/:method')
$response->dynamic($project, Response::MODEL_PROJECT);
});
App::patch('/v1/projects/:projectId/auth/max-sessions')
->desc('Update Project user sessions limit')
->groups(['api', 'projects'])
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
->label('sdk.method', 'updateAuthSessionsLimit')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_PROJECT)
->param('projectId', '', new UID(), 'Project unique ID.')
->param('limit', false, new Range(1, APP_LIMIT_USER_SESSIONS_MAX), 'Set the max number of users allowed in this project. Value allowed is between 1-' . APP_LIMIT_USER_SESSIONS_MAX . '. Default is ' . APP_LIMIT_USER_SESSIONS_DEFAULT)
->inject('response')
->inject('dbForConsole')
->action(function (string $projectId, int $limit, Response $response, Database $dbForConsole) {
$project = $dbForConsole->getDocument('projects', $projectId);
if ($project->isEmpty()) {
throw new Exception(Exception::PROJECT_NOT_FOUND);
}
$auths = $project->getAttribute('auths', []);
$auths['maxSessions'] = $limit;
$dbForConsole->updateDocument('projects', $project->getId(), $project
->setAttribute('auths', $auths));
$response->dynamic($project, Response::MODEL_PROJECT);
});
App::delete('/v1/projects/:projectId')
->desc('Delete Project')
->groups(['api', 'projects'])
@@ -1084,7 +1115,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_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], 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)
+25 -13
View File
@@ -58,14 +58,14 @@ App::post('/v1/storage/buckets')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_BUCKET)
->param('bucketId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('bucketId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', '', new Text(128), 'Bucket name')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true)
->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).', true)
->param('enabled', true, new Boolean(true), 'Is bucket enabled?', true)
->param('maximumFileSize', (int) App::getEnv('_APP_STORAGE_LIMIT', 0), new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)', true)
->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true)
->param('compression', 'none', new WhiteList([COMPRESSION_TYPE_NONE, COMPRESSION_TYPE_GZIP, COMPRESSION_TYPE_ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . COMPRESSION_TYPE_NONE . ', [' . COMPRESSION_TYPE_GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . COMPRESSION_TYPE_ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('compression', COMPRESSION_TYPE_NONE, new WhiteList([COMPRESSION_TYPE_NONE, COMPRESSION_TYPE_GZIP, COMPRESSION_TYPE_ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . COMPRESSION_TYPE_NONE . ', [' . COMPRESSION_TYPE_GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . COMPRESSION_TYPE_ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true)
->param('antivirus', true, new Boolean(true), 'Is virus scanning enabled? For file size above ' . Storage::human(APP_LIMIT_ANTIVIRUS, 0) . ' AntiVirus scanning is skipped even if it\'s enabled', true)
->inject('response')
@@ -232,12 +232,12 @@ App::put('/v1/storage/buckets/:bucketId')
->label('sdk.response.model', Response::MODEL_BUCKET)
->param('bucketId', '', new UID(), 'Bucket unique ID.')
->param('name', null, new Text(128), 'Bucket name', false)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).', true)
->param('enabled', true, new Boolean(true), 'Is bucket enabled?', true)
->param('maximumFileSize', null, new Range(1, (int) App::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human((int)App::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)', true)
->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true)
->param('compression', 'none', new WhiteList([COMPRESSION_TYPE_NONE, COMPRESSION_TYPE_GZIP, COMPRESSION_TYPE_ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . COMPRESSION_TYPE_NONE . ', [' . COMPRESSION_TYPE_GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . COMPRESSION_TYPE_ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('compression', COMPRESSION_TYPE_NONE, new WhiteList([COMPRESSION_TYPE_NONE, COMPRESSION_TYPE_GZIP, COMPRESSION_TYPE_ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . COMPRESSION_TYPE_NONE . ', [' . COMPRESSION_TYPE_GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . COMPRESSION_TYPE_ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true)
->param('antivirus', true, new Boolean(true), 'Is virus scanning enabled? For file size above ' . Storage::human(APP_LIMIT_ANTIVIRUS, 0) . ' AntiVirus scanning is skipped even if it\'s enabled', true)
->inject('response')
@@ -347,9 +347,9 @@ App::post('/v1/storage/buckets/:bucketId/files')
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_FILE)
->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).')
->param('fileId', '', new CustomId(), 'File ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('fileId', '', new CustomId(), 'File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('file', [], new File(), 'Binary file.', false)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permission strings. By default the current user is granted with all permissions. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).', true)
->inject('request')
->inject('response')
->inject('dbForProject')
@@ -417,7 +417,14 @@ App::post('/v1/storage/buckets/:bucketId/files')
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Maximum bucket file size is larger than _APP_STORAGE_LIMIT');
}
$file = $request->getFiles('file');
// GraphQL multipart spec adds files with index keys
if (empty($file)) {
$file = $request->getFiles(0);
}
if (empty($file)) {
throw new Exception(Exception::STORAGE_FILE_EMPTY);
}
@@ -494,7 +501,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
}
if ($chunksUploaded === $chunks) {
if (App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'enabled' && $bucket->getAttribute('antivirus', true) && $fileSize <= APP_LIMIT_ANTIVIRUS && App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL) === Storage::DEVICE_LOCAL) {
if (App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'enabled' && $bucket->getAttribute('antivirus', true) && $fileSize <= APP_LIMIT_ANTIVIRUS && strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) === Storage::DEVICE_LOCAL) {
$antivirus = new Network(
App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'),
(int) App::getEnv('_APP_STORAGE_ANTIVIRUS_PORT', 3310)
@@ -509,14 +516,14 @@ App::post('/v1/storage/buckets/:bucketId/files')
$mimeType = $deviceFiles->getFileMimeType($path); // Get mime-type before compression and encryption
$data = '';
// Compression
$algorithm = $bucket->getAttribute('compression', 'none');
if ($fileSize <= APP_STORAGE_READ_BUFFER && $algorithm != 'none') {
$algorithm = $bucket->getAttribute('compression', COMPRESSION_TYPE_NONE);
if ($fileSize <= APP_STORAGE_READ_BUFFER && $algorithm != COMPRESSION_TYPE_NONE) {
$data = $deviceFiles->read($path);
switch ($algorithm) {
case 'zstd':
case COMPRESSION_TYPE_ZSTD:
$compressor = new Zstd();
break;
case 'gzip':
case COMPRESSION_TYPE_GZIP:
default:
$compressor = new GZIP();
break;
@@ -542,6 +549,11 @@ App::post('/v1/storage/buckets/:bucketId/files')
$sizeActual = $deviceFiles->getFileSize($path);
$fileHash = $deviceFiles->getFileHash($path);
$openSSLVersion = null;
$openSSLCipher = null;
$openSSLTag = null;
$openSSLIV = null;
if ($bucket->getAttribute('encryption', true) && $fileSize <= APP_STORAGE_READ_BUFFER) {
$openSSLVersion = '1';
$openSSLCipher = OpenSSL::CIPHER_AES_128_GCM;
@@ -1256,7 +1268,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId')
->label('sdk.response.model', Response::MODEL_FILE)
->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).')
->param('fileId', '', new UID(), 'File unique ID.')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permission string. By default the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).', true)
->inject('response')
->inject('dbForProject')
->inject('user')
+32 -9
View File
@@ -7,7 +7,7 @@ use Appwrite\Event\Event;
use Appwrite\Event\Mail;
use Appwrite\Extend\Exception;
use Appwrite\Network\Validator\Email;
use Appwrite\Network\Validator\Host;
use Utopia\Validator\Host;
use Appwrite\Template\Template;
use Appwrite\Utopia\Database\Validator\CustomId;
use Appwrite\Utopia\Database\Validator\Queries;
@@ -54,7 +54,7 @@ App::post('/v1/teams')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_TEAM)
->param('teamId', '', new CustomId(), 'Team ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('teamId', '', new CustomId(), 'Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', null, new Text(128), 'Team name. Max length: 128 chars.')
->param('roles', ['owner'], new ArrayList(new Key(), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' roles are allowed, each 32 characters long.', true)
->inject('response')
@@ -434,14 +434,37 @@ App::post('/v1/teams/:teamId/memberships')
$url = Template::unParseURL($url);
if (!$isPrivilegedUser && !$isAppUser) { // No need of confirmation when in admin or app mode
$projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]');
$from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName);
$body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl');
$subject = \sprintf($locale->getText("emails.invitation.subject"), $team->getAttribute('name'), $projectName);
$body->setParam('{{owner}}', $user->getAttribute('name'));
$body->setParam('{{team}}', $team->getAttribute('name'));
$body
->setParam('{{subject}}', $subject)
->setParam('{{hello}}', $locale->getText("emails.invitation.hello"))
->setParam('{{name}}', $user->getAttribute('name'))
->setParam('{{body}}', $locale->getText("emails.invitation.body"))
->setParam('{{redirect}}', $url)
->setParam('{{footer}}', $locale->getText("emails.invitation.footer"))
->setParam('{{thanks}}', $locale->getText("emails.invitation.thanks"))
->setParam('{{signature}}', $locale->getText("emails.invitation.signature"))
->setParam('{{project}}', $projectName)
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{text-content}}', '#000000');
$body = $body->render();
$mails
->setType(MAIL_TYPE_INVITATION)
->setRecipient($email)
->setUrl($url)
->setName($name)
->setLocale($locale->default)
->setTeam($team)
->setUser($user)
->setSubject($subject)
->setBody($body)
->setFrom($from)
->setRecipient($invitee->getAttribute('email'))
->setName($invitee->getAttribute('name'))
->trigger()
;
}
+12 -11
View File
@@ -63,7 +63,7 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
'status' => true,
'password' => (!empty($password)) ? ($hash === 'plaintext' ? Auth::passwordHash($password, $hash, $hashOptionsObject) : $password) : null,
'hash' => $hash === 'plaintext' ? Auth::DEFAULT_ALGO : $hash,
'hashOptions' => $hash === 'plaintext' ? Auth::DEFAULT_ALGO_OPTIONS : $hashOptions,
'hashOptions' => $hash === 'plaintext' ? Auth::DEFAULT_ALGO_OPTIONS : $hashOptionsObject + ['type' => $hash],
'passwordUpdate' => (!empty($password)) ? DateTime::now() : null,
'registration' => DateTime::now(),
'reset' => false,
@@ -98,7 +98,7 @@ App::post('/v1/users')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', null, new Email(), 'User email.', true)
->param('phone', null, new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true)
->param('password', null, new Password(), 'Plain text user password. Must be at least 8 chars.', true)
@@ -129,7 +129,7 @@ App::post('/v1/users/bcrypt')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using Bcrypt.')
->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true)
@@ -159,7 +159,7 @@ App::post('/v1/users/md5')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using MD5.')
->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true)
@@ -189,7 +189,7 @@ App::post('/v1/users/argon2')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using Argon2.')
->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true)
@@ -219,7 +219,7 @@ App::post('/v1/users/sha')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using SHA.')
->param('passwordVersion', '', new WhiteList(['sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512']), "Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'", true)
@@ -256,7 +256,7 @@ App::post('/v1/users/phpass')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using PHPass.')
->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true)
@@ -286,7 +286,7 @@ App::post('/v1/users/scrypt')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using Scrypt.')
->param('passwordSalt', '', new Text(128), 'Optional salt used to hash password.')
@@ -329,7 +329,7 @@ App::post('/v1/users/scrypt-modified')
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_USER)
->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('password', '', new Password(), 'User password hashed using Scrypt Modified.')
->param('passwordSalt', '', new Text(128), 'Salt used to hash password.')
@@ -414,7 +414,7 @@ App::get('/v1/users/:userId')
$user = $dbForProject->getDocument('users', $userId);
if ($user->isEmpty()) {
throw new Exception('User not found', 404, Exception::USER_NOT_FOUND);
throw new Exception(Exception::USER_NOT_FOUND);
}
$response->dynamic($user, Response::MODEL_USER);
@@ -1004,7 +1004,8 @@ App::delete('/v1/users/:userId/sessions/:sessionId')
$events
->setParam('userId', $user->getId())
->setParam('sessionId', $sessionId);
->setParam('sessionId', $sessionId)
->setPayload($response->output($session, Response::MODEL_SESSION));
$response->noContent();
});
+2 -2
View File
@@ -233,7 +233,7 @@ App::init()
->addHeader('Server', 'Appwrite')
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-Appwrite-ID, Content-Range, Range, Cache-Control, Expires, Pragma')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, Content-Range, Range, Cache-Control, Expires, Pragma')
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
->addHeader('Access-Control-Allow-Origin', $refDomain)
->addHeader('Access-Control-Allow-Credentials', 'true')
@@ -384,7 +384,7 @@ App::options()
$response
->addHeader('Server', 'Appwrite')
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-Appwrite-ID, Content-Range, Range, Cache-Control, Expires, Pragma, X-Fallback-Cookies')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, Content-Range, Range, Cache-Control, Expires, Pragma, X-Fallback-Cookies')
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
->addHeader('Access-Control-Allow-Origin', $origin)
->addHeader('Access-Control-Allow-Credentials', 'true')
+1 -1
View File
@@ -4,7 +4,7 @@ global $utopia, $request, $response;
use Appwrite\Extend\Exception;
use Utopia\Database\Document;
use Appwrite\Network\Validator\Host;
use Utopia\Validator\Host;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
+41 -7
View File
@@ -6,12 +6,12 @@ use Appwrite\Event\Database as EventDatabase;
use Appwrite\Event\Delete;
use Appwrite\Event\Event;
use Appwrite\Event\Mail;
use Appwrite\Extend\Exception;
use Appwrite\Messaging\Adapter\Realtime;
use Appwrite\Usage\Stats;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Request;
use Utopia\App;
use Appwrite\Extend\Exception;
use Utopia\Abuse\Abuse;
use Utopia\Abuse\Adapters\TimeLimit;
use Utopia\Cache\Adapter\Filesystem;
@@ -98,13 +98,12 @@ App::init()
->inject('user')
->inject('events')
->inject('audits')
->inject('mails')
->inject('usage')
->inject('deletes')
->inject('database')
->inject('dbForProject')
->inject('mode')
->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Stats $usage, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode) use ($databaseListener) {
->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Stats $usage, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode) use ($databaseListener) {
$route = $utopia->match($request);
@@ -178,10 +177,6 @@ App::init()
->setProject($project)
->setUser($user);
$mails
->setProject($project)
->setUser($user);
$audits
->setMode($mode)
->setUserAgent($request->getUserAgent(''))
@@ -318,6 +313,45 @@ App::init()
}
});
/**
* Limit user session
*
* Delete older sessions if the number of sessions have crossed
* the session limit set for the project
*/
App::shutdown()
->groups(['session'])
->inject('utopia')
->inject('request')
->inject('response')
->inject('project')
->inject('dbForProject')
->action(function (App $utopia, Request $request, Response $response, Document $project, Database $dbForProject) {
$sessionLimit = $project->getAttribute('auths', [])['maxSessions'] ?? APP_LIMIT_USER_SESSIONS_DEFAULT;
$session = $response->getPayload();
$userId = $session['userId'] ?? '';
if (empty($userId)) {
return;
}
$user = $dbForProject->getDocument('users', $userId);
if ($user->isEmpty()) {
return;
}
$sessions = $user->getAttribute('sessions', []);
$count = \count($sessions);
if ($count <= $sessionLimit) {
return;
}
for ($i = 0; $i < ($count - $sessionLimit); $i++) {
$session = array_shift($sessions);
$dbForProject->deleteDocument('sessions', $session->getId());
}
$dbForProject->deleteCachedDocument('users', $userId);
});
App::shutdown()
->groups(['api'])
->inject('utopia')
+1 -1
View File
@@ -119,7 +119,7 @@ function logError(Throwable $error, string $action, Utopia\Route $route = null)
function getStorageDevice($root): Device
{
switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) {
switch (strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL))) {
case Storage::DEVICE_LOCAL:
default:
return new Local($root);
+1
View File
@@ -27,6 +27,7 @@ $http = new Server("0.0.0.0", App::getEnv('PORT', 80));
$payloadSize = 6 * (1024 * 1024); // 6MB
$workerNumber = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6));
$http
->set([
'worker_num' => $workerNumber,
+131 -33
View File
@@ -18,10 +18,8 @@ ini_set('display_startup_errors', 1);
ini_set('default_socket_timeout', -1);
error_reporting(E_ALL);
use Appwrite\Extend\PDO;
use Ahc\Jwt\JWT;
use Ahc\Jwt\JWTException;
use Appwrite\Extend\Exception;
use Appwrite\Auth\Auth;
use Appwrite\DSN\DSN;
use Appwrite\Event\Audit;
@@ -30,17 +28,34 @@ use Appwrite\Event\Delete;
use Appwrite\Event\Event;
use Appwrite\Event\Mail;
use Appwrite\Event\Phone;
use Appwrite\Extend\Exception;
use Appwrite\Extend\PDO;
use Appwrite\GraphQL\Promises\Adapter\Swoole;
use Appwrite\GraphQL\Schema;
use Appwrite\Network\Validator\Email;
use Appwrite\Network\Validator\IP;
use Appwrite\Network\Validator\URL;
use Appwrite\Network\Validator\Origin;
use Appwrite\OpenSSL\OpenSSL;
use Appwrite\Usage\Stats;
use Appwrite\Utopia\View;
use MaxMind\Db\Reader;
use PHPMailer\PHPMailer\PHPMailer;
use Swoole\Database\PDOConfig;
use Swoole\Database\PDOPool;
use Swoole\Database\RedisConfig;
use Swoole\Database\RedisPool;
use Utopia\App;
use Utopia\Database\ID;
use Utopia\Logger\Logger;
use Utopia\Cache\Adapter\Redis as RedisCache;
use Utopia\Cache\Cache;
use Utopia\Config\Config;
use Utopia\Database\Adapter\MariaDB;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\ID;
use Utopia\Database\Query;
use Utopia\Database\Validator\Authorization;
use Utopia\Database\Validator\DatetimeValidator;
use Utopia\Database\Validator\Structure;
use Utopia\Locale\Locale;
use Utopia\Logger\Logger;
use Utopia\Messaging\Adapters\SMS\Mock;
use Utopia\Messaging\Adapters\SMS\Msg91;
use Utopia\Messaging\Adapters\SMS\Telesign;
@@ -48,31 +63,18 @@ use Utopia\Messaging\Adapters\SMS\TextMagic;
use Utopia\Messaging\Adapters\SMS\Twilio;
use Utopia\Messaging\Adapters\SMS\Vonage;
use Utopia\Registry\Registry;
use MaxMind\Db\Reader;
use PHPMailer\PHPMailer\PHPMailer;
use Utopia\Cache\Adapter\Redis as RedisCache;
use Utopia\Cache\Cache;
use Utopia\Database\Adapter\MariaDB;
use Utopia\Database\Document;
use Utopia\Database\Database;
use Utopia\Database\Validator\Structure;
use Utopia\Database\Validator\Authorization;
use Utopia\Validator\Range;
use Utopia\Validator\WhiteList;
use Swoole\Database\PDOConfig;
use Swoole\Database\PDOPool;
use Swoole\Database\RedisConfig;
use Swoole\Database\RedisPool;
use Utopia\Database\Query;
use Utopia\Database\Validator\DatetimeValidator;
use Utopia\Storage\Device;
use Utopia\Storage\Storage;
use Utopia\Storage\Device\Backblaze;
use Utopia\Storage\Device\DOSpaces;
use Utopia\Storage\Device\Linode;
use Utopia\Storage\Device\Local;
use Utopia\Storage\Device\S3;
use Utopia\Storage\Device\Linode;
use Utopia\Storage\Device\Wasabi;
use Utopia\Storage\Storage;
use Utopia\Validator\Range;
use Utopia\Validator\IP;
use Utopia\Validator\URL;
use Utopia\Validator\WhiteList;
const APP_NAME = 'Appwrite';
const APP_DOMAIN = 'appwrite.io';
@@ -84,6 +86,8 @@ const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
const APP_LIMIT_COUNT = 5000;
const APP_LIMIT_USERS = 10000;
const APP_LIMIT_USER_SESSIONS_MAX = 100;
const APP_LIMIT_USER_SESSIONS_DEFAULT = 10;
const APP_LIMIT_ANTIVIRUS = 20000000; //20MB
const APP_LIMIT_ENCRYPTION = 20000000; //20MB
const APP_LIMIT_COMPRESSION = 20000000; //20MB
@@ -92,10 +96,11 @@ const APP_LIMIT_ARRAY_ELEMENT_SIZE = 4096; // Default maximum length of element
const APP_LIMIT_SUBQUERY = 1000;
const APP_LIMIT_WRITE_RATE_DEFAULT = 60; // Default maximum write rate per rate period
const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate period in seconds
const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls
const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 501;
const APP_VERSION_STABLE = '1.1.2';
const APP_VERSION_STABLE = '1.2.1';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
@@ -600,7 +605,7 @@ $register->set('smtp', function () {
return $mail;
});
$register->set('geodb', function () {
return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2022-06.mmdb');
return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2023-01.mmdb');
});
$register->set('db', function () {
// This is usually for our workers or CLI commands scope
@@ -629,6 +634,9 @@ $register->set('cache', function () {
return $redis;
});
$register->set('promiseAdapter', function () {
return new Swoole();
});
/*
* Localization
@@ -747,7 +755,7 @@ App::setResource('clients', function ($request, $console, $project) {
$console->setAttribute('platforms', [ // Always allow current host
'$collection' => ID::custom('platforms'),
'name' => 'Current Host',
'type' => 'web',
'type' => Origin::CLIENT_TYPE_WEB,
'hostname' => $request->getHostname(),
], Document::SET_TYPE_APPEND);
@@ -759,7 +767,7 @@ App::setResource('clients', function ($request, $console, $project) {
fn ($node) => $node['hostname'],
\array_filter(
$console->getAttribute('platforms', []),
fn ($node) => (isset($node['type']) && $node['type'] === 'web' && isset($node['hostname']) && !empty($node['hostname']))
fn ($node) => (isset($node['type']) && ($node['type'] === Origin::CLIENT_TYPE_WEB) && isset($node['hostname']) && !empty($node['hostname']))
)
);
@@ -770,7 +778,7 @@ App::setResource('clients', function ($request, $console, $project) {
fn ($node) => $node['hostname'],
\array_filter(
$project->getAttribute('platforms', []),
fn ($node) => (isset($node['type']) && $node['type'] === 'web' && isset($node['hostname']) && !empty($node['hostname']))
fn ($node) => (isset($node['type']) && ($node['type'] === Origin::CLIENT_TYPE_WEB || $node['type'] === Origin::CLIENT_TYPE_FLUTTER_WEB) && isset($node['hostname']) && !empty($node['hostname']))
)
)
)
@@ -903,7 +911,7 @@ App::setResource('console', function () {
[
'$collection' => ID::custom('platforms'),
'name' => 'Localhost',
'type' => 'web',
'type' => Origin::CLIENT_TYPE_WEB,
'hostname' => 'localhost',
], // Current host is added on app init
],
@@ -961,7 +969,7 @@ App::setResource('deviceBuilds', function ($project) {
function getDevice($root): Device
{
switch (App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)) {
switch (strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL))) {
case Storage::DEVICE_LOCAL:
default:
return new Local($root);
@@ -1045,3 +1053,93 @@ App::setResource('servers', function () {
return $languages;
});
App::setResource('promiseAdapter', function ($register) {
return $register->get('promiseAdapter');
}, ['register']);
App::setResource('schema', function ($utopia, $dbForProject) {
$complexity = function (int $complexity, array $args) {
$queries = Query::parseQueries($args['queries'] ?? []);
$query = Query::getByType($queries, Query::TYPE_LIMIT)[0] ?? null;
$limit = $query ? $query->getValue() : APP_LIMIT_LIST_DEFAULT;
return $complexity * $limit;
};
$attributes = function (int $limit, int $offset) use ($dbForProject) {
$attrs = Authorization::skip(fn() => $dbForProject->find('attributes', [
Query::limit($limit),
Query::offset($offset),
]));
return \array_map(function ($attr) {
return $attr->getArrayCopy();
}, $attrs);
};
$urls = [
'list' => function (string $databaseId, string $collectionId, array $args) {
return "/v1/databases/$databaseId/collections/$collectionId/documents";
},
'create' => function (string $databaseId, string $collectionId, array $args) {
return "/v1/databases/$databaseId/collections/$collectionId/documents";
},
'read' => function (string $databaseId, string $collectionId, array $args) {
return "/v1/databases/$databaseId/collections/$collectionId/documents/{$args['documentId']}";
},
'update' => function (string $databaseId, string $collectionId, array $args) {
return "/v1/databases/$databaseId/collections/$collectionId/documents/{$args['documentId']}";
},
'delete' => function (string $databaseId, string $collectionId, array $args) {
return "/v1/databases/$databaseId/collections/$collectionId/documents/{$args['documentId']}";
},
];
$params = [
'list' => function (string $databaseId, string $collectionId, array $args) {
return [ 'queries' => $args['queries']];
},
'create' => function (string $databaseId, string $collectionId, array $args) {
$id = $args['id'] ?? 'unique()';
$permissions = $args['permissions'] ?? null;
unset($args['id']);
unset($args['permissions']);
// Order must be the same as the route params
return [
'databaseId' => $databaseId,
'documentId' => $id,
'collectionId' => $collectionId,
'data' => $args,
'permissions' => $permissions,
];
},
'update' => function (string $databaseId, string $collectionId, array $args) {
$documentId = $args['id'];
$permissions = $args['permissions'] ?? null;
unset($args['id']);
unset($args['permissions']);
// Order must be the same as the route params
return [
'databaseId' => $databaseId,
'collectionId' => $collectionId,
'documentId' => $documentId,
'data' => $args,
'permissions' => $permissions,
];
},
];
return Schema::build(
$utopia,
$complexity,
$attributes,
$urls,
$params,
);
}, ['utopia', 'dbForProject']);
+2 -2
View File
@@ -237,7 +237,7 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
'data' => [
'events' => ['stats.connections'],
'channels' => ['project'],
'timestamp' => DateTime::now(),
'timestamp' => DateTime::formatTz(DateTime::now()),
'payload' => [
$projectId => $payload[$projectId]
]
@@ -264,7 +264,7 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
'data' => [
'events' => ['test.event'],
'channels' => ['tests'],
'timestamp' => DateTime::now(),
'timestamp' => DateTime::formatTz(DateTime::now()),
'payload' => $payload
]
];
+21 -14
View File
@@ -1,24 +1,26 @@
<?php
use Utopia\Config\Config;
use Utopia\CLI\Console;
use Appwrite\Spec\Swagger2;
use Appwrite\SDK\SDK;
use Appwrite\SDK\Language\Android;
use Appwrite\SDK\Language\CLI;
use Appwrite\SDK\Language\PHP;
use Appwrite\SDK\Language\Web;
use Appwrite\SDK\Language\Node;
use Appwrite\SDK\Language\Python;
use Appwrite\SDK\Language\Ruby;
use Appwrite\SDK\Language\Dart;
use Appwrite\SDK\Language\Deno;
use Appwrite\SDK\Language\DotNet;
use Appwrite\SDK\Language\Flutter;
use Appwrite\SDK\Language\Go;
use Appwrite\SDK\Language\GraphQL;
use Appwrite\SDK\Language\Kotlin;
use Appwrite\SDK\Language\Android;
use Appwrite\SDK\Language\Node;
use Appwrite\SDK\Language\PHP;
use Appwrite\SDK\Language\Python;
use Appwrite\SDK\Language\REST;
use Appwrite\SDK\Language\Ruby;
use Appwrite\SDK\Language\Swift;
use Appwrite\SDK\Language\SwiftClient;
use Appwrite\SDK\Language\Apple;
use Appwrite\SDK\Language\Web;
use Appwrite\SDK\SDK;
use Appwrite\Spec\Swagger2;
use Utopia\CLI\Console;
use Utopia\Config\Config;
$cli
->task('sdks')
@@ -30,7 +32,7 @@ $cli
$production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false;
$message = ($git) ? Console::confirm('Please enter your commit message:') : '';
if (!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', 'latest'])) {
if (!in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', '1.2.x', 'latest'])) {
throw new Exception('Unknown version given');
}
@@ -148,7 +150,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
$warning = $warning . "\n\n > This is the Swift SDK for integrating with Appwrite from your Swift server-side code. If you're looking for the Apple SDK you should check [appwrite/sdk-for-apple](https://github.com/appwrite/sdk-for-apple)";
break;
case 'apple':
$config = new SwiftClient();
$config = new Apple();
break;
case 'dotnet':
$cover = '';
@@ -161,9 +163,14 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
$config = new Kotlin();
$warning = $warning . "\n\n > This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)";
break;
case 'graphql':
$config = new GraphQL();
break;
case 'rest':
$config = new REST();
break;
default:
throw new Exception('Language "' . $language['key'] . '" not supported');
break;
}
Console::info("Generating {$language['name']} SDK...");
+4
View File
@@ -153,6 +153,9 @@ services:
- _APP_MAINTENANCE_RETENTION_USAGE_HOURLY
- _APP_SMS_PROVIDER
- _APP_SMS_FROM
- _APP_GRAPHQL_MAX_BATCH_SIZE
- _APP_GRAPHQL_MAX_COMPLEXITY
- _APP_GRAPHQL_MAX_DEPTH
appwrite-realtime:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
@@ -506,6 +509,7 @@ services:
entrypoint: worker-messaging
<<: *x-logging
container_name: appwrite-worker-messaging
restart: unless-stopped
networks:
- appwrite
depends_on:
+1 -1
View File
@@ -91,7 +91,7 @@ class BuildsV1 extends Worker
'outputPath' => '',
'runtime' => $function->getAttribute('runtime'),
'source' => $deployment->getAttribute('path'),
'sourceType' => App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL),
'sourceType' => strtolower(App::getEnv('_APP_STORAGE_DEVICE', Storage::DEVICE_LOCAL)),
'stdout' => '',
'stderr' => '',
'endTime' => null,
+30 -8
View File
@@ -4,6 +4,7 @@ use Appwrite\Event\Event;
use Appwrite\Event\Mail;
use Appwrite\Network\Validator\CNAME;
use Appwrite\Resque\Worker;
use Appwrite\Template\Template;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Database\Database;
@@ -12,6 +13,7 @@ use Utopia\Database\DateTime;
use Utopia\Database\ID;
use Utopia\Database\Query;
use Utopia\Domains\Domain;
use Utopia\Locale\Locale;
require_once __DIR__ . '/../init.php';
@@ -375,18 +377,38 @@ class CertificatesV1 extends Worker
Console::warning('Cannot renew domain (' . $domain . ') on attempt no. ' . $attempt . ' certificate: ' . $errorMessage);
// Send mail to administratore mail
$locale = new Locale(App::getEnv('_APP_LOCALE', 'en'));
if (!$locale->getText('emails.sender') || !$locale->getText("emails.certificate.hello") || !$locale->getText("emails.certificate.subject") || !$locale->getText("emails.certificate.body") || !$locale->getText("emails.certificate.footer") || !$locale->getText("emails.certificate.thanks") || !$locale->getText("emails.certificate.signature")) {
$locale->setDefault('en');
}
$body = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-base.tpl');
$subject = \sprintf($locale->getText("emails.certificate.subject"), $domain);
$body->setParam('{{domain}}', $domain);
$body->setParam('{{error}}', $errorMessage);
$body->setParam('{{attempt}}', $attempt);
$body
->setParam('{{subject}}', $subject)
->setParam('{{hello}}', $locale->getText("emails.certificate.hello"))
->setParam('{{body}}', $locale->getText("emails.certificate.body"))
->setParam('{{redirect}}', 'https://' . $domain)
->setParam('{{footer}}', $locale->getText("emails.certificate.footer"))
->setParam('{{thanks}}', $locale->getText("emails.certificate.thanks"))
->setParam('{{signature}}', $locale->getText("emails.certificate.signature"))
->setParam('{{project}}', 'Console')
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{text-content}}', '#000000');
$body = $body->render();
$mail = new Mail();
$mail
->setType(MAIL_TYPE_CERTIFICATE)
->setRecipient(App::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'))
->setUrl('https://' . $domain)
->setLocale(App::getEnv('_APP_LOCALE', 'en'))
->setName('Appwrite Administrator')
->setPayload([
'domain' => $domain,
'error' => $errorMessage,
'attempt' => $attempt
])
->trigger();
}
+61 -10
View File
@@ -44,9 +44,6 @@ class DeletesV1 extends Worker
case DELETE_TYPE_DATABASES:
$this->deleteDatabase($document, $project->getId());
break;
case DELETE_TYPE_COLLECTIONS:
$this->deleteCollection($document, $project->getId());
break;
case DELETE_TYPE_PROJECTS:
$this->deleteProject($document);
break;
@@ -66,6 +63,10 @@ class DeletesV1 extends Worker
$this->deleteBucket($document, $project->getId());
break;
default:
if (\str_starts_with($document->getCollection(), 'database_')) {
$this->deleteCollection($document, $project->getId());
break;
}
Console::error('No lazy delete operation available for document of type: ' . $document->getCollection());
break;
}
@@ -172,6 +173,7 @@ class DeletesV1 extends Worker
/**
* @param Document $document database document
* @param string $projectId
* @throws Exception
*/
protected function deleteDatabase(Document $document, string $projectId): void
{
@@ -191,6 +193,7 @@ class DeletesV1 extends Worker
/**
* @param Document $document teams document
* @param string $projectId
* @throws Exception
*/
protected function deleteCollection(Document $document, string $projectId): void
{
@@ -217,6 +220,7 @@ class DeletesV1 extends Worker
/**
* @param string $hourlyUsageRetentionDatetime
* @throws Exception
*/
protected function deleteUsageStats(string $hourlyUsageRetentionDatetime)
{
@@ -232,6 +236,7 @@ class DeletesV1 extends Worker
/**
* @param Document $document teams document
* @param string $projectId
* @throws Exception
*/
protected function deleteMemberships(Document $document, string $projectId): void
{
@@ -245,25 +250,62 @@ class DeletesV1 extends Worker
/**
* @param Document $document project document
* @throws Exception
*/
protected function deleteProject(Document $document): void
{
$projectId = $document->getId();
// Delete all DBs
$this->getProjectDB($projectId)->delete($projectId);
// Delete project domains and certificates
$dbForConsole = $this->getConsoleDB();
$domains = $dbForConsole->find('domains', [
Query::equal('projectInternalId', [$document->getInternalId()])
]);
foreach ($domains as $domain) {
$this->deleteCertificates($domain);
}
// Delete project tables
$dbForProject = $this->getProjectDB($projectId, $document);
while (true) {
$collections = $dbForProject->listCollections();
if (empty($collections)) {
break;
}
foreach ($collections as $collection) {
$dbForProject->deleteCollection($collection->getId());
}
}
// Delete metadata tables
try {
$dbForProject->deleteCollection('_metadata');
} catch (Exception) {
// Ignore: deleteCollection tries to delete a metadata entry after the collection is deleted,
// which will throw an exception here because the metadata collection is already deleted.
}
// Delete all storage directories
$uploads = $this->getFilesDevice($document->getId());
$cache = new Local(APP_STORAGE_CACHE . '/app-' . $document->getId());
$uploads = $this->getFilesDevice($projectId);
$functions = $this->getFunctionsDevice($projectId);
$builds = $this->getBuildsDevice($projectId);
$cache = $this->getCacheDevice($projectId);
$uploads->delete($uploads->getRoot(), true);
$functions->delete($functions->getRoot(), true);
$builds->delete($builds->getRoot(), true);
$cache->delete($cache->getRoot(), true);
}
/**
* @param Document $document user document
* @param string $projectId
* @throws Exception
*/
protected function deleteUser(Document $document, string $projectId): void
{
@@ -305,6 +347,7 @@ class DeletesV1 extends Worker
/**
* @param string $datetime
* @throws Exception
*/
protected function deleteExecutionLogs(string $datetime): void
{
@@ -337,6 +380,7 @@ class DeletesV1 extends Worker
/**
* @param string $datetime
* @throws Exception
*/
protected function deleteRealtimeUsage(string $datetime): void
{
@@ -393,6 +437,7 @@ class DeletesV1 extends Worker
/**
* @param string $resource
* @param string $projectId
* @throws Exception
*/
protected function deleteAuditLogsByResource(string $resource, string $projectId): void
{
@@ -406,6 +451,7 @@ class DeletesV1 extends Worker
/**
* @param Document $document function document
* @param string $projectId
* @throws Exception
*/
protected function deleteFunction(Document $document, string $projectId): void
{
@@ -479,6 +525,7 @@ class DeletesV1 extends Worker
/**
* @param Document $document deployment document
* @param string $projectId
* @throws Exception
*/
protected function deleteDeployment(Document $document, string $projectId): void
{
@@ -528,9 +575,10 @@ class DeletesV1 extends Worker
/**
* @param Document $document to be deleted
* @param Database $database to delete it from
* @param callable $callback to perform after document is deleted
* @param callable|null $callback to perform after document is deleted
*
* @return bool
* @throws \Utopia\Database\Exception\Authorization
*/
protected function deleteById(Document $document, Database $database, callable $callback = null): bool
{
@@ -550,6 +598,7 @@ class DeletesV1 extends Worker
/**
* @param callable $callback
* @throws Exception
*/
protected function deleteForProjectIds(callable $callback): void
{
@@ -584,9 +633,10 @@ class DeletesV1 extends Worker
/**
* @param string $collection collectionID
* @param Query[] $queries
* @param array $queries
* @param Database $database
* @param callable $callback
* @param callable|null $callback
* @throws Exception
*/
protected function deleteByGroup(string $collection, array $queries, Database $database, callable $callback = null): void
{
@@ -620,6 +670,7 @@ class DeletesV1 extends Worker
/**
* @param Document $document certificates document
* @throws \Utopia\Database\Exception\Authorization
*/
protected function deleteCertificates(Document $document): void
{
+3 -104
View File
@@ -1,11 +1,8 @@
<?php
use Appwrite\Resque\Worker;
use Appwrite\Template\Template;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Database\Document;
use Utopia\Locale\Locale;
require_once __DIR__ . '/../init.php';
@@ -32,67 +29,12 @@ class MailsV1 extends Worker
return;
}
$project = new Document($this->args['project'] ?? []);
$user = new Document($this->args['user'] ?? []);
$team = new Document($this->args['team'] ?? []);
$payload = $this->args['payload'] ?? [];
$recipient = $this->args['recipient'];
$url = $this->args['url'];
$subject = $this->args['subject'];
$name = $this->args['name'];
$type = $this->args['type'];
$prefix = $this->getPrefix($type);
$locale = new Locale($this->args['locale']);
$projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]');
if (!$this->doesLocaleExist($locale, $prefix)) {
$locale->setDefault('en');
}
$from = $project->isEmpty() || $project->getId() === 'console' ? '' : \sprintf($locale->getText('emails.sender'), $projectName);
$body = Template::fromFile(__DIR__ . '/../config/locale/templates/email-base.tpl');
$subject = '';
switch ($type) {
case MAIL_TYPE_CERTIFICATE:
$domain = $payload['domain'];
$error = $payload['error'];
$attempt = $payload['attempt'];
$subject = \sprintf($locale->getText("$prefix.subject"), $domain);
$body->setParam('{{domain}}', $domain);
$body->setParam('{{error}}', $error);
$body->setParam('{{attempt}}', $attempt);
break;
case MAIL_TYPE_INVITATION:
$subject = \sprintf($locale->getText("$prefix.subject"), $team->getAttribute('name'), $projectName);
$body->setParam('{{owner}}', $user->getAttribute('name'));
$body->setParam('{{team}}', $team->getAttribute('name'));
break;
case MAIL_TYPE_RECOVERY:
case MAIL_TYPE_VERIFICATION:
case MAIL_TYPE_MAGIC_SESSION:
$subject = $locale->getText("$prefix.subject");
break;
default:
throw new Exception('Undefined Mail Type : ' . $type, 500);
}
$body
->setParam('{{subject}}', $subject)
->setParam('{{hello}}', $locale->getText("$prefix.hello"))
->setParam('{{name}}', $name)
->setParam('{{body}}', $locale->getText("$prefix.body"))
->setParam('{{redirect}}', $url)
->setParam('{{footer}}', $locale->getText("$prefix.footer"))
->setParam('{{thanks}}', $locale->getText("$prefix.thanks"))
->setParam('{{signature}}', $locale->getText("$prefix.signature"))
->setParam('{{project}}', $projectName)
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{text-content}}', '#000000');
$body = $body->render();
$body = $this->args['body'];
$from = $this->args['from'];
/** @var \PHPMailer\PHPMailer\PHPMailer $mail */
$mail = $register->get('smtp');
@@ -130,47 +72,4 @@ class MailsV1 extends Worker
public function shutdown(): void
{
}
/**
* Returns a prefix from a mail type
*
* @param $type
*
* @return string
*/
protected function getPrefix(string $type): string
{
switch ($type) {
case MAIL_TYPE_RECOVERY:
return 'emails.recovery';
case MAIL_TYPE_CERTIFICATE:
return 'emails.certificate';
case MAIL_TYPE_INVITATION:
return 'emails.invitation';
case MAIL_TYPE_VERIFICATION:
return 'emails.verification';
case MAIL_TYPE_MAGIC_SESSION:
return 'emails.magicSession';
default:
throw new Exception('Undefined Mail Type : ' . $type, 500);
}
}
/**
* Returns true if all the required terms in a locale exist. False otherwise
*
* @param $locale
* @param $prefix
*
* @return bool
*/
protected function doesLocaleExist(Locale $locale, string $prefix): bool
{
if (!$locale->getText('emails.sender') || !$locale->getText("$prefix.hello") || !$locale->getText("$prefix.subject") || !$locale->getText("$prefix.body") || !$locale->getText("$prefix.footer") || !$locale->getText("$prefix.thanks") || !$locale->getText("$prefix.signature")) {
return false;
}
return true;
}
}
+9 -8
View File
@@ -50,18 +50,18 @@
"utopia-php/cli": "0.13.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.28.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/domains": "1.1.*",
"utopia-php/framework": "0.25.*",
"utopia-php/framework": "0.26.*",
"utopia-php/image": "0.5.*",
"utopia-php/locale": "0.4.*",
"utopia-php/logger": "0.3.*",
"utopia-php/messaging": "0.1.*",
"utopia-php/orchestration": "0.6.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/registry": "0.5.*",
"utopia-php/storage": "0.11.*",
"utopia-php/swoole": "0.4.*",
"utopia-php/websocket": "0.1.0",
"utopia-php/storage": "0.13.*",
"utopia-php/swoole": "0.5.*",
"utopia-php/websocket": "0.1.*",
"resque/php-resque": "1.3.6",
"matomo/device-detector": "6.0.0",
"dragonmantank/cron-expression": "3.3.1",
@@ -69,7 +69,8 @@
"phpmailer/phpmailer": "6.6.0",
"chillerlan/php-qrcode": "4.3.3",
"adhocore/jwt": "1.1.2",
"slickdeals/statsd": "3.1.0"
"slickdeals/statsd": "3.1.0",
"webonyx/graphql-php": "14.11.*"
},
"repositories": [
{
@@ -78,7 +79,7 @@
}
],
"require-dev": {
"appwrite/sdk-generator": "0.28.*",
"appwrite/sdk-generator": "0.29.*",
"ext-fileinfo": "*",
"phpunit/phpunit": "9.5.20",
"squizlabs/php_codesniffer": "^3.6",
@@ -93,4 +94,4 @@
"php": "8.0"
}
}
}
}
Generated
+163 -104
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a2a79fc2e9ebdd4d05afa6632c642686",
"content-hash": "60bbe8610441d8b6e119bd322e0f5a13",
"packages": [
{
"name": "adhocore/jwt",
@@ -801,20 +801,21 @@
"issues": "https://github.com/influxdata/influxdb-php/issues",
"source": "https://github.com/influxdata/influxdb-php/tree/1.15.2"
},
"abandoned": true,
"time": "2020-12-26T17:45:17+00:00"
},
{
"name": "laravel/pint",
"version": "v1.2.0",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "1d276e4c803397a26cc337df908f55c2a4e90d86"
"reference": "e60e2112ee779ce60f253695b273d1646a17d6f1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/1d276e4c803397a26cc337df908f55c2a4e90d86",
"reference": "1d276e4c803397a26cc337df908f55c2a4e90d86",
"url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1",
"reference": "e60e2112ee779ce60f253695b273d1646a17d6f1",
"shasum": ""
},
"require": {
@@ -826,10 +827,10 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.11.0",
"illuminate/view": "^9.27",
"laravel-zero/framework": "^9.1.3",
"mockery/mockery": "^1.5.0",
"nunomaduro/larastan": "^2.2",
"illuminate/view": "^9.32.0",
"laravel-zero/framework": "^9.2.0",
"mockery/mockery": "^1.5.1",
"nunomaduro/larastan": "^2.2.0",
"nunomaduro/termwind": "^1.14.0",
"pestphp/pest": "^1.22.1"
},
@@ -867,7 +868,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2022-09-13T15:07:15+00:00"
"time": "2022-11-29T16:25:20+00:00"
},
{
"name": "matomo/device-detector",
@@ -1461,16 +1462,16 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.1.1",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918"
"reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918",
"reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3",
"reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3",
"shasum": ""
},
"require": {
@@ -1479,7 +1480,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.1-dev"
"dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -1508,7 +1509,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0"
},
"funding": [
{
@@ -1524,7 +1525,7 @@
"type": "tidelift"
}
],
"time": "2022-02-25T11:15:52+00:00"
"time": "2022-11-25T10:21:52+00:00"
},
{
"name": "utopia-php/abuse",
@@ -1945,24 +1946,25 @@
},
{
"name": "utopia-php/framework",
"version": "0.25.0",
"version": "0.26.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/framework.git",
"reference": "c524f681254255c8204fbf7919c53bf3b4982636"
"reference": "e8da5576370366d3bf9c574ec855f8c96fe4f34e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/c524f681254255c8204fbf7919c53bf3b4982636",
"reference": "c524f681254255c8204fbf7919c53bf3b4982636",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/e8da5576370366d3bf9c574ec855f8c96fe4f34e",
"reference": "e8da5576370366d3bf9c574ec855f8c96fe4f34e",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"phpunit/phpunit": "^9.5.25",
"vimeo/psalm": "^4.27.0"
"vimeo/psalm": "4.27.0"
},
"type": "library",
"autoload": {
@@ -1982,9 +1984,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/framework/issues",
"source": "https://github.com/utopia-php/framework/tree/0.25.0"
"source": "https://github.com/utopia-php/framework/tree/0.26.0"
},
"time": "2022-11-02T09:49:57+00:00"
"time": "2023-01-13T08:14:43+00:00"
},
{
"name": "utopia-php/image",
@@ -2157,16 +2159,16 @@
},
{
"name": "utopia-php/messaging",
"version": "0.1.0",
"version": "0.1.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/messaging.git",
"reference": "501272fad666f06bec8f130076862e7981a73f8c"
"reference": "a75d66ddd59b834ab500a4878a2c084e6572604a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/501272fad666f06bec8f130076862e7981a73f8c",
"reference": "501272fad666f06bec8f130076862e7981a73f8c",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/a75d66ddd59b834ab500a4878a2c084e6572604a",
"reference": "a75d66ddd59b834ab500a4878a2c084e6572604a",
"shasum": ""
},
"require": {
@@ -2174,9 +2176,9 @@
"php": ">=8.0.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"phpmailer/phpmailer": "6.6.*",
"phpunit/phpunit": "9.5.*",
"squizlabs/php_codesniffer": "^3.6"
"phpunit/phpunit": "9.5.*"
},
"type": "library",
"autoload": {
@@ -2188,12 +2190,6 @@
"license": [
"MIT"
],
"authors": [
{
"name": "Jake Barnby",
"email": "jake@appwrite.io"
}
],
"description": "A simple, light and advanced PHP messaging library",
"keywords": [
"library",
@@ -2205,9 +2201,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/messaging/issues",
"source": "https://github.com/utopia-php/messaging/tree/0.1.0"
"source": "https://github.com/utopia-php/messaging/tree/0.1.1"
},
"time": "2022-09-29T11:22:48+00:00"
"time": "2023-02-07T05:42:46+00:00"
},
{
"name": "utopia-php/orchestration",
@@ -2371,16 +2367,16 @@
},
{
"name": "utopia-php/storage",
"version": "0.11.0",
"version": "0.13.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/storage.git",
"reference": "59802cf281d1976560cf6e353f250a9b870efddc"
"reference": "ad1c00f24ca56e73888acc2af3deee4919b1194b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/59802cf281d1976560cf6e353f250a9b870efddc",
"reference": "59802cf281d1976560cf6e353f250a9b870efddc",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/ad1c00f24ca56e73888acc2af3deee4919b1194b",
"reference": "ad1c00f24ca56e73888acc2af3deee4919b1194b",
"shasum": ""
},
"require": {
@@ -2420,22 +2416,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/storage/issues",
"source": "https://github.com/utopia-php/storage/tree/0.11.0"
"source": "https://github.com/utopia-php/storage/tree/0.13.2"
},
"time": "2022-08-31T09:17:31+00:00"
"time": "2022-12-20T11:11:35+00:00"
},
{
"name": "utopia-php/swoole",
"version": "0.4.0",
"version": "0.5.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/swoole.git",
"reference": "536e1f3e78fc0197e4a8ed81b1bf2636a3bc4538"
"reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/536e1f3e78fc0197e4a8ed81b1bf2636a3bc4538",
"reference": "536e1f3e78fc0197e4a8ed81b1bf2636a3bc4538",
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/c2a3a4f944a2f22945af3cbcb95b13f0769628b1",
"reference": "c2a3a4f944a2f22945af3cbcb95b13f0769628b1",
"shasum": ""
},
"require": {
@@ -2444,6 +2440,7 @@
"utopia-php/framework": "0.*.*"
},
"require-dev": {
"laravel/pint": "1.2.*",
"phpunit/phpunit": "^9.3",
"swoole/ide-helper": "4.8.3",
"vimeo/psalm": "4.15.0"
@@ -2458,12 +2455,6 @@
"license": [
"MIT"
],
"authors": [
{
"name": "Eldad Fux",
"email": "team@appwrite.io"
}
],
"description": "An extension for Utopia Framework to work with PHP Swoole as a PHP FPM alternative",
"keywords": [
"framework",
@@ -2476,9 +2467,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/swoole/issues",
"source": "https://github.com/utopia-php/swoole/tree/0.4.0"
"source": "https://github.com/utopia-php/swoole/tree/0.5.0"
},
"time": "2022-10-08T14:32:43+00:00"
"time": "2022-10-19T22:19:07+00:00"
},
{
"name": "utopia-php/system",
@@ -2652,21 +2643,87 @@
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
},
"time": "2022-06-03T18:03:27+00:00"
},
{
"name": "webonyx/graphql-php",
"version": "v14.11.9",
"source": {
"type": "git",
"url": "https://github.com/webonyx/graphql-php.git",
"reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ff91c9f3cf241db702e30b2c42bcc0920e70ac70",
"reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": "^7.1 || ^8"
},
"require-dev": {
"amphp/amp": "^2.3",
"doctrine/coding-standard": "^6.0",
"nyholm/psr7": "^1.2",
"phpbench/phpbench": "^1.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "0.12.82",
"phpstan/phpstan-phpunit": "0.12.18",
"phpstan/phpstan-strict-rules": "0.12.9",
"phpunit/phpunit": "^7.2 || ^8.5",
"psr/http-message": "^1.0",
"react/promise": "2.*",
"simpod/php-coveralls-mirror": "^3.0",
"squizlabs/php_codesniffer": "3.5.4"
},
"suggest": {
"psr/http-message": "To use standard GraphQL server",
"react/promise": "To leverage async resolving on React PHP platform"
},
"type": "library",
"autoload": {
"psr-4": {
"GraphQL\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A PHP port of GraphQL reference implementation",
"homepage": "https://github.com/webonyx/graphql-php",
"keywords": [
"api",
"graphql"
],
"support": {
"issues": "https://github.com/webonyx/graphql-php/issues",
"source": "https://github.com/webonyx/graphql-php/tree/v14.11.9"
},
"funding": [
{
"url": "https://opencollective.com/webonyx-graphql-php",
"type": "open_collective"
}
],
"time": "2023-01-06T12:12:50+00:00"
}
],
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.28.1",
"version": "0.29.4",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "ed8d3daa66589733b49b11c053d524cdf576ffee"
"reference": "35ec927d1de1854bebe8894e16b1646c3fdd5567"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ed8d3daa66589733b49b11c053d524cdf576ffee",
"reference": "ed8d3daa66589733b49b11c053d524cdf576ffee",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/35ec927d1de1854bebe8894e16b1646c3fdd5567",
"reference": "35ec927d1de1854bebe8894e16b1646c3fdd5567",
"shasum": ""
},
"require": {
@@ -2674,12 +2731,13 @@
"ext-json": "*",
"ext-mbstring": "*",
"matthiasmullie/minify": "^1.3.68",
"php": ">=7.0.0",
"php": ">=8.0",
"twig/twig": "^3.4.1"
},
"require-dev": {
"brianium/paratest": "^6.4",
"phpunit/phpunit": "^9.5.21"
"phpunit/phpunit": "^9.5.21",
"squizlabs/php_codesniffer": "^3.6"
},
"type": "library",
"autoload": {
@@ -2701,36 +2759,36 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.28.1"
"source": "https://github.com/appwrite/sdk-generator/tree/0.29.4"
},
"time": "2022-09-22T09:15:54+00:00"
"time": "2023-02-03T05:44:59+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.4.1",
"version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
"reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"doctrine/coding-standard": "^9 || ^11",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
"vimeo/psalm": "^4.30 || ^5.4"
},
"type": "library",
"autoload": {
@@ -2757,7 +2815,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.1"
"source": "https://github.com/doctrine/instantiator/tree/1.5.0"
},
"funding": [
{
@@ -2773,20 +2831,20 @@
"type": "tidelift"
}
],
"time": "2022-03-03T08:28:38+00:00"
"time": "2022-12-30T00:15:36+00:00"
},
{
"name": "matthiasmullie/minify",
"version": "1.3.69",
"version": "1.3.70",
"source": {
"type": "git",
"url": "https://github.com/matthiasmullie/minify.git",
"reference": "a61c949cccd086808063611ef9698eabe42ef22f"
"reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a61c949cccd086808063611ef9698eabe42ef22f",
"reference": "a61c949cccd086808063611ef9698eabe42ef22f",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/2807d9f9bece6877577ad44acb5c801bb3ae536b",
"reference": "2807d9f9bece6877577ad44acb5c801bb3ae536b",
"shasum": ""
},
"require": {
@@ -2795,9 +2853,10 @@
"php": ">=5.3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.0",
"matthiasmullie/scrapbook": "dev-master",
"phpunit/phpunit": ">=4.8"
"friendsofphp/php-cs-fixer": ">=2.0",
"matthiasmullie/scrapbook": ">=1.3",
"phpunit/phpunit": ">=4.8",
"squizlabs/php_codesniffer": ">=3.0"
},
"suggest": {
"psr/cache-implementation": "Cache implementation to use with Minify::cache"
@@ -2820,12 +2879,12 @@
{
"name": "Matthias Mullie",
"email": "minify@mullie.eu",
"homepage": "http://www.mullie.eu",
"homepage": "https://www.mullie.eu",
"role": "Developer"
}
],
"description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.",
"homepage": "http://www.minifier.org",
"homepage": "https://github.com/matthiasmullie/minify",
"keywords": [
"JS",
"css",
@@ -2835,7 +2894,7 @@
],
"support": {
"issues": "https://github.com/matthiasmullie/minify/issues",
"source": "https://github.com/matthiasmullie/minify/tree/1.3.69"
"source": "https://github.com/matthiasmullie/minify/tree/1.3.70"
},
"funding": [
{
@@ -2843,7 +2902,7 @@
"type": "github"
}
],
"time": "2022-08-01T09:00:18+00:00"
"time": "2022-12-09T12:56:44+00:00"
},
{
"name": "matthiasmullie/path-converter",
@@ -3291,21 +3350,21 @@
},
{
"name": "phpspec/prophecy",
"version": "v1.15.0",
"version": "v1.16.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
"reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359",
"reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.2",
"php": "^7.2 || ~8.0, <8.2",
"php": "^7.2 || 8.0.* || 8.1.* || 8.2.*",
"phpdocumentor/reflection-docblock": "^5.2",
"sebastian/comparator": "^3.0 || ^4.0",
"sebastian/recursion-context": "^3.0 || ^4.0"
@@ -3352,22 +3411,22 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
"source": "https://github.com/phpspec/prophecy/tree/v1.16.0"
},
"time": "2021-12-08T12:19:24+00:00"
"time": "2022-11-29T15:06:56+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.19",
"version": "9.2.23",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559"
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559",
"reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"shasum": ""
},
"require": {
@@ -3423,7 +3482,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.19"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23"
},
"funding": [
{
@@ -3431,7 +3490,7 @@
"type": "github"
}
],
"time": "2022-11-18T07:47:47+00:00"
"time": "2022-12-28T12:41:10+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -5105,16 +5164,16 @@
},
{
"name": "twig/twig",
"version": "v3.4.3",
"version": "v3.5.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58"
"reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/c38fd6b0b7f370c198db91ffd02e23b517426b58",
"reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/3ffcf4b7d890770466da3b2666f82ac054e7ec72",
"reference": "3ffcf4b7d890770466da3b2666f82ac054e7ec72",
"shasum": ""
},
"require": {
@@ -5129,7 +5188,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
"dev-master": "3.5-dev"
}
},
"autoload": {
@@ -5165,7 +5224,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.4.3"
"source": "https://github.com/twigphp/Twig/tree/v3.5.0"
},
"funding": [
{
@@ -5177,7 +5236,7 @@
"type": "tidelift"
}
],
"time": "2022-09-28T08:42:51+00:00"
"time": "2022-12-27T12:28:18+00:00"
}
],
"aliases": [],
@@ -5206,5 +5265,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.1.0"
}
+16 -2
View File
@@ -83,7 +83,6 @@ services:
- ./docs:/usr/src/code/docs
- ./public:/usr/src/code/public
- ./src:/usr/src/code/src
- ./dev:/usr/local/dev
depends_on:
- mariadb
- redis
@@ -174,6 +173,9 @@ services:
- _APP_MAINTENANCE_RETENTION_USAGE_HOURLY
- _APP_SMS_PROVIDER
- _APP_SMS_FROM
- _APP_GRAPHQL_MAX_BATCH_SIZE
- _APP_GRAPHQL_MAX_COMPLEXITY
- _APP_GRAPHQL_MAX_DEPTH
appwrite-realtime:
entrypoint: realtime
@@ -552,6 +554,7 @@ services:
entrypoint: worker-messaging
<<: *x-logging
container_name: appwrite-worker-messaging
restart: unless-stopped
image: appwrite-dev
networks:
- appwrite
@@ -615,7 +618,6 @@ services:
volumes:
- ./app:/usr/src/code/app
- ./src:/usr/src/code/src
- ./dev:/usr/local/dev
depends_on:
- influxdb
- mariadb
@@ -819,6 +821,18 @@ services:
# ports:
# - '3001:80'
graphql-explorer:
container_name: appwrite-graphql-explorer
image: appwrite/altair:0.3.0
restart: unless-stopped
networks:
- appwrite
ports:
- "9509:3000"
environment:
- SERVER_URL=http://localhost/v1/graphql
# Dev Tools End ------------------------------------------------------------------------------------------
networks:
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createAnonymousSession(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createEmailSession(
"email@example.com",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createJWT(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createMagicURLSession(
"[USER_ID]",
"email@example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createOAuth2Session(
"amazon",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createPhoneSession(
"[USER_ID]",
"+12065550100"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createPhoneVerification(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createRecovery(
"email@example.com",
"https://example.com"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createVerification(
"https://example.com"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.create(
"[USER_ID]",
"email@example.com",
"password",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.deleteSession(
"[SESSION_ID]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.deleteSessions(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.getPrefs(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.getSession(
"[SESSION_ID]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.get(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,20 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.listLogs(
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.listSessions(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateEmail(
"email@example.com",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateMagicURLSession(
"[USER_ID]",
"[SECRET]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateName(
"[NAME]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updatePassword(
"password",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updatePhoneSession(
"[USER_ID]",
"[SECRET]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updatePhoneVerification(
"[USER_ID]",
"[SECRET]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updatePhone(
"+12065550100",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updatePrefs(
mapOf( "a" to "b" )
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateRecovery(
"[USER_ID]",
"[SECRET]",
"password",
"password"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateSession(
"[SESSION_ID]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateStatus(new CoroutineCallback<>((result, error) -> {
if (error != null)
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateVerification(
"[USER_ID]",
"[SECRET]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getBrowser(
"aa",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getCreditCard(
"amex",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getFavicon(
"https://example.com"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getFlag(
"af",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getImage(
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,20 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getInitials(
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,21 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Avatars;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Avatars avatars = new Avatars(client);
avatars.getQR(
"[TEXT]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Databases databases = new Databases(client);
databases.createDocument(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[DOCUMENT_ID]",
mapOf( "a" to "b" ),
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Databases databases = new Databases(client);
databases.deleteDocument(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Databases databases = new Databases(client);
databases.getDocument(
"[DATABASE_ID]",
"[COLLECTION_ID]",
"[DOCUMENT_ID]"
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -0,0 +1,22 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client(context)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Databases databases = new Databases(client);
databases.listDocuments(
"[DATABASE_ID]",
"[COLLECTION_ID]",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

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