diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000000..48b77eb4f8 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,16 @@ +name: "Static code analysis" + +on: [pull_request] +jobs: + lint: + name: CodeQL + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Run CodeQL + run: | + docker run --rm -v $PWD:/app composer:2.6 sh -c \ + "composer install --profile --ignore-platform-reqs && composer check" \ No newline at end of file diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index a5fedb6461..8a46bfd3ec 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -1185,6 +1185,39 @@ return [ 'default' => false, 'array' => false, ], + [ + '$id' => ID::custom('personalAccessToken'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], + [ + '$id' => ID::custom('personalAccessTokenExpiry'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('personalRefreshToken'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], ], 'indexes' => [ diff --git a/app/config/errors.php b/app/config/errors.php index 4a36cee152..6e9f06d33a 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -375,6 +375,13 @@ return [ 'code' => 409, ], + /** Console */ + Exception::RESOURCE_ALREADY_EXISTS => [ + 'name' => Exception::RESOURCE_ALREADY_EXISTS, + 'description' => 'Resource with the requested ID already exists. Please choose a different ID and try again.', + 'code' => 409, + ], + /** Membership */ Exception::MEMBERSHIP_NOT_FOUND => [ 'name' => Exception::MEMBERSHIP_NOT_FOUND, @@ -868,6 +875,11 @@ return [ 'description' => 'Variable with the same ID already exists in this project. Try again with a different ID.', 'code' => 409, ], + Exception::VARIABLE_CANNOT_UNSET_SECRET => [ + 'name' => Exception::VARIABLE_CANNOT_UNSET_SECRET, + 'description' => 'Secret variables cannot be marked as non-secret. Please re-create the variable if this is your intention.', + 'code' => 400, + ], Exception::GRAPHQL_NO_QUERY => [ 'name' => Exception::GRAPHQL_NO_QUERY, 'description' => 'Param "query" is not optional.', diff --git a/app/config/roles.php b/app/config/roles.php index 8bc25cfba2..a4abee0c45 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -26,6 +26,7 @@ $member = [ 'subscribers.write', 'subscribers.read', 'assistant.read', + 'rules.read' ]; $admins = [ diff --git a/app/config/site-templates.php b/app/config/site-templates.php index 64696cedfa..64d8cf3729 100644 --- a/app/config/site-templates.php +++ b/app/config/site-templates.php @@ -1,9 +1,21 @@ 'nextjs-starter', - 'name' => 'Next.js starter website', + 'key' => 'starter-for-svelte', + 'name' => 'Svelte starter', 'useCases' => ['starter'], - 'demoUrl' => 'https://nextjs-starter.sites.qa17.appwrite.org/', - 'demoImage' => 'https://qa17.appwrite.org/console/images/sites/templates/nextjs-starter.png', + 'demoImage' => $url . '/console/images/sites/templates/starter-for-svelte.png', + 'frameworks' => [ + getFramework('SVELTEKIT', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-svelte', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'PUBLIC_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'PUBLIC_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'PUBLIC_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'starter-for-nextjs', + 'name' => 'Next.js starter', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/starter-for-nextjs.png', + 'frameworks' => [ + getFramework('NEXTJS', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-nextjs', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'NEXT_PUBLIC_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'NEXT_PUBLIC_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'NEXT_PUBLIC_APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'template-for-event', + 'name' => 'Event template', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/template-for-event.png', + 'frameworks' => [ + getFramework('NEXTJS', [ + 'providerRootDirectory' => './', + 'installCommand' => 'pnpm install', + 'buildCommand' => 'npm run build', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'template-for-event', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'NEXT_PUBLIC_APPWRITE_FUNCTION_PROJECT_ID', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'NEXT_PUBLIC_APPWRITE_FUNCTION_API_ENDPOINT', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'template-for-portfolio', + 'name' => 'Portfolio template', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/template-for-portfolio.png', + 'frameworks' => [ + getFramework('NEXTJS', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'template-for-portfolio', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [] + ], + [ + 'key' => 'template-for-store', + 'name' => 'Store template', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/template-for-store.png', + 'frameworks' => [ + getFramework('SVELTEKIT', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'template-for-store', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'STRIPE_SECRET_KEY', + 'description' => 'Your Stripe secret key', + 'value' => 'disabled', + 'placeholder' => 'sk_.....', + 'required' => false, + 'type' => 'password' + ], + [ + 'name' => 'PUBLIC_APPWRITE_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'PUBLIC_APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + ] + ], + [ + 'key' => 'template-for-blog', + 'name' => 'Blog template', + 'useCases' => ['starter'], + 'demoImage' => $url . '/console/images/sites/templates/template-for-blog.png', + 'frameworks' => [ + getFramework('SVELTEKIT', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'template-for-blog', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [] + ], + [ + 'key' => 'nextjs-starter', + 'name' => 'Next.js starter', + 'useCases' => ['starter'], + 'demoImage' => '', 'frameworks' => [ getFramework('NEXTJS', [ 'providerRootDirectory' => './nextjs/starter', @@ -95,10 +296,9 @@ return [ ], [ 'key' => 'nuxt-starter', - 'name' => 'Nuxt starter website', + 'name' => 'Nuxt starter', 'useCases' => ['starter'], - 'demoUrl' => 'https://nuxt-starter.sites.qa17.appwrite.org/', - 'demoImage' => 'https://qa17.appwrite.org/console/images/sites/templates/nuxt-starter.png', + 'demoImage' => '', 'frameworks' => [ getFramework('NUXT', [ 'providerRootDirectory' => './nuxt/starter', @@ -112,10 +312,9 @@ return [ ], [ 'key' => 'sveltekit-starter', - 'name' => 'SvelteKit starter website', + 'name' => 'SvelteKit starter', 'useCases' => ['starter'], - 'demoUrl' => 'https://sveltekit-starter.sites.qa17.appwrite.org/', - 'demoImage' => 'https://qa17.appwrite.org/console/images/sites/templates/sveltekit-starter.png', + 'demoImage' => '', 'frameworks' => [ getFramework('SVELTEKIT', [ 'providerRootDirectory' => './sveltekit/starter', @@ -129,10 +328,9 @@ return [ ], [ 'key' => 'astro-starter', - 'name' => 'Astro starter website', + 'name' => 'Astro starter', 'useCases' => ['starter'], - 'demoUrl' => 'https://astro-starter.sites.qa17.appwrite.org/', - 'demoImage' => 'https://qa17.appwrite.org/console/images/sites/templates/astro-starter.png', + 'demoImage' => '', 'frameworks' => [ getFramework('ASTRO', [ 'providerRootDirectory' => './astro/starter', @@ -146,10 +344,9 @@ return [ ], [ 'key' => 'remix-starter', - 'name' => 'Remix starter website', + 'name' => 'Remix starter', 'useCases' => ['starter'], - 'demoUrl' => 'https://remix-starter.sites.qa17.appwrite.org/', - 'demoImage' => 'https://qa17.appwrite.org/console/images/sites/templates/remix-starter.png', + 'demoImage' => '', 'frameworks' => [ getFramework('REMIX', [ 'providerRootDirectory' => './remix/starter', @@ -163,10 +360,9 @@ return [ ], [ 'key' => 'flutter-starter', - 'name' => 'Flutter starter website', + 'name' => 'Flutter starter', 'useCases' => ['starter'], - 'demoUrl' => 'https://flutter-starter.sites.qa17.appwrite.org/', - 'demoImage' => 'https://qa17.appwrite.org/console/images/sites/templates/flutter-starter.png', + 'demoImage' => '', 'frameworks' => [ getFramework('FLUTTER', [ 'providerRootDirectory' => './flutter/starter', diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 17adcb9e47..a626c47bd0 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.6.1", + "version": "1.7.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4761,7 +4761,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -4846,7 +4846,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -4960,7 +4960,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -5033,7 +5033,7 @@ }, "x-appwrite": { "method": "query", - "weight": 327, + "weight": 326, "cookies": false, "type": "graphql", "deprecated": false, @@ -5084,7 +5084,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 326, + "weight": 325, "cookies": false, "type": "graphql", "deprecated": false, @@ -5543,7 +5543,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -5625,7 +5625,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -5699,7 +5699,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -5784,7 +5784,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 206, "cookies": false, "type": "upload", "deprecated": false, @@ -5881,7 +5881,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -5952,7 +5952,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -6040,7 +6040,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6106,7 +6106,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6172,7 +6172,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 209, "cookies": false, "type": "location", "deprecated": false, @@ -6388,7 +6388,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6461,7 +6461,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6536,7 +6536,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6620,7 +6620,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6681,7 +6681,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6754,7 +6754,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -6817,7 +6817,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -6902,7 +6902,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7012,7 +7012,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7083,7 +7083,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7169,7 +7169,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7242,7 +7242,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7339,7 +7339,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -7399,7 +7399,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 222, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index eefdd83e45..954f3fcef7 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.6.1", + "version": "1.7.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4293,7 +4293,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4359,7 +4359,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -8986,7 +8986,7 @@ }, "x-appwrite": { "method": "list", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -9058,7 +9058,7 @@ }, "x-appwrite": { "method": "create", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -9307,7 +9307,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -9355,7 +9355,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -9404,7 +9404,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9503,7 +9503,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -9562,7 +9562,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9633,7 +9633,7 @@ }, "x-appwrite": { "method": "get", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -9691,7 +9691,7 @@ }, "x-appwrite": { "method": "update", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9917,7 +9917,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9977,7 +9977,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10059,7 +10059,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 392, + "weight": 391, "cookies": false, "type": "upload", "deprecated": false, @@ -10154,7 +10154,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10215,7 +10215,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -10278,7 +10278,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10357,7 +10357,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 292, + "weight": 291, "cookies": false, "type": "location", "deprecated": false, @@ -10429,7 +10429,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10514,7 +10514,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10628,7 +10628,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -10692,7 +10692,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10762,7 +10762,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -10843,7 +10843,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10901,7 +10901,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10991,7 +10991,7 @@ }, "x-appwrite": { "method": "query", - "weight": 327, + "weight": 326, "cookies": false, "type": "graphql", "deprecated": false, @@ -11042,7 +11042,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 326, + "weight": 325, "cookies": false, "type": "graphql", "deprecated": false, @@ -11141,7 +11141,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11237,7 +11237,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11344,7 +11344,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11370,54 +11370,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", @@ -11440,7 +11392,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11501,7 +11453,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11562,7 +11514,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11634,7 +11586,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11695,7 +11647,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11782,7 +11734,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11843,7 +11795,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11904,7 +11856,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11965,7 +11917,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12026,7 +11978,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12087,7 +12039,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12148,7 +12100,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12209,7 +12161,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12270,7 +12222,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12318,7 +12270,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12366,7 +12318,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12822,7 +12774,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -12897,7 +12849,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -13040,7 +12992,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -13185,7 +13137,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -13358,7 +13310,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -13535,7 +13487,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -13643,7 +13595,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -13754,7 +13706,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -13806,7 +13758,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -13867,7 +13819,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -13941,7 +13893,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -14015,7 +13967,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -14090,7 +14042,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -14194,7 +14146,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14301,7 +14253,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -14385,7 +14337,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14472,7 +14424,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -14586,7 +14538,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14703,7 +14655,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -14797,7 +14749,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14894,7 +14846,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -14998,7 +14950,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15105,7 +15057,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -15247,7 +15199,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15391,7 +15343,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -15485,7 +15437,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15582,7 +15534,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -15676,7 +15628,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15773,7 +15725,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -15867,7 +15819,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15964,7 +15916,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -16058,7 +16010,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -16155,7 +16107,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16207,7 +16159,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -16268,7 +16220,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -16342,7 +16294,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16416,7 +16368,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16489,7 +16441,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16571,7 +16523,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16630,7 +16582,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16706,7 +16658,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -16767,7 +16719,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16841,7 +16793,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16924,7 +16876,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -17013,7 +16965,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17075,7 +17027,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17149,7 +17101,7 @@ }, "x-appwrite": { "method": "list", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -17222,7 +17174,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 330, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17309,7 +17261,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -17401,7 +17353,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 331, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -17476,7 +17428,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -17547,7 +17499,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -17657,7 +17609,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -17789,7 +17741,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +17845,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -18016,7 +17968,7 @@ }, "x-appwrite": { "method": "get", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -18073,7 +18025,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18123,7 +18075,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 341, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -18182,7 +18134,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -18269,7 +18221,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -18314,7 +18266,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -18391,7 +18343,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -18448,7 +18400,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -18522,7 +18474,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -18581,7 +18533,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -18652,7 +18604,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -18786,7 +18738,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -18843,7 +18795,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -18957,7 +18909,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -19016,7 +18968,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -19107,7 +19059,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -19185,7 +19137,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -19263,7 +19215,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -19341,7 +19293,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -19419,7 +19371,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -19509,7 +19461,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -19590,7 +19542,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -19668,7 +19620,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -19746,7 +19698,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -19824,7 +19776,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -19902,7 +19854,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20001,7 +19953,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -20087,7 +20039,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -20144,7 +20096,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -20236,7 +20188,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -20303,7 +20255,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -20396,7 +20348,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -20465,7 +20417,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20601,7 +20553,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -20658,7 +20610,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -20776,7 +20728,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -20843,7 +20795,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -20937,7 +20889,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21006,7 +20958,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -21106,7 +21058,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -21184,7 +21136,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21301,7 +21253,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -21431,7 +21383,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -21509,7 +21461,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -21732,7 +21684,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -21995,7 +21947,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22220,7 +22172,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22440,7 +22392,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22679,7 +22631,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -22901,7 +22853,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -22958,7 +22910,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -23072,7 +23024,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -23139,7 +23091,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23254,7 +23206,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -23323,7 +23275,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23392,7 +23344,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -23463,7 +23415,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -23547,7 +23499,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -23597,7 +23549,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -23656,7 +23608,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -23715,7 +23667,7 @@ }, "x-appwrite": { "method": "list", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -23784,7 +23736,7 @@ }, "x-appwrite": { "method": "create", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -24036,7 +23988,7 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -24084,7 +24036,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -24183,7 +24135,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 417, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -24242,7 +24194,7 @@ }, "x-appwrite": { "method": "listUsage", - "weight": 418, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -24309,7 +24261,7 @@ }, "x-appwrite": { "method": "get", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -24367,7 +24319,7 @@ }, "x-appwrite": { "method": "update", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -24590,7 +24542,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -24650,7 +24602,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -24732,7 +24684,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 399, + "weight": 398, "cookies": false, "type": "upload", "deprecated": false, @@ -24832,7 +24784,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -24900,7 +24852,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -24961,7 +24913,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -25024,7 +24976,7 @@ }, "x-appwrite": { "method": "createDeploymentBuild", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -25092,7 +25044,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -25155,7 +25107,7 @@ }, "x-appwrite": { "method": "getDeploymentBuildDownload", - "weight": 405, + "weight": 404, "cookies": false, "type": "location", "deprecated": false, @@ -25220,7 +25172,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 404, + "weight": 403, "cookies": false, "type": "location", "deprecated": false, @@ -25292,7 +25244,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -25373,7 +25325,7 @@ }, "x-appwrite": { "method": "getLog", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -25434,7 +25386,7 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -25504,7 +25456,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 419, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -25585,7 +25537,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -25643,7 +25595,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -25733,7 +25685,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -25801,7 +25753,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -25886,7 +25838,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -25956,7 +25908,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -26028,7 +25980,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -26154,7 +26106,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -26212,7 +26164,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -26335,7 +26287,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -26395,7 +26347,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -26480,7 +26432,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 206, "cookies": false, "type": "upload", "deprecated": false, @@ -26577,7 +26529,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -26648,7 +26600,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -26736,7 +26688,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -26802,7 +26754,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -26868,7 +26820,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 209, "cookies": false, "type": "location", "deprecated": false, @@ -27084,7 +27036,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -27157,7 +27109,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -27228,7 +27180,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -27309,7 +27261,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -27384,7 +27336,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -27468,7 +27420,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -27529,7 +27481,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27602,7 +27554,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -27665,7 +27617,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27737,7 +27689,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27822,7 +27774,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -27932,7 +27884,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -28003,7 +27955,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -28089,7 +28041,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -28162,7 +28114,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -28258,7 +28210,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -28317,7 +28269,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -28397,7 +28349,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -28469,7 +28421,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -28556,7 +28508,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28640,7 +28592,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -28724,7 +28676,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -28791,7 +28743,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -28851,7 +28803,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -28935,7 +28887,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -29019,7 +28971,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -29133,7 +29085,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -29235,7 +29187,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -29339,7 +29291,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -29410,7 +29362,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -29461,7 +29413,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -29521,7 +29473,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -29600,7 +29552,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -29681,7 +29633,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -29763,7 +29715,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29836,7 +29788,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -29896,7 +29848,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -29968,7 +29920,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -30043,7 +29995,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -30103,7 +30055,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -30161,7 +30113,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -30219,7 +30171,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -30279,7 +30231,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30358,7 +30310,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -30437,7 +30389,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -30516,7 +30468,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -30574,7 +30526,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -30653,7 +30605,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -30711,7 +30663,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -30762,7 +30714,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30815,7 +30767,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -30885,7 +30837,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -30964,7 +30916,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -31036,7 +30988,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31145,7 +31097,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -31214,7 +31166,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -31302,7 +31254,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -31373,7 +31325,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -31454,7 +31406,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -31533,7 +31485,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -31612,7 +31564,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -31680,7 +31632,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31764,7 +31716,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31833,7 +31785,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31902,7 +31854,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -31982,7 +31934,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -32060,7 +32012,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -32148,7 +32100,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -32221,7 +32173,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -32271,7 +32223,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 63149036e5..eb740ba0da 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.6.1", + "version": "1.7.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8138,7 +8138,7 @@ }, "x-appwrite": { "method": "list", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -8211,7 +8211,7 @@ }, "x-appwrite": { "method": "create", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -8461,7 +8461,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -8510,7 +8510,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -8560,7 +8560,7 @@ }, "x-appwrite": { "method": "get", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -8619,7 +8619,7 @@ }, "x-appwrite": { "method": "update", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -8846,7 +8846,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8907,7 +8907,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -8990,7 +8990,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 392, + "weight": 391, "cookies": false, "type": "upload", "deprecated": false, @@ -9086,7 +9086,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -9148,7 +9148,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9212,7 +9212,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9292,7 +9292,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 292, + "weight": 291, "cookies": false, "type": "location", "deprecated": false, @@ -9365,7 +9365,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9452,7 +9452,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9568,7 +9568,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -9634,7 +9634,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9705,7 +9705,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9764,7 +9764,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9855,7 +9855,7 @@ }, "x-appwrite": { "method": "query", - "weight": 327, + "weight": 326, "cookies": false, "type": "graphql", "deprecated": false, @@ -9908,7 +9908,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 326, + "weight": 325, "cookies": false, "type": "graphql", "deprecated": false, @@ -10010,7 +10010,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -10108,7 +10108,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -10217,7 +10217,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10244,55 +10244,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", @@ -10315,7 +10266,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -10377,7 +10328,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -10439,7 +10390,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10512,7 +10463,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -10574,7 +10525,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -10662,7 +10613,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -10724,7 +10675,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -10786,7 +10737,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -10848,7 +10799,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -10910,7 +10861,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -10972,7 +10923,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11034,7 +10985,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11096,7 +11047,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11158,7 +11109,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11207,7 +11158,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11256,7 +11207,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11729,7 +11680,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -11805,7 +11756,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -11949,7 +11900,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -12095,7 +12046,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -12269,7 +12220,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -12447,7 +12398,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -12556,7 +12507,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -12668,7 +12619,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -12721,7 +12672,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -12783,7 +12734,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -12858,7 +12809,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -12933,7 +12884,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -13009,7 +12960,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -13114,7 +13065,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13222,7 +13173,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -13307,7 +13258,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13395,7 +13346,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -13510,7 +13461,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -13628,7 +13579,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -13723,7 +13674,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13821,7 +13772,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -13926,7 +13877,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14034,7 +13985,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -14177,7 +14128,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -14322,7 +14273,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -14417,7 +14368,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14515,7 +14466,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -14610,7 +14561,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -14708,7 +14659,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -14803,7 +14754,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -14901,7 +14852,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -14996,7 +14947,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15094,7 +15045,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15147,7 +15098,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15209,7 +15160,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15284,7 +15235,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15359,7 +15310,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15433,7 +15384,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15516,7 +15467,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15576,7 +15527,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15653,7 +15604,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15715,7 +15666,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15790,7 +15741,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15874,7 +15825,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15965,7 +15916,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16028,7 +15979,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16104,7 +16055,7 @@ }, "x-appwrite": { "method": "list", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -16174,7 +16125,7 @@ }, "x-appwrite": { "method": "create", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -16427,7 +16378,7 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -16476,7 +16427,7 @@ }, "x-appwrite": { "method": "get", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -16535,7 +16486,7 @@ }, "x-appwrite": { "method": "update", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -16759,7 +16710,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -16820,7 +16771,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -16903,7 +16854,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 399, + "weight": 398, "cookies": false, "type": "upload", "deprecated": false, @@ -17004,7 +16955,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -17073,7 +17024,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -17135,7 +17086,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -17199,7 +17150,7 @@ }, "x-appwrite": { "method": "createDeploymentBuild", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -17268,7 +17219,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -17332,7 +17283,7 @@ }, "x-appwrite": { "method": "getDeploymentBuildDownload", - "weight": 405, + "weight": 404, "cookies": false, "type": "location", "deprecated": false, @@ -17398,7 +17349,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 404, + "weight": 403, "cookies": false, "type": "location", "deprecated": false, @@ -17471,7 +17422,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -17553,7 +17504,7 @@ }, "x-appwrite": { "method": "getLog", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -17615,7 +17566,7 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -17686,7 +17637,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -17745,7 +17696,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -17836,7 +17787,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -17905,7 +17856,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -17991,7 +17942,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18062,7 +18013,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -18135,7 +18086,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -18262,7 +18213,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -18321,7 +18272,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -18445,7 +18396,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -18506,7 +18457,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -18593,7 +18544,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 206, "cookies": false, "type": "upload", "deprecated": false, @@ -18692,7 +18643,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -18765,7 +18716,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -18855,7 +18806,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -18923,7 +18874,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -18991,7 +18942,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 209, "cookies": false, "type": "location", "deprecated": false, @@ -19209,7 +19160,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -19284,7 +19235,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -19361,7 +19312,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -19447,7 +19398,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -19510,7 +19461,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -19585,7 +19536,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19650,7 +19601,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19737,7 +19688,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -19849,7 +19800,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -19922,7 +19873,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -20010,7 +19961,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -20085,7 +20036,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -20183,7 +20134,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -20244,7 +20195,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -20326,7 +20277,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -20399,7 +20350,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -20487,7 +20438,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -20572,7 +20523,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -20657,7 +20608,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20725,7 +20676,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -20786,7 +20737,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -20871,7 +20822,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20956,7 +20907,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -21071,7 +21022,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -21174,7 +21125,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -21279,7 +21230,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -21331,7 +21282,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -21392,7 +21343,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -21472,7 +21423,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -21554,7 +21505,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21637,7 +21588,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -21711,7 +21662,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21772,7 +21723,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -21845,7 +21796,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21921,7 +21872,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21982,7 +21933,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22041,7 +21992,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -22100,7 +22051,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -22161,7 +22112,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -22241,7 +22192,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -22321,7 +22272,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -22401,7 +22352,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22460,7 +22411,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -22540,7 +22491,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -22599,7 +22550,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -22651,7 +22602,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -22705,7 +22656,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -22776,7 +22727,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -22856,7 +22807,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -22929,7 +22880,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -23039,7 +22990,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -23109,7 +23060,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23198,7 +23149,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -23270,7 +23221,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -23352,7 +23303,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -23432,7 +23383,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 251, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 0c2113442f..1ee6677c92 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.6.1", + "version": "1.7.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4927,7 +4927,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -5009,7 +5009,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -5127,7 +5127,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -5198,7 +5198,7 @@ }, "x-appwrite": { "method": "query", - "weight": 327, + "weight": 326, "cookies": false, "type": "graphql", "deprecated": false, @@ -5271,7 +5271,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 326, + "weight": 325, "cookies": false, "type": "graphql", "deprecated": false, @@ -5768,7 +5768,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -5852,7 +5852,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -5924,7 +5924,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -6006,7 +6006,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 206, "cookies": false, "type": "upload", "deprecated": false, @@ -6097,7 +6097,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -6166,7 +6166,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -6254,7 +6254,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -6325,7 +6325,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -6396,7 +6396,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 209, "cookies": false, "type": "location", "deprecated": false, @@ -6595,7 +6595,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -6666,7 +6666,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -6740,7 +6740,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6831,7 +6831,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -6892,7 +6892,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6966,7 +6966,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7029,7 +7029,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -7111,7 +7111,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7225,7 +7225,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7294,7 +7294,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7379,7 +7379,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7450,7 +7450,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7545,7 +7545,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -7605,7 +7605,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 222, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index cb6f13f0e9..e1b2a4da74 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.6.1", + "version": "1.7.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4497,7 +4497,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4566,7 +4566,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -9135,7 +9135,7 @@ }, "x-appwrite": { "method": "list", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -9206,7 +9206,7 @@ }, "x-appwrite": { "method": "create", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -9479,7 +9479,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -9529,7 +9529,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -9580,7 +9580,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9675,7 +9675,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -9734,7 +9734,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9805,7 +9805,7 @@ }, "x-appwrite": { "method": "get", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -9863,7 +9863,7 @@ }, "x-appwrite": { "method": "update", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10106,7 +10106,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -10166,7 +10166,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10245,7 +10245,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 392, + "weight": 391, "cookies": false, "type": "upload", "deprecated": false, @@ -10336,7 +10336,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10397,7 +10397,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -10462,7 +10462,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10545,7 +10545,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 292, + "weight": 291, "cookies": false, "type": "location", "deprecated": false, @@ -10615,7 +10615,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10697,7 +10697,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10815,7 +10815,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -10879,7 +10879,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10947,7 +10947,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -11026,7 +11026,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -11084,7 +11084,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -11175,7 +11175,7 @@ }, "x-appwrite": { "method": "query", - "weight": 327, + "weight": 326, "cookies": false, "type": "graphql", "deprecated": false, @@ -11248,7 +11248,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 326, + "weight": 325, "cookies": false, "type": "graphql", "deprecated": false, @@ -11371,7 +11371,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11471,7 +11471,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11580,7 +11580,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11606,56 +11606,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", @@ -11680,7 +11630,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +11691,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11802,7 +11752,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11872,7 +11822,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11933,7 +11883,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12018,7 +11968,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12079,7 +12029,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12140,7 +12090,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12201,7 +12151,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12262,7 +12212,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12323,7 +12273,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12384,7 +12334,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12445,7 +12395,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12506,7 +12456,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12556,7 +12506,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12606,7 +12556,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -13080,7 +13030,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -13154,7 +13104,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -13311,7 +13261,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -13465,7 +13415,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -13659,7 +13609,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -13852,7 +13802,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -13969,7 +13919,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -14084,7 +14034,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -14138,7 +14088,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -14199,7 +14149,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -14272,7 +14222,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -14345,7 +14295,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -14419,7 +14369,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -14533,7 +14483,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14645,7 +14595,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -14735,7 +14685,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14823,7 +14773,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -14949,7 +14899,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15073,7 +15023,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -15175,7 +15125,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15275,7 +15225,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -15389,7 +15339,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15501,7 +15451,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -15659,7 +15609,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15814,7 +15764,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -15916,7 +15866,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16016,7 +15966,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -16118,7 +16068,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16218,7 +16168,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -16320,7 +16270,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16420,7 +16370,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -16522,7 +16472,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -16622,7 +16572,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16676,7 +16626,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -16737,7 +16687,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -16810,7 +16760,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16883,7 +16833,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16955,7 +16905,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -17044,7 +16994,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -17103,7 +17053,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -17181,7 +17131,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -17242,7 +17192,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -17315,7 +17265,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17395,7 +17345,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -17484,7 +17434,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17546,7 +17496,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17618,7 +17568,7 @@ }, "x-appwrite": { "method": "list", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -17690,7 +17640,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 330, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -17783,7 +17733,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -17870,7 +17820,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 331, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -17949,7 +17899,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18019,7 +17969,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -18139,7 +18089,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18258,7 +18208,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -18371,7 +18321,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -18483,7 +18433,7 @@ }, "x-appwrite": { "method": "get", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -18540,7 +18490,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18592,7 +18542,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 341, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -18651,7 +18601,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -18734,7 +18684,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -18781,7 +18731,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -18863,7 +18813,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -18920,7 +18870,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -18996,7 +18946,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19055,7 +19005,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +19075,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -19274,7 +19224,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19331,7 +19281,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -19455,7 +19405,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -19514,7 +19464,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -19605,7 +19555,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -19682,7 +19632,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -19759,7 +19709,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -19836,7 +19786,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -19913,7 +19863,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20004,7 +19954,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20084,7 +20034,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20161,7 +20111,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -20238,7 +20188,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20315,7 +20265,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20392,7 +20342,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20488,7 +20438,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -20574,7 +20524,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -20631,7 +20581,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -20724,7 +20674,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -20789,7 +20739,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -20883,7 +20833,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -20950,7 +20900,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -21088,7 +21038,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21145,7 +21095,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21266,7 +21216,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21331,7 +21281,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -21427,7 +21377,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21494,7 +21444,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -21594,7 +21544,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -21671,7 +21621,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21799,7 +21749,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -21936,7 +21886,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -22013,7 +21963,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22232,7 +22182,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -22494,7 +22444,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22715,7 +22665,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22931,7 +22881,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23165,7 +23115,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23383,7 +23333,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -23440,7 +23390,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -23559,7 +23509,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -23624,7 +23574,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23744,7 +23694,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -23811,7 +23761,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23878,7 +23828,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -23948,7 +23898,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -24037,7 +23987,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -24089,7 +24039,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -24148,7 +24098,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -24207,7 +24157,7 @@ }, "x-appwrite": { "method": "list", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -24278,7 +24228,7 @@ }, "x-appwrite": { "method": "create", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -24554,7 +24504,7 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -24604,7 +24554,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -24699,7 +24649,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 417, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -24758,7 +24708,7 @@ }, "x-appwrite": { "method": "listUsage", - "weight": 418, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -24825,7 +24775,7 @@ }, "x-appwrite": { "method": "get", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -24883,7 +24833,7 @@ }, "x-appwrite": { "method": "update", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -25122,7 +25072,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -25182,7 +25132,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -25261,7 +25211,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 399, + "weight": 398, "cookies": false, "type": "upload", "deprecated": false, @@ -25360,7 +25310,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -25426,7 +25376,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -25487,7 +25437,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +25502,7 @@ }, "x-appwrite": { "method": "createDeploymentBuild", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -25618,7 +25568,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -25686,7 +25636,7 @@ }, "x-appwrite": { "method": "getDeploymentBuildDownload", - "weight": 405, + "weight": 404, "cookies": false, "type": "location", "deprecated": false, @@ -25756,7 +25706,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 404, + "weight": 403, "cookies": false, "type": "location", "deprecated": false, @@ -25826,7 +25776,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -25907,7 +25857,7 @@ }, "x-appwrite": { "method": "getLog", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -25970,7 +25920,7 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -26038,7 +25988,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 419, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -26117,7 +26067,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -26175,7 +26125,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -26266,7 +26216,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -26332,7 +26282,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -26417,7 +26367,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -26485,7 +26435,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -26556,7 +26506,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -26694,7 +26644,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -26752,7 +26702,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -26884,7 +26834,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -26944,7 +26894,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -27026,7 +26976,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 206, "cookies": false, "type": "upload", "deprecated": false, @@ -27117,7 +27067,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -27186,7 +27136,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -27274,7 +27224,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -27345,7 +27295,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -27416,7 +27366,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 209, "cookies": false, "type": "location", "deprecated": false, @@ -27615,7 +27565,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -27686,7 +27636,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -27757,7 +27707,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -27836,7 +27786,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -27910,7 +27860,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -28001,7 +27951,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -28062,7 +28012,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -28136,7 +28086,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -28199,7 +28149,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -28270,7 +28220,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -28352,7 +28302,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -28466,7 +28416,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -28535,7 +28485,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -28620,7 +28570,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -28691,7 +28641,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -28785,7 +28735,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -28844,7 +28794,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -28923,7 +28873,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -28994,7 +28944,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -29088,7 +29038,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -29178,7 +29128,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -29268,7 +29218,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -29336,7 +29286,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -29396,7 +29346,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -29486,7 +29436,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -29576,7 +29526,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -29701,7 +29651,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -29812,7 +29762,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -29923,7 +29873,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -29994,7 +29944,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -30047,7 +29997,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30107,7 +30057,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -30185,7 +30135,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -30266,7 +30216,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30347,7 +30297,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -30419,7 +30369,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -30479,7 +30429,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -30552,7 +30502,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -30625,7 +30575,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -30685,7 +30635,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -30743,7 +30693,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -30801,7 +30751,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -30861,7 +30811,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30939,7 +30889,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -31017,7 +30967,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -31095,7 +31045,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31153,7 +31103,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -31231,7 +31181,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -31289,7 +31239,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -31342,7 +31292,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -31397,7 +31347,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -31465,7 +31415,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -31543,7 +31493,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -31614,7 +31564,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -31726,7 +31676,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -31793,7 +31743,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -31882,7 +31832,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -31951,7 +31901,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -32032,7 +31982,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -32110,7 +32060,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -32188,7 +32138,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -32254,7 +32204,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -32338,7 +32288,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -32405,7 +32355,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -32472,7 +32422,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -32548,7 +32498,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -32627,7 +32577,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -32712,7 +32662,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -32784,7 +32734,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -32836,7 +32786,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 380c0d4244..642c4b6a70 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.6.1", + "version": "1.7.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8284,7 +8284,7 @@ }, "x-appwrite": { "method": "list", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -8356,7 +8356,7 @@ }, "x-appwrite": { "method": "create", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -8630,7 +8630,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -8681,7 +8681,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -8733,7 +8733,7 @@ }, "x-appwrite": { "method": "get", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -8792,7 +8792,7 @@ }, "x-appwrite": { "method": "update", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -9036,7 +9036,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9097,7 +9097,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9177,7 +9177,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 392, + "weight": 391, "cookies": false, "type": "upload", "deprecated": false, @@ -9269,7 +9269,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -9331,7 +9331,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9397,7 +9397,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9481,7 +9481,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 292, + "weight": 291, "cookies": false, "type": "location", "deprecated": false, @@ -9552,7 +9552,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9636,7 +9636,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9756,7 +9756,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -9822,7 +9822,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9891,7 +9891,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9950,7 +9950,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10042,7 +10042,7 @@ }, "x-appwrite": { "method": "query", - "weight": 327, + "weight": 326, "cookies": false, "type": "graphql", "deprecated": false, @@ -10117,7 +10117,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 326, + "weight": 325, "cookies": false, "type": "graphql", "deprecated": false, @@ -10243,7 +10243,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -10345,7 +10345,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -10456,7 +10456,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10483,57 +10483,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", @@ -10558,7 +10507,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -10620,7 +10569,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -10682,7 +10631,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10753,7 +10702,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -10815,7 +10764,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -10901,7 +10850,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -10963,7 +10912,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11025,7 +10974,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11087,7 +11036,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11149,7 +11098,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11211,7 +11160,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11273,7 +11222,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11335,7 +11284,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11397,7 +11346,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11448,7 +11397,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11499,7 +11448,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11990,7 +11939,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -12065,7 +12014,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -12223,7 +12172,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -12378,7 +12327,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -12573,7 +12522,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -12767,7 +12716,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -12885,7 +12834,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -13001,7 +12950,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -13056,7 +13005,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -13118,7 +13067,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -13192,7 +13141,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -13266,7 +13215,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -13341,7 +13290,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -13456,7 +13405,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13569,7 +13518,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -13660,7 +13609,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -13749,7 +13698,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -13876,7 +13825,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14001,7 +13950,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -14104,7 +14053,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14205,7 +14154,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -14320,7 +14269,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14433,7 +14382,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -14592,7 +14541,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -14748,7 +14697,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -14851,7 +14800,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14952,7 +14901,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -15055,7 +15004,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15156,7 +15105,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -15259,7 +15208,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15360,7 +15309,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -15463,7 +15412,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15564,7 +15513,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15619,7 +15568,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15681,7 +15630,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15755,7 +15704,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15829,7 +15778,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15902,7 +15851,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15992,7 +15941,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16052,7 +16001,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16131,7 +16080,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -16193,7 +16142,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16267,7 +16216,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16348,7 +16297,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16439,7 +16388,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16502,7 +16451,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16576,7 +16525,7 @@ }, "x-appwrite": { "method": "list", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -16648,7 +16597,7 @@ }, "x-appwrite": { "method": "create", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -16925,7 +16874,7 @@ }, "x-appwrite": { "method": "listFrameworks", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -16976,7 +16925,7 @@ }, "x-appwrite": { "method": "get", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -17035,7 +16984,7 @@ }, "x-appwrite": { "method": "update", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -17275,7 +17224,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -17336,7 +17285,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -17416,7 +17365,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 399, + "weight": 398, "cookies": false, "type": "upload", "deprecated": false, @@ -17516,7 +17465,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -17583,7 +17532,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -17645,7 +17594,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -17711,7 +17660,7 @@ }, "x-appwrite": { "method": "createDeploymentBuild", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -17778,7 +17727,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -17847,7 +17796,7 @@ }, "x-appwrite": { "method": "getDeploymentBuildDownload", - "weight": 405, + "weight": 404, "cookies": false, "type": "location", "deprecated": false, @@ -17918,7 +17867,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 404, + "weight": 403, "cookies": false, "type": "location", "deprecated": false, @@ -17989,7 +17938,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -18071,7 +18020,7 @@ }, "x-appwrite": { "method": "getLog", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -18135,7 +18084,7 @@ }, "x-appwrite": { "method": "deleteLog", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -18204,7 +18153,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -18263,7 +18212,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -18355,7 +18304,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -18422,7 +18371,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -18508,7 +18457,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -18577,7 +18526,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -18649,7 +18598,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -18788,7 +18737,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -18847,7 +18796,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -18980,7 +18929,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -19041,7 +18990,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +19074,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 206, "cookies": false, "type": "upload", "deprecated": false, @@ -19218,7 +19167,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -19289,7 +19238,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -19379,7 +19328,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -19452,7 +19401,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 210, "cookies": false, "type": "location", "deprecated": false, @@ -19525,7 +19474,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 209, "cookies": false, "type": "location", "deprecated": false, @@ -19726,7 +19675,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 211, "cookies": false, "type": "location", "deprecated": false, @@ -19799,7 +19748,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -19875,7 +19824,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -19968,7 +19917,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -20031,7 +19980,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -20107,7 +20056,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -20172,7 +20121,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -20256,7 +20205,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -20372,7 +20321,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -20443,7 +20392,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -20530,7 +20479,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -20603,7 +20552,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -20699,7 +20648,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -20760,7 +20709,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -20841,7 +20790,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -20913,7 +20862,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -21008,7 +20957,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -21099,7 +21048,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -21190,7 +21139,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -21259,7 +21208,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21320,7 +21269,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -21411,7 +21360,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -21502,7 +21451,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -21628,7 +21577,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -21740,7 +21689,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -21852,7 +21801,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -21906,7 +21855,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -21967,7 +21916,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -22046,7 +21995,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -22128,7 +22077,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22210,7 +22159,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22283,7 +22232,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22344,7 +22293,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22418,7 +22367,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -22492,7 +22441,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -22553,7 +22502,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22612,7 +22561,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -22671,7 +22620,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -22732,7 +22681,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -22811,7 +22760,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -22890,7 +22839,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -22969,7 +22918,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -23028,7 +22977,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23107,7 +23056,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -23166,7 +23115,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23220,7 +23169,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -23276,7 +23225,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -23345,7 +23294,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -23424,7 +23373,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -23496,7 +23445,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -23609,7 +23558,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -23677,7 +23626,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23767,7 +23716,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -23837,7 +23786,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -23919,7 +23868,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -23998,7 +23947,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 251, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/storage/inputs.php b/app/config/storage/inputs.php index 4532279b31..713801cd7c 100644 --- a/app/config/storage/inputs.php +++ b/app/config/storage/inputs.php @@ -7,4 +7,5 @@ return [ "gif" => "image/gif", "png" => "image/png", "heic" => "image/heic", + "webp" => "image/webp", ]; diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 888ff35382..f6c9d472cf 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1585,7 +1585,7 @@ App::post('/v1/functions/:functionId/variables') ->param('functionId', '', new UID(), 'Function unique ID.', false) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) - ->param('secret', false, new Boolean(), 'Is secret? Secret variables can only be updated or deleted, they cannot be read.', true) + ->param('secret', true, new Boolean(), 'Secret variables can be updated or deleted, but only functions can read them during build and runtime.', true) ->inject('response') ->inject('dbForProject') ->inject('dbForPlatform') @@ -1729,10 +1729,11 @@ App::put('/v1/functions/:functionId/variables/:variableId') ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', true) + ->param('secret', null, new Boolean(), 'Secret variables can be updated or deleted, but only functions can read them during build and runtime.', true) ->inject('response') ->inject('dbForProject') ->inject('dbForPlatform') - ->action(function (string $functionId, string $variableId, string $key, ?string $value, Response $response, Database $dbForProject, Database $dbForPlatform) { + ->action(function (string $functionId, string $variableId, string $key, ?string $value, ?bool $secret, Response $response, Database $dbForProject, Database $dbForPlatform) { $function = $dbForProject->getDocument('functions', $functionId); @@ -1749,9 +1750,14 @@ App::put('/v1/functions/:functionId/variables/:variableId') throw new Exception(Exception::VARIABLE_NOT_FOUND); } + if ($variable->getAttribute('secret') === true && $secret === false) { + throw new Exception(Exception::VARIABLE_CANNOT_UNSET_SECRET); + } + $variable ->setAttribute('key', $key) ->setAttribute('value', $value ?? $variable->getAttribute('value')) + ->setAttribute('secret', $secret ?? $variable->getAttribute('secret')) ->setAttribute('search', implode(' ', [$variableId, $function->getId(), $key, 'function'])); try { diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 0544760e73..22c3337203 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -388,7 +388,7 @@ App::post('/v1/project/variables') )) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) - ->param('secret', false, new Boolean(), 'Is secret? Secret variables can only be updated or deleted, they cannot be read.', true) + ->param('secret', true, new Boolean(), 'Secret variables can be updated or deleted, but only projects can read them during build and runtime.', true) ->inject('project') ->inject('response') ->inject('dbForProject') @@ -509,19 +509,25 @@ App::put('/v1/project/variables/:variableId') ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', true) + ->param('secret', null, new Boolean(), 'Secret variables can be updated or deleted, but only projects can read them during build and runtime.', true) ->inject('project') ->inject('response') ->inject('dbForProject') ->inject('dbForPlatform') - ->action(function (string $variableId, string $key, ?string $value, Document $project, Response $response, Database $dbForProject, Database $dbForPlatform) { + ->action(function (string $variableId, string $key, ?string $value, ?bool $secret, Document $project, Response $response, Database $dbForProject, Database $dbForPlatform) { $variable = $dbForProject->getDocument('variables', $variableId); if ($variable === false || $variable->isEmpty() || $variable->getAttribute('resourceType') !== 'project') { throw new Exception(Exception::VARIABLE_NOT_FOUND); } + if ($variable->getAttribute('secret') === true && $secret === false) { + throw new Exception(Exception::VARIABLE_CANNOT_UNSET_SECRET); + } + $variable ->setAttribute('key', $key) ->setAttribute('value', $value ?? $variable->getAttribute('value')) + ->setAttribute('secret', $secret ?? $variable->getAttribute('secret')) ->setAttribute('search', implode(' ', [$variableId, $key, 'project'])); try { diff --git a/app/controllers/general.php b/app/controllers/general.php index 986d482421..c9efc90426 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -15,6 +15,8 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; 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; @@ -123,14 +125,14 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $type = $rule->getAttribute('resourceType'); if ($type === 'function' || $type === 'site' || $type === 'deployment') { - $resourceCollection = match($type) { + $resourceCollection = match ($type) { 'function' => 'functions', 'site' => 'sites', 'deployment' => 'deployments', }; } - if ($type === 'function' || $type === 'site') { + if ($type === 'function' || $type === 'site' || $type === 'deployment') { $method = $utopia->getRoute()?->getLabel('sdk', null); if (empty($method)) { @@ -198,7 +200,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw throw new AppwriteException(AppwriteException::GENERAL_RESOURCE_BLOCKED); } - $version = match($type) { + $version = match ($type) { 'function' => $resource->getAttribute('version', 'v2'), 'site' => 'v4', 'deployment' => 'v4' @@ -207,7 +209,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []); $spec = Config::getParam('runtime-specifications')[$resource->getAttribute('specification', APP_COMPUTE_SPECIFICATION_DEFAULT)]; - $runtime = match($type) { + $runtime = match ($type) { 'function' => $runtimes[$resource->getAttribute('runtime')] ?? null, 'site' => $runtimes[$resource->getAttribute('buildRuntime')] ?? null, 'deployment' => $runtimes[$resource->getAttribute('buildRuntime')] ?? null, @@ -222,7 +224,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw throw new AppwriteException(AppwriteException::FUNCTION_RUNTIME_UNSUPPORTED, 'Runtime "' . $resource->getAttribute('runtime', '') . '" is not supported'); } - $deploymentId = match($type) { + $deploymentId = match ($type) { 'function' => $resource->getAttribute('deployment', ''), 'site' => $resource->getAttribute('deploymentId', ''), 'deployment' => $subResource->getId() @@ -388,12 +390,12 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw /** Execute function */ $executor = new Executor(System::getEnv('_APP_EXECUTOR_HOST')); try { - $version = match($type) { + $version = match ($type) { 'function' => $resource->getAttribute('version', 'v2'), 'site' => 'v4', 'deployment' => 'v4' }; - $entrypoint = match($type) { + $entrypoint = match ($type) { 'function' => $deployment->getAttribute('entrypoint', ''), 'site' => '', 'deployment' => '' @@ -420,7 +422,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $runtimeEntrypoint = 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $startCommand . '"'; } - $entrypoint = match($type) { + $entrypoint = match ($type) { 'function' => $deployment->getAttribute('entrypoint', ''), 'site' => '', 'deployment' => '' @@ -446,6 +448,22 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw requestTimeout: 30 ); + + // Branded banner for previews + $transformation = new Transformation(); + $transformation->addAdapter(new Preview()); + $transformation->setInput($executionResponse['body']); + $transformation->setTraits($executionResponse['headers']); + if ($type === 'deployment' && $transformation->transform()) { + $executionResponse['body'] = $transformation->getOutput(); + + foreach ($executionResponse['headers'] as $key => $value) { + if (\strtolower($key) === 'content-length') { + $executionResponse['headers'][$key] = \strlen($executionResponse['body']); + } + } + } + $headersFiltered = []; foreach ($executionResponse['headers'] as $key => $value) { if (\in_array(\strtolower($key), FUNCTION_ALLOWLIST_HEADERS_RESPONSE)) { @@ -472,8 +490,8 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw if ($type === 'function') { $execution - ->setAttribute('status', 'failed') - ->setAttribute('errors', $th->getMessage() . '\nError Code: ' . $th->getCode()); + ->setAttribute('status', 'failed') + ->setAttribute('errors', $th->getMessage() . '\nError Code: ' . $th->getCode()); } Console::error($th->getMessage()); @@ -540,8 +558,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw ->addMetric(METRIC_EXECUTIONS_MB_SECONDS, (int)(($spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT))) ->addMetric(str_replace('{functionInternalId}', $resource->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS), (int)(($spec['memory'] ?? APP_COMPUTE_MEMORY_DEFAULT) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_COMPUTE_CPUS_DEFAULT))) ->setProject($project) - ->trigger() - ; + ->trigger(); return true; } elseif ($type === 'api') { @@ -720,6 +737,12 @@ App::init() $validator = new Hostname($clients); if ($validator->isValid($origin)) { $refDomainOrigin = $origin; + } else { + // Auto-allow domains with linked rule + $rule = Authorization::skip(fn () => $dbForPlatform->getDocument('rules', md5($origin))); + if (!$rule->isEmpty() && $rule->getAttribute('projectInternalId') === $project->getInternalId()) { + $refDomainOrigin = $origin; + } } $refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()) . '://' . $refDomainOrigin . (!empty($port) ? ':' . $port : ''); @@ -769,7 +792,7 @@ App::init() $response->addFilter(new ResponseV18()); } 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"); + $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"); } } @@ -1118,6 +1141,7 @@ App::error() ->setParam('trace', $output['trace'] ?? []); $response->html($layout->render()); + return; } $response->dynamic( diff --git a/composer.json b/composer.json index feb5de1a15..3c1a2951d9 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,8 @@ "test": "vendor/bin/phpunit", "lint": "vendor/bin/pint --test", "format": "vendor/bin/pint", - "bench": "vendor/bin/phpbench run --report=benchmark" + "bench": "vendor/bin/phpbench run --report=benchmark", + "check": "./vendor/bin/phpstan analyse -c phpstan.neon" }, "autoload": { "psr-4": { @@ -90,7 +91,8 @@ "swoole/ide-helper": "5.1.2", "textalk/websocket": "1.5.7", "laravel/pint": "^1.14", - "phpbench/phpbench": "^1.2" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "1.8.*" }, "provide": { "ext-phpiredis": "*" diff --git a/composer.lock b/composer.lock index 000aa2170c..c0bb98367f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c238139c9b44c646364734186c481036", + "content-hash": "5473f6b65d54314228e69b6bed489d78", "packages": [ { "name": "adhocore/jwt", @@ -4553,16 +4553,16 @@ }, { "name": "utopia-php/queue", - "version": "0.8.2", + "version": "0.8.6", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "a6ec26a787e8292ca2d7b8f5a0ad179b46b2c4d0" + "reference": "b713b997285c29d120bbcbe3d6e93762d850f87c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/a6ec26a787e8292ca2d7b8f5a0ad179b46b2c4d0", - "reference": "a6ec26a787e8292ca2d7b8f5a0ad179b46b2c4d0", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/b713b997285c29d120bbcbe3d6e93762d850f87c", + "reference": "b713b997285c29d120bbcbe3d6e93762d850f87c", "shasum": "" }, "require": { @@ -4612,9 +4612,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.8.2" + "source": "https://github.com/utopia-php/queue/tree/0.8.6" }, - "time": "2025-02-06T11:01:15+00:00" + "time": "2025-02-10T03:35:00+00:00" }, { "name": "utopia-php/registry", @@ -4670,16 +4670,16 @@ }, { "name": "utopia-php/storage", - "version": "0.18.8", + "version": "0.18.9", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "84737afa634e6a833fc4f8b0c967553234d3f215" + "reference": "1cf455404e8700b3093fd73d74a38d41cdced90c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/84737afa634e6a833fc4f8b0c967553234d3f215", - "reference": "84737afa634e6a833fc4f8b0c967553234d3f215", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/1cf455404e8700b3093fd73d74a38d41cdced90c", + "reference": "1cf455404e8700b3093fd73d74a38d41cdced90c", "shasum": "" }, "require": { @@ -4719,9 +4719,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.18.8" + "source": "https://github.com/utopia-php/storage/tree/0.18.9" }, - "time": "2024-12-04T08:30:35+00:00" + "time": "2025-02-11T13:10:40+00:00" }, { "name": "utopia-php/swoole", @@ -5623,16 +5623,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + "reference": "024473a478be9df5fdaca2c793f2232fe788e414" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", + "reference": "024473a478be9df5fdaca2c793f2232fe788e414", "shasum": "" }, "require": { @@ -5671,7 +5671,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" }, "funding": [ { @@ -5679,7 +5679,7 @@ "type": "tidelift" } ], - "time": "2024-11-08T17:47:46+00:00" + "time": "2025-02-12T12:17:51+00:00" }, { "name": "nikic/php-parser", @@ -6253,16 +6253,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299" + "reference": "72e51f7c32c5aef7c8b462195b8c599b11199893" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299", - "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/72e51f7c32c5aef7c8b462195b8c599b11199893", + "reference": "72e51f7c32c5aef7c8b462195b8c599b11199893", "shasum": "" }, "require": { @@ -6294,9 +6294,68 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.1" }, - "time": "2024-10-13T11:29:49+00:00" + "time": "2025-02-13T12:25:43+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.8.11", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "46e223dd68a620da18855c23046ddb00940b4014" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46e223dd68a620da18855c23046ddb00940b4014", + "reference": "46e223dd68a620da18855c23046ddb00940b4014", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.8.11" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2022-10-24T15:45:13+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/docker-compose.yml b/docker-compose.yml index d3f40e1928..c827ec2108 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -204,7 +204,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:5.3.0-sites-rc.2 + image: appwrite/console:5.3.0-sites-rc.9 restart: unless-stopped networks: - appwrite diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000000..b18f3d6d58 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,8 @@ +parameters: + level: 8 + paths: + - src/Appwrite/Transformation + scanDirectories: + - vendor/swoole/ide-helper + excludePaths: + - tests/resources \ No newline at end of file diff --git a/src/Appwrite/Auth/OAuth2/Slack.php b/src/Appwrite/Auth/OAuth2/Slack.php index 8898f4d1f7..9c87e45ed6 100644 --- a/src/Appwrite/Auth/OAuth2/Slack.php +++ b/src/Appwrite/Auth/OAuth2/Slack.php @@ -20,10 +20,9 @@ class Slack extends OAuth2 * @var array */ protected array $scopes = [ - 'identity.avatar', - 'identity.basic', - 'identity.email', - 'identity.team' + 'openid', + 'email', + 'profile' ]; /** @@ -35,14 +34,15 @@ class Slack extends OAuth2 } /** + * @link https://api.slack.com/authentication/oauth-v2 + * * @return string */ public function getLoginURL(): string { - // https://api.slack.com/docs/oauth#step_1_-_sending_users_to_authorize_and_or_install - return 'https://slack.com/oauth/authorize?' . \http_build_query([ + return 'https://slack.com/oauth/v2/authorize?' . \http_build_query([ 'client_id' => $this->appID, - 'scope' => \implode(' ', $this->getScopes()), + 'user_scope' => \implode(' ', $this->getScopes()), 'redirect_uri' => $this->callback, 'state' => \json_encode($this->state) ]); @@ -56,16 +56,15 @@ class Slack extends OAuth2 protected function getTokens(string $code): array { if (empty($this->tokens)) { - // https://api.slack.com/docs/oauth#step_3_-_exchanging_a_verification_code_for_an_access_token $this->tokens = \json_decode($this->request( 'GET', - 'https://slack.com/api/oauth.access?' . \http_build_query([ + 'https://slack.com/api/oauth.v2.access?' . \http_build_query([ 'client_id' => $this->appID, 'client_secret' => $this->appSecret, 'code' => $code, 'redirect_uri' => $this->callback ]) - ), true); + ), true)['authed_user'] ?? []; } return $this->tokens; @@ -80,13 +79,13 @@ class Slack extends OAuth2 { $this->tokens = \json_decode($this->request( 'GET', - 'https://slack.com/api/oauth.access?' . \http_build_query([ + 'https://slack.com/api/oauth.v2.access?' . \http_build_query([ 'client_id' => $this->appID, 'client_secret' => $this->appSecret, 'refresh_token' => $refreshToken, 'grant_type' => 'refresh_token' ]) - ), true); + ), true)['authed_user'] ?? []; if (empty($this->tokens['refresh_token'])) { $this->tokens['refresh_token'] = $refreshToken; @@ -161,9 +160,9 @@ class Slack extends OAuth2 if (empty($this->user)) { $user = $this->request( 'GET', - 'https://slack.com/api/users.identity?token=' . \urlencode($accessToken) + 'https://slack.com/api/users.identity', + ['Authorization: Bearer ' . \urlencode($accessToken)] ); - $this->user = \json_decode($user, true); } diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 2992c75987..f1494b5d67 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -118,6 +118,9 @@ class Exception extends \Exception public const TEAM_INVITE_MISMATCH = 'team_invite_mismatch'; public const TEAM_ALREADY_EXISTS = 'team_already_exists'; + /** Console */ + public const RESOURCE_ALREADY_EXISTS = 'resource_already_exists'; + /** Membership */ public const MEMBERSHIP_NOT_FOUND = 'membership_not_found'; public const MEMBERSHIP_ALREADY_CONFIRMED = 'membership_already_confirmed'; @@ -255,6 +258,7 @@ class Exception extends \Exception /** Variables */ public const VARIABLE_NOT_FOUND = 'variable_not_found'; public const VARIABLE_ALREADY_EXISTS = 'variable_already_exists'; + public const VARIABLE_CANNOT_UNSET_SECRET = 'variable_cannot_unset_secret'; /** Platform */ public const PLATFORM_NOT_FOUND = 'platform_not_found'; diff --git a/src/Appwrite/Platform/Appwrite.php b/src/Appwrite/Platform/Appwrite.php index b77ccce979..8633da6cb6 100644 --- a/src/Appwrite/Platform/Appwrite.php +++ b/src/Appwrite/Platform/Appwrite.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform; +use Appwrite\Platform\Modules\Console; use Appwrite\Platform\Modules\Core; use Appwrite\Platform\Modules\Functions; use Appwrite\Platform\Modules\Sites; @@ -14,5 +15,6 @@ class Appwrite extends Platform parent::__construct(new Core()); $this->addModule(new Functions\Module()); $this->addModule(new Sites\Module()); + $this->addModule(new Console\Module()); } } diff --git a/src/Appwrite/Platform/Modules/Compute/Base.php b/src/Appwrite/Platform/Modules/Compute/Base.php index 9ea0ef86c5..1c3b9f2ede 100644 --- a/src/Appwrite/Platform/Modules/Compute/Base.php +++ b/src/Appwrite/Platform/Modules/Compute/Base.php @@ -19,7 +19,7 @@ use Utopia\VCS\Exception\RepositoryNotFound; class Base extends Action { - public function redeployVcsFunction(Request $request, Document $function, Document $project, Document $installation, Database $dbForProject, Build $queueForBuilds, Document $template, GitHub $github) + public function redeployVcsFunction(Request $request, Document $function, Document $project, Document $installation, Database $dbForProject, Build $queueForBuilds, Document $template, GitHub $github): Document { $deploymentId = ID::unique(); $entrypoint = $function->getAttribute('entrypoint', ''); @@ -91,9 +91,11 @@ class Base extends Action ->setResource($function) ->setDeployment($deployment) ->setTemplate($template); + + return $deployment; } - public function redeployVcsSite(Request $request, Document $site, Document $project, Document $installation, Database $dbForProject, Database $dbForPlatform, Build $queueForBuilds, Document $template, GitHub $github) + public function redeployVcsSite(Request $request, Document $site, Document $project, Document $installation, Database $dbForProject, Database $dbForPlatform, Build $queueForBuilds, Document $template, GitHub $github): Document { $deploymentId = ID::unique(); $providerInstallationId = $installation->getAttribute('providerInstallationId', ''); @@ -187,5 +189,7 @@ class Base extends Action ->setResource($site) ->setDeployment($deployment) ->setTemplate($template); + + return $deployment; } } diff --git a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php new file mode 100644 index 0000000000..dc13e717f0 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php @@ -0,0 +1,85 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/console/resources') + ->desc('Check resource ID availability') + ->groups(['api', 'projects']) + ->label('scope', 'rules.read') + ->label('sdk', new Method( + namespace: 'console', + name: 'getResource', + description: <<label('abuse-limit', 10) + ->label('abuse-key', 'userId:{userId}, url:{url}') + ->label('abuse-time', 60) + ->param('value', '', new Text(256), 'Resource value.') + ->param('type', '', new WhiteList(['rules']), 'Resource type.') + ->inject('response') + ->inject('dbForPlatform') + ->callback([$this, 'action']); + } + + public function action(string $value, string $type, Response $response, Database $dbForPlatform) + { + if ($type === 'rules') { + $validator = new Domain($value); + + if (!$validator->isValid($value)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $validator->getDescription()); + } + + $document = Authorization::skip(fn () => $dbForPlatform->findOne('rules', [ + Query::equal('domain', [$value]), + ])); + + if (!$document->isEmpty()) { + throw new Exception(Exception::RESOURCE_ALREADY_EXISTS); + } + + $response->noContent(); + } + + // Only occurs if type is added into whitelist, but not supported in action + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid type'); + } +} diff --git a/src/Appwrite/Platform/Modules/Console/Module.php b/src/Appwrite/Platform/Modules/Console/Module.php new file mode 100644 index 0000000000..7bf2805479 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Console/Module.php @@ -0,0 +1,14 @@ +addService('http', new Http()); + } +} diff --git a/src/Appwrite/Platform/Modules/Console/Services/Http.php b/src/Appwrite/Platform/Modules/Console/Services/Http.php new file mode 100644 index 0000000000..6221db6a96 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Console/Services/Http.php @@ -0,0 +1,16 @@ +type = Service::TYPE_HTTP; + // Resources + $this->addAction(GetResourceAvailability::getName(), new GetResourceAvailability()); + } +} diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Template/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Template/Create.php new file mode 100644 index 0000000000..5082c23db2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Template/Create.php @@ -0,0 +1,143 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/functions/:functionId/deployments/template') + ->desc('Create template deployment') + ->groups(['api', 'functions']) + ->label('scope', 'functions.write') + ->label('event', 'functions.[functionId].deployments.[deploymentId].create') + ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) + ->label('audits.event', 'deployment.create') + ->label('audits.resource', 'function/{request.functionId}') + ->label('sdk', new Method( + namespace: 'functions', + name: 'createTemplateDeployment', + description: <<param('functionId', '', new UID(), 'Function ID.') + ->param('repository', '', new Text(128, 0), 'Repository name of the template.') + ->param('owner', '', new Text(128, 0), 'The name of the owner of the template.') + ->param('rootDirectory', '', new Text(128, 0), 'Path to function code in the template repo.') + ->param('version', '', new Text(128, 0), 'Version (tag) for the repo linked to the function template.') + ->param('activate', false, new Boolean(), 'Automatically activate the deployment when it is finished building.', true) + ->inject('request') + ->inject('response') + ->inject('dbForProject') + ->inject('dbForPlatform') + ->inject('queueForEvents') + ->inject('project') + ->inject('queueForBuilds') + ->inject('gitHub') + ->callback([$this, 'action']); + } + + public function action(string $functionId, string $repository, string $owner, string $rootDirectory, string $version, bool $activate, Request $request, Response $response, Database $dbForProject, Database $dbForPlatform, Event $queueForEvents, Document $project, Build $queueForBuilds, GitHub $github) + { + $function = $dbForProject->getDocument('functions', $functionId); + + if ($function->isEmpty()) { + throw new Exception(Exception::FUNCTION_NOT_FOUND); + } + + $template = new Document([ + 'repositoryName' => $repository, + 'ownerName' => $owner, + 'rootDirectory' => $rootDirectory, + 'version' => $version + ]); + + if (!empty($function->getAttribute('providerRepositoryId'))) { + $installation = $dbForPlatform->getDocument('installations', $function->getAttribute('installationId')); + + $deployment = $this->redeployVcsFunction($request, $function, $project, $installation, $dbForProject, $queueForBuilds, $template, $github); + + $queueForEvents + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($deployment, Response::MODEL_DEPLOYMENT); + + return; + } + + $deploymentId = ID::unique(); + $deployment = $dbForProject->createDocument('deployments', new Document([ + '$id' => $deploymentId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'resourceId' => $function->getId(), + 'resourceInternalId' => $function->getInternalId(), + 'resourceType' => 'functions', + 'entrypoint' => $function->getAttribute('entrypoint', ''), + 'commands' => $function->getAttribute('commands', ''), + 'type' => 'manual', + 'search' => implode(' ', [$deploymentId, $function->getAttribute('entrypoint', '')]), + 'activate' => $activate, + ])); + + $queueForBuilds + ->setType(BUILD_TYPE_DEPLOYMENT) + ->setResource($function) + ->setDeployment($deployment) + ->setTemplate($template); + + $queueForEvents + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($deployment, Response::MODEL_DEPLOYMENT); + } +} diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index 9d89b7edf0..0bf08ea412 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Functions\Http\Functions; -use Appwrite\Event\Build; use Appwrite\Event\Event; use Appwrite\Event\Validator\FunctionEvent; use Appwrite\Extend\Exception; @@ -29,14 +28,12 @@ use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Roles; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Swoole\Request; use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\VCS\Adapter\Git\GitHub; class Create extends Base { @@ -90,30 +87,22 @@ class Create extends Base ->param('providerBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function.', true) ->param('providerSilentMode', false, new Boolean(), 'Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.', true) ->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo.', true) - ->param('templateRepository', '', new Text(128, 0), 'Repository name of the template.', true) - ->param('templateOwner', '', new Text(128, 0), 'The name of the owner of the template.', true) - ->param('templateRootDirectory', '', new Text(128, 0), 'Path to function code in the template repo.', true) - ->param('templateVersion', '', new Text(128, 0), 'Version (tag) for the repo linked to the function template.', true) ->param('specification', APP_COMPUTE_SPECIFICATION_DEFAULT, fn (array $plan) => new RuntimeSpecification( $plan, Config::getParam('runtime-specifications', []), App::getEnv('_APP_COMPUTE_CPUS', APP_COMPUTE_CPUS_DEFAULT), App::getEnv('_APP_COMPUTE_MEMORY', APP_COMPUTE_MEMORY_DEFAULT) ), 'Runtime specification for the function and builds.', true, ['plan']) - ->inject('request') ->inject('response') ->inject('dbForProject') ->inject('timelimit') ->inject('project') - ->inject('user') ->inject('queueForEvents') - ->inject('queueForBuilds') ->inject('dbForPlatform') - ->inject('gitHub') ->callback([$this, 'action']); } - public function action(string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateVersion, string $specification, Request $request, Response $response, Database $dbForProject, callable $timelimit, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForPlatform, GitHub $github) + public function action(string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, array $scopes, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $specification, Response $response, Database $dbForProject, callable $timelimit, Document $project, Event $queueForEvents, Database $dbForPlatform) { // Temporary abuse check @@ -153,20 +142,6 @@ class Create extends Base throw new Exception(Exception::FUNCTION_RUNTIME_UNSUPPORTED, 'Runtime "' . $runtime . '" is not supported'); } - // build from template - $template = new Document([]); - if ( - !empty($templateRepository) - && !empty($templateOwner) - && !empty($templateRootDirectory) - && !empty($templateVersion) - ) { - $template->setAttribute('repositoryName', $templateRepository) - ->setAttribute('ownerName', $templateOwner) - ->setAttribute('rootDirectory', $templateRootDirectory) - ->setAttribute('version', $templateVersion); - } - $installation = $dbForPlatform->getDocument('installations', $installationId); if (!empty($installationId) && $installation->isEmpty()) { @@ -254,36 +229,6 @@ class Create extends Base $function = $dbForProject->updateDocument('functions', $function->getId(), $function); - if (!empty($providerRepositoryId)) { - // Deploy VCS - $this->redeployVcsFunction($request, $function, $project, $installation, $dbForProject, $queueForBuilds, $template, $github); - } elseif (!$template->isEmpty()) { - // Deploy non-VCS from template - $deploymentId = ID::unique(); - $deployment = $dbForProject->createDocument('deployments', new Document([ - '$id' => $deploymentId, - '$permissions' => [ - Permission::read(Role::any()), - Permission::update(Role::any()), - Permission::delete(Role::any()), - ], - 'resourceId' => $function->getId(), - 'resourceInternalId' => $function->getInternalId(), - 'resourceType' => 'functions', - 'entrypoint' => $function->getAttribute('entrypoint', ''), - 'commands' => $function->getAttribute('commands', ''), - 'type' => 'manual', - 'search' => implode(' ', [$deploymentId, $function->getAttribute('entrypoint', '')]), - 'activate' => true, - ])); - - $queueForBuilds - ->setType(BUILD_TYPE_DEPLOYMENT) - ->setResource($function) - ->setDeployment($deployment) - ->setTemplate($template); - } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $routeSubdomain = ID::unique(); diff --git a/src/Appwrite/Platform/Modules/Functions/Services/Http.php b/src/Appwrite/Platform/Modules/Functions/Services/Http.php index 6c74182776..141c4abb62 100644 --- a/src/Appwrite/Platform/Modules/Functions/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Functions/Services/Http.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Functions\Services; use Appwrite\Platform\Modules\Functions\Http\Deployments\Create as CreateDeployment; +use Appwrite\Platform\Modules\Functions\Http\Deployments\Template\Create as CreateTemplateDeployment; use Appwrite\Platform\Modules\Functions\Http\Functions\Create as CreateFunction; use Appwrite\Platform\Modules\Functions\Http\Functions\Update as UpdateFunction; use Appwrite\Platform\Modules\Functions\Http\Functions\XList as ListFunctions; @@ -19,5 +20,6 @@ class Http extends Service $this->addAction(ListFunctions::getName(), new ListFunctions()); $this->addAction(ListRuntimes::getName(), new ListRuntimes()); $this->addAction(CreateDeployment::getName(), new CreateDeployment()); + $this->addAction(CreateTemplateDeployment::getName(), new CreateTemplateDeployment()); } } diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 41ab2fe02a..809cb96cc2 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -869,22 +869,27 @@ class Builds extends Action } elseif ($resource->getCollection() === 'sites') { $commands = []; - $commands[] = $deployment->getAttribute('installCommand', ''); - $commands[] = $deployment->getAttribute('buildCommand', ''); - $frameworks = Config::getParam('frameworks', []); $framework = $frameworks[$resource->getAttribute('framework', '')] ?? null; + $envCommand = ''; + $bundleCommand = ''; + if (!is_null($framework)) { $adapter = ($framework['adapters'] ?? [])[$resource->getAttribute('adapter', '')] ?? null; - if (!is_null($adapter) && isset($adapter['bundleCommand'])) { - $commands[] = $adapter['bundleCommand']; - } if (!is_null($adapter) && isset($adapter['envCommand'])) { - $commands[] = $adapter['envCommand']; + $envCommand = $adapter['envCommand']; + } + if (!is_null($adapter) && isset($adapter['bundleCommand'])) { + $bundleCommand = $adapter['bundleCommand']; } } + $commands[] = $envCommand; + $commands[] = $deployment->getAttribute('installCommand', ''); + $commands[] = $deployment->getAttribute('buildCommand', ''); + $commands[] = $bundleCommand; + $commands = array_filter($commands, fn ($command) => !empty($command)); return implode(' && ', $commands); diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Template/Create.php b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Template/Create.php new file mode 100644 index 0000000000..507397d70c --- /dev/null +++ b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Template/Create.php @@ -0,0 +1,165 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/sites/:siteId/deployments/template') + ->desc('Create deployment') + ->groups(['api', 'sites']) + ->label('scope', 'sites.write') + ->label('event', 'sites.[siteId].deployments.[deploymentId].create') + ->label('audits.event', 'deployment.create') + ->label('audits.resource', 'site/{request.siteId}') + ->label('sdk', new Method( + namespace: 'sites', + name: 'createTemplateDeployment', + description: <<param('siteId', '', new UID(), 'Site ID.') + ->param('repository', '', new Text(128, 0), 'Repository name of the template.') + ->param('owner', '', new Text(128, 0), 'The name of the owner of the template.') + ->param('rootDirectory', '', new Text(128, 0), 'Path to site code in the template repo.') + ->param('version', '', new Text(128, 0), 'Version (tag) for the repo linked to the site template.') + ->param('activate', false, new Boolean(), 'Automatically activate the deployment when it is finished building.', true) + ->inject('request') + ->inject('response') + ->inject('dbForProject') + ->inject('dbForPlatform') + ->inject('project') + ->inject('queueForEvents') + ->inject('queueForBuilds') + ->inject('gitHub') + ->callback([$this, 'action']); + } + + public function action(string $siteId, string $repository, string $owner, string $rootDirectory, string $version, bool $activate, Request $request, Response $response, Database $dbForProject, Database $dbForPlatform, Document $project, Event $queueForEvents, Build $queueForBuilds, GitHub $github) + { + $site = $dbForProject->getDocument('sites', $siteId); + + if ($site->isEmpty()) { + throw new Exception(Exception::SITE_NOT_FOUND); + } + + $template = new Document([ + 'repositoryName' => $repository, + 'ownerName' => $owner, + 'rootDirectory' => $rootDirectory, + 'version' => $version + ]); + + if (!empty($providerRepositoryId)) { + $installation = $dbForPlatform->getDocument('installations', $site->getAttribute('installationId')); + + $deployment = $this->redeployVcsSite($request, $site, $project, $installation, $dbForProject, $dbForPlatform, $queueForBuilds, $template, $github); + + $queueForEvents + ->setParam('siteId', $site->getId()) + ->setParam('deploymentId', $deployment->getId()); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($deployment, Response::MODEL_DEPLOYMENT); + + return; + } + + $deploymentId = ID::unique(); + $deployment = $dbForProject->createDocument('deployments', new Document([ + '$id' => $deploymentId, + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'resourceId' => $site->getId(), + 'resourceInternalId' => $site->getInternalId(), + 'resourceType' => 'sites', + 'installCommand' => $site->getAttribute('installCommand', ''), + 'buildCommand' => $site->getAttribute('buildCommand', ''), + 'outputDirectory' => $site->getAttribute('outputDirectory', ''), + 'type' => 'manual', + 'search' => implode(' ', [$deploymentId]), + 'activate' => $activate, + ])); + + // Preview deployments url + $projectId = $project->getId(); + + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $previewDomain = "{$deploymentId}-{$projectId}.{$sitesDomain}"; + + $rule = Authorization::skip( + fn () => $dbForPlatform->createDocument('rules', new Document([ + '$id' => \md5($previewDomain), + 'projectId' => $project->getId(), + 'projectInternalId' => $project->getInternalId(), + 'domain' => $previewDomain, + 'resourceType' => 'deployment', + 'resourceId' => $deploymentId, + 'resourceInternalId' => $deployment->getInternalId(), + 'status' => 'verified', + 'certificateId' => '', + ])) + ); + + $queueForBuilds + ->setType(BUILD_TYPE_DEPLOYMENT) + ->setResource($site) + ->setDeployment($deployment) + ->setTemplate($template); + + $queueForEvents + ->setParam('siteId', $site->getId()) + ->setParam('deploymentId', $deployment->getId()); + + $response + ->setStatusCode(Response::STATUS_CODE_ACCEPTED) + ->dynamic($deployment, Response::MODEL_DEPLOYMENT); + } +} diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Sites/Create.php b/src/Appwrite/Platform/Modules/Sites/Http/Sites/Create.php index 079f2fec49..52fa8e47a2 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Sites/Create.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Sites/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Sites\Http\Sites; -use Appwrite\Event\Build; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Messaging\Adapter\Realtime; @@ -24,13 +23,11 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Swoole\Request; use Utopia\System\System; use Utopia\Validator\Boolean; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\VCS\Adapter\Git\GitHub; class Create extends Base { @@ -83,29 +80,21 @@ class Create extends Base ->param('providerBranch', '', new Text(128, 0), 'Production branch for the repo linked to the site.', true) ->param('providerSilentMode', false, new Boolean(), 'Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.', true) ->param('providerRootDirectory', '', new Text(128, 0), 'Path to site code in the linked repo.', true) - ->param('templateRepository', '', new Text(128, 0), 'Repository name of the template.', true) - ->param('templateOwner', '', new Text(128, 0), 'The name of the owner of the template.', true) - ->param('templateRootDirectory', '', new Text(128, 0), 'Path to site code in the template repo.', true) - ->param('templateVersion', '', new Text(128, 0), 'Version (tag) for the repo linked to the site template.', true) ->param('specification', APP_COMPUTE_SPECIFICATION_DEFAULT, fn (array $plan) => new FrameworkSpecification( $plan, Config::getParam('framework-specifications', []), App::getEnv('_APP_COMPUTE_CPUS', APP_COMPUTE_CPUS_DEFAULT), App::getEnv('_APP_COMPUTE_MEMORY', APP_COMPUTE_MEMORY_DEFAULT) ), 'Framework specification for the site and builds.', true, ['plan']) - ->inject('request') ->inject('response') ->inject('dbForProject') ->inject('project') - ->inject('user') ->inject('queueForEvents') - ->inject('queueForBuilds') ->inject('dbForPlatform') - ->inject('gitHub') ->callback([$this, 'action']); } - public function action(string $siteId, string $name, string $framework, bool $enabled, int $timeout, string $installCommand, string $buildCommand, string $outputDirectory, string $subdomain, string $buildRuntime, string $adapter, string $installationId, ?string $fallbackFile, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateVersion, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForPlatform, GitHub $github) + public function action(string $siteId, string $name, string $framework, bool $enabled, int $timeout, string $installCommand, string $buildCommand, string $outputDirectory, string $subdomain, string $buildRuntime, string $adapter, string $installationId, ?string $fallbackFile, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $specification, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Database $dbForPlatform) { if (!empty($adapter)) { $configFramework = Config::getParam('frameworks')[$framework] ?? []; @@ -139,20 +128,6 @@ class Create extends Base throw new Exception(Exception::SITE_FRAMEWORK_UNSUPPORTED, 'Framework "' . $framework . '" is not supported'); } - // build from template - $template = new Document([]); - if ( - !empty($templateRepository) - && !empty($templateOwner) - && !empty($templateRootDirectory) - && !empty($templateVersion) - ) { - $template->setAttribute('repositoryName', $templateRepository) - ->setAttribute('ownerName', $templateOwner) - ->setAttribute('rootDirectory', $templateRootDirectory) - ->setAttribute('version', $templateVersion); - } - $installation = $dbForPlatform->getDocument('installations', $installationId); if (!empty($installationId) && $installation->isEmpty()) { @@ -220,57 +195,6 @@ class Create extends Base $site = $dbForProject->updateDocument('sites', $site->getId(), $site); - if (!empty($providerRepositoryId)) { - // Deploy VCS - $this->redeployVcsSite($request, $site, $project, $installation, $dbForProject, $dbForPlatform, $queueForBuilds, $template, $github); - } elseif (!$template->isEmpty()) { - // Deploy non-VCS from template - $deploymentId = ID::unique(); - $deployment = $dbForProject->createDocument('deployments', new Document([ - '$id' => $deploymentId, - '$permissions' => [ - Permission::read(Role::any()), - Permission::update(Role::any()), - Permission::delete(Role::any()), - ], - 'resourceId' => $site->getId(), - 'resourceInternalId' => $site->getInternalId(), - 'resourceType' => 'sites', - 'installCommand' => $site->getAttribute('installCommand', ''), - 'buildCommand' => $site->getAttribute('buildCommand', ''), - 'outputDirectory' => $site->getAttribute('outputDirectory', ''), - 'type' => 'manual', - 'search' => implode(' ', [$deploymentId]), - 'activate' => true, - ])); - - // Preview deployments url - $projectId = $project->getId(); - - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); - $previewDomain = "{$deploymentId}-{$projectId}.{$sitesDomain}"; - - $rule = Authorization::skip( - fn () => $dbForPlatform->createDocument('rules', new Document([ - '$id' => \md5($previewDomain), - 'projectId' => $project->getId(), - 'projectInternalId' => $project->getInternalId(), - 'domain' => $previewDomain, - 'resourceType' => 'deployment', - 'resourceId' => $deploymentId, - 'resourceInternalId' => $deployment->getInternalId(), - 'status' => 'verified', - 'certificateId' => '', - ])) - ); - - $queueForBuilds - ->setType(BUILD_TYPE_DEPLOYMENT) - ->setResource($site) - ->setDeployment($deployment) - ->setTemplate($template); - } - if (!empty($sitesDomain)) { $rule = Authorization::skip( fn () => $dbForPlatform->createDocument('rules', new Document([ diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Variables/Create.php b/src/Appwrite/Platform/Modules/Sites/Http/Variables/Create.php index 1207f6c1c4..2d3cf76f5c 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Variables/Create.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Variables/Create.php @@ -56,14 +56,13 @@ class Create extends Base ->param('siteId', '', new UID(), 'Site unique ID.', false) ->param('key', null, new Text(Database::LENGTH_KEY), 'Variable key. Max length: ' . Database::LENGTH_KEY . ' chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', false) - ->param('secret', false, new Boolean(), 'Is secret? Secret variables can only be updated or deleted, they cannot be read.', true) + ->param('secret', true, new Boolean(), 'Secret variables can be updated or deleted, but only sites can read them during build and runtime.', true) ->inject('response') ->inject('dbForProject') - ->inject('dbForPlatform') ->callback([$this, 'action']); } - public function action(string $siteId, string $key, string $value, bool $secret, Response $response, Database $dbForProject, Database $dbForPlatform) + public function action(string $siteId, string $key, string $value, bool $secret, Response $response, Database $dbForProject) { $site = $dbForProject->getDocument('sites', $siteId); diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php b/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php index d9d70e4bdf..4040a8ae71 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php @@ -13,6 +13,7 @@ use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; +use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Update extends Base @@ -52,12 +53,13 @@ class Update extends Base ->param('variableId', '', new UID(), 'Variable unique ID.', false) ->param('key', null, new Text(255), 'Variable key. Max length: 255 chars.', false) ->param('value', null, new Text(8192, 0), 'Variable value. Max length: 8192 chars.', true) + ->param('secret', null, new Boolean(), 'Secret variables can be updated or deleted, but only sites can read them during build and runtime.', true) ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); } - public function action(string $siteId, string $variableId, string $key, ?string $value, Response $response, Database $dbForProject) + public function action(string $siteId, string $variableId, string $key, ?string $value, ?bool $secret, Response $response, Database $dbForProject) { $site = $dbForProject->getDocument('sites', $siteId); @@ -74,9 +76,14 @@ class Update extends Base throw new Exception(Exception::VARIABLE_NOT_FOUND); } + if ($variable->getAttribute('secret') === true && $secret === false) { + throw new Exception(Exception::VARIABLE_CANNOT_UNSET_SECRET); + } + $variable ->setAttribute('key', $key) ->setAttribute('value', $value ?? $variable->getAttribute('value')) + ->setAttribute('secret', $secret ?? $variable->getAttribute('secret')) ->setAttribute('search', implode(' ', [$variableId, $site->getId(), $key, 'site'])); try { diff --git a/src/Appwrite/Platform/Modules/Sites/Services/Http.php b/src/Appwrite/Platform/Modules/Sites/Services/Http.php index 619702e761..b43919acb7 100644 --- a/src/Appwrite/Platform/Modules/Sites/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Sites/Services/Http.php @@ -9,6 +9,7 @@ use Appwrite\Platform\Modules\Sites\Http\Deployments\Create as CreateDeployment; use Appwrite\Platform\Modules\Sites\Http\Deployments\Delete as DeleteDeployment; use Appwrite\Platform\Modules\Sites\Http\Deployments\Download\Get as DownloadDeployment; use Appwrite\Platform\Modules\Sites\Http\Deployments\Get as GetDeployment; +use Appwrite\Platform\Modules\Sites\Http\Deployments\Template\Create as CreateTemplateDeployment; use Appwrite\Platform\Modules\Sites\Http\Deployments\Update as UpdateDeployment; use Appwrite\Platform\Modules\Sites\Http\Deployments\XList as ListDeployments; use Appwrite\Platform\Modules\Sites\Http\Frameworks\XList as ListFrameworks; @@ -49,6 +50,7 @@ class Http extends Service // Deployments $this->addAction(CreateDeployment::getName(), new CreateDeployment()); + $this->addAction(CreateTemplateDeployment::getName(), new CreateTemplateDeployment()); $this->addAction(GetDeployment::getName(), new GetDeployment()); $this->addAction(ListDeployments::getName(), new ListDeployments()); $this->addAction(UpdateDeployment::getName(), new UpdateDeployment()); diff --git a/src/Appwrite/Transformation/Adapter.php b/src/Appwrite/Transformation/Adapter.php new file mode 100644 index 0000000000..b4b5dce8a8 --- /dev/null +++ b/src/Appwrite/Transformation/Adapter.php @@ -0,0 +1,32 @@ +input = $input; + return $this; + } + + public function getOutput(): mixed + { + return $this->output; + } + + /** + * @param array $traits + */ + abstract public function isValid(array $traits): bool; + + abstract public function transform(): void; +} diff --git a/src/Appwrite/Transformation/Adapter/Mock.php b/src/Appwrite/Transformation/Adapter/Mock.php new file mode 100644 index 0000000000..13ec1cc88b --- /dev/null +++ b/src/Appwrite/Transformation/Adapter/Mock.php @@ -0,0 +1,26 @@ + $traits Mock traits + */ + public function isValid(array $traits): bool + { + if ($traits['mock'] === true) { + return true; + } + + return false; + } + + public function transform(): void + { + $this->output = $this->input; + $this->output = "Mock: " . $this->output; + } +} diff --git a/src/Appwrite/Transformation/Adapter/Preview.php b/src/Appwrite/Transformation/Adapter/Preview.php new file mode 100644 index 0000000000..94f1454593 --- /dev/null +++ b/src/Appwrite/Transformation/Adapter/Preview.php @@ -0,0 +1,201 @@ + $traits Proxied response headers + */ + public function isValid(array $traits): bool + { + $contentType = ''; + + foreach ($traits as $key => $value) { + if (\strtolower($key) === 'content-type') { + $contentType = $value; + break; + } + } + + if (\str_contains($contentType, 'text/html')) { + return true; + } + + return false; + } + + public function transform(): void + { + $this->output = $this->input; + + $banner = << + #appwrite-preview { + padding: 0; + margin: 0; + position: fixed; + right: 16px; + bottom: 16px; + z-index: 1; + border-radius: var(--border-radius-S, 8px); + border: var(--border-width-S, 1px) solid var(--color-border-neutral, #EDEDF0); + background: var(--color-bgColor-neutral-primary, #FFF); + box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.03), 0px 4px 4px 0px rgba(0, 0, 0, 0.04); + padding: var(--space-3, 6px) var(--space-4, 8px); + display: flex; + justify-content: center; + align-items: center; + gap: var(--gap-XXS, 4px); + cursor: pointer; + transition: opacity 0.3s; + } + + #appwrite-preview-close { + position: absolute; + right: 0px; + bottom: 0px; + border-radius: var(--border-radius-S, 8px); + background: linear-gradient(270deg, #FFF 69.64%, rgba(255, 255, 255, 0.00) 114.29%); + height: 100%; + aspect-ratio: 1 / 1; + display: flex; + justify-content: center; + align-items: center; + opacity: 0; + transition: opacity 0.3s; + } + + #appwrite-preview-logo-dark { + display: none; + } + + #appwrite-preview:hover #appwrite-preview-close { + opacity: 1; + } + + #appwrite-preview-text { + padding: 0; + margin: 0; + color: var(--color-fgColor-neutral-secondary, #56565C); + font-family: var(--font-family-sansSerif, Inter); + font-size: var(--font-size-XS, 12px); + font-style: normal; + font-weight: 500; + line-height: 130%; + letter-spacing: -0.12px; + } + + #appwrite-preview-close-text { + opacity: 0; + transition: opacity 0.3s; + position: absolute; + bottom: calc(15px + 4px); + display: flex; + padding: var(--space-1, 2px) var(--space-2, 4px); + color: var(--color-fgColor-neutral-secondary, #56565C); + text-align: center; + font-family: var(--font-family-sansSerif, Inter); + font-size: var(--font-size-XS, 12px); + font-style: normal; + font-weight: 400; + line-height: 130%; + letter-spacing: -0.12px; + border-radius: var(--border-radius-XS, 6px); + background: #EDEDF0; + } + + #appwrite-preview-close:hover #appwrite-preview-close-text { + opacity: 1; + } + + @media (prefers-color-scheme: dark) { + #appwrite-preview { + border: var(--border-width-S, 1px) solid var(--color-border-neutral, #2D2D31); + background: var(--color-bgColor-neutral-primary, #1D1D21); + box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.03), 0px 4px 4px 0px rgba(0, 0, 0, 0.04); + } + + #appwrite-preview-text { + color: var(--color-fgColor-neutral-secondary, #C3C3C6); + font-family: var(--font-family-sansSerif, Inter); + font-size: var(--font-size-XS, 12px); + } + + #appwrite-preview-logo-dark { + display: block; + } + + #appwrite-preview-logo-light { + display: none; + } + + #appwrite-preview-close { + background: linear-gradient(270deg, #1D1D21 69.64%, rgba(29, 29, 33, 0.00) 114.29%); + } + + #appwrite-preview-close-text { + background: #2D2D31; + color: var(--color-fgColor-neutral-secondary, #C3C3C6); + } + } + + + + + + EOT; + + $this->output .= $banner; + } +} diff --git a/src/Appwrite/Transformation/Transformation.php b/src/Appwrite/Transformation/Transformation.php new file mode 100644 index 0000000000..d01ee08179 --- /dev/null +++ b/src/Appwrite/Transformation/Transformation.php @@ -0,0 +1,74 @@ + $adapters + */ + protected array $adapters; + + /** + * @var array $traits + */ + protected array $traits; + + protected mixed $input; + protected mixed $output; + + /** + * @param array $adapters + */ + public function __construct(array $adapters = []) + { + $this->adapters = $adapters; + } + + /** + * @param array $traits + */ + public function setTraits(array $traits): self + { + $this->traits = $traits; + return $this; + } + + public function setInput(mixed $input): self + { + $this->input = $input; + return $this; + } + + public function addAdapter(Adapter $adapter): self + { + $this->adapters[] = $adapter; + return $this; + } + + public function transform(): bool + { + foreach ($this->adapters as $adapter) { + if (!$adapter->isValid($this->traits)) { + return false; + } + } + + $output = $this->input; + + foreach ($this->adapters as $adapter) { + $adapter->setInput($output); + $adapter->transform(); + $output = $adapter->getOutput(); + } + + $this->output = $output; + + return true; + } + + public function getOutput(): mixed + { + return $this->output; + } +} diff --git a/src/Appwrite/Utopia/Request.php b/src/Appwrite/Utopia/Request.php index f8c0439293..480fce58b0 100644 --- a/src/Appwrite/Utopia/Request.php +++ b/src/Appwrite/Utopia/Request.php @@ -2,8 +2,10 @@ namespace Appwrite\Utopia; +use Appwrite\Auth\Auth; use Appwrite\Utopia\Request\Filter; use Swoole\Http\Request as SwooleRequest; +use Utopia\Database\Validator\Authorization; use Utopia\Route; use Utopia\Swoole\Request as UtopiaRequest; @@ -180,4 +182,27 @@ class Request extends UtopiaRequest $headers = $this->getHeaders(); return $headers[$key] ?? $default; } + + /** + * Get User Agent + * + * Method for getting User Agent. Preferring forwarded agent for privileged users; otherwise returns default. + * + * @param string $default + * @return string + */ + public function getUserAgent(string $default = ''): string + { + $forwardedUserAgent = $this->getHeader('x-forwarded-user-agent'); + if (!empty($forwardedUserAgent)) { + $roles = Authorization::getRoles(); + $isAppUser = Auth::isAppUser($roles); + + if ($isAppUser) { + return $forwardedUserAgent; + } + } + + return UtopiaRequest::getUserAgent($default); + } } diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index cca27cc3be..788f949fb3 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -2307,6 +2307,60 @@ class AccountCustomClientTest extends Scope $this->assertNotEmpty($response['body']['$id']); $this->assertNotEmpty($response['body']['expire']); $this->assertEmpty($response['body']['secret']); + $this->assertEquals('browser', $response['body']['clientType']); + $this->assertEquals('CH', $response['body']['clientCode']); + $this->assertEquals('Chrome', $response['body']['clientName']); + + // Forwarded User Agent with API Key + $response = $this->client->call(Client::METHOD_POST, '/users/' . $data['id'] . '/tokens', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'expire' => 60 + ]); + + $userId = $response['body']['userId']; + $secret = $response['body']['secret']; + + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/token', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + 'x-forwarded-user-agent' => 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36' + ], [ + 'userId' => $userId, + 'secret' => $secret + ]); + + $this->assertEquals('browser', $response['body']['clientType']); + $this->assertEquals('CM', actual: $response['body']['clientCode']); + $this->assertEquals('Chrome Mobile', $response['body']['clientName']); + + // Forwarded User Agent without API Key + $response = $this->client->call(Client::METHOD_POST, '/users/' . $data['id'] . '/tokens', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'expire' => 60 + ]); + + $userId = $response['body']['userId']; + $secret = $response['body']['secret']; + + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/token', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-forwarded-user-agent' => 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36' + ], [ + 'userId' => $userId, + 'secret' => $secret + ]); + + $this->assertEquals('browser', $response['body']['clientType']); + $this->assertEquals('CH', $response['body']['clientCode']); + $this->assertEquals('Chrome', $response['body']['clientName']); /** * Test for FAILURE diff --git a/tests/e2e/Services/Functions/FunctionsBase.php b/tests/e2e/Services/Functions/FunctionsBase.php index a1bb8f2b21..e99aedc93e 100644 --- a/tests/e2e/Services/Functions/FunctionsBase.php +++ b/tests/e2e/Services/Functions/FunctionsBase.php @@ -82,6 +82,46 @@ trait FunctionsBase return $variable; } + protected function getVariable(string $functionId, string $variableId): mixed + { + $variable = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/variables/' . $variableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + return $variable; + } + + protected function updateVariable(string $functionId, string $variableId, mixed $params): mixed + { + $variable = $this->client->call(Client::METHOD_PUT, '/functions/' . $functionId . '/variables/' . $variableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), $params); + + return $variable; + } + + protected function listVariables(string $functionId, mixed $params = []): mixed + { + $variables = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/variables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), $params); + + return $variables; + } + + protected function deleteVariable(string $functionId, string $variableId): mixed + { + $variable = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId . '/variables/' . $variableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + return $variable; + } + protected function getFunction(string $functionId): mixed { $function = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId, array_merge([ @@ -166,6 +206,16 @@ trait FunctionsBase return $deployment; } + protected function createTemplateDeployment(string $functionId, mixed $params = []): mixed + { + $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments/template', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), $params); + + return $deployment; + } + protected function getFunctionUsage(string $functionId, mixed $params): mixed { $usage = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/usage', array_merge([ diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index 0708d40aab..9b37fad394 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -110,7 +110,8 @@ class FunctionsConsoleClientTest extends Scope $data['functionId'], [ 'key' => 'APP_TEST', - 'value' => 'TESTINGVALUE' + 'value' => 'TESTINGVALUE', + 'secret' => false ] ); @@ -131,6 +132,7 @@ class FunctionsConsoleClientTest extends Scope $this->assertEquals(201, $variable['headers']['status-code']); $this->assertEquals('APP_TEST_1', $variable['body']['key']); $this->assertEmpty($variable['body']['value']); + $this->assertTrue($variable['body']['secret']); $secretVariableId = $variable['body']['$id']; @@ -142,7 +144,8 @@ class FunctionsConsoleClientTest extends Scope $data['functionId'], [ 'key' => 'APP_TEST', - 'value' => 'ANOTHERTESTINGVALUE' + 'value' => 'ANOTHERTESTINGVALUE', + 'secret' => false ] ); @@ -320,6 +323,41 @@ class FunctionsConsoleClientTest extends Scope $this->assertEquals("APP_TEST_UPDATE_2", $variable['body']['key']); $this->assertEquals("TESTINGVALUEUPDATED", $variable['body']['value']); + // convert non-secret variable to secret + $response = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'] . '/variables/' . $data['variableId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'key' => 'APP_TEST_UPDATE_2', + 'secret' => true + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals("APP_TEST_UPDATE_2", $response['body']['key']); + $this->assertEmpty($response['body']['value']); + $this->assertTrue($response['body']['secret']); + + $variable = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/variables/' . $data['variableId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $variable['headers']['status-code']); + $this->assertEquals("APP_TEST_UPDATE_2", $variable['body']['key']); + $this->assertEmpty($variable['body']['value']); + $this->assertTrue($variable['body']['secret']); + + // convert secret variable to non-secret + $response = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'] . '/variables/' . $data['variableId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'key' => 'APP_TEST_UPDATE', + 'secret' => false + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + /** * Test for FAILURE */ @@ -410,4 +448,53 @@ class FunctionsConsoleClientTest extends Scope return $data; } + + public function testVariableE2E(): void + { + $function = $this->createFunction([ + 'functionId' => ID::unique(), + 'runtime' => 'node-18.0', + 'name' => 'Variable E2E Test', + 'entrypoint' => 'index.js', + 'logging' => false, + 'execute' => ['any'] + ]); + + $this->assertEquals(201, $function['headers']['status-code']); + $this->assertFalse($function['body']['logging']); + $this->assertNotEmpty($function['body']['$id']); + + $functionId = $function['body']['$id'] ?? ''; + + // create variable + $variable = $this->createVariable($functionId, [ + 'key' => 'CUSTOM_VARIABLE', + 'value' => 'a_secret_value', + 'secret' => true, + ]); + + $this->assertEquals(201, $variable['headers']['status-code']); + $this->assertNotEmpty($variable['body']['$id']); + $this->assertEquals('CUSTOM_VARIABLE', $variable['body']['key']); + $this->assertEquals('', $variable['body']['value']); + $this->assertEquals(true, $variable['body']['secret']); + + $deploymentId = $this->setupDeployment($functionId, [ + 'entrypoint' => 'index.js', + 'code' => $this->packageFunction('node'), + 'activate' => true + ]); + + $this->assertNotEmpty($deploymentId); + + $execution = $this->createExecution($functionId); + + $this->assertEquals(201, $execution['headers']['status-code']); + $this->assertEmpty($execution['body']['logs']); + $this->assertEmpty($execution['body']['errors']); + $body = json_decode($execution['body']['responseBody']); + $this->assertEquals('a_secret_value', $body->CUSTOM_VARIABLE); + + $this->cleanupFunction($functionId); + } } diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 712d6d3948..8975a1a5dc 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -38,7 +38,7 @@ class FunctionsCustomServerTest extends Scope 'timeout' => 10, ]); - $functionId = $functionId = $function['body']['$id'] ?? ''; + $functionId = $function['body']['$id'] ?? ''; $dateValidator = new DatetimeValidator(); $this->assertEquals(201, $function['headers']['status-code']); @@ -356,7 +356,22 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); $this->assertNotEmpty($function['body']['$id']); - $functionId = $functionId = $function['body']['$id'] ?? ''; + $functionId = $function['body']['$id'] ?? ''; + + $deployment = $this->createTemplateDeployment( + $functionId, + [ + 'functionId' => ID::unique(), + 'activate' => true, + 'repository' => $starterTemplate['body']['providerRepositoryId'], + 'owner' => $starterTemplate['body']['providerOwner'], + 'rootDirectory' => $phpRuntime['providerRootDirectory'], + 'version' => $starterTemplate['body']['providerVersion'], + ] + ); + + $this->assertEquals(202, $deployment['headers']['status-code']); + $this->assertNotEmpty($deployment['body']['$id']); $deployments = $this->listDeployments($functionId); @@ -1898,7 +1913,7 @@ class FunctionsCustomServerTest extends Scope $this->assertFalse($function['body']['logging']); $this->assertNotEmpty($function['body']['$id']); - $functionId = $functionId = $function['body']['$id'] ?? ''; + $functionId = $function['body']['$id'] ?? ''; $this->setupDeployment($functionId, [ 'code' => $this->packageFunction('node'), diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 34c1142619..ed9171e46a 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -3923,10 +3923,14 @@ class ProjectsConsoleClientTest extends Scope 'x-appwrite-mode' => 'admin', ], $this->getHeaders()), [ 'key' => 'APP_TEST', - 'value' => 'TESTINGVALUE' + 'value' => 'TESTINGVALUE', + 'secret' => false ]); $this->assertEquals(201, $variable['headers']['status-code']); + $this->assertEquals('APP_TEST', $variable['body']['key']); + $this->assertEquals('TESTINGVALUE', $variable['body']['value']); + $this->assertFalse($variable['body']['secret']); $variableId = $variable['body']['$id']; // test for secret variable @@ -4047,6 +4051,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals("APP_TEST_1", $response['body']['key']); $this->assertEmpty($response['body']['value']); + $this->assertTrue($response['body']['secret']); /** * Test for FAILURE @@ -4118,6 +4123,17 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals("APP_TEST_UPDATE_1", $variable['body']['key']); $this->assertEmpty($variable['body']['value']); + $response = $this->client->call(Client::METHOD_PUT, '/project/variables/' . $data['secretVariableId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-mode' => 'admin', + ], $this->getHeaders()), [ + 'key' => 'APP_TEST_UPDATE_1', + 'secret' => false, + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + $response = $this->client->call(Client::METHOD_GET, '/project/variables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $data['projectId'], diff --git a/tests/e2e/Services/Sites/SitesBase.php b/tests/e2e/Services/Sites/SitesBase.php index d19f20b24d..bc7b6d2722 100644 --- a/tests/e2e/Services/Sites/SitesBase.php +++ b/tests/e2e/Services/Sites/SitesBase.php @@ -6,6 +6,7 @@ use Appwrite\Tests\Async; use CURLFile; use Tests\E2E\Client; use Utopia\CLI\Console; +use Utopia\Database\Query; trait SitesBase { @@ -46,7 +47,7 @@ trait SitesBase 'x-appwrite-key' => $this->getProject()['apiKey'], ])); $this->assertEquals('ready', $deployment['body']['status'], 'Deployment status is not ready, deployment: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT)); - }, 50000, 500); + }, 100000, 500); return $deploymentId; } @@ -103,6 +104,46 @@ trait SitesBase return $variable; } + protected function getVariable(string $siteId, string $variableId): mixed + { + $variable = $this->client->call(Client::METHOD_GET, '/sites/' . $siteId . '/variables/' . $variableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + return $variable; + } + + protected function listVariables(string $siteId, mixed $params = []): mixed + { + $variables = $this->client->call(Client::METHOD_GET, '/sites/' . $siteId . '/variables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), $params); + + return $variables; + } + + protected function updateVariable(string $siteId, string $variableId, mixed $params): mixed + { + $variable = $this->client->call(Client::METHOD_PUT, '/sites/' . $siteId . '/variables/' . $variableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), $params); + + return $variable; + } + + protected function deleteVariable(string $siteId, string $variableId): mixed + { + $variable = $this->client->call(Client::METHOD_DELETE, '/sites/' . $siteId . '/variables/' . $variableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + return $variable; + } + protected function getSite(string $siteId): mixed { $site = $this->client->call(Client::METHOD_GET, '/sites/' . $siteId, array_merge([ @@ -187,6 +228,16 @@ trait SitesBase return $deployment; } + protected function createTemplateDeployment(string $siteId, mixed $params = []): mixed + { + $deployment = $this->client->call(Client::METHOD_POST, '/sites/' . $siteId . '/deployments/template', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), $params); + + return $deployment; + } + protected function getSiteUsage(string $siteId, mixed $params): mixed { $usage = $this->client->call(Client::METHOD_GET, '/sites/' . $siteId . '/usage', array_merge([ @@ -215,4 +266,49 @@ trait SitesBase return $site; } + + protected function getSiteDomain(string $siteId): string + { + $rules = $this->client->call(Client::METHOD_GET, '/proxy/rules', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('resourceId', [$siteId])->toString(), + Query::equal('resourceType', ['site'])->toString(), + ], + ]); + + $this->assertEquals(200, $rules['headers']['status-code']); + $this->assertGreaterThanOrEqual(1, $rules['body']['total']); + $this->assertGreaterThanOrEqual(1, \count($rules['body']['rules'])); + $this->assertNotEmpty($rules['body']['rules'][0]['domain']); + + $domain = $rules['body']['rules'][0]['domain']; + + return $domain; + } + + + protected function getDeploymentDomain(string $deploymentId): string + { + $rules = $this->client->call(Client::METHOD_GET, '/proxy/rules', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('resourceId', [$deploymentId])->toString(), + Query::equal('resourceType', ['deployment'])->toString(), + ], + ]); + + $this->assertEquals(200, $rules['headers']['status-code']); + $this->assertGreaterThanOrEqual(1, $rules['body']['total']); + $this->assertGreaterThanOrEqual(1, \count($rules['body']['rules'])); + $this->assertNotEmpty($rules['body']['rules'][0]['domain']); + + $domain = $rules['body']['rules'][0]['domain']; + + return $domain; + } } diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index d5863aea2f..b01d31ada7 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -65,6 +65,264 @@ class SitesCustomServerTest extends Scope $this->cleanupSite($siteId); } + public function testConsoleAvailabilityEndpoint(): void + { + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Test Site', + 'framework' => 'other', + 'buildRuntime' => 'ssr-22', + 'outputDirectory' => './', + 'subdomain' => 'test-site', + 'fallbackFile' => null, + ]); + + $this->assertNotEmpty($siteId); + + $rule = $this->getSiteDomain($siteId); + + $response = $this->client->call(Client::METHOD_GET, '/console/resources', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + 'x-appwrite-project' => 'console', + ], [ + 'type' => 'rules', + 'value' => $rule, + ]); + + $this->assertEquals(409, $response['headers']['status-code']); // domain unavailable + + $nonExistingDomain = "non-existent-subdomain.sites.localhost"; + + $response = $this->client->call(Client::METHOD_GET, '/console/resources', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + 'x-appwrite-project' => 'console', + ], [ + 'type' => 'rules', + 'value' => $nonExistingDomain, + ]); + + $this->assertEquals(204, $response['headers']['status-code']); // domain available + + $this->cleanupSite($siteId); + + $this->assertEventually(function () use ($siteId) { + $rule = $this->client->call(Client::METHOD_GET, '/proxy/rules', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('resourceId', [$siteId]) + ] + ]); + + $this->assertEquals(200, $rule['headers']['status-code']); + $this->assertEquals(0, $rule['body']['total']); + }, 5000, 500); + + $response = $this->client->call(Client::METHOD_GET, '/console/resources', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + 'x-appwrite-project' => 'console', + ], [ + 'type' => 'rules', + 'value' => $rule, + ]); + + $this->assertEquals(204, $response['headers']['status-code']); // domain available as site is deleted + } + + public function testVariables(): void + { + $site = $this->createSite([ + 'buildRuntime' => 'ssr-22', + 'fallbackFile' => null, + 'framework' => 'other', + 'name' => 'Test Site', + 'outputDirectory' => './', + 'siteId' => ID::unique() + ]); + + $siteId = $site['body']['$id'] ?? ''; + + $this->assertEquals(201, $site['headers']['status-code']); + $this->assertNotEmpty($site['body']['$id']); + $this->assertEquals('Test Site', $site['body']['name']); + + $variable = $this->createVariable($siteId, [ + 'key' => 'siteKey1', + 'value' => 'siteValue1', + 'secret' => false, + ]); + + $this->assertEquals(201, $variable['headers']['status-code']); + $this->assertNotEmpty($variable['body']['$id']); + $this->assertEquals('siteKey1', $variable['body']['key']); + $this->assertEquals('siteValue1', $variable['body']['value']); + $this->assertEquals(false, $variable['body']['secret']); + + $variable2 = $this->createVariable($siteId, [ + 'key' => 'siteKey2', + 'value' => 'siteValue2', + 'secret' => false, + ]); + + $this->assertEquals(201, $variable2['headers']['status-code']); + $this->assertNotEmpty($variable2['body']['$id']); + $this->assertEquals('siteKey2', $variable2['body']['key']); + $this->assertEquals('siteValue2', $variable2['body']['value']); + $this->assertEquals(false, $variable2['body']['secret']); + + $secretVariable = $this->createVariable($siteId, [ + 'key' => 'siteKey3', + 'value' => 'siteValue3', + 'secret' => true, + ]); + + $this->assertEquals(201, $secretVariable['headers']['status-code']); + $this->assertNotEmpty($secretVariable['body']['$id']); + $this->assertEquals('siteKey3', $secretVariable['body']['key']); + $this->assertEquals('', $secretVariable['body']['value']); + $this->assertEquals(true, $secretVariable['body']['secret']); + + $variable = $this->getVariable($siteId, $variable['body']['$id']); + + $this->assertEquals(200, $variable['headers']['status-code']); + $this->assertNotEmpty($variable['body']['$id']); + $this->assertEquals('siteKey1', $variable['body']['key']); + $this->assertEquals('siteValue1', $variable['body']['value']); + $this->assertEquals(false, $variable['body']['secret']); + + $secretVariable = $this->getVariable($siteId, $secretVariable['body']['$id']); + + $this->assertEquals(200, $secretVariable['headers']['status-code']); + $this->assertNotEmpty($secretVariable['body']['$id']); + $this->assertEquals('siteKey3', $secretVariable['body']['key']); + $this->assertEquals('', $secretVariable['body']['value']); + $this->assertEquals(true, $secretVariable['body']['secret']); + + $variable = $this->updateVariable($siteId, $variable['body']['$id'], [ + 'key' => 'siteKey1Updated', + 'value' => 'siteValue1Updated', + ]); + + $this->assertEquals(200, $variable['headers']['status-code']); + $this->assertNotEmpty($variable['body']['$id']); + $this->assertEquals('siteKey1Updated', $variable['body']['key']); + $this->assertEquals('siteValue1Updated', $variable['body']['value']); + $this->assertEquals(false, $variable['body']['secret']); + + $variable = $this->updateVariable($siteId, $variable['body']['$id'], [ + 'key' => 'siteKey1Updated', + 'secret' => true, + ]); + + $this->assertEquals(200, $variable['headers']['status-code']); + $this->assertNotEmpty($variable['body']['$id']); + $this->assertEquals('siteKey1Updated', $variable['body']['key']); + $this->assertEquals('', $variable['body']['value']); + $this->assertEquals(true, $variable['body']['secret']); + + $secretVariable = $this->updateVariable($siteId, $secretVariable['body']['$id'], [ + 'key' => 'siteKey3', + 'value' => 'siteValue3Updated', + ]); + + $this->assertEquals(200, $secretVariable['headers']['status-code']); + $this->assertNotEmpty($secretVariable['body']['$id']); + $this->assertEquals('siteKey3', $secretVariable['body']['key']); + $this->assertEquals('', $secretVariable['body']['value']); + $this->assertEquals(true, $secretVariable['body']['secret']); + + $response = $this->updateVariable($siteId, $secretVariable['body']['$id'], [ + 'key' => 'siteKey3', + 'secret' => false, + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + $secretVariable = $this->getVariable($siteId, $secretVariable['body']['$id']); + + $this->assertEquals(200, $secretVariable['headers']['status-code']); + $this->assertNotEmpty($secretVariable['body']['$id']); + $this->assertEquals('siteKey3', $secretVariable['body']['key']); + $this->assertEquals('', $secretVariable['body']['value']); + $this->assertEquals(true, $secretVariable['body']['secret']); + + $variables = $this->listVariables($siteId); + + $this->assertEquals(200, $variables['headers']['status-code']); + $this->assertCount(3, $variables['body']['variables']); + + $response = $this->deleteVariable($siteId, $variable['body']['$id']); + $this->assertEquals(204, $response['headers']['status-code']); + $response = $this->deleteVariable($siteId, $variable2['body']['$id']); + $this->assertEquals(204, $response['headers']['status-code']); + $response = $this->deleteVariable($siteId, $secretVariable['body']['$id']); + $this->assertEquals(204, $response['headers']['status-code']); + + $variables = $this->listVariables($siteId); + + $this->assertEquals(200, $variables['headers']['status-code']); + $this->assertCount(0, $variables['body']['variables']); + + $this->cleanupSite($siteId); + } + + public function testVariablesE2E(): void + { + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Astro site', + 'framework' => 'astro', + 'adapter' => 'ssr', + 'buildRuntime' => 'ssr-22', + 'outputDirectory' => './dist', + 'buildCommand' => 'npm run build', + 'installCommand' => 'npm install', + 'fallbackFile' => '', + ]); + + $this->assertNotEmpty($siteId); + + $secretVariable = $this->createVariable($siteId, [ + 'key' => 'name', + 'value' => 'Appwrite', + ]); + + $this->assertEquals(201, $secretVariable['headers']['status-code']); + $this->assertNotEmpty($secretVariable['body']['$id']); + $this->assertEquals('name', $secretVariable['body']['key']); + $this->assertEquals('', $secretVariable['body']['value']); + $this->assertEquals(true, $secretVariable['body']['secret']); + + $deploymentId = $this->setupDeployment($siteId, [ + 'code' => $this->packageSite('astro'), + 'activate' => 'true' + ]); + + $this->assertNotEmpty($deploymentId); + + $domain = $this->getSiteDomain($siteId); + $proxyClient = new Client(); + $proxyClient->setEndpoint('http://' . $domain); + + $response = $proxyClient->call(Client::METHOD_GET, '/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertStringContainsString("Env variable is Appwrite", $response['body']); + $this->assertStringNotContainsString("Variable not found", $response['body']); + + $this->cleanupSite($siteId); + } + public function testListSites(): void { /** @@ -308,11 +566,6 @@ class SitesCustomServerTest extends Scope 'installCommand' => $nextjsFramework['installCommand'], 'outputDirectory' => $nextjsFramework['outputDirectory'], 'providerRootDirectory' => $nextjsFramework['providerRootDirectory'], - 'templateOwner' => $starterTemplate['body']['providerOwner'], - 'templateRepository' => $starterTemplate['body']['providerRepositoryId'], - 'templateRootDirectory' => $nextjsFramework['providerRootDirectory'], - 'templateVersion' => $starterTemplate['body']['providerVersion'], - 'providerBranch' => 'main', ] ); @@ -321,6 +574,20 @@ class SitesCustomServerTest extends Scope $siteId = $site['body']['$id'] ?? ''; + $deployment = $this->createTemplateDeployment( + $siteId, + [ + 'owner' => $starterTemplate['body']['providerOwner'], + 'repository' => $starterTemplate['body']['providerRepositoryId'], + 'rootDirectory' => $nextjsFramework['providerRootDirectory'], + 'version' => $starterTemplate['body']['providerVersion'], + 'activate' => true, + ] + ); + + $this->assertEquals(202, $deployment['headers']['status-code']); + $this->assertNotEmpty($deployment['body']['$id']); + $deployments = $this->listDeployments($siteId); $this->assertEquals(200, $deployments['headers']['status-code']); @@ -939,5 +1206,278 @@ class SitesCustomServerTest extends Scope $this->assertArrayHasKey('adapters', $framework); } + public function testSiteTemplate(): void + { + $template = $this->getTemplate('astro-starter'); + $this->assertEquals(200, $template['headers']['status-code']); + + $template = $template['body']; + + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Template site', + 'framework' => $template['frameworks'][0]['key'], + 'adapter' => $template['frameworks'][0]['adapter'], + 'buildRuntime' => $template['frameworks'][0]['buildRuntime'], + 'outputDirectory' => $template['frameworks'][0]['outputDirectory'], + 'buildCommand' => $template['frameworks'][0]['buildCommand'], + 'installCommand' => $template['frameworks'][0]['installCommand'], + 'fallbackFile' => $template['frameworks'][0]['fallbackFile'], + ]); + + $this->assertNotEmpty($siteId); + + $deployment = $this->createTemplateDeployment($siteId, [ + 'repository' => $template['providerRepositoryId'], + 'owner' => $template['providerOwner'], + 'rootDirectory' => $template['frameworks'][0]['providerRootDirectory'], + 'version' => $template['providerVersion'], + 'activate' => true + ]); + + $this->assertEquals(202, $deployment['headers']['status-code']); + $this->assertNotEmpty($deployment['body']['$id']); + + $this->assertEventually(function () use ($siteId) { + $site = $this->getSite($siteId); + $this->assertNotEmpty($site['body']['deploymentId']); + }, 50000, 500); + + $domain = $this->getSiteDomain($siteId); + $proxyClient = new Client(); + $proxyClient->setEndpoint('http://' . $domain); + + $response = $proxyClient->call(Client::METHOD_GET, '/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertStringContainsString("Astro Blog", $response['body']); + $this->assertStringContainsString("Hello, Astronaut!", $response['body']); + + $response = $proxyClient->call(Client::METHOD_GET, '/about', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertStringContainsString("Astro Blog", $response['body']); + $this->assertStringContainsString("About Me", $response['body']); + + $this->cleanupSite($siteId); + } + + public function testSiteDomainReclaiming(): void + { + $subdomain = 'startup' . \uniqid(); + + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Startup site', + 'framework' => 'other', + 'adapter' => 'static', + 'buildRuntime' => 'static-1', + 'outputDirectory' => './', + 'buildCommand' => '', + 'installCommand' => '', + 'fallbackFile' => '', + 'subdomain' => $subdomain + ]); + + $this->assertNotEmpty($siteId); + + $deploymentId = $this->setupDeployment($siteId, [ + 'code' => $this->packageSite('static'), + 'activate' => 'true' + ]); + + $this->assertNotEmpty($deploymentId); + + $domain = $this->getSiteDomain($siteId); + $proxyClient = new Client(); + $proxyClient->setEndpoint('http://' . $domain); + + $response = $proxyClient->call(Client::METHOD_GET, '/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertStringNotContainsString("This domain is not connected to any Appwrite resource yet", $response['body']); + + $site = $this->createSite([ + 'siteId' => ID::unique(), + 'name' => 'Startup 2 site', + 'framework' => 'other', + 'adapter' => 'static', + 'buildRuntime' => 'static-1', + 'outputDirectory' => './', + 'buildCommand' => '', + 'installCommand' => '', + 'fallbackFile' => '', + 'subdomain' => $subdomain + ]); + + $this->assertEquals(400, $site['headers']['status-code']); + $this->assertStringContainsString("Subdomain already exists.", $site['body']['message']); + + $this->cleanupSite($siteId); + + $this->assertEventually(function () use ($domain) { + $rules = $this->client->call(Client::METHOD_GET, '/proxy/rules', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('domain', [$domain])->toString(), + ], + ]); + + $this->assertEquals(200, $rules['headers']['status-code']); + $this->assertEquals(0, $rules['body']['total']); + }, 50000, 500); + + $response = $proxyClient->call(Client::METHOD_GET, '/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertStringContainsString("This domain is not connected to any Appwrite resource yet", $response['body']); + + $site = $this->createSite([ + 'siteId' => ID::unique(), + 'name' => 'Startup 2 site', + 'framework' => 'other', + 'adapter' => 'static', + 'buildRuntime' => 'static-1', + 'outputDirectory' => './', + 'buildCommand' => '', + 'installCommand' => '', + 'fallbackFile' => '', + 'subdomain' => $subdomain + ]); + + $this->assertEquals(201, $site['headers']['status-code']); + + $this->cleanupSite($site['body']['$id']); + } + + public function testSitePreviewBranding(): void + { + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'A site', + 'framework' => 'other', + 'adapter' => 'static', + 'buildRuntime' => 'static-1', + 'outputDirectory' => './', + 'buildCommand' => '', + 'installCommand' => '', + 'fallbackFile' => '', + ]); + + $this->assertNotEmpty($siteId); + + $deploymentId = $this->setupDeployment($siteId, [ + 'code' => $this->packageSite('static'), + 'activate' => 'true' + ]); + + $this->assertNotEmpty($deploymentId); + + $domain = $this->getSiteDomain($siteId); + $previewDomain = $this->getDeploymentDomain($deploymentId); + + $this->assertNotEmpty($domain); + $this->assertNotEmpty($previewDomain); + + $proxyClient = new Client(); + $proxyClient->setEndpoint('http://' . $domain); + + $response = $proxyClient->call(Client::METHOD_GET, '/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertStringContainsString("Hello Appwrite", $response['body']); + $this->assertStringNotContainsString("Preview by", $response['body']); + + $contentLength = $response['headers']['content-length']; + + $proxyClient = new Client(); + $proxyClient->setEndpoint('http://' . $previewDomain); + + $response = $proxyClient->call(Client::METHOD_GET, '/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertStringContainsString("Hello Appwrite", $response['body']); + $this->assertStringContainsString("Preview by", $response['body']); + $this->assertGreaterThan($contentLength, $response['headers']['content-length']); + + $this->cleanupSite($siteId); + } + + public function testSiteCors(): void + { + // Create rule together with site + $subdomain = 'startup' . \uniqid(); + + $siteId = $this->setupSite([ + 'siteId' => ID::unique(), + 'name' => 'Startup site', + 'framework' => 'other', + 'adapter' => 'static', + 'buildRuntime' => 'static-1', + 'outputDirectory' => './', + 'buildCommand' => '', + 'installCommand' => '', + 'fallbackFile' => '', + 'subdomain' => $subdomain + ]); + + $this->assertNotEmpty($siteId); + + $domain = $this->getSiteDomain($siteId); + + $this->assertNotEmpty($domain); + + $url = 'http://' . $domain; + + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'referer' => $url, + 'origin' => $url + ])); + + $this->assertEquals($url, $response['headers']['access-control-allow-origin']); + + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'unknown', + 'referer' => $url, + 'origin' => $url + ])); + + $this->assertNotEquals($url, $response['headers']['access-control-allow-origin']); + $this->assertEquals('http://localhost', $response['headers']['access-control-allow-origin']); + + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'referer' => 'http://unknown.com', + 'origin' => 'http://unknown.com' + ])); + + $this->assertNotEquals($url, $response['headers']['access-control-allow-origin']); + $this->assertEquals('http://localhost', $response['headers']['access-control-allow-origin']); + } + // TODO: Add tests for deletion of resources when site is deleted } diff --git a/tests/resources/sites/astro/astro.config.mjs b/tests/resources/sites/astro/astro.config.mjs new file mode 100644 index 0000000000..54bee6ca84 --- /dev/null +++ b/tests/resources/sites/astro/astro.config.mjs @@ -0,0 +1,10 @@ +import { defineConfig } from 'astro/config'; +import node from '@astrojs/node'; +import 'dotenv/config'; + +export default defineConfig({ + output: 'server', + adapter: node({ + mode: 'standalone' + }), +}); diff --git a/tests/resources/sites/astro/package.json b/tests/resources/sites/astro/package.json new file mode 100644 index 0000000000..a87c37d014 --- /dev/null +++ b/tests/resources/sites/astro/package.json @@ -0,0 +1,16 @@ +{ + "name": "my-astro-app", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/node": "^9.0.2", + "astro": "^5.2.5", + "dotenv": "^16.4.7" + } +} diff --git a/tests/resources/sites/astro/src/pages/index.astro b/tests/resources/sites/astro/src/pages/index.astro new file mode 100644 index 0000000000..cc8fd9411f --- /dev/null +++ b/tests/resources/sites/astro/src/pages/index.astro @@ -0,0 +1,15 @@ +--- +const value = import.meta.env.name || 'Variable not found'; +--- + + + + + + + Astro SSR + + +

Env variable is {value}

+ + diff --git a/tests/resources/sites/astro/tsconfig.json b/tests/resources/sites/astro/tsconfig.json new file mode 100644 index 0000000000..8bf91d3bb9 --- /dev/null +++ b/tests/resources/sites/astro/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "astro/tsconfigs/strict", + "include": [".astro/types.d.ts", "**/*"], + "exclude": ["dist"] +} diff --git a/tests/unit/Transformation/TransformationTest.php b/tests/unit/Transformation/TransformationTest.php new file mode 100644 index 0000000000..a3169026a3 --- /dev/null +++ b/tests/unit/Transformation/TransformationTest.php @@ -0,0 +1,43 @@ +addAdapter(new Mock()); + + $transformer->setInput($input); + $transformer->setTraits([]); + + $this->assertFalse($transformer->transform()); + + $transformer->setTraits(['mock' => true]); + $this->assertFalse($transformer->transform()); + + $transformer->setTraits(['mock' => true, 'content-type' => 'text/plain']); + $this->assertFalse($transformer->transform()); + + $transformer->setTraits(['mock' => true, 'content-type' => 'tExT/HtML']); + $this->assertFalse($transformer->transform()); + + $transformer->setTraits(['mock' => false, 'content-type' => 'text/plain, text/html; charset=utf-8']); + $this->assertFalse($transformer->transform()); + + $transformer->setTraits(['mock' => true, 'content-type' => 'text/plain, text/html; charset=utf-8']); + $this->assertTrue($transformer->transform()); + + $this->assertStringContainsString("Hello world", $transformer->getOutput()); + $this->assertStringContainsString("Preview by", $transformer->getOutput()); + $this->assertStringContainsString("Mock:", $transformer->getOutput()); + } +}