Compare commits

..
Author SHA1 Message Date
Khushboo Verma 8a4c5bec27 Revert /deployments from function logs 2025-03-13 18:58:56 +05:30
Khushboo Verma 97acbd42ba Fix github comment 2025-03-13 17:58:05 +05:30
Matej Bačo 79e066a4d7 Post-merge fixes 2025-03-13 12:04:20 +01:00
Matej Bačo 725dff7f0f Merge branch '1.7.x' into feat-sites 2025-03-13 11:41:28 +01:00
Matej Bačo 358e096301 Merge branch '1.6.x' into 1.7.x 2025-03-13 11:34:14 +01:00
Matej Bačo 74c050ffb6 Improve tests 2025-03-13 11:19:55 +01:00
Matej Bačo 8376b176cb Support commit type 2025-03-13 11:17:10 +01:00
Matej Bačo 69ed3bb776 New deployment status while queued 2025-03-13 10:53:25 +01:00
Matej Bačo 262b2e6cff Fix error messag coloring 2025-03-13 10:53:15 +01:00
Matej Bačo acb9548e85 Fix preview deicison-maker; speed-up tests 2025-03-13 10:33:28 +01:00
Matej Bačo ee1ee7ecfe Fix ping 5xx error 2025-03-13 10:20:45 +01:00
Matej BačoandGitHub b14d76af0d Merge pull request #9500 from appwrite/chore-improve-readability
Improve params readability
2025-03-13 09:56:11 +01:00
Khushboo Verma f2ba319e6e Improve params readability 2025-03-13 12:16:17 +05:30
Steven NguyenandGitHub 6e0c8724ce Merge pull request #9498 from appwrite/chore-regenerate-examples
Regenerate examples
2025-03-12 22:05:52 -07:00
Steven NguyenandGitHub 8f6d45b207 Merge pull request #9497 from appwrite/chore-regenerate-specs
Regenerate specs
2025-03-12 21:49:16 -07:00
Chirag AggarwalandGitHub 1d53cb41de Merge branch '1.6.x' into chore-regenerate-examples 2025-03-13 10:07:50 +05:30
Chirag AggarwalandGitHub dc073b8298 Merge branch '1.6.x' into chore-regenerate-specs 2025-03-13 10:07:13 +05:30
Steven NguyenandGitHub 8c3aebf735 Merge pull request #9499 from appwrite/feat-1.6.2-release-prep
Prepare 1.6.2 release
2025-03-12 21:26:09 -07:00
Jake BarnbyandGitHub b0d6ffa582 Merge pull request #9487 from appwrite/feat-bulk-audit-delete
Feat bulk audit delete
2025-03-13 12:53:57 +13:00
Steven Nguyen 556f7338c1 Bump appwrite version to 1.6.2 2025-03-12 15:52:29 -07:00
Steven Nguyen 301471354e chore: regenerated 1.6.x examples
To ensure we didn't have anything extra, I deleted the 1.6.x folder and
then regenerated the examples via the sdk command.
2025-03-12 15:45:40 -07:00
Steven Nguyen 5bce1e17cb chore: regenerate latest and 1.6.x specs 2025-03-12 15:34:38 -07:00
Damodar LohaniandGitHub 4b1e4008a9 Merge pull request #9494 from appwrite/fix-delete-usage-stats
chore: update initializing dbForLogs
2025-03-12 18:24:15 +05:45
Matej Bačo f1877476d0 Upgrade console 2025-03-12 13:36:16 +01:00
Chirag Aggarwal 46693faa67 chore: prevent console project to queue for delete stats 2025-03-12 12:35:56 +00:00
Matej BačoandGitHub 75b3e78098 Merge pull request #9492 from appwrite/chore-add-invalid-ssr-site-test
Throw build error for adapter mismatch
2025-03-12 13:10:27 +01:00
Matej Bačo 82e16e6d9e Merge branch 'feat-sites' of github.com:appwrite/appwrite into feat-sites 2025-03-12 13:07:37 +01:00
Matej Bačo 63710e8ff8 Fix response filter version 2025-03-12 13:07:15 +01:00
Chirag Aggarwal ae00a69592 chore: update initializing dbForLogs 2025-03-12 11:58:06 +00:00
Khushboo Verma 794329be82 Updated check 2025-03-12 17:25:39 +05:30
Khushboo Verma 5549cd8900 Merge branch 'feat-sites' into chore-add-invalid-ssr-site-test 2025-03-12 17:16:03 +05:30
Matej BačoandGitHub a840d9de20 Merge pull request #9490 from appwrite/chore-avoid-repetition-in-workers
Avoid code repetition in workers and tasks
2025-03-12 12:40:29 +01:00
Matej Bačo 1a90c8aab5 Add Vite framework 2025-03-12 12:39:33 +01:00
Matej Bačo 7f2fdf623c Update specs 2025-03-12 12:27:15 +01:00
Khushboo Verma 39699d16ba Simplify callback syntax in tasks 2025-03-12 16:55:48 +05:30
Matej BačoandGitHub 8f391db39a Merge pull request #9484 from appwrite/chore-attribute-conistency
Chore: Attribute name consistency
2025-03-12 12:23:56 +01:00
Khushboo Verma 2f9802afa2 Use empty check 2025-03-12 16:50:20 +05:30
Khushboo Verma 3af1910cf9 Throw build error for adapter mismatch 2025-03-12 16:43:46 +05:30
Matej Bačo 796a845bcf Setup request & response filters 2025-03-12 12:10:10 +01:00
Matej BačoandGitHub 56736a79e2 Merge pull request #9485 from appwrite/feat-opr-v5
Feat: OPR v5
2025-03-12 11:44:07 +01:00
Damodar LohaniandGitHub 7f76bfed11 Merge pull request #9491 from appwrite/feat-add-timings-to-stats-resources
Feat: calculate and log time taken for each project
2025-03-12 16:28:11 +05:45
Matej Bačo 536319b440 PR review changes 2025-03-12 11:32:43 +01:00
Damodar Lohani 81159e82d5 show time in seconds 2025-03-12 10:29:07 +00:00
Damodar Lohani 5c25b58351 Fix date format 2025-03-12 10:19:55 +00:00
Matej Bačo ea35b6226d Fix flutter screenshots 2025-03-12 11:16:55 +01:00
Damodar Lohani d77940d22f Feat: calculate and log time taken for each project 2025-03-12 10:00:07 +00:00
Khushboo Verma 42cd1df77d Remove duplication from workers 2025-03-12 15:24:52 +05:30
Jake Barnby 2052fb975b Use bulk deletes for audit cleanup 2025-03-12 16:53:08 +13:00
Matej Bačo 994e2faa42 OPR v5 + Flutter starter 2025-03-11 18:19:25 +01:00
Matej Bačo ba26dd6df5 Apply consistency of attributes 2025-03-11 16:26:49 +01:00
Matej BačoandGitHub 0170b4c9e8 Merge pull request #9483 from appwrite/chore-add-template-tests-to-sites
Add get and list template tests for sites
2025-03-11 14:56:24 +01:00
Matej Bačo ab7041d653 Merge branch 'feat-sites' into chore-add-template-tests-to-sites 2025-03-11 14:17:40 +01:00
Matej Bačo 1a56be197c Fix failing tests 2025-03-11 14:17:23 +01:00
Matej Bačo b79b320414 Tempaltes: Fix react native, add Angular 2025-03-11 14:16:27 +01:00
Khushboo Verma 1b04ae6d96 Add get and list template tests for sites 2025-03-11 17:21:28 +05:30
Matej Bačo 95e96b3bfb Fix missing deployment domains 2025-03-11 11:53:26 +01:00
Matej Bačo 18e4be2eab Add JS template 2025-03-11 11:49:31 +01:00
Matej Bačo 7f05a74b31 Increase rate limit for 0.5s debounce in UI 2025-03-11 10:27:08 +01:00
Matej Bačo 733c5ad97d Add enforced minimal specs 2025-03-11 10:24:18 +01:00
Matej Bačo 71b56fc504 Remove log/execution search 2025-03-11 10:22:28 +01:00
Matej Bačo 62eb159e6a Merge branch 'feat-sites' of github.com:appwrite/appwrite into feat-sites 2025-03-11 10:08:47 +01:00
Christy JacobandGitHub d4dd7fb757 Merge pull request #9462 from appwrite/pla-2550
chore: added logsdb for deletes worker
2025-03-11 14:30:40 +05:30
Matej Bačo f61db29498 Rename config to follow folder pattern 2025-03-11 09:50:02 +01:00
Christy JacobandGitHub 1971126e7b Merge pull request #9481 from appwrite/audits-timestamp-update
Update audit timestamp origin
2025-03-11 14:16:53 +05:30
Matej BačoandGitHub d8418a222c Merge pull request #9433 from appwrite/chore-truncate-git-commit-message
Truncate commit message to 252 characters
2025-03-11 09:42:21 +01:00
shimon 141f0fc376 linter 2025-03-11 10:27:23 +02:00
shimon b387823d63 Update audit timestamp origin 2025-03-11 09:17:28 +02:00
Christy JacobandGitHub acf86e47e2 Merge pull request #9479 from appwrite/pla-2567
chore: queue console project for maintenance delete
2025-03-10 22:40:26 +05:30
Matej Bačo 63c7f4c8bc Fix remix detection false postive 2025-03-10 15:33:11 +01:00
Matej Bačo b11ad4b1c9 Fix a bug 2025-03-10 15:16:47 +01:00
Matej Bačo 93510d170e Quality fixes 2025-03-10 14:53:44 +01:00
Matej Bačo be3d18ab41 Fix test 2025-03-10 12:56:20 +01:00
Matej Bačo efc5b9e353 Add frameworks 2025-03-10 12:32:12 +01:00
Chirag Aggarwal 61377ceb6e chore: shift initialization of console project to config 2025-03-10 10:48:44 +00:00
Chirag Aggarwal 6a6d99a9d0 chore: queue console project for maintenance delete 2025-03-10 08:54:20 +00:00
Jake BarnbyandGitHub 078f953e32 Merge pull request #9467 from appwrite/fix-logging-config
Fix logging config
2025-03-10 14:10:41 +13:00
Matej Bačo d86cf7b437 Fix 5xx error on authroization 2025-03-09 18:51:49 +01:00
Matej Bačo aabee0ac37 Fix order of site commands 2025-03-09 16:15:08 +01:00
Matej Bačo 4e1168654d Fix tests 2025-03-09 15:42:17 +01:00
Matej Bačo 254018071a Fix tests; upgrade console 2025-03-09 15:33:06 +01:00
Matej Bačo e904ab6232 Fix path issue 2025-03-09 15:07:25 +01:00
Matej Bačo fed6cefa81 Fix cors issues 2025-03-09 14:50:45 +01:00
Matej Bačo 640f09c49b Fix specs 2025-03-09 13:57:19 +01:00
Matej Bačo 06bb001d0b Improve enums 2025-03-09 00:35:55 +01:00
Matej Bačo 3730ff4895 Fix SDK generation 2025-03-09 00:19:54 +01:00
Matej Bačo 05771c46d6 Update specs 2025-03-09 00:02:39 +01:00
Matej BačoandGitHub 4ff0b6283a Merge pull request #9474 from appwrite/fix-sites-tests
Fix: site tests
2025-03-08 23:57:59 +01:00
Matej Bačo 852a16d01b Remove leftovers 2025-03-08 23:34:37 +01:00
Matej Bačo 084b6c799a Revert "Simplify tests further"
This reverts commit 7e460f6155.
2025-03-08 23:33:37 +01:00
Matej Bačo eddeac6e4f Revert temp changes 2025-03-08 23:33:33 +01:00
Matej Bačo 874f60dce6 Upgrade detection lib 2025-03-08 23:26:25 +01:00
Matej Bačo d21814c51f Improve logs 2025-03-08 23:04:32 +01:00
Matej Bačo 65bcf7898e Improve CI/CD logs 2025-03-08 22:56:16 +01:00
Matej Bačo 7e460f6155 Simplify tests further 2025-03-08 22:43:35 +01:00
Matej Bačo 1a271ff272 Temporarly simplify CI/CD 2025-03-08 22:26:04 +01:00
Matej Bačo 5963631c70 Fix site tests 2025-03-08 22:25:52 +01:00
Matej BačoandGitHub 0fa5460a7e Merge pull request #9461 from appwrite/chore-rules-rehaul
Chore: 2nd rules rehaul
2025-03-08 21:52:47 +01:00
Matej Bačo 12e3d70032 Post-merge fixes 2025-03-08 21:33:43 +01:00
Matej Bačo 5f766f6a13 Merge branch 'feat-sites' into chore-rules-rehaul 2025-03-08 21:33:13 +01:00
Matej BačoandGitHub 7d27ceef43 Merge pull request #9315 from appwrite/feat-add-detection-logic
Integrate detection library with Appwrite
2025-03-08 21:30:19 +01:00
Matej BačoandGitHub 9c3cfc4f83 Merge pull request #9357 from appwrite/feat-authroized-previews
Feat: Authorized previews
2025-03-08 21:04:25 +01:00
Matej BačoandGitHub b4d366eea1 Merge pull request #9457 from appwrite/chore-remove-builds-collection
Chore Remove builds collection
2025-03-08 20:45:10 +01:00
Matej Bačo 8a4954d4e8 PR review changes 2025-03-08 20:44:54 +01:00
Matej Bačo 1943e00e40 Fix tests 2025-03-08 19:58:54 +01:00
Matej Bačo f75acfa503 Remove deploymentUpdatePolicy, add trigger 2025-03-08 19:19:05 +01:00
Matej Bačo b69c40345f Improve docs 2025-03-08 18:45:38 +01:00
Matej Bačo 83dd6a9897 FIx tests 2025-03-08 18:39:13 +01:00
Matej Bačo 75f543c6b0 Upgrade lib version 2025-03-08 18:01:50 +01:00
Matej Bačo 232f99c6c9 Finalize PR, review changes, fix tests 2025-03-08 16:50:39 +01:00
Matej Bačo faa1b0a59b Merge branch 'feat-sites' into feat-add-detection-logic 2025-03-08 14:58:49 +01:00
Matej Bačo fe210e0cf0 Merge branch 'feat-sites' into feat-authroized-previews 2025-03-08 13:04:00 +01:00
Matej Bačo f85bf337b7 Migrate authorize endpoint to http lib 2025-03-08 13:03:23 +01:00
Matej Bačo 06020e2b62 Add preview auth tests, finish todos, improve quality 2025-03-08 12:57:55 +01:00
Matej BačoandGitHub 8ff4d60dbb Merge pull request #9469 from appwrite/feat-site-specifications
Feat: Merge specs
2025-03-08 10:58:49 +01:00
Matej Bačo 43cd7ac8b3 Linter fix 2025-03-07 23:45:19 +01:00
Matej Bačo 393c4012d9 Merge branch 'feat-sites' into feat-authroized-previews 2025-03-07 23:44:52 +01:00
Matej Bačo c6a862a0a3 Specifications test, fix failures 2025-03-07 23:17:15 +01:00
Matej Bačo 1d983a949e Merge site & function specs 2025-03-07 22:36:13 +01:00
Steven Nguyen 59a8172e96 fix: prevent "Failed to initialize logging provider" errors
If the _APP_EXPERIMENT_LOGGING_CONFIG env var isn't set, every 4XX error
outputs this warning:

Failed to initialize logging provider: Unable to parse DSN: scheme is
required

To reduce this unnecessary clutter when _APP_EXPERIMENT_LOGGING_CONFIG
isn't set, this PR adds a check to only attempt to initialize the
logging provider if the env var is set.
2025-03-07 12:59:11 -08:00
Steven Nguyen 0fbd2c6425 fix: prevent warning if no logging config is set
If no logging config is set, there's a warning saying:

> Using deprecated logging configuration.

However, if they didn't set any config, it's not deprecated.
2025-03-07 12:54:53 -08:00
Matej Bačo 5e30fc5350 Fix graphQL test 2025-03-07 21:20:37 +01:00
Matej Bačo a5457da91c Linter fix 2025-03-07 21:12:13 +01:00
Matej Bačo a37a6d9d7c Merge branch 'feat-sites' into chore-remove-builds-collection 2025-03-07 21:05:15 +01:00
Matej Bačo c1ee2f2b41 Failing test fixes 2025-03-07 21:04:24 +01:00
Matej Bačo 6a584c83c1 Attribute renaming 2025-03-07 20:14:11 +01:00
Matej Bačo 777fb3fcdd Update proxy rule tests 2025-03-07 18:00:20 +01:00
Matej BačoandGitHub 6ea20659e6 Merge branch 'feat-sites' into chore-rules-rehaul 2025-03-07 17:34:37 +01:00
Matej BačoandGitHub dade177af2 Merge pull request #9463 from appwrite/feat-reuse-node
Feat: Reuse Node runtime
2025-03-07 16:03:56 +01:00
Matej Bačo 97ffbbc44b Remove need for ssr runtime 2025-03-07 15:46:49 +01:00
Chirag Aggarwal 493f536a6e chore: added logsdb for deletes worker 2025-03-07 14:04:52 +00:00
Christy JacobandGitHub 3af7f0aa3d Merge pull request #9412 from appwrite/chore-bump-cache-0.12.x
chore: bump cache 0.12.x
2025-03-07 17:31:20 +05:30
loks0n b791e59672 chore: bump composer 2025-03-07 10:59:16 +00:00
loks0n c50a0de627 Merge branch '1.6.x' of https://github.com/appwrite/appwrite into chore-bump-cache-0.12.x 2025-03-07 10:58:31 +00:00
Matej Bačo f07c351c94 Linter fix 2025-03-07 11:22:13 +01:00
Matej Bačo a42522feaa Fix test failures 2025-03-07 11:11:32 +01:00
Matej Bačo 9400fdbbe5 Leftover bugs after rework 2025-03-07 10:43:54 +01:00
Matej Bačo 92b696ea21 Introduce type-relevant attributes to rules 2025-03-07 10:14:45 +01:00
Matej Bačo 50ec55d595 Fix site tests 2025-03-06 18:35:57 +01:00
Matej Bačo a7fc8cf84b Fix functions 2025-03-06 18:17:01 +01:00
Matej Bačo 794c6536fb Fixbugs 2025-03-06 17:55:53 +01:00
Matej Bačo 2e30c1ba1f Reapply "Remove builds collection"
This reverts commit 654d178cf2.
2025-03-06 15:34:06 +01:00
Matej Bačo 654d178cf2 Revert "Remove builds collection"
This reverts commit 02e740f8b0.
2025-03-06 15:33:48 +01:00
Matej Bačo 02e740f8b0 Remove builds collection 2025-03-06 15:32:23 +01:00
Matej BačoandGitHub 62b639ce48 Merge pull request #9455 from appwrite/chore-migrate-cancel-deployment-endpoint
Chore: Move cancel build to update deployment status
2025-03-06 14:04:35 +01:00
Matej Bačo 825e9639b1 Move cancel build to deployment endpoint 2025-03-06 12:20:08 +01:00
Matej Bačo 9a8a2b5a49 Upgrade http lib 2025-03-06 09:32:05 +01:00
Matej BačoandGitHub 4428ed1f7d Merge pull request #9445 from appwrite/chore-rename-redeploy-endpoint
Chore: Migrate redeploy endpoint
2025-03-06 09:29:38 +01:00
Christy JacobandGitHub 205024657a Merge pull request #9438 from appwrite/activities-multi-writes
Activities batch writes
2025-03-06 11:40:34 +05:30
Steven NguyenandGitHub fab43a5f83 Merge pull request #9447 from appwrite/pla-2607
Fix blocking of phone sessions when disabled on console
2025-03-05 11:13:40 -08:00
Chirag Aggarwal 36b0475298 chore: update tests 2025-03-05 18:40:41 +00:00
Chirag Aggarwal 0ce4555f70 chore: added auth group to create phone token 2025-03-05 17:42:43 +00:00
Khushboo Verma 9a44e8130f Add tests for framework, runtime and rendering detection 2025-03-05 22:35:49 +05:30
Matej Bačo 2f3c43d0db Fix failing tests 2025-03-05 13:00:06 +01:00
Matej Bačo 77d27bdd20 Post-merge formatting 2025-03-05 12:33:32 +01:00
Matej Bačo 87a9d72523 Merge branch 'feat-sites' into chore-rename-redeploy-endpoint 2025-03-05 12:33:17 +01:00
Matej Bačo f6674f07e4 Add redeploy tests 2025-03-05 12:29:27 +01:00
Matej Bačo 049ad14121 Fix tests 2025-03-05 11:47:51 +01:00
Matej Bačo a0a82b86dc Migrate redeploy endpoint 2025-03-05 11:29:43 +01:00
Matej BačoandGitHub 326e62334f Merge pull request #9436 from appwrite/chore-rename-activate-endpoint
Chore: Rename deployment activate endpoint
2025-03-05 11:26:00 +01:00
Matej Bačo b29b5da006 Improve code quality 2025-03-05 10:48:26 +01:00
Matej Bačo 46039ded2f Fix rule updating 2025-03-05 10:35:01 +01:00
Matej Bačo dfce78c421 Merge branch 'feat-sites' into chore-rename-activate-endpoint 2025-03-05 10:01:54 +01:00
Matej Bačo ce3bff13dd upgrade http lib 2025-03-05 10:01:50 +01:00
Matej BačoandGitHub a031682596 Merge pull request #9432 from appwrite/chore-add-resource-type-to-sites
Add resource type label in sites endpoints
2025-03-05 09:35:30 +01:00
Khushboo Verma 9b8dd02a88 Don't throw exception from list repos detection 2025-03-05 13:48:44 +05:30
Christy JacobandGitHub a734cadba1 Merge pull request #9443 from appwrite/feat-database-storage-in-stats-resources
Feat: calculate database storage in stats-resources
2025-03-05 12:06:56 +05:30
Khushboo Verma 826b034cd2 Re-add files deleted by mistake 2025-03-05 11:46:31 +05:30
Khushboo Verma 9ee9a8e0ed Resolve merge conflicts 2025-03-05 11:38:28 +05:30
Damodar Lohani 2afb8a14ac Skip in dual writing 2025-03-05 05:27:56 +00:00
Damodar Lohani 6024d01e7b Feat: calculate database storage in stats-resources
- Calculate database storage in stats-resources worker
2025-03-05 05:25:50 +00:00
Christy JacobandGitHub f250f454f7 Merge pull request #9442 from appwrite/fix-model-image-trans
fix: model for image transformations in usage project
2025-03-05 10:21:05 +05:30
Chirag Aggarwal 2c6f731a38 fix: description 2025-03-05 04:49:34 +00:00
Chirag Aggarwal 1d2883f472 chore: fix model for image transformations in usage project 2025-03-05 04:46:06 +00:00
Jake BarnbyandGitHub 8c1a1604a8 Merge pull request #9387 from appwrite/pla-2526
chore: make min/max params optional for attribute update
2025-03-05 16:13:59 +13:00
Jake BarnbyandGitHub ea2fd4b995 Merge pull request #9426 from appwrite/pla-2584
chore: added timeout to deployment builds in tests
2025-03-05 16:11:47 +13:00
Matej Bačo dfc2e87170 Upgrade http library 2025-03-04 21:56:51 +01:00
shimon f2ad3a501e updating audits workers var scope 2025-03-04 20:34:56 +02:00
shimon c443c8fdab updating audits workers var scope 2025-03-04 19:49:37 +02:00
shimon 1838b9c4e8 updating audits workers var scope 2025-03-04 19:49:10 +02:00
shimon 09aa383cf3 updating audits workers var scope 2025-03-04 19:15:00 +02:00
shimon ce054e7088 updating audits workers var scope 2025-03-04 19:12:20 +02:00
shimon 76dc8c29d5 updating audits workers var scope 2025-03-04 19:07:45 +02:00
shimon f761829d60 updating audits workers var scope 2025-03-04 18:49:31 +02:00
shimon 8b4bc7e4a6 updating audits workers var scope 2025-03-04 18:19:23 +02:00
Matej Bačo 520b96f0d9 Finish tests 2025-03-04 16:12:57 +01:00
Matej Bačo ea30d976a8 Fix wrong path, implement tests 2025-03-04 16:04:37 +01:00
Matej Bačo 9b8e4dd862 Rename active deployment path 2025-03-04 15:22:20 +01:00
Matej Bačo ef7b9537f7 Upgrade executor 2025-03-04 15:17:01 +01:00
Matej BačoandGitHub 03c9e57773 Merge pull request #9434 from appwrite/chore-combine-download-endpoints
Chore: Combine download endpoints
2025-03-04 15:10:24 +01:00
Matej Bačo 54413f4c5e Fix bug 2025-03-04 14:31:00 +01:00
Matej Bačo a2abd982cf Backwards compatibility 2025-03-04 14:13:47 +01:00
Matej BačoandGitHub f5a0008445 Merge pull request #9417 from appwrite/feat-screenshot-task
Feat: Screenshot task for templates
2025-03-04 13:56:59 +01:00
Matej Bačo 64183f2946 Fix tests, remove leftovers 2025-03-04 13:45:44 +01:00
Matej Bačo d9eb942e8c Merge deployment download endpoints 2025-03-04 13:43:13 +01:00
Khushboo Verma e94438927e Add resource type label in sites endpoints 2025-03-04 17:05:09 +05:30
Christy JacobandGitHub 52ba87e77e Merge pull request #9393 from appwrite/add-file-transformation-endpoints
chore: add image transformation stats to usage endpoint
2025-03-04 14:46:14 +05:30
Khushboo Verma 20ad91a906 Simplify logic to fetch versionedRuntime 2025-03-04 13:45:56 +05:30
Chirag Aggarwal 239bebfe2e Merge branch '1.6.x' into add-file-transformation-endpoints 2025-03-04 07:34:43 +00:00
Christy JacobandGitHub eff58459ef Merge pull request #9425 from appwrite/disable-admin-transformedAt
Disable transformedAt update for console users
2025-03-04 12:21:28 +05:30
Christy JacobandGitHub 85456696b8 Merge pull request #9429 from appwrite/fix-dual-writing
Fix: disable dual writing
2025-03-04 11:55:00 +05:30
Damodar Lohani 0659dce935 Fix: disable dual writing 2025-03-04 06:22:58 +00:00
Christy JacobandGitHub d5ab989891 Merge pull request #9339 from appwrite/feat-remove-deprecated-usage-stuff
Remove usage and usage dump in favor of stats-usage and stats-usage-dump
2025-03-04 11:23:29 +05:30
Christy JacobandGitHub 9b18a031d9 Merge pull request #9428 from appwrite/fix-stats-date
Fix: use receivedAt date when available
2025-03-04 11:22:12 +05:30
Damodar Lohani 4d5d30ba7b Fix default value 2025-03-04 05:50:21 +00:00
Damodar Lohani dd5dd4cc43 Same for database metrics 2025-03-04 05:34:02 +00:00
Damodar Lohani 5d61544444 Fix: use receivedAt date when available 2025-03-04 05:31:35 +00:00
Chirag Aggarwal 9a6de87f7d chore: usagetest and migrationsbase 2025-03-03 16:31:41 +00:00
Chirag Aggarwal fe7aeefabf chore: remove redundant param 2025-03-03 16:20:32 +00:00
Chirag Aggarwal fc05a4f1e3 chore: updated to use assertEventually 2025-03-03 16:07:33 +00:00
Matej Bačo 2ae61164d4 Merge branch 'feat-sites' into feat-screenshot-task 2025-03-03 16:45:49 +01:00
Matej Bačo 5dd4348d5c Remove leftover 2025-03-03 16:16:02 +01:00
Matej Bačo 64e2f904c5 Merge branch 'feat-sites' into feat-screenshot-task 2025-03-03 16:05:19 +01:00
Chirag Aggarwal e865ca74d7 chore: added timeout to webhooks base test 2025-03-03 14:41:11 +00:00
Chirag Aggarwal c6b8e649fe chore: added maxtimeout to testChannelExecutions 2025-03-03 14:34:10 +00:00
shimon b314ae8208 disable transformedAt update for console users 2025-03-03 15:19:49 +02:00
Christy JacobandGitHub 32329ef3f9 Merge pull request #9424 from appwrite/revert-9411-lohanidamodar-patch-2
Revert "Fix: stats resources only queue projects accessed in last 3 hours"
2025-03-03 16:25:34 +05:30
Damodar LohaniandGitHub 5becd0a5dc Revert "Fix: stats resources only queue projects accessed in last 3 hours" 2025-03-03 16:04:31 +05:45
Khushboo Verma ef37139592 Resolve merge conflicts 2025-03-03 13:57:29 +05:30
Khushboo Verma 8b8f632abe Add providerRepository model and extend it for framework and runtime 2025-03-03 13:54:07 +05:30
Jake BarnbyandGitHub d85b28aabc Merge pull request #9325 from appwrite/pla-1883
refactor: migrate Realtime::send calls to queueForRealtime
2025-03-03 21:23:55 +13:00
Chirag AggarwalandGitHub 88c8d2aa4c Merge branch '1.6.x' into pla-1883 2025-03-03 13:37:05 +05:30
Chirag Aggarwal 9849e7b232 Merge branch '1.6.x' into add-file-transformation-endpoints 2025-03-01 19:41:25 +00:00
Chirag Aggarwal 6900b717da chore: updated to use logsdb 2025-03-01 17:45:20 +00:00
Chirag Aggarwal aaee99e08b chore: generate specs 2025-03-01 17:19:55 +00:00
Chirag Aggarwal 712c33064a chore: fix sending of transformation stats 2025-03-01 17:18:44 +00:00
Chirag Aggarwal 02de0d2432 chore: fix stats count 2025-02-28 13:29:32 +00:00
Chirag Aggarwal df37462716 chore: fix typing and tests 2025-02-28 13:20:55 +00:00
Khushboo Verma dc71c50123 Resolve merge conflicts 2025-02-28 16:20:24 +05:30
Chirag Aggarwal d5cfdc570f chore: updated specs 2025-02-28 08:41:53 +00:00
Chirag Aggarwal e9d8d13fbd chore: added imageTransformations to project usage 2025-02-28 08:28:21 +00:00
Matej Bačo dd75081609 Formatting fix 2025-02-27 17:46:47 +01:00
Matej Bačo a3c176a2bd Finalize PR 2025-02-27 17:46:41 +01:00
Matej Bačo 8081759c5c Fix failing templates 2025-02-27 17:28:25 +01:00
Matej Bačo bf3b21cdb1 Implement screenshot task and initial run 2025-02-27 15:58:33 +01:00
Chirag Aggarwal f31acd214e chore: remove plan blocking 2025-02-27 09:52:27 +00:00
Chirag Aggarwal 388affa3d0 chore: updated naming for subscribers 2025-02-27 07:23:13 +00:00
loks0n 0bbcdf8268 chore: bump cache 0.12.x 2025-02-26 22:05:09 +00:00
loks0n 02e5b935fe Merge branch 'chore-bump-cache-0.12.x' of https://github.com/appwrite/appwrite into chore-bump-cache-0.12.x 2025-02-26 22:03:04 +00:00
loks0n 611f2cad6a chore: bump cache 0.12.x 2025-02-26 22:02:55 +00:00
Luke B. SilverandGitHub b9d5621bde Merge branch '1.6.x' into chore-bump-cache-0.12.x 2025-02-26 21:57:58 +00:00
Chirag Aggarwal c79ed286b1 chore: update tests 2025-02-26 17:35:06 +00:00
Chirag Aggarwal 28896081d7 chore: fix forloop 2025-02-26 16:50:12 +00:00
Chirag Aggarwal 7687784515 chore: added fallback to old values in update 2025-02-26 16:41:26 +00:00
loks0n 31d6fe2423 chore: bump cache 0.12.x 2025-02-26 16:40:19 +00:00
loks0n f5947de508 chore: bump cache 0.12.x 2025-02-26 16:38:05 +00:00
Chirag Aggarwal 0ddcb9b14c chore: refactor adapter 2025-02-26 16:24:05 +00:00
Christy JacobandGitHub 1c8ec7ba1f Merge pull request #9406 from appwrite/bump-base-image
chore: bump docker-base
2025-02-26 18:49:25 +05:30
Christy JacobandGitHub e7eedcdeb7 Merge pull request #9397 from appwrite/track-options-requests
Track options requests
2025-02-26 18:48:50 +05:30
Chirag Aggarwal bb5ed1ccc6 chore: bump base to 0.10.1 2025-02-26 10:14:32 +00:00
Chirag Aggarwal ae78e793dd chore: added blocking to file preview endpoint 2025-02-26 08:52:06 +00:00
Christy JacobandGitHub 24613c2e9f Merge pull request #9243 from appwrite/fix-smtp
Fix: email (smtp) to multiple recipients
2025-02-26 12:57:23 +05:30
Christy JacobandGitHub 718e44adce Merge branch '1.6.x' into track-options-requests 2025-02-26 10:40:10 +05:30
Damodar LohaniandGitHub 1816fae5a3 Merge pull request #9411 from appwrite/lohanidamodar-patch-2
Fix: stats resources only queue projects accessed in last 3 hours
2025-02-26 09:05:22 +05:45
Damodar LohaniandGitHub 7ea108f015 Fix: stats resources only queue projects accessed in last 3 hours 2025-02-26 08:37:36 +05:45
Jake BarnbyandGitHub 69c00d428a Merge pull request #9410 from appwrite/batch-per-project
Batch per project
2025-02-26 14:02:24 +13:00
Jake BarnbyandGitHub e998474b97 Merge branch '1.6.x' into batch-per-project 2025-02-26 14:02:01 +13:00
Jake Barnby 6e82bfe8e7 Update date 2025-02-26 14:00:16 +13:00
Jake Barnby 34d91a6518 Revert "Test increase batch"
This reverts commit 7dfa3193c9.
2025-02-26 13:51:41 +13:00
Jake Barnby 7dfa3193c9 Test increase batch 2025-02-26 13:45:49 +13:00
Chirag Aggarwal 542e34bc94 chore: bump docker-base 2025-02-25 12:28:05 +00:00
Khushboo Verma a54f84fce8 Resolve merge conflicts 2025-02-25 16:20:58 +05:30
Khushboo Verma f830918c7c Add logic to detect rendering strategy and fallback file 2025-02-25 16:19:30 +05:30
Chirag Aggarwal 9f7ba3d4ca Merge branch '1.6.x' into fix-smtp 2025-02-25 09:48:21 +00:00
Jake BarnbyandGitHub 66dc3adb98 Merge pull request #9403 from appwrite/batch-per-project
Log batches per project
2025-02-25 21:46:33 +13:00
Jake Barnby 3a2babc906 Update date 2025-02-25 21:34:46 +13:00
Jake Barnby 03f0e382f4 Fix dates 2025-02-25 21:03:37 +13:00
Jake Barnby b272a8b1e7 Pass queries 2025-02-25 20:26:00 +13:00
Chirag Aggarwal 676431c355 chore: shifted to logsDb 2025-02-25 07:16:42 +00:00
Jake Barnby 2924f408b3 Reapply "Remove blocks"
This reverts commit f49346485a.
2025-02-25 19:21:35 +13:00
Jake Barnby b0547015a9 Add temp log date skip 2025-02-25 18:51:11 +13:00
Jake Barnby f49346485a Revert "Remove blocks"
This reverts commit 6f854b5eb6.
2025-02-25 18:39:12 +13:00
Jake Barnby 6f854b5eb6 Remove blocks 2025-02-25 18:18:25 +13:00
Chirag Aggarwal ab6c5c9f8d chore: bump utopia messaging 2025-02-25 04:47:35 +00:00
Chirag Aggarwal 7ac4a5bf27 chore: update naming 2025-02-25 04:43:44 +00:00
Jake Barnby 1f560d896f Fix plural 2025-02-25 16:58:30 +13:00
Jake Barnby 5efd231861 Allow validator to read logs collections from base 2025-02-25 16:56:13 +13:00
Jake Barnby 3f8e1cbedb Fix loop unset 2025-02-25 15:57:04 +13:00
Jake Barnby 08f4ed2b50 Log batches per project 2025-02-25 15:50:10 +13:00
Eldad A. FuxandGitHub 392b33ef26 Merge pull request #9398 from appwrite/disable-logs-display
disable logs display
2025-02-23 20:08:55 +01:00
shimon 6bd14d548f composer 2025-02-23 20:58:02 +02:00
shimon 06d22f910c disable logs display 2025-02-23 20:51:38 +02:00
Christy Jacob 8958070327 chore: linter 2025-02-23 15:48:33 +05:30
Christy Jacob 3f50532c91 chore: remove sleep in functions tests 2025-02-23 15:42:53 +05:30
Christy Jacob 4c49272389 chore: enable assistant 2025-02-23 15:40:54 +05:30
Christy Jacob f25df67002 chore: remove sleep() for usage stats, since batch size is now 1 2025-02-23 15:39:37 +05:30
Christy Jacob 94108e6f3f chore: remove sleep() for usage stats, since batch size is now 1 2025-02-23 15:23:34 +05:30
Christy Jacob f682e4ac6f chore: remoove sleep() for usage stats, since batch size is now 1 2025-02-23 14:56:15 +05:30
Christy Jacob cf41d44de4 fix: general tests 2025-02-23 14:47:57 +05:30
Christy Jacob 30327f86fd feat: enable assistant 2025-02-23 11:39:18 +05:30
Christy Jacob 2359c1adb6 feat: enable assistant 2025-02-23 11:38:59 +05:30
Christy Jacob 12b494982b feat: compute usage for OPTIONS and 4XX errors 2025-02-23 11:37:54 +05:30
Christy Jacob 65dd5fe9b3 feat: compute usage for OPTIONS and 4XX errors 2025-02-23 11:34:28 +05:30
Chirag Aggarwal 0e0bab4c40 chore: updated test 2025-02-21 13:28:49 +00:00
Chirag Aggarwal 4ed4c660d5 chore: added tests for file transformations 2025-02-21 12:53:17 +00:00
Chirag Aggarwal b1629b24ad chore: added file transformation stats to usage endpoint for bucket 2025-02-21 11:44:04 +00:00
Christy JacobandGitHub 9fa13ddfd8 Merge pull request #9391 from appwrite/fix-null-error-on-invite
chore: fix null errors on team invite
2025-02-21 16:09:43 +05:30
Khushboo Verma 1394b4349c Separate response models for list repos 2025-02-21 15:22:15 +05:30
Khushboo Verma 9d4806c792 Merge branch 'feat-sites' into feat-add-detection-logic 2025-02-21 11:39:06 +05:30
Chirag Aggarwal d6c2dfb915 chore: updated name 2025-02-21 03:27:46 +00:00
Steven NguyenandGitHub f402262ffc Merge pull request #9390 from appwrite/pla-2142
chore: bump utopia-php/image to 0.8.0
2025-02-20 10:44:54 -08:00
Chirag Aggarwal 9d9e44a14f chore: remove redundant check 2025-02-20 17:36:42 +00:00
Chirag Aggarwal 397a6a34ed chore: fix null errors on team invite 2025-02-20 17:30:26 +00:00
Chirag Aggarwal c660b9d858 chore: fix tests 2025-02-20 14:56:23 +00:00
Chirag Aggarwal f9cc7882aa chore: fix tests 2025-02-20 14:43:21 +00:00
Chirag Aggarwal 4e71e85b5b chore: bump utopia-php/image version 2025-02-20 14:32:34 +00:00
Chirag Aggarwal 077fe10d80 chore: fix tests 2025-02-20 14:12:14 +00:00
Chirag Aggarwal b0ced9b351 chore: updated tests 2025-02-20 13:37:13 +00:00
Christy JacobandGitHub 6cbcd695d1 Merge pull request #9388 from appwrite/fix-audits-v2
Fix removed audits for shared v2
2025-02-20 18:05:25 +05:30
Jake Barnby b6166063db Add back remove shared v2 2025-02-21 00:51:29 +13:00
Chirag Aggarwal ccb7dfa839 chore: added test cases 2025-02-20 11:15:05 +00:00
Chirag Aggarwal 6235a1c729 chore: make min/max params optional for attribute update 2025-02-20 10:33:58 +00:00
Khushboo Verma 68de687bdf Resolve merge conflicts 2025-02-20 12:57:18 +05:30
Khushboo Verma a7c1bd94ed Add framework detection to list repos 2025-02-20 12:54:26 +05:30
Christy JacobandGitHub 7319b12b51 Merge pull request #9353 from appwrite/feat-messaging-metrics
Feat messaging metrics
2025-02-20 12:25:14 +05:30
Khushboo Verma 3bb4fde7e6 Merge branch 'feat-sites' into feat-add-detection-logic 2025-02-19 17:12:45 +05:30
Khushboo Verma c0b574fe9b Update detector library version 2025-02-19 12:19:41 +05:30
Khushboo Verma 34b8453666 Merge branch 'feat-sites' into feat-add-detection-logic 2025-02-18 20:19:11 +05:30
Chirag Aggarwal 55e7633bd1 chore: shift targets to realtime 2025-02-18 14:04:59 +00:00
Chirag Aggarwal 88a6616cf8 chore: fix naming 2025-02-18 13:05:50 +00:00
Chirag Aggarwal 9f7aaf7029 chore: fix warning in database worker 2025-02-18 12:51:19 +00:00
Chirag Aggarwal 235a357ca3 chore: initialized queueForWebhooks in worker init 2025-02-18 11:37:36 +00:00
Chirag AggarwalandGitHub b99d2c3c8c Merge branch '1.6.x' into pla-1883 2025-02-18 16:31:41 +05:30
Chirag Aggarwal a74c6e0b10 chore: added targets to realtime, refactor webhook queues 2025-02-18 07:58:56 +00:00
Chirag Aggarwal 6ef4e76aa6 Merge branch '1.6.x' into pla-1883 2025-02-17 18:54:41 +00:00
Chirag Aggarwal 227f2c476d Merge branch '1.6.x' into pla-1883 2025-02-17 18:46:05 +00:00
Khushboo Verma 76b154bfce Add framework detection to list repos 2025-02-17 17:54:13 +05:30
Khushboo Verma feffab137f Resolve merge conflicts 2025-02-17 14:00:30 +05:30
Khushboo Verma 6155fad3e0 Resolve merge conflicts 2025-02-17 14:00:05 +05:30
Chirag Aggarwal 4c7917687d Merge branch '1.6.x' into pla-1883 2025-02-14 07:16:43 +00:00
Damodar Lohani 1e446948e8 Fix error 2025-02-13 05:24:00 +00:00
Damodar Lohani 503b8a0cde spacing 2025-02-13 04:58:14 +00:00
Damodar Lohani 745947621f Feat: count for targets 2025-02-13 04:54:29 +00:00
Damodar Lohani 721b9b9aea remove old events 2025-02-13 00:52:20 +00:00
Damodar LohaniandGitHub 29ffd703db Merge branch '1.6.x' into feat-remove-deprecated-usage-stuff 2025-02-13 06:28:48 +05:45
Damodar Lohani f2fc45da02 fix format 2025-02-11 09:46:00 +00:00
Damodar LohaniandGitHub 2b2be60e77 Merge branch '1.6.x' into feat-remove-deprecated-usage-stuff 2025-02-11 15:20:23 +05:45
Damodar Lohani 940f4d12af Remove usage and usage dump in favor of stats-usage and stats-usage-dump 2025-02-11 07:52:37 +00:00
Chirag Aggarwal 5076303c33 chore: refactor realtime queueing in builds worker 2025-02-11 06:06:43 +00:00
Chirag Aggarwal 532160705f chore: refactor realtime queueing in functions worker 2025-02-11 05:50:30 +00:00
Chirag Aggarwal f666e18154 chore: fix databases worker realtime queueing 2025-02-11 05:00:45 +00:00
Chirag Aggarwal bcdae7f4e3 chore: refactor certificate realtime, fix database 2025-02-11 04:21:36 +00:00
Chirag Aggarwal 47fbb777ed chore: refactor migrations realtime queue 2025-02-11 04:03:02 +00:00
Chirag Aggarwal 2c4c42de05 docs: fix database worker 2025-02-11 03:53:18 +00:00
Chirag Aggarwal 375f643214 refactor: triggering realtime events with queueForRealtime 2025-02-11 03:29:32 +00:00
Matej Bačo 7be0fbf616 Implementation of authorized previews 2025-02-10 15:07:01 +01:00
Khushboo Verma 0a3f284e14 Update composer.json 2025-02-07 11:18:07 +05:30
Khushboo Verma 11ed6b8f47 Resolve merge conflicts 2025-02-07 11:16:30 +05:30
Khushboo Verma 8dd99b7d2a Add framework detection to Appwrite 2025-02-06 23:59:43 +05:30
320 changed files with 11496 additions and 9074 deletions
+2 -2
View File
@@ -81,8 +81,8 @@ _APP_COMPUTE_RUNTIMES_NETWORK=runtimes
_APP_EXECUTOR_SECRET=your-secret-key
_APP_EXECUTOR_HOST=http://exc1/v1
_APP_FUNCTIONS_RUNTIMES=php-8.0,node-18.0,python-3.9,ruby-3.1
_APP_SITES_RUNTIMES=static-1,ssr-22,flutter-3.24
_APP_SITES_FRAMEWORKS=sveltekit,nextjs,nuxt,astro,remix,flutter,other,react,vue # TODO: Angular
_APP_SITES_RUNTIMES=static-1,node-22,flutter-3.29
_APP_SITES_FRAMEWORKS=sveltekit,nextjs,nuxt,astro,remix,flutter,other,react,vue,analog,angular,vite
_APP_MAINTENANCE_INTERVAL=86400
_APP_MAINTENANCE_DELAY=
_APP_MAINTENANCE_RETENTION_CACHE=2592000
+3 -4
View File
@@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
FROM appwrite/base:0.9.5 AS final
FROM appwrite/base:0.10.1 AS final
LABEL maintainer="team@appwrite.io"
@@ -68,6 +68,7 @@ RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/sdks && \
chmod +x /usr/local/bin/specs && \
chmod +x /usr/local/bin/ssl && \
chmod +x /usr/local/bin/screenshot && \
chmod +x /usr/local/bin/test && \
chmod +x /usr/local/bin/upgrade && \
chmod +x /usr/local/bin/vars && \
@@ -88,9 +89,7 @@ RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/worker-stats-usage && \
chmod +x /usr/local/bin/worker-stats-usage-dump && \
chmod +x /usr/local/bin/stats-resources && \
chmod +x /usr/local/bin/worker-stats-resources && \
chmod +x /usr/local/bin/worker-usage && \
chmod +x /usr/local/bin/worker-usage-dump
chmod +x /usr/local/bin/worker-stats-resources
# Letsencrypt Permissions
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
+3 -3
View File
@@ -72,7 +72,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.6.1
appwrite/appwrite:1.6.2
```
### Windows
@@ -84,7 +84,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.6.1
appwrite/appwrite:1.6.2
```
#### PowerShell
@@ -94,7 +94,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.6.1
appwrite/appwrite:1.6.2
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
+3 -3
View File
@@ -79,7 +79,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.6.1
appwrite/appwrite:1.6.2
```
### Windows
@@ -91,7 +91,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.6.1
appwrite/appwrite:1.6.2
```
#### PowerShell
@@ -101,7 +101,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.6.1
appwrite/appwrite:1.6.2
```
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.
+5 -1
View File
@@ -26,7 +26,7 @@ use Utopia\Registry\Registry;
use Utopia\System\System;
// overwriting runtimes to be architectur agnostic for CLI
Config::setParam('runtimes', (new Runtimes('v4rc'))->getAll(supported: false));
Config::setParam('runtimes', (new Runtimes('v5'))->getAll(supported: false));
// require controllers after overwriting runtimes
require_once __DIR__ . '/controllers/general.php';
@@ -99,6 +99,10 @@ CLI::setResource('dbForPlatform', function ($pools, $cache) {
return $dbForPlatform;
}, ['pools', 'cache']);
CLI::setResource('console', function () {
return new Document(Config::getParam('console'));
}, []);
CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $cache) {
$databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools
+120 -12
View File
@@ -1024,13 +1024,10 @@ return [
'filters' => [],
],
[
// If 'api', then (empty)
// If 'redirect', then URL
// If 'deployment', then deployment ID
'$id' => ID::custom('value'),
'$id' => ID::custom('trigger'), // 'manual', 'deployment', '' (empty)
'type' => Database::VAR_STRING,
'format' => '',
'size' => 512,
'size' => 32,
'signed' => true,
'required' => false,
'default' => '',
@@ -1038,8 +1035,84 @@ return [
'filters' => [],
],
[
// Examples: branch=main
'$id' => ID::custom('automation'),
'$id' => ID::custom('redirectUrl'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('redirectStatusCode'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentResourceType'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 32,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentResourceId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentResourceInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentVcsProviderBranch'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
@@ -1120,16 +1193,51 @@ return [
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_value',
'$id' => '_key_trigger',
'type' => Database::INDEX_KEY,
'attributes' => ['value'],
'lengths' => [512],
'attributes' => ['trigger'],
'lengths' => [32],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_automation',
'$id' => '_key_deploymentResourceType',
'type' => Database::INDEX_KEY,
'attributes' => ['automation'],
'attributes' => ['deploymentResourceType'],
'lengths' => [32],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_deploymentResourceId',
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentResourceId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_deploymentResourceInternalId',
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentResourceInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_deploymentId',
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_deploymentInternalId',
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentInternalId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => '_key_deploymentVcsProviderBranch',
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentVcsProviderBranch'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
+110 -225
View File
@@ -569,7 +569,7 @@ return [
'filters' => [],
],
[
'$id' => ID::custom('deployment'),
'$id' => ID::custom('deploymentId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
@@ -674,7 +674,7 @@ return [
'size' => 8,
'signed' => true,
'required' => false,
'default' => 'v4',
'default' => 'v5',
'array' => false,
'filters' => [],
],
@@ -788,9 +788,9 @@ return [
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_deployment'),
'$id' => ID::custom('_key_deploymentId'),
'type' => Database::INDEX_KEY,
'attributes' => ['deployment'],
'attributes' => ['deploymentId'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
]
@@ -1154,7 +1154,6 @@ return [
]
],
],
'deployments' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('deployments'),
@@ -1193,28 +1192,6 @@ return [
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'array' => false,
'$id' => ID::custom('entrypoint'),
@@ -1228,18 +1205,7 @@ return [
],
[
'array' => false,
'$id' => ID::custom('commands'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => null,
'filters' => [],
],
[
'array' => false,
'$id' => ID::custom('buildCommand'),
'$id' => ID::custom('buildCommands'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
@@ -1250,7 +1216,7 @@ return [
],
[
'array' => false,
'$id' => ID::custom('installCommand'),
'$id' => ID::custom('buildOutput'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
@@ -1260,18 +1226,7 @@ return [
'filters' => [],
],
[
'array' => false,
'$id' => ID::custom('outputDirectory'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'filters' => [],
],
[
'$id' => ID::custom('path'),
'$id' => ID::custom('sourcePath'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
@@ -1285,7 +1240,7 @@ return [
'$id' => ID::custom('type'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'size' => 32,
'signed' => true,
'required' => true,
'default' => null,
@@ -1464,7 +1419,7 @@ return [
'array' => false,
],
[
'$id' => ID::custom('size'),
'$id' => ID::custom('sourceSize'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
@@ -1475,7 +1430,7 @@ return [
'filters' => [],
],
[
'$id' => ID::custom('metadata'),
'$id' => ID::custom('sourceMetadata'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384, // https://tools.ietf.org/html/rfc4288#section-4.2
@@ -1486,7 +1441,7 @@ return [
'filters' => ['json'],
],
[
'$id' => ID::custom('chunksTotal'),
'$id' => ID::custom('sourceChunksTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
@@ -1497,7 +1452,7 @@ return [
'filters' => [],
],
[
'$id' => ID::custom('chunksUploaded'),
'$id' => ID::custom('sourceChunksUploaded'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
@@ -1551,6 +1506,83 @@ return [
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildStartAt'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
[
'$id' => ID::custom('buildEndAt'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
[
'$id' => ID::custom('buildDuration'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildSize'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16,
'signed' => true,
'required' => true,
'default' => 'waiting',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildPath'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('buildLogs'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
]
],
'indexes' => [
[
@@ -1575,16 +1607,23 @@ return [
'orders' => [],
],
[
'$id' => ID::custom('_key_size'),
'$id' => ID::custom('_key_sourceSize'),
'type' => Database::INDEX_KEY,
'attributes' => ['size'],
'attributes' => ['sourceSize'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_buildId'),
'$id' => ID::custom('_key_buildSize'),
'type' => Database::INDEX_KEY,
'attributes' => ['buildId'],
'attributes' => ['buildSize'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_buildDuration'),
'type' => Database::INDEX_KEY,
'attributes' => ['buildDuration'],
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
@@ -1595,155 +1634,19 @@ return [
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
],
],
'builds' => [
'$collection' => ID::custom(Database::METADATA),
'$id' => ID::custom('builds'),
'name' => 'Builds',
'attributes' => [
[
'$id' => ID::custom('startTime'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
[
'$id' => ID::custom('endTime'),
'type' => Database::VAR_DATETIME,
'format' => '',
'size' => 0,
'signed' => false,
'required' => false,
'default' => null,
'array' => false,
'filters' => ['datetime'],
],
[
'$id' => ID::custom('duration'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('size'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentInternalId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('deploymentId'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => Database::LENGTH_KEY,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('runtime'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => true,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('status'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 256,
'signed' => true,
'required' => true,
'default' => 'processing',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('path'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('logs'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => '',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('sourceType'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => true,
'default' => 'local',
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('source'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 2048,
'signed' => true,
'required' => true,
'default' => '',
'array' => false,
'filters' => [],
]
],
'indexes' => [
[
'$id' => ID::custom('_key_deployment'),
'$id' => ID::custom('_key_type'),
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentId'],
'lengths' => [Database::LENGTH_KEY],
'attributes' => ['type'],
'lengths' => [32],
'orders' => [Database::ORDER_ASC],
]
], [
'$id' => ID::custom('_key_status'),
'type' => Database::INDEX_KEY,
'attributes' => ['status'],
'lengths' => [16],
'orders' => [Database::ORDER_ASC],
],
],
],
@@ -1917,17 +1820,6 @@ return [
'array' => false,
'filters' => ['json'],
],
[
'$id' => ID::custom('search'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('scheduledAt'),
'type' => Database::VAR_DATETIME,
@@ -1970,13 +1862,6 @@ return [
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_fulltext_search'),
'type' => Database::INDEX_FULLTEXT,
'attributes' => ['search'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_trigger'),
'type' => Database::INDEX_KEY,
+52
View File
@@ -0,0 +1,52 @@
<?php
/**
* Initializes console project document.
*/
use Appwrite\Auth\Auth;
use Appwrite\Network\Validator\Origin;
use Utopia\Database\Helpers\ID;
use Utopia\System\System;
$console = [
'$id' => ID::custom('console'),
'$internalId' => ID::custom('console'),
'name' => 'Appwrite',
'$collection' => ID::custom('projects'),
'description' => 'Appwrite core engine',
'logo' => '',
'teamId' => null,
'webhooks' => [],
'keys' => [],
'platforms' => [
[
'$collection' => ID::custom('platforms'),
'name' => 'Localhost',
'type' => Origin::CLIENT_TYPE_WEB,
'hostname' => 'localhost',
], // Current host is added on app init
],
'legalName' => '',
'legalCountry' => '',
'legalState' => '',
'legalCity' => '',
'legalAddress' => '',
'legalTaxId' => '',
'auths' => [
'mockNumbers' => [],
'invites' => System::getEnv('_APP_CONSOLE_INVITES', 'enabled') === 'enabled',
'limit' => (System::getEnv('_APP_CONSOLE_WHITELIST_ROOT', 'enabled') === 'enabled') ? 1 : 0, // limit signup to 1 user
'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, // 1 Year in seconds
'sessionAlerts' => System::getEnv('_APP_CONSOLE_SESSION_ALERTS', 'disabled') === 'enabled'
],
'authWhitelistEmails' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null)) : [],
'authWhitelistIPs' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null)) : [],
'oAuthProviders' => [
'githubEnabled' => true,
'githubSecret' => System::getEnv('_APP_CONSOLE_GITHUB_SECRET', ''),
'githubAppid' => System::getEnv('_APP_CONSOLE_GITHUB_APP_ID', '')
],
];
return $console;
+6 -1
View File
@@ -527,7 +527,7 @@ return [
'code' => 404,
],
Exception::FUNCTION_ENTRYPOINT_MISSING => [
'name' => Exception::FUNCTION_RUNTIME_UNSUPPORTED,
'name' => Exception::FUNCTION_ENTRYPOINT_MISSING,
'description' => 'Entrypoint for your Appwrite Function is missing. Please specify it when making deployment or update the entrypoint under your function\'s "Settings" > "Configuration" > "Entrypoint".',
'code' => 404,
],
@@ -541,6 +541,11 @@ return [
'description' => 'Function Template with the requested ID could not be found.',
'code' => 404,
],
Exception::FUNCTION_RUNTIME_NOT_DETECTED => [
'name' => Exception::FUNCTION_RUNTIME_NOT_DETECTED,
'description' => 'Function runtime could not be detected.',
'code' => 400,
],
/** Sites */
Exception::SITE_NOT_FOUND => [
+85 -40
View File
@@ -4,8 +4,6 @@
* List of Appwrite Sites supported frameworks
*/
// TODO: @Meldiron Angular
use Utopia\Config\Config;
$templateRuntimes = Config::getParam('template-runtimes');
@@ -18,11 +16,63 @@ function getVersions(array $versions, string $prefix)
}
return [
'analog' => [
'key' => 'analog',
'name' => 'Analog',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/analog/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/analog/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'outputDirectory' => './dist/analog',
'startCommand' => 'sh helpers/analog/server.sh',
],
'static' => [
'key' => 'static',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'outputDirectory' => './dist/analog/public',
'startCommand' => 'sh helpers/server.sh',
'fallbackFile' => 'index.html'
]
]
],
'angular' => [
'key' => 'angular',
'name' => 'Angular',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/angular/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/angular/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'outputDirectory' => './dist/angular',
'startCommand' => 'sh helpers/angular/server.sh',
],
'static' => [
'key' => 'static',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'outputDirectory' => './dist/angular/browser',
'startCommand' => 'sh helpers/server.sh',
'fallbackFile' => 'index.csr.html'
]
]
],
'nextjs' => [
'key' => 'nextjs',
'name' => 'Next.js',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/next-js/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/next-js/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
@@ -30,8 +80,6 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './.next',
'startCommand' => 'sh helpers/next-js/server.sh',
'bundleCommand' => 'sh /usr/local/server/helpers/next-js/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/next-js/env.sh',
],
'static' => [
'key' => 'static',
@@ -39,15 +87,13 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './out',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
]
]
],
'react' => [
'key' => 'react',
'name' => 'React',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'adapters' => [
'static' => [
@@ -56,8 +102,6 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './dist',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
'fallbackFile' => 'index.html'
]
]
@@ -65,8 +109,10 @@ return [
'nuxt' => [
'key' => 'nuxt',
'name' => 'Nuxt',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/nuxt/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/nuxt/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
@@ -74,24 +120,20 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './.output',
'startCommand' => 'sh helpers/nuxt/server.sh',
'bundleCommand' => 'sh /usr/local/server/helpers/nuxt/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/nuxt/env.sh',
],
'static' => [
'key' => 'static',
'buildCommand' => 'npm run generate',
'installCommand' => 'npm install',
'outputDirectory' => './dist',
'outputDirectory' => './output/public',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
]
]
],
'vue' => [
'key' => 'vue',
'name' => 'Vue.js',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'adapters' => [
'static' => [
@@ -100,8 +142,6 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './dist',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
'fallbackFile' => 'index.html'
]
]
@@ -109,8 +149,10 @@ return [
'sveltekit' => [
'key' => 'sveltekit',
'name' => 'SvelteKit',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/sveltekit/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/sveltekit/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
@@ -118,8 +160,6 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './build',
'startCommand' => 'sh helpers/sveltekit/server.sh',
'bundleCommand' => 'sh /usr/local/server/helpers/sveltekit/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/sveltekit/env.sh',
],
'static' => [
'key' => 'static',
@@ -127,16 +167,16 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './build',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
]
]
],
'astro' => [
'key' => 'astro',
'name' => 'Astro',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/astro/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/astro/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
@@ -144,8 +184,6 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './dist',
'startCommand' => 'sh helpers/astro/server.sh',
'bundleCommand' => 'sh /usr/local/server/helpers/astro/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/astro/env.sh',
],
'static' => [
'key' => 'static',
@@ -153,16 +191,16 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './dist',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
]
]
],
'remix' => [
'key' => 'remix',
'name' => 'Remix',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'bundleCommand' => 'sh /usr/local/server/helpers/remix/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/remix/env.sh',
'adapters' => [
'ssr' => [
'key' => 'ssr',
@@ -170,8 +208,6 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './build',
'startCommand' => 'sh helpers/remix/server.sh',
'bundleCommand' => 'sh /usr/local/server/helpers/remix/bundle.sh',
'envCommand' => 'source /usr/local/server/helpers/remix/env.sh',
],
'static' => [
'key' => 'static',
@@ -179,15 +215,13 @@ return [
'installCommand' => 'npm install',
'outputDirectory' => './build/client',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
]
]
],
'flutter' => [
'key' => 'flutter',
'name' => 'Flutter',
'buildRuntime' => 'flutter-3.24',
'buildRuntime' => 'flutter-3.29',
'runtimes' => getVersions($templateRuntimes['FLUTTER']['versions'], 'flutter'),
'adapters' => [
'static' => [
@@ -196,15 +230,28 @@ return [
'installCommand' => '',
'outputDirectory' => './build/web',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
],
],
],
'vite' => [
'key' => 'vite',
'name' => 'Vite',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'adapters' => [
'static' => [
'key' => 'static',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'outputDirectory' => './dist',
'startCommand' => 'sh helpers/server.sh',
],
]
],
'other' => [
'key' => 'other',
'name' => 'Other',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
'adapters' => [
'static' => [
@@ -213,8 +260,6 @@ return [
'installCommand' => '',
'outputDirectory' => './',
'startCommand' => 'sh helpers/server.sh',
'bundleCommand' => '',
'envCommand' => '',
],
]
],
+1 -1
View File
@@ -6,4 +6,4 @@
use Appwrite\Runtimes\Runtimes;
return (new Runtimes('v4rc'))->getAll();
return (new Runtimes('v5'))->getAll();
-51
View File
@@ -1,51 +0,0 @@
<?php
use Appwrite\Functions\Specification;
return [
Specification::S_05VCPU_512MB => [
'slug' => Specification::S_05VCPU_512MB,
'memory' => 512,
'cpus' => 0.5
],
Specification::S_1VCPU_512MB => [
'slug' => Specification::S_1VCPU_512MB,
'memory' => 512,
'cpus' => 1
],
Specification::S_1VCPU_1GB => [
'slug' => Specification::S_1VCPU_1GB,
'memory' => 1024,
'cpus' => 1
],
Specification::S_2VCPU_2GB => [
'slug' => Specification::S_2VCPU_2GB,
'memory' => 2048,
'cpus' => 2
],
Specification::S_2VCPU_4GB => [
'slug' => Specification::S_2VCPU_4GB,
'memory' => 4096,
'cpus' => 2
],
Specification::S_4VCPU_4GB => [
'slug' => Specification::S_4VCPU_4GB,
'memory' => 4096,
'cpus' => 4
],
Specification::S_4VCPU_8GB => [
'slug' => Specification::S_4VCPU_8GB,
'memory' => 8192,
'cpus' => 4
],
Specification::S_8VCPU_4GB => [
'slug' => Specification::S_8VCPU_4GB,
'memory' => 4096,
'cpus' => 8
],
Specification::S_8VCPU_8GB => [
'slug' => Specification::S_8VCPU_8GB,
'memory' => 8192,
'cpus' => 8
]
];
@@ -1,6 +1,6 @@
<?php
use Appwrite\Sites\Specification;
use Appwrite\Platform\Modules\Compute\Specification;
return [
Specification::S_05VCPU_512MB => [
+6 -4
View File
@@ -3383,7 +3383,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"schema": {
"type": "string",
@@ -3404,7 +3404,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@@ -3423,7 +3424,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
]
},
"in": "path"
@@ -4365,7 +4367,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
+133 -89
View File
@@ -3387,7 +3387,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"schema": {
"type": "string",
@@ -3408,7 +3408,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@@ -3427,7 +3428,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
]
},
"in": "path"
@@ -6407,8 +6409,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -6644,8 +6644,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -7823,7 +7821,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -11585,7 +11583,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11692,7 +11690,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11718,54 +11716,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthStatus"
}
}
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@@ -11788,7 +11738,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11849,7 +11799,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11910,7 +11860,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11982,7 +11932,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12081,8 +12031,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@@ -12130,7 +12081,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12191,7 +12142,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12252,7 +12203,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12313,7 +12264,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12374,7 +12325,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12413,14 +12364,14 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@@ -12434,13 +12385,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -12474,10 +12425,71 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthQueue"
}
}
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 5000
},
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"tags": [
"health"
],
@@ -12495,13 +12507,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -12557,7 +12569,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12714,7 +12726,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,
@@ -17609,17 +17621,17 @@
},
"endpoint": {
"type": "string",
"description": "Source's Appwrite Endpoint",
"description": "Source Appwrite endpoint",
"x-example": "https:\/\/example.com"
},
"projectId": {
"type": "string",
"description": "Source's Project ID",
"description": "Source Project ID",
"x-example": "<PROJECT_ID>"
},
"apiKey": {
"type": "string",
"description": "Source's API Key",
"description": "Source API Key",
"x-example": "<API_KEY>"
}
},
@@ -36052,6 +36064,20 @@
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "Aggregated number of files transformations per period.",
"items": {
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of files transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@@ -36059,7 +36085,9 @@
"filesTotal",
"filesStorageTotal",
"files",
"storage"
"storage",
"imageTransformations",
"imageTransformationsTotal"
]
},
"usageFunctions": {
@@ -36597,6 +36625,20 @@
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "An array of aggregated number of image transformations.",
"items": {
"$ref": "#\/components\/schemas\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of image transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@@ -36628,7 +36670,9 @@
"authPhoneEstimate",
"authPhoneCountryBreakdown",
"databasesReads",
"databasesWrites"
"databasesWrites",
"imageTransformations",
"imageTransformationsTotal"
]
},
"headers": {
+97 -85
View File
@@ -3077,7 +3077,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"schema": {
"type": "string",
@@ -3098,7 +3098,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@@ -3117,7 +3118,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
]
},
"in": "path"
@@ -5951,8 +5953,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -6190,8 +6190,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -7381,7 +7379,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -10461,7 +10459,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10570,7 +10568,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10597,55 +10595,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthStatus"
}
}
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@@ -10668,7 +10617,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10730,7 +10679,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10792,7 +10741,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10865,7 +10814,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10966,8 +10915,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@@ -11015,7 +10965,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11077,7 +11027,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11139,7 +11089,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11201,7 +11151,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11263,7 +11213,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11303,14 +11253,14 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@@ -11324,13 +11274,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -11365,10 +11315,72 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"content": {
"application\/json": {
"schema": {
"$ref": "#\/components\/schemas\/healthQueue"
}
}
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 5000
},
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"tags": [
"health"
],
@@ -11386,13 +11398,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -11449,7 +11461,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11609,7 +11621,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,
+101 -112
View File
@@ -43,7 +43,7 @@
},
"x-appwrite": {
"method": "get",
"weight": 9,
"weight": 10,
"cookies": false,
"type": "",
"deprecated": false,
@@ -91,7 +91,7 @@
},
"x-appwrite": {
"method": "create",
"weight": 8,
"weight": 9,
"cookies": false,
"type": "",
"deprecated": false,
@@ -175,7 +175,7 @@
},
"x-appwrite": {
"method": "updateEmail",
"weight": 34,
"weight": 35,
"cookies": false,
"type": "",
"deprecated": false,
@@ -250,7 +250,7 @@
},
"x-appwrite": {
"method": "listIdentities",
"weight": 57,
"weight": 58,
"cookies": false,
"type": "",
"deprecated": false,
@@ -308,7 +308,7 @@
},
"x-appwrite": {
"method": "deleteIdentity",
"weight": 58,
"weight": 59,
"cookies": false,
"type": "",
"deprecated": false,
@@ -370,7 +370,7 @@
},
"x-appwrite": {
"method": "createJWT",
"weight": 29,
"weight": 30,
"cookies": false,
"type": "",
"deprecated": false,
@@ -418,7 +418,7 @@
},
"x-appwrite": {
"method": "listLogs",
"weight": 31,
"weight": 32,
"cookies": false,
"type": "",
"deprecated": false,
@@ -483,7 +483,7 @@
},
"x-appwrite": {
"method": "updateMFA",
"weight": 44,
"weight": 45,
"cookies": false,
"type": "",
"deprecated": false,
@@ -552,7 +552,7 @@
},
"x-appwrite": {
"method": "createMfaAuthenticator",
"weight": 46,
"weight": 47,
"cookies": false,
"type": "",
"deprecated": false,
@@ -617,7 +617,7 @@
},
"x-appwrite": {
"method": "updateMfaAuthenticator",
"weight": 47,
"weight": 48,
"cookies": false,
"type": "",
"deprecated": false,
@@ -694,7 +694,7 @@
},
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"weight": 51,
"weight": 52,
"cookies": false,
"type": "",
"deprecated": false,
@@ -761,7 +761,7 @@
},
"x-appwrite": {
"method": "createMfaChallenge",
"weight": 52,
"weight": 53,
"cookies": false,
"type": "",
"deprecated": false,
@@ -834,7 +834,7 @@
},
"x-appwrite": {
"method": "updateMfaChallenge",
"weight": 53,
"weight": 54,
"cookies": false,
"type": "",
"deprecated": false,
@@ -909,7 +909,7 @@
},
"x-appwrite": {
"method": "listMfaFactors",
"weight": 45,
"weight": 46,
"cookies": false,
"type": "",
"deprecated": false,
@@ -959,7 +959,7 @@
},
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"weight": 50,
"weight": 51,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1007,7 +1007,7 @@
},
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"weight": 48,
"weight": 49,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1055,7 +1055,7 @@
},
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"weight": 49,
"weight": 50,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1105,7 +1105,7 @@
},
"x-appwrite": {
"method": "updateName",
"weight": 32,
"weight": 33,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1174,7 +1174,7 @@
},
"x-appwrite": {
"method": "updatePassword",
"weight": 33,
"weight": 34,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1248,7 +1248,7 @@
},
"x-appwrite": {
"method": "updatePhone",
"weight": 35,
"weight": 36,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1323,7 +1323,7 @@
},
"x-appwrite": {
"method": "getPrefs",
"weight": 30,
"weight": 31,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1371,7 +1371,7 @@
},
"x-appwrite": {
"method": "updatePrefs",
"weight": 36,
"weight": 37,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1440,7 +1440,7 @@
},
"x-appwrite": {
"method": "createRecovery",
"weight": 38,
"weight": 39,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1516,7 +1516,7 @@
},
"x-appwrite": {
"method": "updateRecovery",
"weight": 39,
"weight": 40,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1597,7 +1597,7 @@
},
"x-appwrite": {
"method": "listSessions",
"weight": 11,
"weight": 12,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1638,7 +1638,7 @@
},
"x-appwrite": {
"method": "deleteSessions",
"weight": 12,
"weight": 13,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1688,7 +1688,7 @@
},
"x-appwrite": {
"method": "createAnonymousSession",
"weight": 17,
"weight": 18,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1736,7 +1736,7 @@
},
"x-appwrite": {
"method": "createEmailPasswordSession",
"weight": 16,
"weight": 17,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1809,7 +1809,7 @@
},
"x-appwrite": {
"method": "updateMagicURLSession",
"weight": 26,
"weight": 27,
"cookies": false,
"type": "",
"deprecated": true,
@@ -1875,7 +1875,7 @@
},
"x-appwrite": {
"method": "createOAuth2Session",
"weight": 19,
"weight": 20,
"cookies": false,
"type": "webAuth",
"deprecated": false,
@@ -2015,7 +2015,7 @@
},
"x-appwrite": {
"method": "updatePhoneSession",
"weight": 27,
"weight": 28,
"cookies": false,
"type": "",
"deprecated": true,
@@ -2088,7 +2088,7 @@
},
"x-appwrite": {
"method": "createSession",
"weight": 18,
"weight": 19,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2161,7 +2161,7 @@
},
"x-appwrite": {
"method": "getSession",
"weight": 13,
"weight": 14,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2221,7 +2221,7 @@
},
"x-appwrite": {
"method": "updateSession",
"weight": 15,
"weight": 16,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2274,7 +2274,7 @@
},
"x-appwrite": {
"method": "deleteSession",
"weight": 14,
"weight": 15,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2336,7 +2336,7 @@
},
"x-appwrite": {
"method": "updateStatus",
"weight": 37,
"weight": 38,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2386,7 +2386,7 @@
},
"x-appwrite": {
"method": "createPushTarget",
"weight": 54,
"weight": 55,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2464,7 +2464,7 @@
},
"x-appwrite": {
"method": "updatePushTarget",
"weight": 55,
"weight": 56,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2534,7 +2534,7 @@
},
"x-appwrite": {
"method": "deletePushTarget",
"weight": 56,
"weight": 57,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2594,7 +2594,7 @@
},
"x-appwrite": {
"method": "createEmailToken",
"weight": 25,
"weight": 26,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2672,7 +2672,7 @@
},
"x-appwrite": {
"method": "createMagicURLToken",
"weight": 24,
"weight": 25,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2751,7 +2751,7 @@
},
"x-appwrite": {
"method": "createOAuth2Token",
"weight": 23,
"weight": 24,
"cookies": false,
"type": "webAuth",
"deprecated": false,
@@ -2891,7 +2891,7 @@
},
"x-appwrite": {
"method": "createPhoneToken",
"weight": 28,
"weight": 29,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2967,7 +2967,7 @@
},
"x-appwrite": {
"method": "createVerification",
"weight": 40,
"weight": 41,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3034,7 +3034,7 @@
},
"x-appwrite": {
"method": "updateVerification",
"weight": 41,
"weight": 42,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3109,7 +3109,7 @@
},
"x-appwrite": {
"method": "createPhoneVerification",
"weight": 42,
"weight": 43,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3160,7 +3160,7 @@
},
"x-appwrite": {
"method": "updatePhoneVerification",
"weight": 43,
"weight": 44,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3228,7 +3228,7 @@
},
"x-appwrite": {
"method": "getBrowser",
"weight": 60,
"weight": 61,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -3353,7 +3353,7 @@
},
"x-appwrite": {
"method": "getCreditCard",
"weight": 59,
"weight": 60,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -3484,7 +3484,7 @@
},
"x-appwrite": {
"method": "getFavicon",
"weight": 63,
"weight": 64,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -3541,7 +3541,7 @@
},
"x-appwrite": {
"method": "getFlag",
"weight": 61,
"weight": 62,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4028,7 +4028,7 @@
},
"x-appwrite": {
"method": "getImage",
"weight": 62,
"weight": 63,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4109,7 +4109,7 @@
},
"x-appwrite": {
"method": "getInitials",
"weight": 65,
"weight": 66,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4200,7 +4200,7 @@
},
"x-appwrite": {
"method": "getQR",
"weight": 64,
"weight": 65,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4298,7 +4298,7 @@
},
"x-appwrite": {
"method": "listDocuments",
"weight": 109,
"weight": 110,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4382,7 +4382,7 @@
},
"x-appwrite": {
"method": "createDocument",
"weight": 108,
"weight": 109,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4488,7 +4488,7 @@
},
"x-appwrite": {
"method": "getDocument",
"weight": 110,
"weight": 111,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4582,7 +4582,7 @@
},
"x-appwrite": {
"method": "updateDocument",
"weight": 112,
"weight": 113,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4680,7 +4680,7 @@
},
"x-appwrite": {
"method": "deleteDocument",
"weight": 113,
"weight": 114,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4748,7 +4748,7 @@
"tags": [
"functions"
],
"description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.",
"description": "",
"responses": {
"200": {
"description": "Executions List",
@@ -4763,12 +4763,12 @@
},
"x-appwrite": {
"method": "listExecutions",
"weight": 301,
"weight": 383,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "functions\/list-executions.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -4813,17 +4813,6 @@
"default": []
},
"in": "query"
},
{
"name": "search",
"description": "Search term to filter your list results. Max length: 256 chars.",
"required": false,
"schema": {
"type": "string",
"x-example": "<SEARCH>",
"default": ""
},
"in": "query"
}
]
},
@@ -4833,7 +4822,7 @@
"tags": [
"functions"
],
"description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.",
"description": "",
"responses": {
"201": {
"description": "Execution",
@@ -4848,12 +4837,12 @@
},
"x-appwrite": {
"method": "createExecution",
"weight": 300,
"weight": 381,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "functions\/create-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -4947,7 +4936,7 @@
"tags": [
"functions"
],
"description": "Get a function execution log by its unique ID.",
"description": "",
"responses": {
"200": {
"description": "Execution",
@@ -4962,12 +4951,12 @@
},
"x-appwrite": {
"method": "getExecution",
"weight": 302,
"weight": 382,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "functions\/get-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -5035,7 +5024,7 @@
},
"x-appwrite": {
"method": "query",
"weight": 325,
"weight": 303,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5086,7 +5075,7 @@
},
"x-appwrite": {
"method": "mutation",
"weight": 324,
"weight": 302,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5137,7 +5126,7 @@
},
"x-appwrite": {
"method": "get",
"weight": 117,
"weight": 118,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5188,7 +5177,7 @@
},
"x-appwrite": {
"method": "listCodes",
"weight": 118,
"weight": 119,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5239,7 +5228,7 @@
},
"x-appwrite": {
"method": "listContinents",
"weight": 122,
"weight": 123,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5290,7 +5279,7 @@
},
"x-appwrite": {
"method": "listCountries",
"weight": 119,
"weight": 120,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5341,7 +5330,7 @@
},
"x-appwrite": {
"method": "listCountriesEU",
"weight": 120,
"weight": 121,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5392,7 +5381,7 @@
},
"x-appwrite": {
"method": "listCountriesPhones",
"weight": 121,
"weight": 122,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5443,7 +5432,7 @@
},
"x-appwrite": {
"method": "listCurrencies",
"weight": 123,
"weight": 124,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5494,7 +5483,7 @@
},
"x-appwrite": {
"method": "listLanguages",
"weight": 124,
"weight": 125,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5545,7 +5534,7 @@
},
"x-appwrite": {
"method": "createSubscriber",
"weight": 370,
"weight": 348,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5627,7 +5616,7 @@
},
"x-appwrite": {
"method": "deleteSubscriber",
"weight": 374,
"weight": 352,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5701,7 +5690,7 @@
},
"x-appwrite": {
"method": "listFiles",
"weight": 208,
"weight": 209,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5786,7 +5775,7 @@
},
"x-appwrite": {
"method": "createFile",
"weight": 207,
"weight": 208,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -5883,7 +5872,7 @@
},
"x-appwrite": {
"method": "getFile",
"weight": 209,
"weight": 210,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5954,7 +5943,7 @@
},
"x-appwrite": {
"method": "updateFile",
"weight": 214,
"weight": 215,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6042,7 +6031,7 @@
},
"x-appwrite": {
"method": "deleteFile",
"weight": 215,
"weight": 216,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6108,7 +6097,7 @@
},
"x-appwrite": {
"method": "getFileDownload",
"weight": 211,
"weight": 212,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6174,7 +6163,7 @@
},
"x-appwrite": {
"method": "getFilePreview",
"weight": 210,
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6390,7 +6379,7 @@
},
"x-appwrite": {
"method": "getFileView",
"weight": 212,
"weight": 213,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6463,7 +6452,7 @@
},
"x-appwrite": {
"method": "list",
"weight": 219,
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6538,7 +6527,7 @@
},
"x-appwrite": {
"method": "create",
"weight": 218,
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6622,7 +6611,7 @@
},
"x-appwrite": {
"method": "get",
"weight": 220,
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6683,7 +6672,7 @@
},
"x-appwrite": {
"method": "updateName",
"weight": 222,
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6756,7 +6745,7 @@
},
"x-appwrite": {
"method": "delete",
"weight": 224,
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6819,7 +6808,7 @@
},
"x-appwrite": {
"method": "listMemberships",
"weight": 226,
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6904,7 +6893,7 @@
},
"x-appwrite": {
"method": "createMembership",
"weight": 225,
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7014,7 +7003,7 @@
},
"x-appwrite": {
"method": "getMembership",
"weight": 227,
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7085,7 +7074,7 @@
},
"x-appwrite": {
"method": "updateMembership",
"weight": 228,
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7171,7 +7160,7 @@
},
"x-appwrite": {
"method": "deleteMembership",
"weight": 230,
"weight": 231,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7244,7 +7233,7 @@
},
"x-appwrite": {
"method": "updateMembershipStatus",
"weight": 229,
"weight": 230,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7341,7 +7330,7 @@
},
"x-appwrite": {
"method": "getPrefs",
"weight": 221,
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7401,7 +7390,7 @@
},
"x-appwrite": {
"method": "updatePrefs",
"weight": 223,
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+6 -4
View File
@@ -3557,7 +3557,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"type": "string",
"x-example": "amex",
@@ -3577,7 +3577,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@@ -3596,7 +3597,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
],
"in": "path"
},
@@ -4547,7 +4549,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
+135 -91
View File
@@ -3577,7 +3577,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"type": "string",
"x-example": "amex",
@@ -3597,7 +3597,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@@ -3616,7 +3617,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
],
"in": "path"
},
@@ -6607,8 +6609,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -6845,8 +6845,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -8012,7 +8010,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -11810,7 +11808,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11919,7 +11917,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11945,56 +11943,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"schema": {
"$ref": "#\/definitions\/healthStatus"
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@@ -12019,7 +11967,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12080,7 +12028,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12141,7 +12089,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12211,7 +12159,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12309,8 +12257,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@@ -12357,7 +12306,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12418,7 +12367,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12479,7 +12428,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12540,7 +12489,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12601,7 +12550,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12638,10 +12587,10 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"consumes": [
"application\/json"
],
@@ -12651,7 +12600,7 @@
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@@ -12661,13 +12610,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -12699,10 +12648,71 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"schema": {
"$ref": "#\/definitions\/healthQueue"
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 5000,
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"consumes": [
"application\/json"
],
@@ -12722,13 +12732,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -12784,7 +12794,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@@ -12945,7 +12955,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,
@@ -18070,19 +18080,19 @@
},
"endpoint": {
"type": "string",
"description": "Source's Appwrite Endpoint",
"description": "Source Appwrite endpoint",
"default": null,
"x-example": "https:\/\/example.com"
},
"projectId": {
"type": "string",
"description": "Source's Project ID",
"description": "Source Project ID",
"default": null,
"x-example": "<PROJECT_ID>"
},
"apiKey": {
"type": "string",
"description": "Source's API Key",
"description": "Source API Key",
"default": null,
"x-example": "<API_KEY>"
}
@@ -36608,6 +36618,21 @@
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "Aggregated number of files transformations per period.",
"items": {
"type": "object",
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of files transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@@ -36615,7 +36640,9 @@
"filesTotal",
"filesStorageTotal",
"files",
"storage"
"storage",
"imageTransformations",
"imageTransformationsTotal"
]
},
"usageFunctions": {
@@ -37185,6 +37212,21 @@
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformations": {
"type": "array",
"description": "An array of aggregated number of image transformations.",
"items": {
"type": "object",
"$ref": "#\/definitions\/metric"
},
"x-example": []
},
"imageTransformationsTotal": {
"type": "integer",
"description": "Total aggregated number of image transformations.",
"x-example": 0,
"format": "int32"
}
},
"required": [
@@ -37216,7 +37258,9 @@
"authPhoneEstimate",
"authPhoneCountryBreakdown",
"databasesReads",
"databasesWrites"
"databasesWrites",
"imageTransformations",
"imageTransformationsTotal"
]
},
"headers": {
+97 -87
View File
@@ -3261,7 +3261,7 @@
"parameters": [
{
"name": "code",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.",
"description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.",
"required": true,
"type": "string",
"x-example": "amex",
@@ -3281,7 +3281,8 @@
"union-china-pay",
"visa",
"mir",
"maestro"
"maestro",
"rupay"
],
"x-enum-name": "CreditCard",
"x-enum-keys": [
@@ -3300,7 +3301,8 @@
"Union China Pay",
"Visa",
"MIR",
"Maestro"
"Maestro",
"Rupay"
],
"in": "path"
},
@@ -6133,8 +6135,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -6373,8 +6373,6 @@
},
"required": [
"required",
"min",
"max",
"default"
]
}
@@ -7552,7 +7550,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -10689,7 +10687,7 @@
},
"x-appwrite": {
"method": "getCertificate",
"weight": 134,
"weight": 133,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10800,7 +10798,7 @@
},
"x-appwrite": {
"method": "getPubSub",
"weight": 130,
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10827,57 +10825,6 @@
]
}
},
"\/health\/queue": {
"get": {
"summary": "Get queue",
"operationId": "healthGetQueue",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Check the Appwrite queue messaging servers are up and connection is successful.",
"responses": {
"200": {
"description": "Health Status",
"schema": {
"$ref": "#\/definitions\/healthStatus"
}
}
},
"x-appwrite": {
"method": "getQueue",
"weight": 129,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
]
}
},
"\/health\/queue\/builds": {
"get": {
"summary": "Get builds queue",
@@ -10902,7 +10849,7 @@
},
"x-appwrite": {
"method": "getQueueBuilds",
"weight": 136,
"weight": 135,
"cookies": false,
"type": "",
"deprecated": false,
@@ -10964,7 +10911,7 @@
},
"x-appwrite": {
"method": "getQueueCertificates",
"weight": 135,
"weight": 134,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11026,7 +10973,7 @@
},
"x-appwrite": {
"method": "getQueueDatabases",
"weight": 137,
"weight": 136,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11097,7 +11044,7 @@
},
"x-appwrite": {
"method": "getQueueDeletes",
"weight": 138,
"weight": 137,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11197,8 +11144,9 @@
"v1-audits",
"v1-mails",
"v1-functions",
"v1-usage",
"v1-usage-dump",
"v1-stats-resources",
"v1-stats-usage",
"v1-stats-usage-dump",
"v1-webhooks",
"v1-certificates",
"v1-builds",
@@ -11245,7 +11193,7 @@
},
"x-appwrite": {
"method": "getQueueFunctions",
"weight": 142,
"weight": 141,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11307,7 +11255,7 @@
},
"x-appwrite": {
"method": "getQueueLogs",
"weight": 133,
"weight": 132,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11369,7 +11317,7 @@
},
"x-appwrite": {
"method": "getQueueMails",
"weight": 139,
"weight": 138,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11431,7 +11379,7 @@
},
"x-appwrite": {
"method": "getQueueMessaging",
"weight": 140,
"weight": 139,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11493,7 +11441,7 @@
},
"x-appwrite": {
"method": "getQueueMigrations",
"weight": 141,
"weight": 140,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11531,10 +11479,10 @@
]
}
},
"\/health\/queue\/usage": {
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get usage queue",
"operationId": "healthGetQueueUsage",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"consumes": [
"application\/json"
],
@@ -11544,7 +11492,7 @@
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"description": "Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.",
"responses": {
"200": {
"description": "Health Queue",
@@ -11554,13 +11502,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"method": "getQueueStatsResources",
"weight": 142,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md",
"demo": "health\/get-queue-stats-resources.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -11593,10 +11541,72 @@
]
}
},
"\/health\/queue\/usage-dump": {
"\/health\/queue\/stats-usage": {
"get": {
"summary": "Get stats usage queue",
"operationId": "healthGetQueueUsage",
"consumes": [
"application\/json"
],
"produces": [
"application\/json"
],
"tags": [
"health"
],
"description": "Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.",
"responses": {
"200": {
"description": "Health Queue",
"schema": {
"$ref": "#\/definitions\/healthQueue"
}
}
},
"x-appwrite": {
"method": "getQueueUsage",
"weight": 143,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
"scope": "health.read",
"platforms": [
"server"
],
"packaging": false,
"auth": {
"Project": [],
"Key": []
}
},
"security": [
{
"Project": [],
"Key": []
}
],
"parameters": [
{
"name": "threshold",
"description": "Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 5000,
"in": "query"
}
]
}
},
"\/health\/queue\/stats-usage-dump": {
"get": {
"summary": "Get usage dump queue",
"operationId": "healthGetQueueUsageDump",
"operationId": "healthGetQueueStatsUsageDump",
"consumes": [
"application\/json"
],
@@ -11616,13 +11626,13 @@
}
},
"x-appwrite": {
"method": "getQueueUsageDump",
"method": "getQueueStatsUsageDump",
"weight": 144,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "health\/get-queue-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage-dump.md",
"demo": "health\/get-queue-stats-usage-dump.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage-dump.md",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -11679,7 +11689,7 @@
},
"x-appwrite": {
"method": "getQueueWebhooks",
"weight": 132,
"weight": 131,
"cookies": false,
"type": "",
"deprecated": false,
@@ -11843,7 +11853,7 @@
},
"x-appwrite": {
"method": "getTime",
"weight": 131,
"weight": 130,
"cookies": false,
"type": "",
"deprecated": false,
+101 -110
View File
@@ -87,7 +87,7 @@
},
"x-appwrite": {
"method": "get",
"weight": 9,
"weight": 10,
"cookies": false,
"type": "",
"deprecated": false,
@@ -137,7 +137,7 @@
},
"x-appwrite": {
"method": "create",
"weight": 8,
"weight": 9,
"cookies": false,
"type": "",
"deprecated": false,
@@ -227,7 +227,7 @@
},
"x-appwrite": {
"method": "updateEmail",
"weight": 34,
"weight": 35,
"cookies": false,
"type": "",
"deprecated": false,
@@ -306,7 +306,7 @@
},
"x-appwrite": {
"method": "listIdentities",
"weight": 57,
"weight": 58,
"cookies": false,
"type": "",
"deprecated": false,
@@ -367,7 +367,7 @@
},
"x-appwrite": {
"method": "deleteIdentity",
"weight": 58,
"weight": 59,
"cookies": false,
"type": "",
"deprecated": false,
@@ -429,7 +429,7 @@
},
"x-appwrite": {
"method": "createJWT",
"weight": 29,
"weight": 30,
"cookies": false,
"type": "",
"deprecated": false,
@@ -479,7 +479,7 @@
},
"x-appwrite": {
"method": "listLogs",
"weight": 31,
"weight": 32,
"cookies": false,
"type": "",
"deprecated": false,
@@ -545,7 +545,7 @@
},
"x-appwrite": {
"method": "updateMFA",
"weight": 44,
"weight": 45,
"cookies": false,
"type": "",
"deprecated": false,
@@ -617,7 +617,7 @@
},
"x-appwrite": {
"method": "createMfaAuthenticator",
"weight": 46,
"weight": 47,
"cookies": false,
"type": "",
"deprecated": false,
@@ -682,7 +682,7 @@
},
"x-appwrite": {
"method": "updateMfaAuthenticator",
"weight": 47,
"weight": 48,
"cookies": false,
"type": "",
"deprecated": false,
@@ -760,7 +760,7 @@
},
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"weight": 51,
"weight": 52,
"cookies": false,
"type": "",
"deprecated": false,
@@ -827,7 +827,7 @@
},
"x-appwrite": {
"method": "createMfaChallenge",
"weight": 52,
"weight": 53,
"cookies": false,
"type": "",
"deprecated": false,
@@ -903,7 +903,7 @@
},
"x-appwrite": {
"method": "updateMfaChallenge",
"weight": 53,
"weight": 54,
"cookies": false,
"type": "",
"deprecated": false,
@@ -982,7 +982,7 @@
},
"x-appwrite": {
"method": "listMfaFactors",
"weight": 45,
"weight": 46,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1034,7 +1034,7 @@
},
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"weight": 50,
"weight": 51,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1084,7 +1084,7 @@
},
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"weight": 48,
"weight": 49,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1134,7 +1134,7 @@
},
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"weight": 49,
"weight": 50,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1186,7 +1186,7 @@
},
"x-appwrite": {
"method": "updateName",
"weight": 32,
"weight": 33,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1258,7 +1258,7 @@
},
"x-appwrite": {
"method": "updatePassword",
"weight": 33,
"weight": 34,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1336,7 +1336,7 @@
},
"x-appwrite": {
"method": "updatePhone",
"weight": 35,
"weight": 36,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1415,7 +1415,7 @@
},
"x-appwrite": {
"method": "getPrefs",
"weight": 30,
"weight": 31,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1465,7 +1465,7 @@
},
"x-appwrite": {
"method": "updatePrefs",
"weight": 36,
"weight": 37,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1537,7 +1537,7 @@
},
"x-appwrite": {
"method": "createRecovery",
"weight": 38,
"weight": 39,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1617,7 +1617,7 @@
},
"x-appwrite": {
"method": "updateRecovery",
"weight": 39,
"weight": 40,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1703,7 +1703,7 @@
},
"x-appwrite": {
"method": "listSessions",
"weight": 11,
"weight": 12,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1748,7 +1748,7 @@
},
"x-appwrite": {
"method": "deleteSessions",
"weight": 12,
"weight": 13,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1800,7 +1800,7 @@
},
"x-appwrite": {
"method": "createAnonymousSession",
"weight": 17,
"weight": 18,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1850,7 +1850,7 @@
},
"x-appwrite": {
"method": "createEmailPasswordSession",
"weight": 16,
"weight": 17,
"cookies": false,
"type": "",
"deprecated": false,
@@ -1927,7 +1927,7 @@
},
"x-appwrite": {
"method": "updateMagicURLSession",
"weight": 26,
"weight": 27,
"cookies": false,
"type": "",
"deprecated": true,
@@ -2001,7 +2001,7 @@
},
"x-appwrite": {
"method": "createOAuth2Session",
"weight": 19,
"weight": 20,
"cookies": false,
"type": "webAuth",
"deprecated": false,
@@ -2136,7 +2136,7 @@
},
"x-appwrite": {
"method": "updatePhoneSession",
"weight": 27,
"weight": 28,
"cookies": false,
"type": "",
"deprecated": true,
@@ -2213,7 +2213,7 @@
},
"x-appwrite": {
"method": "createSession",
"weight": 18,
"weight": 19,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2290,7 +2290,7 @@
},
"x-appwrite": {
"method": "getSession",
"weight": 13,
"weight": 14,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2350,7 +2350,7 @@
},
"x-appwrite": {
"method": "updateSession",
"weight": 15,
"weight": 16,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2405,7 +2405,7 @@
},
"x-appwrite": {
"method": "deleteSession",
"weight": 14,
"weight": 15,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2467,7 +2467,7 @@
},
"x-appwrite": {
"method": "updateStatus",
"weight": 37,
"weight": 38,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2519,7 +2519,7 @@
},
"x-appwrite": {
"method": "createPushTarget",
"weight": 54,
"weight": 55,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2602,7 +2602,7 @@
},
"x-appwrite": {
"method": "updatePushTarget",
"weight": 55,
"weight": 56,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2673,7 +2673,7 @@
},
"x-appwrite": {
"method": "deletePushTarget",
"weight": 56,
"weight": 57,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2733,7 +2733,7 @@
},
"x-appwrite": {
"method": "createEmailToken",
"weight": 25,
"weight": 26,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2816,7 +2816,7 @@
},
"x-appwrite": {
"method": "createMagicURLToken",
"weight": 24,
"weight": 25,
"cookies": false,
"type": "",
"deprecated": false,
@@ -2905,7 +2905,7 @@
},
"x-appwrite": {
"method": "createOAuth2Token",
"weight": 23,
"weight": 24,
"cookies": false,
"type": "webAuth",
"deprecated": false,
@@ -3040,7 +3040,7 @@
},
"x-appwrite": {
"method": "createPhoneToken",
"weight": 28,
"weight": 29,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3120,7 +3120,7 @@
},
"x-appwrite": {
"method": "createVerification",
"weight": 40,
"weight": 41,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3190,7 +3190,7 @@
},
"x-appwrite": {
"method": "updateVerification",
"weight": 41,
"weight": 42,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3269,7 +3269,7 @@
},
"x-appwrite": {
"method": "createPhoneVerification",
"weight": 42,
"weight": 43,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3322,7 +3322,7 @@
},
"x-appwrite": {
"method": "updatePhoneVerification",
"weight": 43,
"weight": 44,
"cookies": false,
"type": "",
"deprecated": false,
@@ -3401,7 +3401,7 @@
},
"x-appwrite": {
"method": "getBrowser",
"weight": 60,
"weight": 61,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -3527,7 +3527,7 @@
},
"x-appwrite": {
"method": "getCreditCard",
"weight": 59,
"weight": 60,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -3659,7 +3659,7 @@
},
"x-appwrite": {
"method": "getFavicon",
"weight": 63,
"weight": 64,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -3723,7 +3723,7 @@
},
"x-appwrite": {
"method": "getFlag",
"weight": 61,
"weight": 62,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4211,7 +4211,7 @@
},
"x-appwrite": {
"method": "getImage",
"weight": 62,
"weight": 63,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4295,7 +4295,7 @@
},
"x-appwrite": {
"method": "getInitials",
"weight": 65,
"weight": 66,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4387,7 +4387,7 @@
},
"x-appwrite": {
"method": "getQR",
"weight": 64,
"weight": 65,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -4479,7 +4479,7 @@
},
"x-appwrite": {
"method": "listDocuments",
"weight": 109,
"weight": 110,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4560,7 +4560,7 @@
},
"x-appwrite": {
"method": "createDocument",
"weight": 108,
"weight": 109,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4665,7 +4665,7 @@
},
"x-appwrite": {
"method": "getDocument",
"weight": 110,
"weight": 111,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4754,7 +4754,7 @@
},
"x-appwrite": {
"method": "updateDocument",
"weight": 112,
"weight": 113,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4850,7 +4850,7 @@
},
"x-appwrite": {
"method": "deleteDocument",
"weight": 113,
"weight": 114,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4918,7 +4918,7 @@
"tags": [
"functions"
],
"description": "Get a list of all the current user function execution logs. You can use the query params to filter your results.",
"description": "",
"responses": {
"200": {
"description": "Executions List",
@@ -4929,12 +4929,12 @@
},
"x-appwrite": {
"method": "listExecutions",
"weight": 301,
"weight": 383,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "functions\/list-executions.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -4976,15 +4976,6 @@
},
"default": [],
"in": "query"
},
{
"name": "search",
"description": "Search term to filter your list results. Max length: 256 chars.",
"required": false,
"type": "string",
"x-example": "<SEARCH>",
"default": "",
"in": "query"
}
]
},
@@ -5000,7 +4991,7 @@
"tags": [
"functions"
],
"description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.",
"description": "",
"responses": {
"201": {
"description": "Execution",
@@ -5011,12 +5002,12 @@
},
"x-appwrite": {
"method": "createExecution",
"weight": 300,
"weight": 381,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "functions\/create-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -5118,7 +5109,7 @@
"tags": [
"functions"
],
"description": "Get a function execution log by its unique ID.",
"description": "",
"responses": {
"200": {
"description": "Execution",
@@ -5129,12 +5120,12 @@
},
"x-appwrite": {
"method": "getExecution",
"weight": 302,
"weight": 382,
"cookies": false,
"type": "",
"deprecated": false,
"demo": "functions\/get-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md",
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.",
"rate-limit": 0,
"rate-time": 3600,
"rate-key": "url:{url},ip:{ip}",
@@ -5200,7 +5191,7 @@
},
"x-appwrite": {
"method": "query",
"weight": 325,
"weight": 303,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5273,7 +5264,7 @@
},
"x-appwrite": {
"method": "mutation",
"weight": 324,
"weight": 302,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5346,7 +5337,7 @@
},
"x-appwrite": {
"method": "get",
"weight": 117,
"weight": 118,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5399,7 +5390,7 @@
},
"x-appwrite": {
"method": "listCodes",
"weight": 118,
"weight": 119,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5452,7 +5443,7 @@
},
"x-appwrite": {
"method": "listContinents",
"weight": 122,
"weight": 123,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5505,7 +5496,7 @@
},
"x-appwrite": {
"method": "listCountries",
"weight": 119,
"weight": 120,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5558,7 +5549,7 @@
},
"x-appwrite": {
"method": "listCountriesEU",
"weight": 120,
"weight": 121,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5611,7 +5602,7 @@
},
"x-appwrite": {
"method": "listCountriesPhones",
"weight": 121,
"weight": 122,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5664,7 +5655,7 @@
},
"x-appwrite": {
"method": "listCurrencies",
"weight": 123,
"weight": 124,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5717,7 +5708,7 @@
},
"x-appwrite": {
"method": "listLanguages",
"weight": 124,
"weight": 125,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5770,7 +5761,7 @@
},
"x-appwrite": {
"method": "createSubscriber",
"weight": 370,
"weight": 348,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5854,7 +5845,7 @@
},
"x-appwrite": {
"method": "deleteSubscriber",
"weight": 374,
"weight": 352,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5926,7 +5917,7 @@
},
"x-appwrite": {
"method": "listFiles",
"weight": 208,
"weight": 209,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6008,7 +5999,7 @@
},
"x-appwrite": {
"method": "createFile",
"weight": 207,
"weight": 208,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -6099,7 +6090,7 @@
},
"x-appwrite": {
"method": "getFile",
"weight": 209,
"weight": 210,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6168,7 +6159,7 @@
},
"x-appwrite": {
"method": "updateFile",
"weight": 214,
"weight": 215,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6256,7 +6247,7 @@
},
"x-appwrite": {
"method": "deleteFile",
"weight": 215,
"weight": 216,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6327,7 +6318,7 @@
},
"x-appwrite": {
"method": "getFileDownload",
"weight": 211,
"weight": 212,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6398,7 +6389,7 @@
},
"x-appwrite": {
"method": "getFilePreview",
"weight": 210,
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6597,7 +6588,7 @@
},
"x-appwrite": {
"method": "getFileView",
"weight": 212,
"weight": 213,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6668,7 +6659,7 @@
},
"x-appwrite": {
"method": "list",
"weight": 219,
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6742,7 +6733,7 @@
},
"x-appwrite": {
"method": "create",
"weight": 218,
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6833,7 +6824,7 @@
},
"x-appwrite": {
"method": "get",
"weight": 220,
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6894,7 +6885,7 @@
},
"x-appwrite": {
"method": "updateName",
"weight": 222,
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6968,7 +6959,7 @@
},
"x-appwrite": {
"method": "delete",
"weight": 224,
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7031,7 +7022,7 @@
},
"x-appwrite": {
"method": "listMemberships",
"weight": 226,
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7113,7 +7104,7 @@
},
"x-appwrite": {
"method": "createMembership",
"weight": 225,
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7227,7 +7218,7 @@
},
"x-appwrite": {
"method": "getMembership",
"weight": 227,
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7296,7 +7287,7 @@
},
"x-appwrite": {
"method": "updateMembership",
"weight": 228,
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7381,7 +7372,7 @@
},
"x-appwrite": {
"method": "deleteMembership",
"weight": 230,
"weight": 231,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7452,7 +7443,7 @@
},
"x-appwrite": {
"method": "updateMembershipStatus",
"weight": 229,
"weight": 230,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7547,7 +7538,7 @@
},
"x-appwrite": {
"method": "getPrefs",
"weight": 221,
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7607,7 +7598,7 @@
},
"x-appwrite": {
"method": "updatePrefs",
"weight": 223,
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -16,8 +16,6 @@ if (System::getEnv('_APP_ENV') === 'development') {
$url = $protocol . '://' . $hostname;
// TODO: @Meldiron Angular
const TEMPLATE_FRAMEWORKS = [
'SVELTEKIT' => [
'key' => 'sveltekit',
@@ -25,9 +23,9 @@ const TEMPLATE_FRAMEWORKS = [
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'outputDirectory' => './build',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'ssr',
'fallbackFile' => null,
'fallbackFile' => '',
],
'NEXTJS' => [
'key' => 'nextjs',
@@ -35,9 +33,9 @@ const TEMPLATE_FRAMEWORKS = [
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'outputDirectory' => './.next',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'ssr',
'fallbackFile' => null,
'fallbackFile' => '',
],
'NUXT' => [
'key' => 'nuxt',
@@ -45,9 +43,9 @@ const TEMPLATE_FRAMEWORKS = [
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'outputDirectory' => './.output',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'ssr',
'fallbackFile' => null,
'fallbackFile' => '',
],
'REMIX' => [
'key' => 'remix',
@@ -55,9 +53,9 @@ const TEMPLATE_FRAMEWORKS = [
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'outputDirectory' => './build',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'ssr',
'fallbackFile' => null,
'fallbackFile' => '',
],
'ASTRO' => [
'key' => 'astro',
@@ -65,9 +63,9 @@ const TEMPLATE_FRAMEWORKS = [
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'outputDirectory' => './dist',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'ssr',
'fallbackFile' => null,
'fallbackFile' => '',
],
'FLUTTER' => [
'key' => 'flutter',
@@ -75,35 +73,54 @@ const TEMPLATE_FRAMEWORKS = [
'installCommand' => '',
'buildCommand' => 'flutter build web',
'outputDirectory' => './build/web',
'buildRuntime' => 'flutter-3.24',
'buildRuntime' => 'flutter-3.29',
'adapter' => 'static',
'fallbackFile' => null,
'fallbackFile' => '',
],
'OTHER' => [
'key' => 'other',
'name' => 'Other',
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'static',
'fallbackFile' => 'index.html',
],
'VITE' => [
'key' => 'vite',
'name' => 'Vite',
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'buildRuntime' => 'node-22',
'adapter' => 'static',
'outputDirectory' => './dist',
],
'REACT' => [
'key' => 'react',
'name' => 'React',
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'static',
'outputDirectory' => './dist',
'fallbackFile' => 'index.html',
],
'ANGULAR' => [
'key' => 'angular',
'name' => 'Angular',
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'buildRuntime' => 'node-22',
'adapter' => 'static',
'outputDirectory' => './dist/angular/browser',
'fallbackFile' => 'index.html',
],
'VUE' => [
'key' => 'vue',
'name' => 'Vue.js',
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'buildRuntime' => 'ssr-22',
'buildRuntime' => 'node-22',
'adapter' => 'static',
'outputDirectory' => './dist',
'fallbackFile' => 'index.html',
@@ -121,7 +138,8 @@ return [
'key' => 'template-for-onelink',
'name' => 'Onelink template',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/template-for-onelink.png',
'screenshotDark' => $url . '/images/sites/templates/template-for-onelink-dark.png',
'screenshotLight' => $url . '/images/sites/templates/template-for-onelink-light.png',
'frameworks' => [
getFramework('NUXT', [
'providerRootDirectory' => './onelink',
@@ -136,11 +154,141 @@ return [
'providerVersion' => '0.1.*',
'variables' => []
],
[
'key' => 'starter-for-flutter',
'name' => 'Flutter starter',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/starter-for-flutter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-flutter-light.png',
'frameworks' => [
getFramework('FLUTTER', [
'providerRootDirectory' => './',
'buildCommand' => 'sh build.sh',
]),
],
'vcsProvider' => 'github',
'providerRepositoryId' => 'starter-for-flutter',
'providerOwner' => 'appwrite',
'providerVersion' => '0.1.*',
'variables' => [
[
'name' => 'APPWRITE_PUBLIC_ENDPOINT',
'description' => 'Endpoint of Appwrite server',
'value' => '{apiEndpoint}',
'placeholder' => '{apiEndpoint}',
'required' => true,
'type' => 'text'
],
[
'name' => 'APPWRITE_PROJECT_ID',
'description' => 'Your Appwrite project ID',
'value' => '{projectId}',
'placeholder' => '{projectId}',
'required' => true,
'type' => 'text'
],
[
'name' => 'APPWRITE_PROJECT_NAME',
'description' => 'Your Appwrite project name',
'value' => '{projectName}',
'placeholder' => '{projectName}',
'required' => true,
'type' => 'text'
],
]
],
[
'key' => 'starter-for-js',
'name' => 'JavaScript starter',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/starter-for-js-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-js-light.png',
'frameworks' => [
getFramework('VITE', [
'providerRootDirectory' => './',
]),
],
'vcsProvider' => 'github',
'providerRepositoryId' => 'starter-for-js',
'providerOwner' => 'appwrite',
'providerVersion' => '0.1.*',
'variables' => [
[
'name' => 'VITE_APPWRITE_ENDPOINT',
'description' => 'Endpoint of Appwrite server',
'value' => '{apiEndpoint}',
'placeholder' => '{apiEndpoint}',
'required' => true,
'type' => 'text'
],
[
'name' => 'VITE_APPWRITE_PROJECT_ID',
'description' => 'Your Appwrite project ID',
'value' => '{projectId}',
'placeholder' => '{projectId}',
'required' => true,
'type' => 'text'
],
[
'name' => 'VITE_APPWRITE_PROJECT_NAME',
'description' => 'Your Appwrite project name',
'value' => '{projectName}',
'placeholder' => '{projectName}',
'required' => true,
'type' => 'text'
],
]
],
[
'key' => 'starter-for-angular',
'name' => 'Angular starter',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/starter-for-angular-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-angular-light.png',
'frameworks' => [
getFramework('ANGULAR', [
'providerRootDirectory' => './',
'outputDirectory' => './dist/angular-starter-kit-for-appwrite/browser',
'buildCommand' => 'sh prepare-env.sh && npm run build'
]),
],
'vcsProvider' => 'github',
'providerRepositoryId' => 'starter-for-angular',
'providerOwner' => 'appwrite',
'providerVersion' => '0.1.*',
'variables' => [
[
'name' => 'APPWRITE_ENDPOINT',
'description' => 'Endpoint of Appwrite server',
'value' => '{apiEndpoint}',
'placeholder' => '{apiEndpoint}',
'required' => true,
'type' => 'text'
],
[
'name' => 'APPWRITE_PROJECT_ID',
'description' => 'Your Appwrite project ID',
'value' => '{projectId}',
'placeholder' => '{projectId}',
'required' => true,
'type' => 'text'
],
[
'name' => 'APPWRITE_PROJECT_NAME',
'description' => 'Your Appwrite project name',
'value' => '{projectName}',
'placeholder' => '{projectName}',
'required' => true,
'type' => 'text'
],
]
],
[
'key' => 'starter-for-svelte',
'name' => 'Svelte starter',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/starter-for-svelte.png',
'screenshotDark' => $url . '/images/sites/templates/starter-for-svelte-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-svelte-light.png',
'frameworks' => [
getFramework('SVELTEKIT', [
'providerRootDirectory' => './',
@@ -181,7 +329,8 @@ return [
'key' => 'starter-for-react',
'name' => 'React starter',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/starter-for-react.png',
'screenshotDark' => $url . '/images/sites/templates/starter-for-react-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-react-light.png',
'frameworks' => [
getFramework('REACT', [
'providerRootDirectory' => './',
@@ -222,7 +371,8 @@ return [
'key' => 'starter-for-vue',
'name' => 'Vue starter',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/starter-for-vue.png',
'screenshotDark' => $url . '/images/sites/templates/starter-for-vue-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-vue-light.png',
'frameworks' => [
getFramework('VUE', [
'providerRootDirectory' => './',
@@ -263,7 +413,8 @@ return [
'key' => 'starter-for-react-native',
'name' => 'React Native starter',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/starter-for-react-native.png',
'screenshotDark' => $url . '/images/sites/templates/starter-for-react-native-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-react-native-light.png',
'frameworks' => [
getFramework('REACT', [
'providerRootDirectory' => './',
@@ -305,7 +456,8 @@ return [
'key' => 'starter-for-nextjs',
'name' => 'Next.js starter',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/starter-for-nextjs.png',
'screenshotDark' => $url . '/images/sites/templates/starter-for-nextjs-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-nextjs-light.png',
'frameworks' => [
getFramework('NEXTJS', [
'providerRootDirectory' => './',
@@ -346,7 +498,8 @@ return [
'key' => 'starter-for-nuxt',
'name' => 'Nuxt starter',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/starter-for-nuxt.png',
'screenshotDark' => $url . '/images/sites/templates/starter-for-nuxt-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-nuxt-light.png',
'frameworks' => [
getFramework('NUXT', [
'providerRootDirectory' => './',
@@ -387,7 +540,8 @@ return [
'key' => 'template-for-event',
'name' => 'Event template',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/template-for-event.png',
'screenshotDark' => $url . '/images/sites/templates/template-for-event-dark.png',
'screenshotLight' => $url . '/images/sites/templates/template-for-event-light.png',
'frameworks' => [
getFramework('NEXTJS', [
'providerRootDirectory' => './',
@@ -422,7 +576,8 @@ return [
'key' => 'template-for-portfolio',
'name' => 'Portfolio template',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/template-for-portfolio.png',
'screenshotDark' => $url . '/images/sites/templates/template-for-portfolio-dark.png',
'screenshotLight' => $url . '/images/sites/templates/template-for-portfolio-light.png',
'frameworks' => [
getFramework('NEXTJS', [
'providerRootDirectory' => './',
@@ -438,7 +593,8 @@ return [
'key' => 'template-for-store',
'name' => 'Store template',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/template-for-store.png',
'screenshotDark' => $url . '/images/sites/templates/template-for-store-dark.png',
'screenshotLight' => $url . '/images/sites/templates/template-for-store-light.png',
'frameworks' => [
getFramework('SVELTEKIT', [
'providerRootDirectory' => './',
@@ -479,7 +635,8 @@ return [
'key' => 'template-for-blog',
'name' => 'Blog template',
'useCases' => ['starter'],
'demoImage' => $url . '/console/images/sites/templates/template-for-blog.png',
'screenshotDark' => $url . '/images/sites/templates/template-for-blog-dark.png',
'screenshotLight' => $url . '/images/sites/templates/template-for-blog-light.png',
'frameworks' => [
getFramework('SVELTEKIT', [
'providerRootDirectory' => './',
@@ -495,7 +652,8 @@ return [
'key' => 'astro-starter',
'name' => 'Astro starter',
'useCases' => ['starter'],
'demoImage' => '',
'screenshotDark' => $url . '/images/sites/templates/astro-starter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/astro-starter-light.png',
'frameworks' => [
getFramework('ASTRO', [
'providerRootDirectory' => './astro/starter',
@@ -511,7 +669,8 @@ return [
'key' => 'remix-starter',
'name' => 'Remix starter',
'useCases' => ['starter'],
'demoImage' => '',
'screenshotDark' => $url . '/images/sites/templates/remix-starter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/remix-starter-light.png',
'frameworks' => [
getFramework('REMIX', [
'providerRootDirectory' => './remix/starter',
@@ -527,7 +686,8 @@ return [
'key' => 'flutter-starter',
'name' => 'Flutter starter',
'useCases' => ['starter'],
'demoImage' => '',
'screenshotDark' => $url . '/images/sites/templates/flutter-starter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/flutter-starter-light.png',
'frameworks' => [
getFramework('FLUTTER', [
'providerRootDirectory' => './flutter/starter',
@@ -543,6 +703,8 @@ return [
'key' => 'nextjs-starter',
'name' => 'Next.js starter website',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/nextjs-starter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/nextjs-starter-light.png',
'frameworks' => [
getFramework('NEXTJS', [
'providerRootDirectory' => './nextjs/starter',
@@ -558,6 +720,8 @@ return [
'key' => 'nuxt-starter',
'name' => 'Nuxt starter website',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/nuxt-starter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/nuxt-starter-light.png',
'frameworks' => [
getFramework('NUXT', [
'providerRootDirectory' => './nuxt/starter',
@@ -573,6 +737,8 @@ return [
'key' => 'sveltekit-starter',
'name' => 'SvelteKit starter website',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/sveltekit-starter-dark.png',
'screenshotLight' => $url . '/images/sites/templates/sveltekit-starter-light.png',
'frameworks' => [
getFramework('SVELTEKIT', [
'providerRootDirectory' => './sveltekit/starter',
+8 -6
View File
@@ -2400,7 +2400,7 @@ App::put('/v1/account/sessions/phone')
App::post('/v1/account/tokens/phone')
->alias('/v1/account/sessions/phone')
->desc('Create phone token')
->groups(['api', 'account'])
->groups(['api', 'account', 'auth'])
->label('scope', 'sessions.write')
->label('auth.type', 'phone')
->label('audits.event', 'session.create')
@@ -2715,13 +2715,15 @@ App::get('/v1/account/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new EventAudit($dbForProject);
$logs = $audit->getLogsByUser($user->getInternalId(), $limit, $offset);
$logs = $audit->getLogsByUser($user->getInternalId(), $queries);
$output = [];
@@ -2750,7 +2752,7 @@ App::get('/v1/account/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByUser($user->getInternalId()),
'total' => $audit->countLogsByUser($user->getInternalId(), $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
+41 -26
View File
@@ -23,6 +23,7 @@ use Utopia\App;
use Utopia\Audit\Audit;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Authorization as AuthorizationException;
use Utopia\Database\Exception\Conflict as ConflictException;
@@ -242,8 +243,8 @@ function updateAttribute(
string $filter = null,
string|bool|int|float $default = null,
bool $required = null,
int|float $min = null,
int|float $max = null,
int|float|null $min = null,
int|float|null $max = null,
array $elements = null,
array $options = [],
string $newKey = null,
@@ -299,6 +300,9 @@ function updateAttribute(
switch ($attribute->getAttribute('format')) {
case APP_DATABASE_ATTRIBUTE_INT_RANGE:
case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE:
$min ??= $attribute->getAttribute('formatOptions')['min'];
$max ??= $attribute->getAttribute('formatOptions')['max'];
if ($min > $max) {
throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value');
}
@@ -669,13 +673,15 @@ App::get('/v1/databases/:databaseId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'database/' . $databaseId;
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -723,7 +729,7 @@ App::get('/v1/databases/:databaseId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
@@ -1057,14 +1063,21 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs')
throw new Exception(Exception::COLLECTION_NOT_FOUND);
}
$queries = Query::parseQueries($queries);
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
try {
$queries = Query::parseQueries($queries);
} catch (QueryException $e) {
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'database/' . $databaseId . '/collection/' . $collectionId;
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -1112,7 +1125,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
@@ -1550,8 +1563,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) {
// Ensure attribute default is within range
$min = \is_null($min) ? PHP_INT_MIN : $min;
$max = \is_null($max) ? PHP_INT_MAX : $max;
$min ??= PHP_INT_MIN;
$max ??= PHP_INT_MAX;
if ($min > $max) {
throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value');
@@ -1627,8 +1640,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float'
->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) {
// Ensure attribute default is within range
$min = \is_null($min) ? -PHP_FLOAT_MAX : $min;
$max = \is_null($max) ? PHP_FLOAT_MAX : $max;
$min ??= -PHP_FLOAT_MAX;
$max ??= PHP_FLOAT_MAX;
if ($min > $max) {
throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value');
@@ -2339,8 +2352,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('min', null, new Integer(), 'Minimum value to enforce on new documents')
->param('max', null, new Integer(), 'Maximum value to enforce on new documents')
->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true)
->param('max', null, new Integer(), 'Maximum value to enforce on new documents', true)
->param('default', null, new Nullable(new Integer()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
@@ -2398,8 +2411,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float
->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).')
->param('key', '', new Key(), 'Attribute Key.')
->param('required', null, new Boolean(), 'Is attribute required?')
->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents')
->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents')
->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true)
->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents', true)
->param('default', null, new Nullable(new FloatValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.')
->param('newKey', null, new Key(), 'New attribute key.', true)
->inject('response')
@@ -3709,13 +3722,15 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'database/' . $databaseId . '/collection/' . $collectionId . '/document/' . $document->getId();
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -3763,7 +3778,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
+28 -20
View File
@@ -994,13 +994,15 @@ App::get('/v1/messaging/providers/:providerId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'provider/' . $providerId;
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
foreach ($logs as $i => &$log) {
@@ -1047,7 +1049,7 @@ App::get('/v1/messaging/providers/:providerId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
@@ -2222,13 +2224,15 @@ App::get('/v1/messaging/topics/:topicId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'topic/' . $topicId;
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -2276,7 +2280,7 @@ App::get('/v1/messaging/topics/:topicId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
@@ -2632,13 +2636,15 @@ App::get('/v1/messaging/subscribers/:subscriberId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'subscriber/' . $subscriberId;
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -2686,7 +2692,7 @@ App::get('/v1/messaging/subscribers/:subscriberId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
@@ -3397,13 +3403,15 @@ App::get('/v1/messaging/messages/:messageId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'message/' . $messageId;
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -3451,7 +3459,7 @@ App::get('/v1/messaging/messages/:messageId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
+16 -4
View File
@@ -41,14 +41,18 @@ App::get('/v1/project/usage')
->param('endDate', '', new DateTimeValidator(), 'End date for the usage')
->param('period', '1d', new WhiteList(['1h', '1d']), 'Period used', true)
->inject('response')
->inject('project')
->inject('dbForProject')
->inject('getLogsDB')
->inject('smsRates')
->action(function (string $startDate, string $endDate, string $period, Response $response, Database $dbForProject, array $smsRates) {
->action(function (string $startDate, string $endDate, string $period, Response $response, Document $project, Database $dbForProject, callable $getLogsDB, array $smsRates) {
$stats = $total = $usage = [];
$format = 'Y-m-d 00:00:00';
$firstDay = (new DateTime($startDate))->format($format);
$lastDay = (new DateTime($endDate))->format($format);
$dbForLogs = call_user_func($getLogsDB, $project);
$metrics = [
'total' => [
METRIC_EXECUTIONS,
@@ -64,6 +68,7 @@ App::get('/v1/project/usage')
METRIC_BUILDS_STORAGE,
METRIC_DATABASES_OPERATIONS_READS,
METRIC_DATABASES_OPERATIONS_WRITES,
METRIC_FILES_IMAGES_TRANSFORMED,
],
'period' => [
METRIC_NETWORK_REQUESTS,
@@ -76,6 +81,7 @@ App::get('/v1/project/usage')
METRIC_BUILDS_MB_SECONDS,
METRIC_DATABASES_OPERATIONS_READS,
METRIC_DATABASES_OPERATIONS_WRITES,
METRIC_FILES_IMAGES_TRANSFORMED,
]
];
@@ -94,9 +100,11 @@ App::get('/v1/project/usage')
'1d' => 'Y-m-d\T00:00:00.000P',
};
Authorization::skip(function () use ($dbForProject, $firstDay, $lastDay, $period, $metrics, $limit, &$total, &$stats) {
Authorization::skip(function () use ($dbForProject, $dbForLogs, $firstDay, $lastDay, $period, $metrics, $limit, &$total, &$stats) {
foreach ($metrics['total'] as $metric) {
$result = $dbForProject->findOne('stats', [
$db = ($metric === METRIC_FILES_IMAGES_TRANSFORMED) ? $dbForLogs : $dbForProject;
$result = $db->findOne('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', ['inf'])
]);
@@ -104,7 +112,9 @@ App::get('/v1/project/usage')
}
foreach ($metrics['period'] as $metric) {
$results = $dbForProject->find('stats', [
$db = ($metric === METRIC_FILES_IMAGES_TRANSFORMED) ? $dbForLogs : $dbForProject;
$results = $db->find('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', [$period]),
Query::greaterThanEqual('time', $firstDay),
@@ -364,6 +374,8 @@ App::get('/v1/project/usage')
'authPhoneTotal' => $authPhoneTotal,
'authPhoneEstimate' => $authPhoneEstimate,
'authPhoneCountryBreakdown' => $authPhoneCountryBreakdown,
'imageTransformations' => $usage[METRIC_FILES_IMAGES_TRANSFORMED],
'imageTransformationsTotal' => $total[METRIC_FILES_IMAGES_TRANSFORMED],
]), Response::MODEL_USAGE_PROJECT);
});
+23 -22
View File
@@ -6,7 +6,6 @@ use Appwrite\Auth\Auth;
use Appwrite\ClamAV\Network;
use Appwrite\Event\Delete;
use Appwrite\Event\Event;
use Appwrite\Event\StatsUsage;
use Appwrite\Extend\Exception;
use Appwrite\OpenSSL\OpenSSL;
use Appwrite\SDK\AuthType;
@@ -935,15 +934,11 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
->param('rotation', 0, new Range(-360, 360), 'Preview image rotation in degrees. Pass an integer between -360 and 360.', true)
->param('background', '', new HexColor(), 'Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.', true)
->param('output', '', new WhiteList(\array_keys(Config::getParam('storage-outputs')), true), 'Output format type (jpeg, jpg, png, gif and webp).', true)
->inject('request')
->inject('response')
->inject('project')
->inject('dbForProject')
->inject('mode')
->inject('deviceForFiles')
->inject('deviceForLocal')
->inject('queueForStatsUsage')
->action(function (string $bucketId, string $fileId, int $width, int $height, string $gravity, int $quality, int $borderWidth, string $borderColor, int $borderRadius, float $opacity, int $rotation, string $background, string $output, Request $request, Response $response, Document $project, Database $dbForProject, string $mode, Device $deviceForFiles, Device $deviceForLocal, StatsUsage $queueForStatsUsage) {
->action(function (string $bucketId, string $fileId, int $width, int $height, string $gravity, int $quality, int $borderWidth, string $borderColor, int $borderRadius, float $opacity, int $rotation, string $background, string $output, Response $response, Database $dbForProject, Device $deviceForFiles, Device $deviceForLocal) {
if (!\extension_loaded('imagick')) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Imagick extension is missing');
@@ -1071,22 +1066,19 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
$contentType = (\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg'];
$queueForStatsUsage
->addMetric(METRIC_FILES_TRANSFORMATIONS, 1)
->addMetric(str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_TRANSFORMATIONS), 1)
;
$transformedAt = $file->getAttribute('transformedAt', '');
if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $transformedAt) {
$file->setAttribute('transformedAt', DateTime::now());
Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $file->getAttribute('bucketInternalId'), $file->getId(), $file));
//Do not update transformedAt if it's a console user
if (!Auth::isPrivilegedUser(Authorization::getRoles())) {
$transformedAt = $file->getAttribute('transformedAt', '');
if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $transformedAt) {
$file->setAttribute('transformedAt', DateTime::now());
Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $file->getAttribute('bucketInternalId'), $file->getId(), $file));
}
}
$response
->addHeader('Cache-Control', 'private, max-age=2592000') // 30 days
->setContentType($contentType)
->file($data)
;
->file($data);
unset($image);
});
@@ -1879,9 +1871,12 @@ App::get('/v1/storage/:bucketId/usage')
->param('bucketId', '', new UID(), 'Bucket ID.')
->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true)
->inject('response')
->inject('project')
->inject('dbForProject')
->action(function (string $bucketId, string $range, Response $response, Database $dbForProject) {
->inject('getLogsDB')
->action(function (string $bucketId, string $range, Response $response, Document $project, Database $dbForProject, callable $getLogsDB) {
$dbForLogs = call_user_func($getLogsDB, $project);
$bucket = $dbForProject->getDocument('buckets', $bucketId);
if ($bucket->isEmpty()) {
@@ -1894,12 +1889,16 @@ App::get('/v1/storage/:bucketId/usage')
$metrics = [
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES),
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_STORAGE),
str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_IMAGES_TRANSFORMED),
];
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats, &$total) {
Authorization::skip(function () use ($dbForProject, $dbForLogs, $bucket, $days, $metrics, &$stats) {
foreach ($metrics as $metric) {
$result = $dbForProject->findOne('stats', [
$db = ($metric === str_replace('{bucketInternalId}', $bucket->getInternalId(), METRIC_BUCKET_ID_FILES_IMAGES_TRANSFORMED))
? $dbForLogs
: $dbForProject;
$result = $db->findOne('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', ['inf'])
]);
@@ -1907,7 +1906,7 @@ App::get('/v1/storage/:bucketId/usage')
$stats[$metric]['total'] = $result['value'] ?? 0;
$limit = $days['limit'];
$period = $days['period'];
$results = $dbForProject->find('stats', [
$results = $db->find('stats', [
Query::equal('metric', [$metric]),
Query::equal('period', [$period]),
Query::limit($limit),
@@ -1948,5 +1947,7 @@ App::get('/v1/storage/:bucketId/usage')
'filesStorageTotal' => $usage[$metrics[1]]['total'],
'files' => $usage[$metrics[0]]['data'],
'storage' => $usage[$metrics[1]]['data'],
'imageTransformations' => $usage[$metrics[2]]['data'],
'imageTransformationsTotal' => $usage[$metrics[2]]['total'],
]), Response::MODEL_USAGE_BUCKETS);
});
+10 -8
View File
@@ -488,7 +488,7 @@ App::post('/v1/teams/:teamId/memberships')
}
$email = \strtolower($email);
$name = (empty($name)) ? $email : $name;
$name = empty($name) ? $email : $name;
$team = $dbForProject->getDocument('teams', $teamId);
if ($team->isEmpty()) {
@@ -507,7 +507,7 @@ App::post('/v1/teams/:teamId/memberships')
}
$email = $invitee->getAttribute('email', '');
$phone = $invitee->getAttribute('phone', '');
$name = empty($name) ? $invitee->getAttribute('name', '') : $name;
$name = $invitee->getAttribute('name', '') ?: $name;
} elseif (!empty($email)) {
$invitee = $dbForProject->findOne('users', [Query::equal('email', [$email])]); // Get user by email address
if (!$invitee->isEmpty() && !empty($phone) && $invitee->getAttribute('phone', '') !== $phone) {
@@ -715,7 +715,7 @@ App::post('/v1/teams/:teamId/memberships')
->setSubject($subject)
->setBody($body)
->setRecipient($invitee->getAttribute('email'))
->setName($invitee->getAttribute('name'))
->setName($invitee->getAttribute('name', ''))
->setVariables($emailVariables)
->trigger();
@@ -1362,13 +1362,15 @@ App::get('/v1/teams/:teamId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$resource = 'team/' . $team->getId();
$logs = $audit->getLogsByResource($resource, $limit, $offset);
$logs = $audit->getLogsByResource($resource, $queries);
$output = [];
@@ -1415,7 +1417,7 @@ App::get('/v1/teams/:teamId/logs')
}
}
$response->dynamic(new Document([
'total' => $audit->countLogsByResource($resource),
'total' => $audit->countLogsByResource($resource, $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
+7 -5
View File
@@ -862,13 +862,15 @@ App::get('/v1/users/:userId/logs')
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
$grouped = Query::groupByType($queries);
$limit = $grouped['limit'] ?? APP_LIMIT_COUNT;
$offset = $grouped['offset'] ?? 0;
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);
$audit = new Audit($dbForProject);
$logs = $audit->getLogsByUser($user->getInternalId(), $limit, $offset);
$logs = $audit->getLogsByUser($user->getInternalId(), $queries);
$output = [];
@@ -915,7 +917,7 @@ App::get('/v1/users/:userId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByUser($user->getInternalId()),
'total' => $audit->countLogsByUser($user->getInternalId(), $queries),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});
+249 -80
View File
@@ -14,7 +14,6 @@ use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use Appwrite\Vcs\Comment;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
@@ -27,22 +26,35 @@ use Utopia\Database\Helpers\Role;
use Utopia\Database\Query;
use Utopia\Database\Validator\Authorization;
use Utopia\Database\Validator\Query\Cursor;
use Utopia\Detector\Adapter\Bun;
use Utopia\Detector\Adapter\CPP;
use Utopia\Detector\Adapter\Dart;
use Utopia\Detector\Adapter\Deno;
use Utopia\Detector\Adapter\Dotnet;
use Utopia\Detector\Adapter\Java;
use Utopia\Detector\Adapter\JavaScript;
use Utopia\Detector\Adapter\PHP;
use Utopia\Detector\Adapter\Python;
use Utopia\Detector\Adapter\Ruby;
use Utopia\Detector\Adapter\Swift;
use Utopia\Detector\Detector;
use Utopia\Detector\Detection\Framework\Astro;
use Utopia\Detector\Detection\Framework\Flutter;
use Utopia\Detector\Detection\Framework\NextJs;
use Utopia\Detector\Detection\Framework\Nuxt;
use Utopia\Detector\Detection\Framework\Remix;
use Utopia\Detector\Detection\Framework\SvelteKit;
use Utopia\Detector\Detection\Packager\NPM;
use Utopia\Detector\Detection\Packager\PNPM;
use Utopia\Detector\Detection\Packager\Yarn;
use Utopia\Detector\Detection\Runtime\Bun;
use Utopia\Detector\Detection\Runtime\CPP;
use Utopia\Detector\Detection\Runtime\Dart;
use Utopia\Detector\Detection\Runtime\Deno;
use Utopia\Detector\Detection\Runtime\Dotnet;
use Utopia\Detector\Detection\Runtime\Java;
use Utopia\Detector\Detection\Runtime\Node;
use Utopia\Detector\Detection\Runtime\PHP;
use Utopia\Detector\Detection\Runtime\Python;
use Utopia\Detector\Detection\Runtime\Ruby;
use Utopia\Detector\Detection\Runtime\Swift;
use Utopia\Detector\Detector\Framework;
use Utopia\Detector\Detector\Packager;
use Utopia\Detector\Detector\Runtime;
use Utopia\Detector\Detector\Strategy;
use Utopia\System\System;
use Utopia\Validator\Boolean;
use Utopia\Validator\Host;
use Utopia\Validator\Text;
use Utopia\Validator\WhiteList;
use Utopia\VCS\Adapter\Git\GitHub;
use Utopia\VCS\Exception\RepositoryNotFound;
@@ -196,6 +208,17 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
$providerRepositoryOwner = $pullRequestResponse['head']['repo']['name'];
}
$commands = [];
if (!empty($resource->getAttribute('installCommand', ''))) {
$commands[] = $resource->getAttribute('installCommand', '');
}
if (!empty($resource->getAttribute('buildCommand', ''))) {
$commands[] = $resource->getAttribute('buildCommand', '');
}
if (!empty($resource->getAttribute('commands', ''))) {
$commands[] = $resource->getAttribute('commands', '');
}
$deployment = $dbForProject->createDocument('deployments', new Document([
'$id' => $deploymentId,
'$permissions' => [
@@ -207,10 +230,8 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
'resourceInternalId' => $resourceInternalId,
'resourceType' => $resourceCollection,
'entrypoint' => $resource->getAttribute('entrypoint', ''),
'commands' => $resource->getAttribute('commands', ''),
'installCommand' => $resource->getAttribute('installCommand', ''),
'buildCommand' => $resource->getAttribute('buildCommand', ''),
'outputDirectory' => $resource->getAttribute('outputDirectory', ''),
'buildCommands' => \implode(' && ', $commands),
'buildOutput' => $resource->getAttribute('outputDirectory', ''),
'type' => 'vcs',
'installationId' => $installationId,
'installationInternalId' => $installationInternalId,
@@ -246,7 +267,13 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
'projectInternalId' => $project->getInternalId(),
'domain' => $domain,
'type' => 'deployment',
'value' => $deployment->getId(),
'trigger' => 'deployment',
'deploymentId' => $deployment->getId(),
'deploymentInternalId' => $deployment->getInternalId(),
'deploymentResourceType' => 'site',
'deploymentResourceId' => $resourceId,
'deploymentResourceInternalId' => $resourceInternalId,
'deploymentVcsProviderBranch' => $providerBranch,
'status' => 'verified',
'certificateId' => '',
'search' => implode(' ', [$ruleId, $domain]),
@@ -265,8 +292,13 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
'projectInternalId' => $project->getInternalId(),
'domain' => $domain,
'type' => 'deployment',
'value' => $deployment->getId(),
'automation' => 'branch=' . $providerBranch,
'trigger' => 'deployment',
'deploymentId' => $deployment->getId(),
'deploymentInternalId' => $deployment->getInternalId(),
'deploymentResourceType' => 'site',
'deploymentResourceId' => $resourceId,
'deploymentResourceInternalId' => $resourceInternalId,
'deploymentVcsProviderBranch' => $providerBranch,
'status' => 'verified',
'certificateId' => '',
'search' => implode(' ', [$ruleId, $domain]),
@@ -289,8 +321,13 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
'projectInternalId' => $project->getInternalId(),
'domain' => $domain,
'type' => 'deployment',
'value' => $deployment->getId(),
'automation' => 'commit=' . $providerCommitHash,
'trigger' => 'deployment',
'deploymentId' => $deployment->getId(),
'deploymentInternalId' => $deployment->getInternalId(),
'deploymentResourceType' => 'site',
'deploymentResourceId' => $resourceId,
'deploymentResourceInternalId' => $resourceInternalId,
'deploymentVcsProviderBranch' => $providerBranch,
'status' => 'verified',
'certificateId' => '',
'search' => implode(' ', [$ruleId, $domain]),
@@ -592,8 +629,9 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
]), Response::MODEL_VCS_CONTENT_LIST);
});
App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/detection')
->desc('Detect runtime settings from source code')
App::post('/v1/vcs/github/installations/:installationId/detections')
->alias('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/detection')
->desc('Create repository detection')
->groups(['api', 'vcs'])
->label('scope', 'vcs.write')
->label('sdk', new Method(
@@ -604,18 +642,22 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:pr
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
model: Response::MODEL_DETECTION,
model: Response::MODEL_DETECTION_RUNTIME,
),
new SDKResponse(
code: Response::STATUS_CODE_OK,
model: Response::MODEL_DETECTION_FRAMEWORK,
)
]
))
->param('installationId', '', new Text(256), 'Installation Id')
->param('providerRepositoryId', '', new Text(256), 'Repository Id')
->param('type', '', new WhiteList(['runtime', 'framework']), 'Detector type. Must be one of the following: runtime, framework')
->param('providerRootDirectory', '', new Text(256, 0), 'Path to Root Directory', true)
->inject('gitHub')
->inject('response')
->inject('project')
->inject('dbForPlatform')
->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, GitHub $github, Response $response, Document $project, Database $dbForPlatform) {
->action(function (string $installationId, string $providerRepositoryId, string $type, string $providerRootDirectory, GitHub $github, Response $response, Database $dbForPlatform) {
$installation = $dbForPlatform->getDocument('installations', $installationId);
if ($installation->isEmpty()) {
@@ -641,32 +683,108 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:pr
$files = \array_column($files, 'name');
$languages = $github->listRepositoryLanguages($owner, $repositoryName);
$detectorFactory = new Detector($files, $languages);
$detector = new Packager($files);
$detector
->addOption(new Yarn())
->addOption(new PNPM())
->addOption(new NPM());
$detection = $detector->detect();
$detectorFactory
->addDetector(new JavaScript())
->addDetector(new Bun())
->addDetector(new PHP())
->addDetector(new Python())
->addDetector(new Dart())
->addDetector(new Swift())
->addDetector(new Ruby())
->addDetector(new Java())
->addDetector(new CPP())
->addDetector(new Deno())
->addDetector(new Dotnet());
$packager = !\is_null($detection) ? $detection->getName() : 'npm';
$runtime = $detectorFactory->detect();
if ($type === 'framework') {
$output = new Document([
'framework' => '',
'installCommand' => '',
'buildCommand' => '',
'outputDirectory' => '',
]);
$runtimes = Config::getParam('runtimes');
$runtimeDetail = \array_reverse(\array_filter(\array_keys($runtimes), function ($key) use ($runtime, $runtimes) {
return $runtimes[$key]['key'] === $runtime;
}))[0] ?? '';
$detector = new Framework($files, $packager);
$detector
->addOption(new Flutter())
->addOption(new Nuxt())
->addOption(new Astro())
->addOption(new SvelteKit())
->addOption(new NextJs())
->addOption(new Remix());
$detection = [];
$detection['runtime'] = $runtimeDetail;
$framework = $detector->detect();
$response->dynamic(new Document($detection), Response::MODEL_DETECTION);
if (!\is_null($framework)) {
$output->setAttribute('installCommand', $framework->getInstallCommand());
$output->setAttribute('buildCommand', $framework->getBuildCommand());
$output->setAttribute('outputDirectory', $framework->getOutputDirectory());
$framework = $framework->getName();
} else {
$framework = 'other';
$output->setAttribute('installCommand', '');
$output->setAttribute('buildCommand', '');
$output->setAttribute('outputDirectory', '');
}
$frameworks = Config::getParam('frameworks');
if (!\in_array($framework, array_keys($frameworks), true)) {
$framework = 'other';
}
$output->setAttribute('framework', $framework);
} else {
$output = new Document([
'runtime' => '',
'commands' => '',
'entrypoint' => '',
]);
$strategies = [
new Strategy(Strategy::FILEMATCH),
new Strategy(Strategy::LANGUAGES),
new Strategy(Strategy::EXTENSION),
];
foreach ($strategies as $strategy) {
$detector = new Runtime($strategy === Strategy::LANGUAGES ? $languages : $files, $strategy, $packager);
$detector
->addOption(new Node())
->addOption(new Bun())
->addOption(new Deno())
->addOption(new PHP())
->addOption(new Python())
->addOption(new Dart())
->addOption(new Swift())
->addOption(new Ruby())
->addOption(new Java())
->addOption(new CPP())
->addOption(new Dotnet());
$runtime = $detector->detect();
if (!\is_null($runtime)) {
$output->setAttribute('commands', $runtime->getCommands());
$output->setAttribute('entrypoint', $runtime->getEntrypoint());
$runtime = $runtime->getName();
break;
}
}
if (!empty($runtime)) {
$runtimes = Config::getParam('runtimes');
$runtimeWithVersion = '';
foreach ($runtimes as $runtimeKey => $runtimeConfig) {
if ($runtimeConfig['key'] === $runtime) {
$runtimeWithVersion = $runtimeKey;
}
}
if (empty($runtimeWithVersion)) {
throw new Exception(Exception::FUNCTION_RUNTIME_NOT_DETECTED);
}
$output->setAttribute('runtime', $runtimeWithVersion);
} else {
throw new Exception(Exception::FUNCTION_RUNTIME_NOT_DETECTED);
}
}
$response->dynamic($output, $type === 'framework' ? Response::MODEL_DETECTION_FRAMEWORK : Response::MODEL_DETECTION_RUNTIME);
});
App::get('/v1/vcs/github/installations/:installationId/providerRepositories')
@@ -681,17 +799,21 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories')
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
model: Response::MODEL_PROVIDER_REPOSITORY_LIST,
model: Response::MODEL_PROVIDER_REPOSITORY_RUNTIME_LIST,
),
new SDKResponse(
code: Response::STATUS_CODE_OK,
model: Response::MODEL_PROVIDER_REPOSITORY_FRAMEWORK_LIST,
)
]
))
->param('installationId', '', new Text(256), 'Installation Id')
->param('type', '', new WhiteList(['runtime', 'framework']), 'Detector type. Must be one of the following: runtime, framework')
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
->inject('gitHub')
->inject('response')
->inject('project')
->inject('dbForPlatform')
->action(function (string $installationId, string $search, GitHub $github, Response $response, Document $project, Database $dbForPlatform) {
->action(function (string $installationId, string $type, string $search, GitHub $github, Response $response, Database $dbForPlatform) {
if (empty($search)) {
$search = "";
}
@@ -721,39 +843,86 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories')
return $repo;
}, $repos);
$repos = batch(\array_map(function ($repo) use ($github) {
return function () use ($repo, $github) {
try {
$files = $github->listRepositoryContents($repo['organization'], $repo['name'], '');
$files = \array_column($files, 'name');
$repos = batch(\array_map(function ($repo) use ($type, $github) {
return function () use ($repo, $type, $github) {
$files = $github->listRepositoryContents($repo['organization'], $repo['name'], '');
$files = \array_column($files, 'name');
$detector = new Packager($files);
$detector
->addOption(new Yarn())
->addOption(new PNPM())
->addOption(new NPM());
$detection = $detector->detect();
$packager = !\is_null($detection) ? $detection->getName() : 'npm';
if ($type === 'framework') {
$frameworkDetector = new Framework($files, $packager);
$frameworkDetector
->addOption(new Flutter())
->addOption(new Nuxt())
->addOption(new Astro())
->addOption(new SvelteKit())
->addOption(new NextJs())
->addOption(new Remix());
$detectedFramework = $frameworkDetector->detect();
if (!\is_null($detectedFramework)) {
$framework = $detectedFramework->getName();
} else {
$framework = 'other';
}
$frameworks = Config::getParam('frameworks');
if (!\in_array($framework, array_keys($frameworks), true)) {
$framework = 'other';
}
$repo['framework'] = $framework;
} else {
$languages = $github->listRepositoryLanguages($repo['organization'], $repo['name']);
$detectorFactory = new Detector($files, $languages);
$strategies = [
new Strategy(Strategy::FILEMATCH),
new Strategy(Strategy::LANGUAGES),
new Strategy(Strategy::EXTENSION),
];
$detectorFactory
->addDetector(new JavaScript())
->addDetector(new Bun())
->addDetector(new PHP())
->addDetector(new Python())
->addDetector(new Dart())
->addDetector(new Swift())
->addDetector(new Ruby())
->addDetector(new Java())
->addDetector(new CPP())
->addDetector(new Deno())
->addDetector(new Dotnet());
foreach ($strategies as $strategy) {
$detector = new Runtime($strategy === Strategy::LANGUAGES ? $languages : $files, $strategy, $packager);
$detector
->addOption(new Node())
->addOption(new Bun())
->addOption(new Deno())
->addOption(new PHP())
->addOption(new Python())
->addOption(new Dart())
->addOption(new Swift())
->addOption(new Ruby())
->addOption(new Java())
->addOption(new CPP())
->addOption(new Dotnet());
$runtime = $detectorFactory->detect();
$runtime = $detector->detect();
$runtimes = Config::getParam('runtimes');
$runtimeDetail = \array_reverse(\array_filter(\array_keys($runtimes), function ($key) use ($runtime, $runtimes) {
return $runtimes[$key]['key'] === $runtime;
}))[0] ?? '';
if (!\is_null($runtime)) {
$runtime = $runtime->getName();
break;
}
}
$repo['runtime'] = $runtimeDetail;
} catch (Throwable $error) {
$repo['runtime'] = "";
Console::warning("Runtime not detected for " . $repo['organization'] . "/" . $repo['name']);
if (!empty($runtime)) {
$runtimes = Config::getParam('runtimes');
$runtimeWithVersion = '';
foreach ($runtimes as $runtimeKey => $runtimeConfig) {
if ($runtimeConfig['key'] === $runtime) {
$runtimeWithVersion = $runtimeKey;
}
}
$repo['runtime'] = $runtimeWithVersion ?? '';
}
}
return $repo;
};
@@ -764,9 +933,9 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories')
}, $repos);
$response->dynamic(new Document([
'providerRepositories' => $repos,
$type === 'framework' ? 'frameworkProviderRepositories' : 'runtimeProviderRepositories' => $repos,
'total' => \count($repos),
]), Response::MODEL_PROVIDER_REPOSITORY_LIST);
]), ($type === 'framework') ? Response::MODEL_PROVIDER_REPOSITORY_FRAMEWORK_LIST : Response::MODEL_PROVIDER_REPOSITORY_RUNTIME_LIST);
});
App::post('/v1/vcs/github/installations/:installationId/providerRepositories')
+156 -27
View File
@@ -3,6 +3,7 @@
require_once __DIR__ . '/../init.php';
use Ahc\Jwt\JWT;
use Ahc\Jwt\JWTException;
use Appwrite\Auth\Auth;
use Appwrite\Auth\Key;
use Appwrite\Event\Certificate;
@@ -13,16 +14,19 @@ use Appwrite\Extend\Exception as AppwriteException;
use Appwrite\Network\Validator\Origin;
use Appwrite\Platform\Appwrite;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Transformation\Adapter\Preview;
use Appwrite\Transformation\Transformation;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Request\Filters\V16 as RequestV16;
use Appwrite\Utopia\Request\Filters\V17 as RequestV17;
use Appwrite\Utopia\Request\Filters\V18 as RequestV18;
use Appwrite\Utopia\Request\Filters\V19 as RequestV19;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Filters\V16 as ResponseV16;
use Appwrite\Utopia\Response\Filters\V17 as ResponseV17;
use Appwrite\Utopia\Response\Filters\V18 as ResponseV18;
use Appwrite\Utopia\Response\Filters\V19 as ResponseV19;
use Appwrite\Utopia\View;
use Executor\Executor;
use MaxMind\Db\Reader;
@@ -135,7 +139,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
/** @var Database $dbForProject */
$dbForProject = $getProjectDB($project);
$deployment = Authorization::skip(fn () => $dbForProject->getDocument('deployments', $rule->getAttribute('value')));
$deployment = Authorization::skip(fn () => $dbForProject->getDocument('deployments', $rule->getAttribute('deploymentId')));
if ($deployment->getAttribute('resourceType', '') === 'functions') {
$type = 'function';
@@ -147,7 +151,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
Authorization::skip(fn () => $dbForProject->getDocument('functions', $deployment->getAttribute('resourceId', ''))) :
Authorization::skip(fn () => $dbForProject->getDocument('sites', $deployment->getAttribute('resourceId', '')));
$isPreview = $type === 'function' ? false : (!\str_starts_with($rule->getAttribute('automation', ''), 'site='));
$isPreview = $type === 'function' ? false : ($rule->getAttribute('trigger', '') !== 'manual');
$path = ($swooleRequest->server['request_uri'] ?? '/');
$query = ($swooleRequest->server['query_string'] ?? '');
@@ -155,6 +159,80 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
$path .= '?' . $query;
}
$protocol = $request->getProtocol();
/**
Ensure preview authorization
- Authorization is skippable for tests, and build screenshot
- If cookie is not sent by client -> not authorized
- If JWT in cookie is invalid or expired -> not authorized
- If user is blocked or removed -> not authorized
- If user's session is removed or expired -> not authorized
- If user is not member of team of this deployment -> not authorized
- If not authorized, redirect to Console redirect UI
- If authorized, continue as if auth was not required
*/
$requirePreview = \is_null($apiKey) || !$apiKey->isPreviewAuthDisabled();
if ($isPreview && $requirePreview) {
$cookie = $request->getCookie(Auth::$cookieNamePreview, '');
$authorized = false;
// Security checks to mark authorized true
if (!empty($cookie)) {
$jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 3600, 0);
$payload = [];
try {
$payload = $jwt->decode($cookie);
} catch (JWTException $error) {
// Authorized remains false
}
$userExists = false;
$userId = $payload['userId'] ?? '';
if (!empty($userId)) {
$user = Authorization::skip(fn () => $dbForPlatform->getDocument('users', $userId));
if (!$user->isEmpty() && $user->getAttribute('status', false)) {
$userExists = true;
}
}
$sessionExists = false;
$jwtSessionId = $payload['sessionId'] ?? '';
if (!empty($jwtSessionId) && !empty($user->find('$id', $jwtSessionId, 'sessions'))) {
$sessionExists = true;
}
$membershipExists = false;
$project = Authorization::skip(fn () => $dbForPlatform->getDocument('projects', $projectId));
if (!$project->isEmpty() && isset($user)) {
$teamId = $project->getAttribute('teamId', '');
$membership = $user->find('teamId', $teamId, 'memberships');
if (!empty($membership)) {
$membershipExists = true;
}
}
if ($userExists && $sessionExists && $membershipExists) {
$authorized = true;
}
}
if (!$authorized) {
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . "://" . System::getEnv('_APP_DOMAIN');
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Pragma', 'no-cache')
->redirect($url . '/console/auth/preview?'
. \http_build_query([
'projectId' => $projectId,
'origin' => $protocol . '://' . $host,
'path' => $path
]));
return true;
}
}
$body = $swooleRequest->getContent() ?? '';
$method = $swooleRequest->server['request_method'];
@@ -170,11 +248,11 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
$version = match ($type) {
'function' => $resource->getAttribute('version', 'v2'),
'site' => 'v4',
'site' => 'v5',
};
$runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []);
$spec = Config::getParam('runtime-specifications')[$resource->getAttribute('specification', APP_COMPUTE_SPECIFICATION_DEFAULT)];
$spec = Config::getParam('specifications')[$resource->getAttribute('specification', APP_COMPUTE_SPECIFICATION_DEFAULT)];
$runtime = match ($type) {
'function' => $runtimes[$resource->getAttribute('runtime')] ?? null,
@@ -191,13 +269,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
throw new AppwriteException(AppwriteException::FUNCTION_RUNTIME_UNSUPPORTED, 'Runtime "' . $resource->getAttribute('runtime', '') . '" is not supported');
}
/** Check if build has completed */
$build = Authorization::skip(fn () => $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', '')));
if ($build->isEmpty()) {
throw new AppwriteException(AppwriteException::BUILD_NOT_FOUND);
}
if ($build->getAttribute('status') !== 'ready') {
if ($deployment->getAttribute('status') !== 'ready') {
throw new AppwriteException(AppwriteException::BUILD_NOT_READY);
}
@@ -261,7 +333,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
'errors' => '',
'logs' => '',
'duration' => 0.0,
'search' => implode(' ', [$resource->getId(), $executionId]),
]);
if ($type === 'function') {
@@ -348,7 +419,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
try {
$version = match ($type) {
'function' => $resource->getAttribute('version', 'v2'),
'site' => 'v4',
'site' => 'v5',
};
$entrypoint = match ($type) {
'function' => $deployment->getAttribute('entrypoint', ''),
@@ -388,7 +459,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
variables: $vars,
timeout: $resource->getAttribute('timeout', 30),
image: $runtime['image'],
source: $build->getAttribute('path', ''),
source: $deployment->getAttribute('buildPath', ''),
entrypoint: $entrypoint,
version: $version,
path: $path,
@@ -524,15 +595,14 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
$utopia->getRoute()?->label('error', '');
return false;
} elseif ($type === 'redirect') {
$path = ($swooleRequest->server['request_uri'] ?? '/');
$url = $rule->getAttribute('redirectUrl', '');
$query = ($swooleRequest->server['query_string'] ?? '');
if (!empty($query)) {
$path .= '?' . $query;
$url .= '?' . $query;
}
$url = 'https://' . $rule->getAttribute('value', '') . $path;
$response->redirect($url);
$response->redirect($url, \intval($rule->getAttribute('redirectStatusCode', 301)));
return true;
} else {
throw new AppwriteException(AppwriteException::GENERAL_SERVER_ERROR, 'Unknown resource type ' . $type);
@@ -542,7 +612,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
return false;
}
/*
App::init()
->groups(['api'])
->inject('project')
@@ -552,7 +621,6 @@ App::init()
throw new AppwriteException(AppwriteException::GENERAL_BAD_REQUEST, 'Admin mode is not allowed for console project');
}
});
*/
App::init()
->groups(['database', 'functions', 'sites', 'messaging'])
@@ -624,6 +692,9 @@ App::init()
if (version_compare($requestFormat, '1.6.0', '<')) {
$request->addFilter(new RequestV18());
}
if (version_compare($requestFormat, '1.7.0', '<')) {
$request->addFilter(new RequestV19());
}
}
$domain = $request->getHostname();
@@ -773,6 +844,9 @@ App::init()
if (version_compare($responseFormat, '1.6.0', '<')) {
$response->addFilter(new ResponseV18());
}
if (version_compare($responseFormat, '1.7.0', '<')) {
$response->addFilter(new ResponseV19());
}
if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) {
$response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks");
}
@@ -838,8 +912,9 @@ App::options()
->inject('geodb')
->inject('isResourceBlocked')
->inject('previewHostname')
->inject('project')
->inject('apiKey')
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Database $dbForPlatform, callable $getProjectDB, Event $queueForEvents, StatsUsage $queueForStatsUsage, Func $queueForFunctions, Reader $geodb, callable $isResourceBlocked, string $previewHostname, ?Key $apiKey) {
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Database $dbForPlatform, callable $getProjectDB, Event $queueForEvents, StatsUsage $queueForStatsUsage, Func $queueForFunctions, Reader $geodb, callable $isResourceBlocked, string $previewHostname, Document $project, ?Key $apiKey) {
/*
* Appwrite Router
*/
@@ -862,6 +937,16 @@ App::options()
->addHeader('Access-Control-Allow-Origin', $origin)
->addHeader('Access-Control-Allow-Credentials', 'true')
->noContent();
/** OPTIONS requests in utopia do not execute shutdown handlers, as a result we need to track the OPTIONS requests explicitly
* @see https://github.com/utopia-php/http/blob/0.33.16/src/App.php#L825-L855
*/
$queueForStatsUsage
->addMetric(METRIC_NETWORK_REQUESTS, 1)
->addMetric(METRIC_NETWORK_INBOUND, $request->getSize())
->addMetric(METRIC_NETWORK_OUTBOUND, $response->getSize())
->setProject($project)
->trigger();
});
App::error()
@@ -950,11 +1035,9 @@ App::error()
$publish = $error->getCode() === 0 || $error->getCode() >= 500;
}
if ($error->getCode() >= 400 && $error->getCode() < 500) {
$providerConfig = System::getEnv('_APP_EXPERIMENT_LOGGING_CONFIG', '');
if (!empty($providerConfig) && $error->getCode() >= 400 && $error->getCode() < 500) {
// Register error logger
$providerName = System::getEnv('_APP_EXPERIMENT_LOGGING_PROVIDER', '');
$providerConfig = System::getEnv('_APP_EXPERIMENT_LOGGING_CONFIG', '');
try {
$loggingProvider = new DSN($providerConfig ?? '');
$providerName = $loggingProvider->getScheme();
@@ -976,7 +1059,10 @@ App::error()
}
}
if ($publish && $project->getId() !== 'console') {
/**
* If its not a publishable error, track usage stats. Publishable errors are >= 500 or those explicitly marked as publish=true in errors.php
*/
if (!$publish && $project->getId() !== 'console') {
if (!Auth::isPrivilegedUser(Authorization::getRoles())) {
$fileSize = 0;
$file = $request->getFiles('file');
@@ -1251,6 +1337,21 @@ App::get('/v1/ping')
->desc('Test the connection between the Appwrite and the SDK.')
->label('scope', 'global')
->label('event', 'projects.[projectId].ping')
->label('sdk', new Method(
namespace: 'ping',
name: 'get',
hide: true,
description: <<<EOT
Send a ping to project as part of onboarding.
EOT,
auth: [],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
model: Response::MODEL_ANY,
)
],
))
->inject('response')
->inject('project')
->inject('dbForPlatform')
@@ -1278,6 +1379,34 @@ App::get('/v1/ping')
$response->text('Pong!');
});
// Preview authorization
App::get('/_appwrite/authorize')
->inject('request')
->inject('response')
->inject('previewHostname')
->action(function (Request $request, Response $response, string $previewHostname) {
$host = $request->getHostname() ?? '';
if (!empty($previewHostname)) {
$host = $previewHostname;
}
$referrer = $request->getReferer();
$protocol = \parse_url($request->getOrigin($referrer), PHP_URL_SCHEME);
$jwt = $request->getParam('jwt', '');
$path = $request->getParam('path', '');
$duration = 60 * 60 * 24; // 1 day in seconds
$expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), $duration));
$response
->addCookie(Auth::$cookieNamePreview, $jwt, (new \DateTime($expire))->getTimestamp(), '/', $host, ('https' === $protocol), true, null)
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Pragma', 'no-cache')
->redirect($protocol . '://' . $host . $path);
});
App::wildcard()
->groups(['api'])
->label('scope', 'global')
+8 -6
View File
@@ -543,7 +543,7 @@ App::init()
if ($type === 'bucket') {
$bucketId = $parts[1] ?? null;
$bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId));
$bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId));
if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && !$isAppUser && !$isPrivilegedUser)) {
throw new Exception(Exception::STORAGE_BUCKET_NOT_FOUND);
@@ -569,11 +569,13 @@ App::init()
if ($file->isEmpty()) {
throw new Exception(Exception::STORAGE_FILE_NOT_FOUND);
}
$transformedAt = $file->getAttribute('transformedAt', '');
if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $transformedAt) {
$file->setAttribute('transformedAt', DateTime::now());
Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $file->getAttribute('bucketInternalId'), $file->getId(), $file));
//Do not update transformedAt if it's a console user
if (!Auth::isPrivilegedUser(Authorization::getRoles())) {
$transformedAt = $file->getAttribute('transformedAt', '');
if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $transformedAt) {
$file->setAttribute('transformedAt', DateTime::now());
Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $file->getAttribute('bucketInternalId'), $file->getId(), $file));
}
}
}
+51 -1
View File
@@ -29,6 +29,8 @@ use Utopia\Pools\Group;
use Utopia\Swoole\Files;
use Utopia\System\System;
Files::load(__DIR__.'/../public');
const DOMAIN_SYNC_TIMER = 30; // 30 seconds
$domains = new Table(1_000_000); // 1 million rows
@@ -352,6 +354,54 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
}
});
$projectCollections = $collections['projects'];
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
$sharedTablesV1 = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES_V1', ''));
$sharedTablesV2 = \array_diff($sharedTables, $sharedTablesV1);
$cache = $app->getResource('cache');
foreach ($sharedTablesV2 as $hostname) {
$adapter = $pools
->get($hostname)
->pop()
->getResource();
$dbForProject = (new Database($adapter, $cache))
->setDatabase('appwrite')
->setSharedTables(true)
->setTenant(null)
->setNamespace(System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', ''));
try {
Console::success('[Setup] - Creating project database: ' . $hostname . '...');
$dbForProject->create();
} catch (Duplicate) {
Console::success('[Setup] - Skip: metadata table already exists');
}
if ($dbForProject->getCollection(Audit::COLLECTION)->isEmpty()) {
$audit = new Audit($dbForProject);
$audit->setup();
}
foreach ($projectCollections as $key => $collection) {
if (($collection['$collection'] ?? '') !== Database::METADATA) {
continue;
}
if (!$dbForProject->getCollection($key)->isEmpty()) {
continue;
}
$attributes = \array_map(fn ($attribute) => new Document($attribute), $collection['attributes']);
$indexes = \array_map(fn (array $index) => new Document($index), $collection['indexes']);
Console::success('[Setup] - Creating project collection: ' . $collection['$id'] . '...');
$dbForProject->createCollection($key, $attributes, $indexes);
}
}
$pools->reclaim();
Console::success('[Setup] - Server database init completed...');
});
@@ -524,7 +574,7 @@ $http->on('Task', function () use ($register, $domains) {
$sum = count($results);
foreach ($results as $document) {
$domain = $document->getAttribute('domain');
if (str_ends_with($domain, System::getEnv('_APP_DOMAIN_FUNCTIONS'))) {
if (str_ends_with($domain, System::getEnv('_APP_DOMAIN_FUNCTIONS')) || str_ends_with($domain, System::getEnv('_APP_DOMAIN_SITES'))) {
continue;
}
$domains->set(md5($domain), ['value' => 1]);
+13 -47
View File
@@ -36,13 +36,13 @@ use Appwrite\Event\Realtime;
use Appwrite\Event\StatsUsage;
use Appwrite\Event\Webhook;
use Appwrite\Extend\Exception;
use Appwrite\Functions\Specification;
use Appwrite\GraphQL\Promises\Adapter\Swoole;
use Appwrite\GraphQL\Schema;
use Appwrite\Hooks\Hooks;
use Appwrite\Network\Validator\Email;
use Appwrite\Network\Validator\Origin;
use Appwrite\OpenSSL\OpenSSL;
use Appwrite\Platform\Modules\Compute\Specification;
use Appwrite\PubSub\Adapter\Redis as PubSub;
use Appwrite\URL\URL as AppwriteURL;
use Appwrite\Utopia\Request;
@@ -326,6 +326,8 @@ const METRIC_WEBHOOKS = 'webhooks';
const METRIC_PLATFORMS = 'platforms';
const METRIC_PROVIDERS = 'providers';
const METRIC_TOPICS = 'topics';
const METRIC_TARGETS = 'targets';
const METRIC_PROVIDER_TYPE_TARGETS = '{providerType}.targets';
const METRIC_KEYS = 'keys';
const METRIC_RESOURCE_TYPE_ID_BUILDS = '{resourceType}.{resourceInternalId}.builds';
const METRIC_RESOURCE_TYPE_ID_BUILDS_STORAGE = '{resourceType}.{resourceInternalId}.builds.storage';
@@ -364,6 +366,7 @@ Config::load('apis', __DIR__ . '/config/apis.php'); // List of APIs
Config::load('errors', __DIR__ . '/config/errors.php');
Config::load('oAuthProviders', __DIR__ . '/config/oAuthProviders.php');
Config::load('platforms', __DIR__ . '/config/platforms.php');
Config::load('console', __DIR__ . '/config/console.php');
Config::load('collections', __DIR__ . '/config/collections.php');
Config::load('frameworks', __DIR__ . '/config/frameworks.php');
Config::load('runtimes', __DIR__ . '/config/runtimes.php');
@@ -389,10 +392,9 @@ Config::load('storage-logos', __DIR__ . '/config/storage/logos.php');
Config::load('storage-mimes', __DIR__ . '/config/storage/mimes.php');
Config::load('storage-inputs', __DIR__ . '/config/storage/inputs.php');
Config::load('storage-outputs', __DIR__ . '/config/storage/outputs.php');
Config::load('runtime-specifications', __DIR__ . '/config/runtimes/specifications.php');
Config::load('framework-specifications', __DIR__ . '/config/frameworks/specifications.php');
Config::load('function-templates', __DIR__ . '/config/function-templates.php');
Config::load('site-templates', __DIR__ . '/config/site-templates.php');
Config::load('specifications', __DIR__ . '/config/specifications.php');
Config::load('templates-function', __DIR__ . '/config/templates/function.php');
Config::load('templates-site', __DIR__ . '/config/templates/site.php');
/**
* New DB Filters
@@ -837,6 +839,10 @@ $register->set('logger', function () {
$providerName = System::getEnv('_APP_LOGGING_PROVIDER', '');
$providerConfig = System::getEnv('_APP_LOGGING_CONFIG', '');
if (empty($providerConfig)) {
return;
}
try {
$loggingProvider = new DSN($providerConfig ?? '');
@@ -1220,9 +1226,6 @@ App::setResource('queueForAudits', function (Queue\Publisher $publisher) {
App::setResource('queueForFunctions', function (Queue\Publisher $publisher) {
return new Func($publisher);
}, ['publisher']);
App::setResource('queueForUsage', function (Queue\Publisher $publisher) {
return new Usage($publisher);
}, ['publisher']);
App::setResource('queueForCertificates', function (Queue\Publisher $publisher) {
return new Certificate($publisher);
}, ['publisher']);
@@ -1427,45 +1430,7 @@ App::setResource('session', function (Document $user) {
}, ['user']);
App::setResource('console', function () {
return new Document([
'$id' => ID::custom('console'),
'$internalId' => ID::custom('console'),
'name' => 'Appwrite',
'$collection' => ID::custom('projects'),
'description' => 'Appwrite core engine',
'logo' => '',
'teamId' => null,
'webhooks' => [],
'keys' => [],
'platforms' => [
[
'$collection' => ID::custom('platforms'),
'name' => 'Localhost',
'type' => Origin::CLIENT_TYPE_WEB,
'hostname' => 'localhost',
], // Current host is added on app init
],
'legalName' => '',
'legalCountry' => '',
'legalState' => '',
'legalCity' => '',
'legalAddress' => '',
'legalTaxId' => '',
'auths' => [
'mockNumbers' => [],
'invites' => System::getEnv('_APP_CONSOLE_INVITES', 'enabled') === 'enabled',
'limit' => (System::getEnv('_APP_CONSOLE_WHITELIST_ROOT', 'enabled') === 'enabled') ? 1 : 0, // limit signup to 1 user
'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, // 1 Year in seconds
'sessionAlerts' => System::getEnv('_APP_CONSOLE_SESSION_ALERTS', 'disabled') === 'enabled'
],
'authWhitelistEmails' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null)) : [],
'authWhitelistIPs' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null)) : [],
'oAuthProviders' => [
'githubEnabled' => true,
'githubSecret' => System::getEnv('_APP_CONSOLE_GITHUB_SECRET', ''),
'githubAppid' => System::getEnv('_APP_CONSOLE_GITHUB_APP_ID', '')
],
]);
return new Document(Config::getParam('console'));
}, []);
App::setResource('dbForProject', function (Group $pools, Database $dbForPlatform, Cache $cache, Document $project) {
@@ -1977,6 +1942,7 @@ App::setResource('previewHostname', function (Request $request, ?Key $apiKey) {
}
}
return '';
}, ['request', 'apiKey']);
+10 -10
View File
@@ -13,12 +13,12 @@ use Appwrite\Event\Func;
use Appwrite\Event\Mail;
use Appwrite\Event\Messaging;
use Appwrite\Event\Migration;
use Appwrite\Event\Realtime;
use Appwrite\Event\StatsUsage;
use Appwrite\Event\StatsUsageDump;
/** remove */
use Appwrite\Event\Usage;
use Appwrite\Event\UsageDump;
/** /remove */
use Appwrite\Event\Webhook;
use Appwrite\Platform\Appwrite;
use Swoole\Runtime;
use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis;
@@ -269,14 +269,6 @@ Server::setResource('consumer', function (Group $pools) {
return $pools->get('consumer')->pop()->getResource();
}, ['pools']);
Server::setResource('queueForUsage', function (Publisher $publisher) {
return new Usage($publisher);
}, ['publisher']);
Server::setResource('queueForUsageDump', function (Publisher $publisher) {
return new UsageDump($publisher);
}, ['publisher']);
Server::setResource('queueForStatsUsage', function (Publisher $publisher) {
return new StatsUsage($publisher);
}, ['publisher']);
@@ -313,10 +305,18 @@ Server::setResource('queueForAudits', function (Publisher $publisher) {
return new Audit($publisher);
}, ['publisher']);
Server::setResource('queueForWebhooks', function (Publisher $publisher) {
return new Webhook($publisher);
}, ['publisher']);
Server::setResource('queueForFunctions', function (Publisher $publisher) {
return new Func($publisher);
}, ['publisher']);
Server::setResource('queueForRealtime', function () {
return new Realtime();
}, []);
Server::setResource('queueForCertificates', function (Publisher $publisher) {
return new Certificate($publisher);
}, ['publisher']);
Executable
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
php /usr/src/code/app/cli.php screenshot $@
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
php /usr/src/code/app/worker.php usage $@
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
php /usr/src/code/app/worker.php usage-dump $@
+14 -13
View File
@@ -44,23 +44,24 @@
"ext-openssl": "*",
"ext-zlib": "*",
"ext-sockets": "*",
"appwrite/php-runtimes": "0.17.*",
"appwrite/php-runtimes": "0.18.*",
"appwrite/php-clamav": "2.0.*",
"utopia-php/abuse": "0.50.*",
"utopia-php/abuse": "0.51.*",
"utopia-php/analytics": "0.10.*",
"utopia-php/audit": "0.51.*",
"utopia-php/cache": "0.11.*",
"utopia-php/audit": "0.54.0",
"utopia-php/cache": "0.12.*",
"utopia-php/cli": "0.15.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.59.0",
"utopia-php/detector": "0.1.*",
"utopia-php/database": "0.60.*",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "0.33.*",
"utopia-php/fetch": "0.3.*",
"utopia-php/image": "0.7.*",
"utopia-php/image": "0.8.*",
"utopia-php/locale": "0.4.*",
"utopia-php/logger": "0.6.*",
"utopia-php/messaging": "0.14.*",
"utopia-php/messaging": "0.16.*",
"utopia-php/migration": "0.6.*",
"utopia-php/orchestration": "0.9.*",
"utopia-php/platform": "0.7.3",
@@ -72,7 +73,7 @@
"utopia-php/swoole": "0.8.*",
"utopia-php/system": "0.9.*",
"utopia-php/telemetry": "0.1.*",
"utopia-php/vcs": "0.8.*",
"utopia-php/vcs": "0.9.*",
"utopia-php/websocket": "0.1.*",
"matomo/device-detector": "6.1.*",
"dragonmantank/cron-expression": "3.3.2",
@@ -86,12 +87,12 @@
"require-dev": {
"ext-fileinfo": "*",
"appwrite/sdk-generator": "0.40.*",
"phpunit/phpunit": "9.5.20",
"phpunit/phpunit": "9.*",
"swoole/ide-helper": "5.1.2",
"textalk/websocket": "1.5.7",
"laravel/pint": "^1.14",
"phpbench/phpbench": "^1.2",
"phpstan/phpstan": "1.8.*"
"phpstan/phpstan": "1.8.*",
"textalk/websocket": "1.5.*",
"laravel/pint": "1.*",
"phpbench/phpbench": "1.*"
},
"provide": {
"ext-phpiredis": "*"
Generated
+244 -544
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -206,7 +206,7 @@ services:
appwrite-console:
<<: *x-logging
container_name: appwrite-console
image: appwrite/console:5.3.0-sites-rc.16
image: appwrite/console:5.3.0-sites-rc.24
restart: unless-stopped
networks:
- appwrite
@@ -953,7 +953,7 @@ services:
appwrite-browser:
container_name: appwrite-browser
image: appwrite/browser:0.2.0
image: appwrite/browser:0.2.2
networks:
- appwrite
@@ -962,7 +962,7 @@ services:
hostname: exc1
<<: *x-logging
stop_signal: SIGINT
image: openruntimes/executor:0.7.6
image: openruntimes/executor:0.7.10
restart: unless-stopped
networks:
- appwrite
@@ -985,7 +985,7 @@ services:
- OPR_EXECUTOR_ENV=$_APP_ENV
- OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES,$_APP_SITES_RUNTIMES
- OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET
- OPR_EXECUTOR_RUNTIME_VERSIONS=v2,v4,v4rc
- OPR_EXECUTOR_RUNTIME_VERSIONS=v2,v5
- OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG
- OPR_EXECUTOR_STORAGE_DEVICE=$_APP_STORAGE_DEVICE
- OPR_EXECUTOR_STORAGE_S3_ACCESS_KEY=$_APP_STORAGE_S3_ACCESS_KEY
@@ -1,23 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.getDeploymentDownload(
"<FUNCTION_ID>", // functionId
"<DEPLOYMENT_ID>", // deploymentId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -1,22 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.getTemplate(
"<TEMPLATE_ID>", // templateId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -1,25 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Functions;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
functions.listTemplates(
listOf(), // runtimes (optional)
listOf(), // useCases (optional)
1, // limit (optional)
0, // offset (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
@@ -1,14 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val result = functions.getDeploymentDownload(
functionId = "<FUNCTION_ID>",
deploymentId = "<DEPLOYMENT_ID>",
)
@@ -1,13 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val result = functions.getTemplate(
templateId = "<TEMPLATE_ID>",
)
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Functions
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
val functions = Functions(client)
val result = functions.listTemplates(
runtimes = listOf(), // (optional)
useCases = listOf(), // (optional)
limit = 1, // (optional)
offset = 0, // (optional)
)
@@ -6,7 +6,7 @@ let client = Client()
let account = Account(client)
let result = try await account.updateMfaChallenge(
let session = try await account.updateMfaChallenge(
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
)
@@ -1,13 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let bytes = try await functions.getDeploymentDownload(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
)
@@ -1,12 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let templateFunction = try await functions.getTemplate(
templateId: "<TEMPLATE_ID>"
)
@@ -1,15 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
let functions = Functions(client)
let templateFunctionList = try await functions.listTemplates(
runtimes: [], // optional
useCases: [], // optional
limit: 1, // optional
offset: 0 // optional
)
@@ -6,7 +6,7 @@ Client client = Client()
Account account = Account(client);
result = await account.updateMfaChallenge(
Session result = await account.updateMfaChallenge(
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>',
);
@@ -1,29 +0,0 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
// Downloading file
UInt8List bytes = await functions.getDeploymentDownload(
functionId: '<FUNCTION_ID>',
deploymentId: '<DEPLOYMENT_ID>',
)
final file = File('path_to_file/filename.ext');
file.writeAsBytesSync(bytes);
// Displaying image preview
FutureBuilder(
future: functions.getDeploymentDownload(
functionId:'<FUNCTION_ID>' ,
deploymentId:'<DEPLOYMENT_ID>' ,
), // Works for both public file and private file, for private files you need to be logged in
builder: (context, snapshot) {
return snapshot.hasData && snapshot.data != null
? Image.memory(snapshot.data)
: CircularProgressIndicator();
}
);
@@ -1,11 +0,0 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunction result = await functions.getTemplate(
templateId: '<TEMPLATE_ID>',
);
@@ -1,14 +0,0 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunctionList result = await functions.listTemplates(
runtimes: [], // optional
useCases: [], // optional
limit: 1, // optional
offset: 0, // optional
);
@@ -3,6 +3,34 @@ mutation {
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
) {
status
_id
_createdAt
_updatedAt
userId
expire
provider
providerUid
providerAccessToken
providerAccessTokenExpiry
providerRefreshToken
ip
osCode
osName
osVersion
clientType
clientCode
clientName
clientVersion
clientEngine
clientEngineVersion
deviceName
deviceBrand
deviceModel
countryCode
countryName
current
factors
secret
mfaUpdatedAt
}
}
@@ -1,8 +0,0 @@
query {
functionsGetDeploymentDownload(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
) {
status
}
}
@@ -1,35 +0,0 @@
query {
functionsGetTemplate(
templateId: "<TEMPLATE_ID>"
) {
icon
id
name
tagline
permissions
events
cron
timeout
useCases
runtimes {
name
commands
entrypoint
providerRootDirectory
}
instructions
vcsProvider
providerRepositoryId
providerOwner
providerVersion
variables {
name
description
value
placeholder
required
type
}
scopes
}
}
@@ -1,41 +0,0 @@
query {
functionsListTemplates(
runtimes: [],
useCases: [],
limit: 1,
offset: 0
) {
total
templates {
icon
id
name
tagline
permissions
events
cron
timeout
useCases
runtimes {
name
commands
entrypoint
providerRootDirectory
}
instructions
vcsProvider
providerRepositoryId
providerOwner
providerVersion
variables {
name
description
value
placeholder
required
type
}
scopes
}
}
}
@@ -1,14 +0,0 @@
import { Client, Functions } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = functions.getDeploymentDownload(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
console.log(result);
@@ -1,13 +0,0 @@
import { Client, Functions } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);
console.log(result);
@@ -1,16 +0,0 @@
import { Client, Functions } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);
console.log(result);
@@ -1,8 +0,0 @@
GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Session:
X-Appwrite-JWT: <YOUR_JWT>
@@ -1,6 +0,0 @@
GET /v1/functions/templates/{templateId} HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
@@ -1,6 +0,0 @@
GET /v1/functions/templates HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
@@ -1,14 +0,0 @@
import { Client, Functions } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = functions.getDeploymentDownload(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
console.log(result);
@@ -1,13 +0,0 @@
import { Client, Functions } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);
console.log(result);
@@ -1,16 +0,0 @@
import { Client, Functions } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);
console.log(result);
@@ -1,3 +0,0 @@
appwrite functions downloadDeployment \
--functionId <FUNCTION_ID> \
--deploymentId <DEPLOYMENT_ID>
@@ -1 +0,0 @@
appwrite functions getSpecifications
@@ -1,3 +0,0 @@
appwrite migrations createFirebaseOAuthMigration \
--resources one two three \
--projectId <PROJECT_ID>
@@ -1 +0,0 @@
appwrite migrations deleteFirebaseAuth
@@ -1,3 +0,0 @@
appwrite migrations getFirebaseReportOAuth \
--resources one two three \
--projectId <PROJECT_ID>
@@ -1 +0,0 @@
appwrite migrations listFirebaseProjects
@@ -1,14 +0,0 @@
import { Client, Functions } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = functions.downloadDeployment(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
console.log(result);
@@ -1,11 +0,0 @@
import { Client, Functions } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.getSpecifications();
console.log(result);
@@ -1,14 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.createFirebaseOAuthMigration(
[], // resources
'<PROJECT_ID>' // projectId
);
console.log(result);
@@ -1,11 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.deleteFirebaseAuth();
console.log(result);
@@ -1,14 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.getFirebaseReportOAuth(
[], // resources
'<PROJECT_ID>' // projectId
);
console.log(result);
@@ -1,11 +0,0 @@
import { Client, Migrations } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const migrations = new Migrations(client);
const result = await migrations.listFirebaseProjects();
console.log(result);
@@ -7,7 +7,7 @@ Client client = Client()
Account account = Account(client);
result = await account.updateMfaChallenge(
Session result = await account.updateMfaChallenge(
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>',
);
@@ -1,13 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Functions functions = Functions(client);
UInt8List result = await functions.downloadDeployment(
functionId: '<FUNCTION_ID>',
deploymentId: '<DEPLOYMENT_ID>',
);
@@ -1,11 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunction result = await functions.getTemplate(
templateId: '<TEMPLATE_ID>',
);
@@ -1,14 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Functions functions = Functions(client);
TemplateFunctionList result = await functions.listTemplates(
runtimes: [], // (optional)
useCases: [], // (optional)
limit: 1, // (optional)
offset: 0, // (optional)
);
@@ -1,13 +0,0 @@
import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const functions = new Functions(client);
const result = functions.downloadDeployment(
'<FUNCTION_ID>', // functionId
'<DEPLOYMENT_ID>' // deploymentId
);
@@ -1,11 +0,0 @@
import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const response = await functions.getTemplate(
'<TEMPLATE_ID>' // templateId
);
@@ -1,14 +0,0 @@
import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const response = await functions.listTemplates(
[], // runtimes (optional)
[], // useCases (optional)
1, // limit (optional)
0 // offset (optional)
);
@@ -9,7 +9,7 @@ Client client = new Client()
Account account = new Account(client);
result = await account.UpdateMfaChallenge(
Session result = await account.UpdateMfaChallenge(
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
);
@@ -1,15 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Functions functions = new Functions(client);
byte[] result = await functions.DownloadDeployment(
functionId: "<FUNCTION_ID>",
deploymentId: "<DEPLOYMENT_ID>"
);
@@ -1,13 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
TemplateFunction result = await functions.GetTemplate(
templateId: "<TEMPLATE_ID>"
);
@@ -1,16 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
Functions functions = new Functions(client);
TemplateFunctionList result = await functions.ListTemplates(
runtimes: new List<string>(), // optional
useCases: new List<string>(), // optional
limit: 1, // optional
offset: 0 // optional
);
@@ -1,27 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/functions"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("") // Your project ID
client.SetKey("") // Your secret API key
service := functions.NewFunctions(client)
response, error := service.DownloadDeployment(
"<FUNCTION_ID>",
"<DEPLOYMENT_ID>",
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -1,25 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/functions"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := functions.NewFunctions(client)
response, error := service.GetTemplate(
"<TEMPLATE_ID>",
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -1,28 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/functions"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
service := functions.NewFunctions(client)
response, error := service.ListTemplates(
functions.WithListTemplatesRuntimes([]interface{}{}),
functions.WithListTemplatesUseCases([]interface{}{}),
functions.WithListTemplatesLimit(1),
functions.WithListTemplatesOffset(0),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -3,6 +3,34 @@ mutation {
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
) {
status
_id
_createdAt
_updatedAt
userId
expire
provider
providerUid
providerAccessToken
providerAccessTokenExpiry
providerRefreshToken
ip
osCode
osName
osVersion
clientType
clientCode
clientName
clientVersion
clientEngine
clientEngineVersion
deviceName
deviceBrand
deviceModel
countryCode
countryName
current
factors
secret
mfaUpdatedAt
}
}

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