Compare commits

...
Author SHA1 Message Date
Bradley Schofield 3b796728f7 Update Tests 2023-11-07 09:36:36 +00:00
Bradley Schofield ecb3d05055 Update unsupported auth error code 2023-11-06 16:17:32 +00:00
Christy JacobandGitHub 9fc7c1384a Merge pull request #7071 from appwrite/fix-swoole-warning
feat: fix swoole warning
2023-11-03 19:46:59 +04:00
loks0n 305c781206 feat: fix swoole warning 2023-11-03 12:18:24 +00:00
Christy JacobandGitHub 8e1afa11f9 Merge pull request #7070 from appwrite/feat-remove-mock-endpoints
Feat remove mock endpoints
2023-11-02 21:38:15 +04:00
Bradley Schofield 23631f8282 Update specs 2023-11-02 17:12:08 +00:00
Bradley Schofield d921c03ee1 Update mock.php 2023-11-02 17:07:16 +00:00
Bradley Schofield b15dac16c8 Revert "Remove Mock API"
This reverts commit 2d045335ff.
2023-11-02 17:05:51 +00:00
Bradley Schofield 2d045335ff Remove Mock API 2023-11-02 17:05:31 +00:00
Christy JacobandGitHub 281b50ba4a Merge pull request #7063 from appwrite/1.4.x
1.4.x
2023-11-01 12:32:11 +04:00
Jake Barnby 3652ab61d8 Revert "Enum tests"
This reverts commit 74450b1178.
2023-11-01 21:02:42 +13:00
Jake Barnby 74450b1178 Enum tests 2023-11-01 18:29:54 +13:00
Christy JacobandGitHub 7110836beb Merge pull request #7061 from appwrite/feat-1.4.9-release-prep
Prepare 1.4.9 release
2023-10-31 23:59:11 +04:00
Steven Nguyen 358fdb6878 Add 1.4.9 to CHANGES.md 2023-10-31 12:43:52 -07:00
Steven Nguyen 755699de8a Bump appwrite version to 1.4.9 2023-10-31 12:40:45 -07:00
Christy JacobandGitHub 311fc0f0c4 Merge pull request #7059 from appwrite/fix/function-domains-execution
Fix 400 error on function domain execution
2023-10-31 23:17:16 +04:00
Steven NguyenandGitHub 7c8a9ad4d2 Fix incorrect general_protocol_unsupported error
$requestHeaders was being referenced before it was set. This PR reverts
code back to using $swooleRequest to extract the header.
2023-10-31 18:31:36 +00:00
Steven NguyenandGitHub c4e22b1085 Fix warning when cookie is null 2023-10-31 18:25:35 +00:00
Christy JacobandGitHub 9fded16d3f Merge pull request #7053 from appwrite/1.4.x
Sync main with 1.4.x
2023-10-31 12:27:08 +04:00
Christy JacobandGitHub 0a6ee966a2 Merge pull request #7045 from appwrite/update-project-creation-logic
chore: update project creation database allocation
2023-10-30 19:34:21 +04:00
德华 刘 744f2fbc1c chore: update project creation database allocation 2023-10-30 14:46:54 +00:00
Christy JacobandGitHub fbb82ceb81 Merge pull request #7028 from appwrite/feat-1.4.8-release-prep
Prepare 1.4.8 release
2023-10-27 23:32:00 +04:00
Steven Nguyen 4eab2a01f7 Add 1.4.8 to CHANGES.md 2023-10-27 10:31:43 -07:00
Steven Nguyen c1df289df7 Bump appwrite version to 1.4.8 2023-10-27 10:31:43 -07:00
Christy JacobandGitHub 255659f009 Merge pull request #7027 from appwrite/chore-bump-console
Bump console to version 3.2.5
2023-10-27 21:01:29 +04:00
Steven Nguyen c3b7b5af80 Fix inconsistent composer.lock
For some reason the composer.json had version 0.2.* of
utopia-php/messaging, but the composer.lock had 0.1.1.
2023-10-27 09:45:07 -07:00
Steven Nguyen 3abb74c937 Bump console to version 3.2.5 2023-10-27 09:33:21 -07:00
Christy JacobandGitHub 24824e1582 Merge pull request #7015 from appwrite/feat-delete-orphaned-projects
Feat delete orphaned projects
2023-10-27 20:21:52 +04:00
Christy JacobandGitHub 106f4cfc45 Merge pull request #6487 from appwrite/fix-unique-in-errors
Updated error message to not user magic strings
2023-10-27 20:13:16 +04:00
shimon 75484fa018 $collectionsConfig fix 2023-10-27 19:07:27 +03:00
shimon 917a4e9ab1 $collectionsConfig fix 2023-10-27 19:06:16 +03:00
Christy JacobandGitHub bcdebee598 Merge pull request #7024 from appwrite/fix-cookie-header
Fix: Cookie Header
2023-10-27 19:36:05 +04:00
Matej Bačo 9a6d5f8101 Improve var name 2023-10-27 17:25:19 +02:00
Matej Bačo 71807635b3 Move cookie-header logic to request 2023-10-27 17:23:43 +02:00
shimon 07ef5535ef dry run 2023-10-27 18:23:41 +03:00
Christy JacobandGitHub e17bb94e39 Merge pull request #6495 from appwrite/fix-mails
Fix certificate emails and add support for variables in email template subject
2023-10-27 19:17:50 +04:00
Christy JacobandGitHub 21220a2051 Merge pull request #6894 from appwrite/refactor-vcs-tests
Add VCS tests
2023-10-27 19:04:44 +04:00
德华 刘 6d237853e6 chore: revert console 2023-10-27 14:38:09 +00:00
Khushboo Verma 9164ed1045 Fixed linter errors 2023-10-27 19:43:07 +05:30
Khushboo Verma 30abfb01b7 Composer update 2023-10-27 19:40:24 +05:30
Khushboo Verma cba20d8b96 Addressed PR comments 2023-10-27 19:38:33 +05:30
Matej Bačo b2d385944a Add function domain cookie test 2023-10-27 15:33:26 +02:00
Khushboo Verma bb7278dd12 Merge branch 'refactor-vcs-tests' of github.com:appwrite/appwrite into refactor-vcs-tests 2023-10-27 18:14:47 +05:30
Khushboo Verma 36fcc6c293 Resolve merge conflicts 2023-10-27 18:13:50 +05:30
Matej Bačo 0a1a2af218 Connect VCS base to VCS test 2023-10-27 12:57:26 +02:00
Matej Bačo 84559b8f56 Improve cookie test 2023-10-27 12:01:37 +02:00
Christy JacobandGitHub 3700751592 Merge pull request #7016 from appwrite/main
Sync 1.4.x with main
2023-10-27 13:35:54 +04:00
德华 刘 2ee505b3f8 chore: update composer 2023-10-27 09:35:36 +00:00
Matej Bačo 740d9def8e Linter fix 2023-10-27 10:33:08 +02:00
Matej Bačo 94ff3baa9c Fix cookie headers 2023-10-27 10:26:46 +02:00
Steven Nguyen 7c1ab91ebc Add support for variables in email template subject 2023-10-26 16:58:31 -07:00
Steven Nguyen fc4fa977a0 Update emails from certificate worker to match pattern of other emails
Since the certificate worker is sending a job to the mails worker just
like the controllers, it should prepare the email in the same way by
localizing and then sending the inner template for the mail worker to
apply the layout and final variables.

This commit also fixes a problem with a missing subject.
2023-10-26 16:56:44 -07:00
Jake BarnbyandGitHub cb03ad1a15 Merge pull request #7003 from appwrite/feat-query-metadata
Feat query metadata
2023-10-27 12:52:34 +13:00
Steven Nguyen 836ce852ed Refactor email templates
Update the mails worker to only be responsible for building the final
email using the base (layout) template and the user, team, project, and
redirect variables.

It is the responsibility of the controller to perform localization and
determine whether a custom or default email template should be used.
If the default one is used, it has to be rendered using the hello,
footer, thanks, and signature variables so that it matches the custom
template. Then, it can be sent to the worker.
2023-10-26 16:47:14 -07:00
Steven Nguyen 3206cee36f Leave user placeholder in default email template
This matches up with the default template and gives the developer an
idea about the available variables and how to use them.
2023-10-26 16:23:58 -07:00
Steven Nguyen 70a3820009 Remove unused mail vars 2023-10-26 16:23:58 -07:00
Christy JacobandGitHub ab760ba46b Merge pull request #7017 from appwrite/chore-remove-install-analytics
Remove install analytics
2023-10-27 01:09:51 +04:00
Christy JacobandGitHub 3caa49a547 Merge pull request #6938 from appwrite/fix-gitpod-composer-install
gitpod: fix composer usage
2023-10-27 00:39:32 +04:00
Torsten Dittmann c81b4576b4 chore: remove install analytics 2023-10-26 22:25:35 +02:00
Christy JacobandGitHub 4becf5138d Merge pull request #7011 from krishvsoni/kvs-patch
added docs url
2023-10-27 00:25:17 +04:00
Christy JacobandGitHub 16fe42bca9 Merge pull request #6980 from appwrite/feat-support-selfdb
Fix database override
2023-10-27 00:21:59 +04:00
Christy JacobandGitHub d16e3f2f56 Merge branch '1.4.x' into feat-support-selfdb 2023-10-27 00:19:02 +04:00
shimon 45a0954b24 dry run 2023-10-26 21:12:43 +03:00
shimon fc348b2055 dry run 2023-10-26 21:12:13 +03:00
shimon 7e6378b23b dry run 2023-10-26 20:56:32 +03:00
shimon 0f43aa6872 dry run 2023-10-26 20:53:36 +03:00
Christy JacobandGitHub 2b939a57d0 Merge pull request #6198 from appwrite/chhore-parallelize-tests
chore: test parallel executions
2023-10-26 21:28:43 +04:00
德华 刘 c8788e2a13 chore: update CI 2023-10-26 16:43:50 +00:00
德华 刘 09912592cf chore: update CI 2023-10-26 16:27:57 +00:00
德华 刘 c9c688c592 chore: update CI 2023-10-26 16:26:13 +00:00
德华 刘 5d634384c8 chore: update CI 2023-10-26 16:24:14 +00:00
德华 刘 a4c59b838a chore: remove commented files 2023-10-26 16:15:52 +00:00
Matej Bačo c3a80dcebc Fix GraphQL function test 2023-10-26 16:50:35 +02:00
shimon 831122679f creating script 2023-10-26 17:45:23 +03:00
Christy JacobandGitHub 1d9b94ee4d Merge branch 'main' into chhore-parallelize-tests 2023-10-26 14:31:21 +04:00
Jake BarnbyandGitHub 8628e94d0c Merge pull request #7013 from appwrite/chore-updates-deps
Update database to include listCollections fix
2023-10-26 22:49:55 +13:00
Jake Barnby 89236955fb Fix setting metadata 2023-10-26 22:28:23 +13:00
Jake Barnby 995c404f35 Update db 2023-10-26 21:24:30 +13:00
Jake Barnby 2d897889c9 Merge remote-tracking branch 'origin/main' into chore-updates-deps 2023-10-26 21:22:41 +13:00
KRISH SONIandGitHub 822596b2c9 Merge branch 'main' into kvs-patch 2023-10-25 23:56:54 +05:30
KRISH SONIandGitHub 191235ecaf added docs url 2023-10-25 23:24:26 +05:30
Torsten DittmannandGitHub 2910e87c7a Merge pull request #7009 from appwrite/fix-worker-permissions-reset
fix: worker database authorization reset
2023-10-25 19:51:20 +02:00
Torsten Dittmann 404ad8653d fix: worker permissions reset 2023-10-25 19:23:55 +02:00
Christy JacobandGitHub fa0d9139c1 Merge pull request #7007 from appwrite/chore-bump-console
chore: bump console version
2023-10-25 15:36:34 +04:00
Torsten Dittmann f9a3ae1421 chore: bump console version 2023-10-25 13:35:14 +02:00
Christy JacobandGitHub db52e047c6 Merge pull request #7006 from appwrite/fix-http-status-code
Updated the error code for unsupported protocol
2023-10-25 14:56:45 +04:00
Khushboo Verma 17de0d1ea7 Updated the error code for unsupported protocol 2023-10-25 15:55:46 +05:30
Jake Barnby 5732171a2a Merge remote-tracking branch 'origin/1.4.x' into feat-query-metadata
# Conflicts:
#	app/init.php
#	composer.json
#	composer.lock
2023-10-25 18:21:16 +13:00
Jake BarnbyandGitHub 7d10174193 Merge pull request #7002 from appwrite/chore-updates-deps
Update dependencies
2023-10-25 14:32:08 +13:00
Jake Barnby 8db372a7d3 Update dependencies 2023-10-25 13:55:32 +13:00
Torsten DittmannandGitHub 5069aef6ac Merge pull request #6998 from appwrite/feat-realtime-error-handling
feat: realtime error handling
2023-10-24 16:12:21 +02:00
Torsten Dittmann fbcbd0d430 feat: realtime error handling 2023-10-24 14:32:22 +02:00
Christy JacobandGitHub 3a53dce467 Merge pull request #6994 from appwrite/1.4.x
Update main with 1.4.x
2023-10-24 01:11:13 +04:00
Christy JacobandGitHub 3e2b6c4344 Merge pull request #6990 from appwrite/feat-1.4.7-release-prep
Prepare 1.4.7 release
2023-10-24 00:49:44 +04:00
Steven Nguyen 84ea81f56d Add 1.4.7 to CHANGES.md 2023-10-23 13:36:29 -07:00
Steven Nguyen 3addf76a2a Bump appwrite version to 1.4.7 2023-10-23 13:36:29 -07:00
Christy JacobandGitHub ce8c7e1527 Merge pull request #6988 from appwrite/fix-functions-worker
Fix missing body in async function execution
2023-10-23 23:40:58 +04:00
Torsten DittmannandGitHub 342deb4989 Merge pull request #6465 from appwrite/fix-docs-links
Fix docs links CONTRIBUTING.md
2023-10-23 19:24:43 +02:00
shimon 0411f9f530 fix function-worker body param typo 2023-10-23 16:33:26 +03:00
Khushboo Verma ad4db114bc Updated composer.lock 2023-10-23 15:23:52 +05:30
Khushboo Verma c0460289b7 Remove unused value from docker-compose 2023-10-23 15:19:23 +05:30
Khushboo Verma a09c4281c8 Revert "Remove unused value from docker-compose"
This reverts commit c7435e7e78.
2023-10-23 15:18:48 +05:30
Khushboo Verma c7435e7e78 Remove unused value from docker-compose 2023-10-23 15:16:42 +05:30
Khushboo Verma 2cf8639b68 Resolve merge conflicts 2023-10-23 15:06:01 +05:30
Khushboo Verma 97c1099961 Refactor code and add more assertions 2023-10-23 15:03:24 +05:30
Christy JacobandGitHub 45c44bb51c Merge pull request #6986 from appwrite/fix-db-mod
fix mod condition
2023-10-23 12:41:05 +04:00
Christy JacobandGitHub 14f35589b3 Merge branch 'main' into fix-db-mod 2023-10-23 12:40:05 +04:00
德华 刘 3dee8d6ecd fix: update incorrect method call 2023-10-23 08:34:57 +00:00
808f682fa7 Update app/controllers/api/projects.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2023-10-23 11:25:31 +03:00
shimon 2ef8490691 fix mod condition 2023-10-23 11:22:28 +03:00
shimon b09a254d3c fix mod condition 2023-10-23 10:46:15 +03:00
Christy JacobandGitHub e2eccaca8b Merge pull request #6985 from appwrite/fix-db-mod
Fix db mod
2023-10-23 02:07:15 +04:00
shimon a841734d50 fix mod condition 2023-10-23 01:05:10 +03:00
Christy JacobandGitHub 765391cd7c Merge branch 'main' into feat-support-selfdb 2023-10-23 01:56:54 +04:00
shimon ac231914d4 fix mod condition 2023-10-23 00:55:57 +03:00
Christy JacobandGitHub d1deef43c5 Merge pull request #6984 from appwrite/fix-db-mod
fix mod condition
2023-10-23 01:11:05 +04:00
shimon 0d5127d90b fix mod condition 2023-10-23 00:08:55 +03:00
Christy JacobandGitHub bb46e3869c Merge pull request #6851 from appwrite/feat-sm-db
update projects database
2023-10-22 22:35:54 +04:00
德华 刘 00d2a5ffcd chore: update create projects endpoints 2023-10-22 18:33:15 +00:00
德华 刘 79612bd80f Merge branch 'main' of https://github.com/appwrite/appwrite into feat-sm-db 2023-10-22 18:30:14 +00:00
德华 刘 c0f099e176 chore: update test file 2023-10-22 15:28:39 +00:00
德华 刘 42ce9d881a Merge branch 'main' of https://github.com/appwrite/appwrite into chhore-parallelize-tests 2023-10-22 15:16:40 +00:00
Matej Bačo 1787e57448 Fix database override 2023-10-22 16:18:47 +02:00
Christy JacobandGitHub fc35e0f6ff Merge pull request #6954 from appwrite/1.4.x
Merge 1.4.x to main
2023-10-20 17:36:56 +04:00
Christy JacobandGitHub 3001cac2ba Merge pull request #6967 from appwrite/cl-1.4.x
Cl 1.4.x
2023-10-20 17:03:16 +04:00
Christy Jacob f533ab9324 feat: add swoole hooks 2023-10-20 17:00:45 +04:00
Christy Jacob b9e5d0c890 feat: add swoole hooks 2023-10-20 16:59:07 +04:00
Christy Jacob ce14e05d1d chore: sync with 1.4.x 2023-10-20 16:58:15 +04:00
Christy Jacob df35c79bc2 chore: remove var_dumps 2023-10-20 16:56:34 +04:00
Christy Jacob 3acb68f364 Merge branch 'cl-1.4.x' of github.com:appwrite/appwrite into cl-1.4.x 2023-10-20 16:55:52 +04:00
Christy Jacob 15347cce4b chore: update CI 2023-10-20 16:55:29 +04:00
Christy JacobandGitHub 4e0cc1b297 Merge pull request #6966 from appwrite/fix-mails-worker
fix: mails worker using TLS
2023-10-20 16:52:57 +04:00
Torsten Dittmann d19baafc59 chore: fix linting 2023-10-20 14:43:48 +02:00
Torsten Dittmann 4f77510b0a fix: only apply hook flags to mails worker 2023-10-20 14:42:22 +02:00
Torsten Dittmann 1f97aaf591 fix: disable swoole tcp hook for mails worker 2023-10-20 14:40:59 +02:00
shimon 7f42fbfe71 debug 2023-10-19 23:11:30 +03:00
shimon 04676d9737 debug 2023-10-19 22:57:59 +03:00
shimon c159032e93 email template path 2023-10-19 22:49:53 +03:00
shimon 416e5cc88c Merge branch '1.4.x' of github.com:appwrite/appwrite into cl-1.4.x 2023-10-19 21:00:21 +03:00
Christy JacobandGitHub 8e44f350e5 Merge pull request #6960 from appwrite/fix-email-tmeplate-path
email template path
2023-10-19 21:59:04 +04:00
shimon dd47ef4fd9 email template path 2023-10-19 20:57:24 +03:00
德华 刘 b0b9bd3268 Merge branch '1.4.x' of https://github.com/appwrite/appwrite into chhore-parallelize-tests 2023-10-19 17:10:15 +00:00
德华 刘 9f3561aaa3 chore: cleanup ci file 2023-10-19 17:09:49 +00:00
shimon aa9b057632 Merge branch '1.4.x' of github.com:appwrite/appwrite into cl-1.4.x 2023-10-19 19:42:03 +03:00
Christy JacobandGitHub 21b9716bb2 Merge pull request #6959 from appwrite/chore-update-backup-timings
chore: update backup timings
2023-10-19 20:40:43 +04:00
Christy JacobandGitHub a8ee31f9ae Merge pull request #6958 from appwrite/fix-events-queue-proxy
Fix events queue
2023-10-19 20:32:42 +04:00
德华 刘 de8b9638d5 chore: update backup timings 2023-10-19 16:07:54 +00:00
shimon 8048766d28 queues fixes 2023-10-19 18:28:01 +03:00
Christy JacobandGitHub 5403df059f Merge pull request #6952 from appwrite/feat-upgrade-executor
Feat: Upgrade executor
2023-10-19 17:18:29 +04:00
Christy JacobandGitHub 6b853a532a Merge pull request #6953 from appwrite/fix-logger-ver
hard coding utopia logger to 0.3.1
2023-10-19 16:44:49 +04:00
Christy Jacob c89bace5e4 chore: revert logger version 2023-10-19 12:25:10 +00:00
shimon 23926e9530 hard coding utopia logger to 0.3.1 2023-10-19 14:01:06 +03:00
shimon aa32b419a8 hard coding utopia logger to 0.3.1 2023-10-19 13:50:32 +03:00
Matej Bačo 20c37db8fc Upgrade executor 2023-10-19 11:54:56 +02:00
Christy JacobandGitHub 8d9f0180a1 Merge pull request #6948 from appwrite/feat-1.4.6-release-prep
Prepare 1.4.6 release
2023-10-19 05:41:21 -04:00
Christy JacobandGitHub 01e842782f Merge branch '1.4.x' into feat-1.4.6-release-prep 2023-10-19 05:28:02 -04:00
Christy JacobandGitHub 4b08729131 Update app/init.php 2023-10-19 05:27:52 -04:00
Christy Jacob 18dc8749d5 chore: update health API 2023-10-19 09:25:38 +00:00
Christy JacobandGitHub e2be9ea180 Merge pull request #6949 from appwrite/feat-api-db-timeout
API DB timeout
2023-10-19 05:17:00 -04:00
Christy JacobandGitHub a46b3d088c Merge branch '1.4.x' into feat-api-db-timeout 2023-10-19 05:15:44 -04:00
Jake Barnby bd3be15d07 Fix options test 2023-10-19 21:23:54 +13:00
Jake Barnby 9cb2e834a6 Update db 2023-10-19 20:41:06 +13:00
Jake Barnby 03b6d65669 Add timeout on vcs project DBs 2023-10-19 17:21:11 +13:00
Jake Barnby b5cdbb50c7 Use fixed message 2023-10-19 17:12:05 +13:00
Jake Barnby 354211950f Add timeout test 2023-10-19 17:06:57 +13:00
Jake Barnby b6b8fe7d51 Allow overriding timeout per request in dev mode 2023-10-19 16:19:40 +13:00
Jake Barnby b17e24f645 Use const for timeout 2023-10-19 15:45:32 +13:00
Jake Barnby 389d367fca Set hard timeouts for API dbs 2023-10-19 15:32:45 +13:00
Jake Barnby db3fa21468 Update database 2023-10-19 14:26:44 +13:00
Steven Nguyen 238608a559 Generate 1.4.x docs examples 2023-10-18 17:42:27 -07:00
Steven Nguyen 6d040beb36 Update specs for 1.4.6
$ diff old.json new.json
4c4
<     "version": "1.4.5",
---
>     "version": "1.4.6",
8132c8132
<     "/health/queue/databases": {
---
>     "/health/queue/databases/{databaseId}": {
8164c8164,8175
<         "security": [{ "Project": [], "Key": [] }]
---
>         "security": [{ "Project": [], "Key": [] }],
>         "parameters": [
>           {
>             "name": "databaseId",
>             "description": "Database for which to check the queue size",
>             "required": false,
>             "type": "string",
>             "x-example": "[DATABASE_ID]",
>             "default": "database_db_main",
>             "in": "path"
>           }
>         ]
2023-10-18 17:42:27 -07:00
Steven Nguyen 1d7c9d84d2 Fix get database queue endpoint params
A path param cannot be optional so change it to a query param.
2023-10-18 17:42:27 -07:00
Steven Nguyen ef82d525a4 Add 1.4.6 changes to CHANGES.md 2023-10-18 16:08:28 -07:00
Steven Nguyen 435b20df77 Bump appwrite version to 1.4.6 2023-10-18 16:07:47 -07:00
Eldad A. FuxandGitHub f80f7c8d9b Merge pull request #6947 from appwrite/chore-bump-console
Bump console to version 3.2.3
2023-10-18 18:56:03 -04:00
Steven Nguyen 9bc6b124c0 Bump console to version 3.2.3 2023-10-18 15:51:13 -07:00
Eldad A. FuxandGitHub 251ae23a80 Merge pull request #6928 from appwrite/refactor-workers-sn
Refactor workers
2023-10-18 18:46:45 -04:00
Christy Jacob 6141d02e16 Merge branch 'refactor-workers-sn' of https://github.com/appwrite/appwrite into chhore-parallelize-tests 2023-10-18 21:49:43 +00:00
Christy Jacob 67541d4a1d chore: review comments 2023-10-18 21:35:15 +00:00
Christy JacobandGitHub 20985c7ee4 Merge pull request #6946 from appwrite/remove-resque
chore: remove resque library and update health check endpoints
2023-10-18 16:59:44 -04:00
Christy Jacob 6d55b20fac chore: update health tests 2023-10-18 20:18:15 +00:00
Christy JacobandGitHub be5ed9b282 Merge pull request #6934 from appwrite/feat-delegate-deletes
Delegate custom deletes
2023-10-18 16:13:08 -04:00
Christy Jacob 3d7cd91176 chore: fix injections 2023-10-18 19:54:56 +00:00
Christy Jacob be26e4b729 chore: remove resque library and update health check endpoints 2023-10-18 19:44:06 +00:00
Christy JacobandGitHub f822f86517 Merge branch '1.4.x' into refactor-workers-sn 2023-10-18 15:26:45 -04:00
Christy Jacob 80086e9edc chore: fix composer dependencies 2023-10-18 19:26:35 +00:00
Vincent (Wen Yu) Ge 175879a352 remove package lock 2023-10-18 19:25:00 +00:00
Vincent (Wen Yu) Ge 397bdd50f4 Try even older commit for package-lock.json 2023-10-18 19:24:11 +00:00
Vincent (Wen Yu) Ge 413209d990 Fix checking out the wrong commit to revert package.json 2023-10-18 19:21:28 +00:00
Vincent (Wen Yu) Ge 3a80d58353 Revert package json changes 2023-10-18 19:14:57 +00:00
Christy Jacob 74e3f3f7d2 fix: remove unused variable 2023-10-18 19:08:21 +00:00
Christy Jacob 133cb62b4e fix: update injection name 2023-10-18 19:07:17 +00:00
Christy Jacob 4724d729fb Merge branch 'refactor-workers-sn' of https://github.com/appwrite/appwrite into feat-delegate-deletes 2023-10-18 18:59:51 +00:00
Christy JacobandGitHub eed70454ce Merge pull request #6940 from appwrite/remove-obsolete-tasks
chore: cleanup obsolete CLI tasks
2023-10-18 14:59:41 -04:00
Christy Jacob 066dd6393d Merge branch 'refactor-workers-sn' of https://github.com/appwrite/appwrite into feat-delegate-deletes 2023-10-18 18:57:16 +00:00
Christy Jacob 72d0865ad8 chore: use deletes worker for deleting audit logs 2023-10-18 18:54:20 +00:00
Christy Jacob 688f2e5a56 Merge branch 'refactor-workers-sn' of github.com:appwrite/appwrite into remove-obsolete-tasks 2023-10-18 22:19:52 +04:00
shimon 8a52dc3485 some fixes 2023-10-18 20:21:39 +03:00
Christy Jacob 20415c6daf fix: webhook tests 2023-10-18 21:09:23 +04:00
Christy Jacob 2e3d17e7b1 fix: webhook tests 2023-10-18 21:06:59 +04:00
Christy Jacob 699ac7f7f5 fix: review comments 2023-10-18 20:53:11 +04:00
Christy Jacob 050cb28d4f fix: incorrect events 2023-10-18 20:30:47 +04:00
Christy Jacob 5f9059e221 chore: run linter 2023-10-18 19:50:40 +04:00
Christy Jacob 2a201a9d1c chore: fix flaky tests 2023-10-18 19:42:23 +04:00
Khushboo Verma eac911a006 Remove VCS repo id from env variables 2023-10-18 13:27:29 +05:30
Khushboo Verma 979054e5ca Merge branch 'main' into refactor-vcs-tests 2023-10-18 13:25:40 +05:30
Khushboo Verma 2914a4d1c5 Add test for createRepo endpoint 2023-10-18 13:24:32 +05:30
Jake Barnby bb0744842d Set metadata for all database instantiations 2023-10-18 16:21:10 +13:00
Christy Jacob a0be115815 chore: re-order tests 2023-10-18 03:07:41 +04:00
Christy Jacob c501dc61dc chore: re-order tests 2023-10-18 02:58:29 +04:00
Christy Jacob 33ec5b3d7b chore: re-order tests 2023-10-18 02:36:50 +04:00
Christy Jacob 39820b5a0f chore: update docker compose config 2023-10-18 01:56:54 +04:00
Christy Jacob 67642f9f91 chore: update docker compose config 2023-10-18 01:56:05 +04:00
Christy Jacob 011df60c0d feat: remove old worker class 2023-10-18 01:17:02 +04:00
Christy Jacob eeb6a5065b chore: update composer 2023-10-18 00:11:52 +04:00
Steven NguyenandGitHub 9fbf10f9f5 Merge branch 'main' into fix-docs-links 2023-10-17 13:08:03 -07:00
Christy Jacob 6a53d8e0d5 chore: update composer 2023-10-18 00:02:45 +04:00
Christy JacobandGitHub 2bad00a2fd Merge pull request #6936 from appwrite/feat-dart-3.1
Feat: Dart 3.1 support
2023-10-17 15:53:17 -04:00
Christy Jacob b8367c2b9f chore: update composer 2023-10-17 23:51:16 +04:00
Christy Jacob c3af1e4513 chore: revert composer 2023-10-17 23:49:50 +04:00
Christy Jacob 8afc29c5ed chore: cleanup obsolete CLI tasks 2023-10-17 23:49:10 +04:00
Christy Jacob d1ea0c2244 chore: cleanup obsolete CLI tasks 2023-10-17 23:38:03 +04:00
Christy Jacob 685a953705 Merge branch 'refactor-workers-sn' of github.com:appwrite/appwrite into remove-obsolete-tasks 2023-10-17 23:30:44 +04:00
Christy Jacob 617ded14aa chore: cleanup obsolete CLI tasks 2023-10-17 23:30:11 +04:00
Christy Jacob 7806cf1b55 chore: cleanup obsolete CLI tasks 2023-10-17 23:29:25 +04:00
shimon 593e5ab316 some fixes 2023-10-17 22:08:01 +03:00
shimon 1036cb406d some fixes 2023-10-17 21:32:38 +03:00
Matej Bačo 8b6d050b0d Fix failing event tests 2023-10-17 18:23:10 +02:00
shimon 59052b4fd1 some fixes 2023-10-17 18:12:43 +03:00
shimon b42a9e94e2 some fixes 2023-10-17 18:12:24 +03:00
shimon 3d5930c104 some fixes 2023-10-17 16:55:08 +03:00
Torsten DittmannandGitHub 80574838a4 gitpod: fix composer usage 2023-10-17 15:19:29 +02:00
Christy Jacob 022952e2ee chore: revert console 2023-10-17 08:36:41 +00:00
Christy Jacob 20468782e5 chore: revert console 2023-10-17 08:35:22 +00:00
Jake Barnby 64d582a43a Update for package changes 2023-10-17 21:31:00 +13:00
Matej Bačo 97ea29bba2 Add dart 3.1 support 2023-10-17 10:18:29 +02:00
shimon 09f829e482 updating gitmodules 2023-10-17 11:00:14 +03:00
shimon 6d98b38e23 addressing some comments 2023-10-17 07:29:37 +03:00
shimon d7b7dfef25 addressing some comments 2023-10-17 07:28:51 +03:00
shimon 56f565bf30 addressing some comments 2023-10-17 07:23:33 +03:00
shimon e8dbd043ec addressing some comments 2023-10-17 07:02:54 +03:00
Jake Barnby 62ce68f1b5 Update packages 2023-10-17 16:48:26 +13:00
shimon 55dfb0b034 Merge remote-tracking branch 'origin/refactor-workers-sn' into refactor-workers-sn 2023-10-17 06:44:53 +03:00
shimon 9a6d88a819 addressing some comments 2023-10-17 06:44:36 +03:00
Jake Barnby dbfe5e45aa Delegate custom deletes 2023-10-17 12:18:51 +13:00
e565557eb2 Update app/worker.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2023-10-16 20:13:39 +03:00
shimon 0e2cf14e12 minor fix 2023-10-16 18:17:13 +03:00
shimon a8f5886474 minor fix 2023-10-16 18:17:02 +03:00
710ac707e3 Update src/Appwrite/Event/Audit.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2023-10-16 18:11:29 +03:00
shimon 039df4abb3 revert changes 2023-10-16 18:04:27 +03:00
shimon 5dc55110b4 small fixes 2023-10-16 17:34:55 +03:00
shimon e660a6f4a3 small fixes 2023-10-16 17:09:51 +03:00
shimon 2451d9fef1 Merge branch '1.4.x' of github.com:appwrite/appwrite into refactor-workers-sn
 Conflicts:
	src/Appwrite/Platform/Workers/Deletes.php
2023-10-16 17:06:59 +03:00
shimon 2fcda9fc11 Merge branch 'cl-1.4.x' of github.com:appwrite/appwrite into refactor-workers-sn 2023-10-16 17:03:43 +03:00
shimon 0e2c1c1f2d small fixes 2023-10-16 16:20:41 +03:00
Christy JacobandGitHub ee39971eee Merge pull request #6930 from appwrite/main
Merge main into 1.4.x
2023-10-16 07:09:08 -04:00
shimon 0c776e0a44 comparing $workersCount via worker.php vs init php 2023-10-16 11:04:44 +03:00
shimon 94178f8eaf rollback to Usage 2023-10-15 20:41:09 +03:00
Steven NguyenandGitHub 5956c4c247 Merge branch 'main' into fix-unique-in-errors 2023-10-13 12:03:23 -07:00
Torsten DittmannandGitHub fce18647d2 Merge pull request #6434 from appwrite/fix-specs
chore: fix spec links
2023-10-13 16:12:19 +02:00
Torsten Dittmann 7bae8ac374 revert: console change 2023-10-13 16:10:27 +02:00
Torsten Dittmann f5d0ebeb75 docs: fix broken links 2023-10-13 15:59:28 +02:00
Torsten Dittmann c0c4cffba2 fix: relative links to absolute v2 2023-10-13 15:43:44 +02:00
Torsten Dittmann 3778939605 fix: relative links to absolute 2023-10-13 15:43:23 +02:00
Torsten Dittmann 8e12a07267 Merge branch 'main' of https://github.com/appwrite/appwrite into fix-specs 2023-10-13 15:42:09 +02:00
Khushboo Verma fe7aa60a11 Updated composer.json 2023-10-13 18:55:33 +05:30
Khushboo Verma f18d33a0d6 Resolved merge conflicts 2023-10-13 18:54:14 +05:30
Khushboo Verma 66ec7f2e1d VCS tests 2023-10-13 18:50:58 +05:30
Torsten DittmannandGitHub ce0024d97a Merge pull request #5290 from DH-555/patch-4
Fix: spanish translations (emails)
2023-10-13 13:36:28 +02:00
Torsten DittmannandGitHub ecd073fb02 Merge pull request #6898 from appwrite/fix-6879-fix-project-delete
Update teamInternalId when updating project team
2023-10-13 13:35:47 +02:00
Torsten DittmannandGitHub 35891503ef Merge pull request #6897 from appwrite/fix-6895-realtime-deletes
Fix realtime deletes
2023-10-13 12:49:49 +02:00
Christy Jacob d8714ec3fa fix: rename domains collection to rules in hamster script 2023-10-13 12:54:10 +04:00
Christy Jacob b3d8998735 chore: update hamster script 2023-10-13 12:29:03 +04:00
Steven Nguyen 3f2f6ab43a Ensure permissions are updated when a project moves orgs
Since the following collections also have permissions set to the team,
the team should be updated for consistency:

- installations
- repositories
- vcsComments
2023-10-12 17:34:53 -07:00
Steven Nguyen 3bb22c38cc Update teamInternalId when updating project team
This is important because when an organization is deleted, projects are
fetched by the teamInternalId and if the teamInternalId is not updated
when the project team is updated, the project will be deleted if the
previous organization is deleted.
2023-10-12 17:03:45 -07:00
Steven Nguyen 2d2af20547 Fix realtime deletes
The realtime collection only exists in the console project so iterating
over every project leads to the not found error.

In addition, the deleteForProjectIds() doesn't include the console
project so the realtime records were not being cleaned up properly.
2023-10-12 22:49:55 +00:00
Khushboo Verma 615bd5148e Test for create and update function using VCS 2023-10-13 03:11:31 +05:30
Khushboo Verma bb75036efe WIP: Mocked GitHub installation 2023-10-13 01:45:27 +05:30
shimon 66c57c9a4f Merge remote-tracking branch 'origin/refactor-workers' into refactor-workers 2023-10-12 16:34:31 +03:00
shimon 4088941f70 sync with main 2023-10-12 16:34:13 +03:00
Jake BarnbyandGitHub 4e988dd1fa Merge pull request #6888 from appwrite/feat-db-per-process
Feat db per worker
2023-10-12 21:36:12 +13:00
Jake Barnby 48bc369149 Hardcode default queue for db worker only 2023-10-12 21:32:33 +13:00
Jake Barnby 204912cb98 Update compose phtml 2023-10-12 20:59:40 +13:00
Jake Barnby 8c92170cb6 Add missing workers num 2023-10-12 20:22:26 +13:00
Jake Barnby dc580c3d0d Change name 2023-10-12 20:15:16 +13:00
Jake Barnby 34e7af806a Fix typo 2023-10-12 20:10:44 +13:00
Jake Barnby 855fe5b893 Remove redundant postfix 2023-10-12 19:12:26 +13:00
Jake Barnby e2a8369712 Add docblock for env vars 2023-10-12 19:11:08 +13:00
Jake Barnby effdeb4bc2 Fix env vars 2023-10-12 19:10:45 +13:00
Jake Barnby 6a05d9606e Remove default number postfix 2023-10-12 18:55:01 +13:00
Jake Barnby 1ac3372239 Set queue name per worker 2023-10-12 17:55:30 +13:00
Jake Barnby 0ebb256b16 Revert formatting 2023-10-12 15:31:58 +13:00
Jake Barnby 096a529618 Revert "Merge branch 'feat-db-per-process' of github.com:appwrite/appwrite into feat-db-per-process"
This reverts commit 6f42305484, reversing
changes made to 69abd222e8.
2023-10-12 15:30:01 +13:00
Jake Barnby 6f42305484 Merge branch 'feat-db-per-process' of github.com:appwrite/appwrite into feat-db-per-process
# Conflicts:
#	bin/worker-databases
#	src/Appwrite/Event/Database.php
#	src/Appwrite/Platform/Workers/Databases.php
2023-10-12 15:28:52 +13:00
Jake Barnby 69abd222e8 Simplify 2023-10-12 15:26:01 +13:00
Jake Barnby 7a78f49eb9 Allow multiprocess for db queue 2023-10-12 15:23:16 +13:00
Jake Barnby 662233b026 Set the queue name based on project DB 2023-10-12 15:21:11 +13:00
Jake Barnby c0c6197cff Remove static queue set for database worker 2023-10-12 15:19:42 +13:00
Jake Barnby d7b87d7bae Add env var for db queues 2023-10-12 15:19:17 +13:00
Jake Barnby 5d845208d9 Simplify 2023-10-12 15:02:53 +13:00
Vincent (Wen Yu) Ge 291654bee9 Rename ID -> Keys for attribute and index for consistency 2023-10-11 19:29:04 +00:00
Christy Jacob 31aeb5887a Merge branch 'main' of https://github.com/appwrite/appwrite into cl-1.4.x 2023-10-11 15:50:38 +00:00
Christy JacobandGitHub f656002a03 Merge pull request #6885 from appwrite/hamster-fix
hamster script fix
2023-10-11 11:13:43 -04:00
shimon 5748418247 sync with main 2023-10-11 18:09:27 +03:00
shimon 1c8b38502a sync with main 2023-10-11 17:07:06 +03:00
Torsten DittmannandGitHub 9cf9337223 Merge pull request #6884 from appwrite/feat-console-3-2-2
chore: upgrade console to 3.2.2 on cloud
2023-10-11 15:08:01 +02:00
shimon 2cd4514086 sync with main 2023-10-11 16:03:15 +03:00
Torsten Dittmann 92adaee1cb chore: upgrade console to 3.2.2 on cloud 2023-10-11 14:57:11 +02:00
shimon 893b1d0ba7 Merge branch 'main' of github.com:appwrite/appwrite into refactor-workers
 Conflicts:
	.gitmodules
	app/controllers/api/functions.php
	app/controllers/api/health.php
	app/init.php
	app/views/install/compose.phtml
	composer.lock
	src/Appwrite/Migration/Migration.php
	src/Appwrite/Platform/Workers/Builds.php
	src/Appwrite/Platform/Workers/Deletes.php
	src/Appwrite/Platform/Workers/Functions.php
	src/Executor/Executor.php
2023-10-11 12:08:13 +03:00
Christy JacobandGitHub 32c8e84770 Merge pull request #6509 from appwrite/fix-add-hacktoberfest-contributing-guidelines
Added Hacktoberfest Contributing Guidelines
2023-10-11 04:36:52 -04:00
Jake Barnby d238d79e29 Allow multiprocess for db queue 2023-10-11 21:28:29 +13:00
Jake Barnby 365630ff39 Set the queue name based on project DB 2023-10-11 17:21:40 +13:00
Jake Barnby ca5b7f5b16 Add dynamic queue setting for database worker 2023-10-11 16:52:58 +13:00
Jake Barnby 2cf0ed1d69 Remove static queue set for database worker 2023-10-11 16:51:43 +13:00
Jake Barnby 747a16c4ba Add env var for db queues 2023-10-11 16:50:21 +13:00
Khushboo Verma dbd6dbcb5b WIP: Progress with VCS tests 2023-10-11 02:56:15 +05:30
Steven NguyenandGitHub d3603765f4 Merge branch 'main' into fix-add-hacktoberfest-contributing-guidelines 2023-10-10 13:11:50 -07:00
Khushboo Verma 1f97bb39b3 WIP: VCS tests 2023-10-11 01:31:22 +05:30
haimantika mitraandGitHub dbf3f636fc Update HACKTOBERFEST.md 2023-10-11 00:50:05 +05:30
haimantika mitraandGitHub d70042b066 Update HACKTOBERFEST.md 2023-10-11 00:45:00 +05:30
42da578193 Update HACKTOBERFEST.md
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
2023-10-11 00:42:26 +05:30
Torsten DittmannandGitHub 2016310907 Merge pull request #6345 from appwrite/1.4.x
1.4.x
2023-10-10 20:11:46 +02:00
shimon 002fc19d60 tests fix 2023-10-10 21:02:24 +03:00
Haimantika mitra e10bf167b9 Added all requested changes 2023-10-10 23:32:24 +05:30
Eldad A. FuxandGitHub 6f39c1ddc9 Merge branch 'main' into 1.4.x 2023-10-10 19:34:43 +02:00
haimantika mitraandGitHub a362728861 delete old file 2023-10-10 22:30:21 +05:30
Torsten DittmannandGitHub 920d2b2db3 Merge branch 'cl-1.4.x' into 1.4.x 2023-10-10 11:59:24 +02:00
Torsten DittmannandGitHub 8dce3d5862 Merge pull request #6870 from appwrite/feat-1.4.5-release
Prepare 1.4.5 release
2023-10-10 11:15:44 +02:00
Torsten DittmannandGitHub 4cd0c501da Merge pull request #6868 from appwrite/feat-bump-console
Bump console to 3.2.1
2023-10-10 11:14:18 +02:00
Steven Nguyen 9d3972f43f Bump API specs 2023-10-09 16:52:11 -07:00
Steven Nguyen 071920fb30 Bump version to 1.4.5 2023-10-09 16:39:46 -07:00
Steven Nguyen 501153532c Update CHANGES.md for 1.4.5 2023-10-09 16:39:14 -07:00
Steven Nguyen 2620328810 Bump APP_CACHE_BUSTER to make sure browsers fetch the new console 2023-10-09 16:38:54 -07:00
Steven Nguyen 81a6512cce Bump console to 3.2.1 2023-10-09 16:19:59 -07:00
haimantika mitraandGitHub 0c0c41ce87 Made style changes 2023-10-09 22:50:22 +05:30
haimantika mitraandGitHub d43e4f20aa Made requested changes 2023-10-09 22:47:02 +05:30
16d76c2e87 Update Hacktoberfest_Contribution_Guideline.md
Co-authored-by: Vincent (Wen Yu) Ge <vincent@appwrite.io>
2023-10-09 22:41:00 +05:30
Eldad A. FuxandGitHub 970461c509 Merge pull request #6490 from appwrite/fix-6442-executor-restart
Ensure openruntimes-executor restarts after a server reboot
2023-10-09 17:27:15 +02:00
shimon e2989afda8 queueForBuilds fix via functions controller 2023-10-09 13:28:06 +03:00
shimon 24e09d3d8e queueForBuilds fix via functions controller 2023-10-09 13:16:05 +03:00
Khushboo Verma bd2999037d WIP: Add VCS tests 2023-10-09 15:15:36 +05:30
Jake BarnbyandGitHub 72b4950168 Merge pull request #6469 from appwrite/fix-migration-response-model
Fix missing array flag on migration errors response model rule
2023-10-09 11:29:31 +13:00
shimon 31466c44d8 update projects database 2023-10-08 16:44:14 +03:00
Christy JacobandGitHub 030f9629a6 Merge pull request #6496 from appwrite/fix-readme-cn
Update logo in README-CN.md
2023-10-06 08:55:17 -04:00
Steven Nguyen 623b2f97da Ensure openruntimes-executor restarts after a server reboot
Every other service restarts automatically after a server reboot so
the openruntimes-executor should too. Otherwise, function executions
will fail as the executor is unavailable.
2023-10-05 14:25:50 -07:00
Haimantika mitra 0cecdf2937 Added Hacktoberfest Contributing Guidelines 2023-10-06 01:40:30 +05:30
Eldad A. FuxandGitHub 2019552a47 Merge pull request #6476 from appwrite/fix-upgrade-executor
Fix: Upgrade executor
2023-10-05 21:56:48 +03:00
DavidandGitHub 82bde7f7e9 Merge branch 'main' into patch-4 2023-10-05 17:43:27 +02:00
shimon 948f36a023 sync with 1.4 2023-10-05 16:15:39 +03:00
Christy JacobandGitHub 2c5e4a7d28 Merge pull request #6499 from appwrite/chore-add-db-override
chore: add database overrides
2023-10-05 02:06:52 -04:00
Christy Jacob 32ba34cba5 chore: add database overrides 2023-10-05 05:58:52 +00:00
Christy Jacob adbbb6dc20 chore: add database overrides 2023-10-05 05:53:49 +00:00
Steven NguyenandGitHub c5408393c8 Update logo in README-CN.md 2023-10-04 17:26:02 -07:00
Vincent (Wen Yu) Ge e5c828fbbd Attribute keys must be unique and can't use unique() 2023-10-04 13:56:18 +00:00
Vincent (Wen Yu) Ge c12999dc74 Remove extra ` tags 2023-10-04 13:52:19 +00:00
Vincent (Wen Yu) Ge a2c9c8b82e Updated error message to not user magic strings 2023-10-04 13:49:45 +00:00
Eldad A. FuxandGitHub 8a4302ffe6 Merge pull request #6454 from appwrite/hacktoberfest-update
Update with hacktoberfest instructions.
2023-10-04 14:42:53 +03:00
shimon a643a8c907 sync with 1.4 2023-10-04 13:43:21 +03:00
Matej Bačo b6ce679b93 Merge branch '1.4.x' into cl-1.4.x 2023-10-04 10:46:38 +02:00
Eldad A. FuxandGitHub e2831ed8d2 Merge pull request #6478 from appwrite/fix-realtime-logs
Fix: realtime logs
2023-10-04 11:45:58 +03:00
shimon 7f1507f810 sync with 1.4 2023-10-04 11:20:32 +03:00
Matej Bačo 891960a977 Fix realtime logs container name 2023-10-04 10:16:02 +02:00
Matej Bačo 0f3ce658c2 Upgrade executor 2023-10-04 09:10:50 +02:00
Jake Barnby b8cfac90e2 Update specs 2023-10-04 15:13:43 +13:00
Jake Barnby d1502029d1 Fix missing array flag on migration errors response model rule 2023-10-04 15:05:42 +13:00
Vincent (Wen Yu) GeandGitHub 9b0a2fdc73 Fix docs links CONTRIBUTING.md 2023-10-03 15:10:09 -04:00
4a43c84b29 Update CONTRIBUTING.md
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
2023-10-03 15:02:17 -04:00
shimon e3668a4d06 sync with 1.4 2023-10-03 21:56:36 +03:00
shimon 429dabaaee sync with 1.4 2023-10-03 19:50:48 +03:00
shimon ce82a9efa9 remove usage executions from shared api 2023-10-03 17:41:11 +03:00
Vincent (Wen Yu) GeandGitHub 897e975b49 Update with hacktoberfest instructions. 2023-10-03 10:36:27 -04:00
shimon 3b00e396d5 sync with main 2023-10-03 15:15:13 +03:00
shimon 6d60b0bd8c sync with 1.4 2023-10-03 11:40:34 +03:00
Christy Jacob ff3c25d352 chore: update database 2023-10-02 22:23:35 +00:00
Christy JacobandGitHub 74f9ec4907 Merge pull request #6446 from appwrite/chore-update-database
chore: update database
2023-10-02 18:02:43 -04:00
Christy Jacob 29ad61d461 chore: update database 2023-10-02 22:01:42 +00:00
Christy JacobandGitHub 58165e9389 Merge pull request #6445 from appwrite/chore-patch-prevent-db-creates
chore: remove DB creates
2023-10-02 17:38:19 -04:00
Christy Jacob b456c9df2c chore: remove DB creates 2023-10-02 21:32:05 +00:00
shimon 2bb4d8fb89 sync with 1.4 2023-10-02 17:02:48 +03:00
Torsten Dittmann 7b5ee34b68 fix: more links 2023-10-02 14:32:43 +02:00
Torsten Dittmann 71775c76b1 fix: specs relative links 2023-10-02 14:26:54 +02:00
Torsten Dittmann e0dcf3f8b1 fix: relative links 2023-10-02 13:51:24 +02:00
Torsten Dittmann 4b03d6a361 fix: http links with https 2023-10-02 13:47:35 +02:00
Torsten Dittmann f230419614 chore: fix spec links 2023-10-02 13:42:44 +02:00
Torsten DittmannandGitHub 514a5c37fd Merge pull request #6253 from appwrite/feat-package-json
feat: package json
2023-10-02 13:42:20 +02:00
shimon 9995ccfd51 composer 2023-10-02 09:48:06 +03:00
shimon 75d8741eaa sync against master 2023-10-01 21:30:52 +03:00
shimon b1da87f970 migrations worker 2023-10-01 21:06:25 +03:00
shimon b02d51c794 migrations worker 2023-10-01 20:39:26 +03:00
shimon 47d27096db deletes & databases workers 2023-10-01 11:04:12 +03:00
Christy JacobandGitHub 1492c8bfb1 Merge pull request #6370 from appwrite/patch-sync-exec-timeout
Patch: Sync executions timeout
2023-09-30 16:53:52 -04:00
Matej Bačo 1502bfef74 Increase timeout 2023-09-30 17:24:09 +02:00
Matej Bačo 78dd0ca439 Merge branch 'cl-1.4.x' into patch-sync-exec-timeout 2023-09-30 16:02:33 +02:00
Christy JacobandGitHub 43de260b33 Merge pull request #6366 from appwrite/1.4.x
Update cl-1.4.x
2023-09-30 10:02:15 -04:00
Matej Bačo 515fec2858 Linter fix 2023-09-30 11:57:15 +02:00
Matej Bačo d9f2f1c37b Introduce execution sync timeout 2023-09-30 11:54:54 +02:00
Torsten DittmannandGitHub c0f44537cd Merge pull request #6365 from appwrite/chore-merge-main 2023-09-29 21:39:06 +02:00
Steven Nguyen 785304b034 Merge branch 'main' into chore-merge-main 2023-09-29 12:36:04 -07:00
Torsten DittmannandGitHub c02f5fedbc Merge pull request #6354 from appwrite/feat-bump-console 2023-09-29 21:19:04 +02:00
Torsten DittmannandGitHub 2da7cc6e69 Merge pull request #6164 from appwrite/fix-skip-non-ascii-chars-image 2023-09-29 21:18:12 +02:00
Steven Nguyen 9d47237da9 Merge branch '1.4.x' into fix-skip-non-ascii-chars-image 2023-09-29 11:07:31 -07:00
Steven Nguyen e95b4460b4 Bump console to the latest version 2023-09-29 11:06:07 -07:00
Torsten DittmannandGitHub 4205614b74 Merge pull request #6363 from appwrite/fix-avatar-tests
Fix avatars tests
2023-09-29 20:04:37 +02:00
Steven Nguyen f2feecf84e Fix avatars tests
Because the tests referenced images on the appwrite.io website, but the
appwrite.io website changed, the tests broke. This updates the tests to
reference valid images/URLs.

In addition, the favicon test was changed to use github.com because
appwrite.io has an SVG favicon which the avatars API does not support.
2023-09-29 10:25:22 -07:00
Torsten DittmannandGitHub edf06962ec Merge pull request #6350 from appwrite/update-references
chore: update references
2023-09-29 17:52:19 +02:00
Bradley Schofield 1136dc9e64 Add Test and don't stop on special char 2023-09-29 16:27:59 +01:00
Bradley Schofield 615d61d962 Merge branch '1.4.x' into fix-skip-non-ascii-chars-image 2023-09-29 09:21:17 +01:00
Christy Jacob c27d5cb721 chore: revert composer.lock 2023-09-28 22:29:49 +00:00
Christy Jacob cf4cf6c1af Merge branch '1.4.x' of https://github.com/appwrite/appwrite into cl-1.4.x 2023-09-28 22:26:25 +00:00
Christy Jacob d600ae1f74 chore: revert composer.lock 2023-09-28 22:25:53 +00:00
Christy Jacob a65c1c1ee5 chore: fix merge conflict 2023-09-28 22:22:44 +00:00
Christy JacobandGitHub 583f8dbc54 Merge pull request #6349 from appwrite/fix-empty-fulltext-search
Fix empty fulltext search
2023-09-28 15:42:07 -04:00
Christy JacobandGitHub 49155a97d4 Merge pull request #6356 from appwrite/fix-logo
chore: update banner
2023-09-28 15:20:29 -04:00
Christy Jacob fee8e7b136 chore: update banner 2023-09-28 19:05:48 +00:00
Christy Jacob edad80e84f chore: update banner 2023-09-28 18:58:56 +00:00
Christy JacobandGitHub d3e27be2d3 Merge pull request #6353 from appwrite/chore-changes-initials-fix
Update CHANGES.md to add fix for avatar initials
2023-09-28 14:47:59 -04:00
shimon 9cf83151cd certificates worker 2023-09-28 20:37:07 +03:00
Steven Nguyen c85cf65e8f Update CHANGES.md to add fix for avatar initials 2023-09-28 09:33:20 -07:00
Christy JacobandGitHub e640235704 Merge pull request #6352 from appwrite/fix-logo
chore: update logo
2023-09-28 12:07:53 -04:00
Christy Jacob 05f583ae64 chore: update logo 2023-09-28 16:07:39 +00:00
Christy Jacob 9aad825c1c chore: revert composer 2023-09-28 16:02:51 +00:00
Christy Jacob 7460114bab chore: update logo 2023-09-28 15:52:14 +00:00
Christy Jacob 64291676f0 chore: update logo 2023-09-28 15:31:18 +00:00
Christy Jacob a1802d968e chore: update references for dart and flutter 2023-09-28 13:01:54 +00:00
Christy Jacob 6314778e05 chore: update references 2023-09-28 13:00:51 +00:00
Christy Jacob 1423ad1a1c chore: update references 2023-09-28 12:56:27 +00:00
shimon a10246a9bd build && audit && usage workers 2023-09-28 13:45:15 +03:00
Jake Barnby aa1cf053f7 Add test ensuring no 500 on bad serach 2023-09-28 18:58:29 +13:00
Jake Barnby 4491975f78 Update database 2023-09-28 18:41:58 +13:00
Christy JacobandGitHub 6211a58b2b Merge pull request #6348 from appwrite/chore-generate-specs
Generate 1.4.x and latest specs
2023-09-27 20:13:57 -04:00
Steven Nguyen faf69a7a4e Generate 1.4.x and latest specs 2023-09-27 16:42:04 -07:00
Christy Jacob ac844d33ef Merge branch '1.4.x' of https://github.com/appwrite/appwrite into cl-1.4.x 2023-09-27 23:25:48 +00:00
Christy JacobandGitHub 4f88ba8b88 Merge pull request #6347 from appwrite/chore-prep-for-1.4
Chore prep for 1.4
2023-09-27 18:59:16 -04:00
Christy JacobandGitHub df3eef3471 Merge pull request #6346 from appwrite/chore-add-health-endpoints
Chore add health endpoints
2023-09-27 18:44:06 -04:00
Christy Jacob 9fa93e0449 chore: review comments 2023-09-27 22:13:03 +00:00
Christy Jacob 70988f5f7e chore: update changelog 2023-09-27 21:52:12 +00:00
Christy Jacob 9adeac5f2c chore: update changelog 2023-09-27 21:51:56 +00:00
Christy Jacob d4a8137e63 chore: update changelog 2023-09-27 21:50:07 +00:00
Christy Jacob c93780cb27 chore: generate new specs 2023-09-27 21:37:34 +00:00
Christy Jacob 0c2cd174a5 chore: prep for 1.4.4 2023-09-27 21:28:28 +00:00
Matej BačoandChristy Jacob d625b9abc8 Remvoe unnessessary comments 2023-09-27 21:25:12 +00:00
Matej BačoandChristy Jacob 2d578dddac Remove double test 2023-09-27 21:25:04 +00:00
Matej BačoandChristy Jacob e58bf7f695 Rename audits back to logs 2023-09-27 21:24:56 +00:00
Matej BačoandChristy Jacob 5120152369 Add all worker health endpoints 2023-09-27 21:24:41 +00:00
Christy JacobandGitHub 50600d6f2a Merge pull request #6343 from appwrite/master
Merge master into 1.4.x
2023-09-27 17:20:32 -04:00
Christy JacobandGitHub 540116502f Merge pull request #6342 from appwrite/feat-bump-assistant
Bump appwrite-assistant to prevent it from crashing w/o open ai key
2023-09-27 17:17:04 -04:00
Christy JacobandGitHub d0f2a101a7 Merge pull request #6332 from appwrite/fix-long-running-functions
Fix execution call timeout
2023-09-27 17:16:30 -04:00
Christy JacobandGitHub 9ec6597464 Merge pull request #6344 from appwrite/chore-bump-composer
Bump composer to fix migration bug
2023-09-27 17:14:57 -04:00
Eldad A. FuxandGitHub c659c5978f Merge pull request #6277 from appwrite/feat/avatar-colors
Update avatar font and default colors
2023-09-27 21:35:32 +03:00
Steven Nguyen 376cfc9d6a Bump composer to fix migration bug 2023-09-27 11:18:03 -07:00
Steven Nguyen 43f491c5bf Bump appwrite-assistant to prevent it from crashing w/o open ai key 2023-09-27 10:46:48 -07:00
shimon dcf0107a79 sync with master 2023-09-27 20:10:21 +03:00
shimon c4bd6e008e Merge branch 'master' of github.com:appwrite/appwrite into refactor-workers
 Conflicts:
	.env
	app/cli.php
	app/config/collections.php
	app/console
	app/controllers/api/account.php
	app/controllers/api/databases.php
	app/controllers/api/functions.php
	app/controllers/api/projects.php
	app/controllers/api/storage.php
	app/controllers/api/teams.php
	app/controllers/api/users.php
	app/controllers/general.php
	app/controllers/shared/api.php
	app/init.php
	app/worker.php
	app/workers/audits.php
	app/workers/builds.php
	app/workers/certificates.php
	app/workers/databases.php
	app/workers/deletes.php
	app/workers/functions.php
	app/workers/mails.php
	bin/worker-usage
	composer.json
	composer.lock
	docker-compose.yml
	src/Appwrite/Event/Delete.php
	src/Appwrite/Event/Mail.php
	src/Appwrite/Platform/Tasks/Maintenance.php
2023-09-27 18:51:17 +03:00
Eldad A. FuxandGitHub 59a850d8b8 Merge pull request #5926 from Dksie09/sentence-case
converted desc to sentence case
2023-09-27 18:16:40 +03:00
Vincent (Wen Yu) GeandGitHub 86f0e6008c Merge branch 'master' into sentence-case 2023-09-27 11:11:58 -04:00
Matej Bačo 872531dc95 Fix execution call timeout 2023-09-26 10:06:22 +02:00
Steven Nguyen 4a0c77a8df Update avatar font and default colors 2023-09-25 15:55:15 -07:00
Christy Jacob 79d7bd8379 chore: linter 2023-09-26 00:10:17 +04:00
Christy Jacob 39dc153a22 chore: remove comments 2023-09-26 00:05:01 +04:00
Christy Jacob 2273cb50b4 Merge branch '1.4.x' of github.com:appwrite/appwrite into cl-1.4.x 2023-09-26 00:02:19 +04:00
Christy Jacob 2856d6db84 Merge branch 'cl-1.4.x' of github.com:appwrite/appwrite into cl-1.4.x 2023-09-26 00:02:09 +04:00
Christy Jacob d4debddc46 chore: update hamster script 2023-09-26 00:01:42 +04:00
Christy Jacob d1d523e1dc chore: update hamster script 2023-09-26 00:01:34 +04:00
Christy JacobandGitHub 650677195c Merge pull request #6319 from appwrite/feat-health-queues
Feat: New health endpoints
2023-09-25 09:54:27 -04:00
Christy JacobandGitHub 6a28499f1b Merge pull request #6329 from appwrite/patch-oauth-flows-1.4.x
Patch: Disable console protection
2023-09-25 09:34:43 -04:00
Christy JacobandGitHub ad83a34857 Merge pull request #6317 from appwrite/feat-event-json-parsing
Feat: Parse event body
2023-09-25 09:34:23 -04:00
Matej Bačo 9f244f976e Remvoe unnessessary comments 2023-09-25 15:32:51 +02:00
Christy JacobandGitHub 0b19b62f39 Merge pull request #6326 from appwrite/fix-max-function-body
Fix: Execution body limit
2023-09-25 09:31:48 -04:00
Matej Bačo 420d2a9c36 @Meldiron Disable console endpoint protection 2023-09-25 15:05:51 +02:00
Matej Bačo c35f05f495 Increase max body size 2023-09-25 11:12:41 +02:00
Matej Bačo a6aa38f1d8 Fix test 2023-09-25 09:55:55 +02:00
Matej Bačo 303c8a16ca Fix test 2023-09-24 14:38:33 +02:00
Matej Bačo b4c5ef2d17 Remove double test 2023-09-24 14:36:47 +02:00
Matej Bačo 725897c896 Rename audits back to logs 2023-09-24 14:36:20 +02:00
Matej Bačo fee30e0239 Remove unnessessary test code 2023-09-24 14:34:27 +02:00
Matej Bačo 24204bce54 Add all worker health endpoints 2023-09-24 14:07:37 +02:00
Matej Bačo 310517fd29 Auto-parse event bodies + test 2023-09-24 13:19:31 +02:00
Torsten DittmannandGitHub c273e3d8e1 Merge pull request #6229 from btme0011/fix-6212-Issue-With-Linkedin-OAuth 2023-09-24 01:57:58 +02:00
Torsten DittmannandGitHub 614e91b60a Merge pull request #6260 from appwrite/fix-delete-project-domains 2023-09-24 01:54:28 +02:00
Christy JacobandGitHub 9dde039adf Merge pull request #6290 from appwrite/fix-deployment-delete
Fix deployment delete
2023-09-22 11:37:50 -04:00
Christy JacobandGitHub e35b07bf0a Merge pull request #6268 from appwrite/fix-download-deployment-desc
Add Description for Download Deployment
2023-09-22 06:24:48 -04:00
Steven Nguyen d731d2b619 Remove legacy comment 2023-09-21 15:35:40 -07:00
Steven Nguyen bb70860b92 Fix deployment and build files deletion on function delete
Make sure deployment and build paths exist before deleting fiels.
2023-09-21 14:55:08 -07:00
Steven Nguyen 9ca82b7662 Fix missing resourceInternalId on deployments 2023-09-20 19:26:23 -07:00
Steven Nguyen c5e059c118 Fix delete function deployment
Prior to this, deleting a VCS deployment would fail because the
deployment path for VCS deployments are empty. Because an error gets
thrown, the delete function would stop and not delete the build files.

This change updates the worker to only delete the storage files if the
path is set.
2023-09-20 18:58:11 -07:00
Bradley Schofield 30b7b9dfae Regenerate Specs 2023-09-18 09:53:40 +01:00
Bradley Schofield 2eb62953ca Add Description for Download Deployment 2023-09-18 09:50:46 +01:00
Steven Nguyen 68b2706797 Fix project deletion
The project deletion failed because old code for deleting domain was
still present. By removing the old code and replacing it with the new
delete rule code, the project deletion is now working.
2023-09-15 17:04:56 -07:00
Torsten Dittmann c1b0ef206b chore: remove unused props from package.json 2023-09-15 14:20:46 +02:00
Torsten Dittmann c58f5a4522 chore: add package.json 2023-09-15 14:17:10 +02:00
Akhil Anand 5ba6491dd5 fix-6212-Issue-With-Linkedin-OAuth 2023-09-14 13:16:45 +05:30
Akhil AnandandGitHub 01ecfc51ea Merge branch 'appwrite:master' into fix-6212-Issue-With-Linkedin-OAuth 2023-09-14 13:09:44 +05:30
Akhil Anand 2aa788d7d5 fix-6212-Issue-With-Linkedin-OAuth 2023-09-13 21:31:26 +05:30
Christy Jacob ab5fa96668 chore: update ci file 2023-09-09 02:39:51 +00:00
Christy Jacob 8a28c9ddbc chore: update ci file 2023-09-09 02:29:50 +00:00
Christy Jacob 85fcddcead chore: update ci file 2023-09-09 02:20:25 +00:00
Christy Jacob ff4816a436 chore: update ci file 2023-09-09 02:17:21 +00:00
Christy Jacob 1c9dfb903d chore: update ci file 2023-09-09 01:58:37 +00:00
Christy Jacob 238089409a chore: update ci file 2023-09-09 01:39:01 +00:00
Christy Jacob e70d5beb0d chore: update ci file 2023-09-09 01:29:56 +00:00
Christy Jacob e390cf0d70 chore: update CI file 2023-09-09 00:11:14 +00:00
Christy Jacob 29e056c71b chore: update CI file 2023-09-09 00:00:06 +00:00
Christy Jacob 0a2874458b chore: update CI file 2023-09-08 23:54:27 +00:00
Christy Jacob 0ddf036bd5 chore: update CI file 2023-09-08 23:44:19 +00:00
Christy Jacob 29d0820b10 chore: update CI file 2023-09-08 23:41:16 +00:00
Christy Jacob 889942ee76 chore: update CI file 2023-09-08 23:37:41 +00:00
Christy Jacob 01aaa6b337 chore: update CI file 2023-09-08 23:34:23 +00:00
Christy Jacob eaf94aa670 chore: update CI file 2023-09-08 23:31:04 +00:00
Christy Jacob 1a93aa4085 chore: update CI file 2023-09-08 23:24:16 +00:00
Christy Jacob 0f67c1151f chore: update CI file 2023-09-08 23:18:26 +00:00
Christy Jacob 10f6cc7b0b chore: update CI file 2023-09-08 23:12:11 +00:00
Christy Jacob 733b7ed612 chore: update CI file 2023-09-08 22:57:25 +00:00
Christy Jacob 1415727f10 chore: update CI file 2023-09-08 22:53:50 +00:00
Christy Jacob ebb4bc7e6b chore: update CI file 2023-09-08 22:39:11 +00:00
Christy Jacob 21357bfe7b chore: update CI file 2023-09-08 22:32:54 +00:00
Christy Jacob 5cb14fbec5 feat: test upload artifact 2023-09-08 22:11:40 +00:00
Christy Jacob 5793a11480 feat: test upload artifact 2023-09-08 22:10:56 +00:00
Christy Jacob 2ed6327c1e feat: test upload artifact 2023-09-08 22:03:32 +00:00
Christy Jacob cf030457e0 feat: test upload artifact 2023-09-08 21:55:28 +00:00
Christy Jacob 27f77759ed feat: test upload artifact 2023-09-08 21:48:31 +00:00
Christy Jacob dec4f4722b feat: test upload artifact 2023-09-08 21:43:18 +00:00
Christy Jacob 8bd822d171 feat: test upload artifact 2023-09-08 21:35:01 +00:00
Christy Jacob 13c6666883 feat: test upload artifact 2023-09-08 21:29:11 +00:00
Christy Jacob fa99c4584e feat: test upload artifact 2023-09-08 20:07:13 +00:00
Christy Jacob 2aad9e622b feat: trigger ci 2023-09-08 19:16:25 +00:00
Christy Jacob 22c8781047 feat: test upload artifact 2023-09-08 19:11:57 +00:00
Christy Jacob 57e146be2b feat: test upload artifact 2023-09-08 19:11:00 +00:00
Christy Jacob 1e07fa96a3 feat: test upload artifact 2023-09-08 19:06:10 +00:00
Christy Jacob 2eae37d802 feat: test upload artifact 2023-09-08 19:03:55 +00:00
Christy Jacob addc88ccdc chore: test parallel executions 2023-09-08 18:49:02 +00:00
Bradley Schofield 8e0e131824 Remove Special Chars from Initials 2023-09-06 09:54:59 +01:00
Dakshi 16a2135d4a updated based on review 2023-08-02 02:19:20 +05:30
Dakshi 12228ccef4 converted desc to sentence case 2023-08-01 20:56:48 +05:30
shimon 1fd7f0c5d7 SSl task 2023-07-18 10:54:11 +03:00
shimon d28a235b4d $projectInternalId rollback to false 2023-07-17 16:31:19 +03:00
DavidandGitHub 3a42dca19e Update es.json
Fixed suggested changes by Matej
2023-07-17 13:44:04 +02:00
shimon d1d1392bb3 small adjustments 2023-07-12 11:12:56 +03:00
shimon 58aa29a4ae cli 2023-07-11 18:47:38 +03:00
shimon e950945170 users addition 2023-07-11 18:46:21 +03:00
1358d6c455 Update src/Appwrite/Platform/Workers/Audits.php
Co-authored-by: Damodar Lohani <lohanidamodar@users.noreply.github.com>
2023-07-10 11:13:35 +03:00
shimon 5366d90ff2 users addition 2023-07-10 11:07:54 +03:00
shimon 89f0146c45 users addition 2023-07-10 11:03:59 +03:00
shimon 785c00ae5c functions/builds/deletes worker 2023-06-12 13:04:47 +03:00
shimon 57bc7d0584 functions/builds/deletes worker 2023-06-11 17:08:48 +03:00
shimon fd4f86b1c1 functions/builds/deletes worker 2023-06-11 13:29:04 +03:00
shimon 62c619434e functions/builds/deletes worker 2023-06-05 19:13:00 +03:00
shimon d820d93ac7 databases worker 2023-06-04 19:25:56 +03:00
shimon 0d2987620c refactor workers 2023-06-04 11:19:49 +03:00
shimon 6e7c160249 changing event signature 2023-06-02 06:54:34 +03:00
shimon 73f3f0aee6 Messaging 2023-05-30 16:19:44 +03:00
shimon 478e83a4bf Messaging 2023-05-30 11:53:52 +03:00
shimon 06ca9ce815 Messaging 2023-05-29 19:32:33 +03:00
shimon 5a22d17459 Mails 2023-05-29 18:03:09 +03:00
shimon f1466c05cf refactor workers 2023-05-29 16:58:45 +03:00
shimon 543efd6032 re-working worker flow 2023-05-23 16:43:34 +03:00
shimon 98dc1db878 re-working worker flow 2023-05-23 16:43:03 +03:00
shimon 432ee72071 Merge branch 'feat-db-pools' of github.com:appwrite/appwrite into refactor-workers
 Conflicts:
	app/cli.php
	app/console
	app/controllers/api/account.php
	app/controllers/api/functions.php
	app/controllers/api/teams.php
	app/controllers/shared/api.php
	app/init.php
	app/worker.php
	app/workers/builds.php
	app/workers/certificates.php
	app/workers/deletes.php
	app/workers/functions.php
	app/workers/mails.php
	src/Appwrite/Event/Event.php
	src/Appwrite/Event/Mail.php
2023-05-22 18:41:24 +03:00
DavidandGitHub 536bcf28b5 Corrected spanish translations (emails)
Some translations to spanish had some misspellings and redaction issues. Fixed that.
2023-03-28 21:05:38 +02:00
Bradley Schofield c0daed3644 Refactor names and cleanup code 2022-12-20 16:11:30 +00:00
Bradley Schofield 0b17a737fe Fix Functions Worker 2022-12-20 15:42:04 +00:00
Bradley Schofield 1cd84aacc7 Update Event.php 2022-12-20 13:06:57 +00:00
Bradley Schofield 740bae6a99 Update console 2022-12-20 13:01:39 +00:00
Bradley Schofield 284ce42177 Merge branch 'feat-db-pools' into refactor-schedulers-workers 2022-12-20 13:01:27 +00:00
Bradley Schofield e577c04fae Update Maintenance.php 2022-12-20 12:49:33 +00:00
Bradley Schofield b0c8e8980d Continue removing resque 2022-12-20 12:48:55 +00:00
Bradley Schofield 886a1a2abb Port Deletes and Builds worker 2022-12-20 12:22:58 +00:00
Bradley Schofield f2e8a619da Merge branch 'refactor-scheduler-messaging' into refactor-schedulers-workers 2022-12-20 11:24:58 +00:00
Bradley Schofield 6f3a057608 Merge branch 'refactor-scheduler-emails' into refactor-schedulers-workers 2022-12-20 11:24:26 +00:00
Bradley Schofield 11bd518b6a Merge branch 'refactor-scheduler-database' into refactor-schedulers-workers 2022-12-20 11:23:26 +00:00
Bradley Schofield 3e66d1a549 Rename certificate queue 2022-12-20 11:21:07 +00:00
Bradley Schofield 169386d0b3 Merge branch 'refactor-sceduler-certificates' into refactor-schedulers-workers 2022-12-20 11:20:52 +00:00
Bradley Schofield d52fa1169a Merge Audits 2022-12-20 11:11:36 +00:00
Bradley Schofield a09e23d0b9 Start work on porting webhooks 2022-12-20 11:07:49 +00:00
Bradley Schofield ab7c04074c Update Phone.php 2022-12-17 21:23:15 +00:00
Bradley Schofield 50f82a276f Run Linter 2022-12-17 20:46:34 +00:00
Bradley Schofield a8595eaca2 Port Messages worker to Utopia queue system 2022-12-17 20:45:58 +00:00
Bradley Schofield 2e49666ee6 Port Mail Worker from resque to Utopia Queue 2022-12-17 19:19:41 +00:00
Bradley Schofield e4ad14c794 Run Linter 2022-12-13 15:56:36 +00:00
Bradley Schofield 02271c5329 Remove debug force true 2022-12-13 15:54:37 +00:00
Bradley Schofield 6e6a6d5518 Migrate Database worker to Utopia Queue system 2022-12-13 15:54:01 +00:00
Bradley Schofield b7d7a71994 Run Linter 2022-12-13 11:18:38 +00:00
Bradley Schofield 21afa43127 Port Certificates to new Queue system 2022-12-13 11:16:12 +00:00
Bradley Schofield 85268cbae2 Run Linter 2022-12-06 15:15:16 +00:00
Bradley Schofield 84f1a15a4c Refactor Audit Worker to use Utopia Queue system 2022-12-06 15:06:40 +00:00
350 changed files with 60924 additions and 4596 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ _APP_GRAPHQL_MAX_DEPTH=3
_APP_DOCKER_HUB_USERNAME=
_APP_DOCKER_HUB_PASSWORD=
_APP_VCS_GITHUB_APP_NAME=
_APP_VCS_GITHUB_PRIVATE_KEY=""
_APP_VCS_GITHUB_PRIVATE_KEY=disabled
_APP_VCS_GITHUB_APP_ID=
_APP_VCS_GITHUB_CLIENT_ID=
_APP_VCS_GITHUB_CLIENT_SECRET=
-1
View File
@@ -16,7 +16,6 @@ jobs:
with:
fetch-depth: 2
submodules: recursive
ref: cl-1.4.x
- name: Login to Docker Hub
uses: docker/login-action@v2
+104 -42
View File
@@ -4,57 +4,119 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE: appwrite-dev
CACHE_KEY: appwrite-dev-${{ github.event.pull_request.head.sha }}
on: [pull_request]
jobs:
tests:
name: Unit & E2E
setup:
name: Setup & Build Appwrite Image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Appwrite
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: ${{ env.IMAGE }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/${{ env.IMAGE }}.tar
build-args: |
DEBUG=false
TESTING=true
VERSION=dev
- name: Cache Docker Image
uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}
path: /tmp/${{ env.IMAGE }}.tar
unit_test:
name: Unit Test
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
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.
fetch-depth: 2
# Fetch submodules
submodules: recursive
- name: checkout
uses: actions/checkout@v2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Load Cache
uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}
path: /tmp/${{ env.IMAGE }}.tar
fail-on-cache-miss: true
# This is a separate action that sets up buildx runner
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Load and Start Appwrite
run: |
docker load --input /tmp/${{ env.IMAGE }}.tar
docker compose up -d
sleep 10
- name: Build Appwrite
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: appwrite-dev
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
DEBUG=false
TESTING=true
VERSION=dev
- name: Doctor
run: docker compose exec -T appwrite doctor
- name: Start Appwrite
run: |
docker compose up -d
sleep 30
- name: Environment Variables
run: docker compose exec -T appwrite vars
- name: Doctor
run: |
docker compose logs appwrite
docker compose exec -T appwrite doctor
- name: Run Unit Tests
run: docker compose exec appwrite test /usr/src/code/tests/unit
- name: Environment Variables
run: docker compose exec -T appwrite vars
e2e_test:
name: E2E Test
runs-on: ubuntu-latest
needs: setup
strategy:
fail-fast: false
matrix:
service:
[
Account,
Avatars,
Console,
Databases,
Functions,
GraphQL,
Health,
Locale,
Projects,
Realtime,
Storage,
Teams,
Users,
Webhooks,
VCS,
]
- name: Run Tests
run: docker compose exec -T appwrite test --debug
steps:
- name: checkout
uses: actions/checkout@v3
- name: Load Cache
uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}
path: /tmp/${{ env.IMAGE }}.tar
fail-on-cache-miss: true
- name: Load and Start Appwrite
run: |
docker load --input /tmp/${{ env.IMAGE }}.tar
docker compose up -d
sleep 10
- name: Run ${{matrix.service}} Tests
run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug
+1 -1
View File
@@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 3.1.1
branch = 3.2.5
+1 -1
View File
@@ -8,7 +8,7 @@ tasks:
command: |
docker run --rm --interactive --tty \
--volume $PWD:/app \
composer update \
composer install \
--ignore-platform-reqs \
--optimize-autoloader \
--no-plugins \
+91
View File
@@ -1,3 +1,94 @@
# Version 1.4.9
## Bug fixes
* Fix 400 error on function domain execution in [#7059](https://github.com/appwrite/appwrite/pull/7059)
# Version 1.4.8
## Notable changes
* Fix certificate emails and add support for variables in email template subject in [#6495](https://github.com/appwrite/appwrite/)pull/6495
* Bump console to version 3.2.5 in [#7027](https://github.com/appwrite/appwrite/pull/7027)
* Bump utopia database and storage versions in [#7002](https://github.com/appwrite/appwrite/pull/7002)
## Bug fixes
* Fixes cookie headers not being passed properly by router in [#7024](https://github.com/appwrite/appwrite/pull/7024)
* Fix permission problem in deletes worker in [#7013](https://github.com/appwrite/appwrite/pull/7013)
## Miscellaneous
* Improve error handling in the realtime service in [#6998](https://github.com/appwrite/appwrite/pull/6998)
* Update the error code for unsupported protocol in [#7006](https://github.com/appwrite/appwrite/pull/7006)
* Improve CI tests by executing them in parallel in [#6198](https://github.com/appwrite/appwrite/pull/6198)
* Update README.md to add links to orchestration tools in [#7011](https://github.com/appwrite/appwrite/pull/7011)
* Update gitpod setup to install instead of update dependencies in [#6938](https://github.com/appwrite/appwrite/pull/6938)
* Remove analytics from install script in [#7017](https://github.com/appwrite/appwrite/pull/7017)
* Improve database logging in [#7003](https://github.com/appwrite/appwrite/pull/7003)
* Add VCS tests in [#6894](https://github.com/appwrite/appwrite/pull/6894)
* Improve error messages in [#6487](https://github.com/appwrite/appwrite/pull/6487)
* Add command to delete orphaned projects in [#7015](https://github.com/appwrite/appwrite/pull/7015)
# Version 1.4.7
## Fixes
- Fix missing body in async function execution in [#6988](https://github.com/appwrite/appwrite/pull/6988)
# Version 1.4.6
## Changes
- Bump console to version 3.2.3 in [#6947](https://github.com/appwrite/appwrite/pull/6947)
- New health endpoints in [#6319](https://github.com/appwrite/appwrite/pull/6319)
- 30 second sync executions timeout in [#6370](https://github.com/appwrite/appwrite/pull/6370)
- Feat db per worker in [#6888](https://github.com/appwrite/appwrite/pull/6888)
- Feat: Dart 3.1 support in [#6936](https://github.com/appwrite/appwrite/pull/6936)
- chore: remove resque library and update health check endpoints in [#6946](https://github.com/appwrite/appwrite/pull/6946)
- Refactor workers in [#6928](https://github.com/appwrite/appwrite/pull/6928)
## Fixes
- Fix realtime deletes in [#6897](https://github.com/appwrite/appwrite/pull/6897)
- Update teamInternalId when updating project team in [#6898](https://github.com/appwrite/appwrite/pull/6898)
- Fix: spanish translations (emails) in [#5290](https://github.com/appwrite/appwrite/pull/5290)
- chore: fix spec links in [#6434](https://github.com/appwrite/appwrite/pull/6434)
- Delegate custom deletes in [#6934](https://github.com/appwrite/appwrite/pull/6934)
# Version 1.4.5
## Changes
- Bump console to version 3.2.1 in [#6868](https://github.com/appwrite/appwrite/pull/6868)
## Fixes
- Fix realtime logs in [#6478](https://github.com/appwrite/appwrite/pull/6478)
- Fix "File not found" error in executor in [#6476](https://github.com/appwrite/appwrite/pull/6476)
- Fix missing array flag on migration errors response model rule in [#6469](https://github.com/appwrite/appwrite/pull/6469)
- Ensure openruntimes-executor restarts after a server reboot in [#6490](https://github.com/appwrite/appwrite/pull/6490)
# Version 1.4.4
## Features
- Feat: Function domains force https in [#6269](https://github.com/appwrite/appwrite/pull/6269)
- Feat: router protection in [#6272](https://github.com/appwrite/appwrite/pull/6272)
- Feat: Parse event body in [#6317](https://github.com/appwrite/appwrite/pull/6317)
## Fixes
- Fix: wrong device type in [#6271](https://github.com/appwrite/appwrite/pull/6271)
- Fix: build race condition in [#6270](https://github.com/appwrite/appwrite/pull/6270)
- Fix: Large builds in [#6273](https://github.com/appwrite/appwrite/pull/6273)
- Fix: migrations in [#6302](https://github.com/appwrite/appwrite/pull/6302)
- Add Description for Download Deployment in [#6268](https://github.com/appwrite/appwrite/pull/6268)
- Fix deployment delete in [#6290](https://github.com/appwrite/appwrite/pull/6290)
- Fix project deletion in [#6260](https://github.com/appwrite/appwrite/pull/6260)
- fix-6212-Issue-With-Linkedin-OAuth in [#6229](https://github.com/appwrite/appwrite/pull/6229)
- Fix: Execution body limit in [#6326](https://github.com/appwrite/appwrite/pull/6326)
- Patch: Disable console protection in [#6329](https://github.com/appwrite/appwrite/pull/6329)
- converted desc to sentence case in [#5926](https://github.com/appwrite/appwrite/pull/5926)
- Update avatar font and default colors in [#6277](https://github.com/appwrite/appwrite/pull/6277)
- Bump composer to fix migration bug in [#6344](https://github.com/appwrite/appwrite/pull/6344)
- Fix execution call timeout in [#6332](https://github.com/appwrite/appwrite/pull/6332)
- Bump appwrite-assistant to prevent it from crashing w/o open ai key in [#6342](https://github.com/appwrite/appwrite/pull/6342)
- Remove Special Chars from Initials [#6164](https://github.com/appwrite/appwrite/pull/6164)
# Version 1.4.3
## Features
+7 -4
View File
@@ -2,6 +2,11 @@
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.
## Here for Hacktoberfest?
If you're here to contribute during Hacktoberfest, we're so happy to see you here. Appwrite has been a long-time participant of Hacktoberfest and we welcome you, whatever your experience level. This year, we're **only taking contributions for issues tagged** `hacktoberfest`, so we can focus our resources to support your contributions.
You can [find issues using this query](https://github.com/search?q=org%3Aappwrite+is%3Aopen+type%3Aissue+label%3Ahacktoberfest&type=issues).
## How to Start?
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!
@@ -84,7 +89,7 @@ $ git push origin [name_of_your_new_branch]
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 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.
> 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/quick-starts), or the main [README](README.md) file.
```bash
git clone git@github.com:[YOUR_FORK_HERE]/appwrite.git
@@ -201,7 +206,6 @@ Appwrite's current structure is a combination of both [Monolithic](https://en.wi
│ ├── Network
│ ├── OpenSSL
│ ├── Promises
│ ├── Resque
│ ├── Specification
│ ├── Task
│ ├── Template
@@ -246,7 +250,6 @@ Appwrite stack is a combination of a variety of open-source technologies and too
- 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.
## Package Managers
@@ -451,7 +454,7 @@ From time to time, our team will add tutorials that will help contributors find
- [Adding Support for a New OAuth2 Provider](./docs/tutorials/add-oauth2-provider.md)
- [Appwrite Environment Variables](./docs/tutorials/add-environment-variable.md)
- [Running in Production](https://appwrite.io/docs/production)
- [Running in Production](https://appwrite.io/docs/advanced/self-hosting/production)
- [Adding Storage Adapter](./docs/tutorials/add-storage-adapter.md)
## Other Ways to Help
+1
View File
@@ -101,6 +101,7 @@ RUN chmod +x /usr/local/bin/hamster && \
chmod +x /usr/local/bin/volume-sync && \
chmod +x /usr/local/bin/patch-delete-schedule-updated-at-attribute && \
chmod +x /usr/local/bin/patch-delete-project-collections && \
chmod +x /usr/local/bin/delete-orphaned-projects && \
chmod +x /usr/local/bin/clear-card-cache && \
chmod +x /usr/local/bin/calc-users-stats && \
chmod +x /usr/local/bin/calc-tier-stats
+57
View File
@@ -0,0 +1,57 @@
# Appwrite hacktoberfest contribution
Welcome to the Appwrite Hacktoberfest contribution! We appreciate your interest in contributing to our open-source project. Please read this carefully to understand how to get started and make your contributions count.
## Familiarize with the project
Before you start contributing, familiarize yourself with our project by reading the [main README](https://github.com/appwrite/appwrite/blob/main/README.md).
## Code of conduct
Please ensure that you always follow our [Code of Conduct](https://github.com/appwrite/awesome-appwrite/blob/master/CODE_OF_CONDUCT.md). We aim to maintain a respectful and inclusive community.
## Contributing guide
Please review our [Contributing Guide](https://github.com/appwrite/appwrite/blob/main/CONTRIBUTING.md) before contributing. It will help you learn about the architecture, instructions on how to update code, run tests, and submit a PR.
## Hacktoberfest contribution guidelines
To participate in Hacktoberfest with Appwrite, follow these guidelines:
1. **Valid issues**: To make your contribution count, please look for issues labeled with `hacktoberfest`. Only issues labeled with `hacktoberfest` will count as a valid contribution.
2. **Wait for issue assignment**: After you have identified an issue to work on, please wait for it to be assigned to you by our team. We assign issues on a first-come, first-serve basis.
3. **Knowing about labels**: We do not have the `hacktoberfest` label in our repositories, but we use it on specific issues. For your pull request to be valid, our team will review and add the `hacktoberfest-accepted` label once it meets the criteria.
4. **Discuss new issues**: If you're interested in finding and adding new issues for Hacktoberfest, please discuss it with the team on our [Discord server](https://appwrite.io/discord) in the `#hacktoberfest` channel.
5. **Be patient with pull request reviews**: PR reviews may take up to 15 days due to the volume of contributions. However, we also host PR review parties every week where you can add your PRs for instant review.
6. **Regular updates**: If you've been assigned an issue, it's essential to share updates every 3 days. Failure to do so may result in being unassigned from the issue.
## Getting started
1. Fork the Appwrite repository you'd like to contribute to.
2. Clone your forked repository to your local machine.
```bash
git clone https://github.com/your-username/repository-name.git
```
3. Create a new branch for your contribution.
```bash
git checkout -b TYPE-ISSUE_ID-DESCRIPTION
```
4. Make your changes, commit them, and push them to your forked repository.
```bash
git commit -m "Add your commit message here"
git push origin TYPE-ISSUE_ID-DESCRIPTION
```
5. Create a Pull Request (PR) from your forked repository to the Appwrite repository. Be sure to reference the issue you are addressing in your PR description.
Thank you for contributing to Appwrite, and we look forward to your Hacktoberfest contributions! If you have any questions or need assistance, feel free to ask on our Discord server or in the issue discussion. Happy hacking!
+10 -10
View File
@@ -2,7 +2,7 @@
<br />
<p align="center">
<a href="https://appwrite.io" target="_blank"><img width="260" height="39" src="https://appwrite.io/images/appwrite.svg" alt="Appwrite Logo"></a>
<a href="https://appwrite.io" target="_blank"><img src="./public/images/banner.png" alt="Appwrite Logo"></a>
<br />
<br />
<b>适用于[Flutter/Vue/Angular/React/iOS/Android/* 等等平台 *]的完整后端服务</b>
@@ -66,7 +66,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.4.3
appwrite/appwrite:1.4.9
```
### Windows
@@ -78,7 +78,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.4.3
appwrite/appwrite:1.4.9
```
#### PowerShell
@@ -88,7 +88,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.4.3
appwrite/appwrite:1.4.9
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
@@ -113,14 +113,14 @@ docker run -it --rm `
### 软件服务
* [**帐户**](https://appwrite.io/docs/client/account) -管理当前用户的帐户和登录方式。跟踪和管理用户 Session,登录设备,登录方法和查看相关记录。
* [**帐户**](https://appwrite.io/docs/references/cloud/client-web/account) -管理当前用户的帐户和登录方式。跟踪和管理用户 Session,登录设备,登录方法和查看相关记录。
* [**用户**](https://appwrite.io/docs/server/users) - 在以管理员模式登录时管理和列出所有用户。
* [**团队**](https://appwrite.io/docs/client/teams) - 管理用户分组。邀请成员,管理团队中的用户权限和用户角色。
* [**数据库**](https://appwrite.io/docs/client/databases) - 管理数据库文档和文档集。用检索界面来对文档和文档集进行读取,创建,更新,和删除。
* [**贮存**](https://appwrite.io/docs/client/storage) - 管理文件的阅读、创建、删除和预览。设置文件的预览来满足程序的个性化需求。所有文件都由 ClamAV 扫描并安全存储和加密。
* [**团队**](https://appwrite.io/docs/references/cloud/client-web/teams) - 管理用户分组。邀请成员,管理团队中的用户权限和用户角色。
* [**数据库**](https://appwrite.io/docs/references/cloud/client-web/databases) - 管理数据库文档和文档集。用检索界面来对文档和文档集进行读取,创建,更新,和删除。
* [**贮存**](https://appwrite.io/docs/references/cloud/client-web/storage) - 管理文件的阅读、创建、删除和预览。设置文件的预览来满足程序的个性化需求。所有文件都由 ClamAV 扫描并安全存储和加密。
* [**云函数**](https://appwrite.io/docs/server/functions) - 在安全,隔离的环境中运行自定义代码。这些代码可以被事件,CRON,或者手动操作触发。
* [**语言适配**](https://appwrite.io/docs/client/locale) - 根据用户所在的的国家和地区做出合适的语言适配。
* [**头像**](https://appwrite.io/docs/client/avatars) -管理用户头像、国家旗帜、浏览器图标、信用卡符号,和生成二维码。
* [**语言适配**](https://appwrite.io/docs/references/cloud/client-web/locale) - 根据用户所在的的国家和地区做出合适的语言适配。
* [**头像**](https://appwrite.io/docs/references/cloud/client-web/avatars) -管理用户头像、国家旗帜、浏览器图标、信用卡符号,和生成二维码。
如需完整的 API 界面文档,请访问 [https://appwrite.io/docs](https://appwrite.io/docs)。如需更多教程、新闻和公告,请订阅我们的 [博客](https://medium.com/appwrite-io) 和 加入我们的[Discord 社区](https://discord.gg/GSeTUeA)。
### 开发套件
+12 -11
View File
@@ -2,7 +2,8 @@
<br />
<p align="center">
<a href="https://appwrite.io" target="_blank"><img width="260" height="39" src="https://appwrite.io/images/appwrite.svg" alt="Appwrite Logo"></a>
<a href="https://appwrite.io" target="_blank"><img src="./public/images/banner.png" alt="Appwrite Logo"></a>
<br />
<br />
<b>Appwrite is a backend platform for developing Web, Mobile, and Flutter applications. Built with the open source community and optimized for developer experience in the coding languages you love.</b>
<br />
@@ -64,7 +65,7 @@ Table of Contents:
## Installation
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.
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](https://kubernetes.io/docs/home/), [Docker Swarm](https://docs.docker.com/engine/swarm/), or [Rancher](https://rancher.com/docs/).
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 +76,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.4.3
appwrite/appwrite:1.4.9
```
### Windows
@@ -87,7 +88,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.4.3
appwrite/appwrite:1.4.9
```
#### PowerShell
@@ -97,7 +98,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.4.3
appwrite/appwrite:1.4.9
```
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.
@@ -150,15 +151,15 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
### Services
- [**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.
- [**Account**](https://appwrite.io/docs/references/cloud/client-web/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 perfectly fit your app. All files are scanned by ClamAV and stored in a secure and encrypted way.
- [**Teams**](https://appwrite.io/docs/references/cloud/client-web/teams) - Manage and group users in teams. Manage memberships, invites, and user roles within a team.
- [**Databases**](https://appwrite.io/docs/references/cloud/client-web/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/references/cloud/client-web/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.
- [**Locale**](https://appwrite.io/docs/references/cloud/client-web/locale) - Track your user's location and manage your app locale-based data.
- [**Avatars**](https://appwrite.io/docs/references/cloud/client-web/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).
Binary file not shown.
Binary file not shown.
+24 -8
View File
@@ -3,6 +3,8 @@
require_once __DIR__ . '/init.php';
require_once __DIR__ . '/controllers/general.php';
use Appwrite\Event\Delete;
use Appwrite\Event\Certificate;
use Appwrite\Event\Func;
use Appwrite\Platform\Appwrite;
use Utopia\CLI\CLI;
@@ -17,6 +19,7 @@ use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Logger\Log;
use Utopia\Pools\Group;
use Utopia\Queue\Connection;
use Utopia\Registry\Registry;
Authorization::disable();
@@ -58,7 +61,11 @@ CLI::setResource('dbForConsole', function ($pools, $cache) {
->getResource();
$dbForConsole = new Database($dbAdapter, $cache);
$dbForConsole->setNamespace('_console');
$dbForConsole
->setNamespace('_console')
->setMetadata('host', \gethostname())
->setMetadata('project', 'console');
// Ensure tables exist
$collections = Config::getParam('collections', [])['console'];
@@ -86,7 +93,7 @@ CLI::setResource('dbForConsole', function ($pools, $cache) {
CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole, $cache) {
$databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools
$getProjectDB = function (Document $project) use ($pools, $dbForConsole, $cache, &$databases) {
return function (Document $project) use ($pools, $dbForConsole, $cache, &$databases) {
if ($project->isEmpty() || $project->getId() === 'console') {
return $dbForConsole;
}
@@ -108,12 +115,13 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
$databases[$databaseName] = $database;
$database->setNamespace('_' . $project->getInternalId());
$database
->setNamespace('_' . $project->getInternalId())
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId());
return $database;
};
return $getProjectDB;
}, ['pools', 'dbForConsole', 'cache']);
CLI::setResource('influxdb', function (Registry $register) {
@@ -140,10 +148,18 @@ CLI::setResource('influxdb', function (Registry $register) {
return $database;
}, ['register']);
CLI::setResource('queueForFunctions', function (Group $pools) {
return new Func($pools->get('queue')->pop()->getResource());
CLI::setResource('queue', function (Group $pools) {
return $pools->get('queue')->pop()->getResource();
}, ['pools']);
CLI::setResource('queueForFunctions', function (Connection $queue) {
return new Func($queue);
}, ['queue']);
CLI::setResource('queueForDeletes', function (Connection $queue) {
return new Delete($queue);
}, ['queue']);
CLI::setResource('queueForCertificates', function (Connection $queue) {
return new Certificate($queue);
}, ['queue']);
CLI::setResource('logError', function (Registry $register) {
return function (Throwable $error, string $namespace, string $action) use ($register) {
$logger = $register->get('logger');
+30 -9
View File
@@ -86,7 +86,7 @@ return [
Exception::GENERAL_PROTOCOL_UNSUPPORTED => [
'name' => Exception::GENERAL_PROTOCOL_UNSUPPORTED,
'description' => 'The request cannot be fulfilled with the current protocol. Please check the value of the _APP_OPTIONS_FORCE_HTTPS environment variable.',
'code' => 500,
'code' => 426,
],
Exception::GENERAL_CODES_DISABLED => [
'name' => Exception::GENERAL_CODES_DISABLED,
@@ -208,7 +208,7 @@ return [
Exception::USER_AUTH_METHOD_UNSUPPORTED => [
'name' => Exception::USER_AUTH_METHOD_UNSUPPORTED,
'description' => 'The requested authentication method is either disabled or unsupported. Please check the supported authentication methods in the Appwrite console.',
'code' => 501,
'code' => 403,
],
Exception::USER_PHONE_ALREADY_EXISTS => [
'name' => Exception::USER_PHONE_ALREADY_EXISTS,
@@ -355,7 +355,7 @@ return [
],
Exception::STORAGE_BUCKET_ALREADY_EXISTS => [
'name' => Exception::STORAGE_BUCKET_ALREADY_EXISTS,
'description' => 'A storage bucket with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.',
'description' => 'A storage bucket with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.',
'code' => 409,
],
Exception::STORAGE_BUCKET_NOT_FOUND => [
@@ -460,12 +460,16 @@ return [
'description' => 'Database not found',
'code' => 404
],
Exception::DATABASE_ALREADY_EXISTS => [
'name' => Exception::DATABASE_ALREADY_EXISTS,
'description' => 'Database already exists',
'code' => 409
],
Exception::DATABASE_TIMEOUT => [
'name' => Exception::DATABASE_TIMEOUT,
'description' => 'Database timed out. Try adjusting your queries or adding an index.',
'code' => 408
],
/** Collections */
Exception::COLLECTION_NOT_FOUND => [
@@ -475,7 +479,7 @@ return [
],
Exception::COLLECTION_ALREADY_EXISTS => [
'name' => Exception::COLLECTION_ALREADY_EXISTS,
'description' => 'A collection with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.',
'description' => 'A collection with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.',
'code' => 409,
],
Exception::COLLECTION_LIMIT_EXCEEDED => [
@@ -507,7 +511,7 @@ return [
],
Exception::DOCUMENT_ALREADY_EXISTS => [
'name' => Exception::DOCUMENT_ALREADY_EXISTS,
'description' => 'Document with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.',
'description' => 'Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.',
'code' => 409,
],
Exception::DOCUMENT_UPDATE_CONFLICT => [
@@ -549,7 +553,7 @@ return [
],
Exception::ATTRIBUTE_ALREADY_EXISTS => [
'name' => Exception::ATTRIBUTE_ALREADY_EXISTS,
'description' => 'Attribute with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.',
'description' => 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.',
'code' => 409,
],
Exception::ATTRIBUTE_LIMIT_EXCEEDED => [
@@ -581,7 +585,7 @@ return [
],
Exception::INDEX_ALREADY_EXISTS => [
'name' => Exception::INDEX_ALREADY_EXISTS,
'description' => 'Index with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.',
'description' => 'Index with the requested key already exists. Try again with a different key.',
'code' => 409,
],
Exception::INDEX_INVALID => [
@@ -598,7 +602,7 @@ return [
],
Exception::PROJECT_ALREADY_EXISTS => [
'name' => Exception::PROJECT_ALREADY_EXISTS,
'description' => 'Project with the requested ID already exists. Try again with a different ID or use "unique()" to generate a unique ID.',
'description' => 'Project with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.',
'code' => 409,
],
Exception::PROJECT_UNKNOWN => [
@@ -728,4 +732,21 @@ return [
'description' => 'Migration is already in progress. You can check the status of the migration in your Appwrite Console\'s "Settings" > "Migrations".',
'code' => 409,
],
/** Realtime */
Exception::REALTIME_MESSAGE_FORMAT_INVALID => [
'name' => Exception::REALTIME_MESSAGE_FORMAT_INVALID,
'description' => 'Message format is not valid.',
'code' => 1003,
],
Exception::REALTIME_POLICY_VIOLATION => [
'name' => Exception::REALTIME_POLICY_VIOLATION,
'description' => 'Policy violation.',
'code' => 1008,
],
Exception::REALTIME_TOO_MANY_MESSAGES => [
'name' => Exception::REALTIME_TOO_MANY_MESSAGES,
'description' => 'Too many messages.',
'code' => 1013,
],
];
+19 -19
View File
@@ -2,31 +2,31 @@
"settings.inspire": "\"El arte de ser sabio es el arte de saber qué pasar por alto\"",
"settings.locale": "es",
"settings.direction": "ltr",
"emails.sender": "Equipo %s",
"emails.sender": "El equipo de %s",
"emails.verification.subject": "Verificación de cuenta",
"emails.verification.hello": "Hola {{user}}",
"emails.verification.body": "Haz clic en este enlace para verificar tu correo.",
"emails.verification.hello": "Hola, {{name}}",
"emails.verification.body": "Haz clic en este enlace para verificar tu correo:",
"emails.verification.footer": "Si no has solicitado verificar este correo, puedes ignorar este mensaje.",
"emails.verification.thanks": "Gracias",
"emails.verification.signature": "Equipo de {{project}}",
"emails.verification.thanks": "Gracias.",
"emails.verification.signature": "El equipo de {{project}}.",
"emails.magicSession.subject": "Inicio de sesión",
"emails.magicSession.hello": "Hola,",
"emails.magicSession.body": "Haz clic en este enlace para iniciar sesión.",
"emails.magicSession.footer": "Si no has solicitado ingresar usando este correo, puedes ignorar este mensaje.",
"emails.magicSession.thanks": "Gracias",
"emails.magicSession.signature": "Equipo de {{project}}",
"emails.magicSession.hello": "Hola",
"emails.magicSession.body": "Haz clic en este enlace para iniciar sesión:",
"emails.magicSession.footer": "Si no has solicitado iniciar sesión usando este correo, puedes ignorar este mensaje.",
"emails.magicSession.thanks": "Gracias.",
"emails.magicSession.signature": "El equipo de {{project}}",
"emails.recovery.subject": "Restablecer contraseña",
"emails.recovery.hello": "Hola {{user}}",
"emails.recovery.body": "Haz clic en este enlace para restablecer la contraseña de {{project}}.",
"emails.recovery.hello": "Hola, {{name}}",
"emails.recovery.body": "Haz clic en este enlace para restablecer la contraseña de {{project}}:",
"emails.recovery.footer": "Si no has solicitado restablecer la contraseña, puedes ignorar este mensaje.",
"emails.recovery.thanks": "Gracias",
"emails.recovery.signature": "Equipo de {{project}}",
"emails.recovery.thanks": "Gracias.",
"emails.recovery.signature": "El equipo de {{project}}",
"emails.invitation.subject": "Invitación al equipo %s en %s",
"emails.invitation.hello": "Hola",
"emails.invitation.body": "Este correo ha sido enviado a petición de {{owner}} quien quiere invitarte a formar parte del equipo {{team}} en {{project}}.",
"emails.invitation.footer": "Si no estas interesado, puedes ignorar este mensaje.",
"emails.invitation.thanks": "Gracias",
"emails.invitation.signature": "Equipo de {{project}}",
"emails.invitation.body": "Este correo ha sido enviado a petición de {{owner}} quién quiere invitarte a formar parte del equipo {{team}} en {{project}}.",
"emails.invitation.footer": "Si no estás interesado, puedes ignorar este mensaje.",
"emails.invitation.thanks": "Gracias.",
"emails.invitation.signature": "El equipo de {{project}}",
"locale.country.unknown": "Desconocido",
"countries.af": "Afganistán",
"countries.ao": "Angola",
@@ -229,4 +229,4 @@
"continents.na": "América del Norte",
"continents.oc": "Oceanía",
"continents.sa": "América del Sur"
}
}
+2 -2
View File
@@ -8,7 +8,7 @@ return [
APP_PLATFORM_CLIENT => [
'key' => APP_PLATFORM_CLIENT,
'name' => 'Client',
'description' => 'Client libraries for integrating with Appwrite to build client-based applications and websites. Read the [getting started for web](/docs/getting-started-for-web) or [getting started for Flutter](/docs/getting-started-for-flutter) tutorials to start building your first application.',
'description' => 'Client libraries for integrating with Appwrite to build client-based applications and websites. Read the [getting started for web](https://appwrite.io/docs/getting-started-for-web) or [getting started for Flutter](https://appwrite.io/docs/getting-started-for-flutter) tutorials to start building your first application.',
'enabled' => true,
'beta' => false,
'sdks' => [
@@ -224,7 +224,7 @@ return [
APP_PLATFORM_SERVER => [
'key' => APP_PLATFORM_SERVER,
'name' => 'Server',
'description' => 'Libraries for integrating with Appwrite to build server side integrations. Read the [getting started for server](/docs/getting-started-for-server) tutorial to start building your first server integration.',
'description' => 'Libraries for integrating with Appwrite to build server side integrations. Read the [getting started for server](https://appwrite.io/docs/getting-started-for-server) tutorial to start building your first server integration.',
'enabled' => true,
'beta' => false,
'sdks' => [
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+136 -148
View File
@@ -50,7 +50,7 @@ $oauthDefaultSuccess = '/auth/oauth2/success';
$oauthDefaultFailure = '/auth/oauth2/failure';
App::post('/v1/account')
->desc('Create Account')
->desc('Create account')
->groups(['api', 'account', 'auth'])
->label('event', 'users.[userId].create')
->label('scope', 'public')
@@ -76,8 +76,9 @@ App::post('/v1/account')
->inject('user')
->inject('project')
->inject('dbForProject')
->inject('events')
->action(function (string $userId, string $email, string $password, string $name, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $userId, string $email, string $password, string $name, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Event $queueForEvents) {
$email = \strtolower($email);
if ('console' === $project->getId()) {
$whitelistEmails = $project->getAttribute('authWhitelistEmails');
@@ -156,7 +157,7 @@ App::post('/v1/account')
Authorization::setRole(Role::user($user->getId())->toString());
Authorization::setRole(Role::users()->toString());
$events->setParam('userId', $user->getId());
$queueForEvents->setParam('userId', $user->getId());
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
@@ -165,7 +166,7 @@ App::post('/v1/account')
App::post('/v1/account/sessions/email')
->alias('/v1/account/sessions')
->desc('Create Email Session')
->desc('Create email session')
->groups(['api', 'account', 'auth', 'session'])
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('scope', 'public')
@@ -193,8 +194,8 @@ App::post('/v1/account/sessions/email')
->inject('project')
->inject('locale')
->inject('geodb')
->inject('events')
->action(function (string $email, string $password, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $events) {
->inject('queueForEvents')
->action(function (string $email, string $password, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents) {
$email = \strtolower($email);
$protocol = $request->getProtocol();
@@ -276,7 +277,7 @@ App::post('/v1/account/sessions/email')
->setAttribute('expire', $expire)
;
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId())
;
@@ -285,7 +286,7 @@ App::post('/v1/account/sessions/email')
});
App::get('/v1/account/sessions/oauth2/:provider')
->desc('Create OAuth2 Session')
->desc('Create OAuth2 session')
->groups(['api', 'account'])
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('scope', 'public')
@@ -351,7 +352,7 @@ App::get('/v1/account/sessions/oauth2/:provider')
});
App::get('/v1/account/sessions/oauth2/callback/:provider/:projectId')
->desc('OAuth2 Callback')
->desc('OAuth2 callback')
->groups(['account'])
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('scope', 'public')
@@ -383,7 +384,7 @@ App::get('/v1/account/sessions/oauth2/callback/:provider/:projectId')
});
App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId')
->desc('OAuth2 Callback')
->desc('OAuth2 callback')
->groups(['account'])
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('scope', 'public')
@@ -416,7 +417,7 @@ App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId')
});
App::get('/v1/account/sessions/oauth2/:provider/redirect')
->desc('OAuth2 Redirect')
->desc('OAuth2 redirect')
->groups(['api', 'account', 'session'])
->label('error', __DIR__ . '/../../views/general/error.phtml')
->label('event', 'users.[userId].sessions.[sessionId].create')
@@ -440,8 +441,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
->inject('user')
->inject('dbForProject')
->inject('geodb')
->inject('events')
->action(function (string $provider, string $code, string $state, string $error, string $error_description, Request $request, Response $response, Document $project, Document $user, Database $dbForProject, Reader $geodb, Event $events) use ($oauthDefaultSuccess) {
->inject('queueForEvents')
->action(function (string $provider, string $code, string $state, string $error, string $error_description, Request $request, Response $response, Document $project, Document $user, Database $dbForProject, Reader $geodb, Event $queueForEvents) use ($oauthDefaultSuccess) {
$protocol = $request->getProtocol();
$callback = $protocol . '://' . $request->getHostname() . '/v1/account/sessions/oauth2/callback/' . $provider . '/' . $project->getId();
@@ -758,7 +759,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
$session->setAttribute('expire', $expire);
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId())
->setPayload($response->output($session, Response::MODEL_SESSION))
@@ -872,7 +873,7 @@ App::delete('/v1/account/identities/:identityId')
});
App::post('/v1/account/sessions/magic-url')
->desc('Create Magic URL session')
->desc('Create magic URL session')
->groups(['api', 'account'])
->label('scope', 'public')
->label('auth.type', 'magic-url')
@@ -897,9 +898,9 @@ App::post('/v1/account/sessions/magic-url')
->inject('project')
->inject('dbForProject')
->inject('locale')
->inject('events')
->inject('mails')
->action(function (string $userId, string $email, string $url, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Locale $locale, Event $events, Mail $mails) {
->inject('queueForEvents')
->inject('queueForMails')
->action(function (string $userId, string $email, string $url, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails) {
if (empty(App::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
@@ -999,7 +1000,12 @@ App::post('/v1/account/sessions/magic-url')
$customTemplate = $project->getAttribute('templates', [])['email.magicSession-' . $locale->default] ?? [];
$message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl');
$message->setParam('{{body}}', $body);
$message
->setParam('{{body}}', $body)
->setParam('{{hello}}', $locale->getText("emails.magicSession.hello"))
->setParam('{{footer}}', $locale->getText("emails.magicSession.footer"))
->setParam('{{thanks}}', $locale->getText("emails.magicSession.thanks"))
->setParam('{{signature}}', $locale->getText("emails.magicSession.signature"));
$body = $message->render();
$smtp = $project->getAttribute('smtp', []);
@@ -1020,7 +1026,7 @@ App::post('/v1/account/sessions/magic-url')
$replyTo = $smtp['replyTo'];
}
$mails
$queueForMails
->setSmtpHost($smtp['host'] ?? '')
->setSmtpPort($smtp['port'] ?? '')
->setSmtpUsername($smtp['username'] ?? '')
@@ -1042,23 +1048,14 @@ App::post('/v1/account/sessions/magic-url')
$subject = $customTemplate['subject'] ?? $subject;
}
$mails
$queueForMails
->setSmtpReplyTo($replyTo)
->setSmtpSenderEmail($senderEmail)
->setSmtpSenderName($senderName);
}
$emailVariables = [
'subject' => $subject,
'hello' => $locale->getText("emails.magicSession.hello"),
'body' => $body,
'footer' => $locale->getText("emails.magicSession.footer"),
'thanks' => $locale->getText("emails.magicSession.thanks"),
'signature' => $locale->getText("emails.magicSession.signature"),
'direction' => $locale->getText('settings.direction'),
'bg-body' => '#f7f7f7',
'bg-content' => '#ffffff',
'text-content' => '#000000',
/* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */
'user' => '',
'team' => '',
@@ -1066,14 +1063,14 @@ App::post('/v1/account/sessions/magic-url')
'redirect' => $url
];
$mails
$queueForMails
->setSubject($subject)
->setBody($body)
->setVariables($emailVariables)
->setRecipient($email)
->trigger();
$events->setPayload(
$queueForEvents->setPayload(
$response->output(
$token->setAttribute('secret', $loginSecret),
Response::MODEL_TOKEN
@@ -1090,7 +1087,7 @@ App::post('/v1/account/sessions/magic-url')
});
App::put('/v1/account/sessions/magic-url')
->desc('Create Magic URL session (confirmation)')
->desc('Create magic URL session (confirmation)')
->groups(['api', 'account', 'session'])
->label('scope', 'public')
->label('event', 'users.[userId].sessions.[sessionId].create')
@@ -1117,8 +1114,8 @@ App::put('/v1/account/sessions/magic-url')
->inject('project')
->inject('locale')
->inject('geodb')
->inject('events')
->action(function (string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $events) {
->inject('queueForEvents')
->action(function (string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents) {
/** @var Utopia\Database\Document $user */
@@ -1186,7 +1183,7 @@ App::put('/v1/account/sessions/magic-url')
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed saving user to DB');
}
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId());
@@ -1212,7 +1209,7 @@ App::put('/v1/account/sessions/magic-url')
});
App::post('/v1/account/sessions/phone')
->desc('Create Phone session')
->desc('Create phone session')
->groups(['api', 'account'])
->label('scope', 'public')
->label('auth.type', 'phone')
@@ -1235,10 +1232,10 @@ App::post('/v1/account/sessions/phone')
->inject('user')
->inject('project')
->inject('dbForProject')
->inject('events')
->inject('messaging')
->inject('queueForEvents')
->inject('queueForMessaging')
->inject('locale')
->action(function (string $userId, string $phone, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Event $events, EventPhone $messaging, Locale $locale) {
->action(function (string $userId, string $phone, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Event $queueForEvents, EventPhone $queueForMessaging, Locale $locale) {
if (empty(App::getEnv('_APP_SMS_PROVIDER'))) {
throw new Exception(Exception::GENERAL_PHONE_DISABLED, 'Phone provider not configured');
@@ -1326,12 +1323,12 @@ App::post('/v1/account/sessions/phone')
$message = $message->setParam('{{token}}', $secret);
$message = $message->render();
$messaging
$queueForMessaging
->setRecipient($phone)
->setMessage($message)
->trigger();
$events->setPayload(
$queueForEvents->setPayload(
$response->output(
$token->setAttribute('secret', $secret),
Response::MODEL_TOKEN
@@ -1348,7 +1345,7 @@ App::post('/v1/account/sessions/phone')
});
App::put('/v1/account/sessions/phone')
->desc('Create Phone Session (confirmation)')
->desc('Create phone session (confirmation)')
->groups(['api', 'account', 'session'])
->label('scope', 'public')
->label('event', 'users.[userId].sessions.[sessionId].create')
@@ -1370,8 +1367,8 @@ App::put('/v1/account/sessions/phone')
->inject('project')
->inject('locale')
->inject('geodb')
->inject('events')
->action(function (string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $events) {
->inject('queueForEvents')
->action(function (string $userId, string $secret, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents) {
$userFromRequest = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId));
@@ -1435,7 +1432,7 @@ App::put('/v1/account/sessions/phone')
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed saving user to DB');
}
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId())
;
@@ -1464,7 +1461,7 @@ App::put('/v1/account/sessions/phone')
});
App::post('/v1/account/sessions/anonymous')
->desc('Create Anonymous Session')
->desc('Create anonymous session')
->groups(['api', 'account', 'auth', 'session'])
->label('event', 'users.[userId].sessions.[sessionId].create')
->label('scope', 'public')
@@ -1490,8 +1487,8 @@ App::post('/v1/account/sessions/anonymous')
->inject('project')
->inject('dbForProject')
->inject('geodb')
->inject('events')
->action(function (Request $request, Response $response, Locale $locale, Document $user, Document $project, Database $dbForProject, Reader $geodb, Event $events) {
->inject('queueForEvents')
->action(function (Request $request, Response $response, Locale $locale, Document $user, Document $project, Database $dbForProject, Reader $geodb, Event $queueForEvents) {
$protocol = $request->getProtocol();
@@ -1574,7 +1571,7 @@ App::post('/v1/account/sessions/anonymous')
$dbForProject->deleteCachedDocument('users', $user->getId());
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId())
;
@@ -1648,7 +1645,7 @@ App::post('/v1/account/jwt')
});
App::get('/v1/account')
->desc('Get Account')
->desc('Get account')
->groups(['api', 'account'])
->label('scope', 'account')
->label('usage.metric', 'users.{scope}.requests.read')
@@ -1669,7 +1666,7 @@ App::get('/v1/account')
});
App::get('/v1/account/prefs')
->desc('Get Account Preferences')
->desc('Get account preferences')
->groups(['api', 'account'])
->label('scope', 'account')
->label('usage.metric', 'users.{scope}.requests.read')
@@ -1692,7 +1689,7 @@ App::get('/v1/account/prefs')
});
App::get('/v1/account/sessions')
->desc('List Sessions')
->desc('List sessions')
->groups(['api', 'account'])
->label('scope', 'account')
->label('usage.metric', 'users.{scope}.requests.read')
@@ -1731,7 +1728,7 @@ App::get('/v1/account/sessions')
});
App::get('/v1/account/logs')
->desc('List Logs')
->desc('List logs')
->groups(['api', 'account'])
->label('scope', 'account')
->label('usage.metric', 'users.{scope}.requests.read')
@@ -1792,7 +1789,7 @@ App::get('/v1/account/logs')
});
App::get('/v1/account/sessions/:sessionId')
->desc('Get Session')
->desc('Get session')
->groups(['api', 'account'])
->label('scope', 'account')
->label('usage.metric', 'users.{scope}.requests.read')
@@ -1837,7 +1834,7 @@ App::get('/v1/account/sessions/:sessionId')
});
App::patch('/v1/account/name')
->desc('Update Name')
->desc('Update name')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.name')
->label('scope', 'account')
@@ -1858,20 +1855,20 @@ App::patch('/v1/account/name')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (string $name, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $name, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
$user->setAttribute('name', $name);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$events->setParam('userId', $user->getId());
$queueForEvents->setParam('userId', $user->getId());
$response->dynamic($user, Response::MODEL_ACCOUNT);
});
App::patch('/v1/account/password')
->desc('Update Password')
->desc('Update password')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.password')
->label('scope', 'account')
@@ -1895,8 +1892,8 @@ App::patch('/v1/account/password')
->inject('user')
->inject('project')
->inject('dbForProject')
->inject('events')
->action(function (string $password, string $oldPassword, ?\DateTime $requestTimestamp, Response $response, Document $user, Document $project, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $password, string $oldPassword, ?\DateTime $requestTimestamp, Response $response, Document $user, Document $project, Database $dbForProject, Event $queueForEvents) {
// Check old password only if its an existing user.
if (!empty($user->getAttribute('passwordUpdate')) && !Auth::passwordVerify($oldPassword, $user->getAttribute('password'), $user->getAttribute('hash'), $user->getAttribute('hashOptions'))) { // Double check user password
@@ -1932,13 +1929,13 @@ App::patch('/v1/account/password')
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$events->setParam('userId', $user->getId());
$queueForEvents->setParam('userId', $user->getId());
$response->dynamic($user, Response::MODEL_ACCOUNT);
});
App::patch('/v1/account/email')
->desc('Update Email')
->desc('Update email')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.email')
->label('scope', 'account')
@@ -1960,8 +1957,8 @@ App::patch('/v1/account/email')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (string $email, string $password, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $email, string $password, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
// passwordUpdate will be empty if the user has never set a password
$passwordUpdate = $user->getAttribute('passwordUpdate');
@@ -2002,13 +1999,13 @@ App::patch('/v1/account/email')
throw new Exception(Exception::USER_EMAIL_ALREADY_EXISTS);
}
$events->setParam('userId', $user->getId());
$queueForEvents->setParam('userId', $user->getId());
$response->dynamic($user, Response::MODEL_ACCOUNT);
});
App::patch('/v1/account/phone')
->desc('Update Phone')
->desc('Update phone')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.phone')
->label('scope', 'account')
@@ -2030,8 +2027,8 @@ App::patch('/v1/account/phone')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (string $phone, string $password, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $phone, string $password, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
// passwordUpdate will be empty if the user has never set a password
$passwordUpdate = $user->getAttribute('passwordUpdate');
@@ -2061,13 +2058,13 @@ App::patch('/v1/account/phone')
throw new Exception(Exception::USER_PHONE_ALREADY_EXISTS);
}
$events->setParam('userId', $user->getId());
$queueForEvents->setParam('userId', $user->getId());
$response->dynamic($user, Response::MODEL_ACCOUNT);
});
App::patch('/v1/account/prefs')
->desc('Update Preferences')
->desc('Update preferences')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.prefs')
->label('scope', 'account')
@@ -2088,20 +2085,20 @@ App::patch('/v1/account/prefs')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (array $prefs, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (array $prefs, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
$user->setAttribute('prefs', $prefs);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$events->setParam('userId', $user->getId());
$queueForEvents->setParam('userId', $user->getId());
$response->dynamic($user, Response::MODEL_ACCOUNT);
});
App::patch('/v1/account/status')
->desc('Update Status')
->desc('Update status')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.status')
->label('scope', 'account')
@@ -2120,14 +2117,14 @@ App::patch('/v1/account/status')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (?\DateTime $requestTimestamp, Request $request, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (?\DateTime $requestTimestamp, Request $request, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
$user->setAttribute('status', false);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$events
$queueForEvents
->setParam('userId', $user->getId())
->setPayload($response->output($user, Response::MODEL_ACCOUNT));
@@ -2145,7 +2142,7 @@ App::patch('/v1/account/status')
});
App::delete('/v1/account/sessions/:sessionId')
->desc('Delete Session')
->desc('Delete session')
->groups(['api', 'account'])
->label('scope', 'account')
->label('event', 'users.[userId].sessions.[sessionId].delete')
@@ -2166,9 +2163,9 @@ App::delete('/v1/account/sessions/:sessionId')
->inject('user')
->inject('dbForProject')
->inject('locale')
->inject('events')
->inject('queueForEvents')
->inject('project')
->action(function (?string $sessionId, ?\DateTime $requestTimestamp, Request $request, Response $response, Document $user, Database $dbForProject, Locale $locale, Event $events, Document $project) {
->action(function (?string $sessionId, ?\DateTime $requestTimestamp, Request $request, Response $response, Document $user, Database $dbForProject, Locale $locale, Event $queueForEvents, Document $project) {
$protocol = $request->getProtocol();
$authDuration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG;
@@ -2208,7 +2205,7 @@ App::delete('/v1/account/sessions/:sessionId')
$dbForProject->deleteCachedDocument('users', $user->getId());
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId())
->setPayload($response->output($session, Response::MODEL_SESSION))
@@ -2221,7 +2218,7 @@ App::delete('/v1/account/sessions/:sessionId')
});
App::patch('/v1/account/sessions/:sessionId')
->desc('Update OAuth Session (Refresh Tokens)')
->desc('Update OAuth session (refresh tokens)')
->groups(['api', 'account'])
->label('scope', 'account')
->label('event', 'users.[userId].sessions.[sessionId].update')
@@ -2244,8 +2241,8 @@ App::patch('/v1/account/sessions/:sessionId')
->inject('dbForProject')
->inject('project')
->inject('locale')
->inject('events')
->action(function (?string $sessionId, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Event $events) {
->inject('queueForEvents')
->action(function (?string $sessionId, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Event $queueForEvents) {
$authDuration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$sessionId = ($sessionId === 'current')
? Auth::sessionVerify($user->getAttribute('sessions'), Auth::$secret, $authDuration)
@@ -2293,7 +2290,7 @@ App::patch('/v1/account/sessions/:sessionId')
$session->setAttribute('expire', DateTime::formatTz(DateTime::addSeconds(new \DateTime($session->getCreatedAt()), $authDuration)));
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId())
->setPayload($response->output($session, Response::MODEL_SESSION))
@@ -2307,7 +2304,7 @@ App::patch('/v1/account/sessions/:sessionId')
});
App::delete('/v1/account/sessions')
->desc('Delete Sessions')
->desc('Delete sessions')
->groups(['api', 'account'])
->label('scope', 'account')
->label('event', 'users.[userId].sessions.[sessionId].delete')
@@ -2326,8 +2323,8 @@ App::delete('/v1/account/sessions')
->inject('user')
->inject('dbForProject')
->inject('locale')
->inject('events')
->action(function (Request $request, Response $response, Document $user, Database $dbForProject, Locale $locale, Event $events) {
->inject('queueForEvents')
->action(function (Request $request, Response $response, Document $user, Database $dbForProject, Locale $locale, Event $queueForEvents) {
$protocol = $request->getProtocol();
$sessions = $user->getAttribute('sessions', []);
@@ -2354,13 +2351,13 @@ App::delete('/v1/account/sessions')
->addCookie(Auth::$cookieName, '', \time() - 3600, '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite'));
// Use current session for events.
$events->setPayload($response->output($session, Response::MODEL_SESSION));
$queueForEvents->setPayload($response->output($session, Response::MODEL_SESSION));
}
}
$dbForProject->deleteCachedDocument('users', $user->getId());
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('sessionId', $session->getId());
@@ -2368,7 +2365,7 @@ App::delete('/v1/account/sessions')
});
App::post('/v1/account/recovery')
->desc('Create Password Recovery')
->desc('Create password recovery')
->groups(['api', 'account'])
->label('scope', 'public')
->label('event', 'users.[userId].recovery.[tokenId].create')
@@ -2393,9 +2390,9 @@ App::post('/v1/account/recovery')
->inject('dbForProject')
->inject('project')
->inject('locale')
->inject('mails')
->inject('events')
->action(function (string $email, string $url, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Mail $mails, Event $events) {
->inject('queueForMails')
->inject('queueForEvents')
->action(function (string $email, string $url, Request $request, Response $response, Document $user, Database $dbForProject, Document $project, Locale $locale, Mail $queueForMails, Event $queueForEvents) {
if (empty(App::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
@@ -2456,7 +2453,12 @@ App::post('/v1/account/recovery')
$customTemplate = $project->getAttribute('templates', [])['email.recovery-' . $locale->default] ?? [];
$message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl');
$message->setParam('{{body}}', $body);
$message
->setParam('{{body}}', $body)
->setParam('{{hello}}', $locale->getText("emails.recovery.hello"))
->setParam('{{footer}}', $locale->getText("emails.recovery.footer"))
->setParam('{{thanks}}', $locale->getText("emails.recovery.thanks"))
->setParam('{{signature}}', $locale->getText("emails.recovery.signature"));
$body = $message->render();
$smtp = $project->getAttribute('smtp', []);
@@ -2477,7 +2479,7 @@ App::post('/v1/account/recovery')
$replyTo = $smtp['replyTo'];
}
$mails
$queueForMails
->setSmtpHost($smtp['host'] ?? '')
->setSmtpPort($smtp['port'] ?? '')
->setSmtpUsername($smtp['username'] ?? '')
@@ -2499,23 +2501,14 @@ App::post('/v1/account/recovery')
$subject = $customTemplate['subject'] ?? $subject;
}
$mails
$queueForMails
->setSmtpReplyTo($replyTo)
->setSmtpSenderEmail($senderEmail)
->setSmtpSenderName($senderName);
}
$emailVariables = [
'subject' => $subject,
'hello' => $locale->getText("emails.recovery.hello"),
'body' => $body,
'footer' => $locale->getText("emails.recovery.footer"),
'thanks' => $locale->getText("emails.recovery.thanks"),
'signature' => $locale->getText("emails.recovery.signature"),
'direction' => $locale->getText('settings.direction'),
'bg-body' => '#f7f7f7',
'bg-content' => '#ffffff',
'text-content' => '#000000',
/* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */
'user' => $profile->getAttribute('name'),
'team' => '',
@@ -2523,8 +2516,7 @@ App::post('/v1/account/recovery')
'redirect' => $url
];
$mails
$queueForMails
->setRecipient($profile->getAttribute('email', ''))
->setName($profile->getAttribute('name'))
->setBody($body)
@@ -2532,7 +2524,7 @@ App::post('/v1/account/recovery')
->setSubject($subject)
->trigger();
$events
$queueForEvents
->setParam('userId', $profile->getId())
->setParam('tokenId', $recovery->getId())
->setUser($profile)
@@ -2551,7 +2543,7 @@ App::post('/v1/account/recovery')
});
App::put('/v1/account/recovery')
->desc('Create Password Recovery (confirmation)')
->desc('Create password recovery (confirmation)')
->groups(['api', 'account'])
->label('scope', 'public')
->label('event', 'users.[userId].recovery.[tokenId].update')
@@ -2576,8 +2568,8 @@ App::put('/v1/account/recovery')
->inject('user')
->inject('dbForProject')
->inject('project')
->inject('events')
->action(function (string $userId, string $secret, string $password, string $passwordAgain, Response $response, Document $user, Database $dbForProject, Document $project, Event $events) {
->inject('queueForEvents')
->action(function (string $userId, string $secret, string $password, string $passwordAgain, Response $response, Document $user, Database $dbForProject, Document $project, Event $queueForEvents) {
if ($password !== $passwordAgain) {
throw new Exception(Exception::USER_PASSWORD_MISMATCH);
}
@@ -2630,7 +2622,7 @@ App::put('/v1/account/recovery')
$dbForProject->deleteDocument('tokens', $recovery);
$dbForProject->deleteCachedDocument('users', $profile->getId());
$events
$queueForEvents
->setParam('userId', $profile->getId())
->setParam('tokenId', $recoveryDocument->getId())
;
@@ -2639,7 +2631,7 @@ App::put('/v1/account/recovery')
});
App::post('/v1/account/verification')
->desc('Create Email Verification')
->desc('Create email verification')
->groups(['api', 'account'])
->label('scope', 'account')
->label('event', 'users.[userId].verification.[tokenId].create')
@@ -2662,9 +2654,9 @@ App::post('/v1/account/verification')
->inject('user')
->inject('dbForProject')
->inject('locale')
->inject('events')
->inject('mails')
->action(function (string $url, Request $request, Response $response, Document $project, Document $user, Database $dbForProject, Locale $locale, Event $events, Mail $mails) {
->inject('queueForEvents')
->inject('queueForMails')
->action(function (string $url, Request $request, Response $response, Document $project, Document $user, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails) {
if (empty(App::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
@@ -2708,7 +2700,12 @@ App::post('/v1/account/verification')
$customTemplate = $project->getAttribute('templates', [])['email.verification-' . $locale->default] ?? [];
$message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl');
$message->setParam('{{body}}', $body);
$message
->setParam('{{body}}', $body)
->setParam('{{hello}}', $locale->getText("emails.verification.hello"))
->setParam('{{footer}}', $locale->getText("emails.verification.footer"))
->setParam('{{thanks}}', $locale->getText("emails.verification.thanks"))
->setParam('{{signature}}', $locale->getText("emails.verification.signature"));
$body = $message->render();
$smtp = $project->getAttribute('smtp', []);
@@ -2729,7 +2726,7 @@ App::post('/v1/account/verification')
$replyTo = $smtp['replyTo'];
}
$mails
$queueForMails
->setSmtpHost($smtp['host'] ?? '')
->setSmtpPort($smtp['port'] ?? '')
->setSmtpUsername($smtp['username'] ?? '')
@@ -2751,23 +2748,14 @@ App::post('/v1/account/verification')
$subject = $customTemplate['subject'] ?? $subject;
}
$mails
$queueForMails
->setSmtpReplyTo($replyTo)
->setSmtpSenderEmail($senderEmail)
->setSmtpSenderName($senderName);
}
$emailVariables = [
'subject' => $subject,
'hello' => $locale->getText("emails.verification.hello"),
'body' => $body,
'footer' => $locale->getText("emails.verification.footer"),
'thanks' => $locale->getText("emails.verification.thanks"),
'signature' => $locale->getText("emails.verification.signature"),
'direction' => $locale->getText('settings.direction'),
'bg-body' => '#f7f7f7',
'bg-content' => '#ffffff',
'text-content' => '#000000',
/* {{user}} ,{{team}}, {{project}} and {{redirect}} are required in the templates */
'user' => $user->getAttribute('name'),
'team' => '',
@@ -2775,7 +2763,7 @@ App::post('/v1/account/verification')
'redirect' => $url
];
$mails
$queueForMails
->setSubject($subject)
->setBody($body)
->setVariables($emailVariables)
@@ -2783,7 +2771,7 @@ App::post('/v1/account/verification')
->setName($user->getAttribute('name') ?? '')
->trigger();
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('tokenId', $verification->getId())
->setPayload($response->output(
@@ -2800,7 +2788,7 @@ App::post('/v1/account/verification')
});
App::put('/v1/account/verification')
->desc('Create Email Verification (confirmation)')
->desc('Create email verification (confirmation)')
->groups(['api', 'account'])
->label('scope', 'public')
->label('event', 'users.[userId].verification.[tokenId].update')
@@ -2821,8 +2809,8 @@ App::put('/v1/account/verification')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (string $userId, string $secret, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $userId, string $secret, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
$profile = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId));
@@ -2852,7 +2840,7 @@ App::put('/v1/account/verification')
$dbForProject->deleteDocument('tokens', $verification);
$dbForProject->deleteCachedDocument('users', $profile->getId());
$events
$queueForEvents
->setParam('userId', $userId)
->setParam('tokenId', $verificationDocument->getId())
;
@@ -2861,7 +2849,7 @@ App::put('/v1/account/verification')
});
App::post('/v1/account/verification/phone')
->desc('Create Phone Verification')
->desc('Create phone verification')
->groups(['api', 'account'])
->label('scope', 'account')
->label('event', 'users.[userId].verification.[tokenId].create')
@@ -2881,11 +2869,11 @@ App::post('/v1/account/verification/phone')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->inject('messaging')
->inject('queueForEvents')
->inject('queueForMessaging')
->inject('project')
->inject('locale')
->action(function (Request $request, Response $response, Document $user, Database $dbForProject, Event $events, EventPhone $messaging, Document $project, Locale $locale) {
->action(function (Request $request, Response $response, Document $user, Database $dbForProject, Event $queueForEvents, EventPhone $queueForMessaging, Document $project, Locale $locale) {
if (empty(App::getEnv('_APP_SMS_PROVIDER'))) {
throw new Exception(Exception::GENERAL_PHONE_DISABLED);
@@ -2933,13 +2921,13 @@ App::post('/v1/account/verification/phone')
$message = $message->setParam('{{token}}', $secret);
$message = $message->render();
$messaging
$queueForMessaging
->setRecipient($user->getAttribute('phone'))
->setMessage($message)
->trigger()
;
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('tokenId', $verification->getId())
->setPayload($response->output(
@@ -2957,7 +2945,7 @@ App::post('/v1/account/verification/phone')
});
App::put('/v1/account/verification/phone')
->desc('Create Phone Verification (confirmation)')
->desc('Create phone verification (confirmation)')
->groups(['api', 'account'])
->label('scope', 'public')
->label('event', 'users.[userId].verification.[tokenId].update')
@@ -2978,8 +2966,8 @@ App::put('/v1/account/verification/phone')
->inject('response')
->inject('user')
->inject('dbForProject')
->inject('events')
->action(function (string $userId, string $secret, Response $response, Document $user, Database $dbForProject, Event $events) {
->inject('queueForEvents')
->action(function (string $userId, string $secret, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
$profile = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId));
@@ -3007,7 +2995,7 @@ App::put('/v1/account/verification/phone')
$dbForProject->deleteDocument('tokens', $verification);
$dbForProject->deleteCachedDocument('users', $profile->getId());
$events
$queueForEvents
->setParam('userId', $user->getId())
->setParam('tokenId', $verificationDocument->getId())
;
+22 -21
View File
@@ -191,7 +191,7 @@ $getUserGitHub = function (string $userId, Document $project, Database $dbForPro
};
App::get('/v1/avatars/credit-cards/:code')
->desc('Get Credit Card Icon')
->desc('Get credit card icon')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('cache', true)
@@ -211,7 +211,7 @@ App::get('/v1/avatars/credit-cards/:code')
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('credit-cards', $code, $width, $height, $quality, $response));
App::get('/v1/avatars/browsers/:code')
->desc('Get Browser Icon')
->desc('Get browser icon')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('cache', true)
@@ -231,7 +231,7 @@ App::get('/v1/avatars/browsers/:code')
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('browsers', $code, $width, $height, $quality, $response));
App::get('/v1/avatars/flags/:code')
->desc('Get Country Flag')
->desc('Get country flag')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('cache', true)
@@ -251,7 +251,7 @@ App::get('/v1/avatars/flags/:code')
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('flags', $code, $width, $height, $quality, $response));
App::get('/v1/avatars/image')
->desc('Get Image from URL')
->desc('Get image from URL')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('cache', true)
@@ -307,7 +307,7 @@ App::get('/v1/avatars/image')
});
App::get('/v1/avatars/favicon')
->desc('Get Favicon')
->desc('Get favicon')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('cache', true)
@@ -449,7 +449,7 @@ App::get('/v1/avatars/favicon')
});
App::get('/v1/avatars/qr')
->desc('Get QR Code')
->desc('Get QR code')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT])
@@ -489,7 +489,7 @@ App::get('/v1/avatars/qr')
});
App::get('/v1/avatars/initials')
->desc('Get User Initials')
->desc('Get user initials')
->groups(['api', 'avatars'])
->label('scope', 'avatars.read')
->label('cache.resource', 'avatar/initials')
@@ -509,12 +509,11 @@ App::get('/v1/avatars/initials')
->action(function (string $name, int $width, int $height, string $background, Response $response, Document $user) {
$themes = [
['background' => '#FFA1CE'], // Default (Pink)
['background' => '#FDC584'], // Orange
['background' => '#94DBD1'], // Green
['background' => '#A1C4FF'], // Blue
['background' => '#FFA1CE'], // Pink
['background' => '#CBB1FC'] // Purple
['background' => '#FD366E'], // Default (Pink)
['background' => '#FE9567'], // Orange
['background' => '#7C67FE'], // Purple
['background' => '#68A3FE'], // Blue
['background' => '#85DBD8'], // Mint
];
$name = (!empty($name)) ? $name : $user->getAttribute('name', $user->getAttribute('email', ''));
@@ -526,11 +525,13 @@ App::get('/v1/avatars/initials')
$code = 0;
foreach ($words as $key => $w) {
$initials .= $w[0] ?? '';
$code += (isset($w[0])) ? \ord($w[0]) : 0;
if (ctype_alnum($w[0] ?? '')) {
$initials .= $w[0];
$code += ord($w[0]);
if ($key == 1) {
break;
if ($key == 1) {
break;
}
}
}
@@ -548,8 +549,8 @@ App::get('/v1/avatars/initials')
$punch->newImage($width, $height, 'transparent');
$draw->setFont(__DIR__ . "/../../assets/fonts/poppins-v9-latin-500.ttf");
$image->setFont(__DIR__ . "/../../assets/fonts/poppins-v9-latin-500.ttf");
$draw->setFont(__DIR__ . "/../../assets/fonts/inter-v8-latin-regular.woff2");
$image->setFont(__DIR__ . "/../../assets/fonts/inter-v8-latin-regular.woff2");
$draw->setFillColor(new ImagickPixel('black'));
$draw->setFontSize($fontSize);
@@ -724,7 +725,7 @@ App::get('/v1/cards/cloud')
$text = new \ImagickDraw();
$text->setTextAlignment(Imagick::ALIGN_CENTER);
$text->setFont(__DIR__ . '/../../../public/fonts/Poppins-Bold.ttf');
$text->setFont(__DIR__ . '/../../../public/fonts/Inter-Bold.ttf');
$text->setFillColor(new \ImagickPixel('#FFFFFF'));
if (\strlen($name) > 32) {
@@ -1108,7 +1109,7 @@ App::get('/v1/cards/cloud-og')
$textName = new \ImagickDraw();
$textName->setTextAlignment(Imagick::ALIGN_CENTER);
$textName->setFont(__DIR__ . '/../../../public/fonts/Poppins-Bold.ttf');
$textName->setFont(__DIR__ . '/../../../public/fonts/Inter-Bold.ttf');
$textName->setFillColor(new \ImagickPixel('#FFFFFF'));
if (\strlen($name) > 32) {
+1 -1
View File
@@ -17,7 +17,7 @@ App::init()
App::get('/v1/console/variables')
->desc('Get Variables')
->desc('Get variables')
->groups(['api', 'projects'])
->label('scope', 'projects.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
File diff suppressed because it is too large Load Diff

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