diff --git a/CHANGELOG.md b/CHANGELOG.md index 89bd3f0f..2a121a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +## 32.0.0 + +* Breaking: `TablesDB`, `DocumentsDB` and `VectorsDB` `create` and `update` take `$description` before `$specification` +* Breaking: `Functions::update` takes `$description` before `$emailEnabled` +* Added: `createQuery` on `Databases`, `DocumentsDB` and `TablesDB` to send list queries in the request body +* Added: `Account::listMemberships` +* Added: optional `$description` on create and update for databases, collections, tables, attributes, columns, indexes, buckets, functions, sites, variables, topics, webhooks and keys +* Added: `$description` on the matching models +* Added: `$total` on list methods in `Activities`, `Backups`, `Domains`, `Mongo`, `Mysql` and `Postgresql` +* Added: `$emails` on `Messaging::createEmail` and `Messaging::updateEmail` +* Added: `$denyList` on `Project::updatePasswordDictionaryPolicy`, `updatePasswordPersonalDataPolicy` and their policy models +* Added: `BillingPlan::$functionsAllowCron` +* Added: `$stripMetadata` on `Storage::createBucket`, `updateBucket` and the `Bucket` model + ## 31.0.0 * Breaking: requests send `X-Appwrite-Response-Format: 2.5.0`; responses follow the 2.5 shapes diff --git a/docs/account.md b/docs/account.md index efbee573..5c47064b 100644 --- a/docs/account.md +++ b/docs/account.md @@ -150,6 +150,20 @@ DELETE https://cloud.appwrite.io/v1/account/identities/{identityId} | identityId | string | **Required** Identity ID. | | +```http request +GET https://cloud.appwrite.io/v1/account/memberships +``` + +** Get the team memberships of the currently logged in user. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| 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, roles | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | + + ```http request PATCH https://cloud.appwrite.io/v1/account/mfa ``` @@ -516,7 +530,10 @@ PUT https://cloud.appwrite.io/v1/account/recovery ** 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 /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. -Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. ** +Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. + +The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + ** ### Parameters @@ -549,6 +566,8 @@ PUT https://cloud.appwrite.io/v1/account/recovery/otp ``` ** Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. + +The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. ** ### Parameters diff --git a/docs/activities.md b/docs/activities.md index cf0d0f6c..407d8a42 100644 --- a/docs/activities.md +++ b/docs/activities.md @@ -12,6 +12,7 @@ GET https://cloud.appwrite.io/v1/activities/events | Field Name | Type | Description | Default | | --- | --- | --- | --- | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request diff --git a/docs/backups.md b/docs/backups.md index 67fa160c..3687272d 100644 --- a/docs/backups.md +++ b/docs/backups.md @@ -12,6 +12,7 @@ GET https://cloud.appwrite.io/v1/backups/archives | Field Name | Type | Description | Default | | --- | --- | --- | --- | | 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. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -65,6 +66,7 @@ GET https://cloud.appwrite.io/v1/backups/policies | Field Name | Type | Description | Default | | --- | --- | --- | --- | | 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. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -165,6 +167,7 @@ GET https://cloud.appwrite.io/v1/backups/restorations | Field Name | Type | Description | Default | | --- | --- | --- | --- | | 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. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request diff --git a/docs/databases.md b/docs/databases.md index 042e19e4..ad4ab18e 100644 --- a/docs/databases.md +++ b/docs/databases.md @@ -30,6 +30,7 @@ POST https://cloud.appwrite.io/v1/databases | databaseId | 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. | | | 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 | +| description | string | Optional description for the database. | | ```http request @@ -140,6 +141,7 @@ PUT https://cloud.appwrite.io/v1/databases/{databaseId} | databaseId | string | **Required** Database ID. | | | 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 | +| description | string | Optional description for the database. | | ```http request @@ -189,6 +191,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections | 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 | | attributes | array | Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. | [] | | indexes | array | Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). | [] | +| description | string | Optional description for the collection. | | ```http request @@ -222,6 +225,7 @@ 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 | | purge | boolean | When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. | | +| description | string | Optional description for the collection. | | ```http request @@ -273,6 +277,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -294,6 +299,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -313,6 +319,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | required | boolean | Is attribute required? | | | default | boolean | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -331,6 +338,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | boolean | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -349,6 +357,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | required | boolean | Is attribute required? | | | 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? | | +| description | string | Optional description for the attribute. | | ```http request @@ -367,6 +376,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -386,6 +396,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -405,6 +416,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -425,6 +437,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -445,6 +458,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -466,6 +480,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | max | number | Maximum value. | | | default | number | Default value. Cannot be set when required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -487,6 +502,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | max | number | Maximum value. | | | default | number | Default value. Cannot be set when required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -508,6 +524,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -529,6 +546,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -548,6 +566,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | required | boolean | Is attribute required? | | | default | string | Default value. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -567,6 +586,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -584,6 +604,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | key | string | Attribute Key. | | | required | boolean | Is attribute required? | | | default | array | Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. | | +| description | string | Optional description for the attribute. | | ```http request @@ -602,6 +623,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | array | Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -622,6 +644,7 @@ 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? | | | 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. | | +| description | string | Optional description for the attribute. | | ```http request @@ -641,6 +664,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -661,6 +685,7 @@ 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? | | | 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. | | +| description | string | Optional description for the attribute. | | ```http request @@ -680,6 +705,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -697,6 +723,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | key | string | Attribute Key. | | | required | boolean | Is attribute required? | | | default | array | Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. | | +| description | string | Optional description for the attribute. | | ```http request @@ -715,6 +742,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | array | Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -732,6 +760,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | key | string | Attribute Key. | | | required | boolean | Is attribute required? | | | default | array | Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. | | +| description | string | Optional description for the attribute. | | ```http request @@ -750,6 +779,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | array | Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. | | | newKey | string | New attribute key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -771,6 +801,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | key | string | Attribute Key. | | | twoWayKey | string | Two Way Attribute Key. | | | onDelete | string | Delete constraint. Possible values are: cascade, restrict, setNull. | restrict | +| description | string | Optional description for the attribute. | | ```http request @@ -789,6 +820,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | key | string | **Required** Attribute Key. | | | onDelete | string | Delete constraint. Possible values are: cascade, restrict, setNull. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -810,6 +842,7 @@ 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? | | | 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. | | +| description | string | Optional description for the attribute. | | ```http request @@ -830,6 +863,7 @@ 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. | | | size | integer | Maximum size of the string attribute. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -850,6 +884,7 @@ 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? | | | 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. | | +| description | string | Optional description for the attribute. | | ```http request @@ -869,6 +904,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -888,6 +924,7 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | array | boolean | Is attribute an array? | | +| description | string | Optional description for the attribute. | | ```http request @@ -907,6 +944,7 @@ PATCH https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectio | required | boolean | Is attribute required? | | | default | string | Default value for attribute when not provided. Cannot be set when attribute is required. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -928,6 +966,7 @@ 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? | | | 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. | | +| description | string | Optional description for the attribute. | | ```http request @@ -948,6 +987,7 @@ 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. | | | size | integer | Maximum size of the varchar attribute. | | | newKey | string | New Attribute Key. | | +| description | string | Optional description for the attribute. | | ```http request @@ -984,7 +1024,9 @@ DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collecti GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents ``` -** Get a list of all the user's documents in a given collection. You can use the query params to filter your results. ** +** Get a list of all the user's documents in a given collection. You can use the query params to filter your results. + +Documents returned by aggregate, groupBy or distinct queries hold only the attributes they select, group or aggregate, typed as a document types them, with a joined attribute named by its join alias (`alias.attribute`). The response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` and `$collectionId` unless they select or group it, and those of a right or full join document that no document of this collection matched. SDK document models fill omitted system attributes with empty values. ** ### Parameters @@ -995,7 +1037,7 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI | 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. | [] | | transactionId | string | Transaction ID to read uncommitted changes within the transaction. | | | total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | -| ttl | integer | TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours). | 0 | +| ttl | integer | TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). | 0 | ```http request @@ -1082,6 +1124,25 @@ DELETE https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collecti | transactionId | string | Transaction ID for staging the operation. | | +```http request +POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents/query +``` + +** Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| databaseId | string | **Required** Database ID. | | +| 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. | [] | +| transactionId | string | Transaction ID to read uncommitted changes within the transaction. | | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | +| ttl | integer | TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). | 0 | + + ```http request GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} ``` @@ -1223,6 +1284,7 @@ Attributes can be `key`, `fulltext`, `unique`, `spatial`, and `trigram`. `trigra | 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. | [] | | lengths | array | Length of index. Maximum of 100 | [] | +| description | string | Optional description for the index. | | ```http request diff --git a/docs/documentsdb.md b/docs/documentsdb.md index 24756cc1..7d8bd564 100644 --- a/docs/documentsdb.md +++ b/docs/documentsdb.md @@ -29,6 +29,7 @@ POST https://cloud.appwrite.io/v1/documentsdb | databaseId | 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. | | | 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 | +| description | string | Optional description for the database. | | | specification | string | Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification. | serverless | | replicas | integer | Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0. | 0 | | syncMode | string | Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum. | | @@ -149,6 +150,7 @@ PUT https://cloud.appwrite.io/v1/documentsdb/{databaseId} | databaseId | string | **Required** Database ID. | | | 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 | +| description | string | Optional description for the database. | | | specification | string | Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize. | | | replicas | integer | Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0. | | | syncMode | string | Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum. | | @@ -201,6 +203,7 @@ POST https://cloud.appwrite.io/v1/documentsdb/{databaseId}/collections | 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 | | attributes | array | Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. | [] | | indexes | array | Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). | [] | +| description | string | Optional description for the collection. | | ```http request @@ -234,6 +237,7 @@ PUT https://cloud.appwrite.io/v1/documentsdb/{databaseId}/collections/{collectio | 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 | | purge | boolean | When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. | | +| description | string | Optional description for the collection. | | ```http request @@ -352,6 +356,25 @@ DELETE https://cloud.appwrite.io/v1/documentsdb/{databaseId}/collections/{collec | transactionId | string | Transaction ID for staging the operation. | | +```http request +POST https://cloud.appwrite.io/v1/documentsdb/{databaseId}/collections/{collectionId}/documents/query +``` + +** Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| databaseId | string | **Required** Database ID. | | +| 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. | [] | +| transactionId | string | Transaction ID to read uncommitted changes within the transaction. | | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | +| ttl | integer | TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). | 0 | + + ```http request GET https://cloud.appwrite.io/v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} ``` @@ -493,6 +516,7 @@ 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. | [] | | lengths | array | Length of index. Maximum of 100 | [] | +| description | string | Optional description for the index. | | ```http request diff --git a/docs/domains.md b/docs/domains.md index 19b339cd..5f92cad9 100644 --- a/docs/domains.md +++ b/docs/domains.md @@ -13,6 +13,7 @@ GET https://cloud.appwrite.io/v1/domains | --- | --- | --- | --- | | queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as domain name, teamInternalId, expiration, etc. | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -291,6 +292,7 @@ associated with your domain. ** | --- | --- | --- | --- | | domainId | string | **Required** Domain unique ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request diff --git a/docs/examples/account/list-memberships.md b/docs/examples/account/list-memberships.md new file mode 100644 index 00000000..59e24f0b --- /dev/null +++ b/docs/examples/account/list-memberships.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listMemberships( + queries: [], // optional + total: false // optional +); +``` diff --git a/docs/examples/activities/list-events.md b/docs/examples/activities/list-events.md index 3ffec877..8dcdc253 100644 --- a/docs/examples/activities/list-events.md +++ b/docs/examples/activities/list-events.md @@ -12,6 +12,7 @@ $client = (new Client()) $activities = new Activities($client); $result = $activities->listEvents( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md index af9f412a..41c8dfd1 100644 --- a/docs/examples/backups/list-archives.md +++ b/docs/examples/backups/list-archives.md @@ -12,6 +12,7 @@ $client = (new Client()) $backups = new Backups($client); $result = $backups->listArchives( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md index f9775cd4..508ca87e 100644 --- a/docs/examples/backups/list-policies.md +++ b/docs/examples/backups/list-policies.md @@ -12,6 +12,7 @@ $client = (new Client()) $backups = new Backups($client); $result = $backups->listPolicies( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md index a02a1cb7..1420ff61 100644 --- a/docs/examples/backups/list-restorations.md +++ b/docs/examples/backups/list-restorations.md @@ -12,6 +12,7 @@ $client = (new Client()) $backups = new Backups($client); $result = $backups->listRestorations( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/databases/create-big-int-attribute.md b/docs/examples/databases/create-big-int-attribute.md index 1384fb18..63f7e97c 100644 --- a/docs/examples/databases/create-big-int-attribute.md +++ b/docs/examples/databases/create-big-int-attribute.md @@ -19,6 +19,7 @@ $result = $databases->createBigIntAttribute( min: 0, // optional max: 1000000, // optional default: 0, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 2004cf68..aefc6563 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -17,6 +17,7 @@ $result = $databases->createBooleanAttribute( key: '', required: false, default: false, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 5adf6f56..91456fa8 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -21,6 +21,7 @@ $result = $databases->createCollection( documentSecurity: false, // optional enabled: false, // optional attributes: [], // optional - indexes: [] // optional + indexes: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index 9ff49a89..4b37b401 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -17,6 +17,7 @@ $result = $databases->createDatetimeAttribute( key: '', required: false, default: '2020-10-15T06:38:00.000+00:00', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 0a104de3..49ada74d 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -17,6 +17,7 @@ $result = $databases->createEmailAttribute( key: '', required: false, default: 'email@example.com', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index 79d22785..3d0d8cbd 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -21,6 +21,7 @@ $result = $databases->createEnumAttribute( ], required: false, default: 'active', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index 5df36f2d..979c7887 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -19,6 +19,7 @@ $result = $databases->createFloatAttribute( min: 0, // optional max: 100, // optional default: 10.5, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index 43e6f00c..e89a0417 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -22,6 +22,7 @@ $result = $databases->createIndex( 'username' ], orders: [OrderBy::ASC()], // optional - lengths: [] // optional + lengths: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index 1b9c453d..e788ff61 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -19,6 +19,7 @@ $result = $databases->createIntegerAttribute( min: 0, // optional max: 100, // optional default: 10, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index afb0ed33..c7c6a4cc 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -17,6 +17,7 @@ $result = $databases->createIpAttribute( key: '', required: false, default: '192.0.2.0', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 218cb9aa..0e14133b 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -29,6 +29,7 @@ $result = $databases->createLineAttribute( 5, 6 ] - ] // optional + ], // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 376288bb..590314c0 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -18,6 +18,7 @@ $result = $databases->createLongtextAttribute( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index 67e3da16..6389bd31 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -18,6 +18,7 @@ $result = $databases->createMediumtextAttribute( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 8512000a..39a9073c 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -19,6 +19,7 @@ $result = $databases->createPointAttribute( default: [ 1, 2 - ] // optional + ], // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index a2d99b17..c51899b1 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -35,6 +35,7 @@ $result = $databases->createPolygonAttribute( 2 ] ] - ] // optional + ], // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-query.md b/docs/examples/databases/create-query.md new file mode 100644 index 00000000..978ef09b --- /dev/null +++ b/docs/examples/databases/create-query.md @@ -0,0 +1,22 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->createQuery( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 6be34885..d5ee44f5 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -21,6 +21,7 @@ $result = $databases->createRelationshipAttribute( twoWay: false, // optional key: '', // optional twoWayKey: '', // optional - onDelete: RelationMutate::CASCADE() // optional + onDelete: RelationMutate::CASCADE(), // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index c0d93210..138dc2f7 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -19,6 +19,7 @@ $result = $databases->createStringAttribute( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 4ad0643d..f6f06244 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -18,6 +18,7 @@ $result = $databases->createTextAttribute( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index a5e837bb..ebdec5e4 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -17,6 +17,7 @@ $result = $databases->createUrlAttribute( key: '', required: false, default: 'https://example.com', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index 2bd55824..a8c6e091 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -19,6 +19,7 @@ $result = $databases->createVarcharAttribute( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 95f3cf40..d861eecf 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -14,6 +14,7 @@ $databases = new Databases($client); $result = $databases->create( databaseId: '', name: '', - enabled: false // optional + enabled: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-big-int-attribute.md b/docs/examples/databases/update-big-int-attribute.md index 41a27b10..4588d556 100644 --- a/docs/examples/databases/update-big-int-attribute.md +++ b/docs/examples/databases/update-big-int-attribute.md @@ -19,6 +19,7 @@ $result = $databases->updateBigIntAttribute( default: 0, min: 0, // optional max: 1000000, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index ed2ff661..7e1c5974 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateBooleanAttribute( key: '', required: false, default: false, - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index dc8e3522..cf240301 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -20,6 +20,7 @@ $result = $databases->updateCollection( permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false, // optional - purge: false // optional + purge: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 83e70480..a82442cc 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateDatetimeAttribute( key: '', required: false, default: '2020-10-15T06:38:00.000+00:00', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 44a4da00..c2d2e810 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateEmailAttribute( key: '', required: false, default: 'email@example.com', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 7b66ddf4..45024b49 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -21,6 +21,7 @@ $result = $databases->updateEnumAttribute( ], required: false, default: 'active', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index d5ad4a16..b282dabc 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -19,6 +19,7 @@ $result = $databases->updateFloatAttribute( default: 10.5, min: 0, // optional max: 100, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 7a51383f..a224e12b 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -19,6 +19,7 @@ $result = $databases->updateIntegerAttribute( default: 10, min: 0, // optional max: 100, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 1daf5001..53c82908 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateIpAttribute( key: '', required: false, default: '192.0.2.0', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index c8e30f7a..82e893f4 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -30,6 +30,7 @@ $result = $databases->updateLineAttribute( 6 ] ], // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index 06e0ef98..2b49d04e 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateLongtextAttribute( key: '', required: false, default: 'Hello World', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index e08925a7..0598b3d7 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateMediumtextAttribute( key: '', required: false, default: 'Hello World', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index febd27d9..856b75cd 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -20,6 +20,7 @@ $result = $databases->updatePointAttribute( 1, 2 ], // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index 2dd7dbe4..1fe55526 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -36,6 +36,7 @@ $result = $databases->updatePolygonAttribute( ] ] ], // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index d1264dfb..43cc789e 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateRelationshipAttribute( collectionId: '', key: '', onDelete: RelationMutate::CASCADE(), // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 656401df..542b0dae 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -18,6 +18,7 @@ $result = $databases->updateStringAttribute( required: false, default: 'Hello World', size: 1, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index 61bf96f0..505de109 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateTextAttribute( key: '', required: false, default: 'Hello World', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index 9ab77063..f6345504 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -17,6 +17,7 @@ $result = $databases->updateUrlAttribute( key: '', required: false, default: 'https://example.com', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index 73b2b7d5..777735e7 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -18,6 +18,7 @@ $result = $databases->updateVarcharAttribute( required: false, default: 'Hello World', size: 1, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index bd56abc6..210dcbfa 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -14,6 +14,7 @@ $databases = new Databases($client); $result = $databases->update( databaseId: '', name: '', // optional - enabled: false // optional + enabled: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/documentsdb/create-collection.md b/docs/examples/documentsdb/create-collection.md index b149a152..0d884c98 100644 --- a/docs/examples/documentsdb/create-collection.md +++ b/docs/examples/documentsdb/create-collection.md @@ -21,6 +21,7 @@ $result = $documentsDB->createCollection( documentSecurity: false, // optional enabled: false, // optional attributes: [], // optional - indexes: [] // optional + indexes: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/documentsdb/create-index.md b/docs/examples/documentsdb/create-index.md index a84d75cf..5620dddd 100644 --- a/docs/examples/documentsdb/create-index.md +++ b/docs/examples/documentsdb/create-index.md @@ -22,6 +22,7 @@ $result = $documentsDB->createIndex( 'username' ], orders: [OrderBy::ASC()], // optional - lengths: [] // optional + lengths: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/documentsdb/create-query.md b/docs/examples/documentsdb/create-query.md new file mode 100644 index 00000000..af622229 --- /dev/null +++ b/docs/examples/documentsdb/create-query.md @@ -0,0 +1,22 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createQuery( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/docs/examples/documentsdb/create.md b/docs/examples/documentsdb/create.md index a82f793b..674e1046 100644 --- a/docs/examples/documentsdb/create.md +++ b/docs/examples/documentsdb/create.md @@ -15,6 +15,7 @@ $result = $documentsDB->create( databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async' // optional diff --git a/docs/examples/documentsdb/update-collection.md b/docs/examples/documentsdb/update-collection.md index a160bac0..3b45d7f3 100644 --- a/docs/examples/documentsdb/update-collection.md +++ b/docs/examples/documentsdb/update-collection.md @@ -20,6 +20,7 @@ $result = $documentsDB->updateCollection( permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false, // optional - purge: false // optional + purge: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/documentsdb/update.md b/docs/examples/documentsdb/update.md index d9caf5bb..e3b1b362 100644 --- a/docs/examples/documentsdb/update.md +++ b/docs/examples/documentsdb/update.md @@ -15,6 +15,7 @@ $result = $documentsDB->update( databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async' // optional diff --git a/docs/examples/domains/list-records.md b/docs/examples/domains/list-records.md index 19d29a93..09c05cf8 100644 --- a/docs/examples/domains/list-records.md +++ b/docs/examples/domains/list-records.md @@ -13,6 +13,7 @@ $domains = new Domains($client); $result = $domains->listRecords( domainId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/domains/list.md b/docs/examples/domains/list.md index dcce2187..0f993a95 100644 --- a/docs/examples/domains/list.md +++ b/docs/examples/domains/list.md @@ -13,6 +13,7 @@ $domains = new Domains($client); $result = $domains->list( queries: [], // optional - search: '' // optional + search: '', // optional + total: false // optional ); ``` diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index 206ac80b..9a01b21c 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -16,6 +16,7 @@ $result = $functions->createVariable( variableId: '', key: '', value: '', - secret: false // optional + secret: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 593af4a0..b0dc5ce6 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -38,6 +38,7 @@ $result = $functions->create( buildSpecification: 's-1vcpu-512mb', // optional runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional - interval: 0 // optional + interval: 0, // optional + description: '' // optional ); ``` diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index a60cea5e..dd75f2e9 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -16,6 +16,7 @@ $result = $functions->updateVariable( variableId: '', key: '', // optional value: '', // optional - secret: false // optional + secret: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index 723692eb..cd158392 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -39,6 +39,7 @@ $result = $functions->update( runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional interval: 0, // optional + description: '', // optional emailEnabled: false // optional ); ``` diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index b20e6784..c49955b3 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -25,6 +25,7 @@ $result = $messaging->createEmail( html: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional replyToEmail: 'email@example.com', // optional - replyToName: '' // optional + replyToName: '', // optional + emails: [] // optional ); ``` diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 4fc8933d..bf65a559 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -18,6 +18,7 @@ $result = $messaging->createTopic( 'any' ], // optional qos: 0, // optional - expiry: 0 // optional + expiry: 0, // optional + description: '' // optional ); ``` diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 8f24271c..8ae9cba1 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -25,6 +25,7 @@ $result = $messaging->updateEmail( scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional attachments: [], // optional replyToEmail: 'email@example.com', // optional - replyToName: '' // optional + replyToName: '', // optional + emails: [] // optional ); ``` diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index 607785c3..09ea7997 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -18,6 +18,7 @@ $result = $messaging->updateTopic( 'any' ], // optional qos: 0, // optional - expiry: 0 // optional + expiry: 0, // optional + description: '' // optional ); ``` diff --git a/docs/examples/mongo/list-backup-policies.md b/docs/examples/mongo/list-backup-policies.md index 84922f68..b5b03dc5 100644 --- a/docs/examples/mongo/list-backup-policies.md +++ b/docs/examples/mongo/list-backup-policies.md @@ -13,6 +13,7 @@ $mongo = new Mongo($client); $result = $mongo->listBackupPolicies( databaseId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/mongo/list-backups.md b/docs/examples/mongo/list-backups.md index d712d12a..c33ac837 100644 --- a/docs/examples/mongo/list-backups.md +++ b/docs/examples/mongo/list-backups.md @@ -13,6 +13,7 @@ $mongo = new Mongo($client); $result = $mongo->listBackups( databaseId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/mongo/list.md b/docs/examples/mongo/list.md index d9f3f9a2..a297d7e5 100644 --- a/docs/examples/mongo/list.md +++ b/docs/examples/mongo/list.md @@ -12,6 +12,7 @@ $client = (new Client()) $mongo = new Mongo($client); $result = $mongo->list( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/mysql/list-backup-policies.md b/docs/examples/mysql/list-backup-policies.md index 5586d5ab..2e8c244f 100644 --- a/docs/examples/mysql/list-backup-policies.md +++ b/docs/examples/mysql/list-backup-policies.md @@ -13,6 +13,7 @@ $mysql = new Mysql($client); $result = $mysql->listBackupPolicies( databaseId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/mysql/list-backups.md b/docs/examples/mysql/list-backups.md index 1604dc86..620299d4 100644 --- a/docs/examples/mysql/list-backups.md +++ b/docs/examples/mysql/list-backups.md @@ -13,6 +13,7 @@ $mysql = new Mysql($client); $result = $mysql->listBackups( databaseId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/mysql/list.md b/docs/examples/mysql/list.md index a038ae93..c9efebfd 100644 --- a/docs/examples/mysql/list.md +++ b/docs/examples/mysql/list.md @@ -12,6 +12,7 @@ $client = (new Client()) $mysql = new Mysql($client); $result = $mysql->list( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/organization/update-project-key.md b/docs/examples/organization/update-project-key.md index b40f14e1..6a35c6ae 100644 --- a/docs/examples/organization/update-project-key.md +++ b/docs/examples/organization/update-project-key.md @@ -17,6 +17,7 @@ $result = $organization->updateProjectKey( keyId: '', name: '', scopes: [ProjectKeyScopes::USERSREAD()], - expire: '2020-10-15T06:38:00.000+00:00' // optional + expire: '2020-10-15T06:38:00.000+00:00', // optional + description: '' // optional ); ``` diff --git a/docs/examples/postgresql/list-backup-policies.md b/docs/examples/postgresql/list-backup-policies.md index aff3883b..42dd7b70 100644 --- a/docs/examples/postgresql/list-backup-policies.md +++ b/docs/examples/postgresql/list-backup-policies.md @@ -13,6 +13,7 @@ $postgresql = new Postgresql($client); $result = $postgresql->listBackupPolicies( databaseId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/postgresql/list-backups.md b/docs/examples/postgresql/list-backups.md index 7aa15449..5ff3e434 100644 --- a/docs/examples/postgresql/list-backups.md +++ b/docs/examples/postgresql/list-backups.md @@ -13,6 +13,7 @@ $postgresql = new Postgresql($client); $result = $postgresql->listBackups( databaseId: '', - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/postgresql/list.md b/docs/examples/postgresql/list.md index 090939e3..55b39dbc 100644 --- a/docs/examples/postgresql/list.md +++ b/docs/examples/postgresql/list.md @@ -12,6 +12,7 @@ $client = (new Client()) $postgresql = new Postgresql($client); $result = $postgresql->list( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/docs/examples/project/create-variable.md b/docs/examples/project/create-variable.md index 1bf09c49..a2ac9365 100644 --- a/docs/examples/project/create-variable.md +++ b/docs/examples/project/create-variable.md @@ -15,6 +15,7 @@ $result = $project->createVariable( variableId: '', key: '', value: '', - secret: false // optional + secret: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/project/update-key.md b/docs/examples/project/update-key.md index ae2996b7..7fbfe6d3 100644 --- a/docs/examples/project/update-key.md +++ b/docs/examples/project/update-key.md @@ -16,6 +16,7 @@ $result = $project->updateKey( keyId: '', name: '', scopes: [ProjectKeyScopes::USERSREAD()], - expire: '2020-10-15T06:38:00.000+00:00' // optional + expire: '2020-10-15T06:38:00.000+00:00', // optional + description: '' // optional ); ``` diff --git a/docs/examples/project/update-password-dictionary-policy.md b/docs/examples/project/update-password-dictionary-policy.md index 5a8da06f..88f0a96a 100644 --- a/docs/examples/project/update-password-dictionary-policy.md +++ b/docs/examples/project/update-password-dictionary-policy.md @@ -12,6 +12,7 @@ $client = (new Client()) $project = new Project($client); $result = $project->updatePasswordDictionaryPolicy( - enabled: false + enabled: false, + denyList: [] // optional ); ``` diff --git a/docs/examples/project/update-password-personal-data-policy.md b/docs/examples/project/update-password-personal-data-policy.md index 70cc79d1..ef714de5 100644 --- a/docs/examples/project/update-password-personal-data-policy.md +++ b/docs/examples/project/update-password-personal-data-policy.md @@ -12,6 +12,7 @@ $client = (new Client()) $project = new Project($client); $result = $project->updatePasswordPersonalDataPolicy( - enabled: false + enabled: false, + denyList: [] // optional ); ``` diff --git a/docs/examples/project/update-variable.md b/docs/examples/project/update-variable.md index 63246789..6f4de176 100644 --- a/docs/examples/project/update-variable.md +++ b/docs/examples/project/update-variable.md @@ -15,6 +15,7 @@ $result = $project->updateVariable( variableId: '', key: '', // optional value: '', // optional - secret: false // optional + secret: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index ea1baabd..9ffe4f8f 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -16,6 +16,7 @@ $result = $sites->createVariable( variableId: '', key: '', value: '', - secret: false // optional + secret: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index d25a024f..a2508bff 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -39,6 +39,7 @@ $result = $sites->create( buildSpecification: 's-1vcpu-512mb', // optional runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional - scopes: [ProjectKeyScopes::PROJECTREAD()] // optional + scopes: [ProjectKeyScopes::PROJECTREAD()], // optional + description: '' // optional ); ``` diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index b1bc3600..86e12fc0 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -16,6 +16,7 @@ $result = $sites->updateVariable( variableId: '', key: '', // optional value: '', // optional - secret: false // optional + secret: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index 16b51713..3689e51c 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -39,6 +39,7 @@ $result = $sites->update( buildSpecification: 's-1vcpu-512mb', // optional runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional - scopes: [ProjectKeyScopes::PROJECTREAD()] // optional + scopes: [ProjectKeyScopes::PROJECTREAD()], // optional + description: '' // optional ); ``` diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index df878841..97d18f3c 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -25,6 +25,8 @@ $result = $storage->createBucket( compression: Compression::NONE(), // optional encryption: false, // optional antivirus: false, // optional - transformations: false // optional + transformations: false, // optional + description: '', // optional + stripMetadata: false // optional ); ``` diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index 5557ce89..5a632efa 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -25,6 +25,8 @@ $result = $storage->updateBucket( compression: Compression::NONE(), // optional encryption: false, // optional antivirus: false, // optional - transformations: false // optional + transformations: false, // optional + description: '', // optional + stripMetadata: false // optional ); ``` diff --git a/docs/examples/tablesdb/create-big-int-column.md b/docs/examples/tablesdb/create-big-int-column.md index 0ada6f92..3fae211c 100644 --- a/docs/examples/tablesdb/create-big-int-column.md +++ b/docs/examples/tablesdb/create-big-int-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->createBigIntColumn( min: 0, // optional max: 1000000, // optional default: 0, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index f73001e7..fbb6ce77 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->createBooleanColumn( key: '', required: false, default: false, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index d05fad4a..41b5f79c 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->createDatetimeColumn( key: '', required: false, default: '2020-10-15T06:38:00.000+00:00', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 6a23e2a8..7e975039 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->createEmailColumn( key: '', required: false, default: 'email@example.com', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index ba0f5ec0..f64c79c9 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -21,6 +21,7 @@ $result = $tablesDB->createEnumColumn( ], required: false, default: 'active', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index 9b194fc3..f4705a6d 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->createFloatColumn( min: 0, // optional max: 100, // optional default: 10.5, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 29327378..35eeb2f6 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -22,6 +22,7 @@ $result = $tablesDB->createIndex( 'username' ], orders: [OrderBy::ASC()], // optional - lengths: [] // optional + lengths: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index f1fa5219..38476087 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->createIntegerColumn( min: 0, // optional max: 100, // optional default: 10, // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index 2d710391..2ba4bbe5 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->createIpColumn( key: '', required: false, default: '192.0.2.0', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index d3ed71e8..273a15c7 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -29,6 +29,7 @@ $result = $tablesDB->createLineColumn( 5, 6 ] - ] // optional + ], // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 8d853305..f8caf319 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -18,6 +18,7 @@ $result = $tablesDB->createLongtextColumn( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index 8da9475c..e529d556 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -18,6 +18,7 @@ $result = $tablesDB->createMediumtextColumn( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 47deb73b..cf0797e2 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->createPointColumn( default: [ 1, 2 - ] // optional + ], // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 66baac48..4a2bcf08 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -35,6 +35,7 @@ $result = $tablesDB->createPolygonColumn( 2 ] ] - ] // optional + ], // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-query.md b/docs/examples/tablesdb/create-query.md new file mode 100644 index 00000000..106b267a --- /dev/null +++ b/docs/examples/tablesdb/create-query.md @@ -0,0 +1,22 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tablesDB = new TablesDB($client); + +$result = $tablesDB->createQuery( + databaseId: '', + tableId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +); +``` diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index a7ddabc2..9b644b2e 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -21,6 +21,7 @@ $result = $tablesDB->createRelationshipColumn( twoWay: false, // optional key: '', // optional twoWayKey: '', // optional - onDelete: RelationMutate::CASCADE() // optional + onDelete: RelationMutate::CASCADE(), // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index a5f1d5c9..92d5264e 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->createStringColumn( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index e4d281b4..ea04751f 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -21,6 +21,7 @@ $result = $tablesDB->createTable( rowSecurity: false, // optional enabled: false, // optional columns: [], // optional - indexes: [] // optional + indexes: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index b729dc5b..8e371598 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -18,6 +18,7 @@ $result = $tablesDB->createTextColumn( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index 9c3b89a5..77d90c87 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->createUrlColumn( key: '', required: false, default: 'https://example.com', // optional - array: false // optional + array: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 6afddbf8..770ee856 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->createVarcharColumn( required: false, default: 'Hello World', // optional array: false, // optional - encrypt: false // optional + encrypt: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index e0f7503f..c9d48faf 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -15,6 +15,7 @@ $result = $tablesDB->create( databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async' // optional diff --git a/docs/examples/tablesdb/update-big-int-column.md b/docs/examples/tablesdb/update-big-int-column.md index e1e1aeb4..6d55cefd 100644 --- a/docs/examples/tablesdb/update-big-int-column.md +++ b/docs/examples/tablesdb/update-big-int-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->updateBigIntColumn( default: 0, min: 0, // optional max: 1000000, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index a95d7956..c38bf74b 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateBooleanColumn( key: '', required: false, default: false, - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index c9c6de41..9b0b64f3 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateDatetimeColumn( key: '', required: false, default: '2020-10-15T06:38:00.000+00:00', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index 8cc04288..884555fb 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateEmailColumn( key: '', required: false, default: 'email@example.com', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index fc3bff58..4c91c166 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -21,6 +21,7 @@ $result = $tablesDB->updateEnumColumn( ], required: false, default: 'active', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 9ab8b205..660cf3a8 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->updateFloatColumn( default: 10.5, min: 0, // optional max: 100, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 1de8db17..292ef9ca 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -19,6 +19,7 @@ $result = $tablesDB->updateIntegerColumn( default: 10, min: 0, // optional max: 100, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index f742db24..794600a2 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateIpColumn( key: '', required: false, default: '192.0.2.0', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index 55665a78..69647114 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -30,6 +30,7 @@ $result = $tablesDB->updateLineColumn( 6 ] ], // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index e8746ebc..ce7bf0e4 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateLongtextColumn( key: '', required: false, default: 'Hello World', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index 45d60e4a..a05f1fd2 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateMediumtextColumn( key: '', required: false, default: 'Hello World', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index a76649a7..10716864 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -20,6 +20,7 @@ $result = $tablesDB->updatePointColumn( 1, 2 ], // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 86d67b81..7d95a56d 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -36,6 +36,7 @@ $result = $tablesDB->updatePolygonColumn( ] ] ], // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index f3e4e705..a413ffa4 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateRelationshipColumn( tableId: '', key: '', onDelete: RelationMutate::CASCADE(), // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index b1a7c857..98fef642 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -18,6 +18,7 @@ $result = $tablesDB->updateStringColumn( required: false, default: 'Hello World', size: 1, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index 1881d2e2..720e4e3c 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -20,6 +20,7 @@ $result = $tablesDB->updateTable( permissions: [Permission::read(Role::any())], // optional rowSecurity: false, // optional enabled: false, // optional - purge: false // optional + purge: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index df1fea57..e7558a1b 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateTextColumn( key: '', required: false, default: 'Hello World', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index d674819e..d102adab 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -17,6 +17,7 @@ $result = $tablesDB->updateUrlColumn( key: '', required: false, default: 'https://example.com', - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index c6e46c7b..55a5991e 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -18,6 +18,7 @@ $result = $tablesDB->updateVarcharColumn( required: false, default: 'Hello World', size: 1, // optional - newKey: '' // optional + newKey: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 24d46560..b9698411 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -15,6 +15,7 @@ $result = $tablesDB->update( databaseId: '', name: '', // optional enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async' // optional diff --git a/docs/examples/vectorsdb/create-collection.md b/docs/examples/vectorsdb/create-collection.md index 3bbdb076..c4dc5451 100644 --- a/docs/examples/vectorsdb/create-collection.md +++ b/docs/examples/vectorsdb/create-collection.md @@ -20,6 +20,7 @@ $result = $vectorsDB->createCollection( dimension: 4, permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional - enabled: false // optional + enabled: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/vectorsdb/create-index.md b/docs/examples/vectorsdb/create-index.md index 4883ccb8..8856826f 100644 --- a/docs/examples/vectorsdb/create-index.md +++ b/docs/examples/vectorsdb/create-index.md @@ -22,6 +22,7 @@ $result = $vectorsDB->createIndex( 'embeddings' ], orders: [OrderBy::ASC()], // optional - lengths: [] // optional + lengths: [], // optional + description: '' // optional ); ``` diff --git a/docs/examples/vectorsdb/create.md b/docs/examples/vectorsdb/create.md index e554bee6..4f9284ab 100644 --- a/docs/examples/vectorsdb/create.md +++ b/docs/examples/vectorsdb/create.md @@ -15,6 +15,7 @@ $result = $vectorsDB->create( databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async' // optional diff --git a/docs/examples/vectorsdb/update-collection.md b/docs/examples/vectorsdb/update-collection.md index d9815b61..b248deec 100644 --- a/docs/examples/vectorsdb/update-collection.md +++ b/docs/examples/vectorsdb/update-collection.md @@ -20,6 +20,7 @@ $result = $vectorsDB->updateCollection( dimension: 4, // optional permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional - enabled: false // optional + enabled: false, // optional + description: '' // optional ); ``` diff --git a/docs/examples/vectorsdb/update.md b/docs/examples/vectorsdb/update.md index 977ef103..2d668b0e 100644 --- a/docs/examples/vectorsdb/update.md +++ b/docs/examples/vectorsdb/update.md @@ -15,6 +15,7 @@ $result = $vectorsDB->update( databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async' // optional diff --git a/docs/examples/webhooks/create.md b/docs/examples/webhooks/create.md index 1e0ae9f9..ce9961bd 100644 --- a/docs/examples/webhooks/create.md +++ b/docs/examples/webhooks/create.md @@ -22,6 +22,7 @@ $result = $webhooks->create( tls: false, // optional authUsername: '', // optional authPassword: 'password', // optional - secret: '' // optional + secret: '', // optional + description: '' // optional ); ``` diff --git a/docs/examples/webhooks/update.md b/docs/examples/webhooks/update.md index 104a58b1..a02714fd 100644 --- a/docs/examples/webhooks/update.md +++ b/docs/examples/webhooks/update.md @@ -21,6 +21,7 @@ $result = $webhooks->update( enabled: false, // optional tls: false, // optional authUsername: '', // optional - authPassword: 'password' // optional + authPassword: 'password', // optional + description: '' // optional ); ``` diff --git a/docs/functions.md b/docs/functions.md index 5cddf805..d6d00509 100644 --- a/docs/functions.md +++ b/docs/functions.md @@ -49,6 +49,7 @@ POST https://cloud.appwrite.io/v1/functions | runtimeSpecification | string | Runtime specification for the function executions. | [] | | deploymentRetention | integer | Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. | 0 | | interval | integer | Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. | 0 | +| description | string | Optional description for the function. | | ```http request @@ -124,6 +125,7 @@ PUT https://cloud.appwrite.io/v1/functions/{functionId} | runtimeSpecification | string | Runtime specification for the function executions. | | | deploymentRetention | integer | Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. | 0 | | interval | integer | Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set. | | +| description | string | Optional description for the function. | | | emailEnabled | boolean | Enable inbound email triggering for this function. When false or omitted on create, SMTP recipients are rejected. Opt-in; default is off. | | @@ -395,6 +397,7 @@ POST https://cloud.appwrite.io/v1/functions/{functionId}/variables | key | string | Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | | secret | boolean | Secret variables can be updated or deleted, but only functions can read them during build and runtime. | 1 | +| description | string | Optional description for the variable. | | ```http request @@ -426,6 +429,7 @@ PUT https://cloud.appwrite.io/v1/functions/{functionId}/variables/{variableId} | key | string | Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | | secret | boolean | Secret variables can be updated or deleted, but only functions can read them during build and runtime. | | +| description | string | Optional description for the variable. | | ```http request diff --git a/docs/messaging.md b/docs/messaging.md index 5dbed35d..da918a79 100644 --- a/docs/messaging.md +++ b/docs/messaging.md @@ -40,6 +40,7 @@ POST https://cloud.appwrite.io/v1/messaging/messages/email | 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. | | | replyToEmail | string | Email address to reply to. If not set, defaults to the sender email address. | | | replyToName | string | Name of the reply to recipient. If not set, defaults to the sender name. | | +| emails | array | List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. | [] | ```http request @@ -67,6 +68,7 @@ PATCH https://cloud.appwrite.io/v1/messaging/messages/email/{messageId} | attachments | array | Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :. | | | replyToEmail | string | Email address to reply to. Pass an empty string to restore the provider or sender default. | | | replyToName | string | Name of the reply to recipient. Pass an empty string to restore the provider or sender default. | | +| emails | array | List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. | | ```http request @@ -956,6 +958,7 @@ POST https://cloud.appwrite.io/v1/messaging/topics | 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"] | | qos | integer | MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose. | | | expiry | integer | Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. | | +| description | string | Optional description for the topic. | | ```http request @@ -988,6 +991,7 @@ PATCH https://cloud.appwrite.io/v1/messaging/topics/{topicId} | 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. | | | qos | integer | MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose. | | | expiry | integer | Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. | | +| description | string | Optional description for the topic. | | ```http request diff --git a/docs/mongo.md b/docs/mongo.md index 1eaebc24..68d09edd 100644 --- a/docs/mongo.md +++ b/docs/mongo.md @@ -12,6 +12,7 @@ GET https://cloud.appwrite.io/v1/mongo | Field Name | Type | Description | Default | | --- | --- | --- | --- | | queries | array | Array of query strings. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -118,6 +119,7 @@ GET https://cloud.appwrite.io/v1/mongo/{databaseId}/backups | --- | --- | --- | --- | | databaseId | string | **Required** Database 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: status, type, databaseId | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -146,6 +148,7 @@ GET https://cloud.appwrite.io/v1/mongo/{databaseId}/backups/policies | --- | --- | --- | --- | | databaseId | string | **Required** Database ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request diff --git a/docs/mysql.md b/docs/mysql.md index e4444440..21626519 100644 --- a/docs/mysql.md +++ b/docs/mysql.md @@ -12,6 +12,7 @@ GET https://cloud.appwrite.io/v1/mysql | Field Name | Type | Description | Default | | --- | --- | --- | --- | | queries | array | Array of query strings. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -118,6 +119,7 @@ GET https://cloud.appwrite.io/v1/mysql/{databaseId}/backups | --- | --- | --- | --- | | databaseId | string | **Required** Database 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: status, type, databaseId | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -146,6 +148,7 @@ GET https://cloud.appwrite.io/v1/mysql/{databaseId}/backups/policies | --- | --- | --- | --- | | databaseId | string | **Required** Database ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request diff --git a/docs/organization.md b/docs/organization.md index 350a7d14..33a574c0 100644 --- a/docs/organization.md +++ b/docs/organization.md @@ -300,6 +300,7 @@ PUT https://cloud.appwrite.io/v1/organization/projects/{projectId}/keys/{keyId} | name | string | Key name. Max length: 128 chars. | | | scopes | array | Key scopes list. Maximum of 200 scopes are allowed. | | | expire | string | Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. | | +| description | string | Optional description for the key. | | ```http request diff --git a/docs/postgresql.md b/docs/postgresql.md index 90c8ceb0..4f664a84 100644 --- a/docs/postgresql.md +++ b/docs/postgresql.md @@ -12,6 +12,7 @@ GET https://cloud.appwrite.io/v1/postgresql | Field Name | Type | Description | Default | | --- | --- | --- | --- | | queries | array | Array of query strings. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -118,6 +119,7 @@ GET https://cloud.appwrite.io/v1/postgresql/{databaseId}/backups | --- | --- | --- | --- | | databaseId | string | **Required** Database 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: status, type, databaseId | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request @@ -146,6 +148,7 @@ GET https://cloud.appwrite.io/v1/postgresql/{databaseId}/backups/policies | --- | --- | --- | --- | | databaseId | string | **Required** Database ID. | | | queries | array | Array of query strings generated using the Query class provided by the SDK. | [] | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | ```http request diff --git a/docs/project.md b/docs/project.md index df5337f8..c48b92f5 100644 --- a/docs/project.md +++ b/docs/project.md @@ -154,6 +154,7 @@ PUT https://cloud.appwrite.io/v1/project/keys/{keyId} | name | string | Key name. Max length: 128 chars. | | | scopes | array | Key scopes list. Maximum of 200 scopes are allowed. | | | expire | string | Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. | | +| description | string | Optional description for the key. | | ```http request @@ -1379,13 +1380,16 @@ PATCH https://cloud.appwrite.io/v1/project/policies/passkey PATCH https://cloud.appwrite.io/v1/project/policies/password-dictionary ``` -** Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary. ** +** Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary. + +Custom denyList entries use case-sensitive equality and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. ** ### Parameters | Field Name | Type | Description | Default | | --- | --- | --- | --- | | enabled | boolean | Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid. | | +| denyList | array | Custom blocked values using case-sensitive equality. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. | | ```http request @@ -1407,13 +1411,17 @@ Keep in mind, while password history policy is disabled, the history is not bein PATCH https://cloud.appwrite.io/v1/project/policies/password-personal-data ``` -** Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number. ** +** Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number. + +Custom denyList entries use case-insensitive substring matching and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. +Password recovery also checks the recovered user profile, closing the previous gap in profile-based personal-data validation. ** ### Parameters | Field Name | Type | Description | Default | | --- | --- | --- | --- | | enabled | boolean | Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid. | | +| denyList | array | Custom blocked values using case-insensitive substring matching. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. | | ```http request @@ -1679,6 +1687,7 @@ POST https://cloud.appwrite.io/v1/project/variables | key | string | Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | | secret | boolean | Secret variables can be updated or deleted, but only projects can read them during build and runtime. | 1 | +| description | string | Optional description for the variable. | | ```http request @@ -1708,6 +1717,7 @@ PUT https://cloud.appwrite.io/v1/project/variables/{variableId} | key | string | Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | | secret | boolean | Secret variables can be updated or deleted, but only projects can read them during build and runtime. | | +| description | string | Optional description for the variable. | | ```http request diff --git a/docs/sites.md b/docs/sites.md index 061d1519..29d7861b 100644 --- a/docs/sites.md +++ b/docs/sites.md @@ -50,6 +50,7 @@ POST https://cloud.appwrite.io/v1/sites | runtimeSpecification | string | Runtime specification for the SSR executions. | [] | | deploymentRetention | integer | Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. | 0 | | scopes | array | List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. | [] | +| description | string | Optional description for the site. | | ```http request @@ -126,6 +127,7 @@ PUT https://cloud.appwrite.io/v1/sites/{siteId} | runtimeSpecification | string | Runtime specification for the SSR executions. | [] | | deploymentRetention | integer | Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. | 0 | | scopes | array | List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. | | +| description | string | Optional description for the site. | | ```http request @@ -373,6 +375,7 @@ POST https://cloud.appwrite.io/v1/sites/{siteId}/variables | key | string | Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | | secret | boolean | Secret variables can be updated or deleted, but only sites can read them during build and runtime. | 1 | +| description | string | Optional description for the variable. | | ```http request @@ -404,6 +407,7 @@ PUT https://cloud.appwrite.io/v1/sites/{siteId}/variables/{variableId} | key | string | Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. | | | value | string | Variable value. Max length: 8192 chars. | | | secret | boolean | Secret variables can be updated or deleted, but only sites can read them during build and runtime. | | +| description | string | Optional description for the variable. | | ```http request diff --git a/docs/storage.md b/docs/storage.md index e24fa98a..19f1af4d 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -11,7 +11,7 @@ GET https://cloud.appwrite.io/v1/storage/buckets | Field Name | Type | Description | Default | | --- | --- | --- | --- | -| 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, transformations | [] | +| 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, transformations, stripMetadata | [] | | search | string | Search term to filter your list results. Max length: 256 chars. | | | total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | @@ -37,6 +37,8 @@ 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 | | transformations | boolean | Are image transformations enabled? | 1 | +| description | string | Optional description for the bucket. | | +| stripMetadata | boolean | Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. | | ```http request @@ -73,6 +75,8 @@ 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 | | transformations | boolean | Are image transformations enabled? | 1 | +| description | string | Optional description for the bucket. | | +| stripMetadata | boolean | Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. By default, the current setting is kept. | | ```http request diff --git a/docs/tablesdb.md b/docs/tablesdb.md index 61642ce3..1b21cee1 100644 --- a/docs/tablesdb.md +++ b/docs/tablesdb.md @@ -30,6 +30,7 @@ POST https://cloud.appwrite.io/v1/tablesdb | databaseId | 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. | | | 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 | +| description | string | Optional description for the database. | | | specification | string | Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification. | serverless | | replicas | integer | Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0. | 0 | | syncMode | string | Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum. | | @@ -150,6 +151,7 @@ PUT https://cloud.appwrite.io/v1/tablesdb/{databaseId} | databaseId | string | **Required** Database ID. | | | 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 | +| description | string | Optional description for the database. | | | specification | string | Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize. | | | replicas | integer | Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0. | | | syncMode | string | Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum. | | @@ -328,6 +330,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables | enabled | boolean | Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. | 1 | | columns | array | Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. | [] | | indexes | array | Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). | [] | +| description | string | Optional description for the table. | | ```http request @@ -361,6 +364,7 @@ PUT https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId} | rowSecurity | boolean | Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | enabled | boolean | Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. | 1 | | purge | boolean | When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. | | +| description | string | Optional description for the table. | | ```http request @@ -412,6 +416,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -433,6 +438,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -452,6 +458,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | required | boolean | Is column required? | | | default | boolean | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -470,6 +477,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | boolean | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -488,6 +496,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | required | boolean | Is column required? | | | default | string | Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -506,6 +515,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -525,6 +535,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -544,6 +555,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -563,6 +575,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -583,6 +596,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -604,6 +618,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | max | number | Maximum value | | | default | number | Default value. Cannot be set when required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -625,6 +640,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | max | number | Maximum value | | | default | number | Default value. Cannot be set when required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -646,6 +662,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -667,6 +684,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | max | integer | Maximum value | | | default | integer | Default value. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -686,6 +704,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | required | boolean | Is column required? | | | default | string | Default value. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -705,6 +724,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -722,6 +742,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | key | string | Column Key. | | | required | boolean | Is column required? | | | default | array | Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. | | +| description | string | Optional description for the column. | | ```http request @@ -740,6 +761,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | array | Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -760,6 +782,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | | encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | | +| description | string | Optional description for the column. | | ```http request @@ -779,6 +802,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -799,6 +823,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | | encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | | +| description | string | Optional description for the column. | | ```http request @@ -818,6 +843,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -835,6 +861,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | key | string | Column Key. | | | required | boolean | Is column required? | | | default | array | Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. | | +| description | string | Optional description for the column. | | ```http request @@ -853,6 +880,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | array | Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -870,6 +898,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | key | string | Column Key. | | | required | boolean | Is column required? | | | default | array | Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. | | +| description | string | Optional description for the column. | | ```http request @@ -888,6 +917,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | array | Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -909,6 +939,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | key | string | Column Key. | | | twoWayKey | string | Two Way Column Key. | | | onDelete | string | Delete constraint. Possible values are: cascade, restrict, setNull. | restrict | +| description | string | Optional description for the column. | | ```http request @@ -927,6 +958,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | key | string | **Required** Column Key. | | | onDelete | string | Delete constraint. Possible values are: cascade, restrict, setNull. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -948,6 +980,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | | encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | | +| description | string | Optional description for the column. | | ```http request @@ -968,6 +1001,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | default | string | Default value for column when not provided. Cannot be set when column is required. | | | size | integer | Maximum size of the string column. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -988,6 +1022,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | | encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | | +| description | string | Optional description for the column. | | ```http request @@ -1007,6 +1042,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -1026,6 +1062,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | +| description | string | Optional description for the column. | | ```http request @@ -1045,6 +1082,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | required | boolean | Is column required? | | | default | string | Default value for column when not provided. Cannot be set when column is required. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -1066,6 +1104,7 @@ POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/columns | default | string | Default value for column when not provided. Cannot be set when column is required. | | | array | boolean | Is column an array? | | | encrypt | boolean | Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. | | +| description | string | Optional description for the column. | | ```http request @@ -1086,6 +1125,7 @@ PATCH https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/column | default | string | Default value for column when not provided. Cannot be set when column is required. | | | size | integer | Maximum size of the varchar column. | | | newKey | string | New Column Key. | | +| description | string | Optional description for the column. | | ```http request @@ -1152,6 +1192,7 @@ Type can be `key`, `fulltext`, `unique`, `spatial`, or `trigram`. `trigram` is o | columns | array | Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. | | | orders | array | Array of index orders. Maximum of 100 orders are allowed. | [] | | lengths | array | Length of index. Maximum of 100 | [] | +| description | string | Optional description for the index. | | ```http request @@ -1188,7 +1229,9 @@ DELETE https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/index GET https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/rows ``` -** Get a list of all the user's rows in a given table. You can use the query params to filter your results. ** +** Get a list of all the user's rows in a given table. You can use the query params to filter your results. + +Rows returned by aggregate, groupBy or distinct queries hold only the columns they select, group or aggregate, typed as a row types them, with a joined column named by its join alias (`alias.column`). The response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` and `$tableId` unless they select or group it, and those of a right or full join row that no row of this table matched. SDK row models fill omitted system columns with empty values. ** ### Parameters @@ -1199,7 +1242,7 @@ GET https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/rows | 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. | [] | | transactionId | string | Transaction ID to read uncommitted changes within the transaction. | | | total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | -| ttl | integer | TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours). | 0 | +| ttl | integer | TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). | 0 | ```http request @@ -1286,6 +1329,25 @@ DELETE https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/rows | transactionId | string | Transaction ID for staging the operation. | | +```http request +POST https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/rows/query +``` + +** Get a list of all the user's rows in a given table using a POST request. This behaves identically to the list rows endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| databaseId | string | **Required** Database ID. | | +| tableId | string | **Required** Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). | | +| 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. | [] | +| transactionId | string | Transaction ID to read uncommitted changes within the transaction. | | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | +| ttl | integer | TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). | 0 | + + ```http request GET https://cloud.appwrite.io/v1/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} ``` diff --git a/docs/vectorsdb.md b/docs/vectorsdb.md index d94cc7b0..6f39958f 100644 --- a/docs/vectorsdb.md +++ b/docs/vectorsdb.md @@ -29,6 +29,7 @@ POST https://cloud.appwrite.io/v1/vectorsdb | databaseId | 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. | | | 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 | +| description | string | Optional description for the database. | | | specification | string | Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification. | serverless | | replicas | integer | Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0. | 0 | | syncMode | string | Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum. | | @@ -149,6 +150,7 @@ PUT https://cloud.appwrite.io/v1/vectorsdb/{databaseId} | databaseId | string | **Required** Database ID. | | | 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 | +| description | string | Optional description for the database. | | | specification | string | Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize. | | | replicas | integer | Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0. | | | syncMode | string | Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum. | | @@ -200,6 +202,7 @@ POST https://cloud.appwrite.io/v1/vectorsdb/{databaseId}/collections | permissions | array | An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | 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 | +| description | string | Optional description for the collection. | | ```http request @@ -233,6 +236,7 @@ PUT https://cloud.appwrite.io/v1/vectorsdb/{databaseId}/collections/{collectionI | permissions | array | An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | 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 | +| description | string | Optional description for the collection. | | ```http request @@ -473,6 +477,7 @@ 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. | [] | | lengths | array | Length of index. Maximum of 100 | [] | +| description | string | Optional description for the index. | | ```http request diff --git a/docs/webhooks.md b/docs/webhooks.md index 5ed6ad59..6dc6748d 100644 --- a/docs/webhooks.md +++ b/docs/webhooks.md @@ -34,6 +34,7 @@ POST https://cloud.appwrite.io/v1/webhooks | authUsername | string | Webhook HTTP user. Max length: 255 chars. | | | authPassword | string | Webhook HTTP password. Max length: 2048 chars. | | | secret | string | Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. | | +| description | string | Optional description for the webhook. | | ```http request @@ -67,6 +68,7 @@ PUT https://cloud.appwrite.io/v1/webhooks/{webhookId} | tls | boolean | Certificate verification, false for disabled or true for enabled. | | | authUsername | string | Webhook HTTP user. Max length: 255 chars. | | | authPassword | string | Webhook HTTP password. Max length: 2048 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled. | | +| description | string | Optional description for the webhook. | | ```http request diff --git a/src/Appwrite/Client.php b/src/Appwrite/Client.php index 194e66bb..b77ac756 100644 --- a/src/Appwrite/Client.php +++ b/src/Appwrite/Client.php @@ -45,11 +45,11 @@ class Client * */ protected array $headers = [ - 'user-agent' => 'AppwritePHPSDK/31.0.0 ()', + 'user-agent' => 'AppwritePHPSDK/32.0.0 ()', 'x-sdk-name' => 'PHP', 'x-sdk-platform' => 'server', 'x-sdk-language' => 'php', - 'x-sdk-version' => '31.0.0', + 'x-sdk-version' => '32.0.0', ]; /** diff --git a/src/Appwrite/Models/AttributeBigint.php b/src/Appwrite/Models/AttributeBigint.php index 18fcf882..39d0f769 100644 --- a/src/Appwrite/Models/AttributeBigint.php +++ b/src/Appwrite/Models/AttributeBigint.php @@ -19,6 +19,7 @@ * AttributeBigint constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -65,6 +68,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeBoolean.php b/src/Appwrite/Models/AttributeBoolean.php index 27721548..50752164 100644 --- a/src/Appwrite/Models/AttributeBoolean.php +++ b/src/Appwrite/Models/AttributeBoolean.php @@ -19,6 +19,7 @@ * AttributeBoolean constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeDatetime.php b/src/Appwrite/Models/AttributeDatetime.php index 89a3da8d..6a581100 100644 --- a/src/Appwrite/Models/AttributeDatetime.php +++ b/src/Appwrite/Models/AttributeDatetime.php @@ -19,6 +19,7 @@ * AttributeDatetime constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -66,6 +69,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeEmail.php b/src/Appwrite/Models/AttributeEmail.php index 659961e7..47851af5 100644 --- a/src/Appwrite/Models/AttributeEmail.php +++ b/src/Appwrite/Models/AttributeEmail.php @@ -19,6 +19,7 @@ * AttributeEmail constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -64,6 +67,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -83,6 +87,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeEnum.php b/src/Appwrite/Models/AttributeEnum.php index c99bdc57..b31f40d2 100644 --- a/src/Appwrite/Models/AttributeEnum.php +++ b/src/Appwrite/Models/AttributeEnum.php @@ -19,6 +19,7 @@ * AttributeEnum constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -67,6 +70,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -87,6 +91,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeFloat.php b/src/Appwrite/Models/AttributeFloat.php index 84ca8200..24fce7d7 100644 --- a/src/Appwrite/Models/AttributeFloat.php +++ b/src/Appwrite/Models/AttributeFloat.php @@ -19,6 +19,7 @@ * AttributeFloat constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -65,6 +68,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeInteger.php b/src/Appwrite/Models/AttributeInteger.php index 3c4a9f37..d8113ba9 100644 --- a/src/Appwrite/Models/AttributeInteger.php +++ b/src/Appwrite/Models/AttributeInteger.php @@ -19,6 +19,7 @@ * AttributeInteger constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -65,6 +68,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeIp.php b/src/Appwrite/Models/AttributeIp.php index 0254fee3..1da2ee83 100644 --- a/src/Appwrite/Models/AttributeIp.php +++ b/src/Appwrite/Models/AttributeIp.php @@ -19,6 +19,7 @@ * AttributeIp constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -64,6 +67,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -83,6 +87,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeLine.php b/src/Appwrite/Models/AttributeLine.php index 7985b285..4fe4e27c 100644 --- a/src/Appwrite/Models/AttributeLine.php +++ b/src/Appwrite/Models/AttributeLine.php @@ -19,6 +19,7 @@ * AttributeLine constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeLongtext.php b/src/Appwrite/Models/AttributeLongtext.php index 15e3fcd7..c0484fb0 100644 --- a/src/Appwrite/Models/AttributeLongtext.php +++ b/src/Appwrite/Models/AttributeLongtext.php @@ -19,6 +19,7 @@ * AttributeLongtext constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -63,6 +66,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeMediumtext.php b/src/Appwrite/Models/AttributeMediumtext.php index d66da297..2ba8b81d 100644 --- a/src/Appwrite/Models/AttributeMediumtext.php +++ b/src/Appwrite/Models/AttributeMediumtext.php @@ -19,6 +19,7 @@ * AttributeMediumtext constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -63,6 +66,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeObject.php b/src/Appwrite/Models/AttributeObject.php index f1e5e5a9..8d8a365e 100644 --- a/src/Appwrite/Models/AttributeObject.php +++ b/src/Appwrite/Models/AttributeObject.php @@ -19,6 +19,7 @@ * AttributeObject constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -29,6 +30,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -46,6 +48,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -59,6 +62,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -76,6 +80,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributePoint.php b/src/Appwrite/Models/AttributePoint.php index 94f85fd3..f8ef723f 100644 --- a/src/Appwrite/Models/AttributePoint.php +++ b/src/Appwrite/Models/AttributePoint.php @@ -19,6 +19,7 @@ * AttributePoint constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributePolygon.php b/src/Appwrite/Models/AttributePolygon.php index 9005ded2..6be171f9 100644 --- a/src/Appwrite/Models/AttributePolygon.php +++ b/src/Appwrite/Models/AttributePolygon.php @@ -19,6 +19,7 @@ * AttributePolygon constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeRelationship.php b/src/Appwrite/Models/AttributeRelationship.php index f23f7715..85695805 100644 --- a/src/Appwrite/Models/AttributeRelationship.php +++ b/src/Appwrite/Models/AttributeRelationship.php @@ -19,6 +19,7 @@ * AttributeRelationship constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -35,6 +36,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -58,6 +60,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -79,6 +82,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -102,6 +106,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeString.php b/src/Appwrite/Models/AttributeString.php index 85e1d4ad..6f93ea22 100644 --- a/src/Appwrite/Models/AttributeString.php +++ b/src/Appwrite/Models/AttributeString.php @@ -19,6 +19,7 @@ * AttributeString constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -66,6 +69,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -86,6 +90,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeText.php b/src/Appwrite/Models/AttributeText.php index 0917a270..f71d90a2 100644 --- a/src/Appwrite/Models/AttributeText.php +++ b/src/Appwrite/Models/AttributeText.php @@ -19,6 +19,7 @@ * AttributeText constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -63,6 +66,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeUrl.php b/src/Appwrite/Models/AttributeUrl.php index 0e518b98..0fc2d688 100644 --- a/src/Appwrite/Models/AttributeUrl.php +++ b/src/Appwrite/Models/AttributeUrl.php @@ -19,6 +19,7 @@ * AttributeUrl constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -64,6 +67,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -83,6 +87,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeVarchar.php b/src/Appwrite/Models/AttributeVarchar.php index d624f747..f494c1b1 100644 --- a/src/Appwrite/Models/AttributeVarchar.php +++ b/src/Appwrite/Models/AttributeVarchar.php @@ -19,6 +19,7 @@ * AttributeVarchar constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -66,6 +69,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -86,6 +90,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/AttributeVector.php b/src/Appwrite/Models/AttributeVector.php index a0f547f3..347de1a3 100644 --- a/src/Appwrite/Models/AttributeVector.php +++ b/src/Appwrite/Models/AttributeVector.php @@ -19,6 +19,7 @@ * AttributeVector constructor. * * @param string $key attribute key. + * @param string $description optional description for the attribute. * @param string $type attribute type. * @param AttributeStatus $status attribute status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an attribute. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public AttributeStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -62,6 +65,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(AttributeStatus::class, $data['status']), error: $data['error'], @@ -80,6 +84,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/BillingPlan.php b/src/Appwrite/Models/BillingPlan.php index 29ad81c0..b8a9066c 100644 --- a/src/Appwrite/Models/BillingPlan.php +++ b/src/Appwrite/Models/BillingPlan.php @@ -79,6 +79,7 @@ * @param int $deploymentSize maximum function and site deployment size in mb * @param int $buildSize maximum function and site deployment size in mb * @param int $functionsIntervalMinimum shortest function schedule interval allowed, in minutes. 0 allows every interval. + * @param bool $functionsAllowCron does the plan allow cron function schedules or only intervals. * @param bool $databasesAllowEncrypt does the plan support encrypted string attributes or not. * @param BillingPlanGroup $group group of this billing plan for variants * @param float $databaseComputeCredit included monthly dedicated-database compute credit in usd. resets each billing cycle with no roll-over. @@ -156,6 +157,7 @@ public function __construct( public int $deploymentSize, public int $buildSize, public int $functionsIntervalMinimum, + public bool $functionsAllowCron, public bool $databasesAllowEncrypt, public BillingPlanGroup $group, public float $databaseComputeCredit, @@ -238,6 +240,7 @@ public static function from(array $data): static 'deploymentSize' => 0, 'buildSize' => 0, 'functionsIntervalMinimum' => 0, + 'functionsAllowCron' => true, 'databasesAllowEncrypt' => false, 'databaseComputeCredit' => 0, ]; @@ -314,6 +317,7 @@ functions: $data['functions'], deploymentSize: $data['deploymentSize'], buildSize: $data['buildSize'], functionsIntervalMinimum: $data['functionsIntervalMinimum'], + functionsAllowCron: $data['functionsAllowCron'], databasesAllowEncrypt: $data['databasesAllowEncrypt'], group: static::hydrateTypedValue(BillingPlanGroup::class, $data['group']), databaseComputeCredit: $data['databaseComputeCredit'], @@ -406,6 +410,7 @@ public function toArray(): array 'deploymentSize' => static::serializeValue($this->deploymentSize), 'buildSize' => static::serializeValue($this->buildSize), 'functionsIntervalMinimum' => static::serializeValue($this->functionsIntervalMinimum), + 'functionsAllowCron' => static::serializeValue($this->functionsAllowCron), 'databasesAllowEncrypt' => static::serializeValue($this->databasesAllowEncrypt), 'limits' => static::serializeValue($this->limits), 'group' => static::serializeValue($this->group), diff --git a/src/Appwrite/Models/Bucket.php b/src/Appwrite/Models/Bucket.php index 68c69dcc..8c7c0a62 100644 --- a/src/Appwrite/Models/Bucket.php +++ b/src/Appwrite/Models/Bucket.php @@ -22,6 +22,7 @@ * @param array $permissions bucket permissions. [learn more about permissions](https://appwrite.io/docs/permissions). * @param bool $fileSecurity whether file-level security is enabled. [learn more about permissions](https://appwrite.io/docs/permissions). * @param string $name bucket name. + * @param string $description optional description for the bucket. * @param bool $enabled bucket enabled. * @param int $maximumFileSize maximum file size supported. * @param array $allowedFileExtensions allowed file extensions. @@ -29,6 +30,7 @@ * @param bool $encryption bucket is encrypted. * @param bool $antivirus virus scanning is enabled. * @param bool $transformations image transformations are enabled. + * @param bool $stripMetadata metadata such as location, device and capture time is removed from uploaded images. * @param int $totalSize total size of this bucket in bytes. */ public function __construct( @@ -38,6 +40,7 @@ public function __construct( public array $permissions, public bool $fileSecurity, public string $name, + public string $description, public bool $enabled, public int $maximumFileSize, public array $allowedFileExtensions, @@ -45,6 +48,7 @@ public function __construct( public bool $encryption, public bool $antivirus, public bool $transformations, + public bool $stripMetadata, public int $totalSize ) { } @@ -61,6 +65,7 @@ public static function from(array $data): static '$permissions' => [], 'fileSecurity' => false, 'name' => "", + 'description' => "", 'enabled' => true, 'maximumFileSize' => 0, 'allowedFileExtensions' => [], @@ -68,6 +73,7 @@ public static function from(array $data): static 'encryption' => true, 'antivirus' => true, 'transformations' => true, + 'stripMetadata' => false, 'totalSize' => 0, ]; @@ -78,6 +84,7 @@ public static function from(array $data): static permissions: $data['$permissions'], fileSecurity: $data['fileSecurity'], name: $data['name'], + description: $data['description'], enabled: $data['enabled'], maximumFileSize: $data['maximumFileSize'], allowedFileExtensions: $data['allowedFileExtensions'], @@ -85,6 +92,7 @@ public static function from(array $data): static encryption: $data['encryption'], antivirus: $data['antivirus'], transformations: $data['transformations'], + stripMetadata: $data['stripMetadata'], totalSize: $data['totalSize'] ); } @@ -101,6 +109,7 @@ public function toArray(): array '$permissions' => static::serializeValue($this->permissions), 'fileSecurity' => static::serializeValue($this->fileSecurity), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'enabled' => static::serializeValue($this->enabled), 'maximumFileSize' => static::serializeValue($this->maximumFileSize), 'allowedFileExtensions' => static::serializeValue($this->allowedFileExtensions), @@ -108,6 +117,7 @@ public function toArray(): array 'encryption' => static::serializeValue($this->encryption), 'antivirus' => static::serializeValue($this->antivirus), 'transformations' => static::serializeValue($this->transformations), + 'stripMetadata' => static::serializeValue($this->stripMetadata), 'totalSize' => static::serializeValue($this->totalSize) ]; } diff --git a/src/Appwrite/Models/Collection.php b/src/Appwrite/Models/Collection.php index cf23cf70..37c10b96 100644 --- a/src/Appwrite/Models/Collection.php +++ b/src/Appwrite/Models/Collection.php @@ -22,6 +22,7 @@ * @param array $permissions collection permissions. [learn more about permissions](https://appwrite.io/docs/permissions). * @param string $databaseId database id. * @param string $name collection name. + * @param string $description optional description for the collection. * @param bool $enabled collection enabled. can be 'enabled' or 'disabled'. when disabled, the collection is inaccessible to users, but remains accessible to server sdks using api keys. * @param bool $documentSecurity whether document-level permissions are enabled. [learn more about permissions](https://appwrite.io/docs/permissions). * @param array $attributes collection attributes. @@ -36,6 +37,7 @@ public function __construct( public array $permissions, public string $databaseId, public string $name, + public string $description, public bool $enabled, public bool $documentSecurity, public array $attributes, @@ -57,6 +59,7 @@ public static function from(array $data): static '$permissions' => [], 'databaseId' => "", 'name' => "", + 'description' => "", 'enabled' => true, 'documentSecurity' => false, 'attributes' => [], @@ -72,6 +75,7 @@ public static function from(array $data): static permissions: $data['$permissions'], databaseId: $data['databaseId'], name: $data['name'], + description: $data['description'], enabled: $data['enabled'], documentSecurity: $data['documentSecurity'], attributes: $data['attributes'], @@ -98,6 +102,7 @@ public function toArray(): array '$permissions' => static::serializeValue($this->permissions), 'databaseId' => static::serializeValue($this->databaseId), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'enabled' => static::serializeValue($this->enabled), 'documentSecurity' => static::serializeValue($this->documentSecurity), 'attributes' => static::serializeValue($this->attributes), diff --git a/src/Appwrite/Models/ColumnBigint.php b/src/Appwrite/Models/ColumnBigint.php index 6a00d25c..f6c7baf6 100644 --- a/src/Appwrite/Models/ColumnBigint.php +++ b/src/Appwrite/Models/ColumnBigint.php @@ -19,6 +19,7 @@ * ColumnBigint constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -65,6 +68,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnBoolean.php b/src/Appwrite/Models/ColumnBoolean.php index c1eb7db5..2fcf243f 100644 --- a/src/Appwrite/Models/ColumnBoolean.php +++ b/src/Appwrite/Models/ColumnBoolean.php @@ -19,6 +19,7 @@ * ColumnBoolean constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnDatetime.php b/src/Appwrite/Models/ColumnDatetime.php index d7be453a..639eb7cc 100644 --- a/src/Appwrite/Models/ColumnDatetime.php +++ b/src/Appwrite/Models/ColumnDatetime.php @@ -19,6 +19,7 @@ * ColumnDatetime constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -66,6 +69,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnEmail.php b/src/Appwrite/Models/ColumnEmail.php index 77fca40e..5cf00e2f 100644 --- a/src/Appwrite/Models/ColumnEmail.php +++ b/src/Appwrite/Models/ColumnEmail.php @@ -19,6 +19,7 @@ * ColumnEmail constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -64,6 +67,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -83,6 +87,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnEnum.php b/src/Appwrite/Models/ColumnEnum.php index 31b43871..bf740334 100644 --- a/src/Appwrite/Models/ColumnEnum.php +++ b/src/Appwrite/Models/ColumnEnum.php @@ -19,6 +19,7 @@ * ColumnEnum constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -67,6 +70,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -87,6 +91,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnFloat.php b/src/Appwrite/Models/ColumnFloat.php index 47ba3301..dd60960c 100644 --- a/src/Appwrite/Models/ColumnFloat.php +++ b/src/Appwrite/Models/ColumnFloat.php @@ -19,6 +19,7 @@ * ColumnFloat constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -65,6 +68,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnIndex.php b/src/Appwrite/Models/ColumnIndex.php index db545277..34a6f6e0 100644 --- a/src/Appwrite/Models/ColumnIndex.php +++ b/src/Appwrite/Models/ColumnIndex.php @@ -20,6 +20,7 @@ * @param string $createdAt index creation date in iso 8601 format. * @param string $updatedAt index update date in iso 8601 format. * @param string $key index key. + * @param string $description optional description for the index. * @param string $type index type. * @param string $status index status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an index. @@ -32,6 +33,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $key, + public string $description, public string $type, public string $status, public string $error, @@ -51,6 +53,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'key' => "", + 'description' => "", 'type' => "", 'status' => "", 'error' => "", @@ -63,6 +66,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], key: $data['key'], + description: $data['description'], type: $data['type'], status: $data['status'], error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnInteger.php b/src/Appwrite/Models/ColumnInteger.php index bab1fa8a..48cbeed1 100644 --- a/src/Appwrite/Models/ColumnInteger.php +++ b/src/Appwrite/Models/ColumnInteger.php @@ -19,6 +19,7 @@ * ColumnInteger constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -65,6 +68,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -85,6 +89,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnIp.php b/src/Appwrite/Models/ColumnIp.php index 87707036..c0f8ab93 100644 --- a/src/Appwrite/Models/ColumnIp.php +++ b/src/Appwrite/Models/ColumnIp.php @@ -19,6 +19,7 @@ * ColumnIp constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -64,6 +67,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -83,6 +87,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnLine.php b/src/Appwrite/Models/ColumnLine.php index 980652fd..590424e9 100644 --- a/src/Appwrite/Models/ColumnLine.php +++ b/src/Appwrite/Models/ColumnLine.php @@ -19,6 +19,7 @@ * ColumnLine constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnLongtext.php b/src/Appwrite/Models/ColumnLongtext.php index 19c51262..3e143699 100644 --- a/src/Appwrite/Models/ColumnLongtext.php +++ b/src/Appwrite/Models/ColumnLongtext.php @@ -19,6 +19,7 @@ * ColumnLongtext constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -63,6 +66,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnMediumtext.php b/src/Appwrite/Models/ColumnMediumtext.php index 2f31acd9..3a967dfe 100644 --- a/src/Appwrite/Models/ColumnMediumtext.php +++ b/src/Appwrite/Models/ColumnMediumtext.php @@ -19,6 +19,7 @@ * ColumnMediumtext constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -63,6 +66,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnPoint.php b/src/Appwrite/Models/ColumnPoint.php index f8045d11..d406b5d7 100644 --- a/src/Appwrite/Models/ColumnPoint.php +++ b/src/Appwrite/Models/ColumnPoint.php @@ -19,6 +19,7 @@ * ColumnPoint constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnPolygon.php b/src/Appwrite/Models/ColumnPolygon.php index 5bf44148..b411799c 100644 --- a/src/Appwrite/Models/ColumnPolygon.php +++ b/src/Appwrite/Models/ColumnPolygon.php @@ -19,6 +19,7 @@ * ColumnPolygon constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -30,6 +31,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -48,6 +50,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -61,6 +64,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -79,6 +83,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnRelationship.php b/src/Appwrite/Models/ColumnRelationship.php index 527001f4..5eac132d 100644 --- a/src/Appwrite/Models/ColumnRelationship.php +++ b/src/Appwrite/Models/ColumnRelationship.php @@ -19,6 +19,7 @@ * ColumnRelationship constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -35,6 +36,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -58,6 +60,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -79,6 +82,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -102,6 +106,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnString.php b/src/Appwrite/Models/ColumnString.php index 2e007589..31373938 100644 --- a/src/Appwrite/Models/ColumnString.php +++ b/src/Appwrite/Models/ColumnString.php @@ -19,6 +19,7 @@ * ColumnString constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -66,6 +69,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -86,6 +90,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnText.php b/src/Appwrite/Models/ColumnText.php index 867b158c..ab17453f 100644 --- a/src/Appwrite/Models/ColumnText.php +++ b/src/Appwrite/Models/ColumnText.php @@ -19,6 +19,7 @@ * ColumnText constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -63,6 +66,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -82,6 +86,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnUrl.php b/src/Appwrite/Models/ColumnUrl.php index 7ab8b112..87c9e580 100644 --- a/src/Appwrite/Models/ColumnUrl.php +++ b/src/Appwrite/Models/ColumnUrl.php @@ -19,6 +19,7 @@ * ColumnUrl constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -31,6 +32,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -50,6 +52,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -64,6 +67,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -83,6 +87,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/ColumnVarchar.php b/src/Appwrite/Models/ColumnVarchar.php index 74ce172f..4b6c4504 100644 --- a/src/Appwrite/Models/ColumnVarchar.php +++ b/src/Appwrite/Models/ColumnVarchar.php @@ -19,6 +19,7 @@ * ColumnVarchar constructor. * * @param string $key column key. + * @param string $description optional description for the column. * @param string $type column type. * @param ColumnStatus $status column status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an column. @@ -32,6 +33,7 @@ */ public function __construct( public string $key, + public string $description, public string $type, public ColumnStatus $status, public string $error, @@ -52,6 +54,7 @@ public static function from(array $data): static { $data += [ 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'required' => false, @@ -66,6 +69,7 @@ public static function from(array $data): static return new static( key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(ColumnStatus::class, $data['status']), error: $data['error'], @@ -86,6 +90,7 @@ public function toArray(): array { return [ 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/Database.php b/src/Appwrite/Models/Database.php index 6cbaff98..e731348e 100644 --- a/src/Appwrite/Models/Database.php +++ b/src/Appwrite/Models/Database.php @@ -21,6 +21,7 @@ * * @param string $id database id. * @param string $name database name. + * @param string $description optional description for the database. * @param string $createdAt database creation date in iso 8601 format. * @param string $updatedAt database update date in iso 8601 format. * @param bool $enabled if database is enabled. can be 'enabled' or 'disabled'. when disabled, the database is inaccessible to users, but remains accessible to server sdks using api keys. @@ -38,6 +39,7 @@ public function __construct( public string $id, public string $name, + public string $description, public string $createdAt, public string $updatedAt, public bool $enabled, @@ -62,6 +64,7 @@ public static function from(array $data): static $data += [ '$id' => "", 'name' => "", + 'description' => "", '$createdAt' => "", '$updatedAt' => "", 'enabled' => true, @@ -71,6 +74,7 @@ public static function from(array $data): static return new static( id: $data['$id'], name: $data['name'], + description: $data['description'], createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], enabled: $data['enabled'], @@ -113,6 +117,7 @@ public function toArray(): array return [ '$id' => static::serializeValue($this->id), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'enabled' => static::serializeValue($this->enabled), diff --git a/src/Appwrite/Models/EphemeralKey.php b/src/Appwrite/Models/EphemeralKey.php index c338f61e..22fdaa92 100644 --- a/src/Appwrite/Models/EphemeralKey.php +++ b/src/Appwrite/Models/EphemeralKey.php @@ -20,6 +20,7 @@ * @param string $createdAt key creation date in iso 8601 format. * @param string $updatedAt key update date in iso 8601 format. * @param string $name key name. + * @param string $description optional description for the key. * @param string $expire key expiration date in iso 8601 format. * @param array $scopes allowed permission scopes. * @param string $secret secret key. @@ -31,6 +32,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $name, + public string $description, public string $expire, public array $scopes, public string $secret, @@ -49,6 +51,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'name' => "", + 'description' => "", 'expire' => "", 'scopes' => [], 'secret' => "", @@ -61,6 +64,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], name: $data['name'], + description: $data['description'], expire: $data['expire'], scopes: $data['scopes'], secret: $data['secret'], @@ -79,6 +83,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'expire' => static::serializeValue($this->expire), 'scopes' => static::serializeValue($this->scopes), 'secret' => static::serializeValue($this->secret), diff --git a/src/Appwrite/Models/FunctionModel.php b/src/Appwrite/Models/FunctionModel.php index 900ce96b..459821ff 100644 --- a/src/Appwrite/Models/FunctionModel.php +++ b/src/Appwrite/Models/FunctionModel.php @@ -21,6 +21,7 @@ * @param string $updatedAt function update date in iso 8601 format. * @param array $execute execution permissions. * @param string $name function name. + * @param string $description optional description for the function. * @param bool $enabled function enabled. * @param bool $live is the function deployed with the latest configuration? this is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. when the value is false, redeploy the function to update it with the latest configuration. * @param bool $logging when disabled, executions will exclude logs and errors, and will be slightly faster. @@ -57,6 +58,7 @@ public function __construct( public string $updatedAt, public array $execute, public string $name, + public string $description, public bool $enabled, public bool $live, public bool $logging, @@ -100,6 +102,7 @@ public static function from(array $data): static '$updatedAt' => "", 'execute' => [], 'name' => "", + 'description' => "", 'enabled' => true, 'live' => true, 'logging' => true, @@ -136,6 +139,7 @@ public static function from(array $data): static updatedAt: $data['$updatedAt'], execute: $data['execute'], name: $data['name'], + description: $data['description'], enabled: $data['enabled'], live: $data['live'], logging: $data['logging'], @@ -184,6 +188,7 @@ public function toArray(): array '$updatedAt' => static::serializeValue($this->updatedAt), 'execute' => static::serializeValue($this->execute), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'enabled' => static::serializeValue($this->enabled), 'live' => static::serializeValue($this->live), 'logging' => static::serializeValue($this->logging), diff --git a/src/Appwrite/Models/Index.php b/src/Appwrite/Models/Index.php index ce47bac1..34d4a8dc 100644 --- a/src/Appwrite/Models/Index.php +++ b/src/Appwrite/Models/Index.php @@ -22,6 +22,7 @@ * @param string $createdAt index creation date in iso 8601 format. * @param string $updatedAt index update date in iso 8601 format. * @param string $key index key. + * @param string $description optional description for the index. * @param string $type index type. * @param IndexStatus $status index status. possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` * @param string $error error message. displays error generated on failure of creating or deleting an index. @@ -34,6 +35,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $key, + public string $description, public string $type, public IndexStatus $status, public string $error, @@ -53,6 +55,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'key' => "", + 'description' => "", 'type' => "", 'error' => "", 'attributes' => [], @@ -68,6 +71,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], key: $data['key'], + description: $data['description'], type: $data['type'], status: static::hydrateTypedValue(IndexStatus::class, $data['status']), error: $data['error'], @@ -87,6 +91,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'type' => static::serializeValue($this->type), 'status' => static::serializeValue($this->status), 'error' => static::serializeValue($this->error), diff --git a/src/Appwrite/Models/Key.php b/src/Appwrite/Models/Key.php index 6b8e6841..1e71177b 100644 --- a/src/Appwrite/Models/Key.php +++ b/src/Appwrite/Models/Key.php @@ -20,6 +20,7 @@ * @param string $createdAt key creation date in iso 8601 format. * @param string $updatedAt key update date in iso 8601 format. * @param string $name key name. + * @param string $description optional description for the key. * @param string $expire key expiration date in iso 8601 format. * @param array $scopes allowed permission scopes. * @param string $secret secret key. @@ -31,6 +32,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $name, + public string $description, public string $expire, public array $scopes, public string $secret, @@ -49,6 +51,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'name' => "", + 'description' => "", 'expire' => "", 'scopes' => [], 'secret' => "", @@ -61,6 +64,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], name: $data['name'], + description: $data['description'], expire: $data['expire'], scopes: $data['scopes'], secret: $data['secret'], @@ -79,6 +83,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'expire' => static::serializeValue($this->expire), 'scopes' => static::serializeValue($this->scopes), 'secret' => static::serializeValue($this->secret), diff --git a/src/Appwrite/Models/PolicyPasswordDictionary.php b/src/Appwrite/Models/PolicyPasswordDictionary.php index 32a1ff66..04e445d5 100644 --- a/src/Appwrite/Models/PolicyPasswordDictionary.php +++ b/src/Appwrite/Models/PolicyPasswordDictionary.php @@ -18,10 +18,12 @@ * * @param string $id policy id. * @param bool $enabled whether password dictionary policy is enabled. + * @param array $denyList custom passwords blocked by case-sensitive equality when enabled. */ public function __construct( public string $id, - public bool $enabled + public bool $enabled, + public array $denyList ) { } @@ -33,11 +35,13 @@ public static function from(array $data): static $data += [ '$id' => "", 'enabled' => false, + 'denyList' => [], ]; return new static( id: $data['$id'], - enabled: $data['enabled'] + enabled: $data['enabled'], + denyList: $data['denyList'] ); } @@ -48,7 +52,8 @@ public function toArray(): array { return [ '$id' => static::serializeValue($this->id), - 'enabled' => static::serializeValue($this->enabled) + 'enabled' => static::serializeValue($this->enabled), + 'denyList' => static::serializeValue($this->denyList) ]; } } diff --git a/src/Appwrite/Models/PolicyPasswordPersonalData.php b/src/Appwrite/Models/PolicyPasswordPersonalData.php index 919a032f..e54a449f 100644 --- a/src/Appwrite/Models/PolicyPasswordPersonalData.php +++ b/src/Appwrite/Models/PolicyPasswordPersonalData.php @@ -18,10 +18,12 @@ * * @param string $id policy id. * @param bool $enabled whether password personal data policy is enabled. + * @param array $denyList custom terms blocked by case-insensitive substring matching when enabled. */ public function __construct( public string $id, - public bool $enabled + public bool $enabled, + public array $denyList ) { } @@ -33,11 +35,13 @@ public static function from(array $data): static $data += [ '$id' => "", 'enabled' => false, + 'denyList' => [], ]; return new static( id: $data['$id'], - enabled: $data['enabled'] + enabled: $data['enabled'], + denyList: $data['denyList'] ); } @@ -48,7 +52,8 @@ public function toArray(): array { return [ '$id' => static::serializeValue($this->id), - 'enabled' => static::serializeValue($this->enabled) + 'enabled' => static::serializeValue($this->enabled), + 'denyList' => static::serializeValue($this->denyList) ]; } } diff --git a/src/Appwrite/Models/Site.php b/src/Appwrite/Models/Site.php index 3b00ca02..cb83a7c7 100644 --- a/src/Appwrite/Models/Site.php +++ b/src/Appwrite/Models/Site.php @@ -20,6 +20,7 @@ * @param string $createdAt site creation date in iso 8601 format. * @param string $updatedAt site update date in iso 8601 format. * @param string $name site name. + * @param string $description optional description for the site. * @param bool $enabled site enabled. * @param bool $live is the site deployed with the latest configuration? this is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. when the value is false, redeploy the site to update it with the latest configuration. * @param bool $logging when disabled, request logs will exclude logs and errors, and site responses will be slightly faster. @@ -57,6 +58,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $name, + public string $description, public bool $enabled, public bool $live, public bool $logging, @@ -101,6 +103,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'name' => "", + 'description' => "", 'enabled' => true, 'live' => true, 'logging' => true, @@ -144,6 +147,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], name: $data['name'], + description: $data['description'], enabled: $data['enabled'], live: $data['live'], logging: $data['logging'], @@ -193,6 +197,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'enabled' => static::serializeValue($this->enabled), 'live' => static::serializeValue($this->live), 'logging' => static::serializeValue($this->logging), diff --git a/src/Appwrite/Models/Table.php b/src/Appwrite/Models/Table.php index dc197d32..06224d17 100644 --- a/src/Appwrite/Models/Table.php +++ b/src/Appwrite/Models/Table.php @@ -22,6 +22,7 @@ * @param array $permissions table permissions. [learn more about permissions](https://appwrite.io/docs/permissions). * @param string $databaseId database id. * @param string $name table name. + * @param string $description optional description for the table. * @param bool $enabled table enabled. can be 'enabled' or 'disabled'. when disabled, the table is inaccessible to users, but remains accessible to server sdks using api keys. * @param bool $rowSecurity whether row-level permissions are enabled. [learn more about permissions](https://appwrite.io/docs/permissions). * @param array $columns table columns. @@ -36,6 +37,7 @@ public function __construct( public array $permissions, public string $databaseId, public string $name, + public string $description, public bool $enabled, public bool $rowSecurity, public array $columns, @@ -57,6 +59,7 @@ public static function from(array $data): static '$permissions' => [], 'databaseId' => "", 'name' => "", + 'description' => "", 'enabled' => true, 'rowSecurity' => false, 'columns' => [], @@ -72,6 +75,7 @@ public static function from(array $data): static permissions: $data['$permissions'], databaseId: $data['databaseId'], name: $data['name'], + description: $data['description'], enabled: $data['enabled'], rowSecurity: $data['rowSecurity'], columns: $data['columns'], @@ -98,6 +102,7 @@ public function toArray(): array '$permissions' => static::serializeValue($this->permissions), 'databaseId' => static::serializeValue($this->databaseId), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'enabled' => static::serializeValue($this->enabled), 'rowSecurity' => static::serializeValue($this->rowSecurity), 'columns' => static::serializeValue($this->columns), diff --git a/src/Appwrite/Models/Topic.php b/src/Appwrite/Models/Topic.php index 4719c755..253dfb9c 100644 --- a/src/Appwrite/Models/Topic.php +++ b/src/Appwrite/Models/Topic.php @@ -20,6 +20,7 @@ * @param string $createdAt topic creation time in iso 8601 format. * @param string $updatedAt topic update date in iso 8601 format. * @param string $name the name of the topic. + * @param string $description optional description for the topic. * @param int $emailTotal total count of email subscribers subscribed to the topic. * @param int $smsTotal total count of sms subscribers subscribed to the topic. * @param int $pushTotal total count of push subscribers subscribed to the topic. @@ -32,6 +33,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $name, + public string $description, public int $emailTotal, public int $smsTotal, public int $pushTotal, @@ -51,6 +53,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'name' => "", + 'description' => "", 'emailTotal' => 0, 'smsTotal' => 0, 'pushTotal' => 0, @@ -62,6 +65,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], name: $data['name'], + description: $data['description'], emailTotal: $data['emailTotal'], smsTotal: $data['smsTotal'], pushTotal: $data['pushTotal'], @@ -81,6 +85,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'emailTotal' => static::serializeValue($this->emailTotal), 'smsTotal' => static::serializeValue($this->smsTotal), 'pushTotal' => static::serializeValue($this->pushTotal), diff --git a/src/Appwrite/Models/Variable.php b/src/Appwrite/Models/Variable.php index 1f9cf830..3a64b540 100644 --- a/src/Appwrite/Models/Variable.php +++ b/src/Appwrite/Models/Variable.php @@ -20,6 +20,7 @@ * @param string $createdAt variable creation date in iso 8601 format. * @param string $updatedAt variable creation date in iso 8601 format. * @param string $key variable key. + * @param string $description optional description for the variable. * @param string $value variable value. * @param bool $secret variable secret flag. secret variables can only be updated or deleted, but never read. * @param string $resourceType service to which the variable belongs. possible values are "project", "function" @@ -30,6 +31,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $key, + public string $description, public string $value, public bool $secret, public string $resourceType, @@ -47,6 +49,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'key' => "", + 'description' => "", 'value' => "", 'secret' => false, 'resourceType' => "", @@ -58,6 +61,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], key: $data['key'], + description: $data['description'], value: $data['value'], secret: $data['secret'], resourceType: $data['resourceType'], @@ -75,6 +79,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'key' => static::serializeValue($this->key), + 'description' => static::serializeValue($this->description), 'value' => static::serializeValue($this->value), 'secret' => static::serializeValue($this->secret), 'resourceType' => static::serializeValue($this->resourceType), diff --git a/src/Appwrite/Models/VectorsdbCollection.php b/src/Appwrite/Models/VectorsdbCollection.php index 1ec525b7..bfa7e733 100644 --- a/src/Appwrite/Models/VectorsdbCollection.php +++ b/src/Appwrite/Models/VectorsdbCollection.php @@ -22,6 +22,7 @@ * @param array $permissions collection permissions. [learn more about permissions](https://appwrite.io/docs/permissions). * @param string $databaseId database id. * @param string $name collection name. + * @param string $description optional description for the collection. * @param bool $enabled collection enabled. can be 'enabled' or 'disabled'. when disabled, the collection is inaccessible to users, but remains accessible to server sdks using api keys. * @param bool $documentSecurity whether document-level permissions are enabled. [learn more about permissions](https://appwrite.io/docs/permissions). * @param array $attributes collection attributes. @@ -37,6 +38,7 @@ public function __construct( public array $permissions, public string $databaseId, public string $name, + public string $description, public bool $enabled, public bool $documentSecurity, public array $attributes, @@ -59,6 +61,7 @@ public static function from(array $data): static '$permissions' => [], 'databaseId' => "", 'name' => "", + 'description' => "", 'enabled' => true, 'documentSecurity' => false, 'attributes' => [], @@ -75,6 +78,7 @@ public static function from(array $data): static permissions: $data['$permissions'], databaseId: $data['databaseId'], name: $data['name'], + description: $data['description'], enabled: $data['enabled'], documentSecurity: $data['documentSecurity'], attributes: $data['attributes'], @@ -102,6 +106,7 @@ public function toArray(): array '$permissions' => static::serializeValue($this->permissions), 'databaseId' => static::serializeValue($this->databaseId), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'enabled' => static::serializeValue($this->enabled), 'documentSecurity' => static::serializeValue($this->documentSecurity), 'attributes' => static::serializeValue($this->attributes), diff --git a/src/Appwrite/Models/Webhook.php b/src/Appwrite/Models/Webhook.php index 4df57b11..e9fa888b 100644 --- a/src/Appwrite/Models/Webhook.php +++ b/src/Appwrite/Models/Webhook.php @@ -20,6 +20,7 @@ * @param string $createdAt webhook creation date in iso 8601 format. * @param string $updatedAt webhook update date in iso 8601 format. * @param string $name webhook name. + * @param string $description optional description for the webhook. * @param string $url webhook url endpoint. * @param array $events webhook trigger events. * @param bool $tls indicates if ssl / tls certificate verification is enabled. @@ -35,6 +36,7 @@ public function __construct( public string $createdAt, public string $updatedAt, public string $name, + public string $description, public string $url, public array $events, public bool $tls, @@ -57,6 +59,7 @@ public static function from(array $data): static '$createdAt' => "", '$updatedAt' => "", 'name' => "", + 'description' => "", 'url' => "", 'events' => [], 'tls' => true, @@ -73,6 +76,7 @@ public static function from(array $data): static createdAt: $data['$createdAt'], updatedAt: $data['$updatedAt'], name: $data['name'], + description: $data['description'], url: $data['url'], events: $data['events'], tls: $data['tls'], @@ -95,6 +99,7 @@ public function toArray(): array '$createdAt' => static::serializeValue($this->createdAt), '$updatedAt' => static::serializeValue($this->updatedAt), 'name' => static::serializeValue($this->name), + 'description' => static::serializeValue($this->description), 'url' => static::serializeValue($this->url), 'events' => static::serializeValue($this->events), 'tls' => static::serializeValue($this->tls), diff --git a/src/Appwrite/Query.php b/src/Appwrite/Query.php index 1ef74498..a62f8556 100644 --- a/src/Appwrite/Query.php +++ b/src/Appwrite/Query.php @@ -560,7 +560,7 @@ public static function max(string $attribute, string $alias = ''): string } /** - * Standard deviation of $attribute, optionally aliased. + * Population standard deviation of $attribute (the same as stddevPop), optionally aliased. */ public static function stddev(string $attribute, string $alias = ''): string { @@ -584,7 +584,7 @@ public static function stddevSamp(string $attribute, string $alias = ''): string } /** - * Variance of $attribute, optionally aliased. + * Population variance of $attribute (the same as varPop), optionally aliased. */ public static function variance(string $attribute, string $alias = ''): string { @@ -674,7 +674,7 @@ public static function on(string $left, string $right, string $operator = '='): } /** - * Inner join. $table is the joined collection/table ID. + * Inner join. $table is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ public static function join(string $table, string|array $leftOrAliasOrOn, string|array $rightOrOn = '', string $operator = '=', string $alias = ''): string { @@ -682,7 +682,7 @@ public static function join(string $table, string|array $leftOrAliasOrOn, string } /** - * Left join. $table is the joined collection/table ID. + * Left join. $table is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ public static function leftJoin(string $table, string|array $leftOrAliasOrOn, string|array $rightOrOn = '', string $operator = '=', string $alias = ''): string { @@ -690,7 +690,7 @@ public static function leftJoin(string $table, string|array $leftOrAliasOrOn, st } /** - * Right join. $table is the joined collection/table ID. + * Right join. $table is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ public static function rightJoin(string $table, string|array $leftOrAliasOrOn, string|array $rightOrOn = '', string $operator = '=', string $alias = ''): string { @@ -698,7 +698,7 @@ public static function rightJoin(string $table, string|array $leftOrAliasOrOn, s } /** - * Full outer join. $table is the joined collection/table ID. + * Full outer join. $table is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ public static function fullOuterJoin(string $table, string|array $leftOrAliasOrOn, string|array $rightOrOn = '', string $operator = '=', string $alias = ''): string { @@ -706,7 +706,7 @@ public static function fullOuterJoin(string $table, string|array $leftOrAliasOrO } /** - * Cross join. $table is the joined collection/table ID. + * Cross join. $table is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ public static function crossJoin(string $table, string $alias = ''): string { diff --git a/src/Appwrite/Services/Account.php b/src/Appwrite/Services/Account.php index 74a1925d..06341f52 100644 --- a/src/Appwrite/Services/Account.php +++ b/src/Appwrite/Services/Account.php @@ -458,6 +458,47 @@ public function deleteIdentity(string $identityId): string ); } + /** + * Get the team memberships of the currently logged in user. + * + * @throws AppwriteException + */ + public function listMemberships(?array $queries = null, ?bool $total = null): \Appwrite\Models\MembershipList + { + $apiPath = str_replace( + [], + [], + '/account/memberships' + ); + + $apiParams = []; + + if (!is_null($queries)) { + $apiParams['queries'] = $queries; + } + + if (!is_null($total)) { + $apiParams['total'] = $total; + } + + $apiHeaders = []; + $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); + $apiHeaders['accept'] = 'application/json'; + + $response = $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + + if (!is_array($response)) { + throw new \UnexpectedValueException('Expected array response when hydrating a response model.'); + } + + return \Appwrite\Models\MembershipList::from($response); + } + /** * Enable or disable MFA on an account. * @@ -1309,6 +1350,14 @@ public function createRecovery(string $email, string $url): \Appwrite\Models\Tok * the only valid redirect URLs are the ones from domains you have set when * adding your platforms in the console interface. * + * The new password must satisfy the project's enabled password policies, + * including custom deny lists. Dictionary entries match the entire password + * case-sensitively; personal-data terms match substrings case-insensitively. + * Personal-data validation runs after token verification against the + * recovered user's ID, name, email, and phone, closing the previous recovery + * gap for profile-based checks. A rejected password leaves the existing + * credentials unchanged and the recovery token usable. + * * @throws AppwriteException */ public function updateRecovery(string $userId, string $secret, string $password): \Appwrite\Models\Token @@ -1402,6 +1451,14 @@ public function createRecoveryOTP(string $email, ?bool $phrase = null): \Appwrit * email and the new **password** to set. If confirmed, this route will return * a 200 status code, the code is consumed and the user's password is updated. * + * The new password must satisfy the project's enabled password policies, + * including custom deny lists. Dictionary entries match the entire password + * case-sensitively; personal-data terms match substrings case-insensitively. + * Personal-data validation runs after token verification against the + * recovered user's ID, name, email, and phone, closing the previous recovery + * gap for profile-based checks. A rejected password leaves the existing + * credentials unchanged and the recovery token usable. + * * @throws AppwriteException */ public function updateRecoveryOTP(string $userId, string $secret, string $password): \Appwrite\Models\Token diff --git a/src/Appwrite/Services/Activities.php b/src/Appwrite/Services/Activities.php index c5398cf0..1e91bb10 100644 --- a/src/Appwrite/Services/Activities.php +++ b/src/Appwrite/Services/Activities.php @@ -15,7 +15,7 @@ class Activities extends Service * * @throws AppwriteException */ - public function listEvents(?array $queries = null): \Appwrite\Models\ActivityEventList + public function listEvents(?array $queries = null, ?bool $total = null): \Appwrite\Models\ActivityEventList { $apiPath = str_replace( [], @@ -29,6 +29,10 @@ public function listEvents(?array $queries = null): \Appwrite\Models\ActivityEve $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; diff --git a/src/Appwrite/Services/Backups.php b/src/Appwrite/Services/Backups.php index 9b22277b..44e1191b 100644 --- a/src/Appwrite/Services/Backups.php +++ b/src/Appwrite/Services/Backups.php @@ -15,7 +15,7 @@ class Backups extends Service * * @throws AppwriteException */ - public function listArchives(?array $queries = null): \Appwrite\Models\BackupArchiveList + public function listArchives(?array $queries = null, ?bool $total = null): \Appwrite\Models\BackupArchiveList { $apiPath = str_replace( [], @@ -29,6 +29,10 @@ public function listArchives(?array $queries = null): \Appwrite\Models\BackupArc $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -159,7 +163,7 @@ public function deleteArchive(string $archiveId): string * * @throws AppwriteException */ - public function listPolicies(?array $queries = null): \Appwrite\Models\BackupPolicyList + public function listPolicies(?array $queries = null, ?bool $total = null): \Appwrite\Models\BackupPolicyList { $apiPath = str_replace( [], @@ -173,6 +177,10 @@ public function listPolicies(?array $queries = null): \Appwrite\Models\BackupPol $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -434,7 +442,7 @@ public function createRestoration(string $archiveId, array $services, ?string $n * * @throws AppwriteException */ - public function listRestorations(?array $queries = null): \Appwrite\Models\BackupRestorationList + public function listRestorations(?array $queries = null, ?bool $total = null): \Appwrite\Models\BackupRestorationList { $apiPath = str_replace( [], @@ -448,6 +456,10 @@ public function listRestorations(?array $queries = null): \Appwrite\Models\Backu $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; diff --git a/src/Appwrite/Services/Databases.php b/src/Appwrite/Services/Databases.php index 60caec64..a18f7579 100644 --- a/src/Appwrite/Services/Databases.php +++ b/src/Appwrite/Services/Databases.php @@ -70,7 +70,7 @@ public function list(?array $queries = null, ?string $search = null, ?bool $tota * @deprecated This API has been deprecated since 1.8.0. Please use `create` instead. * @see TablesDB::create */ - public function create(string $databaseId, string $name, ?bool $enabled = null): \Appwrite\Models\Database + public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $description = null): \Appwrite\Models\Database { $apiPath = str_replace( [], @@ -86,6 +86,10 @@ public function create(string $databaseId, string $name, ?bool $enabled = null): $apiParams['enabled'] = $enabled; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -413,7 +417,7 @@ public function get(string $databaseId): \Appwrite\Models\Database * @deprecated This API has been deprecated since 1.8.0. Please use `update` instead. * @see TablesDB::update */ - public function update(string $databaseId, ?string $name = null, ?bool $enabled = null): \Appwrite\Models\Database + public function update(string $databaseId, ?string $name = null, ?bool $enabled = null, ?string $description = null): \Appwrite\Models\Database { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -435,6 +439,7 @@ public function update(string $databaseId, ?string $name = null, ?bool $enabled if (!is_null($enabled)) { $apiParams['enabled'] = $enabled; } + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -557,7 +562,7 @@ public function listCollections(string $databaseId, ?array $queries = null, ?str * @deprecated This API has been deprecated since 1.8.0. Please use `createTable` instead. * @see TablesDB::createTable */ - public function createCollection(string $databaseId, string $collectionId, string $name, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?array $attributes = null, ?array $indexes = null): \Appwrite\Models\Collection + public function createCollection(string $databaseId, string $collectionId, string $name, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?array $attributes = null, ?array $indexes = null, ?string $description = null): \Appwrite\Models\Collection { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -591,6 +596,10 @@ public function createCollection(string $databaseId, string $collectionId, strin $apiParams['indexes'] = $indexes; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -665,7 +674,7 @@ public function getCollection(string $databaseId, string $collectionId): \Appwri * @deprecated This API has been deprecated since 1.8.0. Please use `updateTable` instead. * @see TablesDB::updateTable */ - public function updateCollection(string $databaseId, string $collectionId, ?string $name = null, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?bool $purge = null): \Appwrite\Models\Collection + public function updateCollection(string $databaseId, string $collectionId, ?string $name = null, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?bool $purge = null, ?string $description = null): \Appwrite\Models\Collection { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -701,6 +710,7 @@ public function updateCollection(string $databaseId, string $collectionId, ?stri if (!is_null($purge)) { $apiParams['purge'] = $purge; } + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -826,7 +836,7 @@ public function listAttributes(string $databaseId, string $collectionId, ?array * @deprecated This API has been deprecated since 1.8.0. Please use `createBigIntColumn` instead. * @see TablesDB::createBigIntColumn */ - public function createBigIntAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeBigint + public function createBigIntAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeBigint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -855,6 +865,10 @@ public function createBigIntAttribute(string $databaseId, string $collectionId, $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -883,7 +897,7 @@ public function createBigIntAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `updateBigIntColumn` instead. * @see TablesDB::updateBigIntColumn */ - public function updateBigIntAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null): \Appwrite\Models\AttributeBigint + public function updateBigIntAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeBigint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -912,6 +926,7 @@ public function updateBigIntAttribute(string $databaseId, string $collectionId, $apiParams['min'] = $min; $apiParams['max'] = $max; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -940,7 +955,7 @@ public function updateBigIntAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `createBooleanColumn` instead. * @see TablesDB::createBooleanColumn */ - public function createBooleanAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?bool $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeBoolean + public function createBooleanAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?bool $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeBoolean { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -967,6 +982,10 @@ public function createBooleanAttribute(string $databaseId, string $collectionId, $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -995,7 +1014,7 @@ public function createBooleanAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `updateBooleanColumn` instead. * @see TablesDB::updateBooleanColumn */ - public function updateBooleanAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?bool $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeBoolean + public function updateBooleanAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?bool $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeBoolean { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1022,6 +1041,7 @@ public function updateBooleanAttribute(string $databaseId, string $collectionId, $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1050,7 +1070,7 @@ public function updateBooleanAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `createDatetimeColumn` instead. * @see TablesDB::createDatetimeColumn */ - public function createDatetimeAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeDatetime + public function createDatetimeAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeDatetime { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1077,6 +1097,10 @@ public function createDatetimeAttribute(string $databaseId, string $collectionId $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1105,7 +1129,7 @@ public function createDatetimeAttribute(string $databaseId, string $collectionId * @deprecated This API has been deprecated since 1.8.0. Please use `updateDatetimeColumn` instead. * @see TablesDB::updateDatetimeColumn */ - public function updateDatetimeAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeDatetime + public function updateDatetimeAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeDatetime { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1132,6 +1156,7 @@ public function updateDatetimeAttribute(string $databaseId, string $collectionId $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1160,7 +1185,7 @@ public function updateDatetimeAttribute(string $databaseId, string $collectionId * @deprecated This API has been deprecated since 1.8.0. Please use `createEmailColumn` instead. * @see TablesDB::createEmailColumn */ - public function createEmailAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeEmail + public function createEmailAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeEmail { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1187,6 +1212,10 @@ public function createEmailAttribute(string $databaseId, string $collectionId, s $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1215,7 +1244,7 @@ public function createEmailAttribute(string $databaseId, string $collectionId, s * @deprecated This API has been deprecated since 1.8.0. Please use `updateEmailColumn` instead. * @see TablesDB::updateEmailColumn */ - public function updateEmailAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeEmail + public function updateEmailAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeEmail { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1242,6 +1271,7 @@ public function updateEmailAttribute(string $databaseId, string $collectionId, s $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1271,7 +1301,7 @@ public function updateEmailAttribute(string $databaseId, string $collectionId, s * @deprecated This API has been deprecated since 1.8.0. Please use `createEnumColumn` instead. * @see TablesDB::createEnumColumn */ - public function createEnumAttribute(string $databaseId, string $collectionId, string $key, array $elements, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeEnum + public function createEnumAttribute(string $databaseId, string $collectionId, string $key, array $elements, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeEnum { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1299,6 +1329,10 @@ public function createEnumAttribute(string $databaseId, string $collectionId, st $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1327,7 +1361,7 @@ public function createEnumAttribute(string $databaseId, string $collectionId, st * @deprecated This API has been deprecated since 1.8.0. Please use `updateEnumColumn` instead. * @see TablesDB::updateEnumColumn */ - public function updateEnumAttribute(string $databaseId, string $collectionId, string $key, array $elements, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeEnum + public function updateEnumAttribute(string $databaseId, string $collectionId, string $key, array $elements, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeEnum { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1355,6 +1389,7 @@ public function updateEnumAttribute(string $databaseId, string $collectionId, st $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1384,7 +1419,7 @@ public function updateEnumAttribute(string $databaseId, string $collectionId, st * @deprecated This API has been deprecated since 1.8.0. Please use `createFloatColumn` instead. * @see TablesDB::createFloatColumn */ - public function createFloatAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?float $min = null, ?float $max = null, ?float $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeFloat + public function createFloatAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?float $min = null, ?float $max = null, ?float $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeFloat { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1413,6 +1448,10 @@ public function createFloatAttribute(string $databaseId, string $collectionId, s $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1441,7 +1480,7 @@ public function createFloatAttribute(string $databaseId, string $collectionId, s * @deprecated This API has been deprecated since 1.8.0. Please use `updateFloatColumn` instead. * @see TablesDB::updateFloatColumn */ - public function updateFloatAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?float $xdefault, ?float $min = null, ?float $max = null, ?string $newKey = null): \Appwrite\Models\AttributeFloat + public function updateFloatAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?float $xdefault, ?float $min = null, ?float $max = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeFloat { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1470,6 +1509,7 @@ public function updateFloatAttribute(string $databaseId, string $collectionId, s $apiParams['min'] = $min; $apiParams['max'] = $max; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1499,7 +1539,7 @@ public function updateFloatAttribute(string $databaseId, string $collectionId, s * @deprecated This API has been deprecated since 1.8.0. Please use `createIntegerColumn` instead. * @see TablesDB::createIntegerColumn */ - public function createIntegerAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeInteger + public function createIntegerAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeInteger { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1528,6 +1568,10 @@ public function createIntegerAttribute(string $databaseId, string $collectionId, $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1556,7 +1600,7 @@ public function createIntegerAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `updateIntegerColumn` instead. * @see TablesDB::updateIntegerColumn */ - public function updateIntegerAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null): \Appwrite\Models\AttributeInteger + public function updateIntegerAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeInteger { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1585,6 +1629,7 @@ public function updateIntegerAttribute(string $databaseId, string $collectionId, $apiParams['min'] = $min; $apiParams['max'] = $max; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1613,7 +1658,7 @@ public function updateIntegerAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `createIpColumn` instead. * @see TablesDB::createIpColumn */ - public function createIpAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeIp + public function createIpAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeIp { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1640,6 +1685,10 @@ public function createIpAttribute(string $databaseId, string $collectionId, stri $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1668,7 +1717,7 @@ public function createIpAttribute(string $databaseId, string $collectionId, stri * @deprecated This API has been deprecated since 1.8.0. Please use `updateIpColumn` instead. * @see TablesDB::updateIpColumn */ - public function updateIpAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeIp + public function updateIpAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeIp { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1695,6 +1744,7 @@ public function updateIpAttribute(string $databaseId, string $collectionId, stri $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1723,7 +1773,7 @@ public function updateIpAttribute(string $databaseId, string $collectionId, stri * @deprecated This API has been deprecated since 1.8.0. Please use `createLineColumn` instead. * @see TablesDB::createLineColumn */ - public function createLineAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null): \Appwrite\Models\AttributeLine + public function createLineAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $description = null): \Appwrite\Models\AttributeLine { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1746,6 +1796,10 @@ public function createLineAttribute(string $databaseId, string $collectionId, st $apiParams['required'] = $required; $apiParams['default'] = $xdefault; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1774,7 +1828,7 @@ public function createLineAttribute(string $databaseId, string $collectionId, st * @deprecated This API has been deprecated since 1.8.0. Please use `updateLineColumn` instead. * @see TablesDB::updateLineColumn */ - public function updateLineAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null): \Appwrite\Models\AttributeLine + public function updateLineAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeLine { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1801,6 +1855,7 @@ public function updateLineAttribute(string $databaseId, string $collectionId, st $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1829,7 +1884,7 @@ public function updateLineAttribute(string $databaseId, string $collectionId, st * @deprecated This API has been deprecated since 1.8.0. Please use `createLongtextColumn` instead. * @see TablesDB::createLongtextColumn */ - public function createLongtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\AttributeLongtext + public function createLongtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\AttributeLongtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1860,6 +1915,10 @@ public function createLongtextAttribute(string $databaseId, string $collectionId $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1888,7 +1947,7 @@ public function createLongtextAttribute(string $databaseId, string $collectionId * @deprecated This API has been deprecated since 1.8.0. Please use `updateLongtextColumn` instead. * @see TablesDB::updateLongtextColumn */ - public function updateLongtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeLongtext + public function updateLongtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeLongtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1915,6 +1974,7 @@ public function updateLongtextAttribute(string $databaseId, string $collectionId $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1943,7 +2003,7 @@ public function updateLongtextAttribute(string $databaseId, string $collectionId * @deprecated This API has been deprecated since 1.8.0. Please use `createMediumtextColumn` instead. * @see TablesDB::createMediumtextColumn */ - public function createMediumtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\AttributeMediumtext + public function createMediumtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\AttributeMediumtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1974,6 +2034,10 @@ public function createMediumtextAttribute(string $databaseId, string $collection $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2002,7 +2066,7 @@ public function createMediumtextAttribute(string $databaseId, string $collection * @deprecated This API has been deprecated since 1.8.0. Please use `updateMediumtextColumn` instead. * @see TablesDB::updateMediumtextColumn */ - public function updateMediumtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeMediumtext + public function updateMediumtextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeMediumtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2029,6 +2093,7 @@ public function updateMediumtextAttribute(string $databaseId, string $collection $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2057,7 +2122,7 @@ public function updateMediumtextAttribute(string $databaseId, string $collection * @deprecated This API has been deprecated since 1.8.0. Please use `createPointColumn` instead. * @see TablesDB::createPointColumn */ - public function createPointAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null): \Appwrite\Models\AttributePoint + public function createPointAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $description = null): \Appwrite\Models\AttributePoint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2080,6 +2145,10 @@ public function createPointAttribute(string $databaseId, string $collectionId, s $apiParams['required'] = $required; $apiParams['default'] = $xdefault; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2108,7 +2177,7 @@ public function createPointAttribute(string $databaseId, string $collectionId, s * @deprecated This API has been deprecated since 1.8.0. Please use `updatePointColumn` instead. * @see TablesDB::updatePointColumn */ - public function updatePointAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null): \Appwrite\Models\AttributePoint + public function updatePointAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributePoint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2135,6 +2204,7 @@ public function updatePointAttribute(string $databaseId, string $collectionId, s $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2163,7 +2233,7 @@ public function updatePointAttribute(string $databaseId, string $collectionId, s * @deprecated This API has been deprecated since 1.8.0. Please use `createPolygonColumn` instead. * @see TablesDB::createPolygonColumn */ - public function createPolygonAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null): \Appwrite\Models\AttributePolygon + public function createPolygonAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $description = null): \Appwrite\Models\AttributePolygon { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2186,6 +2256,10 @@ public function createPolygonAttribute(string $databaseId, string $collectionId, $apiParams['required'] = $required; $apiParams['default'] = $xdefault; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2214,7 +2288,7 @@ public function createPolygonAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `updatePolygonColumn` instead. * @see TablesDB::updatePolygonColumn */ - public function updatePolygonAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null): \Appwrite\Models\AttributePolygon + public function updatePolygonAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributePolygon { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2241,6 +2315,7 @@ public function updatePolygonAttribute(string $databaseId, string $collectionId, $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2270,7 +2345,7 @@ public function updatePolygonAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `createRelationshipColumn` instead. * @see TablesDB::createRelationshipColumn */ - public function createRelationshipAttribute(string $databaseId, string $collectionId, string $relatedCollectionId, RelationshipType $type, ?bool $twoWay = null, ?string $key = null, ?string $twoWayKey = null, ?RelationMutate $onDelete = null): \Appwrite\Models\AttributeRelationship + public function createRelationshipAttribute(string $databaseId, string $collectionId, string $relatedCollectionId, RelationshipType $type, ?bool $twoWay = null, ?string $key = null, ?string $twoWayKey = null, ?RelationMutate $onDelete = null, ?string $description = null): \Appwrite\Models\AttributeRelationship { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2302,6 +2377,10 @@ public function createRelationshipAttribute(string $databaseId, string $collecti $apiParams['onDelete'] = $onDelete; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2330,7 +2409,7 @@ public function createRelationshipAttribute(string $databaseId, string $collecti * @deprecated This API has been deprecated since 1.8.0. Please use `updateRelationshipColumn` instead. * @see TablesDB::updateRelationshipColumn */ - public function updateRelationshipAttribute(string $databaseId, string $collectionId, string $key, ?RelationMutate $onDelete = null, ?string $newKey = null): \Appwrite\Models\AttributeRelationship + public function updateRelationshipAttribute(string $databaseId, string $collectionId, string $key, ?RelationMutate $onDelete = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeRelationship { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2359,6 +2438,7 @@ public function updateRelationshipAttribute(string $databaseId, string $collecti $apiParams['onDelete'] = $onDelete; } $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2387,7 +2467,7 @@ public function updateRelationshipAttribute(string $databaseId, string $collecti * @deprecated This API has been deprecated since 1.8.0. Please use `createStringColumn` instead. * @see TablesDB::createStringColumn */ - public function createStringAttribute(string $databaseId, string $collectionId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\AttributeString + public function createStringAttribute(string $databaseId, string $collectionId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\AttributeString { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2419,6 +2499,10 @@ public function createStringAttribute(string $databaseId, string $collectionId, $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2447,7 +2531,7 @@ public function createStringAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `updateStringColumn` instead. * @see TablesDB::updateStringColumn */ - public function updateStringAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null): \Appwrite\Models\AttributeString + public function updateStringAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeString { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2475,6 +2559,7 @@ public function updateStringAttribute(string $databaseId, string $collectionId, $apiParams['default'] = $xdefault; $apiParams['size'] = $size; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2503,7 +2588,7 @@ public function updateStringAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `createTextColumn` instead. * @see TablesDB::createTextColumn */ - public function createTextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\AttributeText + public function createTextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\AttributeText { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2534,6 +2619,10 @@ public function createTextAttribute(string $databaseId, string $collectionId, st $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2562,7 +2651,7 @@ public function createTextAttribute(string $databaseId, string $collectionId, st * @deprecated This API has been deprecated since 1.8.0. Please use `updateTextColumn` instead. * @see TablesDB::updateTextColumn */ - public function updateTextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeText + public function updateTextAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeText { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2589,6 +2678,7 @@ public function updateTextAttribute(string $databaseId, string $collectionId, st $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2617,7 +2707,7 @@ public function updateTextAttribute(string $databaseId, string $collectionId, st * @deprecated This API has been deprecated since 1.8.0. Please use `createUrlColumn` instead. * @see TablesDB::createUrlColumn */ - public function createUrlAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\AttributeUrl + public function createUrlAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\AttributeUrl { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2644,6 +2734,10 @@ public function createUrlAttribute(string $databaseId, string $collectionId, str $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2672,7 +2766,7 @@ public function createUrlAttribute(string $databaseId, string $collectionId, str * @deprecated This API has been deprecated since 1.8.0. Please use `updateUrlColumn` instead. * @see TablesDB::updateUrlColumn */ - public function updateUrlAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\AttributeUrl + public function updateUrlAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeUrl { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2699,6 +2793,7 @@ public function updateUrlAttribute(string $databaseId, string $collectionId, str $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2727,7 +2822,7 @@ public function updateUrlAttribute(string $databaseId, string $collectionId, str * @deprecated This API has been deprecated since 1.8.0. Please use `createVarcharColumn` instead. * @see TablesDB::createVarcharColumn */ - public function createVarcharAttribute(string $databaseId, string $collectionId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\AttributeVarchar + public function createVarcharAttribute(string $databaseId, string $collectionId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\AttributeVarchar { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2759,6 +2854,10 @@ public function createVarcharAttribute(string $databaseId, string $collectionId, $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2787,7 +2886,7 @@ public function createVarcharAttribute(string $databaseId, string $collectionId, * @deprecated This API has been deprecated since 1.8.0. Please use `updateVarcharColumn` instead. * @see TablesDB::updateVarcharColumn */ - public function updateVarcharAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null): \Appwrite\Models\AttributeVarchar + public function updateVarcharAttribute(string $databaseId, string $collectionId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\AttributeVarchar { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2815,6 +2914,7 @@ public function updateVarcharAttribute(string $databaseId, string $collectionId, $apiParams['default'] = $xdefault; $apiParams['size'] = $size; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -3008,6 +3108,15 @@ public function deleteAttribute(string $databaseId, string $collectionId, string * Get a list of all the user's documents in a given collection. You can use * the query params to filter your results. * + * Documents returned by aggregate, groupBy or distinct queries hold only the + * attributes they select, group or aggregate, typed as a document types them, + * with a joined attribute named by its join alias (`alias.attribute`). The + * response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, + * `$permissions`, `$databaseId` and `$collectionId` unless they select or + * group it, and those of a right or full join document that no document of + * this collection matched. SDK document models fill omitted system attributes + * with empty values. + * * @throws AppwriteException * * @deprecated This API has been deprecated since 1.8.0. Please use `listRows` instead. @@ -3339,6 +3448,69 @@ public function deleteDocuments(string $databaseId, string $collectionId, ?array return \Appwrite\Models\DocumentList::from($response); } + /** + * Get a list of all the user's documents in a given collection using a POST + * request. This behaves identically to the list documents endpoint but + * accepts the queries in the request body, allowing much larger `queries` + * arrays than can fit in a URL query string. + * + * @throws AppwriteException + * + * @deprecated This API has been deprecated since 1.8.0. Please use `createQuery` instead. + * @see TablesDB::createQuery + */ + public function createQuery(string $databaseId, string $collectionId, ?array $queries = null, ?string $transactionId = null, ?bool $total = null, ?int $ttl = null): \Appwrite\Models\DocumentList + { + if ($databaseId === '') { + throw new AppwriteException('Missing required parameter: "databaseId"'); + } + + if ($collectionId === '') { + throw new AppwriteException('Missing required parameter: "collectionId"'); + } + + $apiPath = str_replace( + ['{databaseId}', '{collectionId}'], + [$databaseId, $collectionId], + '/databases/{databaseId}/collections/{collectionId}/documents/query' + ); + + $apiParams = []; + $apiParams['databaseId'] = $databaseId; + $apiParams['collectionId'] = $collectionId; + + if (!is_null($queries)) { + $apiParams['queries'] = $queries; + } + $apiParams['transactionId'] = $transactionId; + + if (!is_null($total)) { + $apiParams['total'] = $total; + } + + if (!is_null($ttl)) { + $apiParams['ttl'] = $ttl; + } + + $apiHeaders = []; + $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); + $apiHeaders['content-type'] = 'application/json'; + $apiHeaders['accept'] = 'application/json'; + + $response = $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + + if (!is_array($response)) { + throw new \UnexpectedValueException('Expected array response when hydrating a response model.'); + } + + return \Appwrite\Models\DocumentList::from($response); + } + /** * Get a document by its unique ID. This endpoint response returns a JSON * object with the document data. @@ -3761,7 +3933,7 @@ public function listIndexes(string $databaseId, string $collectionId, ?array $qu * @deprecated This API has been deprecated since 1.8.0. Please use `createIndex` instead. * @see TablesDB::createIndex */ - public function createIndex(string $databaseId, string $collectionId, string $key, DatabasesIndexType $type, array $attributes, ?array $orders = null, ?array $lengths = null): \Appwrite\Models\Index + public function createIndex(string $databaseId, string $collectionId, string $key, DatabasesIndexType $type, array $attributes, ?array $orders = null, ?array $lengths = null, ?string $description = null): \Appwrite\Models\Index { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -3792,6 +3964,10 @@ public function createIndex(string $databaseId, string $collectionId, string $ke $apiParams['lengths'] = $lengths; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; diff --git a/src/Appwrite/Services/DocumentsDB.php b/src/Appwrite/Services/DocumentsDB.php index efaef6eb..25bf81ac 100644 --- a/src/Appwrite/Services/DocumentsDB.php +++ b/src/Appwrite/Services/DocumentsDB.php @@ -58,7 +58,7 @@ public function list(?array $queries = null, ?bool $total = null): \Appwrite\Mod * * @throws AppwriteException */ - public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database + public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $description = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database { $apiPath = str_replace( [], @@ -74,6 +74,10 @@ public function create(string $databaseId, string $name, ?bool $enabled = null, $apiParams['enabled'] = $enabled; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + if (!is_null($specification)) { $apiParams['specification'] = $specification; } @@ -421,7 +425,7 @@ public function get(string $databaseId): \Appwrite\Models\Database * * @throws AppwriteException */ - public function update(string $databaseId, string $name, ?bool $enabled = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database + public function update(string $databaseId, string $name, ?bool $enabled = null, ?string $description = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -440,6 +444,7 @@ public function update(string $databaseId, string $name, ?bool $enabled = null, if (!is_null($enabled)) { $apiParams['enabled'] = $enabled; } + $apiParams['description'] = $description; $apiParams['specification'] = $specification; $apiParams['replicas'] = $replicas; $apiParams['syncMode'] = $syncMode; @@ -556,7 +561,7 @@ public function listCollections(string $databaseId, ?array $queries = null, ?str * * @throws AppwriteException */ - public function createCollection(string $databaseId, string $collectionId, string $name, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?array $attributes = null, ?array $indexes = null): \Appwrite\Models\Collection + public function createCollection(string $databaseId, string $collectionId, string $name, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?array $attributes = null, ?array $indexes = null, ?string $description = null): \Appwrite\Models\Collection { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -590,6 +595,10 @@ public function createCollection(string $databaseId, string $collectionId, strin $apiParams['indexes'] = $indexes; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -658,7 +667,7 @@ public function getCollection(string $databaseId, string $collectionId): \Appwri * * @throws AppwriteException */ - public function updateCollection(string $databaseId, string $collectionId, string $name, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?bool $purge = null): \Appwrite\Models\Collection + public function updateCollection(string $databaseId, string $collectionId, string $name, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?bool $purge = null, ?string $description = null): \Appwrite\Models\Collection { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -694,6 +703,7 @@ public function updateCollection(string $databaseId, string $collectionId, strin if (!is_null($purge)) { $apiParams['purge'] = $purge; } + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1085,6 +1095,69 @@ public function deleteDocuments(string $databaseId, string $collectionId, ?array return \Appwrite\Models\DocumentList::from($response); } + /** + * Get a list of all the user's documents in a given collection using a POST + * request. This behaves identically to the list documents endpoint but + * accepts the queries in the request body, allowing much larger `queries` + * arrays than can fit in a URL query string. + * + * @throws AppwriteException + */ + public function createQuery(string $databaseId, string $collectionId, ?array $queries = null, ?string $transactionId = null, ?bool $total = null, ?int $ttl = null): \Appwrite\Models\DocumentList + { + if ($databaseId === '') { + throw new AppwriteException('Missing required parameter: "databaseId"'); + } + + if ($collectionId === '') { + throw new AppwriteException('Missing required parameter: "collectionId"'); + } + + $apiPath = str_replace( + ['{databaseId}', '{collectionId}'], + [$databaseId, $collectionId], + '/documentsdb/{databaseId}/collections/{collectionId}/documents/query' + ); + + $apiParams = []; + $apiParams['databaseId'] = $databaseId; + $apiParams['collectionId'] = $collectionId; + + if (!is_null($queries)) { + $apiParams['queries'] = $queries; + } + + if (!is_null($transactionId)) { + $apiParams['transactionId'] = $transactionId; + } + + if (!is_null($total)) { + $apiParams['total'] = $total; + } + + if (!is_null($ttl)) { + $apiParams['ttl'] = $ttl; + } + + $apiHeaders = []; + $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); + $apiHeaders['content-type'] = 'application/json'; + $apiHeaders['accept'] = 'application/json'; + + $response = $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + + if (!is_array($response)) { + throw new \UnexpectedValueException('Expected array response when hydrating a response model.'); + } + + return \Appwrite\Models\DocumentList::from($response); + } + /** * Get a document by its unique ID. This endpoint response returns a JSON * object with the document data. @@ -1505,7 +1578,7 @@ public function listIndexes(string $databaseId, string $collectionId, ?array $qu * * @throws AppwriteException */ - public function createIndex(string $databaseId, string $collectionId, string $key, DocumentsDBIndexType $type, array $attributes, ?array $orders = null, ?array $lengths = null): \Appwrite\Models\Index + public function createIndex(string $databaseId, string $collectionId, string $key, DocumentsDBIndexType $type, array $attributes, ?array $orders = null, ?array $lengths = null, ?string $description = null): \Appwrite\Models\Index { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1536,6 +1609,10 @@ public function createIndex(string $databaseId, string $collectionId, string $ke $apiParams['lengths'] = $lengths; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; diff --git a/src/Appwrite/Services/Domains.php b/src/Appwrite/Services/Domains.php index 98a05c19..3f79e75d 100644 --- a/src/Appwrite/Services/Domains.php +++ b/src/Appwrite/Services/Domains.php @@ -17,7 +17,7 @@ class Domains extends Service * * @throws AppwriteException */ - public function list(?array $queries = null, ?string $search = null): \Appwrite\Models\DomainsList + public function list(?array $queries = null, ?string $search = null, ?bool $total = null): \Appwrite\Models\DomainsList { $apiPath = str_replace( [], @@ -35,6 +35,10 @@ public function list(?array $queries = null, ?string $search = null): \Appwrite\ $apiParams['search'] = $search; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -828,7 +832,7 @@ public function createPresetZoho(string $domainId): \Appwrite\Models\DnsRecordsL * * @throws AppwriteException */ - public function listRecords(string $domainId, ?array $queries = null): \Appwrite\Models\DnsRecordsList + public function listRecords(string $domainId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\DnsRecordsList { if ($domainId === '') { throw new AppwriteException('Missing required parameter: "domainId"'); @@ -847,6 +851,10 @@ public function listRecords(string $domainId, ?array $queries = null): \Appwrite $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; diff --git a/src/Appwrite/Services/Functions.php b/src/Appwrite/Services/Functions.php index 7ad73978..e7327a11 100644 --- a/src/Appwrite/Services/Functions.php +++ b/src/Appwrite/Services/Functions.php @@ -71,7 +71,7 @@ public function list(?array $queries = null, ?string $search = null, ?bool $tota * * @throws AppwriteException */ - public function create(string $functionId, string $name, Runtime $runtime, ?array $execute = null, ?array $events = null, ?string $schedule = null, ?int $timeout = null, ?bool $enabled = null, ?bool $logging = null, ?string $entrypoint = null, ?string $commands = null, ?array $scopes = null, ?string $installationId = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?int $interval = null): \Appwrite\Models\FunctionModel + public function create(string $functionId, string $name, Runtime $runtime, ?array $execute = null, ?array $events = null, ?string $schedule = null, ?int $timeout = null, ?bool $enabled = null, ?bool $logging = null, ?string $entrypoint = null, ?string $commands = null, ?array $scopes = null, ?string $installationId = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?int $interval = null, ?string $description = null): \Appwrite\Models\FunctionModel { $apiPath = str_replace( [], @@ -164,6 +164,10 @@ public function create(string $functionId, string $name, Runtime $runtime, ?arra $apiParams['interval'] = $interval; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -304,7 +308,7 @@ public function get(string $functionId): \Appwrite\Models\FunctionModel * * @throws AppwriteException */ - public function update(string $functionId, string $name, ?Runtime $runtime = null, ?array $execute = null, ?array $events = null, ?string $schedule = null, ?int $timeout = null, ?bool $enabled = null, ?bool $logging = null, ?string $entrypoint = null, ?string $commands = null, ?array $scopes = null, ?string $installationId = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?int $interval = null, ?bool $emailEnabled = null): \Appwrite\Models\FunctionModel + public function update(string $functionId, string $name, ?Runtime $runtime = null, ?array $execute = null, ?array $events = null, ?string $schedule = null, ?int $timeout = null, ?bool $enabled = null, ?bool $logging = null, ?string $entrypoint = null, ?string $commands = null, ?array $scopes = null, ?string $installationId = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?int $interval = null, ?string $description = null, ?bool $emailEnabled = null): \Appwrite\Models\FunctionModel { if ($functionId === '') { throw new AppwriteException('Missing required parameter: "functionId"'); @@ -385,6 +389,7 @@ public function update(string $functionId, string $name, ?Runtime $runtime = nul $apiParams['deploymentRetention'] = $deploymentRetention; } $apiParams['interval'] = $interval; + $apiParams['description'] = $description; $apiParams['emailEnabled'] = $emailEnabled; $apiHeaders = []; @@ -1282,7 +1287,7 @@ public function listVariables(string $functionId, ?array $queries = null, ?bool * * @throws AppwriteException */ - public function createVariable(string $functionId, string $variableId, string $key, string $value, ?bool $secret = null): \Appwrite\Models\Variable + public function createVariable(string $functionId, string $variableId, string $key, string $value, ?bool $secret = null, ?string $description = null): \Appwrite\Models\Variable { if ($functionId === '') { throw new AppwriteException('Missing required parameter: "functionId"'); @@ -1304,6 +1309,10 @@ public function createVariable(string $functionId, string $variableId, string $k $apiParams['secret'] = $secret; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1371,7 +1380,7 @@ public function getVariable(string $functionId, string $variableId): \Appwrite\M * * @throws AppwriteException */ - public function updateVariable(string $functionId, string $variableId, ?string $key = null, ?string $value = null, ?bool $secret = null): \Appwrite\Models\Variable + public function updateVariable(string $functionId, string $variableId, ?string $key = null, ?string $value = null, ?bool $secret = null, ?string $description = null): \Appwrite\Models\Variable { if ($functionId === '') { throw new AppwriteException('Missing required parameter: "functionId"'); @@ -1393,6 +1402,7 @@ public function updateVariable(string $functionId, string $variableId, ?string $ $apiParams['key'] = $key; $apiParams['value'] = $value; $apiParams['secret'] = $secret; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/src/Appwrite/Services/Messaging.php b/src/Appwrite/Services/Messaging.php index af0072de..77d2ab69 100644 --- a/src/Appwrite/Services/Messaging.php +++ b/src/Appwrite/Services/Messaging.php @@ -62,7 +62,7 @@ public function listMessages(?array $queries = null, ?string $search = null, ?bo * * @throws AppwriteException */ - public function createEmail(string $messageId, string $subject, string $content, ?array $topics = null, ?array $users = null, ?array $targets = null, ?array $cc = null, ?array $bcc = null, ?array $attachments = null, ?bool $draft = null, ?bool $html = null, ?string $scheduledAt = null, ?string $replyToEmail = null, ?string $replyToName = null): \Appwrite\Models\Message + public function createEmail(string $messageId, string $subject, string $content, ?array $topics = null, ?array $users = null, ?array $targets = null, ?array $cc = null, ?array $bcc = null, ?array $attachments = null, ?bool $draft = null, ?bool $html = null, ?string $scheduledAt = null, ?string $replyToEmail = null, ?string $replyToName = null, ?array $emails = null): \Appwrite\Models\Message { $apiPath = str_replace( [], @@ -113,6 +113,10 @@ public function createEmail(string $messageId, string $subject, string $content, $apiParams['replyToName'] = $replyToName; } + if (!is_null($emails)) { + $apiParams['emails'] = $emails; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -139,7 +143,7 @@ public function createEmail(string $messageId, string $subject, string $content, * * @throws AppwriteException */ - public function updateEmail(string $messageId, ?array $topics = null, ?array $users = null, ?array $targets = null, ?string $subject = null, ?string $content = null, ?bool $draft = null, ?bool $html = null, ?array $cc = null, ?array $bcc = null, ?string $scheduledAt = null, ?array $attachments = null, ?string $replyToEmail = null, ?string $replyToName = null): \Appwrite\Models\Message + public function updateEmail(string $messageId, ?array $topics = null, ?array $users = null, ?array $targets = null, ?string $subject = null, ?string $content = null, ?bool $draft = null, ?bool $html = null, ?array $cc = null, ?array $bcc = null, ?string $scheduledAt = null, ?array $attachments = null, ?string $replyToEmail = null, ?string $replyToName = null, ?array $emails = null): \Appwrite\Models\Message { if ($messageId === '') { throw new AppwriteException('Missing required parameter: "messageId"'); @@ -166,6 +170,7 @@ public function updateEmail(string $messageId, ?array $topics = null, ?array $us $apiParams['attachments'] = $attachments; $apiParams['replyToEmail'] = $replyToEmail; $apiParams['replyToName'] = $replyToName; + $apiParams['emails'] = $emails; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2216,7 +2221,7 @@ public function listTopics(?array $queries = null, ?string $search = null, ?bool * * @throws AppwriteException */ - public function createTopic(string $topicId, string $name, ?array $subscribe = null, ?int $qos = null, ?int $expiry = null): \Appwrite\Models\Topic + public function createTopic(string $topicId, string $name, ?array $subscribe = null, ?int $qos = null, ?int $expiry = null, ?string $description = null): \Appwrite\Models\Topic { $apiPath = str_replace( [], @@ -2234,6 +2239,10 @@ public function createTopic(string $topicId, string $name, ?array $subscribe = n $apiParams['qos'] = $qos; $apiParams['expiry'] = $expiry; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2296,7 +2305,7 @@ public function getTopic(string $topicId): \Appwrite\Models\Topic * * @throws AppwriteException */ - public function updateTopic(string $topicId, ?string $name = null, ?array $subscribe = null, ?int $qos = null, ?int $expiry = null): \Appwrite\Models\Topic + public function updateTopic(string $topicId, ?string $name = null, ?array $subscribe = null, ?int $qos = null, ?int $expiry = null, ?string $description = null): \Appwrite\Models\Topic { if ($topicId === '') { throw new AppwriteException('Missing required parameter: "topicId"'); @@ -2314,6 +2323,7 @@ public function updateTopic(string $topicId, ?string $name = null, ?array $subsc $apiParams['subscribe'] = $subscribe; $apiParams['qos'] = $qos; $apiParams['expiry'] = $expiry; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/src/Appwrite/Services/Mongo.php b/src/Appwrite/Services/Mongo.php index 82e35d35..507fa678 100644 --- a/src/Appwrite/Services/Mongo.php +++ b/src/Appwrite/Services/Mongo.php @@ -15,7 +15,7 @@ class Mongo extends Service * * @throws AppwriteException */ - public function list(?array $queries = null): \Appwrite\Models\DedicatedDatabaseList + public function list(?array $queries = null, ?bool $total = null): \Appwrite\Models\DedicatedDatabaseList { $apiPath = str_replace( [], @@ -29,6 +29,10 @@ public function list(?array $queries = null): \Appwrite\Models\DedicatedDatabase $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -298,7 +302,7 @@ public function delete(string $databaseId): string * * @throws AppwriteException */ - public function listBackups(string $databaseId, ?array $queries = null): \Appwrite\Models\DedicatedDatabaseBackupList + public function listBackups(string $databaseId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\DedicatedDatabaseBackupList { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -317,6 +321,10 @@ public function listBackups(string $databaseId, ?array $queries = null): \Appwri $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -384,7 +392,7 @@ public function createBackup(string $databaseId, ?string $type = null): \Appwrit * * @throws AppwriteException */ - public function listBackupPolicies(string $databaseId, ?array $queries = null): \Appwrite\Models\BackupPolicyList + public function listBackupPolicies(string $databaseId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\BackupPolicyList { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -403,6 +411,10 @@ public function listBackupPolicies(string $databaseId, ?array $queries = null): $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; diff --git a/src/Appwrite/Services/Mysql.php b/src/Appwrite/Services/Mysql.php index f3f089ee..2e7a1aee 100644 --- a/src/Appwrite/Services/Mysql.php +++ b/src/Appwrite/Services/Mysql.php @@ -15,7 +15,7 @@ class Mysql extends Service * * @throws AppwriteException */ - public function list(?array $queries = null): \Appwrite\Models\DedicatedDatabaseList + public function list(?array $queries = null, ?bool $total = null): \Appwrite\Models\DedicatedDatabaseList { $apiPath = str_replace( [], @@ -29,6 +29,10 @@ public function list(?array $queries = null): \Appwrite\Models\DedicatedDatabase $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -298,7 +302,7 @@ public function delete(string $databaseId): string * * @throws AppwriteException */ - public function listBackups(string $databaseId, ?array $queries = null): \Appwrite\Models\DedicatedDatabaseBackupList + public function listBackups(string $databaseId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\DedicatedDatabaseBackupList { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -317,6 +321,10 @@ public function listBackups(string $databaseId, ?array $queries = null): \Appwri $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -384,7 +392,7 @@ public function createBackup(string $databaseId, ?string $type = null): \Appwrit * * @throws AppwriteException */ - public function listBackupPolicies(string $databaseId, ?array $queries = null): \Appwrite\Models\BackupPolicyList + public function listBackupPolicies(string $databaseId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\BackupPolicyList { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -403,6 +411,10 @@ public function listBackupPolicies(string $databaseId, ?array $queries = null): $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; diff --git a/src/Appwrite/Services/Organization.php b/src/Appwrite/Services/Organization.php index d8be8f07..8e04dced 100644 --- a/src/Appwrite/Services/Organization.php +++ b/src/Appwrite/Services/Organization.php @@ -861,7 +861,7 @@ public function getProjectKey(string $projectId, string $keyId): \Appwrite\Model * * @throws AppwriteException */ - public function updateProjectKey(string $projectId, string $keyId, string $name, array $scopes, ?string $expire = null): \Appwrite\Models\Key + public function updateProjectKey(string $projectId, string $keyId, string $name, array $scopes, ?string $expire = null, ?string $description = null): \Appwrite\Models\Key { if ($projectId === '') { throw new AppwriteException('Missing required parameter: "projectId"'); @@ -883,6 +883,7 @@ public function updateProjectKey(string $projectId, string $keyId, string $name, $apiParams['name'] = $name; $apiParams['scopes'] = $scopes; $apiParams['expire'] = $expire; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/src/Appwrite/Services/Postgresql.php b/src/Appwrite/Services/Postgresql.php index dfc1c870..97ba5b45 100644 --- a/src/Appwrite/Services/Postgresql.php +++ b/src/Appwrite/Services/Postgresql.php @@ -15,7 +15,7 @@ class Postgresql extends Service * * @throws AppwriteException */ - public function list(?array $queries = null): \Appwrite\Models\DedicatedDatabaseList + public function list(?array $queries = null, ?bool $total = null): \Appwrite\Models\DedicatedDatabaseList { $apiPath = str_replace( [], @@ -29,6 +29,10 @@ public function list(?array $queries = null): \Appwrite\Models\DedicatedDatabase $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -298,7 +302,7 @@ public function delete(string $databaseId): string * * @throws AppwriteException */ - public function listBackups(string $databaseId, ?array $queries = null): \Appwrite\Models\DedicatedDatabaseBackupList + public function listBackups(string $databaseId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\DedicatedDatabaseBackupList { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -317,6 +321,10 @@ public function listBackups(string $databaseId, ?array $queries = null): \Appwri $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; @@ -384,7 +392,7 @@ public function createBackup(string $databaseId, ?string $type = null): \Appwrit * * @throws AppwriteException */ - public function listBackupPolicies(string $databaseId, ?array $queries = null): \Appwrite\Models\BackupPolicyList + public function listBackupPolicies(string $databaseId, ?array $queries = null, ?bool $total = null): \Appwrite\Models\BackupPolicyList { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -403,6 +411,10 @@ public function listBackupPolicies(string $databaseId, ?array $queries = null): $apiParams['queries'] = $queries; } + if (!is_null($total)) { + $apiParams['total'] = $total; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['accept'] = 'application/json'; diff --git a/src/Appwrite/Services/Project.php b/src/Appwrite/Services/Project.php index 223a6273..b0be6565 100644 --- a/src/Appwrite/Services/Project.php +++ b/src/Appwrite/Services/Project.php @@ -432,7 +432,7 @@ public function getKey(string $keyId): \Appwrite\Models\Key * * @throws AppwriteException */ - public function updateKey(string $keyId, string $name, array $scopes, ?string $expire = null): \Appwrite\Models\Key + public function updateKey(string $keyId, string $name, array $scopes, ?string $expire = null, ?string $description = null): \Appwrite\Models\Key { if ($keyId === '') { throw new AppwriteException('Missing required parameter: "keyId"'); @@ -449,6 +449,7 @@ public function updateKey(string $keyId, string $name, array $scopes, ?string $e $apiParams['name'] = $name; $apiParams['scopes'] = $scopes; $apiParams['expire'] = $expire; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -3794,9 +3795,17 @@ public function updatePasskeyPolicy(string $rpId): \Appwrite\Models\Project * against most common passwords dictionary. When enabled, and user changes * their password, password must not be contained in the dictionary. * + * Custom denyList entries use case-sensitive equality and apply only while + * this policy is enabled. Omit denyList or pass null to preserve it, pass an + * array to replace it, or pass [] to clear it. Entries are stored without + * trimming or deduplication. Existing passwords remain valid for sign-in and + * password confirmation. The combined serialized project authentication + * configuration must fit within 16,384 characters, even when each list meets + * its entry limits. + * * @throws AppwriteException */ - public function updatePasswordDictionaryPolicy(bool $enabled): \Appwrite\Models\Project + public function updatePasswordDictionaryPolicy(bool $enabled, ?array $denyList = null): \Appwrite\Models\Project { $apiPath = str_replace( [], @@ -3806,6 +3815,7 @@ public function updatePasswordDictionaryPolicy(bool $enabled): \Appwrite\Models\ $apiParams = []; $apiParams['enabled'] = $enabled; + $apiParams['denyList'] = $denyList; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -3875,9 +3885,19 @@ public function updatePasswordHistoryPolicy(?int $total): \Appwrite\Models\Proje * password, the password must not contain user ID, name, email or phone * number. * + * Custom denyList entries use case-insensitive substring matching and apply + * only while this policy is enabled. Omit denyList or pass null to preserve + * it, pass an array to replace it, or pass [] to clear it. Entries are stored + * without trimming or deduplication. Existing passwords remain valid for + * sign-in and password confirmation. The combined serialized project + * authentication configuration must fit within 16,384 characters, even when + * each list meets its entry limits. + * Password recovery also checks the recovered user profile, closing the + * previous gap in profile-based personal-data validation. + * * @throws AppwriteException */ - public function updatePasswordPersonalDataPolicy(bool $enabled): \Appwrite\Models\Project + public function updatePasswordPersonalDataPolicy(bool $enabled, ?array $denyList = null): \Appwrite\Models\Project { $apiPath = str_replace( [], @@ -3887,6 +3907,7 @@ public function updatePasswordPersonalDataPolicy(bool $enabled): \Appwrite\Model $apiParams = []; $apiParams['enabled'] = $enabled; + $apiParams['denyList'] = $denyList; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -4675,7 +4696,7 @@ public function listVariables(?array $queries = null, ?bool $total = null): \App * * @throws AppwriteException */ - public function createVariable(string $variableId, string $key, string $value, ?bool $secret = null): \Appwrite\Models\Variable + public function createVariable(string $variableId, string $key, string $value, ?bool $secret = null, ?string $description = null): \Appwrite\Models\Variable { $apiPath = str_replace( [], @@ -4692,6 +4713,10 @@ public function createVariable(string $variableId, string $key, string $value, ? $apiParams['secret'] = $secret; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -4754,7 +4779,7 @@ public function getVariable(string $variableId): \Appwrite\Models\Variable * * @throws AppwriteException */ - public function updateVariable(string $variableId, ?string $key = null, ?string $value = null, ?bool $secret = null): \Appwrite\Models\Variable + public function updateVariable(string $variableId, ?string $key = null, ?string $value = null, ?bool $secret = null, ?string $description = null): \Appwrite\Models\Variable { if ($variableId === '') { throw new AppwriteException('Missing required parameter: "variableId"'); @@ -4771,6 +4796,7 @@ public function updateVariable(string $variableId, ?string $key = null, ?string $apiParams['key'] = $key; $apiParams['value'] = $value; $apiParams['secret'] = $secret; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/src/Appwrite/Services/Sites.php b/src/Appwrite/Services/Sites.php index c585adaa..28d8b1ec 100644 --- a/src/Appwrite/Services/Sites.php +++ b/src/Appwrite/Services/Sites.php @@ -69,7 +69,7 @@ public function list(?array $queries = null, ?string $search = null, ?bool $tota * * @throws AppwriteException */ - public function create(string $siteId, string $name, Framework $framework, BuildRuntime $buildRuntime, ?bool $enabled = null, ?bool $logging = null, ?int $timeout = null, ?string $installCommand = null, ?string $buildCommand = null, ?string $startCommand = null, ?string $outputDirectory = null, ?Adapter $adapter = null, ?string $installationId = null, ?string $fallbackFile = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?array $scopes = null): \Appwrite\Models\Site + public function create(string $siteId, string $name, Framework $framework, BuildRuntime $buildRuntime, ?bool $enabled = null, ?bool $logging = null, ?int $timeout = null, ?string $installCommand = null, ?string $buildCommand = null, ?string $startCommand = null, ?string $outputDirectory = null, ?Adapter $adapter = null, ?string $installationId = null, ?string $fallbackFile = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?array $scopes = null, ?string $description = null): \Appwrite\Models\Site { $apiPath = str_replace( [], @@ -163,6 +163,10 @@ public function create(string $siteId, string $name, Framework $framework, Build $apiParams['scopes'] = $scopes; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -304,7 +308,7 @@ public function get(string $siteId): \Appwrite\Models\Site * * @throws AppwriteException */ - public function update(string $siteId, string $name, Framework $framework, ?bool $enabled = null, ?bool $logging = null, ?int $timeout = null, ?string $installCommand = null, ?string $buildCommand = null, ?string $startCommand = null, ?string $outputDirectory = null, ?BuildRuntime $buildRuntime = null, ?Adapter $adapter = null, ?string $fallbackFile = null, ?string $installationId = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?array $scopes = null): \Appwrite\Models\Site + public function update(string $siteId, string $name, Framework $framework, ?bool $enabled = null, ?bool $logging = null, ?int $timeout = null, ?string $installCommand = null, ?string $buildCommand = null, ?string $startCommand = null, ?string $outputDirectory = null, ?BuildRuntime $buildRuntime = null, ?Adapter $adapter = null, ?string $fallbackFile = null, ?string $installationId = null, ?string $providerRepositoryId = null, ?string $providerBranch = null, ?bool $providerSilentMode = null, ?string $providerRootDirectory = null, ?array $providerBranches = null, ?array $providerPaths = null, ?string $buildSpecification = null, ?string $runtimeSpecification = null, ?int $deploymentRetention = null, ?array $scopes = null, ?string $description = null): \Appwrite\Models\Site { if ($siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); @@ -389,6 +393,7 @@ public function update(string $siteId, string $name, Framework $framework, ?bool $apiParams['deploymentRetention'] = $deploymentRetention; } $apiParams['scopes'] = $scopes; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1218,7 +1223,7 @@ public function listVariables(string $siteId, ?array $queries = null, ?bool $tot * * @throws AppwriteException */ - public function createVariable(string $siteId, string $variableId, string $key, string $value, ?bool $secret = null): \Appwrite\Models\Variable + public function createVariable(string $siteId, string $variableId, string $key, string $value, ?bool $secret = null, ?string $description = null): \Appwrite\Models\Variable { if ($siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); @@ -1240,6 +1245,10 @@ public function createVariable(string $siteId, string $variableId, string $key, $apiParams['secret'] = $secret; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1307,7 +1316,7 @@ public function getVariable(string $siteId, string $variableId): \Appwrite\Model * * @throws AppwriteException */ - public function updateVariable(string $siteId, string $variableId, ?string $key = null, ?string $value = null, ?bool $secret = null): \Appwrite\Models\Variable + public function updateVariable(string $siteId, string $variableId, ?string $key = null, ?string $value = null, ?bool $secret = null, ?string $description = null): \Appwrite\Models\Variable { if ($siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); @@ -1329,6 +1338,7 @@ public function updateVariable(string $siteId, string $variableId, ?string $key $apiParams['key'] = $key; $apiParams['value'] = $value; $apiParams['secret'] = $secret; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/src/Appwrite/Services/Storage.php b/src/Appwrite/Services/Storage.php index 2382a1f4..b49bf680 100644 --- a/src/Appwrite/Services/Storage.php +++ b/src/Appwrite/Services/Storage.php @@ -66,7 +66,7 @@ public function listBuckets(?array $queries = null, ?string $search = null, ?boo * * @throws AppwriteException */ - public function createBucket(string $bucketId, string $name, ?array $permissions = null, ?bool $fileSecurity = null, ?bool $enabled = null, ?int $maximumFileSize = null, ?array $allowedFileExtensions = null, ?Compression $compression = null, ?bool $encryption = null, ?bool $antivirus = null, ?bool $transformations = null): \Appwrite\Models\Bucket + public function createBucket(string $bucketId, string $name, ?array $permissions = null, ?bool $fileSecurity = null, ?bool $enabled = null, ?int $maximumFileSize = null, ?array $allowedFileExtensions = null, ?Compression $compression = null, ?bool $encryption = null, ?bool $antivirus = null, ?bool $transformations = null, ?string $description = null, ?bool $stripMetadata = null): \Appwrite\Models\Bucket { $apiPath = str_replace( [], @@ -111,6 +111,14 @@ public function createBucket(string $bucketId, string $name, ?array $permissions $apiParams['transformations'] = $transformations; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + + if (!is_null($stripMetadata)) { + $apiParams['stripMetadata'] = $stripMetadata; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -174,7 +182,7 @@ public function getBucket(string $bucketId): \Appwrite\Models\Bucket * * @throws AppwriteException */ - public function updateBucket(string $bucketId, string $name, ?array $permissions = null, ?bool $fileSecurity = null, ?bool $enabled = null, ?int $maximumFileSize = null, ?array $allowedFileExtensions = null, ?Compression $compression = null, ?bool $encryption = null, ?bool $antivirus = null, ?bool $transformations = null): \Appwrite\Models\Bucket + public function updateBucket(string $bucketId, string $name, ?array $permissions = null, ?bool $fileSecurity = null, ?bool $enabled = null, ?int $maximumFileSize = null, ?array $allowedFileExtensions = null, ?Compression $compression = null, ?bool $encryption = null, ?bool $antivirus = null, ?bool $transformations = null, ?string $description = null, ?bool $stripMetadata = null): \Appwrite\Models\Bucket { if ($bucketId === '') { throw new AppwriteException('Missing required parameter: "bucketId"'); @@ -213,6 +221,8 @@ public function updateBucket(string $bucketId, string $name, ?array $permissions if (!is_null($transformations)) { $apiParams['transformations'] = $transformations; } + $apiParams['description'] = $description; + $apiParams['stripMetadata'] = $stripMetadata; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/src/Appwrite/Services/TablesDB.php b/src/Appwrite/Services/TablesDB.php index 025cc01f..1adca544 100644 --- a/src/Appwrite/Services/TablesDB.php +++ b/src/Appwrite/Services/TablesDB.php @@ -64,7 +64,7 @@ public function list(?array $queries = null, ?string $search = null, ?bool $tota * * @throws AppwriteException */ - public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database + public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $description = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database { $apiPath = str_replace( [], @@ -80,6 +80,10 @@ public function create(string $databaseId, string $name, ?bool $enabled = null, $apiParams['enabled'] = $enabled; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + if (!is_null($specification)) { $apiParams['specification'] = $specification; } @@ -427,7 +431,7 @@ public function get(string $databaseId): \Appwrite\Models\Database * * @throws AppwriteException */ - public function update(string $databaseId, ?string $name = null, ?bool $enabled = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database + public function update(string $databaseId, ?string $name = null, ?bool $enabled = null, ?string $description = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -449,6 +453,7 @@ public function update(string $databaseId, ?string $name = null, ?bool $enabled if (!is_null($enabled)) { $apiParams['enabled'] = $enabled; } + $apiParams['description'] = $description; $apiParams['specification'] = $specification; $apiParams['replicas'] = $replicas; $apiParams['syncMode'] = $syncMode; @@ -969,7 +974,7 @@ public function listTables(string $databaseId, ?array $queries = null, ?string $ * * @throws AppwriteException */ - public function createTable(string $databaseId, string $tableId, string $name, ?array $permissions = null, ?bool $rowSecurity = null, ?bool $enabled = null, ?array $columns = null, ?array $indexes = null): \Appwrite\Models\Table + public function createTable(string $databaseId, string $tableId, string $name, ?array $permissions = null, ?bool $rowSecurity = null, ?bool $enabled = null, ?array $columns = null, ?array $indexes = null, ?string $description = null): \Appwrite\Models\Table { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1003,6 +1008,10 @@ public function createTable(string $databaseId, string $tableId, string $name, ? $apiParams['indexes'] = $indexes; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1071,7 +1080,7 @@ public function getTable(string $databaseId, string $tableId): \Appwrite\Models\ * * @throws AppwriteException */ - public function updateTable(string $databaseId, string $tableId, ?string $name = null, ?array $permissions = null, ?bool $rowSecurity = null, ?bool $enabled = null, ?bool $purge = null): \Appwrite\Models\Table + public function updateTable(string $databaseId, string $tableId, ?string $name = null, ?array $permissions = null, ?bool $rowSecurity = null, ?bool $enabled = null, ?bool $purge = null, ?string $description = null): \Appwrite\Models\Table { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1107,6 +1116,7 @@ public function updateTable(string $databaseId, string $tableId, ?string $name = if (!is_null($purge)) { $apiParams['purge'] = $purge; } + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1223,7 +1233,7 @@ public function listColumns(string $databaseId, string $tableId, ?array $queries * * @throws AppwriteException */ - public function createBigIntColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnBigint + public function createBigIntColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnBigint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1252,6 +1262,10 @@ public function createBigIntColumn(string $databaseId, string $tableId, string $ $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1277,7 +1291,7 @@ public function createBigIntColumn(string $databaseId, string $tableId, string $ * * @throws AppwriteException */ - public function updateBigIntColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null): \Appwrite\Models\ColumnBigint + public function updateBigIntColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnBigint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1306,6 +1320,7 @@ public function updateBigIntColumn(string $databaseId, string $tableId, string $ $apiParams['min'] = $min; $apiParams['max'] = $max; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1331,7 +1346,7 @@ public function updateBigIntColumn(string $databaseId, string $tableId, string $ * * @throws AppwriteException */ - public function createBooleanColumn(string $databaseId, string $tableId, string $key, bool $required, ?bool $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnBoolean + public function createBooleanColumn(string $databaseId, string $tableId, string $key, bool $required, ?bool $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnBoolean { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1358,6 +1373,10 @@ public function createBooleanColumn(string $databaseId, string $tableId, string $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1383,7 +1402,7 @@ public function createBooleanColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function updateBooleanColumn(string $databaseId, string $tableId, string $key, bool $required, ?bool $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnBoolean + public function updateBooleanColumn(string $databaseId, string $tableId, string $key, bool $required, ?bool $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnBoolean { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1410,6 +1429,7 @@ public function updateBooleanColumn(string $databaseId, string $tableId, string $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1435,7 +1455,7 @@ public function updateBooleanColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function createDatetimeColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnDatetime + public function createDatetimeColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnDatetime { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1462,6 +1482,10 @@ public function createDatetimeColumn(string $databaseId, string $tableId, string $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1487,7 +1511,7 @@ public function createDatetimeColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function updateDatetimeColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnDatetime + public function updateDatetimeColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnDatetime { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1514,6 +1538,7 @@ public function updateDatetimeColumn(string $databaseId, string $tableId, string $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1539,7 +1564,7 @@ public function updateDatetimeColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function createEmailColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnEmail + public function createEmailColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnEmail { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1566,6 +1591,10 @@ public function createEmailColumn(string $databaseId, string $tableId, string $k $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1591,7 +1620,7 @@ public function createEmailColumn(string $databaseId, string $tableId, string $k * * @throws AppwriteException */ - public function updateEmailColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnEmail + public function updateEmailColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnEmail { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1618,6 +1647,7 @@ public function updateEmailColumn(string $databaseId, string $tableId, string $k $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1644,7 +1674,7 @@ public function updateEmailColumn(string $databaseId, string $tableId, string $k * * @throws AppwriteException */ - public function createEnumColumn(string $databaseId, string $tableId, string $key, array $elements, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnEnum + public function createEnumColumn(string $databaseId, string $tableId, string $key, array $elements, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnEnum { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1672,6 +1702,10 @@ public function createEnumColumn(string $databaseId, string $tableId, string $ke $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1697,7 +1731,7 @@ public function createEnumColumn(string $databaseId, string $tableId, string $ke * * @throws AppwriteException */ - public function updateEnumColumn(string $databaseId, string $tableId, string $key, array $elements, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnEnum + public function updateEnumColumn(string $databaseId, string $tableId, string $key, array $elements, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnEnum { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1725,6 +1759,7 @@ public function updateEnumColumn(string $databaseId, string $tableId, string $ke $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1751,7 +1786,7 @@ public function updateEnumColumn(string $databaseId, string $tableId, string $ke * * @throws AppwriteException */ - public function createFloatColumn(string $databaseId, string $tableId, string $key, bool $required, ?float $min = null, ?float $max = null, ?float $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnFloat + public function createFloatColumn(string $databaseId, string $tableId, string $key, bool $required, ?float $min = null, ?float $max = null, ?float $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnFloat { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1780,6 +1815,10 @@ public function createFloatColumn(string $databaseId, string $tableId, string $k $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1805,7 +1844,7 @@ public function createFloatColumn(string $databaseId, string $tableId, string $k * * @throws AppwriteException */ - public function updateFloatColumn(string $databaseId, string $tableId, string $key, bool $required, ?float $xdefault, ?float $min = null, ?float $max = null, ?string $newKey = null): \Appwrite\Models\ColumnFloat + public function updateFloatColumn(string $databaseId, string $tableId, string $key, bool $required, ?float $xdefault, ?float $min = null, ?float $max = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnFloat { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1834,6 +1873,7 @@ public function updateFloatColumn(string $databaseId, string $tableId, string $k $apiParams['min'] = $min; $apiParams['max'] = $max; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1860,7 +1900,7 @@ public function updateFloatColumn(string $databaseId, string $tableId, string $k * * @throws AppwriteException */ - public function createIntegerColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnInteger + public function createIntegerColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $min = null, ?int $max = null, ?int $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnInteger { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1889,6 +1929,10 @@ public function createIntegerColumn(string $databaseId, string $tableId, string $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -1914,7 +1958,7 @@ public function createIntegerColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function updateIntegerColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null): \Appwrite\Models\ColumnInteger + public function updateIntegerColumn(string $databaseId, string $tableId, string $key, bool $required, ?int $xdefault, ?int $min = null, ?int $max = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnInteger { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1943,6 +1987,7 @@ public function updateIntegerColumn(string $databaseId, string $tableId, string $apiParams['min'] = $min; $apiParams['max'] = $max; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1968,7 +2013,7 @@ public function updateIntegerColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function createIpColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnIp + public function createIpColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnIp { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1995,6 +2040,10 @@ public function createIpColumn(string $databaseId, string $tableId, string $key, $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2020,7 +2069,7 @@ public function createIpColumn(string $databaseId, string $tableId, string $key, * * @throws AppwriteException */ - public function updateIpColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnIp + public function updateIpColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnIp { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2047,6 +2096,7 @@ public function updateIpColumn(string $databaseId, string $tableId, string $key, $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2072,7 +2122,7 @@ public function updateIpColumn(string $databaseId, string $tableId, string $key, * * @throws AppwriteException */ - public function createLineColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null): \Appwrite\Models\ColumnLine + public function createLineColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $description = null): \Appwrite\Models\ColumnLine { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2095,6 +2145,10 @@ public function createLineColumn(string $databaseId, string $tableId, string $ke $apiParams['required'] = $required; $apiParams['default'] = $xdefault; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2120,7 +2174,7 @@ public function createLineColumn(string $databaseId, string $tableId, string $ke * * @throws AppwriteException */ - public function updateLineColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null): \Appwrite\Models\ColumnLine + public function updateLineColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnLine { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2147,6 +2201,7 @@ public function updateLineColumn(string $databaseId, string $tableId, string $ke $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2172,7 +2227,7 @@ public function updateLineColumn(string $databaseId, string $tableId, string $ke * * @throws AppwriteException */ - public function createLongtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\ColumnLongtext + public function createLongtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\ColumnLongtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2203,6 +2258,10 @@ public function createLongtextColumn(string $databaseId, string $tableId, string $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2228,7 +2287,7 @@ public function createLongtextColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function updateLongtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnLongtext + public function updateLongtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnLongtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2255,6 +2314,7 @@ public function updateLongtextColumn(string $databaseId, string $tableId, string $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2280,7 +2340,7 @@ public function updateLongtextColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function createMediumtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\ColumnMediumtext + public function createMediumtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\ColumnMediumtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2311,6 +2371,10 @@ public function createMediumtextColumn(string $databaseId, string $tableId, stri $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2336,7 +2400,7 @@ public function createMediumtextColumn(string $databaseId, string $tableId, stri * * @throws AppwriteException */ - public function updateMediumtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnMediumtext + public function updateMediumtextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnMediumtext { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2363,6 +2427,7 @@ public function updateMediumtextColumn(string $databaseId, string $tableId, stri $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2388,7 +2453,7 @@ public function updateMediumtextColumn(string $databaseId, string $tableId, stri * * @throws AppwriteException */ - public function createPointColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null): \Appwrite\Models\ColumnPoint + public function createPointColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $description = null): \Appwrite\Models\ColumnPoint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2411,6 +2476,10 @@ public function createPointColumn(string $databaseId, string $tableId, string $k $apiParams['required'] = $required; $apiParams['default'] = $xdefault; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2436,7 +2505,7 @@ public function createPointColumn(string $databaseId, string $tableId, string $k * * @throws AppwriteException */ - public function updatePointColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null): \Appwrite\Models\ColumnPoint + public function updatePointColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnPoint { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2463,6 +2532,7 @@ public function updatePointColumn(string $databaseId, string $tableId, string $k $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2488,7 +2558,7 @@ public function updatePointColumn(string $databaseId, string $tableId, string $k * * @throws AppwriteException */ - public function createPolygonColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null): \Appwrite\Models\ColumnPolygon + public function createPolygonColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $description = null): \Appwrite\Models\ColumnPolygon { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2511,6 +2581,10 @@ public function createPolygonColumn(string $databaseId, string $tableId, string $apiParams['required'] = $required; $apiParams['default'] = $xdefault; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2536,7 +2610,7 @@ public function createPolygonColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function updatePolygonColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null): \Appwrite\Models\ColumnPolygon + public function updatePolygonColumn(string $databaseId, string $tableId, string $key, bool $required, ?array $xdefault = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnPolygon { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2563,6 +2637,7 @@ public function updatePolygonColumn(string $databaseId, string $tableId, string $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2589,7 +2664,7 @@ public function updatePolygonColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function createRelationshipColumn(string $databaseId, string $tableId, string $relatedTableId, RelationshipType $type, ?bool $twoWay = null, ?string $key = null, ?string $twoWayKey = null, ?RelationMutate $onDelete = null): \Appwrite\Models\ColumnRelationship + public function createRelationshipColumn(string $databaseId, string $tableId, string $relatedTableId, RelationshipType $type, ?bool $twoWay = null, ?string $key = null, ?string $twoWayKey = null, ?RelationMutate $onDelete = null, ?string $description = null): \Appwrite\Models\ColumnRelationship { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2621,6 +2696,10 @@ public function createRelationshipColumn(string $databaseId, string $tableId, st $apiParams['onDelete'] = $onDelete; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2646,7 +2725,7 @@ public function createRelationshipColumn(string $databaseId, string $tableId, st * * @throws AppwriteException */ - public function updateRelationshipColumn(string $databaseId, string $tableId, string $key, ?RelationMutate $onDelete = null, ?string $newKey = null): \Appwrite\Models\ColumnRelationship + public function updateRelationshipColumn(string $databaseId, string $tableId, string $key, ?RelationMutate $onDelete = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnRelationship { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2672,6 +2751,7 @@ public function updateRelationshipColumn(string $databaseId, string $tableId, st $apiParams['key'] = $key; $apiParams['onDelete'] = $onDelete; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2700,7 +2780,7 @@ public function updateRelationshipColumn(string $databaseId, string $tableId, st * @deprecated This API has been deprecated since 1.9.0. Please use `createTextColumn` instead. * @see TablesDB::createTextColumn */ - public function createStringColumn(string $databaseId, string $tableId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\ColumnString + public function createStringColumn(string $databaseId, string $tableId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\ColumnString { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2732,6 +2812,10 @@ public function createStringColumn(string $databaseId, string $tableId, string $ $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2760,7 +2844,7 @@ public function createStringColumn(string $databaseId, string $tableId, string $ * @deprecated This API has been deprecated since 1.8.0. Please use `updateTextColumn` instead. * @see TablesDB::updateTextColumn */ - public function updateStringColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null): \Appwrite\Models\ColumnString + public function updateStringColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnString { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2788,6 +2872,7 @@ public function updateStringColumn(string $databaseId, string $tableId, string $ $apiParams['default'] = $xdefault; $apiParams['size'] = $size; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2813,7 +2898,7 @@ public function updateStringColumn(string $databaseId, string $tableId, string $ * * @throws AppwriteException */ - public function createTextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\ColumnText + public function createTextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\ColumnText { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2844,6 +2929,10 @@ public function createTextColumn(string $databaseId, string $tableId, string $ke $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2869,7 +2958,7 @@ public function createTextColumn(string $databaseId, string $tableId, string $ke * * @throws AppwriteException */ - public function updateTextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnText + public function updateTextColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnText { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2896,6 +2985,7 @@ public function updateTextColumn(string $databaseId, string $tableId, string $ke $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -2921,7 +3011,7 @@ public function updateTextColumn(string $databaseId, string $tableId, string $ke * * @throws AppwriteException */ - public function createUrlColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null): \Appwrite\Models\ColumnUrl + public function createUrlColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?string $description = null): \Appwrite\Models\ColumnUrl { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -2948,6 +3038,10 @@ public function createUrlColumn(string $databaseId, string $tableId, string $key $apiParams['array'] = $xarray; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -2973,7 +3067,7 @@ public function createUrlColumn(string $databaseId, string $tableId, string $key * * @throws AppwriteException */ - public function updateUrlColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null): \Appwrite\Models\ColumnUrl + public function updateUrlColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnUrl { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -3000,6 +3094,7 @@ public function updateUrlColumn(string $databaseId, string $tableId, string $key $apiParams['required'] = $required; $apiParams['default'] = $xdefault; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -3025,7 +3120,7 @@ public function updateUrlColumn(string $databaseId, string $tableId, string $key * * @throws AppwriteException */ - public function createVarcharColumn(string $databaseId, string $tableId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null): \Appwrite\Models\ColumnVarchar + public function createVarcharColumn(string $databaseId, string $tableId, string $key, int $size, bool $required, ?string $xdefault = null, ?bool $xarray = null, ?bool $encrypt = null, ?string $description = null): \Appwrite\Models\ColumnVarchar { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -3057,6 +3152,10 @@ public function createVarcharColumn(string $databaseId, string $tableId, string $apiParams['encrypt'] = $encrypt; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -3082,7 +3181,7 @@ public function createVarcharColumn(string $databaseId, string $tableId, string * * @throws AppwriteException */ - public function updateVarcharColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null): \Appwrite\Models\ColumnVarchar + public function updateVarcharColumn(string $databaseId, string $tableId, string $key, bool $required, ?string $xdefault, ?int $size = null, ?string $newKey = null, ?string $description = null): \Appwrite\Models\ColumnVarchar { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -3110,6 +3209,7 @@ public function updateVarcharColumn(string $databaseId, string $tableId, string $apiParams['default'] = $xdefault; $apiParams['size'] = $size; $apiParams['newKey'] = $newKey; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -3353,7 +3453,7 @@ public function listIndexes(string $databaseId, string $tableId, ?array $queries * * @throws AppwriteException */ - public function createIndex(string $databaseId, string $tableId, string $key, TablesDBIndexType $type, array $columns, ?array $orders = null, ?array $lengths = null): \Appwrite\Models\ColumnIndex + public function createIndex(string $databaseId, string $tableId, string $key, TablesDBIndexType $type, array $columns, ?array $orders = null, ?array $lengths = null, ?string $description = null): \Appwrite\Models\ColumnIndex { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -3384,6 +3484,10 @@ public function createIndex(string $databaseId, string $tableId, string $key, Ta $apiParams['lengths'] = $lengths; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -3498,6 +3602,14 @@ public function deleteIndex(string $databaseId, string $tableId, string $key): s * Get a list of all the user's rows in a given table. You can use the query * params to filter your results. * + * Rows returned by aggregate, groupBy or distinct queries hold only the + * columns they select, group or aggregate, typed as a row types them, with a + * joined column named by its join alias (`alias.column`). The response omits + * their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, + * `$databaseId` and `$tableId` unless they select or group it, and those of a + * right or full join row that no row of this table matched. SDK row models + * fill omitted system columns with empty values. + * * @throws AppwriteException */ public function listRows(string $databaseId, string $tableId, ?array $queries = null, ?string $transactionId = null, ?bool $total = null, ?int $ttl = null): \Appwrite\Models\RowList @@ -3810,6 +3922,66 @@ public function deleteRows(string $databaseId, string $tableId, ?array $queries return \Appwrite\Models\RowList::from($response); } + /** + * Get a list of all the user's rows in a given table using a POST request. + * This behaves identically to the list rows endpoint but accepts the queries + * in the request body, allowing much larger `queries` arrays than can fit in + * a URL query string. + * + * @throws AppwriteException + */ + public function createQuery(string $databaseId, string $tableId, ?array $queries = null, ?string $transactionId = null, ?bool $total = null, ?int $ttl = null): \Appwrite\Models\RowList + { + if ($databaseId === '') { + throw new AppwriteException('Missing required parameter: "databaseId"'); + } + + if ($tableId === '') { + throw new AppwriteException('Missing required parameter: "tableId"'); + } + + $apiPath = str_replace( + ['{databaseId}', '{tableId}'], + [$databaseId, $tableId], + '/tablesdb/{databaseId}/tables/{tableId}/rows/query' + ); + + $apiParams = []; + $apiParams['databaseId'] = $databaseId; + $apiParams['tableId'] = $tableId; + + if (!is_null($queries)) { + $apiParams['queries'] = $queries; + } + $apiParams['transactionId'] = $transactionId; + + if (!is_null($total)) { + $apiParams['total'] = $total; + } + + if (!is_null($ttl)) { + $apiParams['ttl'] = $ttl; + } + + $apiHeaders = []; + $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); + $apiHeaders['content-type'] = 'application/json'; + $apiHeaders['accept'] = 'application/json'; + + $response = $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + + if (!is_array($response)) { + throw new \UnexpectedValueException('Expected array response when hydrating a response model.'); + } + + return \Appwrite\Models\RowList::from($response); + } + /** * Get a row by its unique ID. This endpoint response returns a JSON object * with the row data. diff --git a/src/Appwrite/Services/VectorsDB.php b/src/Appwrite/Services/VectorsDB.php index 053efccb..e557a49e 100644 --- a/src/Appwrite/Services/VectorsDB.php +++ b/src/Appwrite/Services/VectorsDB.php @@ -58,7 +58,7 @@ public function list(?array $queries = null, ?bool $total = null): \Appwrite\Mod * * @throws AppwriteException */ - public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database + public function create(string $databaseId, string $name, ?bool $enabled = null, ?string $description = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database { $apiPath = str_replace( [], @@ -74,6 +74,10 @@ public function create(string $databaseId, string $name, ?bool $enabled = null, $apiParams['enabled'] = $enabled; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + if (!is_null($specification)) { $apiParams['specification'] = $specification; } @@ -421,7 +425,7 @@ public function get(string $databaseId): \Appwrite\Models\Database * * @throws AppwriteException */ - public function update(string $databaseId, string $name, ?bool $enabled = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database + public function update(string $databaseId, string $name, ?bool $enabled = null, ?string $description = null, ?string $specification = null, ?int $replicas = null, ?string $syncMode = null): \Appwrite\Models\Database { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -440,6 +444,7 @@ public function update(string $databaseId, string $name, ?bool $enabled = null, if (!is_null($enabled)) { $apiParams['enabled'] = $enabled; } + $apiParams['description'] = $description; $apiParams['specification'] = $specification; $apiParams['replicas'] = $replicas; $apiParams['syncMode'] = $syncMode; @@ -556,7 +561,7 @@ public function listCollections(string $databaseId, ?array $queries = null, ?str * * @throws AppwriteException */ - public function createCollection(string $databaseId, string $collectionId, string $name, int $dimension, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null): \Appwrite\Models\VectorsdbCollection + public function createCollection(string $databaseId, string $collectionId, string $name, int $dimension, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?string $description = null): \Appwrite\Models\VectorsdbCollection { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -586,6 +591,10 @@ public function createCollection(string $databaseId, string $collectionId, strin $apiParams['enabled'] = $enabled; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -654,7 +663,7 @@ public function getCollection(string $databaseId, string $collectionId): \Appwri * * @throws AppwriteException */ - public function updateCollection(string $databaseId, string $collectionId, string $name, ?int $dimension = null, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null): \Appwrite\Models\VectorsdbCollection + public function updateCollection(string $databaseId, string $collectionId, string $name, ?int $dimension = null, ?array $permissions = null, ?bool $documentSecurity = null, ?bool $enabled = null, ?string $description = null): \Appwrite\Models\VectorsdbCollection { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -687,6 +696,7 @@ public function updateCollection(string $databaseId, string $collectionId, strin $apiParams['documentSecurity'] = $documentSecurity; } $apiParams['enabled'] = $enabled; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); @@ -1429,7 +1439,7 @@ public function listIndexes(string $databaseId, string $collectionId, ?array $qu * * @throws AppwriteException */ - public function createIndex(string $databaseId, string $collectionId, string $key, VectorsDBIndexType $type, array $attributes, ?array $orders = null, ?array $lengths = null): \Appwrite\Models\Index + public function createIndex(string $databaseId, string $collectionId, string $key, VectorsDBIndexType $type, array $attributes, ?array $orders = null, ?array $lengths = null, ?string $description = null): \Appwrite\Models\Index { if ($databaseId === '') { throw new AppwriteException('Missing required parameter: "databaseId"'); @@ -1460,6 +1470,10 @@ public function createIndex(string $databaseId, string $collectionId, string $ke $apiParams['lengths'] = $lengths; } + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; diff --git a/src/Appwrite/Services/Webhooks.php b/src/Appwrite/Services/Webhooks.php index 7563d2ff..7076a7d6 100644 --- a/src/Appwrite/Services/Webhooks.php +++ b/src/Appwrite/Services/Webhooks.php @@ -58,7 +58,7 @@ public function list(?array $queries = null, ?bool $total = null): \Appwrite\Mod * * @throws AppwriteException */ - public function create(string $webhookId, string $url, string $name, array $events, ?bool $enabled = null, ?bool $tls = null, ?string $authUsername = null, ?string $authPassword = null, ?string $secret = null): \Appwrite\Models\Webhook + public function create(string $webhookId, string $url, string $name, array $events, ?bool $enabled = null, ?bool $tls = null, ?string $authUsername = null, ?string $authPassword = null, ?string $secret = null, ?string $description = null): \Appwrite\Models\Webhook { $apiPath = str_replace( [], @@ -89,6 +89,10 @@ public function create(string $webhookId, string $url, string $name, array $even } $apiParams['secret'] = $secret; + if (!is_null($description)) { + $apiParams['description'] = $description; + } + $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); $apiHeaders['content-type'] = 'application/json'; @@ -153,7 +157,7 @@ public function get(string $webhookId): \Appwrite\Models\Webhook * * @throws AppwriteException */ - public function update(string $webhookId, string $name, string $url, array $events, ?bool $enabled = null, ?bool $tls = null, ?string $authUsername = null, ?string $authPassword = null): \Appwrite\Models\Webhook + public function update(string $webhookId, string $name, string $url, array $events, ?bool $enabled = null, ?bool $tls = null, ?string $authUsername = null, ?string $authPassword = null, ?string $description = null): \Appwrite\Models\Webhook { if ($webhookId === '') { throw new AppwriteException('Missing required parameter: "webhookId"'); @@ -183,6 +187,7 @@ public function update(string $webhookId, string $name, string $url, array $even $apiParams['authUsername'] = $authUsername; } $apiParams['authPassword'] = $authPassword; + $apiParams['description'] = $description; $apiHeaders = []; $apiHeaders['X-Appwrite-Project'] = $this->client->getConfig('project'); diff --git a/tests/Appwrite/QueryTest.php b/tests/Appwrite/QueryTest.php index cf4f85ad..07fbdb10 100644 --- a/tests/Appwrite/QueryTest.php +++ b/tests/Appwrite/QueryTest.php @@ -540,6 +540,23 @@ public function testCrossJoin(): void $this->assertSame(['ord'], $query['values']); } + public function testNestedJoinWithoutAliasLeavesTheAliasToTheServer(): void + { + $query = json_decode(Query::join('orders', [Query::on('$id', 'customerId')]), true); + $this->assertSame('join', $query['method']); + $this->assertSame('orders', $query['attribute']); + $this->assertCount(1, $query['values']); + $this->assertSame('on', $query['values'][0]['method']); + } + + public function testCrossJoinWithoutAliasLeavesTheAliasToTheServer(): void + { + $query = json_decode(Query::crossJoin('orders'), true); + $this->assertSame('crossJoin', $query['method']); + $this->assertSame('orders', $query['attribute']); + $this->assertSame([], $query['values'] ?? []); + } + public function testNotCovers(): void { $query = json_decode(Query::notCovers('location', [1, 2]), true); diff --git a/tests/Appwrite/Services/AccountTest.php b/tests/Appwrite/Services/AccountTest.php index eed55b62..d36ac0e4 100644 --- a/tests/Appwrite/Services/AccountTest.php +++ b/tests/Appwrite/Services/AccountTest.php @@ -367,6 +367,42 @@ public function testMethodDeleteIdentity(): void $this->assertSame($data, $response); } + public function testMethodListMemberships(): void + { + $data = [ + "total" => 5, + "memberships" => [ + [ + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "userId" => "5e5ea5c16897e", + "userName" => "John Doe", + "userEmail" => "john@appwrite.io", + "userPhone" => "+1 555 555 5555", + "teamId" => "5e5ea5c16897e", + "teamName" => "VIP", + "invited" => "2020-10-15T06:38:00.000+00:00", + "joined" => "2020-10-15T06:38:00.000+00:00", + "confirm" => true, + "mfa" => true, + "userAccessedAt" => "2020-10-15T06:38:00.000+00:00", + "roles" => [] + ] + ] + ]; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + $this->client + ->allows()->getConfig(Mockery::any()) + ->andReturn(''); + + $response = $this->account->listMemberships(); + + $this->assertInstanceOf(\Appwrite\Models\MembershipList::class, $response); + } public function testMethodUpdateMFA(): void { $data = [ diff --git a/tests/Appwrite/Services/DatabasesTest.php b/tests/Appwrite/Services/DatabasesTest.php index b8aeaf1e..7b2ec9e8 100644 --- a/tests/Appwrite/Services/DatabasesTest.php +++ b/tests/Appwrite/Services/DatabasesTest.php @@ -30,6 +30,7 @@ public function testMethodList(): void [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -54,6 +55,7 @@ public function testMethodCreate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -217,6 +219,7 @@ public function testMethodGet(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -241,6 +244,7 @@ public function testMethodUpdate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -289,6 +293,7 @@ public function testMethodListCollections(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -298,6 +303,7 @@ public function testMethodListCollections(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -333,6 +339,7 @@ public function testMethodCreateCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -342,6 +349,7 @@ public function testMethodCreateCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -377,6 +385,7 @@ public function testMethodGetCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -386,6 +395,7 @@ public function testMethodGetCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -420,6 +430,7 @@ public function testMethodUpdateCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -429,6 +440,7 @@ public function testMethodUpdateCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -497,6 +509,7 @@ public function testMethodCreateBigIntAttribute(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "bigint", "status" => "available", "error" => "string", @@ -525,6 +538,7 @@ public function testMethodUpdateBigIntAttribute(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "bigint", "status" => "available", "error" => "string", @@ -554,6 +568,7 @@ public function testMethodCreateBooleanAttribute(): void { $data = [ "key" => "isEnabled", + "description" => "Name shown on the public profile.", "type" => "boolean", "status" => "available", "error" => "string", @@ -582,6 +597,7 @@ public function testMethodUpdateBooleanAttribute(): void { $data = [ "key" => "isEnabled", + "description" => "Name shown on the public profile.", "type" => "boolean", "status" => "available", "error" => "string", @@ -611,6 +627,7 @@ public function testMethodCreateDatetimeAttribute(): void { $data = [ "key" => "birthDay", + "description" => "Name shown on the public profile.", "type" => "datetime", "status" => "available", "error" => "string", @@ -640,6 +657,7 @@ public function testMethodUpdateDatetimeAttribute(): void { $data = [ "key" => "birthDay", + "description" => "Name shown on the public profile.", "type" => "datetime", "status" => "available", "error" => "string", @@ -670,6 +688,7 @@ public function testMethodCreateEmailAttribute(): void { $data = [ "key" => "userEmail", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -699,6 +718,7 @@ public function testMethodUpdateEmailAttribute(): void { $data = [ "key" => "userEmail", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -729,6 +749,7 @@ public function testMethodCreateEnumAttribute(): void { $data = [ "key" => "status", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -760,6 +781,7 @@ public function testMethodUpdateEnumAttribute(): void { $data = [ "key" => "status", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -792,6 +814,7 @@ public function testMethodCreateFloatAttribute(): void { $data = [ "key" => "percentageCompleted", + "description" => "Name shown on the public profile.", "type" => "double", "status" => "available", "error" => "string", @@ -820,6 +843,7 @@ public function testMethodUpdateFloatAttribute(): void { $data = [ "key" => "percentageCompleted", + "description" => "Name shown on the public profile.", "type" => "double", "status" => "available", "error" => "string", @@ -849,6 +873,7 @@ public function testMethodCreateIntegerAttribute(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "integer", "status" => "available", "error" => "string", @@ -877,6 +902,7 @@ public function testMethodUpdateIntegerAttribute(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "integer", "status" => "available", "error" => "string", @@ -906,6 +932,7 @@ public function testMethodCreateIpAttribute(): void { $data = [ "key" => "ipAddress", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -935,6 +962,7 @@ public function testMethodUpdateIpAttribute(): void { $data = [ "key" => "ipAddress", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -965,6 +993,7 @@ public function testMethodCreateLineAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -993,6 +1022,7 @@ public function testMethodUpdateLineAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1021,6 +1051,7 @@ public function testMethodCreateLongtextAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1049,6 +1080,7 @@ public function testMethodUpdateLongtextAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1078,6 +1110,7 @@ public function testMethodCreateMediumtextAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1106,6 +1139,7 @@ public function testMethodUpdateMediumtextAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1135,6 +1169,7 @@ public function testMethodCreatePointAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1163,6 +1198,7 @@ public function testMethodUpdatePointAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1191,6 +1227,7 @@ public function testMethodCreatePolygonAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1219,6 +1256,7 @@ public function testMethodUpdatePolygonAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1247,6 +1285,7 @@ public function testMethodCreateRelationshipAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1281,6 +1320,7 @@ public function testMethodUpdateRelationshipAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1314,6 +1354,7 @@ public function testMethodCreateStringAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1344,6 +1385,7 @@ public function testMethodUpdateStringAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1374,6 +1416,7 @@ public function testMethodCreateTextAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1402,6 +1445,7 @@ public function testMethodUpdateTextAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1431,6 +1475,7 @@ public function testMethodCreateUrlAttribute(): void { $data = [ "key" => "githubUrl", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1460,6 +1505,7 @@ public function testMethodUpdateUrlAttribute(): void { $data = [ "key" => "githubUrl", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1490,6 +1536,7 @@ public function testMethodCreateVarcharAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1520,6 +1567,7 @@ public function testMethodUpdateVarcharAttribute(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1551,6 +1599,7 @@ public function testMethodGetAttribute(): void $data = array_replace( [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1783,6 +1832,37 @@ public function testMethodDeleteDocuments(): void $this->assertInstanceOf(\Appwrite\Models\DocumentList::class, $response); } + public function testMethodCreateQuery(): void + { + $data = [ + "total" => 5, + "documents" => [ + [ + "\$id" => "5e5ea5c16897e", + "\$sequence" => "1", + "\$collectionId" => "5e5ea5c15117e", + "\$databaseId" => "5e5ea5c15117e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "\$permissions" => [] + ] + ] + ]; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + $this->client + ->allows()->getConfig(Mockery::any()) + ->andReturn(''); + + $response = $this->databases->createQuery( + "", + "" + ); + + $this->assertInstanceOf(\Appwrite\Models\DocumentList::class, $response); + } public function testMethodGetDocument(): void { $data = [ @@ -1949,6 +2029,7 @@ public function testMethodListIndexes(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -1979,6 +2060,7 @@ public function testMethodCreateIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -2010,6 +2092,7 @@ public function testMethodGetIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", diff --git a/tests/Appwrite/Services/DocumentsDBTest.php b/tests/Appwrite/Services/DocumentsDBTest.php index 9f51a063..09832cec 100644 --- a/tests/Appwrite/Services/DocumentsDBTest.php +++ b/tests/Appwrite/Services/DocumentsDBTest.php @@ -29,6 +29,7 @@ public function testMethodList(): void [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -53,6 +54,7 @@ public function testMethodCreate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -250,6 +252,7 @@ public function testMethodGet(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -274,6 +277,7 @@ public function testMethodUpdate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -323,6 +327,7 @@ public function testMethodListCollections(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -332,6 +337,7 @@ public function testMethodListCollections(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -367,6 +373,7 @@ public function testMethodCreateCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -376,6 +383,7 @@ public function testMethodCreateCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -411,6 +419,7 @@ public function testMethodGetCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -420,6 +429,7 @@ public function testMethodGetCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -454,6 +464,7 @@ public function testMethodUpdateCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -463,6 +474,7 @@ public function testMethodUpdateCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -692,6 +704,37 @@ public function testMethodDeleteDocuments(): void $this->assertInstanceOf(\Appwrite\Models\DocumentList::class, $response); } + public function testMethodCreateQuery(): void + { + $data = [ + "total" => 5, + "documents" => [ + [ + "\$id" => "5e5ea5c16897e", + "\$sequence" => "1", + "\$collectionId" => "5e5ea5c15117e", + "\$databaseId" => "5e5ea5c15117e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "\$permissions" => [] + ] + ] + ]; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + $this->client + ->allows()->getConfig(Mockery::any()) + ->andReturn(''); + + $response = $this->documentsDB->createQuery( + "", + "" + ); + + $this->assertInstanceOf(\Appwrite\Models\DocumentList::class, $response); + } public function testMethodGetDocument(): void { $data = [ @@ -858,6 +901,7 @@ public function testMethodListIndexes(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -888,6 +932,7 @@ public function testMethodCreateIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -919,6 +964,7 @@ public function testMethodGetIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", diff --git a/tests/Appwrite/Services/FunctionsTest.php b/tests/Appwrite/Services/FunctionsTest.php index f229cb11..472f93f6 100644 --- a/tests/Appwrite/Services/FunctionsTest.php +++ b/tests/Appwrite/Services/FunctionsTest.php @@ -35,6 +35,7 @@ public function testMethodList(): void "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "execute" => [], "name" => "My Function", + "description" => "Sends a welcome email to newly registered users.", "enabled" => true, "live" => true, "logging" => true, @@ -52,6 +53,7 @@ public function testMethodList(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -97,6 +99,7 @@ public function testMethodCreate(): void "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "execute" => [], "name" => "My Function", + "description" => "Sends a welcome email to newly registered users.", "enabled" => true, "live" => true, "logging" => true, @@ -114,6 +117,7 @@ public function testMethodCreate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -215,6 +219,7 @@ public function testMethodGet(): void "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "execute" => [], "name" => "My Function", + "description" => "Sends a welcome email to newly registered users.", "enabled" => true, "live" => true, "logging" => true, @@ -232,6 +237,7 @@ public function testMethodGet(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -277,6 +283,7 @@ public function testMethodUpdate(): void "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "execute" => [], "name" => "My Function", + "description" => "Sends a welcome email to newly registered users.", "enabled" => true, "live" => true, "logging" => true, @@ -294,6 +301,7 @@ public function testMethodUpdate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -357,6 +365,7 @@ public function testMethodUpdateFunctionDeployment(): void "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "execute" => [], "name" => "My Function", + "description" => "Sends a welcome email to newly registered users.", "enabled" => true, "live" => true, "logging" => true, @@ -374,6 +383,7 @@ public function testMethodUpdateFunctionDeployment(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -952,6 +962,7 @@ public function testMethodListVariables(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -980,6 +991,7 @@ public function testMethodCreateVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -1009,6 +1021,7 @@ public function testMethodGetVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -1036,6 +1049,7 @@ public function testMethodUpdateVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", diff --git a/tests/Appwrite/Services/MessagingTest.php b/tests/Appwrite/Services/MessagingTest.php index 41ee48b5..ce0fea20 100644 --- a/tests/Appwrite/Services/MessagingTest.php +++ b/tests/Appwrite/Services/MessagingTest.php @@ -1070,6 +1070,7 @@ public function testMethodListTopics(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "events", + "description" => "Order status updates sent to customers.", "emailTotal" => 100, "smsTotal" => 100, "pushTotal" => 100, @@ -1096,6 +1097,7 @@ public function testMethodCreateTopic(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "events", + "description" => "Order status updates sent to customers.", "emailTotal" => 100, "smsTotal" => 100, "pushTotal" => 100, @@ -1123,6 +1125,7 @@ public function testMethodGetTopic(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "events", + "description" => "Order status updates sent to customers.", "emailTotal" => 100, "smsTotal" => 100, "pushTotal" => 100, @@ -1149,6 +1152,7 @@ public function testMethodUpdateTopic(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "events", + "description" => "Order status updates sent to customers.", "emailTotal" => 100, "smsTotal" => 100, "pushTotal" => 100, diff --git a/tests/Appwrite/Services/OrganizationTest.php b/tests/Appwrite/Services/OrganizationTest.php index 7fa0c08a..26e9a62f 100644 --- a/tests/Appwrite/Services/OrganizationTest.php +++ b/tests/Appwrite/Services/OrganizationTest.php @@ -99,6 +99,7 @@ public function testMethodGet(): void "deploymentSize" => 30, "buildSize" => 2000, "functionsIntervalMinimum" => 60, + "functionsAllowCron" => true, "databasesAllowEncrypt" => true, "group" => "free", "databaseComputeCredit" => 10 @@ -199,6 +200,7 @@ public function testMethodUpdate(): void "deploymentSize" => 30, "buildSize" => 2000, "functionsIntervalMinimum" => 60, + "functionsAllowCron" => true, "databasesAllowEncrypt" => true, "group" => "free", "databaseComputeCredit" => 10 @@ -815,6 +817,7 @@ public function testMethodListProjectKeys(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -844,6 +847,7 @@ public function testMethodCreateEphemeralProjectKey(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -873,6 +877,7 @@ public function testMethodGetProjectKey(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -901,6 +906,7 @@ public function testMethodUpdateProjectKey(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", diff --git a/tests/Appwrite/Services/ProjectTest.php b/tests/Appwrite/Services/ProjectTest.php index 5d9b3983..0703c960 100644 --- a/tests/Appwrite/Services/ProjectTest.php +++ b/tests/Appwrite/Services/ProjectTest.php @@ -469,6 +469,7 @@ public function testMethodListKeys(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -496,6 +497,7 @@ public function testMethodCreateEphemeralKey(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -524,6 +526,7 @@ public function testMethodGetKey(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -551,6 +554,7 @@ public function testMethodUpdateKey(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My API Key", + "description" => "Used by the nightly backup job.", "expire" => "2020-10-15T06:38:00.000+00:00", "scopes" => [], "secret" => "919c2d18fb5d4...a2ae413da83346ad2", @@ -3700,6 +3704,7 @@ public function testMethodListVariables(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -3726,6 +3731,7 @@ public function testMethodCreateVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -3754,6 +3760,7 @@ public function testMethodGetVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -3780,6 +3787,7 @@ public function testMethodUpdateVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", diff --git a/tests/Appwrite/Services/SitesTest.php b/tests/Appwrite/Services/SitesTest.php index 0b0f8581..1c279f50 100644 --- a/tests/Appwrite/Services/SitesTest.php +++ b/tests/Appwrite/Services/SitesTest.php @@ -35,6 +35,7 @@ public function testMethodList(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Site", + "description" => "Marketing site for the spring launch.", "enabled" => true, "live" => true, "logging" => true, @@ -54,6 +55,7 @@ public function testMethodList(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -99,6 +101,7 @@ public function testMethodCreate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Site", + "description" => "Marketing site for the spring launch.", "enabled" => true, "live" => true, "logging" => true, @@ -118,6 +121,7 @@ public function testMethodCreate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -224,6 +228,7 @@ public function testMethodGet(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Site", + "description" => "Marketing site for the spring launch.", "enabled" => true, "live" => true, "logging" => true, @@ -243,6 +248,7 @@ public function testMethodGet(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -288,6 +294,7 @@ public function testMethodUpdate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Site", + "description" => "Marketing site for the spring launch.", "enabled" => true, "live" => true, "logging" => true, @@ -307,6 +314,7 @@ public function testMethodUpdate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -371,6 +379,7 @@ public function testMethodUpdateSiteDeployment(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Site", + "description" => "Marketing site for the spring launch.", "enabled" => true, "live" => true, "logging" => true, @@ -390,6 +399,7 @@ public function testMethodUpdateSiteDeployment(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -922,6 +932,7 @@ public function testMethodListVariables(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -950,6 +961,7 @@ public function testMethodCreateVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -979,6 +991,7 @@ public function testMethodGetVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", @@ -1006,6 +1019,7 @@ public function testMethodUpdateVariable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "API_KEY", + "description" => "Stripe secret key used at checkout.", "value" => "myPa\$\$word1", "secret" => true, "resourceType" => "function", diff --git a/tests/Appwrite/Services/StorageTest.php b/tests/Appwrite/Services/StorageTest.php index fd79ef3c..c393a089 100644 --- a/tests/Appwrite/Services/StorageTest.php +++ b/tests/Appwrite/Services/StorageTest.php @@ -33,6 +33,7 @@ public function testMethodListBuckets(): void "\$permissions" => [], "fileSecurity" => true, "name" => "Documents", + "description" => "Invoices and receipts uploaded by customers.", "enabled" => true, "maximumFileSize" => 100, "allowedFileExtensions" => [], @@ -40,6 +41,7 @@ public function testMethodListBuckets(): void "encryption" => true, "antivirus" => true, "transformations" => true, + "stripMetadata" => true, "totalSize" => 128 ] ] @@ -65,6 +67,7 @@ public function testMethodCreateBucket(): void "\$permissions" => [], "fileSecurity" => true, "name" => "Documents", + "description" => "Invoices and receipts uploaded by customers.", "enabled" => true, "maximumFileSize" => 100, "allowedFileExtensions" => [], @@ -72,6 +75,7 @@ public function testMethodCreateBucket(): void "encryption" => true, "antivirus" => true, "transformations" => true, + "stripMetadata" => true, "totalSize" => 128 ]; @@ -98,6 +102,7 @@ public function testMethodGetBucket(): void "\$permissions" => [], "fileSecurity" => true, "name" => "Documents", + "description" => "Invoices and receipts uploaded by customers.", "enabled" => true, "maximumFileSize" => 100, "allowedFileExtensions" => [], @@ -105,6 +110,7 @@ public function testMethodGetBucket(): void "encryption" => true, "antivirus" => true, "transformations" => true, + "stripMetadata" => true, "totalSize" => 128 ]; @@ -130,6 +136,7 @@ public function testMethodUpdateBucket(): void "\$permissions" => [], "fileSecurity" => true, "name" => "Documents", + "description" => "Invoices and receipts uploaded by customers.", "enabled" => true, "maximumFileSize" => 100, "allowedFileExtensions" => [], @@ -137,6 +144,7 @@ public function testMethodUpdateBucket(): void "encryption" => true, "antivirus" => true, "transformations" => true, + "stripMetadata" => true, "totalSize" => 128 ]; diff --git a/tests/Appwrite/Services/TablesDBTest.php b/tests/Appwrite/Services/TablesDBTest.php index 5ef55c32..2c8de8b7 100644 --- a/tests/Appwrite/Services/TablesDBTest.php +++ b/tests/Appwrite/Services/TablesDBTest.php @@ -30,6 +30,7 @@ public function testMethodList(): void [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -54,6 +55,7 @@ public function testMethodCreate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -251,6 +253,7 @@ public function testMethodGet(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -275,6 +278,7 @@ public function testMethodUpdate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -655,6 +659,7 @@ public function testMethodListTables(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Table", + "description" => "Movies available in the catalog.", "enabled" => true, "rowSecurity" => true, "columns" => [], @@ -664,6 +669,7 @@ public function testMethodListTables(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -699,6 +705,7 @@ public function testMethodCreateTable(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Table", + "description" => "Movies available in the catalog.", "enabled" => true, "rowSecurity" => true, "columns" => [], @@ -708,6 +715,7 @@ public function testMethodCreateTable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -743,6 +751,7 @@ public function testMethodGetTable(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Table", + "description" => "Movies available in the catalog.", "enabled" => true, "rowSecurity" => true, "columns" => [], @@ -752,6 +761,7 @@ public function testMethodGetTable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -786,6 +796,7 @@ public function testMethodUpdateTable(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Table", + "description" => "Movies available in the catalog.", "enabled" => true, "rowSecurity" => true, "columns" => [], @@ -795,6 +806,7 @@ public function testMethodUpdateTable(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -863,6 +875,7 @@ public function testMethodCreateBigIntColumn(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "bigint", "status" => "available", "error" => "string", @@ -891,6 +904,7 @@ public function testMethodUpdateBigIntColumn(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "bigint", "status" => "available", "error" => "string", @@ -920,6 +934,7 @@ public function testMethodCreateBooleanColumn(): void { $data = [ "key" => "isEnabled", + "description" => "Name shown on the public profile.", "type" => "boolean", "status" => "available", "error" => "string", @@ -948,6 +963,7 @@ public function testMethodUpdateBooleanColumn(): void { $data = [ "key" => "isEnabled", + "description" => "Name shown on the public profile.", "type" => "boolean", "status" => "available", "error" => "string", @@ -977,6 +993,7 @@ public function testMethodCreateDatetimeColumn(): void { $data = [ "key" => "birthDay", + "description" => "Name shown on the public profile.", "type" => "datetime", "status" => "available", "error" => "string", @@ -1006,6 +1023,7 @@ public function testMethodUpdateDatetimeColumn(): void { $data = [ "key" => "birthDay", + "description" => "Name shown on the public profile.", "type" => "datetime", "status" => "available", "error" => "string", @@ -1036,6 +1054,7 @@ public function testMethodCreateEmailColumn(): void { $data = [ "key" => "userEmail", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1065,6 +1084,7 @@ public function testMethodUpdateEmailColumn(): void { $data = [ "key" => "userEmail", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1095,6 +1115,7 @@ public function testMethodCreateEnumColumn(): void { $data = [ "key" => "status", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1126,6 +1147,7 @@ public function testMethodUpdateEnumColumn(): void { $data = [ "key" => "status", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1158,6 +1180,7 @@ public function testMethodCreateFloatColumn(): void { $data = [ "key" => "percentageCompleted", + "description" => "Name shown on the public profile.", "type" => "double", "status" => "available", "error" => "string", @@ -1186,6 +1209,7 @@ public function testMethodUpdateFloatColumn(): void { $data = [ "key" => "percentageCompleted", + "description" => "Name shown on the public profile.", "type" => "double", "status" => "available", "error" => "string", @@ -1215,6 +1239,7 @@ public function testMethodCreateIntegerColumn(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "integer", "status" => "available", "error" => "string", @@ -1243,6 +1268,7 @@ public function testMethodUpdateIntegerColumn(): void { $data = [ "key" => "count", + "description" => "Name shown on the public profile.", "type" => "integer", "status" => "available", "error" => "string", @@ -1272,6 +1298,7 @@ public function testMethodCreateIpColumn(): void { $data = [ "key" => "ipAddress", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1301,6 +1328,7 @@ public function testMethodUpdateIpColumn(): void { $data = [ "key" => "ipAddress", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1331,6 +1359,7 @@ public function testMethodCreateLineColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1359,6 +1388,7 @@ public function testMethodUpdateLineColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1387,6 +1417,7 @@ public function testMethodCreateLongtextColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1415,6 +1446,7 @@ public function testMethodUpdateLongtextColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1444,6 +1476,7 @@ public function testMethodCreateMediumtextColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1472,6 +1505,7 @@ public function testMethodUpdateMediumtextColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1501,6 +1535,7 @@ public function testMethodCreatePointColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1529,6 +1564,7 @@ public function testMethodUpdatePointColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1557,6 +1593,7 @@ public function testMethodCreatePolygonColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1585,6 +1622,7 @@ public function testMethodUpdatePolygonColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1613,6 +1651,7 @@ public function testMethodCreateRelationshipColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1647,6 +1686,7 @@ public function testMethodUpdateRelationshipColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1680,6 +1720,7 @@ public function testMethodCreateStringColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1710,6 +1751,7 @@ public function testMethodUpdateStringColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1740,6 +1782,7 @@ public function testMethodCreateTextColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1768,6 +1811,7 @@ public function testMethodUpdateTextColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1797,6 +1841,7 @@ public function testMethodCreateUrlColumn(): void { $data = [ "key" => "githubUrl", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1826,6 +1871,7 @@ public function testMethodUpdateUrlColumn(): void { $data = [ "key" => "githubUrl", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1856,6 +1902,7 @@ public function testMethodCreateVarcharColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1886,6 +1933,7 @@ public function testMethodUpdateVarcharColumn(): void { $data = [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1917,6 +1965,7 @@ public function testMethodGetColumn(): void $data = array_replace( [ "key" => "fullName", + "description" => "Name shown on the public profile.", "type" => "string", "status" => "available", "error" => "string", @@ -1974,6 +2023,7 @@ public function testMethodListIndexes(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -2004,6 +2054,7 @@ public function testMethodCreateIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -2035,6 +2086,7 @@ public function testMethodGetIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -2261,6 +2313,37 @@ public function testMethodDeleteRows(): void $this->assertInstanceOf(\Appwrite\Models\RowList::class, $response); } + public function testMethodCreateQuery(): void + { + $data = [ + "total" => 5, + "rows" => [ + [ + "\$id" => "5e5ea5c16897e", + "\$sequence" => "1", + "\$tableId" => "5e5ea5c15117e", + "\$databaseId" => "5e5ea5c15117e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "\$permissions" => [] + ] + ] + ]; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + $this->client + ->allows()->getConfig(Mockery::any()) + ->andReturn(''); + + $response = $this->tablesDB->createQuery( + "", + "" + ); + + $this->assertInstanceOf(\Appwrite\Models\RowList::class, $response); + } public function testMethodGetRow(): void { $data = [ diff --git a/tests/Appwrite/Services/VectorsDBTest.php b/tests/Appwrite/Services/VectorsDBTest.php index 70fb88c4..fb303724 100644 --- a/tests/Appwrite/Services/VectorsDBTest.php +++ b/tests/Appwrite/Services/VectorsDBTest.php @@ -29,6 +29,7 @@ public function testMethodList(): void [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -53,6 +54,7 @@ public function testMethodCreate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -250,6 +252,7 @@ public function testMethodGet(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -274,6 +277,7 @@ public function testMethodUpdate(): void $data = [ "\$id" => "5e5ea5c16897e", "name" => "My Database", + "description" => "Customer orders and invoices.", "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, @@ -323,6 +327,7 @@ public function testMethodListCollections(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -332,6 +337,7 @@ public function testMethodListCollections(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -368,6 +374,7 @@ public function testMethodCreateCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -377,6 +384,7 @@ public function testMethodCreateCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -414,6 +422,7 @@ public function testMethodGetCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -423,6 +432,7 @@ public function testMethodGetCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -458,6 +468,7 @@ public function testMethodUpdateCollection(): void "\$permissions" => [], "databaseId" => "5e5ea5c16897e", "name" => "My Collection", + "description" => "Movies available in the catalog.", "enabled" => true, "documentSecurity" => true, "attributes" => [], @@ -467,6 +478,7 @@ public function testMethodUpdateCollection(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -838,6 +850,7 @@ public function testMethodListIndexes(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -868,6 +881,7 @@ public function testMethodCreateIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", @@ -899,6 +913,7 @@ public function testMethodGetIndex(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "key" => "index1", + "description" => "Speeds up lookups by email.", "type" => "primary", "status" => "available", "error" => "string", diff --git a/tests/Appwrite/Services/WebhooksTest.php b/tests/Appwrite/Services/WebhooksTest.php index 6753dc00..65d23ef8 100644 --- a/tests/Appwrite/Services/WebhooksTest.php +++ b/tests/Appwrite/Services/WebhooksTest.php @@ -30,6 +30,7 @@ public function testMethodList(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Webhook", + "description" => "Notifies the billing service about new users.", "url" => "https://example.com/webhook", "events" => [], "tls" => true, @@ -61,6 +62,7 @@ public function testMethodCreate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Webhook", + "description" => "Notifies the billing service about new users.", "url" => "https://example.com/webhook", "events" => [], "tls" => true, @@ -95,6 +97,7 @@ public function testMethodGet(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Webhook", + "description" => "Notifies the billing service about new users.", "url" => "https://example.com/webhook", "events" => [], "tls" => true, @@ -126,6 +129,7 @@ public function testMethodUpdate(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Webhook", + "description" => "Notifies the billing service about new users.", "url" => "https://example.com/webhook", "events" => [], "tls" => true, @@ -177,6 +181,7 @@ public function testMethodUpdateSecret(): void "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "name" => "My Webhook", + "description" => "Notifies the billing service about new users.", "url" => "https://example.com/webhook", "events" => [], "tls" => true,