From 96b916a48a9573e6a9e62ef1076d6dceae3a6045 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:54:51 +0100 Subject: [PATCH 1/2] fix: remove content-type from GET requests --- README.md | 2 +- docs/account.md | 45 +------ docs/avatars.md | 9 +- docs/databases.md | 45 +------ .../databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- ...e-dump.md => get-queue-stats-resources.md} | 2 +- docs/examples/health/get-queue.md | 13 -- docs/functions.md | 24 ---- docs/graphql.md | 2 - docs/health.md | 38 +----- docs/locale.md | 8 -- docs/messaging.md | 52 +------ docs/storage.md | 13 -- docs/teams.md | 13 -- docs/users.md | 42 ------ src/Appwrite/Client.php | 11 +- src/Appwrite/Enums/CreditCard.php | 8 ++ src/Appwrite/Enums/Name.php | 20 +-- src/Appwrite/Enums/OAuthProvider.php | 8 ++ src/Appwrite/Services/Account.php | 95 ------------- src/Appwrite/Services/Avatars.php | 21 --- src/Appwrite/Services/Databases.php | 127 ++++-------------- src/Appwrite/Services/Functions.php | 59 -------- src/Appwrite/Services/Graphql.php | 4 - src/Appwrite/Services/Health.php | 110 +-------------- src/Appwrite/Services/Locale.php | 24 ---- src/Appwrite/Services/Messaging.php | 117 ++-------------- src/Appwrite/Services/Storage.php | 33 ----- src/Appwrite/Services/Teams.php | 31 ----- src/Appwrite/Services/Users.php | 95 ------------- tests/Appwrite/Services/DatabasesTest.php | 4 - tests/Appwrite/Services/HealthTest.php | 26 +--- 33 files changed, 93 insertions(+), 1016 deletions(-) rename docs/examples/health/{get-queue-usage-dump.md => get-queue-stats-resources.md} (88%) delete mode 100644 docs/examples/health/get-queue.md diff --git a/README.md b/README.md index 52309eb..0b09bdd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite PHP SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?style=flat-square&v=1) -![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square&v=1) +![Version](https://img.shields.io/badge/api%20version-1.6.2-blue.svg?style=flat-square&v=1) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) diff --git a/docs/account.md b/docs/account.md index 94cc0ec..3383003 100644 --- a/docs/account.md +++ b/docs/account.md @@ -1,6 +1,5 @@ # Account Service -## Get account ```http request GET https://cloud.appwrite.io/v1/account @@ -8,7 +7,6 @@ GET https://cloud.appwrite.io/v1/account ** Get the currently logged in user. ** -## Create account ```http request POST https://cloud.appwrite.io/v1/account @@ -25,7 +23,6 @@ POST https://cloud.appwrite.io/v1/account | password | string | New user password. Must be between 8 and 256 chars. | | | name | string | User name. Max length: 128 chars. | | -## Update email ```http request PATCH https://cloud.appwrite.io/v1/account/email @@ -42,7 +39,6 @@ This endpoint can also be used to convert an anonymous account to a normal one, | email | string | User email. | | | password | string | User password. Must be at least 8 chars. | | -## List identities ```http request GET https://cloud.appwrite.io/v1/account/identities @@ -56,7 +52,6 @@ GET https://cloud.appwrite.io/v1/account/identities | --- | --- | --- | --- | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry | [] | -## Delete identity ```http request DELETE https://cloud.appwrite.io/v1/account/identities/{identityId} @@ -70,7 +65,6 @@ DELETE https://cloud.appwrite.io/v1/account/identities/{identityId} | --- | --- | --- | --- | | identityId | string | **Required** Identity ID. | | -## Create JWT ```http request POST https://cloud.appwrite.io/v1/account/jwts @@ -78,7 +72,6 @@ POST https://cloud.appwrite.io/v1/account/jwts ** Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame. ** -## List logs ```http request GET https://cloud.appwrite.io/v1/account/logs @@ -92,7 +85,6 @@ GET https://cloud.appwrite.io/v1/account/logs | --- | --- | --- | --- | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] | -## Update MFA ```http request PATCH https://cloud.appwrite.io/v1/account/mfa @@ -106,7 +98,6 @@ PATCH https://cloud.appwrite.io/v1/account/mfa | --- | --- | --- | --- | | mfa | boolean | Enable or disable MFA. | | -## Create authenticator ```http request POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type} @@ -120,7 +111,6 @@ POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type} | --- | --- | --- | --- | | type | string | **Required** Type of authenticator. Must be `totp` | | -## Verify authenticator ```http request PUT https://cloud.appwrite.io/v1/account/mfa/authenticators/{type} @@ -135,7 +125,6 @@ PUT https://cloud.appwrite.io/v1/account/mfa/authenticators/{type} | type | string | **Required** Type of authenticator. | | | otp | string | Valid verification token. | | -## Delete authenticator ```http request DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type} @@ -149,7 +138,6 @@ DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type} | --- | --- | --- | --- | | type | string | **Required** Type of authenticator. | | -## Create MFA challenge ```http request POST https://cloud.appwrite.io/v1/account/mfa/challenge @@ -163,7 +151,6 @@ POST https://cloud.appwrite.io/v1/account/mfa/challenge | --- | --- | --- | --- | | factor | string | Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`. | | -## Create MFA challenge (confirmation) ```http request PUT https://cloud.appwrite.io/v1/account/mfa/challenge @@ -178,7 +165,6 @@ PUT https://cloud.appwrite.io/v1/account/mfa/challenge | challengeId | string | ID of the challenge. | | | otp | string | Valid verification token. | | -## List factors ```http request GET https://cloud.appwrite.io/v1/account/mfa/factors @@ -186,7 +172,6 @@ GET https://cloud.appwrite.io/v1/account/mfa/factors ** List the factors available on the account to be used as a MFA challange. ** -## Get MFA recovery codes ```http request GET https://cloud.appwrite.io/v1/account/mfa/recovery-codes @@ -194,7 +179,6 @@ GET https://cloud.appwrite.io/v1/account/mfa/recovery-codes ** Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. ** -## Create MFA recovery codes ```http request POST https://cloud.appwrite.io/v1/account/mfa/recovery-codes @@ -202,7 +186,6 @@ POST https://cloud.appwrite.io/v1/account/mfa/recovery-codes ** Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. ** -## Regenerate MFA recovery codes ```http request PATCH https://cloud.appwrite.io/v1/account/mfa/recovery-codes @@ -210,7 +193,6 @@ PATCH https://cloud.appwrite.io/v1/account/mfa/recovery-codes ** Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. ** -## Update name ```http request PATCH https://cloud.appwrite.io/v1/account/name @@ -224,7 +206,6 @@ PATCH https://cloud.appwrite.io/v1/account/name | --- | --- | --- | --- | | name | string | User name. Max length: 128 chars. | | -## Update password ```http request PATCH https://cloud.appwrite.io/v1/account/password @@ -239,7 +220,6 @@ PATCH https://cloud.appwrite.io/v1/account/password | password | string | New user password. Must be at least 8 chars. | | | oldPassword | string | Current user password. Must be at least 8 chars. | | -## Update phone ```http request PATCH https://cloud.appwrite.io/v1/account/phone @@ -254,7 +234,6 @@ PATCH https://cloud.appwrite.io/v1/account/phone | phone | string | Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. | | | password | string | User password. Must be at least 8 chars. | | -## Get account preferences ```http request GET https://cloud.appwrite.io/v1/account/prefs @@ -262,7 +241,6 @@ GET https://cloud.appwrite.io/v1/account/prefs ** Get the preferences as a key-value object for the currently logged in user. ** -## Update preferences ```http request PATCH https://cloud.appwrite.io/v1/account/prefs @@ -276,7 +254,6 @@ PATCH https://cloud.appwrite.io/v1/account/prefs | --- | --- | --- | --- | | prefs | object | Prefs key-value JSON object. | {} | -## Create password recovery ```http request POST https://cloud.appwrite.io/v1/account/recovery @@ -291,7 +268,6 @@ POST https://cloud.appwrite.io/v1/account/recovery | email | string | User email. | | | url | string | URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | -## Create password recovery (confirmation) ```http request PUT https://cloud.appwrite.io/v1/account/recovery @@ -309,7 +285,6 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ | secret | string | Valid reset token. | | | password | string | New user password. Must be between 8 and 256 chars. | | -## List sessions ```http request GET https://cloud.appwrite.io/v1/account/sessions @@ -317,7 +292,6 @@ GET https://cloud.appwrite.io/v1/account/sessions ** Get the list of active sessions across different devices for the currently logged in user. ** -## Delete sessions ```http request DELETE https://cloud.appwrite.io/v1/account/sessions @@ -325,7 +299,6 @@ DELETE https://cloud.appwrite.io/v1/account/sessions ** Delete all sessions from the user account and remove any sessions cookies from the end client. ** -## Create anonymous session ```http request POST https://cloud.appwrite.io/v1/account/sessions/anonymous @@ -333,7 +306,6 @@ POST https://cloud.appwrite.io/v1/account/sessions/anonymous ** Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session). ** -## Create email password session ```http request POST https://cloud.appwrite.io/v1/account/sessions/email @@ -350,7 +322,6 @@ A user is limited to 10 active sessions at a time by default. [Learn more about | email | string | User email. | | | password | string | User password. Must be at least 8 chars. | | -## Update magic URL session ```http request PUT https://cloud.appwrite.io/v1/account/sessions/magic-url @@ -365,7 +336,6 @@ PUT https://cloud.appwrite.io/v1/account/sessions/magic-url | userId | string | User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | | | secret | string | Valid verification token. | | -## Update phone session ```http request PUT https://cloud.appwrite.io/v1/account/sessions/phone @@ -380,7 +350,6 @@ PUT https://cloud.appwrite.io/v1/account/sessions/phone | userId | string | User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | | | secret | string | Valid verification token. | | -## Create session ```http request POST https://cloud.appwrite.io/v1/account/sessions/token @@ -395,7 +364,6 @@ POST https://cloud.appwrite.io/v1/account/sessions/token | userId | string | User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | | | secret | string | Secret of a token generated by login methods. For example, the `createMagicURLToken` or `createPhoneToken` methods. | | -## Get session ```http request GET https://cloud.appwrite.io/v1/account/sessions/{sessionId} @@ -409,7 +377,6 @@ GET https://cloud.appwrite.io/v1/account/sessions/{sessionId} | --- | --- | --- | --- | | sessionId | string | **Required** Session ID. Use the string 'current' to get the current device session. | | -## Update session ```http request PATCH https://cloud.appwrite.io/v1/account/sessions/{sessionId} @@ -423,7 +390,6 @@ PATCH https://cloud.appwrite.io/v1/account/sessions/{sessionId} | --- | --- | --- | --- | | sessionId | string | **Required** Session ID. Use the string 'current' to update the current device session. | | -## Delete session ```http request DELETE https://cloud.appwrite.io/v1/account/sessions/{sessionId} @@ -437,7 +403,6 @@ DELETE https://cloud.appwrite.io/v1/account/sessions/{sessionId} | --- | --- | --- | --- | | sessionId | string | **Required** Session ID. Use the string 'current' to delete the current device session. | | -## Update status ```http request PATCH https://cloud.appwrite.io/v1/account/status @@ -445,7 +410,6 @@ PATCH https://cloud.appwrite.io/v1/account/status ** Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead. ** -## Create email token (OTP) ```http request POST https://cloud.appwrite.io/v1/account/tokens/email @@ -463,7 +427,6 @@ A user is limited to 10 active sessions at a time by default. [Learn more about | email | string | User email. | | | phrase | boolean | Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. | | -## Create magic URL token ```http request POST https://cloud.appwrite.io/v1/account/tokens/magic-url @@ -483,7 +446,6 @@ A user is limited to 10 active sessions at a time by default. [Learn more about | url | string | URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | | phrase | boolean | Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow. | | -## Create OAuth2 token ```http request GET https://cloud.appwrite.io/v1/account/tokens/oauth2/{provider} @@ -499,12 +461,11 @@ A user is limited to 10 active sessions at a time by default. [Learn more about | Field Name | Type | Description | Default | | --- | --- | --- | --- | -| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. | | +| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. | | | success | string | URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | | failure | string | URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | | scopes | array | A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. | [] | -## Create phone token ```http request POST https://cloud.appwrite.io/v1/account/tokens/phone @@ -521,7 +482,6 @@ A user is limited to 10 active sessions at a time by default. [Learn more about | userId | string | Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | | | phone | string | Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. | | -## Create email verification ```http request POST https://cloud.appwrite.io/v1/account/verification @@ -538,7 +498,6 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ | --- | --- | --- | --- | | url | string | URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | -## Create email verification (confirmation) ```http request PUT https://cloud.appwrite.io/v1/account/verification @@ -553,7 +512,6 @@ PUT https://cloud.appwrite.io/v1/account/verification | userId | string | User ID. | | | secret | string | Valid verification token. | | -## Create phone verification ```http request POST https://cloud.appwrite.io/v1/account/verification/phone @@ -561,7 +519,6 @@ POST https://cloud.appwrite.io/v1/account/verification/phone ** Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. ** -## Update phone verification (confirmation) ```http request PUT https://cloud.appwrite.io/v1/account/verification/phone diff --git a/docs/avatars.md b/docs/avatars.md index 53a7a1b..9cde42d 100644 --- a/docs/avatars.md +++ b/docs/avatars.md @@ -1,6 +1,5 @@ # Avatars Service -## Get browser icon ```http request GET https://cloud.appwrite.io/v1/avatars/browsers/{code} @@ -19,7 +18,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre | height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | | quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -## Get credit card icon ```http request GET https://cloud.appwrite.io/v1/avatars/credit-cards/{code} @@ -34,12 +32,11 @@ When one dimension is specified and the other is 0, the image is scaled with pre | Field Name | Type | Description | Default | | --- | --- | --- | --- | -| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro. | | +| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay. | | | width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 | | height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | | quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -## Get favicon ```http request GET https://cloud.appwrite.io/v1/avatars/favicon @@ -55,7 +52,6 @@ This endpoint does not follow HTTP redirects. ** | --- | --- | --- | --- | | url | string | **Required** Website URL which you want to fetch the favicon from. | | -## Get country flag ```http request GET https://cloud.appwrite.io/v1/avatars/flags/{code} @@ -75,7 +71,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre | height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 | | quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 | -## Get image from URL ```http request GET https://cloud.appwrite.io/v1/avatars/image @@ -95,7 +90,6 @@ This endpoint does not follow HTTP redirects. ** | width | integer | Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400. | 400 | | height | integer | Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400. | 400 | -## Get user initials ```http request GET https://cloud.appwrite.io/v1/avatars/initials @@ -117,7 +111,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre | height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 500 | | background | string | Changes background color. By default a random color will be picked and stay will persistent to the given name. | | -## Get QR code ```http request GET https://cloud.appwrite.io/v1/avatars/qr diff --git a/docs/databases.md b/docs/databases.md index 538973c..cf972e0 100644 --- a/docs/databases.md +++ b/docs/databases.md @@ -1,6 +1,5 @@ # Databases Service -## List databases ```http request GET https://cloud.appwrite.io/v1/databases @@ -15,7 +14,6 @@ GET https://cloud.appwrite.io/v1/databases | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create database ```http request POST https://cloud.appwrite.io/v1/databases @@ -32,7 +30,6 @@ POST https://cloud.appwrite.io/v1/databases | name | string | Database name. Max length: 128 chars. | | | enabled | boolean | Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. | 1 | -## Get database ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId} @@ -46,7 +43,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId} | --- | --- | --- | --- | | databaseId | string | **Required** Database ID. | | -## Update database ```http request PUT https://cloud.appwrite.io/v1/databases/{databaseId} @@ -62,7 +58,6 @@ PUT https://cloud.appwrite.io/v1/databases/{databaseId} | name | string | Database name. Max length: 128 chars. | | | enabled | boolean | Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled. | 1 | -## Delete database ```http request DELETE https://cloud.appwrite.io/v1/databases/{databaseId} @@ -76,7 +71,6 @@ DELETE https://cloud.appwrite.io/v1/databases/{databaseId} | --- | --- | --- | --- | | databaseId | string | **Required** Database ID. | | -## List collections ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections @@ -92,7 +86,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, documentSecurity | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create collection ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections @@ -111,7 +104,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections | documentSecurity | boolean | Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | enabled | boolean | Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. | 1 | -## Get collection ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId} @@ -126,7 +118,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | databaseId | string | **Required** Database ID. | | | collectionId | string | **Required** Collection ID. | | -## Update collection ```http request PUT https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId} @@ -145,7 +136,6 @@ PUT https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | documentSecurity | boolean | Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | enabled | boolean | Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled. | 1 | -## Delete collection ```http request DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId} @@ -160,7 +150,6 @@ DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collecti | databaseId | string | **Required** Database ID. | | | collectionId | string | **Required** Collection ID. | | -## List attributes ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes @@ -176,7 +165,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error | [] | -## Create boolean attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean @@ -196,7 +184,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | boolean | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update boolean attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} @@ -215,7 +202,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | boolean | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create datetime attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime @@ -234,7 +220,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | string | Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update dateTime attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} @@ -253,7 +238,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create email attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/email @@ -273,7 +257,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update email attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} @@ -293,7 +276,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create enum attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/enum @@ -314,7 +296,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update enum attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} @@ -335,7 +316,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create float attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/float @@ -357,7 +337,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | number | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update float attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} @@ -379,7 +358,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | number | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create integer attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/integer @@ -401,7 +379,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | integer | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update integer attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} @@ -423,7 +400,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | integer | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create IP address attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/ip @@ -443,7 +419,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update IP address attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} @@ -463,7 +438,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Create relationship attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship @@ -485,7 +459,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | twoWayKey | string | Two Way Attribute Key. | | | onDelete | string | Constraints option | restrict | -## Create string attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/string @@ -507,7 +480,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | array | boolean | Is attribute an array? | | | encrypt | boolean | Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. | | -## Update string attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} @@ -528,7 +500,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | size | integer | Maximum size of the string attribute. | | | newKey | string | New attribute key. | | -## Create URL attribute ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/url @@ -548,7 +519,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | -## Update URL attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} @@ -568,7 +538,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | -## Get attribute ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} @@ -584,7 +553,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | key | string | **Required** Attribute Key. | | -## Delete attribute ```http request DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} @@ -600,7 +568,6 @@ DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collecti | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | key | string | **Required** Attribute Key. | | -## Update relationship attribute ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship @@ -619,7 +586,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | onDelete | string | Constraints option | | | newKey | string | New attribute key. | | -## List documents ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents @@ -635,13 +601,13 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | [] | -## Create document ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents ``` -** Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. ** +** Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. + ** ### Parameters @@ -653,7 +619,6 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | data | object | Document data as JSON object. | {} | | permissions | array | An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). | | -## Get document ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} @@ -670,7 +635,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | documentId | string | **Required** Document ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. | [] | -## Update document ```http request PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} @@ -688,7 +652,6 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | data | object | Document data as JSON object. Include only attribute and value pairs to be updated. | {} | | permissions | array | An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). | | -## Delete document ```http request DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} @@ -704,7 +667,6 @@ DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collecti | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | documentId | string | **Required** Document ID. | | -## List indexes ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/indexes @@ -720,7 +682,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error | [] | -## Create index ```http request POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/indexes @@ -740,7 +701,6 @@ Attributes can be `key`, `fulltext`, and `unique`. ** | attributes | array | Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. | | | orders | array | Array of index orders. Maximum of 100 orders are allowed. | [] | -## Get index ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} @@ -756,7 +716,6 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | collectionId | string | **Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). | | | key | string | **Required** Index Key. | | -## Delete index ```http request DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 7beac26..39ad3b1 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -15,8 +15,8 @@ $result = $databases->updateFloatAttribute( collectionId: '', key: '', required: false, - min: null, - max: null, default: null, + min: null, // optional + max: null, // optional newKey: '' // optional ); \ No newline at end of file diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index e92385d..af4957a 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -15,8 +15,8 @@ $result = $databases->updateIntegerAttribute( collectionId: '', key: '', required: false, - min: null, - max: null, default: null, + min: null, // optional + max: null, // optional newKey: '' // optional ); \ No newline at end of file diff --git a/docs/examples/health/get-queue-usage-dump.md b/docs/examples/health/get-queue-stats-resources.md similarity index 88% rename from docs/examples/health/get-queue-usage-dump.md rename to docs/examples/health/get-queue-stats-resources.md index 9b477f2..fd9d421 100644 --- a/docs/examples/health/get-queue-usage-dump.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -10,6 +10,6 @@ $client = (new Client()) $health = new Health($client); -$result = $health->getQueueUsageDump( +$result = $health->getQueueStatsResources( threshold: null // optional ); \ No newline at end of file diff --git a/docs/examples/health/get-queue.md b/docs/examples/health/get-queue.md deleted file mode 100644 index ef34100..0000000 --- a/docs/examples/health/get-queue.md +++ /dev/null @@ -1,13 +0,0 @@ -setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('') // Your project ID - ->setKey(''); // Your secret API key - -$health = new Health($client); - -$result = $health->getQueue(); diff --git a/docs/functions.md b/docs/functions.md index 5317962..0ec5677 100644 --- a/docs/functions.md +++ b/docs/functions.md @@ -1,6 +1,5 @@ # Functions Service -## List functions ```http request GET https://cloud.appwrite.io/v1/functions @@ -15,7 +14,6 @@ GET https://cloud.appwrite.io/v1/functions | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create function ```http request POST https://cloud.appwrite.io/v1/functions @@ -50,7 +48,6 @@ POST https://cloud.appwrite.io/v1/functions | templateVersion | string | Version (tag) for the repo linked to the function template. | | | specification | string | Runtime specification for the function and builds. | s-1vcpu-512mb | -## List runtimes ```http request GET https://cloud.appwrite.io/v1/functions/runtimes @@ -58,7 +55,6 @@ GET https://cloud.appwrite.io/v1/functions/runtimes ** Get a list of all runtimes that are currently active on your instance. ** -## List available function runtime specifications ```http request GET https://cloud.appwrite.io/v1/functions/specifications @@ -67,7 +63,6 @@ GET https://cloud.appwrite.io/v1/functions/specifications ** List allowed function specifications for this instance. ** -## Get function ```http request GET https://cloud.appwrite.io/v1/functions/{functionId} @@ -81,7 +76,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId} | --- | --- | --- | --- | | functionId | string | **Required** Function ID. | | -## Update function ```http request PUT https://cloud.appwrite.io/v1/functions/{functionId} @@ -112,7 +106,6 @@ PUT https://cloud.appwrite.io/v1/functions/{functionId} | providerRootDirectory | string | Path to function code in the linked repo. | | | specification | string | Runtime specification for the function and builds. | s-1vcpu-512mb | -## Delete function ```http request DELETE https://cloud.appwrite.io/v1/functions/{functionId} @@ -126,7 +119,6 @@ DELETE https://cloud.appwrite.io/v1/functions/{functionId} | --- | --- | --- | --- | | functionId | string | **Required** Function ID. | | -## List deployments ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/deployments @@ -142,7 +134,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/deployments | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create deployment ```http request POST https://cloud.appwrite.io/v1/functions/{functionId}/deployments @@ -164,7 +155,6 @@ Use the "command" param to set the entrypoint used to execute your cod | code | file | Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. | | | activate | boolean | Automatically activate the deployment when it is finished building. | | -## Get deployment ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId} @@ -179,7 +169,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentI | functionId | string | **Required** Function ID. | | | deploymentId | string | **Required** Deployment ID. | | -## Update deployment ```http request PATCH https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId} @@ -194,7 +183,6 @@ PATCH https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymen | functionId | string | **Required** Function ID. | | | deploymentId | string | **Required** Deployment ID. | | -## Delete deployment ```http request DELETE https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId} @@ -209,7 +197,6 @@ DELETE https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deployme | functionId | string | **Required** Function ID. | | | deploymentId | string | **Required** Deployment ID. | | -## Rebuild deployment ```http request POST https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId}/build @@ -225,7 +212,6 @@ POST https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deployment | deploymentId | string | **Required** Deployment ID. | | | buildId | string | Build unique ID. | | -## Cancel deployment ```http request PATCH https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId}/build @@ -240,7 +226,6 @@ PATCH https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymen | functionId | string | **Required** Function ID. | | | deploymentId | string | **Required** Deployment ID. | | -## Download deployment ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId}/download @@ -255,7 +240,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentI | functionId | string | **Required** Function ID. | | | deploymentId | string | **Required** Deployment ID. | | -## List executions ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/executions @@ -271,7 +255,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/executions | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create execution ```http request POST https://cloud.appwrite.io/v1/functions/{functionId}/executions @@ -291,7 +274,6 @@ POST https://cloud.appwrite.io/v1/functions/{functionId}/executions | headers | object | HTTP headers of execution. Defaults to empty. | {} | | scheduledAt | string | Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes. | | -## Get execution ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/executions/{executionId} @@ -306,7 +288,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/executions/{executionId} | functionId | string | **Required** Function ID. | | | executionId | string | **Required** Execution ID. | | -## Delete execution ```http request DELETE https://cloud.appwrite.io/v1/functions/{functionId}/executions/{executionId} @@ -322,7 +303,6 @@ DELETE https://cloud.appwrite.io/v1/functions/{functionId}/executions/{execution | functionId | string | **Required** Function ID. | | | executionId | string | **Required** Execution ID. | | -## List variables ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/variables @@ -336,7 +316,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/variables | --- | --- | --- | --- | | functionId | string | **Required** Function unique ID. | | -## Create variable ```http request POST https://cloud.appwrite.io/v1/functions/{functionId}/variables @@ -352,7 +331,6 @@ POST https://cloud.appwrite.io/v1/functions/{functionId}/variables | key | string | Variable key. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | -## Get variable ```http request GET https://cloud.appwrite.io/v1/functions/{functionId}/variables/{variableId} @@ -367,7 +345,6 @@ GET https://cloud.appwrite.io/v1/functions/{functionId}/variables/{variableId} | functionId | string | **Required** Function unique ID. | | | variableId | string | **Required** Variable unique ID. | | -## Update variable ```http request PUT https://cloud.appwrite.io/v1/functions/{functionId}/variables/{variableId} @@ -384,7 +361,6 @@ PUT https://cloud.appwrite.io/v1/functions/{functionId}/variables/{variableId} | key | string | Variable key. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | -## Delete variable ```http request DELETE https://cloud.appwrite.io/v1/functions/{functionId}/variables/{variableId} diff --git a/docs/graphql.md b/docs/graphql.md index e012b47..a825103 100644 --- a/docs/graphql.md +++ b/docs/graphql.md @@ -1,6 +1,5 @@ # Graphql Service -## GraphQL endpoint ```http request POST https://cloud.appwrite.io/v1/graphql @@ -14,7 +13,6 @@ POST https://cloud.appwrite.io/v1/graphql | --- | --- | --- | --- | | query | object | The query or queries to execute. | {} | -## GraphQL endpoint ```http request POST https://cloud.appwrite.io/v1/graphql/mutation diff --git a/docs/health.md b/docs/health.md index 083119e..dc19294 100644 --- a/docs/health.md +++ b/docs/health.md @@ -1,6 +1,5 @@ # Health Service -## Get HTTP ```http request GET https://cloud.appwrite.io/v1/health @@ -8,7 +7,6 @@ GET https://cloud.appwrite.io/v1/health ** Check the Appwrite HTTP server is up and responsive. ** -## Get antivirus ```http request GET https://cloud.appwrite.io/v1/health/anti-virus @@ -16,7 +14,6 @@ GET https://cloud.appwrite.io/v1/health/anti-virus ** Check the Appwrite Antivirus server is up and connection is successful. ** -## Get cache ```http request GET https://cloud.appwrite.io/v1/health/cache @@ -24,7 +21,6 @@ GET https://cloud.appwrite.io/v1/health/cache ** Check the Appwrite in-memory cache servers are up and connection is successful. ** -## Get the SSL certificate for a domain ```http request GET https://cloud.appwrite.io/v1/health/certificate @@ -38,7 +34,6 @@ GET https://cloud.appwrite.io/v1/health/certificate | --- | --- | --- | --- | | domain | string | string | | -## Get DB ```http request GET https://cloud.appwrite.io/v1/health/db @@ -46,7 +41,6 @@ GET https://cloud.appwrite.io/v1/health/db ** Check the Appwrite database servers are up and connection is successful. ** -## Get pubsub ```http request GET https://cloud.appwrite.io/v1/health/pubsub @@ -54,15 +48,6 @@ GET https://cloud.appwrite.io/v1/health/pubsub ** Check the Appwrite pub-sub servers are up and connection is successful. ** -## Get queue - -```http request -GET https://cloud.appwrite.io/v1/health/queue -``` - -** Check the Appwrite queue messaging servers are up and connection is successful. ** - -## Get builds queue ```http request GET https://cloud.appwrite.io/v1/health/queue/builds @@ -76,7 +61,6 @@ GET https://cloud.appwrite.io/v1/health/queue/builds | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get certificates queue ```http request GET https://cloud.appwrite.io/v1/health/queue/certificates @@ -90,7 +74,6 @@ GET https://cloud.appwrite.io/v1/health/queue/certificates | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get databases queue ```http request GET https://cloud.appwrite.io/v1/health/queue/databases @@ -105,7 +88,6 @@ GET https://cloud.appwrite.io/v1/health/queue/databases | name | string | Queue name for which to check the queue size | database_db_main | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get deletes queue ```http request GET https://cloud.appwrite.io/v1/health/queue/deletes @@ -119,7 +101,6 @@ GET https://cloud.appwrite.io/v1/health/queue/deletes | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get number of failed queue jobs ```http request GET https://cloud.appwrite.io/v1/health/queue/failed/{name} @@ -135,7 +116,6 @@ GET https://cloud.appwrite.io/v1/health/queue/failed/{name} | name | string | **Required** The name of the queue | | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get functions queue ```http request GET https://cloud.appwrite.io/v1/health/queue/functions @@ -149,7 +129,6 @@ GET https://cloud.appwrite.io/v1/health/queue/functions | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get logs queue ```http request GET https://cloud.appwrite.io/v1/health/queue/logs @@ -163,7 +142,6 @@ GET https://cloud.appwrite.io/v1/health/queue/logs | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get mails queue ```http request GET https://cloud.appwrite.io/v1/health/queue/mails @@ -177,7 +155,6 @@ GET https://cloud.appwrite.io/v1/health/queue/mails | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get messaging queue ```http request GET https://cloud.appwrite.io/v1/health/queue/messaging @@ -191,7 +168,6 @@ GET https://cloud.appwrite.io/v1/health/queue/messaging | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get migrations queue ```http request GET https://cloud.appwrite.io/v1/health/queue/migrations @@ -205,13 +181,12 @@ GET https://cloud.appwrite.io/v1/health/queue/migrations | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get usage queue ```http request -GET https://cloud.appwrite.io/v1/health/queue/usage +GET https://cloud.appwrite.io/v1/health/queue/stats-resources ``` -** Get the number of metrics that are waiting to be processed in the Appwrite internal queue server. ** +** Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue. ** ### Parameters @@ -219,13 +194,12 @@ GET https://cloud.appwrite.io/v1/health/queue/usage | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get usage dump queue ```http request -GET https://cloud.appwrite.io/v1/health/queue/usage-dump +GET https://cloud.appwrite.io/v1/health/queue/stats-usage ``` -** Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server. ** +** Get the number of metrics that are waiting to be processed in the Appwrite internal queue server. ** ### Parameters @@ -233,7 +207,6 @@ GET https://cloud.appwrite.io/v1/health/queue/usage-dump | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get webhooks queue ```http request GET https://cloud.appwrite.io/v1/health/queue/webhooks @@ -247,7 +220,6 @@ GET https://cloud.appwrite.io/v1/health/queue/webhooks | --- | --- | --- | --- | | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | -## Get storage ```http request GET https://cloud.appwrite.io/v1/health/storage @@ -255,7 +227,6 @@ GET https://cloud.appwrite.io/v1/health/storage ** Check the Appwrite storage device is up and connection is successful. ** -## Get local storage ```http request GET https://cloud.appwrite.io/v1/health/storage/local @@ -263,7 +234,6 @@ GET https://cloud.appwrite.io/v1/health/storage/local ** Check the Appwrite local storage device is up and connection is successful. ** -## Get time ```http request GET https://cloud.appwrite.io/v1/health/time diff --git a/docs/locale.md b/docs/locale.md index 31b0be2..2626a66 100644 --- a/docs/locale.md +++ b/docs/locale.md @@ -1,6 +1,5 @@ # Locale Service -## Get user locale ```http request GET https://cloud.appwrite.io/v1/locale @@ -10,7 +9,6 @@ GET https://cloud.appwrite.io/v1/locale ([IP Geolocation by DB-IP](https://db-ip.com)) ** -## List locale codes ```http request GET https://cloud.appwrite.io/v1/locale/codes @@ -18,7 +16,6 @@ GET https://cloud.appwrite.io/v1/locale/codes ** List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). ** -## List continents ```http request GET https://cloud.appwrite.io/v1/locale/continents @@ -26,7 +23,6 @@ GET https://cloud.appwrite.io/v1/locale/continents ** List of all continents. You can use the locale header to get the data in a supported language. ** -## List countries ```http request GET https://cloud.appwrite.io/v1/locale/countries @@ -34,7 +30,6 @@ GET https://cloud.appwrite.io/v1/locale/countries ** List of all countries. You can use the locale header to get the data in a supported language. ** -## List EU countries ```http request GET https://cloud.appwrite.io/v1/locale/countries/eu @@ -42,7 +37,6 @@ GET https://cloud.appwrite.io/v1/locale/countries/eu ** List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language. ** -## List countries phone codes ```http request GET https://cloud.appwrite.io/v1/locale/countries/phones @@ -50,7 +44,6 @@ GET https://cloud.appwrite.io/v1/locale/countries/phones ** List of all countries phone codes. You can use the locale header to get the data in a supported language. ** -## List currencies ```http request GET https://cloud.appwrite.io/v1/locale/currencies @@ -58,7 +51,6 @@ GET https://cloud.appwrite.io/v1/locale/currencies ** List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language. ** -## List languages ```http request GET https://cloud.appwrite.io/v1/locale/languages diff --git a/docs/messaging.md b/docs/messaging.md index 556ee39..b38c34e 100644 --- a/docs/messaging.md +++ b/docs/messaging.md @@ -1,6 +1,5 @@ # Messaging Service -## List messages ```http request GET https://cloud.appwrite.io/v1/messaging/messages @@ -15,7 +14,6 @@ GET https://cloud.appwrite.io/v1/messaging/messages | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create email ```http request POST https://cloud.appwrite.io/v1/messaging/messages/email @@ -40,13 +38,12 @@ POST https://cloud.appwrite.io/v1/messaging/messages/email | html | boolean | Is content of type HTML | | | scheduledAt | string | Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. | | -## Update email ```http request PATCH https://cloud.appwrite.io/v1/messaging/messages/email/{messageId} ``` -** Update an email message by its unique ID. +** Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. ** ### Parameters @@ -66,7 +63,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/messages/email/{messageId} | scheduledAt | string | Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. | | | attachments | array | Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :. | | -## Create push notification ```http request POST https://cloud.appwrite.io/v1/messaging/messages/push @@ -98,13 +94,12 @@ POST https://cloud.appwrite.io/v1/messaging/messages/push | critical | boolean | If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform. | | | priority | string | Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification. | high | -## Update push notification ```http request PATCH https://cloud.appwrite.io/v1/messaging/messages/push/{messageId} ``` -** Update a push notification by its unique ID. +** Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. ** ### Parameters @@ -131,7 +126,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/messages/push/{messageId} | critical | boolean | If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform. | | | priority | string | Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification. | | -## Create SMS ```http request POST https://cloud.appwrite.io/v1/messaging/messages/sms @@ -151,13 +145,12 @@ POST https://cloud.appwrite.io/v1/messaging/messages/sms | draft | boolean | Is message a draft | | | scheduledAt | string | Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. | | -## Update SMS ```http request PATCH https://cloud.appwrite.io/v1/messaging/messages/sms/{messageId} ``` -** Update an SMS message by its unique ID. +** Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. ** ### Parameters @@ -172,7 +165,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/messages/sms/{messageId} | draft | boolean | Is message a draft | | | scheduledAt | string | Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. | | -## Get message ```http request GET https://cloud.appwrite.io/v1/messaging/messages/{messageId} @@ -187,7 +179,6 @@ GET https://cloud.appwrite.io/v1/messaging/messages/{messageId} | --- | --- | --- | --- | | messageId | string | **Required** Message ID. | | -## Delete message ```http request DELETE https://cloud.appwrite.io/v1/messaging/messages/{messageId} @@ -201,7 +192,6 @@ DELETE https://cloud.appwrite.io/v1/messaging/messages/{messageId} | --- | --- | --- | --- | | messageId | string | **Required** Message ID. | | -## List message logs ```http request GET https://cloud.appwrite.io/v1/messaging/messages/{messageId}/logs @@ -216,7 +206,6 @@ GET https://cloud.appwrite.io/v1/messaging/messages/{messageId}/logs | messageId | string | **Required** Message ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] | -## List message targets ```http request GET https://cloud.appwrite.io/v1/messaging/messages/{messageId}/targets @@ -231,7 +220,6 @@ GET https://cloud.appwrite.io/v1/messaging/messages/{messageId}/targets | messageId | string | **Required** Message ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType | [] | -## List providers ```http request GET https://cloud.appwrite.io/v1/messaging/providers @@ -246,7 +234,6 @@ GET https://cloud.appwrite.io/v1/messaging/providers | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create APNS provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/apns @@ -267,7 +254,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/apns | sandbox | boolean | Use APNS sandbox environment. | | | enabled | boolean | Set as enabled. | | -## Update APNS provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/apns/{providerId} @@ -288,7 +274,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/apns/{providerId} | bundleId | string | APNS bundle ID. | | | sandbox | boolean | Use APNS sandbox environment. | | -## Create FCM provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/fcm @@ -305,7 +290,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/fcm | serviceAccountJSON | object | FCM service account JSON. | {} | | enabled | boolean | Set as enabled. | | -## Update FCM provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/fcm/{providerId} @@ -322,7 +306,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/fcm/{providerId} | enabled | boolean | Set as enabled. | | | serviceAccountJSON | object | FCM service account JSON. | {} | -## Create Mailgun provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/mailgun @@ -345,7 +328,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/mailgun | replyToEmail | string | Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well. | | | enabled | boolean | Set as enabled. | | -## Update Mailgun provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/mailgun/{providerId} @@ -368,7 +350,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/mailgun/{providerId} | replyToName | string | Name set in the reply to field for the mail. Default value is sender name. | | | replyToEmail | string | Email set in the reply to field for the mail. Default value is sender email. | | -## Create Msg91 provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/msg91 @@ -387,7 +368,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/msg91 | authKey | string | Msg91 auth key. | | | enabled | boolean | Set as enabled. | | -## Update Msg91 provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/msg91/{providerId} @@ -406,7 +386,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/msg91/{providerId} | senderId | string | Msg91 sender ID. | | | authKey | string | Msg91 auth key. | | -## Create Sendgrid provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/sendgrid @@ -427,7 +406,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/sendgrid | replyToEmail | string | Email set in the reply to field for the mail. Default value is sender email. | | | enabled | boolean | Set as enabled. | | -## Update Sendgrid provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/sendgrid/{providerId} @@ -448,7 +426,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/sendgrid/{providerId} | replyToName | string | Name set in the Reply To field for the mail. Default value is Sender Name. | | | replyToEmail | string | Email set in the Reply To field for the mail. Default value is Sender Email. | | -## Create SMTP provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/smtp @@ -475,7 +452,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/smtp | replyToEmail | string | Email set in the reply to field for the mail. Default value is sender email. | | | enabled | boolean | Set as enabled. | | -## Update SMTP provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/smtp/{providerId} @@ -502,7 +478,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/smtp/{providerId} | replyToEmail | string | Email set in the Reply To field for the mail. Default value is Sender Email. | | | enabled | boolean | Set as enabled. | | -## Create Telesign provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/telesign @@ -521,7 +496,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/telesign | apiKey | string | Telesign API key. | | | enabled | boolean | Set as enabled. | | -## Update Telesign provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/telesign/{providerId} @@ -540,7 +514,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/telesign/{providerId} | apiKey | string | Telesign API key. | | | from | string | Sender number. | | -## Create Textmagic provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/textmagic @@ -559,7 +532,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/textmagic | apiKey | string | Textmagic apiKey. | | | enabled | boolean | Set as enabled. | | -## Update Textmagic provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/textmagic/{providerId} @@ -578,7 +550,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/textmagic/{providerId} | apiKey | string | Textmagic apiKey. | | | from | string | Sender number. | | -## Create Twilio provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/twilio @@ -597,7 +568,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/twilio | authToken | string | Twilio authentication token. | | | enabled | boolean | Set as enabled. | | -## Update Twilio provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/twilio/{providerId} @@ -616,7 +586,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/twilio/{providerId} | authToken | string | Twilio authentication token. | | | from | string | Sender number. | | -## Create Vonage provider ```http request POST https://cloud.appwrite.io/v1/messaging/providers/vonage @@ -635,7 +604,6 @@ POST https://cloud.appwrite.io/v1/messaging/providers/vonage | apiSecret | string | Vonage API secret. | | | enabled | boolean | Set as enabled. | | -## Update Vonage provider ```http request PATCH https://cloud.appwrite.io/v1/messaging/providers/vonage/{providerId} @@ -654,7 +622,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/providers/vonage/{providerId} | apiSecret | string | Vonage API secret. | | | from | string | Sender number. | | -## Get provider ```http request GET https://cloud.appwrite.io/v1/messaging/providers/{providerId} @@ -669,7 +636,6 @@ GET https://cloud.appwrite.io/v1/messaging/providers/{providerId} | --- | --- | --- | --- | | providerId | string | **Required** Provider ID. | | -## Delete provider ```http request DELETE https://cloud.appwrite.io/v1/messaging/providers/{providerId} @@ -683,7 +649,6 @@ DELETE https://cloud.appwrite.io/v1/messaging/providers/{providerId} | --- | --- | --- | --- | | providerId | string | **Required** Provider ID. | | -## List provider logs ```http request GET https://cloud.appwrite.io/v1/messaging/providers/{providerId}/logs @@ -698,7 +663,6 @@ GET https://cloud.appwrite.io/v1/messaging/providers/{providerId}/logs | providerId | string | **Required** Provider ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] | -## List subscriber logs ```http request GET https://cloud.appwrite.io/v1/messaging/subscribers/{subscriberId}/logs @@ -713,7 +677,6 @@ GET https://cloud.appwrite.io/v1/messaging/subscribers/{subscriberId}/logs | subscriberId | string | **Required** Subscriber ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] | -## List topics ```http request GET https://cloud.appwrite.io/v1/messaging/topics @@ -728,7 +691,6 @@ GET https://cloud.appwrite.io/v1/messaging/topics | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create topic ```http request POST https://cloud.appwrite.io/v1/messaging/topics @@ -744,7 +706,6 @@ POST https://cloud.appwrite.io/v1/messaging/topics | name | string | Topic Name. | | | subscribe | array | An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long. | ["users"] | -## Get topic ```http request GET https://cloud.appwrite.io/v1/messaging/topics/{topicId} @@ -759,7 +720,6 @@ GET https://cloud.appwrite.io/v1/messaging/topics/{topicId} | --- | --- | --- | --- | | topicId | string | **Required** Topic ID. | | -## Update topic ```http request PATCH https://cloud.appwrite.io/v1/messaging/topics/{topicId} @@ -776,7 +736,6 @@ PATCH https://cloud.appwrite.io/v1/messaging/topics/{topicId} | name | string | Topic Name. | | | subscribe | array | An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long. | | -## Delete topic ```http request DELETE https://cloud.appwrite.io/v1/messaging/topics/{topicId} @@ -790,7 +749,6 @@ DELETE https://cloud.appwrite.io/v1/messaging/topics/{topicId} | --- | --- | --- | --- | | topicId | string | **Required** Topic ID. | | -## List topic logs ```http request GET https://cloud.appwrite.io/v1/messaging/topics/{topicId}/logs @@ -805,7 +763,6 @@ GET https://cloud.appwrite.io/v1/messaging/topics/{topicId}/logs | topicId | string | **Required** Topic ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] | -## List subscribers ```http request GET https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers @@ -821,7 +778,6 @@ GET https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create subscriber ```http request POST https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers @@ -837,7 +793,6 @@ POST https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers | subscriberId | string | Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID. | | | targetId | string | Target ID. The target ID to link to the specified Topic ID. | | -## Get subscriber ```http request GET https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers/{subscriberId} @@ -853,7 +808,6 @@ GET https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers/{subscri | topicId | string | **Required** Topic ID. The topic ID subscribed to. | | | subscriberId | string | **Required** Subscriber ID. | | -## Delete subscriber ```http request DELETE https://cloud.appwrite.io/v1/messaging/topics/{topicId}/subscribers/{subscriberId} diff --git a/docs/storage.md b/docs/storage.md index 0acb0b1..10935d8 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -1,6 +1,5 @@ # Storage Service -## List buckets ```http request GET https://cloud.appwrite.io/v1/storage/buckets @@ -15,7 +14,6 @@ GET https://cloud.appwrite.io/v1/storage/buckets | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create bucket ```http request POST https://cloud.appwrite.io/v1/storage/buckets @@ -38,7 +36,6 @@ POST https://cloud.appwrite.io/v1/storage/buckets | encryption | boolean | Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled | 1 | | antivirus | boolean | Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled | 1 | -## Get bucket ```http request GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId} @@ -52,7 +49,6 @@ GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId} | --- | --- | --- | --- | | bucketId | string | **Required** Bucket unique ID. | | -## Update bucket ```http request PUT https://cloud.appwrite.io/v1/storage/buckets/{bucketId} @@ -75,7 +71,6 @@ PUT https://cloud.appwrite.io/v1/storage/buckets/{bucketId} | encryption | boolean | Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled | 1 | | antivirus | boolean | Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled | 1 | -## Delete bucket ```http request DELETE https://cloud.appwrite.io/v1/storage/buckets/{bucketId} @@ -89,7 +84,6 @@ DELETE https://cloud.appwrite.io/v1/storage/buckets/{bucketId} | --- | --- | --- | --- | | bucketId | string | **Required** Bucket unique ID. | | -## List files ```http request GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files @@ -105,7 +99,6 @@ GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create file ```http request POST https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files @@ -129,7 +122,6 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk | file | file | Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file). | | | permissions | array | An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). | | -## Get file ```http request GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId} @@ -144,7 +136,6 @@ GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId} | bucketId | string | **Required** Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). | | | fileId | string | **Required** File ID. | | -## Update file ```http request PUT https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId} @@ -161,7 +152,6 @@ PUT https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId} | name | string | Name of the file | | | permissions | array | An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). | | -## Delete file ```http request DELETE https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId} @@ -176,7 +166,6 @@ DELETE https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId} | bucketId | string | **Required** Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). | | | fileId | string | **Required** File ID. | | -## Get file for download ```http request GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId}/download @@ -191,7 +180,6 @@ GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId}/downl | bucketId | string | **Required** Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket). | | | fileId | string | **Required** File ID. | | -## Get file preview ```http request GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId}/preview @@ -217,7 +205,6 @@ GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId}/previ | background | string | Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix. | | | output | string | Output format type (jpeg, jpg, png, gif and webp). | | -## Get file for view ```http request GET https://cloud.appwrite.io/v1/storage/buckets/{bucketId}/files/{fileId}/view diff --git a/docs/teams.md b/docs/teams.md index 74301f1..856f6c0 100644 --- a/docs/teams.md +++ b/docs/teams.md @@ -1,6 +1,5 @@ # Teams Service -## List teams ```http request GET https://cloud.appwrite.io/v1/teams @@ -15,7 +14,6 @@ GET https://cloud.appwrite.io/v1/teams | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create team ```http request POST https://cloud.appwrite.io/v1/teams @@ -31,7 +29,6 @@ POST https://cloud.appwrite.io/v1/teams | name | string | Team name. Max length: 128 chars. | | | roles | array | Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. | ["owner"] | -## Get team ```http request GET https://cloud.appwrite.io/v1/teams/{teamId} @@ -45,7 +42,6 @@ GET https://cloud.appwrite.io/v1/teams/{teamId} | --- | --- | --- | --- | | teamId | string | **Required** Team ID. | | -## Update name ```http request PUT https://cloud.appwrite.io/v1/teams/{teamId} @@ -60,7 +56,6 @@ PUT https://cloud.appwrite.io/v1/teams/{teamId} | teamId | string | **Required** Team ID. | | | name | string | New team name. Max length: 128 chars. | | -## Delete team ```http request DELETE https://cloud.appwrite.io/v1/teams/{teamId} @@ -74,7 +69,6 @@ DELETE https://cloud.appwrite.io/v1/teams/{teamId} | --- | --- | --- | --- | | teamId | string | **Required** Team ID. | | -## List team memberships ```http request GET https://cloud.appwrite.io/v1/teams/{teamId}/memberships @@ -90,7 +84,6 @@ GET https://cloud.appwrite.io/v1/teams/{teamId}/memberships | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create team membership ```http request POST https://cloud.appwrite.io/v1/teams/{teamId}/memberships @@ -117,7 +110,6 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee | url | string | URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | | name | string | Name of the new team member. Max length: 128 chars. | | -## Get team membership ```http request GET https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId} @@ -132,7 +124,6 @@ GET https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId} | teamId | string | **Required** Team ID. | | | membershipId | string | **Required** Membership ID. | | -## Update membership ```http request PATCH https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId} @@ -149,7 +140,6 @@ PATCH https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId} | membershipId | string | **Required** Membership ID. | | | roles | array | An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. | | -## Delete team membership ```http request DELETE https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId} @@ -164,7 +154,6 @@ DELETE https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId} | teamId | string | **Required** Team ID. | | | membershipId | string | **Required** Membership ID. | | -## Update team membership status ```http request PATCH https://cloud.appwrite.io/v1/teams/{teamId}/memberships/{membershipId}/status @@ -184,7 +173,6 @@ If the request is successful, a session for the user is automatically created. | userId | string | User ID. | | | secret | string | Secret key. | | -## Get team preferences ```http request GET https://cloud.appwrite.io/v1/teams/{teamId}/prefs @@ -198,7 +186,6 @@ GET https://cloud.appwrite.io/v1/teams/{teamId}/prefs | --- | --- | --- | --- | | teamId | string | **Required** Team ID. | | -## Update preferences ```http request PUT https://cloud.appwrite.io/v1/teams/{teamId}/prefs diff --git a/docs/users.md b/docs/users.md index 0e820fa..6d3ec8e 100644 --- a/docs/users.md +++ b/docs/users.md @@ -1,6 +1,5 @@ # Users Service -## List users ```http request GET https://cloud.appwrite.io/v1/users @@ -15,7 +14,6 @@ GET https://cloud.appwrite.io/v1/users | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Create user ```http request POST https://cloud.appwrite.io/v1/users @@ -33,7 +31,6 @@ POST https://cloud.appwrite.io/v1/users | password | string | Plain text user password. Must be at least 8 chars. | | | name | string | User name. Max length: 128 chars. | | -## Create user with Argon2 password ```http request POST https://cloud.appwrite.io/v1/users/argon2 @@ -50,7 +47,6 @@ POST https://cloud.appwrite.io/v1/users/argon2 | password | string | User password hashed using Argon2. | | | name | string | User name. Max length: 128 chars. | | -## Create user with bcrypt password ```http request POST https://cloud.appwrite.io/v1/users/bcrypt @@ -67,7 +63,6 @@ POST https://cloud.appwrite.io/v1/users/bcrypt | password | string | User password hashed using Bcrypt. | | | name | string | User name. Max length: 128 chars. | | -## List identities ```http request GET https://cloud.appwrite.io/v1/users/identities @@ -82,7 +77,6 @@ GET https://cloud.appwrite.io/v1/users/identities | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | -## Delete identity ```http request DELETE https://cloud.appwrite.io/v1/users/identities/{identityId} @@ -96,7 +90,6 @@ DELETE https://cloud.appwrite.io/v1/users/identities/{identityId} | --- | --- | --- | --- | | identityId | string | **Required** Identity ID. | | -## Create user with MD5 password ```http request POST https://cloud.appwrite.io/v1/users/md5 @@ -113,7 +106,6 @@ POST https://cloud.appwrite.io/v1/users/md5 | password | string | User password hashed using MD5. | | | name | string | User name. Max length: 128 chars. | | -## Create user with PHPass password ```http request POST https://cloud.appwrite.io/v1/users/phpass @@ -130,7 +122,6 @@ POST https://cloud.appwrite.io/v1/users/phpass | password | string | User password hashed using PHPass. | | | name | string | User name. Max length: 128 chars. | | -## Create user with Scrypt password ```http request POST https://cloud.appwrite.io/v1/users/scrypt @@ -152,7 +143,6 @@ POST https://cloud.appwrite.io/v1/users/scrypt | passwordLength | integer | Optional hash length used to hash password. | | | name | string | User name. Max length: 128 chars. | | -## Create user with Scrypt modified password ```http request POST https://cloud.appwrite.io/v1/users/scrypt-modified @@ -172,7 +162,6 @@ POST https://cloud.appwrite.io/v1/users/scrypt-modified | passwordSignerKey | string | Signer key used to hash password. | | | name | string | User name. Max length: 128 chars. | | -## Create user with SHA password ```http request POST https://cloud.appwrite.io/v1/users/sha @@ -190,7 +179,6 @@ POST https://cloud.appwrite.io/v1/users/sha | passwordVersion | string | Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512' | | | name | string | User name. Max length: 128 chars. | | -## Get user ```http request GET https://cloud.appwrite.io/v1/users/{userId} @@ -204,7 +192,6 @@ GET https://cloud.appwrite.io/v1/users/{userId} | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Delete user ```http request DELETE https://cloud.appwrite.io/v1/users/{userId} @@ -218,7 +205,6 @@ DELETE https://cloud.appwrite.io/v1/users/{userId} | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Update email ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/email @@ -233,7 +219,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/email | userId | string | **Required** User ID. | | | email | string | User email. | | -## Create user JWT ```http request POST https://cloud.appwrite.io/v1/users/{userId}/jwts @@ -249,7 +234,6 @@ POST https://cloud.appwrite.io/v1/users/{userId}/jwts | sessionId | string | Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session. | | | duration | integer | Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds. | 900 | -## Update user labels ```http request PUT https://cloud.appwrite.io/v1/users/{userId}/labels @@ -266,7 +250,6 @@ Labels can be used to grant access to resources. While teams are a way for user& | userId | string | **Required** User ID. | | | labels | array | Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long. | | -## List user logs ```http request GET https://cloud.appwrite.io/v1/users/{userId}/logs @@ -281,7 +264,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/logs | userId | string | **Required** User ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset | [] | -## List user memberships ```http request GET https://cloud.appwrite.io/v1/users/{userId}/memberships @@ -295,7 +277,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/memberships | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Update MFA ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/mfa @@ -310,7 +291,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/mfa | userId | string | **Required** User ID. | | | mfa | boolean | Enable or disable MFA. | | -## Delete authenticator ```http request DELETE https://cloud.appwrite.io/v1/users/{userId}/mfa/authenticators/{type} @@ -325,7 +305,6 @@ DELETE https://cloud.appwrite.io/v1/users/{userId}/mfa/authenticators/{type} | userId | string | **Required** User ID. | | | type | string | **Required** Type of authenticator. | | -## List factors ```http request GET https://cloud.appwrite.io/v1/users/{userId}/mfa/factors @@ -339,7 +318,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/mfa/factors | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Get MFA recovery codes ```http request GET https://cloud.appwrite.io/v1/users/{userId}/mfa/recovery-codes @@ -353,7 +331,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/mfa/recovery-codes | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Regenerate MFA recovery codes ```http request PUT https://cloud.appwrite.io/v1/users/{userId}/mfa/recovery-codes @@ -367,7 +344,6 @@ PUT https://cloud.appwrite.io/v1/users/{userId}/mfa/recovery-codes | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Create MFA recovery codes ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/mfa/recovery-codes @@ -381,7 +357,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/mfa/recovery-codes | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Update name ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/name @@ -396,7 +371,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/name | userId | string | **Required** User ID. | | | name | string | User name. Max length: 128 chars. | | -## Update password ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/password @@ -411,7 +385,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/password | userId | string | **Required** User ID. | | | password | string | New user password. Must be at least 8 chars. | | -## Update phone ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/phone @@ -426,7 +399,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/phone | userId | string | **Required** User ID. | | | number | string | User phone number. | | -## Get user preferences ```http request GET https://cloud.appwrite.io/v1/users/{userId}/prefs @@ -440,7 +412,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/prefs | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Update user preferences ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/prefs @@ -455,7 +426,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/prefs | userId | string | **Required** User ID. | | | prefs | object | Prefs key-value JSON object. | {} | -## List user sessions ```http request GET https://cloud.appwrite.io/v1/users/{userId}/sessions @@ -469,7 +439,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/sessions | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Create session ```http request POST https://cloud.appwrite.io/v1/users/{userId}/sessions @@ -485,7 +454,6 @@ If you want to generate a token for a custom authentication flow, use the [POST | --- | --- | --- | --- | | userId | string | **Required** User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. | | -## Delete user sessions ```http request DELETE https://cloud.appwrite.io/v1/users/{userId}/sessions @@ -499,7 +467,6 @@ DELETE https://cloud.appwrite.io/v1/users/{userId}/sessions | --- | --- | --- | --- | | userId | string | **Required** User ID. | | -## Delete user session ```http request DELETE https://cloud.appwrite.io/v1/users/{userId}/sessions/{sessionId} @@ -514,7 +481,6 @@ DELETE https://cloud.appwrite.io/v1/users/{userId}/sessions/{sessionId} | userId | string | **Required** User ID. | | | sessionId | string | **Required** Session ID. | | -## Update user status ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/status @@ -529,7 +495,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/status | userId | string | **Required** User ID. | | | status | boolean | User Status. To activate the user pass `true` and to block the user pass `false`. | | -## List user targets ```http request GET https://cloud.appwrite.io/v1/users/{userId}/targets @@ -544,7 +509,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/targets | userId | string | **Required** User ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels | [] | -## Create user target ```http request POST https://cloud.appwrite.io/v1/users/{userId}/targets @@ -563,7 +527,6 @@ POST https://cloud.appwrite.io/v1/users/{userId}/targets | providerId | string | Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used. | | | name | string | Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23. | | -## Get user target ```http request GET https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId} @@ -578,7 +541,6 @@ GET https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId} | userId | string | **Required** User ID. | | | targetId | string | **Required** Target ID. | | -## Update user target ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId} @@ -596,7 +558,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId} | providerId | string | Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used. | | | name | string | Target name. Max length: 128 chars. For example: My Awesome App Galaxy S23. | | -## Delete user target ```http request DELETE https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId} @@ -611,7 +572,6 @@ DELETE https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId} | userId | string | **Required** User ID. | | | targetId | string | **Required** Target ID. | | -## Create token ```http request POST https://cloud.appwrite.io/v1/users/{userId}/tokens @@ -628,7 +588,6 @@ POST https://cloud.appwrite.io/v1/users/{userId}/tokens | length | integer | Token length in characters. The default length is 6 characters | 6 | | expire | integer | Token expiration period in seconds. The default expiration is 15 minutes. | 900 | -## Update email verification ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/verification @@ -643,7 +602,6 @@ PATCH https://cloud.appwrite.io/v1/users/{userId}/verification | userId | string | **Required** User ID. | | | emailVerification | boolean | User email verification status. | | -## Update phone verification ```http request PATCH https://cloud.appwrite.io/v1/users/{userId}/verification/phone diff --git a/src/Appwrite/Client.php b/src/Appwrite/Client.php index 68eefe7..7a00782 100644 --- a/src/Appwrite/Client.php +++ b/src/Appwrite/Client.php @@ -37,11 +37,11 @@ class Client */ protected array $headers = [ 'content-type' => '', - 'user-agent' => 'AppwritePHPSDK/13.0.0 ()', + 'user-agent' => 'AppwritePHPSDK/13.0.1 ()', 'x-sdk-name'=> 'PHP', 'x-sdk-platform'=> 'server', 'x-sdk-language'=> 'php', - 'x-sdk-version'=> '13.0.0', + 'x-sdk-version'=> '13.0.1', ]; /** @@ -165,8 +165,11 @@ public function setSelfSigned(bool $status = true): Client */ public function setEndpoint(string $endpoint): Client { - $this->endpoint = $endpoint; + if (!str_starts_with($endpoint, 'http://') && !str_starts_with($endpoint, 'https://')) { + throw new AppwriteException("Invalid endpoint URL: $endpoint"); + } + $this->endpoint = $endpoint; return $this; } @@ -279,7 +282,7 @@ public function call( if(is_array($responseBody)) { throw new AppwriteException($responseBody['message'], $responseStatus, $responseBody['type'] ?? '', json_encode($responseBody)); } else { - throw new AppwriteException($responseBody, $responseStatus); + throw new AppwriteException($responseBody, $responseStatus, '', $responseBody); } } diff --git a/src/Appwrite/Enums/CreditCard.php b/src/Appwrite/Enums/CreditCard.php index aba9592..d79834e 100644 --- a/src/Appwrite/Enums/CreditCard.php +++ b/src/Appwrite/Enums/CreditCard.php @@ -22,6 +22,7 @@ class CreditCard implements JsonSerializable private static CreditCard $VISA; private static CreditCard $MIR; private static CreditCard $MAESTRO; + private static CreditCard $RUPAY; private string $value; @@ -152,4 +153,11 @@ public static function MAESTRO(): CreditCard } return self::$MAESTRO; } + public static function RUPAY(): CreditCard + { + if (!isset(self::$RUPAY)) { + self::$RUPAY = new CreditCard('rupay'); + } + return self::$RUPAY; + } } \ No newline at end of file diff --git a/src/Appwrite/Enums/Name.php b/src/Appwrite/Enums/Name.php index 49fad38..bcf9dc5 100644 --- a/src/Appwrite/Enums/Name.php +++ b/src/Appwrite/Enums/Name.php @@ -11,8 +11,8 @@ class Name implements JsonSerializable private static Name $V1AUDITS; private static Name $V1MAILS; private static Name $V1FUNCTIONS; - private static Name $V1USAGE; - private static Name $V1USAGEDUMP; + private static Name $V1STATSRESOURCES; + private static Name $V1STATSUSAGE; private static Name $V1WEBHOOKS; private static Name $V1CERTIFICATES; private static Name $V1BUILDS; @@ -71,19 +71,19 @@ public static function V1FUNCTIONS(): Name } return self::$V1FUNCTIONS; } - public static function V1USAGE(): Name + public static function V1STATSRESOURCES(): Name { - if (!isset(self::$V1USAGE)) { - self::$V1USAGE = new Name('v1-usage'); + if (!isset(self::$V1STATSRESOURCES)) { + self::$V1STATSRESOURCES = new Name('v1-stats-resources'); } - return self::$V1USAGE; + return self::$V1STATSRESOURCES; } - public static function V1USAGEDUMP(): Name + public static function V1STATSUSAGE(): Name { - if (!isset(self::$V1USAGEDUMP)) { - self::$V1USAGEDUMP = new Name('v1-usage-dump'); + if (!isset(self::$V1STATSUSAGE)) { + self::$V1STATSUSAGE = new Name('v1-stats-usage'); } - return self::$V1USAGEDUMP; + return self::$V1STATSUSAGE; } public static function V1WEBHOOKS(): Name { diff --git a/src/Appwrite/Enums/OAuthProvider.php b/src/Appwrite/Enums/OAuthProvider.php index 6ee87be..4763c9c 100644 --- a/src/Appwrite/Enums/OAuthProvider.php +++ b/src/Appwrite/Enums/OAuthProvider.php @@ -20,6 +20,7 @@ class OAuthProvider implements JsonSerializable private static OAuthProvider $DROPBOX; private static OAuthProvider $ETSY; private static OAuthProvider $FACEBOOK; + private static OAuthProvider $FIGMA; private static OAuthProvider $GITHUB; private static OAuthProvider $GITLAB; private static OAuthProvider $GOOGLE; @@ -161,6 +162,13 @@ public static function FACEBOOK(): OAuthProvider } return self::$FACEBOOK; } + public static function FIGMA(): OAuthProvider + { + if (!isset(self::$FIGMA)) { + self::$FIGMA = new OAuthProvider('figma'); + } + return self::$FIGMA; + } public static function GITHUB(): OAuthProvider { if (!isset(self::$GITHUB)) { diff --git a/src/Appwrite/Services/Account.php b/src/Appwrite/Services/Account.php index 2ea52db..13c7d7f 100644 --- a/src/Appwrite/Services/Account.php +++ b/src/Appwrite/Services/Account.php @@ -18,8 +18,6 @@ public function __construct(Client $client) } /** - * Get account - * * Get the currently logged in user. * * @throws AppwriteException @@ -36,7 +34,6 @@ public function get(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -47,8 +44,6 @@ public function get(): array } /** - * Create account - * * Use this endpoint to allow a new user to register a new account in your * project. After the user registration completes successfully, you can use * the @@ -93,8 +88,6 @@ public function create(string $userId, string $email, string $password, ?string } /** - * Update email - * * Update currently logged in user account email address. After changing user * address, the user confirmation status will get reset. A new confirmation * email is not sent automatically however you can use the send confirmation @@ -133,8 +126,6 @@ public function updateEmail(string $email, string $password): array } /** - * List identities - * * Get the list of identities for the currently logged in user. * * @param ?array $queries @@ -156,7 +147,6 @@ public function listIdentities(?array $queries = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -167,8 +157,6 @@ public function listIdentities(?array $queries = null): array } /** - * Delete identity - * * Delete an identity by its unique ID. * * @param string $identityId @@ -198,8 +186,6 @@ public function deleteIdentity(string $identityId): string } /** - * Create JWT - * * Use this endpoint to create a JSON Web Token. You can use the resulting JWT * to authenticate on behalf of the current user when working with the * Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes @@ -231,8 +217,6 @@ public function createJWT(): array } /** - * List logs - * * Get the list of latest security activity logs for the currently logged in * user. Each log returns user IP address, location and date and time of log. * @@ -255,7 +239,6 @@ public function listLogs(?array $queries = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -266,8 +249,6 @@ public function listLogs(?array $queries = null): array } /** - * Update MFA - * * Enable or disable MFA on an account. * * @param bool $mfa @@ -297,8 +278,6 @@ public function updateMFA(bool $mfa): array } /** - * Create authenticator - * * Add an authenticator app to be used as an MFA factor. Verify the * authenticator using the [verify * authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) @@ -331,8 +310,6 @@ public function createMfaAuthenticator(AuthenticatorType $type): array } /** - * Verify authenticator - * * Verify an authenticator app after adding it using the [add * authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) * method. @@ -366,8 +343,6 @@ public function updateMfaAuthenticator(AuthenticatorType $type, string $otp): ar } /** - * Delete authenticator - * * Delete an authenticator for a user by ID. * * @param AuthenticatorType $type @@ -397,8 +372,6 @@ public function deleteMfaAuthenticator(AuthenticatorType $type): string } /** - * Create MFA challenge - * * Begin the process of MFA verification after sign-in. Finish the flow with * [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) * method. @@ -430,8 +403,6 @@ public function createMfaChallenge(AuthenticationFactor $factor): array } /** - * Create MFA challenge (confirmation) - * * Complete the MFA challenge by providing the one-time password. Finish the * process of MFA verification by providing the one-time password. To begin * the flow, use @@ -467,8 +438,6 @@ public function updateMfaChallenge(string $challengeId, string $otp): array } /** - * List factors - * * List the factors available on the account to be used as a MFA challange. * * @throws AppwriteException @@ -485,7 +454,6 @@ public function listMfaFactors(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -496,8 +464,6 @@ public function listMfaFactors(): array } /** - * Get MFA recovery codes - * * Get recovery codes that can be used as backup for MFA flow. Before getting * codes, they must be generated using * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) @@ -517,7 +483,6 @@ public function getMfaRecoveryCodes(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -528,8 +493,6 @@ public function getMfaRecoveryCodes(): array } /** - * Create MFA recovery codes - * * Generate recovery codes as backup for MFA flow. It's recommended to * generate and show then immediately after user successfully adds their * authehticator. Recovery codes can be used as a MFA verification type in @@ -561,8 +524,6 @@ public function createMfaRecoveryCodes(): array } /** - * Regenerate MFA recovery codes - * * Regenerate recovery codes that can be used as backup for MFA flow. Before * regenerating codes, they must be first generated using * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) @@ -593,8 +554,6 @@ public function updateMfaRecoveryCodes(): array } /** - * Update name - * * Update currently logged in user account name. * * @param string $name @@ -624,8 +583,6 @@ public function updateName(string $name): array } /** - * Update password - * * Update currently logged in user password. For validation, user is required * to pass in the new password, and the old password. For users created with * OAuth, Team Invites and Magic URL, oldPassword is optional. @@ -662,8 +619,6 @@ public function updatePassword(string $password, ?string $oldPassword = null): a } /** - * Update phone - * * Update the currently logged in user's phone number. After updating the * phone number, the phone verification status will be reset. A confirmation * SMS is not sent automatically, however you can use the [POST @@ -699,8 +654,6 @@ public function updatePhone(string $phone, string $password): array } /** - * Get account preferences - * * Get the preferences as a key-value object for the currently logged in user. * * @throws AppwriteException @@ -717,7 +670,6 @@ public function getPrefs(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -728,8 +680,6 @@ public function getPrefs(): array } /** - * Update preferences - * * Update currently logged in user account preferences. The object you pass is * stored as is, and replaces any previous value. The maximum allowed prefs * size is 64kB and throws error if exceeded. @@ -761,8 +711,6 @@ public function updatePrefs(array $prefs): array } /** - * Create password recovery - * * Sends the user an email with a temporary secret key for password reset. * When the user clicks the confirmation link he is redirected back to your * app password reset URL with the secret key and email address values @@ -801,8 +749,6 @@ public function createRecovery(string $email, string $url): array } /** - * Create password recovery (confirmation) - * * Use this endpoint to complete the user account password reset. Both the * **userId** and **secret** arguments will be passed as query parameters to * the redirect URL you have provided when sending your request to the [POST @@ -845,8 +791,6 @@ public function updateRecovery(string $userId, string $secret, string $password) } /** - * List sessions - * * Get the list of active sessions across different devices for the currently * logged in user. * @@ -864,7 +808,6 @@ public function listSessions(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -875,8 +818,6 @@ public function listSessions(): array } /** - * Delete sessions - * * Delete all sessions from the user account and remove any sessions cookies * from the end client. * @@ -905,8 +846,6 @@ public function deleteSessions(): string } /** - * Create anonymous session - * * Use this endpoint to allow a new user to register an anonymous account in * your project. This route will also create a new session for the user. To * allow the new user to convert an anonymous account to a normal account, you @@ -940,8 +879,6 @@ public function createAnonymousSession(): array } /** - * Create email password session - * * Allow the user to login into their account by providing a valid email and * password combination. This route will create a new session for the user. * @@ -978,8 +915,6 @@ public function createEmailPasswordSession(string $email, string $password): arr } /** - * Update magic URL session - * * Use this endpoint to create a session from token. Provide the **userId** * and **secret** parameters from the successful response of authentication * flows initiated by token creation. For example, magic URL and phone login. @@ -1013,8 +948,6 @@ public function updateMagicURLSession(string $userId, string $secret): array } /** - * Update phone session - * * Use this endpoint to create a session from token. Provide the **userId** * and **secret** parameters from the successful response of authentication * flows initiated by token creation. For example, magic URL and phone login. @@ -1048,8 +981,6 @@ public function updatePhoneSession(string $userId, string $secret): array } /** - * Create session - * * Use this endpoint to create a session from token. Provide the **userId** * and **secret** parameters from the successful response of authentication * flows initiated by token creation. For example, magic URL and phone login. @@ -1083,8 +1014,6 @@ public function createSession(string $userId, string $secret): array } /** - * Get session - * * Use this endpoint to get a logged in user's session using a Session ID. * Inputting 'current' will return the current session being used. * @@ -1104,7 +1033,6 @@ public function getSession(string $sessionId): array $apiParams['sessionId'] = $sessionId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1115,8 +1043,6 @@ public function getSession(string $sessionId): array } /** - * Update session - * * Use this endpoint to extend a session's length. Extending a session is * useful when session expiry is short. If the session was created using an * OAuth provider, this endpoint refreshes the access token from the provider. @@ -1148,8 +1074,6 @@ public function updateSession(string $sessionId): array } /** - * Delete session - * * Logout the user. Use 'current' as the session ID to logout on this device, * use a session ID to logout on another device. If you're looking to logout * the user on all devices, use [Delete @@ -1183,8 +1107,6 @@ public function deleteSession(string $sessionId): string } /** - * Update status - * * Block the currently logged in user account. Behind the scene, the user * record is not deleted but permanently blocked from any access. To * completely delete a user, use the Users API instead. @@ -1214,8 +1136,6 @@ public function updateStatus(): array } /** - * Create email token (OTP) - * * Sends the user an email with a secret key for creating a session. If the * provided user ID has not be registered, a new user will be created. Use the * returned user ID and secret and submit a request to the [POST @@ -1261,8 +1181,6 @@ public function createEmailToken(string $userId, string $email, ?bool $phrase = } /** - * Create magic URL token - * * Sends the user an email with a secret key for creating a session. If the * provided user ID has not been registered, a new user will be created. When * the user clicks the link in the email, the user is redirected back to the @@ -1317,8 +1235,6 @@ public function createMagicURLToken(string $userId, string $email, ?string $url } /** - * Create OAuth2 token - * * Allow the user to login to their account using the OAuth2 provider of their * choice. Each OAuth2 provider should be enabled from the Appwrite console * first. Use the success and failure arguments to provide a redirect URL's @@ -1365,7 +1281,6 @@ public function createOAuth2Token(OAuthProvider $provider, ?string $success = nu } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1376,8 +1291,6 @@ public function createOAuth2Token(OAuthProvider $provider, ?string $success = nu } /** - * Create phone token - * * Sends the user an SMS with a secret key for creating a session. If the * provided user ID has not be registered, a new user will be created. Use the * returned user ID and secret and submit a request to the [POST @@ -1418,8 +1331,6 @@ public function createPhoneToken(string $userId, string $phone): array } /** - * Create email verification - * * Use this endpoint to send a verification message to your user email address * to confirm they are the valid owners of that address. Both the **userId** * and **secret** arguments will be passed as query parameters to the URL you @@ -1463,8 +1374,6 @@ public function createVerification(string $url): array } /** - * Create email verification (confirmation) - * * Use this endpoint to complete the user email verification process. Use both * the **userId** and **secret** parameters that were attached to your app URL * to verify the user email ownership. If confirmed this route will return a @@ -1499,8 +1408,6 @@ public function updateVerification(string $userId, string $secret): array } /** - * Create phone verification - * * Use this endpoint to send a verification SMS to the currently logged in * user. This endpoint is meant for use after updating a user's phone number * using the @@ -1535,8 +1442,6 @@ public function createPhoneVerification(): array } /** - * Update phone verification (confirmation) - * * Use this endpoint to complete the user phone verification process. Use the * **userId** and **secret** that were sent to your user's phone number to * verify the user email ownership. If confirmed this route will return a 200 diff --git a/src/Appwrite/Services/Avatars.php b/src/Appwrite/Services/Avatars.php index 73052e5..5828ce8 100644 --- a/src/Appwrite/Services/Avatars.php +++ b/src/Appwrite/Services/Avatars.php @@ -18,8 +18,6 @@ public function __construct(Client $client) } /** - * Get browser icon - * * You can use this endpoint to show different browser icons to your users. * The code argument receives the browser code as it appears in your user [GET * /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) @@ -62,7 +60,6 @@ public function getBrowser(Browser $code, ?int $width = null, ?int $height = nul } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -73,8 +70,6 @@ public function getBrowser(Browser $code, ?int $width = null, ?int $height = nul } /** - * Get credit card icon - * * The credit card endpoint will return you the icon of the credit card * provider you need. Use width, height and quality arguments to change the * output settings. @@ -116,7 +111,6 @@ public function getCreditCard(CreditCard $code, ?int $width = null, ?int $height } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -127,8 +121,6 @@ public function getCreditCard(CreditCard $code, ?int $width = null, ?int $height } /** - * Get favicon - * * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote * website URL. * @@ -150,7 +142,6 @@ public function getFavicon(string $url): string $apiParams['url'] = $url; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -161,8 +152,6 @@ public function getFavicon(string $url): string } /** - * Get country flag - * * You can use this endpoint to show different country flags icons to your * users. The code argument receives the 2 letter country code. Use width, * height and quality arguments to change the output settings. Country codes @@ -205,7 +194,6 @@ public function getFlag(Flag $code, ?int $width = null, ?int $height = null, ?in } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -216,8 +204,6 @@ public function getFlag(Flag $code, ?int $width = null, ?int $height = null, ?in } /** - * Get image from URL - * * Use this endpoint to fetch a remote image URL and crop it to any image size * you want. This endpoint is very useful if you need to crop and display * remote images in your app or in case you want to make sure a 3rd party @@ -256,7 +242,6 @@ public function getImage(string $url, ?int $width = null, ?int $height = null): } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -267,8 +252,6 @@ public function getImage(string $url, ?int $width = null, ?int $height = null): } /** - * Get user initials - * * Use this endpoint to show your user initials avatar icon on your website or * app. By default, this route will try to print your logged-in user name or * email initials. You can also overwrite the user name if you pass the 'name' @@ -320,7 +303,6 @@ public function getInitials(?string $name = null, ?int $width = null, ?int $heig } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -331,8 +313,6 @@ public function getInitials(?string $name = null, ?int $width = null, ?int $heig } /** - * Get QR code - * * Converts a given plain text to a QR code image. You can use the query * parameters to change the size and style of the resulting image. * @@ -368,7 +348,6 @@ public function getQR(string $text, ?int $size = null, ?int $margin = null, ?boo } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, diff --git a/src/Appwrite/Services/Databases.php b/src/Appwrite/Services/Databases.php index 6eb85cf..fb636cc 100644 --- a/src/Appwrite/Services/Databases.php +++ b/src/Appwrite/Services/Databases.php @@ -18,8 +18,6 @@ public function __construct(Client $client) } /** - * List databases - * * Get a list of all databases from the current Appwrite project. You can use * the search parameter to filter your results. * @@ -47,7 +45,6 @@ public function list(?array $queries = null, ?string $search = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -58,8 +55,6 @@ public function list(?array $queries = null, ?string $search = null): array } /** - * Create database - * * Create a new Database. * * @@ -97,8 +92,6 @@ public function create(string $databaseId, string $name, ?bool $enabled = null): } /** - * Get database - * * Get a database by its unique ID. This endpoint response returns a JSON * object with the database metadata. * @@ -118,7 +111,6 @@ public function get(string $databaseId): array $apiParams['databaseId'] = $databaseId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -129,8 +121,6 @@ public function get(string $databaseId): array } /** - * Update database - * * Update a database by its unique ID. * * @param string $databaseId @@ -167,8 +157,6 @@ public function update(string $databaseId, string $name, ?bool $enabled = null): } /** - * Delete database - * * Delete a database by its unique ID. Only API keys with with databases.write * scope can delete a database. * @@ -199,8 +187,6 @@ public function delete(string $databaseId): string } /** - * List collections - * * Get a list of all collections that belong to the provided databaseId. You * can use the search parameter to filter your results. * @@ -230,7 +216,6 @@ public function listCollections(string $databaseId, ?array $queries = null, ?str } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -241,8 +226,6 @@ public function listCollections(string $databaseId, ?array $queries = null, ?str } /** - * Create collection - * * Create a new Collection. Before using this route, you should create a new * database resource using either a [server * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) @@ -294,8 +277,6 @@ public function createCollection(string $databaseId, string $collectionId, strin } /** - * Get collection - * * Get a collection by its unique ID. This endpoint response returns a JSON * object with the collection metadata. * @@ -317,7 +298,6 @@ public function getCollection(string $databaseId, string $collectionId): array $apiParams['collectionId'] = $collectionId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -328,8 +308,6 @@ public function getCollection(string $databaseId, string $collectionId): array } /** - * Update collection - * * Update a collection by its unique ID. * * @param string $databaseId @@ -378,8 +356,6 @@ public function updateCollection(string $databaseId, string $collectionId, strin } /** - * Delete collection - * * Delete a collection by its unique ID. Only users with write permissions * have access to delete this resource. * @@ -412,8 +388,6 @@ public function deleteCollection(string $databaseId, string $collectionId): stri } /** - * List attributes - * * List attributes in the collection. * * @param string $databaseId @@ -439,7 +413,6 @@ public function listAttributes(string $databaseId, string $collectionId, ?array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -450,8 +423,6 @@ public function listAttributes(string $databaseId, string $collectionId, ?array } /** - * Create boolean attribute - * * Create a boolean attribute. * * @@ -498,8 +469,6 @@ public function createBooleanAttribute(string $databaseId, string $collectionId, } /** - * Update boolean attribute - * * Update a boolean attribute. Changing the `default` value will not update * already existing documents. * @@ -543,8 +512,6 @@ public function updateBooleanAttribute(string $databaseId, string $collectionId, } /** - * Create datetime attribute - * * Create a date time attribute according to the ISO 8601 standard. * * @param string $databaseId @@ -590,8 +557,6 @@ public function createDatetimeAttribute(string $databaseId, string $collectionId } /** - * Update dateTime attribute - * * Update a date time attribute. Changing the `default` value will not update * already existing documents. * @@ -635,8 +600,6 @@ public function updateDatetimeAttribute(string $databaseId, string $collectionId } /** - * Create email attribute - * * Create an email attribute. * * @@ -683,8 +646,6 @@ public function createEmailAttribute(string $databaseId, string $collectionId, s } /** - * Update email attribute - * * Update an email attribute. Changing the `default` value will not update * already existing documents. * @@ -729,8 +690,6 @@ public function updateEmailAttribute(string $databaseId, string $collectionId, s } /** - * Create enum attribute - * * Create an enumeration attribute. The `elements` param acts as a white-list * of accepted values for this attribute. * @@ -780,8 +739,6 @@ public function createEnumAttribute(string $databaseId, string $collectionId, st } /** - * Update enum attribute - * * Update an enum attribute. Changing the `default` value will not update * already existing documents. * @@ -828,8 +785,6 @@ public function updateEnumAttribute(string $databaseId, string $collectionId, st } /** - * Create float attribute - * * Create a float attribute. Optionally, minimum and maximum values can be * provided. * @@ -887,8 +842,6 @@ public function createFloatAttribute(string $databaseId, string $collectionId, s } /** - * Update float attribute - * * Update a float attribute. Changing the `default` value will not update * already existing documents. * @@ -897,14 +850,14 @@ public function createFloatAttribute(string $databaseId, string $collectionId, s * @param string $collectionId * @param string $key * @param bool $required - * @param float $min - * @param float $max * @param ?float $xdefault + * @param ?float $min + * @param ?float $max * @param ?string $newKey * @throws AppwriteException * @return array */ - public function updateFloatAttribute(string $databaseId, string $collectionId, string $key, bool $required, float $min, float $max, ?float $xdefault, ?string $newKey = null): array + public function updateFloatAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?float $xdefault, ?float $min = null, ?float $max = null, ?string $newKey = null): array { $apiPath = str_replace( ['{databaseId}', '{collectionId}', '{key}'], @@ -917,10 +870,16 @@ public function updateFloatAttribute(string $databaseId, string $collectionId, s $apiParams['collectionId'] = $collectionId; $apiParams['key'] = $key; $apiParams['required'] = $required; - $apiParams['min'] = $min; - $apiParams['max'] = $max; $apiParams['default'] = $xdefault; + if (!is_null($min)) { + $apiParams['min'] = $min; + } + + if (!is_null($max)) { + $apiParams['max'] = $max; + } + if (!is_null($newKey)) { $apiParams['newKey'] = $newKey; } @@ -937,8 +896,6 @@ public function updateFloatAttribute(string $databaseId, string $collectionId, s } /** - * Create integer attribute - * * Create an integer attribute. Optionally, minimum and maximum values can be * provided. * @@ -996,8 +953,6 @@ public function createIntegerAttribute(string $databaseId, string $collectionId, } /** - * Update integer attribute - * * Update an integer attribute. Changing the `default` value will not update * already existing documents. * @@ -1006,14 +961,14 @@ public function createIntegerAttribute(string $databaseId, string $collectionId, * @param string $collectionId * @param string $key * @param bool $required - * @param int $min - * @param int $max * @param ?int $xdefault + * @param ?int $min + * @param ?int $max * @param ?string $newKey * @throws AppwriteException * @return array */ - public function updateIntegerAttribute(string $databaseId, string $collectionId, string $key, bool $required, int $min, int $max, ?int $xdefault, ?string $newKey = null): array + public function updateIntegerAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null): array { $apiPath = str_replace( ['{databaseId}', '{collectionId}', '{key}'], @@ -1026,10 +981,16 @@ public function updateIntegerAttribute(string $databaseId, string $collectionId, $apiParams['collectionId'] = $collectionId; $apiParams['key'] = $key; $apiParams['required'] = $required; - $apiParams['min'] = $min; - $apiParams['max'] = $max; $apiParams['default'] = $xdefault; + if (!is_null($min)) { + $apiParams['min'] = $min; + } + + if (!is_null($max)) { + $apiParams['max'] = $max; + } + if (!is_null($newKey)) { $apiParams['newKey'] = $newKey; } @@ -1046,8 +1007,6 @@ public function updateIntegerAttribute(string $databaseId, string $collectionId, } /** - * Create IP address attribute - * * Create IP address attribute. * * @@ -1094,8 +1053,6 @@ public function createIpAttribute(string $databaseId, string $collectionId, stri } /** - * Update IP address attribute - * * Update an ip attribute. Changing the `default` value will not update * already existing documents. * @@ -1140,8 +1097,6 @@ public function updateIpAttribute(string $databaseId, string $collectionId, stri } /** - * Create relationship attribute - * * Create relationship attribute. [Learn more about relationship * attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * @@ -1199,8 +1154,6 @@ public function createRelationshipAttribute(string $databaseId, string $collecti } /** - * Create string attribute - * * Create a string attribute. * * @@ -1254,8 +1207,6 @@ public function createStringAttribute(string $databaseId, string $collectionId, } /** - * Update string attribute - * * Update a string attribute. Changing the `default` value will not update * already existing documents. * @@ -1305,8 +1256,6 @@ public function updateStringAttribute(string $databaseId, string $collectionId, } /** - * Create URL attribute - * * Create a URL attribute. * * @@ -1353,8 +1302,6 @@ public function createUrlAttribute(string $databaseId, string $collectionId, str } /** - * Update URL attribute - * * Update an url attribute. Changing the `default` value will not update * already existing documents. * @@ -1399,8 +1346,6 @@ public function updateUrlAttribute(string $databaseId, string $collectionId, str } /** - * Get attribute - * * Get attribute by ID. * * @param string $databaseId @@ -1423,7 +1368,6 @@ public function getAttribute(string $databaseId, string $collectionId, string $k $apiParams['key'] = $key; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1434,8 +1378,6 @@ public function getAttribute(string $databaseId, string $collectionId, string $k } /** - * Delete attribute - * * Deletes an attribute. * * @param string $databaseId @@ -1469,8 +1411,6 @@ public function deleteAttribute(string $databaseId, string $collectionId, string } /** - * Update relationship attribute - * * Update relationship attribute. [Learn more about relationship * attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * @@ -1516,8 +1456,6 @@ public function updateRelationshipAttribute(string $databaseId, string $collecti } /** - * List documents - * * Get a list of all the user's documents in a given collection. You can use * the query params to filter your results. * @@ -1544,7 +1482,6 @@ public function listDocuments(string $databaseId, string $collectionId, ?array $ } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1555,12 +1492,11 @@ public function listDocuments(string $databaseId, string $collectionId, ?array $ } /** - * Create document - * * Create a new Document. Before using this route, you should create a new * collection resource using either a [server * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) * API or directly from your database console. + * * * @param string $databaseId * @param string $collectionId @@ -1600,8 +1536,6 @@ public function createDocument(string $databaseId, string $collectionId, string } /** - * Get document - * * Get a document by its unique ID. This endpoint response returns a JSON * object with the document data. * @@ -1630,7 +1564,6 @@ public function getDocument(string $databaseId, string $collectionId, string $do } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1641,8 +1574,6 @@ public function getDocument(string $databaseId, string $collectionId, string $do } /** - * Update document - * * Update a document by its unique ID. Using the patch method you can pass * only specific fields that will get updated. * @@ -1687,8 +1618,6 @@ public function updateDocument(string $databaseId, string $collectionId, string } /** - * Delete document - * * Delete a document by its unique ID. * * @param string $databaseId @@ -1722,8 +1651,6 @@ public function deleteDocument(string $databaseId, string $collectionId, string } /** - * List indexes - * * List indexes in the collection. * * @param string $databaseId @@ -1749,7 +1676,6 @@ public function listIndexes(string $databaseId, string $collectionId, ?array $qu } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1760,8 +1686,6 @@ public function listIndexes(string $databaseId, string $collectionId, ?array $qu } /** - * Create index - * * Creates an index on the attributes listed. Your index should include all * the attributes you will query in a single request. * Attributes can be `key`, `fulltext`, and `unique`. @@ -1806,8 +1730,6 @@ public function createIndex(string $databaseId, string $collectionId, string $ke } /** - * Get index - * * Get index by ID. * * @param string $databaseId @@ -1830,7 +1752,6 @@ public function getIndex(string $databaseId, string $collectionId, string $key): $apiParams['key'] = $key; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1841,8 +1762,6 @@ public function getIndex(string $databaseId, string $collectionId, string $key): } /** - * Delete index - * * Delete an index. * * @param string $databaseId diff --git a/src/Appwrite/Services/Functions.php b/src/Appwrite/Services/Functions.php index 94c107b..b495155 100644 --- a/src/Appwrite/Services/Functions.php +++ b/src/Appwrite/Services/Functions.php @@ -17,8 +17,6 @@ public function __construct(Client $client) } /** - * List functions - * * Get a list of all the project's functions. You can use the query params to * filter your results. * @@ -46,7 +44,6 @@ public function list(?array $queries = null, ?string $search = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -57,8 +54,6 @@ public function list(?array $queries = null, ?string $search = null): array } /** - * Create function - * * Create a new function. You can pass a list of * [permissions](https://appwrite.io/docs/permissions) to allow different * project users or team with access to execute the function using the client @@ -190,8 +185,6 @@ public function create(string $functionId, string $name, Runtime $runtime, ?arra } /** - * List runtimes - * * Get a list of all runtimes that are currently active on your instance. * * @throws AppwriteException @@ -208,7 +201,6 @@ public function listRuntimes(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -219,8 +211,6 @@ public function listRuntimes(): array } /** - * List available function runtime specifications - * * List allowed function specifications for this instance. * * @@ -238,7 +228,6 @@ public function listSpecifications(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -249,8 +238,6 @@ public function listSpecifications(): array } /** - * Get function - * * Get a function by its unique ID. * * @param string $functionId @@ -269,7 +256,6 @@ public function get(string $functionId): array $apiParams['functionId'] = $functionId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -280,8 +266,6 @@ public function get(string $functionId): array } /** - * Update function - * * Update function by its unique ID. * * @param string $functionId @@ -390,8 +374,6 @@ public function update(string $functionId, string $name, ?Runtime $runtime = nul } /** - * Delete function - * * Delete a function by its unique ID. * * @param string $functionId @@ -421,8 +403,6 @@ public function delete(string $functionId): string } /** - * List deployments - * * Get a list of all the project's code deployments. You can use the query * params to filter your results. * @@ -452,7 +432,6 @@ public function listDeployments(string $functionId, ?array $queries = null, ?str } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -463,8 +442,6 @@ public function listDeployments(string $functionId, ?array $queries = null, ?str } /** - * Create deployment - * * Create a new function code deployment. Use this endpoint to upload a new * version of your code function. To execute your newly uploaded code, you'll * need to update the function's deployment to use your new deployment UID. @@ -582,8 +559,6 @@ public function createDeployment(string $functionId, InputFile $code, bool $acti } /** - * Get deployment - * * Get a code deployment by its unique ID. * * @param string $functionId @@ -604,7 +579,6 @@ public function getDeployment(string $functionId, string $deploymentId): array $apiParams['deploymentId'] = $deploymentId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -615,8 +589,6 @@ public function getDeployment(string $functionId, string $deploymentId): array } /** - * Update deployment - * * Update the function code deployment ID using the unique function ID. Use * this endpoint to switch the code deployment that should be executed by the * execution endpoint. @@ -650,8 +622,6 @@ public function updateDeployment(string $functionId, string $deploymentId): arra } /** - * Delete deployment - * * Delete a code deployment by its unique ID. * * @param string $functionId @@ -683,8 +653,6 @@ public function deleteDeployment(string $functionId, string $deploymentId): stri } /** - * Rebuild deployment - * * Create a new build for an existing function deployment. This endpoint * allows you to rebuild a deployment with the updated function configuration, * including its entrypoint and build commands if they have been modified The @@ -725,8 +693,6 @@ public function createBuild(string $functionId, string $deploymentId, ?string $b } /** - * Cancel deployment - * * Cancel an ongoing function deployment build. If the build is already in * progress, it will be stopped and marked as canceled. If the build hasn't * started yet, it will be marked as canceled without executing. You cannot @@ -762,8 +728,6 @@ public function updateDeploymentBuild(string $functionId, string $deploymentId): } /** - * Download deployment - * * Get a Deployment's contents by its unique ID. This endpoint supports range * requests for partial or streaming file download. * @@ -785,7 +749,6 @@ public function getDeploymentDownload(string $functionId, string $deploymentId): $apiParams['deploymentId'] = $deploymentId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -796,8 +759,6 @@ public function getDeploymentDownload(string $functionId, string $deploymentId): } /** - * List executions - * * Get a list of all the current user function execution logs. You can use the * query params to filter your results. * @@ -827,7 +788,6 @@ public function listExecutions(string $functionId, ?array $queries = null, ?stri } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -838,8 +798,6 @@ public function listExecutions(string $functionId, ?array $queries = null, ?stri } /** - * Create execution - * * Trigger a function execution. The returned object will return you the * current execution status. You can ping the `Get Execution` endpoint to get * updates on the current execution status. Once this endpoint is called, your @@ -902,8 +860,6 @@ public function createExecution(string $functionId, ?string $body = null, ?bool } /** - * Get execution - * * Get a function execution log by its unique ID. * * @param string $functionId @@ -924,7 +880,6 @@ public function getExecution(string $functionId, string $executionId): array $apiParams['executionId'] = $executionId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -935,8 +890,6 @@ public function getExecution(string $functionId, string $executionId): array } /** - * Delete execution - * * Delete a function execution by its unique ID. * * @@ -969,8 +922,6 @@ public function deleteExecution(string $functionId, string $executionId): string } /** - * List variables - * * Get a list of all variables of a specific function. * * @param string $functionId @@ -989,7 +940,6 @@ public function listVariables(string $functionId): array $apiParams['functionId'] = $functionId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1000,8 +950,6 @@ public function listVariables(string $functionId): array } /** - * Create variable - * * Create a new function environment variable. These variables can be accessed * in the function at runtime as environment variables. * @@ -1036,8 +984,6 @@ public function createVariable(string $functionId, string $key, string $value): } /** - * Get variable - * * Get a variable by its unique ID. * * @param string $functionId @@ -1058,7 +1004,6 @@ public function getVariable(string $functionId, string $variableId): array $apiParams['variableId'] = $variableId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1069,8 +1014,6 @@ public function getVariable(string $functionId, string $variableId): array } /** - * Update variable - * * Update variable by its unique ID. * * @param string $functionId @@ -1109,8 +1052,6 @@ public function updateVariable(string $functionId, string $variableId, string $k } /** - * Delete variable - * * Delete a variable by its unique ID. * * @param string $functionId diff --git a/src/Appwrite/Services/Graphql.php b/src/Appwrite/Services/Graphql.php index fcb161c..fd78b28 100644 --- a/src/Appwrite/Services/Graphql.php +++ b/src/Appwrite/Services/Graphql.php @@ -15,8 +15,6 @@ public function __construct(Client $client) } /** - * GraphQL endpoint - * * Execute a GraphQL mutation. * * @param array $query @@ -47,8 +45,6 @@ public function query(array $query): array } /** - * GraphQL endpoint - * * Execute a GraphQL mutation. * * @param array $query diff --git a/src/Appwrite/Services/Health.php b/src/Appwrite/Services/Health.php index 7ac5942..86183b4 100644 --- a/src/Appwrite/Services/Health.php +++ b/src/Appwrite/Services/Health.php @@ -16,8 +16,6 @@ public function __construct(Client $client) } /** - * Get HTTP - * * Check the Appwrite HTTP server is up and responsive. * * @throws AppwriteException @@ -34,7 +32,6 @@ public function get(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -45,8 +42,6 @@ public function get(): array } /** - * Get antivirus - * * Check the Appwrite Antivirus server is up and connection is successful. * * @throws AppwriteException @@ -63,7 +58,6 @@ public function getAntivirus(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -74,8 +68,6 @@ public function getAntivirus(): array } /** - * Get cache - * * Check the Appwrite in-memory cache servers are up and connection is * successful. * @@ -93,7 +85,6 @@ public function getCache(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -104,8 +95,6 @@ public function getCache(): array } /** - * Get the SSL certificate for a domain - * * Get the SSL certificate for a domain * * @param ?string $domain @@ -127,7 +116,6 @@ public function getCertificate(?string $domain = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -138,8 +126,6 @@ public function getCertificate(?string $domain = null): array } /** - * Get DB - * * Check the Appwrite database servers are up and connection is successful. * * @throws AppwriteException @@ -156,7 +142,6 @@ public function getDB(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -167,8 +152,6 @@ public function getDB(): array } /** - * Get pubsub - * * Check the Appwrite pub-sub servers are up and connection is successful. * * @throws AppwriteException @@ -185,37 +168,6 @@ public function getPubSub(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; - - return $this->client->call( - Client::METHOD_GET, - $apiPath, - $apiHeaders, - $apiParams - ); - } - - /** - * Get queue - * - * Check the Appwrite queue messaging servers are up and connection is - * successful. - * - * @throws AppwriteException - * @return array - */ - public function getQueue(): array - { - $apiPath = str_replace( - [], - [], - '/health/queue' - ); - - $apiParams = []; - - $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -226,8 +178,6 @@ public function getQueue(): array } /** - * Get builds queue - * * Get the number of builds that are waiting to be processed in the Appwrite * internal queue server. * @@ -250,7 +200,6 @@ public function getQueueBuilds(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -261,8 +210,6 @@ public function getQueueBuilds(?int $threshold = null): array } /** - * Get certificates queue - * * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue * server. @@ -286,7 +233,6 @@ public function getQueueCertificates(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -297,8 +243,6 @@ public function getQueueCertificates(?int $threshold = null): array } /** - * Get databases queue - * * Get the number of database changes that are waiting to be processed in the * Appwrite internal queue server. * @@ -326,7 +270,6 @@ public function getQueueDatabases(?string $name = null, ?int $threshold = null): } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -337,8 +280,6 @@ public function getQueueDatabases(?string $name = null, ?int $threshold = null): } /** - * Get deletes queue - * * Get the number of background destructive changes that are waiting to be * processed in the Appwrite internal queue server. * @@ -361,7 +302,6 @@ public function getQueueDeletes(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -372,8 +312,6 @@ public function getQueueDeletes(?int $threshold = null): array } /** - * Get number of failed queue jobs - * * Returns the amount of failed jobs in a given queue. * * @@ -398,7 +336,6 @@ public function getFailedJobs(Name $name, ?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -409,8 +346,6 @@ public function getFailedJobs(Name $name, ?int $threshold = null): array } /** - * Get functions queue - * * Get the number of function executions that are waiting to be processed in * the Appwrite internal queue server. * @@ -433,7 +368,6 @@ public function getQueueFunctions(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -444,8 +378,6 @@ public function getQueueFunctions(?int $threshold = null): array } /** - * Get logs queue - * * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. * @@ -468,7 +400,6 @@ public function getQueueLogs(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -479,8 +410,6 @@ public function getQueueLogs(?int $threshold = null): array } /** - * Get mails queue - * * Get the number of mails that are waiting to be processed in the Appwrite * internal queue server. * @@ -503,7 +432,6 @@ public function getQueueMails(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -514,8 +442,6 @@ public function getQueueMails(?int $threshold = null): array } /** - * Get messaging queue - * * Get the number of messages that are waiting to be processed in the Appwrite * internal queue server. * @@ -538,7 +464,6 @@ public function getQueueMessaging(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -549,8 +474,6 @@ public function getQueueMessaging(?int $threshold = null): array } /** - * Get migrations queue - * * Get the number of migrations that are waiting to be processed in the * Appwrite internal queue server. * @@ -573,7 +496,6 @@ public function getQueueMigrations(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -584,21 +506,19 @@ public function getQueueMigrations(?int $threshold = null): array } /** - * Get usage queue - * * Get the number of metrics that are waiting to be processed in the Appwrite - * internal queue server. + * stats resources queue. * * @param ?int $threshold * @throws AppwriteException * @return array */ - public function getQueueUsage(?int $threshold = null): array + public function getQueueStatsResources(?int $threshold = null): array { $apiPath = str_replace( [], [], - '/health/queue/usage' + '/health/queue/stats-resources' ); $apiParams = []; @@ -608,7 +528,6 @@ public function getQueueUsage(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -619,21 +538,19 @@ public function getQueueUsage(?int $threshold = null): array } /** - * Get usage dump queue - * - * Get the number of projects containing metrics that are waiting to be - * processed in the Appwrite internal queue server. + * Get the number of metrics that are waiting to be processed in the Appwrite + * internal queue server. * * @param ?int $threshold * @throws AppwriteException * @return array */ - public function getQueueUsageDump(?int $threshold = null): array + public function getQueueUsage(?int $threshold = null): array { $apiPath = str_replace( [], [], - '/health/queue/usage-dump' + '/health/queue/stats-usage' ); $apiParams = []; @@ -643,7 +560,6 @@ public function getQueueUsageDump(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -654,8 +570,6 @@ public function getQueueUsageDump(?int $threshold = null): array } /** - * Get webhooks queue - * * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. * @@ -678,7 +592,6 @@ public function getQueueWebhooks(?int $threshold = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -689,8 +602,6 @@ public function getQueueWebhooks(?int $threshold = null): array } /** - * Get storage - * * Check the Appwrite storage device is up and connection is successful. * * @throws AppwriteException @@ -707,7 +618,6 @@ public function getStorage(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -718,8 +628,6 @@ public function getStorage(): array } /** - * Get local storage - * * Check the Appwrite local storage device is up and connection is successful. * * @throws AppwriteException @@ -736,7 +644,6 @@ public function getStorageLocal(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -747,8 +654,6 @@ public function getStorageLocal(): array } /** - * Get time - * * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive * events. The [Network Time @@ -771,7 +676,6 @@ public function getTime(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, diff --git a/src/Appwrite/Services/Locale.php b/src/Appwrite/Services/Locale.php index 8f20ebc..0516c51 100644 --- a/src/Appwrite/Services/Locale.php +++ b/src/Appwrite/Services/Locale.php @@ -15,8 +15,6 @@ public function __construct(Client $client) } /** - * Get user locale - * * Get the current user location based on IP. Returns an object with user * country code, country name, continent name, continent code, ip address and * suggested currency. You can use the locale header to get the data in a @@ -38,7 +36,6 @@ public function get(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -49,8 +46,6 @@ public function get(): array } /** - * List locale codes - * * List of all locale codes in [ISO * 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). * @@ -68,7 +63,6 @@ public function listCodes(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -79,8 +73,6 @@ public function listCodes(): array } /** - * List continents - * * List of all continents. You can use the locale header to get the data in a * supported language. * @@ -98,7 +90,6 @@ public function listContinents(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -109,8 +100,6 @@ public function listContinents(): array } /** - * List countries - * * List of all countries. You can use the locale header to get the data in a * supported language. * @@ -128,7 +117,6 @@ public function listCountries(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -139,8 +127,6 @@ public function listCountries(): array } /** - * List EU countries - * * List of all countries that are currently members of the EU. You can use the * locale header to get the data in a supported language. * @@ -158,7 +144,6 @@ public function listCountriesEU(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -169,8 +154,6 @@ public function listCountriesEU(): array } /** - * List countries phone codes - * * List of all countries phone codes. You can use the locale header to get the * data in a supported language. * @@ -188,7 +171,6 @@ public function listCountriesPhones(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -199,8 +181,6 @@ public function listCountriesPhones(): array } /** - * List currencies - * * List of all currencies, including currency symbol, name, plural, and * decimal digits for all major and minor currencies. You can use the locale * header to get the data in a supported language. @@ -219,7 +199,6 @@ public function listCurrencies(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -230,8 +209,6 @@ public function listCurrencies(): array } /** - * List languages - * * List of all languages classified by ISO 639-1 including 2-letter code, name * in English, and name in the respective language. * @@ -249,7 +226,6 @@ public function listLanguages(): array $apiParams = []; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, diff --git a/src/Appwrite/Services/Messaging.php b/src/Appwrite/Services/Messaging.php index b23647d..70f93fb 100644 --- a/src/Appwrite/Services/Messaging.php +++ b/src/Appwrite/Services/Messaging.php @@ -17,8 +17,6 @@ public function __construct(Client $client) } /** - * List messages - * * Get a list of all messages from the current Appwrite project. * * @param ?array $queries @@ -45,7 +43,6 @@ public function listMessages(?array $queries = null, ?string $search = null): ar } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -56,8 +53,6 @@ public function listMessages(?array $queries = null, ?string $search = null): ar } /** - * Create email - * * Create a new email message. * * @param string $messageId @@ -136,9 +131,9 @@ public function createEmail(string $messageId, string $subject, string $content, } /** - * Update email - * - * Update an email message by its unique ID. + * Update an email message by its unique ID. This endpoint only works on + * messages that are in draft status. Messages that are already processing, + * sent, or failed cannot be updated. * * * @param string $messageId @@ -223,8 +218,6 @@ public function updateEmail(string $messageId, ?array $topics = null, ?array $us } /** - * Create push notification - * * Create a new push notification. * * @param string $messageId @@ -344,9 +337,9 @@ public function createPush(string $messageId, ?string $title = null, ?string $bo } /** - * Update push notification - * - * Update a push notification by its unique ID. + * Update a push notification by its unique ID. This endpoint only works on + * messages that are in draft status. Messages that are already processing, + * sent, or failed cannot be updated. * * * @param string $messageId @@ -466,8 +459,6 @@ public function updatePush(string $messageId, ?array $topics = null, ?array $use } /** - * Create SMS - * * Create a new SMS message. * * @param string $messageId @@ -524,9 +515,9 @@ public function createSms(string $messageId, string $content, ?array $topics = n } /** - * Update SMS - * - * Update an SMS message by its unique ID. + * Update an SMS message by its unique ID. This endpoint only works on + * messages that are in draft status. Messages that are already processing, + * sent, or failed cannot be updated. * * * @param string $messageId @@ -586,8 +577,6 @@ public function updateSms(string $messageId, ?array $topics = null, ?array $user } /** - * Get message - * * Get a message by its unique ID. * * @@ -607,7 +596,6 @@ public function getMessage(string $messageId): array $apiParams['messageId'] = $messageId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -618,8 +606,6 @@ public function getMessage(string $messageId): array } /** - * Delete message - * * Delete a message. If the message is not a draft or scheduled, but has been * sent, this will not recall the message. * @@ -650,8 +636,6 @@ public function delete(string $messageId): string } /** - * List message logs - * * Get the message activity logs listed by its unique ID. * * @param string $messageId @@ -675,7 +659,6 @@ public function listMessageLogs(string $messageId, ?array $queries = null): arra } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -686,8 +669,6 @@ public function listMessageLogs(string $messageId, ?array $queries = null): arra } /** - * List message targets - * * Get a list of the targets associated with a message. * * @param string $messageId @@ -711,7 +692,6 @@ public function listTargets(string $messageId, ?array $queries = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -722,8 +702,6 @@ public function listTargets(string $messageId, ?array $queries = null): array } /** - * List providers - * * Get a list of all providers from the current Appwrite project. * * @param ?array $queries @@ -750,7 +728,6 @@ public function listProviders(?array $queries = null, ?string $search = null): a } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -761,8 +738,6 @@ public function listProviders(?array $queries = null, ?string $search = null): a } /** - * Create APNS provider - * * Create a new Apple Push Notification service provider. * * @param string $providerId @@ -824,8 +799,6 @@ public function createApnsProvider(string $providerId, string $name, ?string $au } /** - * Update APNS provider - * * Update a Apple Push Notification service provider by its unique ID. * * @param string $providerId @@ -890,8 +863,6 @@ public function updateApnsProvider(string $providerId, ?string $name = null, ?bo } /** - * Create FCM provider - * * Create a new Firebase Cloud Messaging provider. * * @param string $providerId @@ -933,8 +904,6 @@ public function createFcmProvider(string $providerId, string $name, ?array $serv } /** - * Update FCM provider - * * Update a Firebase Cloud Messaging provider by its unique ID. * * @param string $providerId @@ -979,8 +948,6 @@ public function updateFcmProvider(string $providerId, ?string $name = null, ?boo } /** - * Create Mailgun provider - * * Create a new Mailgun provider. * * @param string $providerId @@ -1052,8 +1019,6 @@ public function createMailgunProvider(string $providerId, string $name, ?string } /** - * Update Mailgun provider - * * Update a Mailgun provider by its unique ID. * * @param string $providerId @@ -1128,8 +1093,6 @@ public function updateMailgunProvider(string $providerId, ?string $name = null, } /** - * Create Msg91 provider - * * Create a new MSG91 provider. * * @param string $providerId @@ -1181,8 +1144,6 @@ public function createMsg91Provider(string $providerId, string $name, ?string $t } /** - * Update Msg91 provider - * * Update a MSG91 provider by its unique ID. * * @param string $providerId @@ -1237,8 +1198,6 @@ public function updateMsg91Provider(string $providerId, ?string $name = null, ?b } /** - * Create Sendgrid provider - * * Create a new Sendgrid provider. * * @param string $providerId @@ -1300,8 +1259,6 @@ public function createSendgridProvider(string $providerId, string $name, ?string } /** - * Update Sendgrid provider - * * Update a Sendgrid provider by its unique ID. * * @param string $providerId @@ -1366,8 +1323,6 @@ public function updateSendgridProvider(string $providerId, ?string $name = null, } /** - * Create SMTP provider - * * Create a new SMTP provider. * * @param string $providerId @@ -1456,8 +1411,6 @@ public function createSmtpProvider(string $providerId, string $name, string $hos } /** - * Update SMTP provider - * * Update a SMTP provider by its unique ID. * * @param string $providerId @@ -1552,8 +1505,6 @@ public function updateSmtpProvider(string $providerId, ?string $name = null, ?st } /** - * Create Telesign provider - * * Create a new Telesign provider. * * @param string $providerId @@ -1605,8 +1556,6 @@ public function createTelesignProvider(string $providerId, string $name, ?string } /** - * Update Telesign provider - * * Update a Telesign provider by its unique ID. * * @param string $providerId @@ -1661,8 +1610,6 @@ public function updateTelesignProvider(string $providerId, ?string $name = null, } /** - * Create Textmagic provider - * * Create a new Textmagic provider. * * @param string $providerId @@ -1714,8 +1661,6 @@ public function createTextmagicProvider(string $providerId, string $name, ?strin } /** - * Update Textmagic provider - * * Update a Textmagic provider by its unique ID. * * @param string $providerId @@ -1770,8 +1715,6 @@ public function updateTextmagicProvider(string $providerId, ?string $name = null } /** - * Create Twilio provider - * * Create a new Twilio provider. * * @param string $providerId @@ -1823,8 +1766,6 @@ public function createTwilioProvider(string $providerId, string $name, ?string $ } /** - * Update Twilio provider - * * Update a Twilio provider by its unique ID. * * @param string $providerId @@ -1879,8 +1820,6 @@ public function updateTwilioProvider(string $providerId, ?string $name = null, ? } /** - * Create Vonage provider - * * Create a new Vonage provider. * * @param string $providerId @@ -1932,8 +1871,6 @@ public function createVonageProvider(string $providerId, string $name, ?string $ } /** - * Update Vonage provider - * * Update a Vonage provider by its unique ID. * * @param string $providerId @@ -1988,8 +1925,6 @@ public function updateVonageProvider(string $providerId, ?string $name = null, ? } /** - * Get provider - * * Get a provider by its unique ID. * * @@ -2009,7 +1944,6 @@ public function getProvider(string $providerId): array $apiParams['providerId'] = $providerId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2020,8 +1954,6 @@ public function getProvider(string $providerId): array } /** - * Delete provider - * * Delete a provider by its unique ID. * * @param string $providerId @@ -2051,8 +1983,6 @@ public function deleteProvider(string $providerId): string } /** - * List provider logs - * * Get the provider activity logs listed by its unique ID. * * @param string $providerId @@ -2076,7 +2006,6 @@ public function listProviderLogs(string $providerId, ?array $queries = null): ar } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2087,8 +2016,6 @@ public function listProviderLogs(string $providerId, ?array $queries = null): ar } /** - * List subscriber logs - * * Get the subscriber activity logs listed by its unique ID. * * @param string $subscriberId @@ -2112,7 +2039,6 @@ public function listSubscriberLogs(string $subscriberId, ?array $queries = null) } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2123,8 +2049,6 @@ public function listSubscriberLogs(string $subscriberId, ?array $queries = null) } /** - * List topics - * * Get a list of all topics from the current Appwrite project. * * @param ?array $queries @@ -2151,7 +2075,6 @@ public function listTopics(?array $queries = null, ?string $search = null): arra } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2162,8 +2085,6 @@ public function listTopics(?array $queries = null, ?string $search = null): arra } /** - * Create topic - * * Create a new topic. * * @param string $topicId @@ -2200,8 +2121,6 @@ public function createTopic(string $topicId, string $name, ?array $subscribe = n } /** - * Get topic - * * Get a topic by its unique ID. * * @@ -2221,7 +2140,6 @@ public function getTopic(string $topicId): array $apiParams['topicId'] = $topicId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2232,8 +2150,6 @@ public function getTopic(string $topicId): array } /** - * Update topic - * * Update a topic by its unique ID. * * @@ -2274,8 +2190,6 @@ public function updateTopic(string $topicId, ?string $name = null, ?array $subsc } /** - * Delete topic - * * Delete a topic by its unique ID. * * @param string $topicId @@ -2305,8 +2219,6 @@ public function deleteTopic(string $topicId): string } /** - * List topic logs - * * Get the topic activity logs listed by its unique ID. * * @param string $topicId @@ -2330,7 +2242,6 @@ public function listTopicLogs(string $topicId, ?array $queries = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2341,8 +2252,6 @@ public function listTopicLogs(string $topicId, ?array $queries = null): array } /** - * List subscribers - * * Get a list of all subscribers from the current Appwrite project. * * @param string $topicId @@ -2371,7 +2280,6 @@ public function listSubscribers(string $topicId, ?array $queries = null, ?string } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2382,8 +2290,6 @@ public function listSubscribers(string $topicId, ?array $queries = null, ?string } /** - * Create subscriber - * * Create a new subscriber. * * @param string $topicId @@ -2417,8 +2323,6 @@ public function createSubscriber(string $topicId, string $subscriberId, string $ } /** - * Get subscriber - * * Get a subscriber by its unique ID. * * @@ -2440,7 +2344,6 @@ public function getSubscriber(string $topicId, string $subscriberId): array $apiParams['subscriberId'] = $subscriberId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -2451,8 +2354,6 @@ public function getSubscriber(string $topicId, string $subscriberId): array } /** - * Delete subscriber - * * Delete a subscriber by its unique ID. * * @param string $topicId diff --git a/src/Appwrite/Services/Storage.php b/src/Appwrite/Services/Storage.php index 9035248..cf392dc 100644 --- a/src/Appwrite/Services/Storage.php +++ b/src/Appwrite/Services/Storage.php @@ -18,8 +18,6 @@ public function __construct(Client $client) } /** - * List buckets - * * Get a list of all the storage buckets. You can use the query params to * filter your results. * @@ -47,7 +45,6 @@ public function listBuckets(?array $queries = null, ?string $search = null): arr } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -58,8 +55,6 @@ public function listBuckets(?array $queries = null, ?string $search = null): arr } /** - * Create bucket - * * Create a new storage bucket. * * @param string $bucketId @@ -131,8 +126,6 @@ public function createBucket(string $bucketId, string $name, ?array $permissions } /** - * Get bucket - * * Get a storage bucket by its unique ID. This endpoint response returns a * JSON object with the storage bucket metadata. * @@ -152,7 +145,6 @@ public function getBucket(string $bucketId): array $apiParams['bucketId'] = $bucketId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -163,8 +155,6 @@ public function getBucket(string $bucketId): array } /** - * Update bucket - * * Update a storage bucket by its unique ID. * * @param string $bucketId @@ -236,8 +226,6 @@ public function updateBucket(string $bucketId, string $name, ?array $permissions } /** - * Delete bucket - * * Delete a storage bucket by its unique ID. * * @param string $bucketId @@ -267,8 +255,6 @@ public function deleteBucket(string $bucketId): string } /** - * List files - * * Get a list of all the user files. You can use the query params to filter * your results. * @@ -298,7 +284,6 @@ public function listFiles(string $bucketId, ?array $queries = null, ?string $sea } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -309,8 +294,6 @@ public function listFiles(string $bucketId, ?array $queries = null, ?string $sea } /** - * Create file - * * Create a new file. Before using this route, you should create a new bucket * resource using either a [server * integration](https://appwrite.io/docs/server/storage#storageCreateBucket) @@ -436,8 +419,6 @@ public function createFile(string $bucketId, string $fileId, InputFile $file, ?a } /** - * Get file - * * Get a file by its unique ID. This endpoint response returns a JSON object * with the file metadata. * @@ -459,7 +440,6 @@ public function getFile(string $bucketId, string $fileId): array $apiParams['fileId'] = $fileId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -470,8 +450,6 @@ public function getFile(string $bucketId, string $fileId): array } /** - * Update file - * * Update a file by its unique ID. Only users with write permissions have * access to update this resource. * @@ -514,8 +492,6 @@ public function updateFile(string $bucketId, string $fileId, ?string $name = nul } /** - * Delete file - * * Delete a file by its unique ID. Only users with write permissions have * access to delete this resource. * @@ -548,8 +524,6 @@ public function deleteFile(string $bucketId, string $fileId): string } /** - * Get file for download - * * Get a file content by its unique ID. The endpoint response return with a * 'Content-Disposition: attachment' header that tells the browser to start * downloading the file to user downloads directory. @@ -572,7 +546,6 @@ public function getFileDownload(string $bucketId, string $fileId): string $apiParams['fileId'] = $fileId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -583,8 +556,6 @@ public function getFileDownload(string $bucketId, string $fileId): string } /** - * Get file preview - * * Get a file preview image. Currently, this method supports preview for image * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, * and spreadsheets, will return the file icon image. You can also pass query @@ -664,7 +635,6 @@ public function getFilePreview(string $bucketId, string $fileId, ?int $width = n } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -675,8 +645,6 @@ public function getFilePreview(string $bucketId, string $fileId, ?int $width = n } /** - * Get file for view - * * Get a file content by its unique ID. This endpoint is similar to the * download method but returns with no 'Content-Disposition: attachment' * header. @@ -699,7 +667,6 @@ public function getFileView(string $bucketId, string $fileId): string $apiParams['fileId'] = $fileId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, diff --git a/src/Appwrite/Services/Teams.php b/src/Appwrite/Services/Teams.php index d4712bc..489b525 100644 --- a/src/Appwrite/Services/Teams.php +++ b/src/Appwrite/Services/Teams.php @@ -15,8 +15,6 @@ public function __construct(Client $client) } /** - * List teams - * * Get a list of all the teams in which the current user is a member. You can * use the parameters to filter your results. * @@ -44,7 +42,6 @@ public function list(?array $queries = null, ?string $search = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -55,8 +52,6 @@ public function list(?array $queries = null, ?string $search = null): array } /** - * Create team - * * Create a new team. The user who creates the team will automatically be * assigned as the owner of the team. Only the users with the owner role can * invite new members, add new owners and delete or update the team. @@ -95,8 +90,6 @@ public function create(string $teamId, string $name, ?array $roles = null): arra } /** - * Get team - * * Get a team by its ID. All team members have read access for this resource. * * @param string $teamId @@ -115,7 +108,6 @@ public function get(string $teamId): array $apiParams['teamId'] = $teamId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -126,8 +118,6 @@ public function get(string $teamId): array } /** - * Update name - * * Update the team's name by its unique ID. * * @param string $teamId @@ -159,8 +149,6 @@ public function updateName(string $teamId, string $name): array } /** - * Delete team - * * Delete a team using its ID. Only team members with the owner role can * delete the team. * @@ -191,8 +179,6 @@ public function delete(string $teamId): string } /** - * List team memberships - * * Use this endpoint to list a team's members using the team's ID. All team * members have read access to this endpoint. Hide sensitive attributes from * the response by toggling membership privacy in the Console. @@ -223,7 +209,6 @@ public function listMemberships(string $teamId, ?array $queries = null, ?string } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -234,8 +219,6 @@ public function listMemberships(string $teamId, ?array $queries = null, ?string } /** - * Create team membership - * * Invite a new member to join your team. Provide an ID for existing users, or * invite unregistered users using an email or phone number. If initiated from * a Client SDK, Appwrite will send an email or sms with a link to join the @@ -312,8 +295,6 @@ public function createMembership(string $teamId, array $roles, ?string $email = } /** - * Get team membership - * * Get a team member by the membership unique id. All team members have read * access for this resource. Hide sensitive attributes from the response by * toggling membership privacy in the Console. @@ -336,7 +317,6 @@ public function getMembership(string $teamId, string $membershipId): array $apiParams['membershipId'] = $membershipId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -347,8 +327,6 @@ public function getMembership(string $teamId, string $membershipId): array } /** - * Update membership - * * Modify the roles of a team member. Only team members with the owner role * have access to this endpoint. Learn more about [roles and * permissions](https://appwrite.io/docs/permissions). @@ -385,8 +363,6 @@ public function updateMembership(string $teamId, string $membershipId, array $ro } /** - * Delete team membership - * * This endpoint allows a user to leave a team or for a team owner to delete * the membership of any other team member. You can also use this endpoint to * delete a user membership even if it is not accepted. @@ -420,8 +396,6 @@ public function deleteMembership(string $teamId, string $membershipId): string } /** - * Update team membership status - * * Use this endpoint to allow a user to accept an invitation to join a team * after being redirected back to your app from the invitation email received * by the user. @@ -463,8 +437,6 @@ public function updateMembershipStatus(string $teamId, string $membershipId, str } /** - * Get team preferences - * * Get the team's shared preferences by its unique ID. If a preference doesn't * need to be shared by all team members, prefer storing them in [user * preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). @@ -485,7 +457,6 @@ public function getPrefs(string $teamId): array $apiParams['teamId'] = $teamId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -496,8 +467,6 @@ public function getPrefs(string $teamId): array } /** - * Update preferences - * * Update the team's preferences by its unique ID. The object you pass is * stored as is and replaces any previous value. The maximum allowed prefs * size is 64kB and throws an error if exceeded. diff --git a/src/Appwrite/Services/Users.php b/src/Appwrite/Services/Users.php index 32df3d8..53fedd2 100644 --- a/src/Appwrite/Services/Users.php +++ b/src/Appwrite/Services/Users.php @@ -18,8 +18,6 @@ public function __construct(Client $client) } /** - * List users - * * Get a list of all the project's users. You can use the query params to * filter your results. * @@ -47,7 +45,6 @@ public function list(?array $queries = null, ?string $search = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -58,8 +55,6 @@ public function list(?array $queries = null, ?string $search = null): array } /** - * Create user - * * Create a new user. * * @param string $userId @@ -109,8 +104,6 @@ public function create(string $userId, ?string $email = null, ?string $phone = n } /** - * Create user with Argon2 password - * * Create a new user. Password provided must be hashed with the * [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to @@ -152,8 +145,6 @@ public function createArgon2User(string $userId, string $email, string $password } /** - * Create user with bcrypt password - * * Create a new user. Password provided must be hashed with the * [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to @@ -195,8 +186,6 @@ public function createBcryptUser(string $userId, string $email, string $password } /** - * List identities - * * Get identities for all users. * * @param ?array $queries @@ -223,7 +212,6 @@ public function listIdentities(?array $queries = null, ?string $search = null): } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -234,8 +222,6 @@ public function listIdentities(?array $queries = null, ?string $search = null): } /** - * Delete identity - * * Delete an identity by its unique ID. * * @param string $identityId @@ -265,8 +251,6 @@ public function deleteIdentity(string $identityId): string } /** - * Create user with MD5 password - * * Create a new user. Password provided must be hashed with the * [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to @@ -308,8 +292,6 @@ public function createMD5User(string $userId, string $email, string $password, ? } /** - * Create user with PHPass password - * * Create a new user. Password provided must be hashed with the * [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to @@ -351,8 +333,6 @@ public function createPHPassUser(string $userId, string $email, string $password } /** - * Create user with Scrypt password - * * Create a new user. Password provided must be hashed with the * [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to @@ -404,8 +384,6 @@ public function createScryptUser(string $userId, string $email, string $password } /** - * Create user with Scrypt modified password - * * Create a new user. Password provided must be hashed with the [Scrypt * Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) * algorithm. Use the [POST @@ -454,8 +432,6 @@ public function createScryptModifiedUser(string $userId, string $email, string $ } /** - * Create user with SHA password - * * Create a new user. Password provided must be hashed with the * [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use * the [POST /users](https://appwrite.io/docs/server/users#usersCreate) @@ -502,8 +478,6 @@ public function createSHAUser(string $userId, string $email, string $password, ? } /** - * Get user - * * Get a user by its unique ID. * * @param string $userId @@ -522,7 +496,6 @@ public function get(string $userId): array $apiParams['userId'] = $userId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -533,8 +506,6 @@ public function get(string $userId): array } /** - * Delete user - * * Delete a user by its unique ID, thereby releasing it's ID. Since ID is * released and can be reused, all user-related resources like documents or * storage files should be deleted before user deletion. If you want to keep @@ -569,8 +540,6 @@ public function delete(string $userId): string } /** - * Update email - * * Update the user email by its unique ID. * * @param string $userId @@ -602,8 +571,6 @@ public function updateEmail(string $userId, string $email): array } /** - * Create user JWT - * * Use this endpoint to create a JSON Web Token for user by its unique ID. You * can use the resulting JWT to authenticate on behalf of the user. The JWT * secret will become invalid if the session it uses gets deleted. @@ -645,8 +612,6 @@ public function createJWT(string $userId, ?string $sessionId = null, ?int $durat } /** - * Update user labels - * * Update the user labels by its unique ID. * * Labels can be used to grant access to resources. While teams are a way for @@ -683,8 +648,6 @@ public function updateLabels(string $userId, array $labels): array } /** - * List user logs - * * Get the user activity logs list by its unique ID. * * @param string $userId @@ -708,7 +671,6 @@ public function listLogs(string $userId, ?array $queries = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -719,8 +681,6 @@ public function listLogs(string $userId, ?array $queries = null): array } /** - * List user memberships - * * Get the user membership list by its unique ID. * * @param string $userId @@ -739,7 +699,6 @@ public function listMemberships(string $userId): array $apiParams['userId'] = $userId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -750,8 +709,6 @@ public function listMemberships(string $userId): array } /** - * Update MFA - * * Enable or disable MFA on a user account. * * @param string $userId @@ -783,8 +740,6 @@ public function updateMfa(string $userId, bool $mfa): array } /** - * Delete authenticator - * * Delete an authenticator app. * * @param string $userId @@ -816,8 +771,6 @@ public function deleteMfaAuthenticator(string $userId, AuthenticatorType $type): } /** - * List factors - * * List the factors available on the account to be used as a MFA challange. * * @param string $userId @@ -836,7 +789,6 @@ public function listMfaFactors(string $userId): array $apiParams['userId'] = $userId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -847,8 +799,6 @@ public function listMfaFactors(string $userId): array } /** - * Get MFA recovery codes - * * Get recovery codes that can be used as backup for MFA flow by User ID. * Before getting codes, they must be generated using * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) @@ -870,7 +820,6 @@ public function getMfaRecoveryCodes(string $userId): array $apiParams['userId'] = $userId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -881,8 +830,6 @@ public function getMfaRecoveryCodes(string $userId): array } /** - * Regenerate MFA recovery codes - * * Regenerate recovery codes that can be used as backup for MFA flow by User * ID. Before regenerating codes, they must be first generated using * [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) @@ -915,8 +862,6 @@ public function updateMfaRecoveryCodes(string $userId): array } /** - * Create MFA recovery codes - * * Generate recovery codes used as backup for MFA flow for User ID. Recovery * codes can be used as a MFA verification type in * [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) @@ -949,8 +894,6 @@ public function createMfaRecoveryCodes(string $userId): array } /** - * Update name - * * Update the user name by its unique ID. * * @param string $userId @@ -982,8 +925,6 @@ public function updateName(string $userId, string $name): array } /** - * Update password - * * Update the user password by its unique ID. * * @param string $userId @@ -1015,8 +956,6 @@ public function updatePassword(string $userId, string $password): array } /** - * Update phone - * * Update the user phone by its unique ID. * * @param string $userId @@ -1048,8 +987,6 @@ public function updatePhone(string $userId, string $number): array } /** - * Get user preferences - * * Get the user preferences by its unique ID. * * @param string $userId @@ -1068,7 +1005,6 @@ public function getPrefs(string $userId): array $apiParams['userId'] = $userId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1079,8 +1015,6 @@ public function getPrefs(string $userId): array } /** - * Update user preferences - * * Update the user preferences by its unique ID. The object you pass is stored * as is, and replaces any previous value. The maximum allowed prefs size is * 64kB and throws error if exceeded. @@ -1114,8 +1048,6 @@ public function updatePrefs(string $userId, array $prefs): array } /** - * List user sessions - * * Get the user sessions list by its unique ID. * * @param string $userId @@ -1134,7 +1066,6 @@ public function listSessions(string $userId): array $apiParams['userId'] = $userId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1145,8 +1076,6 @@ public function listSessions(string $userId): array } /** - * Create session - * * Creates a session for a user. Returns an immediately usable session object. * * If you want to generate a token for a custom authentication flow, use the @@ -1181,8 +1110,6 @@ public function createSession(string $userId): array } /** - * Delete user sessions - * * Delete all user's sessions by using the user's unique ID. * * @param string $userId @@ -1212,8 +1139,6 @@ public function deleteSessions(string $userId): string } /** - * Delete user session - * * Delete a user sessions by its unique ID. * * @param string $userId @@ -1245,8 +1170,6 @@ public function deleteSession(string $userId, string $sessionId): string } /** - * Update user status - * * Update the user status by its unique ID. Use this endpoint as an * alternative to deleting a user if you want to keep user's ID reserved. * @@ -1279,8 +1202,6 @@ public function updateStatus(string $userId, bool $status): array } /** - * List user targets - * * List the messaging targets that are associated with a user. * * @param string $userId @@ -1304,7 +1225,6 @@ public function listTargets(string $userId, ?array $queries = null): array } $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1315,8 +1235,6 @@ public function listTargets(string $userId, ?array $queries = null): array } /** - * Create user target - * * Create a messaging target. * * @param string $userId @@ -1362,8 +1280,6 @@ public function createTarget(string $userId, string $targetId, MessagingProvider } /** - * Get user target - * * Get a user's push notification target by ID. * * @param string $userId @@ -1384,7 +1300,6 @@ public function getTarget(string $userId, string $targetId): array $apiParams['targetId'] = $targetId; $apiHeaders = []; - $apiHeaders['content-type'] = 'application/json'; return $this->client->call( Client::METHOD_GET, @@ -1395,8 +1310,6 @@ public function getTarget(string $userId, string $targetId): array } /** - * Update user target - * * Update a messaging target. * * @param string $userId @@ -1443,8 +1356,6 @@ public function updateTarget(string $userId, string $targetId, ?string $identifi } /** - * Delete user target - * * Delete a messaging target. * * @param string $userId @@ -1476,8 +1387,6 @@ public function deleteTarget(string $userId, string $targetId): string } /** - * Create token - * * Returns a token with a secret key for creating a session. Use the user ID * and secret and submit a request to the [PUT * /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) @@ -1521,8 +1430,6 @@ public function createToken(string $userId, ?int $length = null, ?int $expire = } /** - * Update email verification - * * Update the user email verification status by its unique ID. * * @param string $userId @@ -1554,8 +1461,6 @@ public function updateEmailVerification(string $userId, bool $emailVerification) } /** - * Update phone verification - * * Update the user phone verification status by its unique ID. * * @param string $userId diff --git a/tests/Appwrite/Services/DatabasesTest.php b/tests/Appwrite/Services/DatabasesTest.php index a1bf00e..a4c11e3 100644 --- a/tests/Appwrite/Services/DatabasesTest.php +++ b/tests/Appwrite/Services/DatabasesTest.php @@ -520,8 +520,6 @@ public function testMethodUpdateFloatAttribute(): void { "", "", true, - 1.0, - 1.0, 1.0 ); @@ -575,8 +573,6 @@ public function testMethodUpdateIntegerAttribute(): void { "", "", true, - 1, - 1, 1 ); diff --git a/tests/Appwrite/Services/HealthTest.php b/tests/Appwrite/Services/HealthTest.php index bed4e21..cf0f754 100644 --- a/tests/Appwrite/Services/HealthTest.php +++ b/tests/Appwrite/Services/HealthTest.php @@ -126,24 +126,6 @@ public function testMethodGetPubSub(): void { $this->assertSame($data, $response); } - public function testMethodGetQueue(): void { - - $data = array( - "name" => "database", - "ping" => 128, - "status" => "pass",); - - - $this->client - ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) - ->andReturn($data); - - $response = $this->health->getQueue( - ); - - $this->assertSame($data, $response); - } - public function testMethodGetQueueBuilds(): void { $data = array( @@ -305,7 +287,7 @@ public function testMethodGetQueueMigrations(): void { $this->assertSame($data, $response); } - public function testMethodGetQueueUsage(): void { + public function testMethodGetQueueStatsResources(): void { $data = array( "size" => 8,); @@ -315,13 +297,13 @@ public function testMethodGetQueueUsage(): void { ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) ->andReturn($data); - $response = $this->health->getQueueUsage( + $response = $this->health->getQueueStatsResources( ); $this->assertSame($data, $response); } - public function testMethodGetQueueUsageDump(): void { + public function testMethodGetQueueUsage(): void { $data = array( "size" => 8,); @@ -331,7 +313,7 @@ public function testMethodGetQueueUsageDump(): void { ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) ->andReturn($data); - $response = $this->health->getQueueUsageDump( + $response = $this->health->getQueueUsage( ); $this->assertSame($data, $response); From 67558461fe8bbb36520d80daf04130573fa31909 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:37:35 +0100 Subject: [PATCH 2/2] chore: major version bump --- src/Appwrite/Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Client.php b/src/Appwrite/Client.php index 7a00782..20ae1fa 100644 --- a/src/Appwrite/Client.php +++ b/src/Appwrite/Client.php @@ -37,11 +37,11 @@ class Client */ protected array $headers = [ 'content-type' => '', - 'user-agent' => 'AppwritePHPSDK/13.0.1 ()', + 'user-agent' => 'AppwritePHPSDK/14.0.0 ()', 'x-sdk-name'=> 'PHP', 'x-sdk-platform'=> 'server', 'x-sdk-language'=> 'php', - 'x-sdk-version'=> '13.0.1', + 'x-sdk-version'=> '14.0.0', ]; /**