From feb7943c090646be88ff7c9f038fa0ea8095eceb Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 9 Feb 2026 06:54:17 +0000 Subject: [PATCH 1/2] regen-as-per-specs --- CHANGELOG.md | 19 +- README.md | 2 +- docs/account.md | 72 ++- docs/backups.md | 172 ++++++++ .../account/create-anonymous-session.md | 2 + .../account/create-email-password-session.md | 3 +- docs/examples/account/create-email-token.md | 3 +- .../account/create-email-verification.md | 3 +- docs/examples/account/create-jwt.md | 3 +- docs/examples/account/create-key.md | 19 + .../account/create-magic-url-token.md | 3 +- .../account/create-mfa-authenticator.md | 3 +- docs/examples/account/create-mfa-challenge.md | 3 +- .../account/create-mfa-recovery-codes.md | 2 + .../examples/account/create-o-auth-2-token.md | 3 +- docs/examples/account/create-phone-token.md | 3 +- .../account/create-phone-verification.md | 2 + docs/examples/account/create-recovery.md | 3 +- docs/examples/account/create-session.md | 3 +- docs/examples/account/create-verification.md | 3 +- docs/examples/account/create.md | 3 +- docs/examples/account/delete-identity.md | 3 +- docs/examples/account/delete-key.md | 16 + .../account/delete-mfa-authenticator.md | 3 +- docs/examples/account/delete-session.md | 3 +- docs/examples/account/delete-sessions.md | 2 + docs/examples/account/get-key.md | 16 + .../account/get-mfa-recovery-codes.md | 2 + docs/examples/account/get-prefs.md | 2 + docs/examples/account/get-session.md | 3 +- docs/examples/account/get.md | 2 + docs/examples/account/list-identities.md | 3 +- docs/examples/account/list-keys.md | 16 + docs/examples/account/list-logs.md | 3 +- docs/examples/account/list-mfa-factors.md | 2 + docs/examples/account/list-sessions.md | 2 + .../account/update-email-verification.md | 3 +- docs/examples/account/update-email.md | 3 +- docs/examples/account/update-key.md | 20 + .../account/update-magic-url-session.md | 3 +- .../account/update-mfa-authenticator.md | 3 +- docs/examples/account/update-mfa-challenge.md | 3 +- .../account/update-mfa-recovery-codes.md | 2 + docs/examples/account/update-mfa.md | 3 +- docs/examples/account/update-name.md | 3 +- docs/examples/account/update-password.md | 3 +- docs/examples/account/update-phone-session.md | 3 +- .../account/update-phone-verification.md | 3 +- docs/examples/account/update-phone.md | 3 +- docs/examples/account/update-prefs.md | 3 +- docs/examples/account/update-recovery.md | 3 +- docs/examples/account/update-session.md | 3 +- docs/examples/account/update-status.md | 2 + docs/examples/account/update-verification.md | 3 +- docs/examples/avatars/get-browser.md | 3 +- docs/examples/avatars/get-credit-card.md | 3 +- docs/examples/avatars/get-favicon.md | 3 +- docs/examples/avatars/get-flag.md | 3 +- docs/examples/avatars/get-image.md | 3 +- docs/examples/avatars/get-initials.md | 3 +- docs/examples/avatars/get-qr.md | 3 +- docs/examples/avatars/get-screenshot.md | 3 +- docs/examples/backups/create-archive.md | 18 + docs/examples/backups/create-policy.md | 23 + docs/examples/backups/create-restoration.md | 20 + docs/examples/backups/delete-archive.md | 16 + docs/examples/backups/delete-policy.md | 16 + docs/examples/backups/get-archive.md | 16 + docs/examples/backups/get-policy.md | 16 + docs/examples/backups/get-restoration.md | 16 + docs/examples/backups/list-archives.md | 16 + docs/examples/backups/list-policies.md | 16 + docs/examples/backups/list-restorations.md | 16 + docs/examples/backups/update-policy.md | 20 + .../databases/create-boolean-attribute.md | 3 +- docs/examples/databases/create-collection.md | 3 +- .../databases/create-datetime-attribute.md | 3 +- docs/examples/databases/create-document.md | 3 +- docs/examples/databases/create-documents.md | 3 +- .../databases/create-email-attribute.md | 3 +- .../databases/create-enum-attribute.md | 3 +- .../databases/create-float-attribute.md | 3 +- docs/examples/databases/create-index.md | 3 +- .../databases/create-integer-attribute.md | 3 +- .../examples/databases/create-ip-attribute.md | 3 +- .../databases/create-line-attribute.md | 3 +- .../databases/create-longtext-attribute.md | 3 +- .../databases/create-mediumtext-attribute.md | 3 +- docs/examples/databases/create-operations.md | 3 +- .../databases/create-point-attribute.md | 3 +- .../databases/create-polygon-attribute.md | 3 +- .../create-relationship-attribute.md | 3 +- .../databases/create-string-attribute.md | 3 +- .../databases/create-text-attribute.md | 3 +- docs/examples/databases/create-transaction.md | 3 +- .../databases/create-url-attribute.md | 3 +- .../databases/create-varchar-attribute.md | 3 +- docs/examples/databases/create.md | 3 +- .../databases/decrement-document-attribute.md | 3 +- docs/examples/databases/delete-attribute.md | 3 +- docs/examples/databases/delete-collection.md | 3 +- docs/examples/databases/delete-document.md | 3 +- docs/examples/databases/delete-documents.md | 3 +- docs/examples/databases/delete-index.md | 3 +- docs/examples/databases/delete-transaction.md | 3 +- docs/examples/databases/delete.md | 3 +- docs/examples/databases/get-attribute.md | 3 +- docs/examples/databases/get-collection.md | 3 +- docs/examples/databases/get-document.md | 3 +- docs/examples/databases/get-index.md | 3 +- docs/examples/databases/get-transaction.md | 3 +- docs/examples/databases/get.md | 3 +- .../databases/increment-document-attribute.md | 3 +- docs/examples/databases/list-attributes.md | 3 +- docs/examples/databases/list-collections.md | 3 +- docs/examples/databases/list-documents.md | 3 +- docs/examples/databases/list-indexes.md | 3 +- docs/examples/databases/list-transactions.md | 3 +- docs/examples/databases/list.md | 3 +- .../databases/update-boolean-attribute.md | 3 +- docs/examples/databases/update-collection.md | 3 +- .../databases/update-datetime-attribute.md | 3 +- docs/examples/databases/update-document.md | 3 +- docs/examples/databases/update-documents.md | 3 +- .../databases/update-email-attribute.md | 3 +- .../databases/update-enum-attribute.md | 3 +- .../databases/update-float-attribute.md | 3 +- .../databases/update-integer-attribute.md | 3 +- .../examples/databases/update-ip-attribute.md | 3 +- .../databases/update-line-attribute.md | 3 +- .../databases/update-longtext-attribute.md | 3 +- .../databases/update-mediumtext-attribute.md | 3 +- .../databases/update-point-attribute.md | 3 +- .../databases/update-polygon-attribute.md | 3 +- .../update-relationship-attribute.md | 3 +- .../databases/update-string-attribute.md | 3 +- .../databases/update-text-attribute.md | 3 +- docs/examples/databases/update-transaction.md | 3 +- .../databases/update-url-attribute.md | 3 +- .../databases/update-varchar-attribute.md | 3 +- docs/examples/databases/update.md | 3 +- docs/examples/databases/upsert-document.md | 3 +- docs/examples/databases/upsert-documents.md | 3 +- docs/examples/functions/create-deployment.md | 3 +- .../functions/create-duplicate-deployment.md | 3 +- docs/examples/functions/create-execution.md | 3 +- .../functions/create-template-deployment.md | 3 +- docs/examples/functions/create-variable.md | 3 +- .../functions/create-vcs-deployment.md | 3 +- docs/examples/functions/create.md | 3 +- docs/examples/functions/delete-deployment.md | 3 +- docs/examples/functions/delete-execution.md | 3 +- docs/examples/functions/delete-variable.md | 3 +- docs/examples/functions/delete.md | 3 +- .../functions/get-deployment-download.md | 3 +- docs/examples/functions/get-deployment.md | 3 +- docs/examples/functions/get-execution.md | 3 +- docs/examples/functions/get-variable.md | 3 +- docs/examples/functions/get.md | 3 +- docs/examples/functions/list-deployments.md | 3 +- docs/examples/functions/list-executions.md | 3 +- docs/examples/functions/list-runtimes.md | 2 + .../examples/functions/list-specifications.md | 2 + docs/examples/functions/list-variables.md | 3 +- docs/examples/functions/list.md | 3 +- .../functions/update-deployment-status.md | 3 +- .../functions/update-function-deployment.md | 3 +- docs/examples/functions/update-variable.md | 3 +- docs/examples/functions/update.md | 3 +- docs/examples/graphql/mutation.md | 3 +- docs/examples/graphql/query.md | 3 +- docs/examples/health/get-antivirus.md | 2 + docs/examples/health/get-cache.md | 2 + docs/examples/health/get-certificate.md | 3 +- docs/examples/health/get-db.md | 2 + docs/examples/health/get-failed-jobs.md | 3 +- docs/examples/health/get-pub-sub.md | 2 + docs/examples/health/get-queue-audits.md | 3 +- .../get-queue-billing-project-aggregation.md | 16 + .../get-queue-billing-team-aggregation.md | 16 + docs/examples/health/get-queue-builds.md | 3 +- .../examples/health/get-queue-certificates.md | 3 +- docs/examples/health/get-queue-databases.md | 3 +- docs/examples/health/get-queue-deletes.md | 3 +- docs/examples/health/get-queue-functions.md | 3 +- docs/examples/health/get-queue-logs.md | 3 +- docs/examples/health/get-queue-mails.md | 3 +- docs/examples/health/get-queue-messaging.md | 3 +- docs/examples/health/get-queue-migrations.md | 3 +- .../health/get-queue-priority-builds.md | 16 + .../health/get-queue-region-manager.md | 16 + .../health/get-queue-stats-resources.md | 3 +- docs/examples/health/get-queue-threats.md | 16 + docs/examples/health/get-queue-usage.md | 3 +- docs/examples/health/get-queue-webhooks.md | 3 +- docs/examples/health/get-storage-local.md | 2 + docs/examples/health/get-storage.md | 2 + docs/examples/health/get-time.md | 2 + docs/examples/health/get.md | 2 + docs/examples/locale/get.md | 2 + docs/examples/locale/list-codes.md | 2 + docs/examples/locale/list-continents.md | 2 + docs/examples/locale/list-countries-eu.md | 2 + docs/examples/locale/list-countries-phones.md | 2 + docs/examples/locale/list-countries.md | 2 + docs/examples/locale/list-currencies.md | 2 + docs/examples/locale/list-languages.md | 2 + .../messaging/create-apns-provider.md | 3 +- docs/examples/messaging/create-email.md | 3 +- .../examples/messaging/create-fcm-provider.md | 3 +- .../messaging/create-mailgun-provider.md | 3 +- .../messaging/create-msg-91-provider.md | 3 +- docs/examples/messaging/create-push.md | 3 +- .../messaging/create-resend-provider.md | 3 +- .../messaging/create-sendgrid-provider.md | 3 +- docs/examples/messaging/create-sms.md | 3 +- .../messaging/create-smtp-provider.md | 3 +- docs/examples/messaging/create-subscriber.md | 3 +- .../messaging/create-telesign-provider.md | 3 +- .../messaging/create-textmagic-provider.md | 3 +- docs/examples/messaging/create-topic.md | 3 +- .../messaging/create-twilio-provider.md | 3 +- .../messaging/create-vonage-provider.md | 3 +- docs/examples/messaging/delete-provider.md | 3 +- docs/examples/messaging/delete-subscriber.md | 3 +- docs/examples/messaging/delete-topic.md | 3 +- docs/examples/messaging/delete.md | 3 +- docs/examples/messaging/get-message.md | 3 +- docs/examples/messaging/get-provider.md | 3 +- docs/examples/messaging/get-subscriber.md | 3 +- docs/examples/messaging/get-topic.md | 3 +- docs/examples/messaging/list-message-logs.md | 3 +- docs/examples/messaging/list-messages.md | 3 +- docs/examples/messaging/list-provider-logs.md | 3 +- docs/examples/messaging/list-providers.md | 3 +- .../messaging/list-subscriber-logs.md | 3 +- docs/examples/messaging/list-subscribers.md | 3 +- docs/examples/messaging/list-targets.md | 3 +- docs/examples/messaging/list-topic-logs.md | 3 +- docs/examples/messaging/list-topics.md | 3 +- .../messaging/update-apns-provider.md | 3 +- docs/examples/messaging/update-email.md | 3 +- .../examples/messaging/update-fcm-provider.md | 3 +- .../messaging/update-mailgun-provider.md | 3 +- .../messaging/update-msg-91-provider.md | 3 +- docs/examples/messaging/update-push.md | 3 +- .../messaging/update-resend-provider.md | 3 +- .../messaging/update-sendgrid-provider.md | 3 +- docs/examples/messaging/update-sms.md | 3 +- .../messaging/update-smtp-provider.md | 3 +- .../messaging/update-telesign-provider.md | 3 +- .../messaging/update-textmagic-provider.md | 3 +- docs/examples/messaging/update-topic.md | 3 +- .../messaging/update-twilio-provider.md | 3 +- .../messaging/update-vonage-provider.md | 3 +- docs/examples/organizations/delete.md | 16 + .../estimation-delete-organization.md | 16 + docs/examples/sites/create-deployment.md | 3 +- .../sites/create-duplicate-deployment.md | 3 +- .../sites/create-template-deployment.md | 3 +- docs/examples/sites/create-variable.md | 3 +- docs/examples/sites/create-vcs-deployment.md | 3 +- docs/examples/sites/create.md | 3 +- docs/examples/sites/delete-deployment.md | 3 +- docs/examples/sites/delete-log.md | 3 +- docs/examples/sites/delete-variable.md | 3 +- docs/examples/sites/delete.md | 3 +- .../examples/sites/get-deployment-download.md | 3 +- docs/examples/sites/get-deployment.md | 3 +- docs/examples/sites/get-log.md | 3 +- docs/examples/sites/get-variable.md | 3 +- docs/examples/sites/get.md | 3 +- docs/examples/sites/list-deployments.md | 3 +- docs/examples/sites/list-frameworks.md | 2 + docs/examples/sites/list-logs.md | 3 +- docs/examples/sites/list-specifications.md | 2 + docs/examples/sites/list-variables.md | 3 +- docs/examples/sites/list.md | 3 +- .../sites/update-deployment-status.md | 3 +- docs/examples/sites/update-site-deployment.md | 3 +- docs/examples/sites/update-variable.md | 3 +- docs/examples/sites/update.md | 3 +- docs/examples/storage/create-bucket.md | 3 +- docs/examples/storage/create-file.md | 3 +- docs/examples/storage/delete-bucket.md | 3 +- docs/examples/storage/delete-file.md | 3 +- docs/examples/storage/get-bucket.md | 3 +- docs/examples/storage/get-file-download.md | 3 +- docs/examples/storage/get-file-preview.md | 3 +- docs/examples/storage/get-file-view.md | 3 +- docs/examples/storage/get-file.md | 3 +- docs/examples/storage/list-buckets.md | 3 +- docs/examples/storage/list-files.md | 3 +- docs/examples/storage/update-bucket.md | 3 +- docs/examples/storage/update-file.md | 3 +- .../tablesdb/create-boolean-column.md | 3 +- .../tablesdb/create-datetime-column.md | 3 +- docs/examples/tablesdb/create-email-column.md | 3 +- docs/examples/tablesdb/create-enum-column.md | 3 +- docs/examples/tablesdb/create-float-column.md | 3 +- docs/examples/tablesdb/create-index.md | 3 +- .../tablesdb/create-integer-column.md | 3 +- docs/examples/tablesdb/create-ip-column.md | 3 +- docs/examples/tablesdb/create-line-column.md | 3 +- .../tablesdb/create-longtext-column.md | 3 +- .../tablesdb/create-mediumtext-column.md | 3 +- docs/examples/tablesdb/create-operations.md | 3 +- docs/examples/tablesdb/create-point-column.md | 3 +- .../tablesdb/create-polygon-column.md | 3 +- .../tablesdb/create-relationship-column.md | 3 +- docs/examples/tablesdb/create-row.md | 3 +- docs/examples/tablesdb/create-rows.md | 3 +- .../examples/tablesdb/create-string-column.md | 3 +- docs/examples/tablesdb/create-table.md | 3 +- docs/examples/tablesdb/create-text-column.md | 3 +- docs/examples/tablesdb/create-transaction.md | 3 +- docs/examples/tablesdb/create-url-column.md | 3 +- .../tablesdb/create-varchar-column.md | 3 +- docs/examples/tablesdb/create.md | 3 +- .../examples/tablesdb/decrement-row-column.md | 3 +- docs/examples/tablesdb/delete-column.md | 3 +- docs/examples/tablesdb/delete-index.md | 3 +- docs/examples/tablesdb/delete-row.md | 3 +- docs/examples/tablesdb/delete-rows.md | 3 +- docs/examples/tablesdb/delete-table.md | 3 +- docs/examples/tablesdb/delete-transaction.md | 3 +- docs/examples/tablesdb/delete.md | 3 +- docs/examples/tablesdb/get-column.md | 3 +- docs/examples/tablesdb/get-index.md | 3 +- docs/examples/tablesdb/get-row.md | 3 +- docs/examples/tablesdb/get-table.md | 3 +- docs/examples/tablesdb/get-transaction.md | 3 +- docs/examples/tablesdb/get.md | 3 +- .../examples/tablesdb/increment-row-column.md | 3 +- docs/examples/tablesdb/list-columns.md | 3 +- docs/examples/tablesdb/list-indexes.md | 3 +- docs/examples/tablesdb/list-rows.md | 3 +- docs/examples/tablesdb/list-tables.md | 3 +- docs/examples/tablesdb/list-transactions.md | 3 +- docs/examples/tablesdb/list.md | 3 +- .../tablesdb/update-boolean-column.md | 3 +- .../tablesdb/update-datetime-column.md | 3 +- docs/examples/tablesdb/update-email-column.md | 3 +- docs/examples/tablesdb/update-enum-column.md | 3 +- docs/examples/tablesdb/update-float-column.md | 3 +- .../tablesdb/update-integer-column.md | 3 +- docs/examples/tablesdb/update-ip-column.md | 3 +- docs/examples/tablesdb/update-line-column.md | 3 +- .../tablesdb/update-longtext-column.md | 3 +- .../tablesdb/update-mediumtext-column.md | 3 +- docs/examples/tablesdb/update-point-column.md | 3 +- .../tablesdb/update-polygon-column.md | 3 +- .../tablesdb/update-relationship-column.md | 3 +- docs/examples/tablesdb/update-row.md | 3 +- docs/examples/tablesdb/update-rows.md | 3 +- .../examples/tablesdb/update-string-column.md | 3 +- docs/examples/tablesdb/update-table.md | 3 +- docs/examples/tablesdb/update-text-column.md | 3 +- docs/examples/tablesdb/update-transaction.md | 3 +- docs/examples/tablesdb/update-url-column.md | 3 +- .../tablesdb/update-varchar-column.md | 3 +- docs/examples/tablesdb/update.md | 3 +- docs/examples/tablesdb/upsert-row.md | 3 +- docs/examples/tablesdb/upsert-rows.md | 3 +- docs/examples/teams/create-membership.md | 6 +- docs/examples/teams/create.md | 3 +- docs/examples/teams/delete-membership.md | 3 +- docs/examples/teams/delete.md | 3 +- docs/examples/teams/get-membership.md | 3 +- docs/examples/teams/get-prefs.md | 3 +- docs/examples/teams/get.md | 3 +- docs/examples/teams/list-memberships.md | 3 +- docs/examples/teams/list.md | 3 +- .../teams/update-membership-status.md | 3 +- docs/examples/teams/update-membership.md | 6 +- docs/examples/teams/update-name.md | 3 +- docs/examples/teams/update-prefs.md | 3 +- docs/examples/tokens/create-file-token.md | 3 +- docs/examples/tokens/delete.md | 3 +- docs/examples/tokens/get.md | 3 +- docs/examples/tokens/list.md | 3 +- docs/examples/tokens/update.md | 3 +- docs/examples/users/create-argon-2-user.md | 3 +- docs/examples/users/create-bcrypt-user.md | 3 +- docs/examples/users/create-jwt.md | 3 +- docs/examples/users/create-md-5-user.md | 3 +- .../users/create-mfa-recovery-codes.md | 3 +- docs/examples/users/create-ph-pass-user.md | 3 +- .../users/create-scrypt-modified-user.md | 3 +- docs/examples/users/create-scrypt-user.md | 3 +- docs/examples/users/create-session.md | 3 +- docs/examples/users/create-sha-user.md | 3 +- docs/examples/users/create-target.md | 3 +- docs/examples/users/create-token.md | 3 +- docs/examples/users/create.md | 3 +- docs/examples/users/delete-identity.md | 3 +- .../users/delete-mfa-authenticator.md | 3 +- docs/examples/users/delete-session.md | 3 +- docs/examples/users/delete-sessions.md | 3 +- docs/examples/users/delete-target.md | 3 +- docs/examples/users/delete.md | 3 +- docs/examples/users/get-mfa-recovery-codes.md | 3 +- docs/examples/users/get-prefs.md | 3 +- docs/examples/users/get-target.md | 3 +- docs/examples/users/get.md | 3 +- docs/examples/users/list-identities.md | 3 +- docs/examples/users/list-logs.md | 3 +- docs/examples/users/list-memberships.md | 3 +- docs/examples/users/list-mfa-factors.md | 3 +- docs/examples/users/list-sessions.md | 3 +- docs/examples/users/list-targets.md | 3 +- docs/examples/users/list.md | 3 +- .../users/update-email-verification.md | 3 +- docs/examples/users/update-email.md | 3 +- docs/examples/users/update-labels.md | 3 +- .../users/update-mfa-recovery-codes.md | 3 +- docs/examples/users/update-mfa.md | 3 +- docs/examples/users/update-name.md | 3 +- docs/examples/users/update-password.md | 3 +- .../users/update-phone-verification.md | 3 +- docs/examples/users/update-phone.md | 3 +- docs/examples/users/update-prefs.md | 3 +- docs/examples/users/update-status.md | 3 +- docs/examples/users/update-target.md | 3 +- docs/health.md | 65 +++ docs/organizations.md | 28 ++ docs/storage.md | 4 +- src/Appwrite/Client.php | 4 +- src/Appwrite/Enums/BackupServices.php | 51 +++ src/Appwrite/Enums/BuildRuntime.php | 40 +- src/Appwrite/Enums/OAuthProvider.php | 16 + src/Appwrite/Enums/Roles.php | 51 --- src/Appwrite/Enums/Runtime.php | 40 +- src/Appwrite/Enums/Scopes.php | 64 +++ src/Appwrite/Services/Account.php | 160 +++++++ src/Appwrite/Services/Backups.php | 411 ++++++++++++++++++ src/Appwrite/Services/Health.php | 155 +++++++ src/Appwrite/Services/Organizations.php | 74 ++++ src/Appwrite/Services/Teams.php | 1 - tests/Appwrite/Services/AccountTest.php | 107 +++++ tests/Appwrite/Services/BackupsTest.php | 276 ++++++++++++ tests/Appwrite/Services/DatabasesTest.php | 24 +- tests/Appwrite/Services/HealthTest.php | 75 ++++ tests/Appwrite/Services/OrganizationsTest.php | 50 +++ tests/Appwrite/Services/TablesDBTest.php | 24 +- tests/Appwrite/Services/TeamsTest.php | 5 +- 446 files changed, 3053 insertions(+), 508 deletions(-) create mode 100644 docs/backups.md create mode 100644 docs/examples/account/create-key.md create mode 100644 docs/examples/account/delete-key.md create mode 100644 docs/examples/account/get-key.md create mode 100644 docs/examples/account/list-keys.md create mode 100644 docs/examples/account/update-key.md create mode 100644 docs/examples/backups/create-archive.md create mode 100644 docs/examples/backups/create-policy.md create mode 100644 docs/examples/backups/create-restoration.md create mode 100644 docs/examples/backups/delete-archive.md create mode 100644 docs/examples/backups/delete-policy.md create mode 100644 docs/examples/backups/get-archive.md create mode 100644 docs/examples/backups/get-policy.md create mode 100644 docs/examples/backups/get-restoration.md create mode 100644 docs/examples/backups/list-archives.md create mode 100644 docs/examples/backups/list-policies.md create mode 100644 docs/examples/backups/list-restorations.md create mode 100644 docs/examples/backups/update-policy.md create mode 100644 docs/examples/health/get-queue-billing-project-aggregation.md create mode 100644 docs/examples/health/get-queue-billing-team-aggregation.md create mode 100644 docs/examples/health/get-queue-priority-builds.md create mode 100644 docs/examples/health/get-queue-region-manager.md create mode 100644 docs/examples/health/get-queue-threats.md create mode 100644 docs/examples/organizations/delete.md create mode 100644 docs/examples/organizations/estimation-delete-organization.md create mode 100644 docs/organizations.md create mode 100644 src/Appwrite/Enums/BackupServices.php delete mode 100644 src/Appwrite/Enums/Roles.php create mode 100644 src/Appwrite/Services/Backups.php create mode 100644 src/Appwrite/Services/Organizations.php create mode 100644 tests/Appwrite/Services/BackupsTest.php create mode 100644 tests/Appwrite/Services/OrganizationsTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index e744356..14a26e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,5 @@ # Change Log -## 20.0.0 - -* Add array-based enum parameters (e.g., `permissions: array`). -* Breaking change: `Output` enum has been removed; use `ImageFormat` instead. -* Add `getQueueAudits` support to `Health` service. -* Add longtext/mediumtext/text/varchar attribute and column helpers to `Databases` and `TablesDB` services. - -## 19.1.0 - -* Added ability to create columns and indexes synchronously while creating a table - -## 19.0.0 - -* Rename `VCSDeploymentType` enum to `VCSReferenceType` -* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters -* Add `Theme`, `Timezone` and `Output` enums - ## 18.0.1 * Fix `TablesDB` service to use correct file name @@ -48,4 +31,4 @@ * Add `dart38` and `flutter332` support to runtime models * Add `gif` support to `ImageFormat` enum * Add `upsertDocument` support to `Databases` service -* Add `sequence` support to `Document` model \ No newline at end of file +* Add `sequence` support to `Document` model diff --git a/README.md b/README.md index 9713e5d..6f4db85 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).** +**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).** Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) diff --git a/docs/account.md b/docs/account.md index 8c7314f..1aef77c 100644 --- a/docs/account.md +++ b/docs/account.md @@ -80,6 +80,76 @@ POST https://cloud.appwrite.io/v1/account/jwts | duration | integer | Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds. | 900 | +```http request +GET https://cloud.appwrite.io/v1/account/keys +``` + +** Get a list of all API keys from the current account. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| total | boolean | When set to false, the total count returned will be 0 and will not be calculated. | 1 | + + +```http request +POST https://cloud.appwrite.io/v1/account/keys +``` + +** Create a new account API key. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| name | string | Key name. Max length: 128 chars. | | +| scopes | array | Key scopes list. Maximum of 100 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. | | + + +```http request +GET https://cloud.appwrite.io/v1/account/keys/{keyId} +``` + +** Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| keyId | string | **Required** Key unique ID. | | + + +```http request +PUT https://cloud.appwrite.io/v1/account/keys/{keyId} +``` + +** Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| keyId | string | **Required** Key unique ID. | | +| name | string | Key name. Max length: 128 chars. | | +| scopes | array | Key scopes list. Maximum of 100 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. | | + + +```http request +DELETE https://cloud.appwrite.io/v1/account/keys/{keyId} +``` + +** Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| keyId | string | **Required** Key unique ID. | | + + ```http request GET https://cloud.appwrite.io/v1/account/logs ``` @@ -565,7 +635,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about | Field Name | Type | Description | Default | | --- | --- | --- | --- | -| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. | | +| provider | string | **Required** OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine. | | | success | string | URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | | failure | string | URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | | | scopes | array | A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long. | [] | diff --git a/docs/backups.md b/docs/backups.md new file mode 100644 index 0000000..36a4ee9 --- /dev/null +++ b/docs/backups.md @@ -0,0 +1,172 @@ +# Backups Service + + +```http request +GET https://cloud.appwrite.io/v1/backups/archives +``` + +** List all archives for a project. ** + +### 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. | [] | + + +```http request +POST https://cloud.appwrite.io/v1/backups/archives +``` + +** Create a new archive asynchronously for a project. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| services | array | Array of services to backup | | +| resourceId | string | Resource ID. When set, only this single resource will be backed up. | | + + +```http request +GET https://cloud.appwrite.io/v1/backups/archives/{archiveId} +``` + +** Get a backup archive using it's ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| archiveId | string | **Required** Archive ID. Choose a custom ID`. 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. | | + + +```http request +DELETE https://cloud.appwrite.io/v1/backups/archives/{archiveId} +``` + +** Delete an existing archive for a project. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| archiveId | string | **Required** Policy 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. | | + + +```http request +GET https://cloud.appwrite.io/v1/backups/policies +``` + +** List all policies for a project. ** + +### 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. | [] | + + +```http request +POST https://cloud.appwrite.io/v1/backups/policies +``` + +** Create a new backup policy. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| policyId | string | Policy 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 | Policy name. Max length: 128 chars. | | +| services | array | Array of services to backup | | +| resourceId | string | Resource ID. When set, only this single resource will be backed up. | | +| enabled | boolean | Is policy enabled? When set to 'disabled', no backups will be taken | 1 | +| retention | integer | Days to keep backups before deletion | | +| schedule | string | Schedule CRON syntax. | | + + +```http request +GET https://cloud.appwrite.io/v1/backups/policies/{policyId} +``` + +** Get a backup policy using it's ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| policyId | string | **Required** Policy ID. Choose a custom ID`. 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. | | + + +```http request +PATCH https://cloud.appwrite.io/v1/backups/policies/{policyId} +``` + +** Update an existing policy using it's ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| policyId | string | **Required** Policy ID. Choose a custom ID`. 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 | Policy name. Max length: 128 chars. | | +| retention | integer | Days to keep backups before deletion | | +| schedule | string | Cron expression | | +| enabled | boolean | Is Backup enabled? When set to 'disabled', No backup will be taken | | + + +```http request +DELETE https://cloud.appwrite.io/v1/backups/policies/{policyId} +``` + +** Delete a policy using it's ID. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| policyId | string | **Required** Policy 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. | | + + +```http request +POST https://cloud.appwrite.io/v1/backups/restoration +``` + +** Create and trigger a new restoration for a backup on a project. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| archiveId | string | Backup archive ID to restore | | +| services | array | Array of services to restore | | +| newResourceId | 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. | | +| newResourceName | string | Database name. Max length: 128 chars. | | + + +```http request +GET https://cloud.appwrite.io/v1/backups/restorations +``` + +** List all backup restorations for a project. ** + +### 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. | [] | + + +```http request +GET https://cloud.appwrite.io/v1/backups/restorations/{restorationId} +``` + +** Get the current status of a backup restoration. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| restorationId | string | **Required** Restoration ID. Choose a custom ID`. 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. | | + diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index 9959a3f..90283cf 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -1,3 +1,4 @@ +```php createAnonymousSession(); +``` diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 3ffa5a5..2a80ab6 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -1,3 +1,4 @@ +```php createEmailPasswordSession( email: 'email@example.com', password: 'password' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index f1405da..9c20e74 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -1,3 +1,4 @@ +```php createEmailToken( userId: '', email: 'email@example.com', phrase: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-email-verification.md b/docs/examples/account/create-email-verification.md index 691d6fa..650f577 100644 --- a/docs/examples/account/create-email-verification.md +++ b/docs/examples/account/create-email-verification.md @@ -1,3 +1,4 @@ +```php createEmailVerification( url: 'https://example.com' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-jwt.md b/docs/examples/account/create-jwt.md index 4031c64..3314407 100644 --- a/docs/examples/account/create-jwt.md +++ b/docs/examples/account/create-jwt.md @@ -1,3 +1,4 @@ +```php createJWT( duration: 0 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-key.md b/docs/examples/account/create-key.md new file mode 100644 index 0000000..cc00f17 --- /dev/null +++ b/docs/examples/account/create-key.md @@ -0,0 +1,19 @@ +```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->createKey( + name: '', + scopes: [Scopes::ACCOUNT()], + expire: '' // optional +);``` diff --git a/docs/examples/account/create-magic-url-token.md b/docs/examples/account/create-magic-url-token.md index 6e738e6..a4dde3d 100644 --- a/docs/examples/account/create-magic-url-token.md +++ b/docs/examples/account/create-magic-url-token.md @@ -1,3 +1,4 @@ +```php createMagicURLToken( email: 'email@example.com', url: 'https://example.com', // optional phrase: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index 2eb50c3..fbbc193 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -1,3 +1,4 @@ +```php createMFAAuthenticator( type: AuthenticatorType::TOTP() -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index 6f0ecf8..08bf57d 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -1,3 +1,4 @@ +```php createMFAChallenge( factor: AuthenticationFactor::EMAIL() -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 031bc4d..655663f 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```php createMFARecoveryCodes(); +``` diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md index 721ed36..170192d 100644 --- a/docs/examples/account/create-o-auth-2-token.md +++ b/docs/examples/account/create-o-auth-2-token.md @@ -1,3 +1,4 @@ +```php createOAuth2Token( success: 'https://example.com', // optional failure: 'https://example.com', // optional scopes: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index a2b45f7..f48754f 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -1,3 +1,4 @@ +```php createPhoneToken( userId: '', phone: '+12065550100' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index a152667..4cedfba 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -1,3 +1,4 @@ +```php createPhoneVerification(); +``` diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index c15e41d..c6eaada 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -1,3 +1,4 @@ +```php createRecovery( email: 'email@example.com', url: 'https://example.com' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index 02525f7..6e339b0 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -1,3 +1,4 @@ +```php createSession( userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index 4628175..2266a0f 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -1,3 +1,4 @@ +```php createVerification( url: 'https://example.com' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index 9168434..8975698 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -1,3 +1,4 @@ +```php create( email: 'email@example.com', password: '', name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index fd66d3a..56db56f 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -1,3 +1,4 @@ +```php deleteIdentity( identityId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/delete-key.md b/docs/examples/account/delete-key.md new file mode 100644 index 0000000..f272ae1 --- /dev/null +++ b/docs/examples/account/delete-key.md @@ -0,0 +1,16 @@ +```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->deleteKey( + keyId: '' +);``` diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 524b9b3..c171381 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```php deleteMFAAuthenticator( type: AuthenticatorType::TOTP() -); \ No newline at end of file +);``` diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 9233ae1..b200785 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -1,3 +1,4 @@ +```php deleteSession( sessionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 557fd6d..7886fab 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -1,3 +1,4 @@ +```php deleteSessions(); +``` diff --git a/docs/examples/account/get-key.md b/docs/examples/account/get-key.md new file mode 100644 index 0000000..576a976 --- /dev/null +++ b/docs/examples/account/get-key.md @@ -0,0 +1,16 @@ +```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->getKey( + keyId: '' +);``` diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index fc5aef2..9a99dac 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```php getMFARecoveryCodes(); +``` diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index c7077af..e125917 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -1,3 +1,4 @@ +```php getPrefs(); +``` diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index be26713..7e79a07 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -1,3 +1,4 @@ +```php getSession( sessionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index 30cb7b2..d1fb255 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -1,3 +1,4 @@ +```php get(); +``` diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index b75a64c..1bd2ef0 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -1,3 +1,4 @@ +```php listIdentities( queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/list-keys.md b/docs/examples/account/list-keys.md new file mode 100644 index 0000000..7b405d1 --- /dev/null +++ b/docs/examples/account/list-keys.md @@ -0,0 +1,16 @@ +```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->listKeys( + total: false // optional +);``` diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index deddc9e..763b772 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -1,3 +1,4 @@ +```php listLogs( queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index f7b6e26..96b6021 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -1,3 +1,4 @@ +```php listMFAFactors(); +``` diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 7f9749f..9c42f8c 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -1,3 +1,4 @@ +```php listSessions(); +``` diff --git a/docs/examples/account/update-email-verification.md b/docs/examples/account/update-email-verification.md index 95cd1b5..2fa17a5 100644 --- a/docs/examples/account/update-email-verification.md +++ b/docs/examples/account/update-email-verification.md @@ -1,3 +1,4 @@ +```php updateEmailVerification( userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index c7c0d48..8cdfc5f 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -1,3 +1,4 @@ +```php updateEmail( email: 'email@example.com', password: 'password' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-key.md b/docs/examples/account/update-key.md new file mode 100644 index 0000000..12736f6 --- /dev/null +++ b/docs/examples/account/update-key.md @@ -0,0 +1,20 @@ +```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->updateKey( + keyId: '', + name: '', + scopes: [Scopes::ACCOUNT()], + expire: '' // optional +);``` diff --git a/docs/examples/account/update-magic-url-session.md b/docs/examples/account/update-magic-url-session.md index ef6b8cc..055f066 100644 --- a/docs/examples/account/update-magic-url-session.md +++ b/docs/examples/account/update-magic-url-session.md @@ -1,3 +1,4 @@ +```php updateMagicURLSession( userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index 8486e88..c2f9dd6 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -1,3 +1,4 @@ +```php updateMFAAuthenticator( type: AuthenticatorType::TOTP(), otp: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index e5821e5..effbb17 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -1,3 +1,4 @@ +```php updateMFAChallenge( challengeId: '', otp: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index f57e490..ee16a9c 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```php updateMFARecoveryCodes(); +``` diff --git a/docs/examples/account/update-mfa.md b/docs/examples/account/update-mfa.md index a1978e6..3d2f9b6 100644 --- a/docs/examples/account/update-mfa.md +++ b/docs/examples/account/update-mfa.md @@ -1,3 +1,4 @@ +```php updateMFA( mfa: false -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 2603b6e..4a34bc3 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -1,3 +1,4 @@ +```php updateName( name: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index c510138..ea1996a 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -1,3 +1,4 @@ +```php updatePassword( password: '', oldPassword: 'password' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index 42f7fb9..67b5816 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -1,3 +1,4 @@ +```php updatePhoneSession( userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index df59922..877a034 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -1,3 +1,4 @@ +```php updatePhoneVerification( userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index 853cb62..6b5e9ca 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -1,3 +1,4 @@ +```php updatePhone( phone: '+12065550100', password: 'password' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index f6a1003..4709edd 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -1,3 +1,4 @@ +```php updatePrefs( 'timezone' => 'UTC', 'darkTheme' => true ] -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index 63518b0..7b5c1d0 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -1,3 +1,4 @@ +```php updateRecovery( userId: '', secret: '', password: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index 11cb4c7..aecf2fe 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -1,3 +1,4 @@ +```php updateSession( sessionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index 7c8075e..7f0088a 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -1,3 +1,4 @@ +```php updateStatus(); +``` diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index 60ec0b3..24bb3ff 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -1,3 +1,4 @@ +```php updateVerification( userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index 2449c26..ec2a759 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -1,3 +1,4 @@ +```php getBrowser( width: 0, // optional height: 0, // optional quality: -1 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 123b345..05ddc24 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -1,3 +1,4 @@ +```php getCreditCard( width: 0, // optional height: 0, // optional quality: -1 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index 1e67186..424cea8 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -1,3 +1,4 @@ +```php getFavicon( url: 'https://example.com' -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index 5b7d8ba..1a4ef37 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -1,3 +1,4 @@ +```php getFlag( width: 0, // optional height: 0, // optional quality: -1 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index e155545..4ceb8d3 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -1,3 +1,4 @@ +```php getImage( url: 'https://example.com', width: 0, // optional height: 0 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index d84e23a..2bd523b 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -1,3 +1,4 @@ +```php getInitials( width: 0, // optional height: 0, // optional background: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-qr.md b/docs/examples/avatars/get-qr.md index 0d5936a..ad49bf9 100644 --- a/docs/examples/avatars/get-qr.md +++ b/docs/examples/avatars/get-qr.md @@ -1,3 +1,4 @@ +```php getQR( size: 1, // optional margin: 0, // optional download: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/avatars/get-screenshot.md b/docs/examples/avatars/get-screenshot.md index 24c3aaa..9db8b3c 100644 --- a/docs/examples/avatars/get-screenshot.md +++ b/docs/examples/avatars/get-screenshot.md @@ -1,3 +1,4 @@ +```php getScreenshot( height: 600, // optional quality: 85, // optional output: ImageFormat::JPEG() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/backups/create-archive.md b/docs/examples/backups/create-archive.md new file mode 100644 index 0000000..d73db2e --- /dev/null +++ b/docs/examples/backups/create-archive.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->createArchive( + services: [BackupServices::DATABASES()], + resourceId: '' // optional +);``` diff --git a/docs/examples/backups/create-policy.md b/docs/examples/backups/create-policy.md new file mode 100644 index 0000000..ea87f28 --- /dev/null +++ b/docs/examples/backups/create-policy.md @@ -0,0 +1,23 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->createPolicy( + policyId: '', + services: [BackupServices::DATABASES()], + retention: 1, + schedule: '', + name: '', // optional + resourceId: '', // optional + enabled: false // optional +);``` diff --git a/docs/examples/backups/create-restoration.md b/docs/examples/backups/create-restoration.md new file mode 100644 index 0000000..61d9e0b --- /dev/null +++ b/docs/examples/backups/create-restoration.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->createRestoration( + archiveId: '', + services: [BackupServices::DATABASES()], + newResourceId: '', // optional + newResourceName: '' // optional +);``` diff --git a/docs/examples/backups/delete-archive.md b/docs/examples/backups/delete-archive.md new file mode 100644 index 0000000..a6c3d33 --- /dev/null +++ b/docs/examples/backups/delete-archive.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->deleteArchive( + archiveId: '' +);``` diff --git a/docs/examples/backups/delete-policy.md b/docs/examples/backups/delete-policy.md new file mode 100644 index 0000000..3c6df8f --- /dev/null +++ b/docs/examples/backups/delete-policy.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->deletePolicy( + policyId: '' +);``` diff --git a/docs/examples/backups/get-archive.md b/docs/examples/backups/get-archive.md new file mode 100644 index 0000000..6fa9ea9 --- /dev/null +++ b/docs/examples/backups/get-archive.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->getArchive( + archiveId: '' +);``` diff --git a/docs/examples/backups/get-policy.md b/docs/examples/backups/get-policy.md new file mode 100644 index 0000000..e8ce5c8 --- /dev/null +++ b/docs/examples/backups/get-policy.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->getPolicy( + policyId: '' +);``` diff --git a/docs/examples/backups/get-restoration.md b/docs/examples/backups/get-restoration.md new file mode 100644 index 0000000..ed3e94a --- /dev/null +++ b/docs/examples/backups/get-restoration.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->getRestoration( + restorationId: '' +);``` diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md new file mode 100644 index 0000000..4060e3c --- /dev/null +++ b/docs/examples/backups/list-archives.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->listArchives( + queries: [] // optional +);``` diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md new file mode 100644 index 0000000..a8b0331 --- /dev/null +++ b/docs/examples/backups/list-policies.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->listPolicies( + queries: [] // optional +);``` diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md new file mode 100644 index 0000000..2c7132b --- /dev/null +++ b/docs/examples/backups/list-restorations.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->listRestorations( + queries: [] // optional +);``` diff --git a/docs/examples/backups/update-policy.md b/docs/examples/backups/update-policy.md new file mode 100644 index 0000000..fe53fa2 --- /dev/null +++ b/docs/examples/backups/update-policy.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$backups = new Backups($client); + +$result = $backups->updatePolicy( + policyId: '', + name: '', // optional + retention: 1, // optional + schedule: '', // optional + enabled: false // optional +);``` diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 805d022..746db6b 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -1,3 +1,4 @@ +```php createBooleanAttribute( required: false, default: false, // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index aabfa03..a90e579 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -1,3 +1,4 @@ +```php createCollection( enabled: false, // optional attributes: [], // optional indexes: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index dd2fcec..f7c3862 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -1,3 +1,4 @@ +```php createDatetimeAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index 39fb26f..f8e7e94 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -1,3 +1,4 @@ +```php createDocument( ], permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-documents.md b/docs/examples/databases/create-documents.md index ced7a5a..f4f153a 100644 --- a/docs/examples/databases/create-documents.md +++ b/docs/examples/databases/create-documents.md @@ -1,3 +1,4 @@ +```php createDocuments( collectionId: '', documents: [], transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 1274a4b..4f53b8a 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -1,3 +1,4 @@ +```php createEmailAttribute( required: false, default: 'email@example.com', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index 9abf2df..49eb90a 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -1,3 +1,4 @@ +```php createEnumAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index e6eecb5..60486bb 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -1,3 +1,4 @@ +```php createFloatAttribute( max: null, // optional default: null, // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index 8dc2c88..39b3722 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -1,3 +1,4 @@ +```php createIndex( attributes: [], orders: [OrderBy::ASC()], // optional lengths: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index 1dbeefa..e1c771f 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -1,3 +1,4 @@ +```php createIntegerAttribute( max: null, // optional default: null, // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index f42717c..b15fc38 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -1,3 +1,4 @@ +```php createIpAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 56d007c..dd59e00 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -1,3 +1,4 @@ +```php createLineAttribute( key: '', required: false, default: [[1, 2], [3, 4], [5, 6]] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index bb97b18..9c3b4a6 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -1,3 +1,4 @@ +```php createLongtextAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index d225d95..9c3a78f 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -1,3 +1,4 @@ +```php createMediumtextAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-operations.md b/docs/examples/databases/create-operations.md index 05038cb..10b2e6c 100644 --- a/docs/examples/databases/create-operations.md +++ b/docs/examples/databases/create-operations.md @@ -1,3 +1,4 @@ +```php createOperations( } } ] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index dee0801..14ced40 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -1,3 +1,4 @@ +```php createPointAttribute( key: '', required: false, default: [1, 2] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index d745589..5886cf2 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -1,3 +1,4 @@ +```php createPolygonAttribute( key: '', required: false, default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 551fe17..739b27e 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -1,3 +1,4 @@ +```php createRelationshipAttribute( key: '', // optional twoWayKey: '', // optional onDelete: RelationMutate::CASCADE() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 5a4f72b..e6da950 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -1,3 +1,4 @@ +```php createStringAttribute( default: '', // optional array: false, // optional encrypt: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 3b1316f..b123b1b 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -1,3 +1,4 @@ +```php createTextAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-transaction.md b/docs/examples/databases/create-transaction.md index ea6faf7..9ca8028 100644 --- a/docs/examples/databases/create-transaction.md +++ b/docs/examples/databases/create-transaction.md @@ -1,3 +1,4 @@ +```php createTransaction( ttl: 60 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 6b9bc80..c1b432d 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -1,3 +1,4 @@ +```php createUrlAttribute( required: false, default: 'https://example.com', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index 811e47b..31a1028 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -1,3 +1,4 @@ +```php createVarcharAttribute( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 73c6188..867c31c 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -1,3 +1,4 @@ +```php create( databaseId: '', name: '', enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md index dfb1873..2c00e78 100644 --- a/docs/examples/databases/decrement-document-attribute.md +++ b/docs/examples/databases/decrement-document-attribute.md @@ -1,3 +1,4 @@ +```php decrementDocumentAttribute( value: null, // optional min: null, // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index 71b7162..cc77743 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -1,3 +1,4 @@ +```php deleteAttribute( databaseId: '', collectionId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index 4e98dfd..8419bc4 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -1,3 +1,4 @@ +```php deleteCollection( databaseId: '', collectionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 6e4d7aa..c0c620b 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -1,3 +1,4 @@ +```php deleteDocument( collectionId: '', documentId: '', transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete-documents.md b/docs/examples/databases/delete-documents.md index 3b2b0c7..124294d 100644 --- a/docs/examples/databases/delete-documents.md +++ b/docs/examples/databases/delete-documents.md @@ -1,3 +1,4 @@ +```php deleteDocuments( collectionId: '', queries: [], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 79e476b..d810609 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -1,3 +1,4 @@ +```php deleteIndex( databaseId: '', collectionId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete-transaction.md b/docs/examples/databases/delete-transaction.md index 0559aac..3e2db81 100644 --- a/docs/examples/databases/delete-transaction.md +++ b/docs/examples/databases/delete-transaction.md @@ -1,3 +1,4 @@ +```php deleteTransaction( transactionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index c796b7c..9d89cfb 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -1,3 +1,4 @@ +```php delete( databaseId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index ba82db4..4f3f7f7 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -1,3 +1,4 @@ +```php getAttribute( databaseId: '', collectionId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index ecddab0..e3cccdf 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -1,3 +1,4 @@ +```php getCollection( databaseId: '', collectionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index 834602d..90f8760 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -1,3 +1,4 @@ +```php getDocument( documentId: '', queries: [], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index e9c6307..001fc6e 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -1,3 +1,4 @@ +```php getIndex( databaseId: '', collectionId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/get-transaction.md b/docs/examples/databases/get-transaction.md index 16ca28d..82b34ae 100644 --- a/docs/examples/databases/get-transaction.md +++ b/docs/examples/databases/get-transaction.md @@ -1,3 +1,4 @@ +```php getTransaction( transactionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index 9aa6395..59a83bf 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -1,3 +1,4 @@ +```php get( databaseId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md index 63162d3..8782cf7 100644 --- a/docs/examples/databases/increment-document-attribute.md +++ b/docs/examples/databases/increment-document-attribute.md @@ -1,3 +1,4 @@ +```php incrementDocumentAttribute( value: null, // optional max: null, // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index e770292..dac753d 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -1,3 +1,4 @@ +```php listAttributes( collectionId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index c71866b..7f994e1 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -1,3 +1,4 @@ +```php listCollections( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index 8713327..1ff2692 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -1,3 +1,4 @@ +```php listDocuments( queries: [], // optional transactionId: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index a26ff7c..1ebd269 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -1,3 +1,4 @@ +```php listIndexes( collectionId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/list-transactions.md b/docs/examples/databases/list-transactions.md index 858e905..8990c74 100644 --- a/docs/examples/databases/list-transactions.md +++ b/docs/examples/databases/list-transactions.md @@ -1,3 +1,4 @@ +```php listTransactions( queries: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index f5baccc..d439184 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -1,3 +1,4 @@ +```php list( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 2e4bee7..f63e5f3 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -1,3 +1,4 @@ +```php updateBooleanAttribute( required: false, default: false, newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index 78e0dfe..79271f6 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -1,3 +1,4 @@ +```php updateCollection( permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index b1a03ec..a1fb43f 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -1,3 +1,4 @@ +```php updateDatetimeAttribute( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index 5037d4b..7a18545 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -1,3 +1,4 @@ +```php updateDocument( ], // optional permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-documents.md b/docs/examples/databases/update-documents.md index 3a4aaad..c29a467 100644 --- a/docs/examples/databases/update-documents.md +++ b/docs/examples/databases/update-documents.md @@ -1,3 +1,4 @@ +```php updateDocuments( ], // optional queries: [], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index dc9865f..b4421d5 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -1,3 +1,4 @@ +```php updateEmailAttribute( required: false, default: 'email@example.com', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index f7cd0b7..c2880f2 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -1,3 +1,4 @@ +```php updateEnumAttribute( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 51f6ec9..3ea4818 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -1,3 +1,4 @@ +```php updateFloatAttribute( min: null, // optional max: null, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index bdbd96c..29b7ac6 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -1,3 +1,4 @@ +```php updateIntegerAttribute( min: null, // optional max: null, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 130cd0c..c7490c5 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -1,3 +1,4 @@ +```php updateIpAttribute( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index 86b8f64..7cb7dab 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -1,3 +1,4 @@ +```php updateLineAttribute( required: false, default: [[1, 2], [3, 4], [5, 6]], // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index 6d5ade2..d9a217d 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -1,3 +1,4 @@ +```php updateLongtextAttribute( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index 7671c55..bae0341 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -1,3 +1,4 @@ +```php updateMediumtextAttribute( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index cdff226..1359ec9 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -1,3 +1,4 @@ +```php updatePointAttribute( required: false, default: [1, 2], // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index c2736bd..cf79996 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -1,3 +1,4 @@ +```php updatePolygonAttribute( required: false, default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index a4d6888..824f1f7 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -1,3 +1,4 @@ +```php updateRelationshipAttribute( key: '', onDelete: RelationMutate::CASCADE(), // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index e0c8f99..828dda4 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -1,3 +1,4 @@ +```php updateStringAttribute( default: '', size: 1, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index eef0669..8de8c78 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -1,3 +1,4 @@ +```php updateTextAttribute( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-transaction.md b/docs/examples/databases/update-transaction.md index 750eb86..13137b6 100644 --- a/docs/examples/databases/update-transaction.md +++ b/docs/examples/databases/update-transaction.md @@ -1,3 +1,4 @@ +```php updateTransaction( transactionId: '', commit: false, // optional rollback: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index c200463..461abf5 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -1,3 +1,4 @@ +```php updateUrlAttribute( required: false, default: 'https://example.com', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index df98322..0c5dbbe 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -1,3 +1,4 @@ +```php updateVarcharAttribute( default: '', size: 1, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index 06a92b3..67af71a 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -1,3 +1,4 @@ +```php update( databaseId: '', name: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md index c4cee07..9b01b8c 100644 --- a/docs/examples/databases/upsert-document.md +++ b/docs/examples/databases/upsert-document.md @@ -1,3 +1,4 @@ +```php upsertDocument( ], // optional permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/databases/upsert-documents.md b/docs/examples/databases/upsert-documents.md index 06d3a31..5bc04d7 100644 --- a/docs/examples/databases/upsert-documents.md +++ b/docs/examples/databases/upsert-documents.md @@ -1,3 +1,4 @@ +```php upsertDocuments( collectionId: '', documents: [], transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index 7e48b89..cdee0ff 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -1,3 +1,4 @@ +```php createDeployment( activate: false, entrypoint: '', // optional commands: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create-duplicate-deployment.md b/docs/examples/functions/create-duplicate-deployment.md index a898762..0cf3a83 100644 --- a/docs/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/functions/create-duplicate-deployment.md @@ -1,3 +1,4 @@ +```php createDuplicateDeployment( functionId: '', deploymentId: '', buildId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 9c12e87..70a8fc0 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -1,3 +1,4 @@ +```php createExecution( method: ExecutionMethod::GET(), // optional headers: [], // optional scheduledAt: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create-template-deployment.md b/docs/examples/functions/create-template-deployment.md index a127252..c6dae9a 100644 --- a/docs/examples/functions/create-template-deployment.md +++ b/docs/examples/functions/create-template-deployment.md @@ -1,3 +1,4 @@ +```php createTemplateDeployment( type: TemplateReferenceType::COMMIT(), reference: '', activate: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index ec470d5..d860cb3 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -1,3 +1,4 @@ +```php createVariable( key: '', value: '', secret: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create-vcs-deployment.md b/docs/examples/functions/create-vcs-deployment.md index f044219..5ccab95 100644 --- a/docs/examples/functions/create-vcs-deployment.md +++ b/docs/examples/functions/create-vcs-deployment.md @@ -1,3 +1,4 @@ +```php createVcsDeployment( type: VCSReferenceType::BRANCH(), reference: '', activate: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 0504e73..e921e99 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -1,3 +1,4 @@ +```php create( providerSilentMode: false, // optional providerRootDirectory: '', // optional specification: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index 20285d7..96e78e3 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -1,3 +1,4 @@ +```php deleteDeployment( functionId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/delete-execution.md b/docs/examples/functions/delete-execution.md index e55a8b1..e95d2f7 100644 --- a/docs/examples/functions/delete-execution.md +++ b/docs/examples/functions/delete-execution.md @@ -1,3 +1,4 @@ +```php deleteExecution( functionId: '', executionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index e1fb391..9be2e17 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -1,3 +1,4 @@ +```php deleteVariable( functionId: '', variableId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index 9f87f5c..d718bfb 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -1,3 +1,4 @@ +```php delete( functionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index a06f97b..73842f5 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/examples/functions/get-deployment-download.md @@ -1,3 +1,4 @@ +```php getDeploymentDownload( functionId: '', deploymentId: '', type: DeploymentDownloadType::SOURCE() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index 945933b..f8d4a26 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -1,3 +1,4 @@ +```php getDeployment( functionId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index 7dfeeed..f647a7f 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -1,3 +1,4 @@ +```php getExecution( functionId: '', executionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 4c8d3d6..8d40864 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -1,3 +1,4 @@ +```php getVariable( functionId: '', variableId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index ca2160f..e5997ee 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -1,3 +1,4 @@ +```php get( functionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index bf90318..bc46662 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -1,3 +1,4 @@ +```php listDeployments( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 4a7c79c..9948e86 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -1,3 +1,4 @@ +```php listExecutions( functionId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index 6c77c42..320a9dc 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -1,3 +1,4 @@ +```php listRuntimes(); +``` diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index eec5c33..f5afe80 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -1,3 +1,4 @@ +```php listSpecifications(); +``` diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index f85e854..8867ad6 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -1,3 +1,4 @@ +```php listVariables( functionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index 1646a06..2dc45db 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -1,3 +1,4 @@ +```php list( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/update-deployment-status.md b/docs/examples/functions/update-deployment-status.md index de36d4e..311645e 100644 --- a/docs/examples/functions/update-deployment-status.md +++ b/docs/examples/functions/update-deployment-status.md @@ -1,3 +1,4 @@ +```php updateDeploymentStatus( functionId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/update-function-deployment.md b/docs/examples/functions/update-function-deployment.md index 38ba026..b1c0edb 100644 --- a/docs/examples/functions/update-function-deployment.md +++ b/docs/examples/functions/update-function-deployment.md @@ -1,3 +1,4 @@ +```php updateFunctionDeployment( functionId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index b15597a..3a28069 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -1,3 +1,4 @@ +```php updateVariable( key: '', value: '', // optional secret: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index 1c3ff54..f9bdac1 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -1,3 +1,4 @@ +```php update( providerSilentMode: false, // optional providerRootDirectory: '', // optional specification: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index c349bc2..1e25bf7 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -1,3 +1,4 @@ +```php mutation( query: [] -); \ No newline at end of file +);``` diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index e6e277c..9097994 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -1,3 +1,4 @@ +```php query( query: [] -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 4721064..7f57d8a 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -1,3 +1,4 @@ +```php getAntivirus(); +``` diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index 2e81dae..8443c64 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -1,3 +1,4 @@ +```php getCache(); +``` diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index 408581b..d1d1fd1 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -1,3 +1,4 @@ +```php getCertificate( domain: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-db.md b/docs/examples/health/get-db.md index cfec70e..1682bcf 100644 --- a/docs/examples/health/get-db.md +++ b/docs/examples/health/get-db.md @@ -1,3 +1,4 @@ +```php getDB(); +``` diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index 63bc1c8..8586763 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/examples/health/get-failed-jobs.md @@ -1,3 +1,4 @@ +```php getFailedJobs( name: Name::V1DATABASE(), threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index 1c346ca..97dc4b6 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -1,3 +1,4 @@ +```php getPubSub(); +``` diff --git a/docs/examples/health/get-queue-audits.md b/docs/examples/health/get-queue-audits.md index cd51345..2bfc32e 100644 --- a/docs/examples/health/get-queue-audits.md +++ b/docs/examples/health/get-queue-audits.md @@ -1,3 +1,4 @@ +```php getQueueAudits( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-billing-project-aggregation.md b/docs/examples/health/get-queue-billing-project-aggregation.md new file mode 100644 index 0000000..e04fc2e --- /dev/null +++ b/docs/examples/health/get-queue-billing-project-aggregation.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueBillingProjectAggregation( + threshold: null // optional +);``` diff --git a/docs/examples/health/get-queue-billing-team-aggregation.md b/docs/examples/health/get-queue-billing-team-aggregation.md new file mode 100644 index 0000000..37fa4d2 --- /dev/null +++ b/docs/examples/health/get-queue-billing-team-aggregation.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueBillingTeamAggregation( + threshold: null // optional +);``` diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index 8c1f774..607acb2 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -1,3 +1,4 @@ +```php getQueueBuilds( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index 92fb79a..d70b657 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -1,3 +1,4 @@ +```php getQueueCertificates( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index 745b469..96bfb6f 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -1,3 +1,4 @@ +```php getQueueDatabases( name: '', // optional threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index d395268..2b147f4 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -1,3 +1,4 @@ +```php getQueueDeletes( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index 1a5bea2..d5b5844 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -1,3 +1,4 @@ +```php getQueueFunctions( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index cf5e3b9..cb0125c 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -1,3 +1,4 @@ +```php getQueueLogs( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index 132dfa6..56babd6 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -1,3 +1,4 @@ +```php getQueueMails( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index fd5fdb1..4539c5d 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -1,3 +1,4 @@ +```php getQueueMessaging( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index 6811018..36b8d4b 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -1,3 +1,4 @@ +```php getQueueMigrations( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-priority-builds.md b/docs/examples/health/get-queue-priority-builds.md new file mode 100644 index 0000000..b7a97a5 --- /dev/null +++ b/docs/examples/health/get-queue-priority-builds.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueuePriorityBuilds( + threshold: null // optional +);``` diff --git a/docs/examples/health/get-queue-region-manager.md b/docs/examples/health/get-queue-region-manager.md new file mode 100644 index 0000000..11b63f7 --- /dev/null +++ b/docs/examples/health/get-queue-region-manager.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueRegionManager( + threshold: null // optional +);``` diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md index d0bd6c0..da4cee7 100644 --- a/docs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -1,3 +1,4 @@ +```php getQueueStatsResources( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-threats.md b/docs/examples/health/get-queue-threats.md new file mode 100644 index 0000000..8ccfb0d --- /dev/null +++ b/docs/examples/health/get-queue-threats.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueThreats( + threshold: null // optional +);``` diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index 627a85c..dd35802 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -1,3 +1,4 @@ +```php getQueueUsage( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index d6ccd7c..d2877ce 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -1,3 +1,4 @@ +```php getQueueWebhooks( threshold: null // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index 041d249..d7524ba 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -1,3 +1,4 @@ +```php getStorageLocal(); +``` diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index 377416e..2a109de 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -1,3 +1,4 @@ +```php getStorage(); +``` diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index aa26993..559b179 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -1,3 +1,4 @@ +```php getTime(); +``` diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index fec3e3f..4b46ac2 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -1,3 +1,4 @@ +```php get(); +``` diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index ef4c043..8b20457 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -1,3 +1,4 @@ +```php get(); +``` diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index 273fad0..5c99bbf 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -1,3 +1,4 @@ +```php listCodes(); +``` diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index e8c7ca4..1245b2e 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -1,3 +1,4 @@ +```php listContinents(); +``` diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md index c5dd1d2..9744c8e 100644 --- a/docs/examples/locale/list-countries-eu.md +++ b/docs/examples/locale/list-countries-eu.md @@ -1,3 +1,4 @@ +```php listCountriesEU(); +``` diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index 7585c10..df66061 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -1,3 +1,4 @@ +```php listCountriesPhones(); +``` diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index 63a2e0b..f4f9626 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -1,3 +1,4 @@ +```php listCountries(); +``` diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index d385018..f4f1125 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -1,3 +1,4 @@ +```php listCurrencies(); +``` diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index f0ca4d4..b25fab6 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -1,3 +1,4 @@ +```php listLanguages(); +``` diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index 2ce4b7f..768878a 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/examples/messaging/create-apns-provider.md @@ -1,3 +1,4 @@ +```php createAPNSProvider( bundleId: '', // optional sandbox: false, // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 9de2487..68f46f9 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -1,3 +1,4 @@ +```php createEmail( draft: false, // optional html: false, // optional scheduledAt: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index 8037c23..1ab3e98 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/messaging/create-fcm-provider.md @@ -1,3 +1,4 @@ +```php createFCMProvider( name: '', serviceAccountJSON: [], // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index 6c62ee8..ca0a3cb 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/messaging/create-mailgun-provider.md @@ -1,3 +1,4 @@ +```php createMailgunProvider( replyToName: '', // optional replyToEmail: 'email@example.com', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-msg-91-provider.md b/docs/examples/messaging/create-msg-91-provider.md index 1eb954a..78998cf 100644 --- a/docs/examples/messaging/create-msg-91-provider.md +++ b/docs/examples/messaging/create-msg-91-provider.md @@ -1,3 +1,4 @@ +```php createMsg91Provider( senderId: '', // optional authKey: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index 614c758..2673d48 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -1,3 +1,4 @@ +```php createPush( contentAvailable: false, // optional critical: false, // optional priority: MessagePriority::NORMAL() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-resend-provider.md b/docs/examples/messaging/create-resend-provider.md index e66b0b8..e32ad9f 100644 --- a/docs/examples/messaging/create-resend-provider.md +++ b/docs/examples/messaging/create-resend-provider.md @@ -1,3 +1,4 @@ +```php createResendProvider( replyToName: '', // optional replyToEmail: 'email@example.com', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index 892d856..38f213c 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/messaging/create-sendgrid-provider.md @@ -1,3 +1,4 @@ +```php createSendgridProvider( replyToName: '', // optional replyToEmail: 'email@example.com', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index 50623b5..5f946db 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/examples/messaging/create-sms.md @@ -1,3 +1,4 @@ +```php createSMS( targets: [], // optional draft: false, // optional scheduledAt: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index 953bbcf..0538612 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -1,3 +1,4 @@ +```php createSMTPProvider( replyToName: '', // optional replyToEmail: 'email@example.com', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index 3516fa3..f0d2783 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -1,3 +1,4 @@ +```php createSubscriber( topicId: '', subscriberId: '', targetId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index 9006918..005e6d0 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/messaging/create-telesign-provider.md @@ -1,3 +1,4 @@ +```php createTelesignProvider( customerId: '', // optional apiKey: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index 5215d52..262a9e2 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/messaging/create-textmagic-provider.md @@ -1,3 +1,4 @@ +```php createTextmagicProvider( username: '', // optional apiKey: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index e94141c..460168e 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -1,3 +1,4 @@ +```php createTopic( topicId: '', name: '', subscribe: ["any"] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index c356828..f8ee417 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/messaging/create-twilio-provider.md @@ -1,3 +1,4 @@ +```php createTwilioProvider( accountSid: '', // optional authToken: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index adeacbc..450cf9c 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/messaging/create-vonage-provider.md @@ -1,3 +1,4 @@ +```php createVonageProvider( apiKey: '', // optional apiSecret: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index f37d18b..e0a63c1 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -1,3 +1,4 @@ +```php deleteProvider( providerId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index f7a8425..9720ad0 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -1,3 +1,4 @@ +```php deleteSubscriber( topicId: '', subscriberId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index 2ec899b..9061451 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -1,3 +1,4 @@ +```php deleteTopic( topicId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index 5781838..1548905 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -1,3 +1,4 @@ +```php delete( messageId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index cf92221..a1d2f02 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -1,3 +1,4 @@ +```php getMessage( messageId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index d19f5c6..6353e54 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -1,3 +1,4 @@ +```php getProvider( providerId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index e2a0d7e..d3a20e9 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/examples/messaging/get-subscriber.md @@ -1,3 +1,4 @@ +```php getSubscriber( topicId: '', subscriberId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index fc06cbb..95ff3ff 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -1,3 +1,4 @@ +```php getTopic( topicId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index 4e0ab3e..8bc5631 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/messaging/list-message-logs.md @@ -1,3 +1,4 @@ +```php listMessageLogs( messageId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index d66c64f..fa6d57c 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -1,3 +1,4 @@ +```php listMessages( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index 8c8d7f1..afc3df9 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/examples/messaging/list-provider-logs.md @@ -1,3 +1,4 @@ +```php listProviderLogs( providerId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index da0910e..281a522 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -1,3 +1,4 @@ +```php listProviders( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index 9e453a2..7a0e5ad 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/messaging/list-subscriber-logs.md @@ -1,3 +1,4 @@ +```php listSubscriberLogs( subscriberId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index f21c788..096a8f2 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -1,3 +1,4 @@ +```php listSubscribers( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index 03ffdbb..0615d82 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -1,3 +1,4 @@ +```php listTargets( messageId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index fae8eec..d32d27a 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/examples/messaging/list-topic-logs.md @@ -1,3 +1,4 @@ +```php listTopicLogs( topicId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index b5d4c54..6386df1 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -1,3 +1,4 @@ +```php listTopics( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index 161a148..aa0e78f 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/examples/messaging/update-apns-provider.md @@ -1,3 +1,4 @@ +```php updateAPNSProvider( teamId: '', // optional bundleId: '', // optional sandbox: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index dd0f645..347f030 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -1,3 +1,4 @@ +```php updateEmail( bcc: [], // optional scheduledAt: '', // optional attachments: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index 0df2b93..a9a54d1 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/messaging/update-fcm-provider.md @@ -1,3 +1,4 @@ +```php updateFCMProvider( name: '', // optional enabled: false, // optional serviceAccountJSON: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index c99ebc7..6392e78 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/messaging/update-mailgun-provider.md @@ -1,3 +1,4 @@ +```php updateMailgunProvider( fromEmail: 'email@example.com', // optional replyToName: '', // optional replyToEmail: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-msg-91-provider.md b/docs/examples/messaging/update-msg-91-provider.md index f6f557c..67b689c 100644 --- a/docs/examples/messaging/update-msg-91-provider.md +++ b/docs/examples/messaging/update-msg-91-provider.md @@ -1,3 +1,4 @@ +```php updateMsg91Provider( templateId: '', // optional senderId: '', // optional authKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index 0fea9a1..0b3f1bc 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -1,3 +1,4 @@ +```php updatePush( contentAvailable: false, // optional critical: false, // optional priority: MessagePriority::NORMAL() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-resend-provider.md b/docs/examples/messaging/update-resend-provider.md index b3f1d1f..ab60aaf 100644 --- a/docs/examples/messaging/update-resend-provider.md +++ b/docs/examples/messaging/update-resend-provider.md @@ -1,3 +1,4 @@ +```php updateResendProvider( fromEmail: 'email@example.com', // optional replyToName: '', // optional replyToEmail: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index b8473c1..e6e0391 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/messaging/update-sendgrid-provider.md @@ -1,3 +1,4 @@ +```php updateSendgridProvider( fromEmail: 'email@example.com', // optional replyToName: '', // optional replyToEmail: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index 92d3ebb..3dc932a 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -1,3 +1,4 @@ +```php updateSMS( content: '', // optional draft: false, // optional scheduledAt: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 495f332..5701b3c 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -1,3 +1,4 @@ +```php updateSMTPProvider( replyToName: '', // optional replyToEmail: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index 29a54bf..33fcbb3 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/messaging/update-telesign-provider.md @@ -1,3 +1,4 @@ +```php updateTelesignProvider( customerId: '', // optional apiKey: '', // optional from: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index e6a1ed1..96564c7 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/messaging/update-textmagic-provider.md @@ -1,3 +1,4 @@ +```php updateTextmagicProvider( username: '', // optional apiKey: '', // optional from: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index b1f9a32..257e754 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -1,3 +1,4 @@ +```php updateTopic( topicId: '', name: '', // optional subscribe: ["any"] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index def821a..c9bcfa9 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/messaging/update-twilio-provider.md @@ -1,3 +1,4 @@ +```php updateTwilioProvider( accountSid: '', // optional authToken: '', // optional from: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index 0841e28..112745e 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/messaging/update-vonage-provider.md @@ -1,3 +1,4 @@ +```php updateVonageProvider( apiKey: '', // optional apiSecret: '', // optional from: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/organizations/delete.md b/docs/examples/organizations/delete.md new file mode 100644 index 0000000..887b0be --- /dev/null +++ b/docs/examples/organizations/delete.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organizations = new Organizations($client); + +$result = $organizations->delete( + organizationId: '' +);``` diff --git a/docs/examples/organizations/estimation-delete-organization.md b/docs/examples/organizations/estimation-delete-organization.md new file mode 100644 index 0000000..770e6e7 --- /dev/null +++ b/docs/examples/organizations/estimation-delete-organization.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organizations = new Organizations($client); + +$result = $organizations->estimationDeleteOrganization( + organizationId: '' +);``` diff --git a/docs/examples/sites/create-deployment.md b/docs/examples/sites/create-deployment.md index 30770b7..c890f11 100644 --- a/docs/examples/sites/create-deployment.md +++ b/docs/examples/sites/create-deployment.md @@ -1,3 +1,4 @@ +```php createDeployment( installCommand: '', // optional buildCommand: '', // optional outputDirectory: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/create-duplicate-deployment.md b/docs/examples/sites/create-duplicate-deployment.md index 84f65cd..97fb1f5 100644 --- a/docs/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/sites/create-duplicate-deployment.md @@ -1,3 +1,4 @@ +```php createDuplicateDeployment( siteId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/create-template-deployment.md b/docs/examples/sites/create-template-deployment.md index 1661bbb..05f039e 100644 --- a/docs/examples/sites/create-template-deployment.md +++ b/docs/examples/sites/create-template-deployment.md @@ -1,3 +1,4 @@ +```php createTemplateDeployment( type: TemplateReferenceType::BRANCH(), reference: '', activate: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index 3097e19..fee3ae9 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -1,3 +1,4 @@ +```php createVariable( key: '', value: '', secret: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/create-vcs-deployment.md b/docs/examples/sites/create-vcs-deployment.md index 015bf09..d01747b 100644 --- a/docs/examples/sites/create-vcs-deployment.md +++ b/docs/examples/sites/create-vcs-deployment.md @@ -1,3 +1,4 @@ +```php createVcsDeployment( type: VCSReferenceType::BRANCH(), reference: '', activate: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index 6f1fc5a..9191261 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -1,3 +1,4 @@ +```php create( providerSilentMode: false, // optional providerRootDirectory: '', // optional specification: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/delete-deployment.md b/docs/examples/sites/delete-deployment.md index 4e24748..97bb976 100644 --- a/docs/examples/sites/delete-deployment.md +++ b/docs/examples/sites/delete-deployment.md @@ -1,3 +1,4 @@ +```php deleteDeployment( siteId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/delete-log.md b/docs/examples/sites/delete-log.md index b6e3064..ed5b3c5 100644 --- a/docs/examples/sites/delete-log.md +++ b/docs/examples/sites/delete-log.md @@ -1,3 +1,4 @@ +```php deleteLog( siteId: '', logId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/delete-variable.md b/docs/examples/sites/delete-variable.md index 6632543..bdb2fbf 100644 --- a/docs/examples/sites/delete-variable.md +++ b/docs/examples/sites/delete-variable.md @@ -1,3 +1,4 @@ +```php deleteVariable( siteId: '', variableId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/delete.md b/docs/examples/sites/delete.md index 8e6363a..c2965d4 100644 --- a/docs/examples/sites/delete.md +++ b/docs/examples/sites/delete.md @@ -1,3 +1,4 @@ +```php delete( siteId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/get-deployment-download.md b/docs/examples/sites/get-deployment-download.md index 61fad0b..5582e96 100644 --- a/docs/examples/sites/get-deployment-download.md +++ b/docs/examples/sites/get-deployment-download.md @@ -1,3 +1,4 @@ +```php getDeploymentDownload( siteId: '', deploymentId: '', type: DeploymentDownloadType::SOURCE() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/get-deployment.md b/docs/examples/sites/get-deployment.md index 19525d9..91f8367 100644 --- a/docs/examples/sites/get-deployment.md +++ b/docs/examples/sites/get-deployment.md @@ -1,3 +1,4 @@ +```php getDeployment( siteId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/get-log.md b/docs/examples/sites/get-log.md index 5ceb2b9..a781d20 100644 --- a/docs/examples/sites/get-log.md +++ b/docs/examples/sites/get-log.md @@ -1,3 +1,4 @@ +```php getLog( siteId: '', logId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/get-variable.md b/docs/examples/sites/get-variable.md index 0cab412..80b61ec 100644 --- a/docs/examples/sites/get-variable.md +++ b/docs/examples/sites/get-variable.md @@ -1,3 +1,4 @@ +```php getVariable( siteId: '', variableId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/get.md b/docs/examples/sites/get.md index e5ec061..c8f8c8e 100644 --- a/docs/examples/sites/get.md +++ b/docs/examples/sites/get.md @@ -1,3 +1,4 @@ +```php get( siteId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/list-deployments.md b/docs/examples/sites/list-deployments.md index bb49a5a..82cee29 100644 --- a/docs/examples/sites/list-deployments.md +++ b/docs/examples/sites/list-deployments.md @@ -1,3 +1,4 @@ +```php listDeployments( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/list-frameworks.md b/docs/examples/sites/list-frameworks.md index 87df92d..74ea882 100644 --- a/docs/examples/sites/list-frameworks.md +++ b/docs/examples/sites/list-frameworks.md @@ -1,3 +1,4 @@ +```php listFrameworks(); +``` diff --git a/docs/examples/sites/list-logs.md b/docs/examples/sites/list-logs.md index 3bc4540..5626bbb 100644 --- a/docs/examples/sites/list-logs.md +++ b/docs/examples/sites/list-logs.md @@ -1,3 +1,4 @@ +```php listLogs( siteId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md index 42dae1b..1a732b6 100644 --- a/docs/examples/sites/list-specifications.md +++ b/docs/examples/sites/list-specifications.md @@ -1,3 +1,4 @@ +```php listSpecifications(); +``` diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md index 36aad64..7b7ab11 100644 --- a/docs/examples/sites/list-variables.md +++ b/docs/examples/sites/list-variables.md @@ -1,3 +1,4 @@ +```php listVariables( siteId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/list.md b/docs/examples/sites/list.md index d056e8d..08c1314 100644 --- a/docs/examples/sites/list.md +++ b/docs/examples/sites/list.md @@ -1,3 +1,4 @@ +```php list( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/update-deployment-status.md b/docs/examples/sites/update-deployment-status.md index 2714b35..06ffc75 100644 --- a/docs/examples/sites/update-deployment-status.md +++ b/docs/examples/sites/update-deployment-status.md @@ -1,3 +1,4 @@ +```php updateDeploymentStatus( siteId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/update-site-deployment.md b/docs/examples/sites/update-site-deployment.md index 6e2614c..bdac54d 100644 --- a/docs/examples/sites/update-site-deployment.md +++ b/docs/examples/sites/update-site-deployment.md @@ -1,3 +1,4 @@ +```php updateSiteDeployment( siteId: '', deploymentId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index 84bafe2..9651875 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -1,3 +1,4 @@ +```php updateVariable( key: '', value: '', // optional secret: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index d2a6c9d..42d24fb 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -1,3 +1,4 @@ +```php update( providerSilentMode: false, // optional providerRootDirectory: '', // optional specification: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 3184095..f00c2c7 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -1,3 +1,4 @@ +```php createBucket( encryption: false, // optional antivirus: false, // optional transformations: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index 33bef04..62301b1 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -1,3 +1,4 @@ +```php createFile( fileId: '', file: InputFile::withPath('file.png'), permissions: [Permission::read(Role::any())] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index 50adf35..737f4e1 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -1,3 +1,4 @@ +```php deleteBucket( bucketId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index d4c45eb..dd2c3a7 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -1,3 +1,4 @@ +```php deleteFile( bucketId: '', fileId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index e62c43d..f6449ae 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -1,3 +1,4 @@ +```php getBucket( bucketId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index defefa5..f55376f 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -1,3 +1,4 @@ +```php getFileDownload( bucketId: '', fileId: '', token: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index aaa15a2..8964011 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -1,3 +1,4 @@ +```php getFilePreview( background: '', // optional output: ImageFormat::JPG(), // optional token: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index dfc84ca..6a729dc 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -1,3 +1,4 @@ +```php getFileView( bucketId: '', fileId: '', token: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 6964144..b498b60 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -1,3 +1,4 @@ +```php getFile( bucketId: '', fileId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index 8b84a8b..3b0d79d 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -1,3 +1,4 @@ +```php listBuckets( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index 309c87c..77e78cd 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -1,3 +1,4 @@ +```php listFiles( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index 1556257..c14e75c 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -1,3 +1,4 @@ +```php updateBucket( encryption: false, // optional antivirus: false, // optional transformations: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index fc84f59..1e40a49 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -1,3 +1,4 @@ +```php updateFile( fileId: '', name: '', // optional permissions: [Permission::read(Role::any())] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 5f0a2de..b6032a3 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -1,3 +1,4 @@ +```php createBooleanColumn( required: false, default: false, // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index 9ea8e8f..9e9ad84 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -1,3 +1,4 @@ +```php createDatetimeColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 64f3a08..f24aa05 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -1,3 +1,4 @@ +```php createEmailColumn( required: false, default: 'email@example.com', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index 0506a33..9515742 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -1,3 +1,4 @@ +```php createEnumColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index 65a7f00..c83abba 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -1,3 +1,4 @@ +```php createFloatColumn( max: null, // optional default: null, // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index b56f503..c91356f 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -1,3 +1,4 @@ +```php createIndex( columns: [], orders: [OrderBy::ASC()], // optional lengths: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index 4bf96e8..a42c871 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -1,3 +1,4 @@ +```php createIntegerColumn( max: null, // optional default: null, // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index ab0032e..f40fe61 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -1,3 +1,4 @@ +```php createIpColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index 69f2e66..c1d17b8 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -1,3 +1,4 @@ +```php createLineColumn( key: '', required: false, default: [[1, 2], [3, 4], [5, 6]] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 48c5747..cb2bd85 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -1,3 +1,4 @@ +```php createLongtextColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index f2472fb..b17328c 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -1,3 +1,4 @@ +```php createMediumtextColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-operations.md b/docs/examples/tablesdb/create-operations.md index 429a0bb..45ea4c9 100644 --- a/docs/examples/tablesdb/create-operations.md +++ b/docs/examples/tablesdb/create-operations.md @@ -1,3 +1,4 @@ +```php createOperations( } } ] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 006c9e0..bde57bc 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -1,3 +1,4 @@ +```php createPointColumn( key: '', required: false, default: [1, 2] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 20fb271..ee340f3 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -1,3 +1,4 @@ +```php createPolygonColumn( key: '', required: false, default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index 7f9a06c..06dd6c0 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -1,3 +1,4 @@ +```php createRelationshipColumn( key: '', // optional twoWayKey: '', // optional onDelete: RelationMutate::CASCADE() // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index 70666d5..fc253f2 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,3 +1,4 @@ +```php createRow( ], permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index 44c9c7d..8c08fa5 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -1,3 +1,4 @@ +```php createRows( tableId: '', rows: [], transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index 22fc7cc..a4dd4da 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -1,3 +1,4 @@ +```php createStringColumn( default: '', // optional array: false, // optional encrypt: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index aef39e5..fbe4476 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -1,3 +1,4 @@ +```php createTable( enabled: false, // optional columns: [], // optional indexes: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index 00f1611..833aa90 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -1,3 +1,4 @@ +```php createTextColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-transaction.md b/docs/examples/tablesdb/create-transaction.md index 3248818..6664c08 100644 --- a/docs/examples/tablesdb/create-transaction.md +++ b/docs/examples/tablesdb/create-transaction.md @@ -1,3 +1,4 @@ +```php createTransaction( ttl: 60 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index fe25988..ceb1dae 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -1,3 +1,4 @@ +```php createUrlColumn( required: false, default: 'https://example.com', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index bbd8650..25aa354 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -1,3 +1,4 @@ +```php createVarcharColumn( required: false, default: '', // optional array: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index c3c4faa..2265fc9 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -1,3 +1,4 @@ +```php create( databaseId: '', name: '', enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index ede258e..0d01314 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,3 +1,4 @@ +```php decrementRowColumn( value: null, // optional min: null, // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index dd99fab..97cafce 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -1,3 +1,4 @@ +```php deleteColumn( databaseId: '', tableId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index 1ef346f..abad824 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -1,3 +1,4 @@ +```php deleteIndex( databaseId: '', tableId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index df87c50..05722a0 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,3 +1,4 @@ +```php deleteRow( tableId: '', rowId: '', transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index 79ed607..934ea6b 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -1,3 +1,4 @@ +```php deleteRows( tableId: '', queries: [], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index 3cbb35d..acc711d 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -1,3 +1,4 @@ +```php deleteTable( databaseId: '', tableId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete-transaction.md b/docs/examples/tablesdb/delete-transaction.md index d165015..2b0c7ff 100644 --- a/docs/examples/tablesdb/delete-transaction.md +++ b/docs/examples/tablesdb/delete-transaction.md @@ -1,3 +1,4 @@ +```php deleteTransaction( transactionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index ea996e9..1b2cc93 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -1,3 +1,4 @@ +```php delete( databaseId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index d1705a4..0be374f 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -1,3 +1,4 @@ +```php getColumn( databaseId: '', tableId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index 0d67648..5e79e70 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -1,3 +1,4 @@ +```php getIndex( databaseId: '', tableId: '', key: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index 4bbea55..f8871ff 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,3 +1,4 @@ +```php getRow( rowId: '', queries: [], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index ee8812f..1bc0166 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -1,3 +1,4 @@ +```php getTable( databaseId: '', tableId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/get-transaction.md b/docs/examples/tablesdb/get-transaction.md index 146e7d1..fc4030f 100644 --- a/docs/examples/tablesdb/get-transaction.md +++ b/docs/examples/tablesdb/get-transaction.md @@ -1,3 +1,4 @@ +```php getTransaction( transactionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index 07f7098..5dde28d 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -1,3 +1,4 @@ +```php get( databaseId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 66bf2e8..5c6176e 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,3 +1,4 @@ +```php incrementRowColumn( value: null, // optional max: null, // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index 49b4eba..2ecf654 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -1,3 +1,4 @@ +```php listColumns( tableId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index ac466c7..17428fe 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -1,3 +1,4 @@ +```php listIndexes( tableId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index cdcc796..710c791 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,3 +1,4 @@ +```php listRows( queries: [], // optional transactionId: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index b14e28c..c74d5a1 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -1,3 +1,4 @@ +```php listTables( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md index 15095d6..58b31a6 100644 --- a/docs/examples/tablesdb/list-transactions.md +++ b/docs/examples/tablesdb/list-transactions.md @@ -1,3 +1,4 @@ +```php listTransactions( queries: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index 3d74dde..77da552 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -1,3 +1,4 @@ +```php list( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index 0c73516..8a7850f 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -1,3 +1,4 @@ +```php updateBooleanColumn( required: false, default: false, newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 52213c6..4f994a5 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -1,3 +1,4 @@ +```php updateDatetimeColumn( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index d13de56..8cd10d4 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -1,3 +1,4 @@ +```php updateEmailColumn( required: false, default: 'email@example.com', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index d54c0b3..0dcf574 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -1,3 +1,4 @@ +```php updateEnumColumn( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index bb091ab..68a90df 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -1,3 +1,4 @@ +```php updateFloatColumn( min: null, // optional max: null, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 2436bc2..ba7a781 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -1,3 +1,4 @@ +```php updateIntegerColumn( min: null, // optional max: null, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index aa97752..25a7160 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -1,3 +1,4 @@ +```php updateIpColumn( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index 56a557c..a7126a3 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -1,3 +1,4 @@ +```php updateLineColumn( required: false, default: [[1, 2], [3, 4], [5, 6]], // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index 0ba81d6..aaccf92 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -1,3 +1,4 @@ +```php updateLongtextColumn( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index 5ff6424..2b06e8d 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -1,3 +1,4 @@ +```php updateMediumtextColumn( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index abe8b73..0d137ce 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -1,3 +1,4 @@ +```php updatePointColumn( required: false, default: [1, 2], // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 2ff4011..5341610 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -1,3 +1,4 @@ +```php updatePolygonColumn( required: false, default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index cc2e2cc..4b15385 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -1,3 +1,4 @@ +```php updateRelationshipColumn( key: '', onDelete: RelationMutate::CASCADE(), // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index 71916cd..f0fd37d 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,3 +1,4 @@ +```php updateRow( ], // optional permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index a6892f8..baf98ec 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -1,3 +1,4 @@ +```php updateRows( ], // optional queries: [], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index eb1acc1..ff01707 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -1,3 +1,4 @@ +```php updateStringColumn( default: '', size: 1, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index dc09f5f..4409db2 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -1,3 +1,4 @@ +```php updateTable( permissions: [Permission::read(Role::any())], // optional rowSecurity: false, // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index 56aa217..81fa0fe 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -1,3 +1,4 @@ +```php updateTextColumn( required: false, default: '', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-transaction.md b/docs/examples/tablesdb/update-transaction.md index fed3810..512760b 100644 --- a/docs/examples/tablesdb/update-transaction.md +++ b/docs/examples/tablesdb/update-transaction.md @@ -1,3 +1,4 @@ +```php updateTransaction( transactionId: '', commit: false, // optional rollback: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index b64b302..6c05516 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -1,3 +1,4 @@ +```php updateUrlColumn( required: false, default: 'https://example.com', newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index 077e8c4..ca4ba82 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -1,3 +1,4 @@ +```php updateVarcharColumn( default: '', size: 1, // optional newKey: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 0dcd049..126b3ca 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -1,3 +1,4 @@ +```php update( databaseId: '', name: '', // optional enabled: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index e26c825..5c4645b 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,3 +1,4 @@ +```php upsertRow( ], // optional permissions: [Permission::read(Role::any())], // optional transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index fb93df8..6d9d615 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -1,3 +1,4 @@ +```php upsertRows( tableId: '', rows: [], transactionId: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index 53fb6ef..ddbddc3 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -1,8 +1,8 @@ +```php setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,10 +13,10 @@ $teams = new Teams($client); $result = $teams->createMembership( teamId: '', - roles: [Roles::ADMIN()], + roles: [], email: 'email@example.com', // optional userId: '', // optional phone: '+12065550100', // optional url: 'https://example.com', // optional name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index 643fa0e..e0eef90 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -1,3 +1,4 @@ +```php create( teamId: '', name: '', roles: [] // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 579b790..096d69e 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -1,3 +1,4 @@ +```php deleteMembership( teamId: '', membershipId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 9db4e7e..e982d57 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -1,3 +1,4 @@ +```php delete( teamId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index bd6cbe8..c696fd0 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -1,3 +1,4 @@ +```php getMembership( teamId: '', membershipId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index fbade4f..ea621f3 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -1,3 +1,4 @@ +```php getPrefs( teamId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 0dafa8a..b0a7124 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -1,3 +1,4 @@ +```php get( teamId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index 5ff4736..0b4fd91 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -1,3 +1,4 @@ +```php listMemberships( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index 144b50d..04fdc4f 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -1,3 +1,4 @@ +```php list( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index 5dbfd4c..33f891c 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -1,3 +1,4 @@ +```php updateMembershipStatus( membershipId: '', userId: '', secret: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index 0cdd13e..0a25189 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -1,8 +1,8 @@ +```php setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,5 +14,5 @@ $teams = new Teams($client); $result = $teams->updateMembership( teamId: '', membershipId: '', - roles: [Roles::ADMIN()] -); \ No newline at end of file + roles: [] +);``` diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index bc13d92..eae3a3b 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -1,3 +1,4 @@ +```php updateName( teamId: '', name: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index bd8d9de..785f7ba 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -1,3 +1,4 @@ +```php updatePrefs( teamId: '', prefs: [] -); \ No newline at end of file +);``` diff --git a/docs/examples/tokens/create-file-token.md b/docs/examples/tokens/create-file-token.md index e4f2302..d172c15 100644 --- a/docs/examples/tokens/create-file-token.md +++ b/docs/examples/tokens/create-file-token.md @@ -1,3 +1,4 @@ +```php createFileToken( bucketId: '', fileId: '', expire: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tokens/delete.md b/docs/examples/tokens/delete.md index 278be90..d298ed3 100644 --- a/docs/examples/tokens/delete.md +++ b/docs/examples/tokens/delete.md @@ -1,3 +1,4 @@ +```php delete( tokenId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tokens/get.md b/docs/examples/tokens/get.md index e7b4e10..db117e6 100644 --- a/docs/examples/tokens/get.md +++ b/docs/examples/tokens/get.md @@ -1,3 +1,4 @@ +```php get( tokenId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/tokens/list.md b/docs/examples/tokens/list.md index 212a443..3551261 100644 --- a/docs/examples/tokens/list.md +++ b/docs/examples/tokens/list.md @@ -1,3 +1,4 @@ +```php list( fileId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/tokens/update.md b/docs/examples/tokens/update.md index ea95322..07c37e3 100644 --- a/docs/examples/tokens/update.md +++ b/docs/examples/tokens/update.md @@ -1,3 +1,4 @@ +```php update( tokenId: '', expire: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-argon-2-user.md b/docs/examples/users/create-argon-2-user.md index a9166ef..4813cd8 100644 --- a/docs/examples/users/create-argon-2-user.md +++ b/docs/examples/users/create-argon-2-user.md @@ -1,3 +1,4 @@ +```php createArgon2User( email: 'email@example.com', password: 'password', name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index c9fd81e..17a3c7e 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -1,3 +1,4 @@ +```php createBcryptUser( email: 'email@example.com', password: 'password', name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-jwt.md b/docs/examples/users/create-jwt.md index 1c1c6d4..9a22a60 100644 --- a/docs/examples/users/create-jwt.md +++ b/docs/examples/users/create-jwt.md @@ -1,3 +1,4 @@ +```php createJWT( userId: '', sessionId: '', // optional duration: 0 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-md-5-user.md b/docs/examples/users/create-md-5-user.md index 696cbbe..85e97f7 100644 --- a/docs/examples/users/create-md-5-user.md +++ b/docs/examples/users/create-md-5-user.md @@ -1,3 +1,4 @@ +```php createMD5User( email: 'email@example.com', password: 'password', name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index ee96d2e..2329547 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/users/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```php createMFARecoveryCodes( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-ph-pass-user.md b/docs/examples/users/create-ph-pass-user.md index d56c465..0e9a62f 100644 --- a/docs/examples/users/create-ph-pass-user.md +++ b/docs/examples/users/create-ph-pass-user.md @@ -1,3 +1,4 @@ +```php createPHPassUser( email: 'email@example.com', password: 'password', name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index f579efb..22c18b1 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -1,3 +1,4 @@ +```php createScryptModifiedUser( passwordSaltSeparator: '', passwordSignerKey: '', name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index b406b94..8ebc44d 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -1,3 +1,4 @@ +```php createScryptUser( passwordParallel: null, passwordLength: null, name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-session.md b/docs/examples/users/create-session.md index 1589315..0279835 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -1,3 +1,4 @@ +```php createSession( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-sha-user.md b/docs/examples/users/create-sha-user.md index 812bcd5..924224b 100644 --- a/docs/examples/users/create-sha-user.md +++ b/docs/examples/users/create-sha-user.md @@ -1,3 +1,4 @@ +```php createSHAUser( password: 'password', passwordVersion: PasswordHash::SHA1(), // optional name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-target.md b/docs/examples/users/create-target.md index 57946a4..1000574 100644 --- a/docs/examples/users/create-target.md +++ b/docs/examples/users/create-target.md @@ -1,3 +1,4 @@ +```php createTarget( identifier: '', providerId: '', // optional name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create-token.md b/docs/examples/users/create-token.md index 1b92f51..4519995 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -1,3 +1,4 @@ +```php createToken( userId: '', length: 4, // optional expire: 60 // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index 595f24f..ec9b683 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -1,3 +1,4 @@ +```php create( phone: '+12065550100', // optional password: '', // optional name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index 26b71ee..b364358 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -1,3 +1,4 @@ +```php deleteIdentity( identityId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index f2f08ec..15ca8e2 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/users/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```php deleteMFAAuthenticator( userId: '', type: AuthenticatorType::TOTP() -); \ No newline at end of file +);``` diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index 493cf53..9786bde 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -1,3 +1,4 @@ +```php deleteSession( userId: '', sessionId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index cd6d11e..236aeff 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -1,3 +1,4 @@ +```php deleteSessions( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index 0d85d3e..6d915db 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/examples/users/delete-target.md @@ -1,3 +1,4 @@ +```php deleteTarget( userId: '', targetId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index 883156e..faea96c 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -1,3 +1,4 @@ +```php delete( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index 7937e6a..90aa08d 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/users/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```php getMFARecoveryCodes( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index 5e99e14..931c5be 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -1,3 +1,4 @@ +```php getPrefs( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index 31baf3c..1f3c002 100644 --- a/docs/examples/users/get-target.md +++ b/docs/examples/users/get-target.md @@ -1,3 +1,4 @@ +```php getTarget( userId: '', targetId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 0ce39ae..a777b73 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -1,3 +1,4 @@ +```php get( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index 9cdc5bc..3707410 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -1,3 +1,4 @@ +```php listIdentities( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index 7015526..0d0464e 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -1,3 +1,4 @@ +```php listLogs( userId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 9a37fea..c9b3fb5 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -1,3 +1,4 @@ +```php listMemberships( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index 5dae790..c3cd045 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/examples/users/list-mfa-factors.md @@ -1,3 +1,4 @@ +```php listMFAFactors( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index e657aa2..e4baa40 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -1,3 +1,4 @@ +```php listSessions( userId: '', total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index 435dbde..3e33f9f 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -1,3 +1,4 @@ +```php listTargets( userId: '', queries: [], // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index 6494f07..39d3189 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -1,3 +1,4 @@ +```php list( queries: [], // optional search: '', // optional total: false // optional -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index 636f1d2..b7a3a91 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -1,3 +1,4 @@ +```php updateEmailVerification( userId: '', emailVerification: false -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index 21ec88b..2710f49 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -1,3 +1,4 @@ +```php updateEmail( userId: '', email: 'email@example.com' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-labels.md b/docs/examples/users/update-labels.md index 7d4ae5d..56be4fb 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/examples/users/update-labels.md @@ -1,3 +1,4 @@ +```php updateLabels( userId: '', labels: [] -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index 8474755..bee4d18 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/users/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```php updateMFARecoveryCodes( userId: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-mfa.md b/docs/examples/users/update-mfa.md index c24916a..9cac2ff 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/examples/users/update-mfa.md @@ -1,3 +1,4 @@ +```php updateMFA( userId: '', mfa: false -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index 09bb07c..bce3d8c 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -1,3 +1,4 @@ +```php updateName( userId: '', name: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index 6d58605..69d9330 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -1,3 +1,4 @@ +```php updatePassword( userId: '', password: '' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index 019fb3f..f94b1f8 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -1,3 +1,4 @@ +```php updatePhoneVerification( userId: '', phoneVerification: false -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index 13bd41b..c975eaf 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -1,3 +1,4 @@ +```php updatePhone( userId: '', number: '+12065550100' -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index 9491239..b276922 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -1,3 +1,4 @@ +```php updatePrefs( userId: '', prefs: [] -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index f29dc95..1a8346c 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -1,3 +1,4 @@ +```php updateStatus( userId: '', status: false -); \ No newline at end of file +);``` diff --git a/docs/examples/users/update-target.md b/docs/examples/users/update-target.md index 00ad27b..8963569 100644 --- a/docs/examples/users/update-target.md +++ b/docs/examples/users/update-target.md @@ -1,3 +1,4 @@ +```php updateTarget( identifier: '', // optional providerId: '', // optional name: '' // optional -); \ No newline at end of file +);``` diff --git a/docs/health.md b/docs/health.md index a381890..4532a8c 100644 --- a/docs/health.md +++ b/docs/health.md @@ -62,6 +62,32 @@ GET https://cloud.appwrite.io/v1/health/queue/audits | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | +```http request +GET https://cloud.appwrite.io/v1/health/queue/billing-project-aggregation +``` + +** Get billing project aggregation queue. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 10000 | + + +```http request +GET https://cloud.appwrite.io/v1/health/queue/billing-team-aggregation +``` + +** Get billing team aggregation queue. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 10000 | + + ```http request GET https://cloud.appwrite.io/v1/health/queue/builds ``` @@ -75,6 +101,19 @@ GET https://cloud.appwrite.io/v1/health/queue/builds | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | +```http request +GET https://cloud.appwrite.io/v1/health/queue/builds-priority +``` + +** Get the priority builds queue size. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 500. | 500 | + + ```http request GET https://cloud.appwrite.io/v1/health/queue/certificates ``` @@ -195,6 +234,19 @@ GET https://cloud.appwrite.io/v1/health/queue/migrations | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | +```http request +GET https://cloud.appwrite.io/v1/health/queue/region-manager +``` + +** Get region manager queue. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100. | 100 | + + ```http request GET https://cloud.appwrite.io/v1/health/queue/stats-resources ``` @@ -221,6 +273,19 @@ GET https://cloud.appwrite.io/v1/health/queue/stats-usage | threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. | 5000 | +```http request +GET https://cloud.appwrite.io/v1/health/queue/threats +``` + +** Get threats queue. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| threshold | integer | Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100. | 100 | + + ```http request GET https://cloud.appwrite.io/v1/health/queue/webhooks ``` diff --git a/docs/organizations.md b/docs/organizations.md new file mode 100644 index 0000000..1b7105f --- /dev/null +++ b/docs/organizations.md @@ -0,0 +1,28 @@ +# Organizations Service + + +```http request +DELETE https://cloud.appwrite.io/v1/organizations/{organizationId} +``` + +** Delete an organization. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| organizationId | string | **Required** Team ID. | | + + +```http request +PATCH https://cloud.appwrite.io/v1/organizations/{organizationId}/estimations/delete-organization +``` + +** Get estimation for deleting an organization. ** + +### Parameters + +| Field Name | Type | Description | Default | +| --- | --- | --- | --- | +| organizationId | string | **Required** Team ID. | | + diff --git a/docs/storage.md b/docs/storage.md index 74960e3..c051c9b 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -31,7 +31,7 @@ POST https://cloud.appwrite.io/v1/storage/buckets | permissions | array | An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | fileSecurity | boolean | Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | enabled | boolean | Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled. | 1 | -| maximumFileSize | integer | Maximum file size allowed in bytes. Maximum allowed value is 30MB. | [] | +| maximumFileSize | integer | Maximum file size allowed in bytes. Maximum allowed value is 5GB. | [] | | allowedFileExtensions | array | Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long. | [] | | compression | string | Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled | none | | encryption | boolean | Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled | 1 | @@ -67,7 +67,7 @@ PUT https://cloud.appwrite.io/v1/storage/buckets/{bucketId} | permissions | array | An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | fileSecurity | boolean | Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions). | | | enabled | boolean | Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled. | 1 | -| maximumFileSize | integer | Maximum file size allowed in bytes. Maximum allowed value is 30MB. | [] | +| maximumFileSize | integer | Maximum file size allowed in bytes. Maximum allowed value is 5GB. | [] | | allowedFileExtensions | array | Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long. | [] | | compression | string | Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled | none | | encryption | boolean | Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled | 1 | diff --git a/src/Appwrite/Client.php b/src/Appwrite/Client.php index 8d8d89e..5a21121 100644 --- a/src/Appwrite/Client.php +++ b/src/Appwrite/Client.php @@ -37,11 +37,11 @@ class Client */ protected array $headers = [ 'content-type' => '', - 'user-agent' => 'AppwritePHPSDK/20.0.0 ()', + 'user-agent' => 'AppwritePHPSDK/20.0.1 ()', 'x-sdk-name'=> 'PHP', 'x-sdk-platform'=> 'server', 'x-sdk-language'=> 'php', - 'x-sdk-version'=> '20.0.0', + 'x-sdk-version'=> '20.0.1', ]; /** diff --git a/src/Appwrite/Enums/BackupServices.php b/src/Appwrite/Enums/BackupServices.php new file mode 100644 index 0000000..8eb096d --- /dev/null +++ b/src/Appwrite/Enums/BackupServices.php @@ -0,0 +1,51 @@ +value = $value; + } + + public function __toString(): string + { + return $this->value; + } + + public function jsonSerialize(): string + { + return $this->value; + } + + public static function DATABASES(): BackupServices + { + if (!isset(self::$DATABASES)) { + self::$DATABASES = new BackupServices('databases'); + } + return self::$DATABASES; + } + public static function FUNCTIONS(): BackupServices + { + if (!isset(self::$FUNCTIONS)) { + self::$FUNCTIONS = new BackupServices('functions'); + } + return self::$FUNCTIONS; + } + public static function STORAGE(): BackupServices + { + if (!isset(self::$STORAGE)) { + self::$STORAGE = new BackupServices('storage'); + } + return self::$STORAGE; + } +} \ No newline at end of file diff --git a/src/Appwrite/Enums/BuildRuntime.php b/src/Appwrite/Enums/BuildRuntime.php index 0806513..a7fe12a 100644 --- a/src/Appwrite/Enums/BuildRuntime.php +++ b/src/Appwrite/Enums/BuildRuntime.php @@ -28,9 +28,6 @@ class BuildRuntime implements JsonSerializable private static BuildRuntime $PYTHON312; private static BuildRuntime $PYTHONML311; private static BuildRuntime $PYTHONML312; - private static BuildRuntime $DENO121; - private static BuildRuntime $DENO124; - private static BuildRuntime $DENO135; private static BuildRuntime $DENO140; private static BuildRuntime $DENO146; private static BuildRuntime $DENO20; @@ -45,6 +42,7 @@ class BuildRuntime implements JsonSerializable private static BuildRuntime $DART35; private static BuildRuntime $DART38; private static BuildRuntime $DART39; + private static BuildRuntime $DART310; private static BuildRuntime $DOTNET60; private static BuildRuntime $DOTNET70; private static BuildRuntime $DOTNET80; @@ -73,6 +71,7 @@ class BuildRuntime implements JsonSerializable private static BuildRuntime $FLUTTER329; private static BuildRuntime $FLUTTER332; private static BuildRuntime $FLUTTER335; + private static BuildRuntime $FLUTTER338; private string $value; @@ -245,27 +244,6 @@ public static function PYTHONML312(): BuildRuntime } return self::$PYTHONML312; } - public static function DENO121(): BuildRuntime - { - if (!isset(self::$DENO121)) { - self::$DENO121 = new BuildRuntime('deno-1.21'); - } - return self::$DENO121; - } - public static function DENO124(): BuildRuntime - { - if (!isset(self::$DENO124)) { - self::$DENO124 = new BuildRuntime('deno-1.24'); - } - return self::$DENO124; - } - public static function DENO135(): BuildRuntime - { - if (!isset(self::$DENO135)) { - self::$DENO135 = new BuildRuntime('deno-1.35'); - } - return self::$DENO135; - } public static function DENO140(): BuildRuntime { if (!isset(self::$DENO140)) { @@ -364,6 +342,13 @@ public static function DART39(): BuildRuntime } return self::$DART39; } + public static function DART310(): BuildRuntime + { + if (!isset(self::$DART310)) { + self::$DART310 = new BuildRuntime('dart-3.10'); + } + return self::$DART310; + } public static function DOTNET60(): BuildRuntime { if (!isset(self::$DOTNET60)) { @@ -560,4 +545,11 @@ public static function FLUTTER335(): BuildRuntime } return self::$FLUTTER335; } + public static function FLUTTER338(): BuildRuntime + { + if (!isset(self::$FLUTTER338)) { + self::$FLUTTER338 = new BuildRuntime('flutter-3.38'); + } + return self::$FLUTTER338; + } } \ No newline at end of file diff --git a/src/Appwrite/Enums/OAuthProvider.php b/src/Appwrite/Enums/OAuthProvider.php index 9e12b9a..29bcd73 100644 --- a/src/Appwrite/Enums/OAuthProvider.php +++ b/src/Appwrite/Enums/OAuthProvider.php @@ -45,6 +45,8 @@ class OAuthProvider implements JsonSerializable private static OAuthProvider $YANDEX; private static OAuthProvider $ZOHO; private static OAuthProvider $ZOOM; + private static OAuthProvider $GITHUBIMAGINE; + private static OAuthProvider $GOOGLEIMAGINE; private string $value; @@ -336,4 +338,18 @@ public static function ZOOM(): OAuthProvider } return self::$ZOOM; } + public static function GITHUBIMAGINE(): OAuthProvider + { + if (!isset(self::$GITHUBIMAGINE)) { + self::$GITHUBIMAGINE = new OAuthProvider('githubImagine'); + } + return self::$GITHUBIMAGINE; + } + public static function GOOGLEIMAGINE(): OAuthProvider + { + if (!isset(self::$GOOGLEIMAGINE)) { + self::$GOOGLEIMAGINE = new OAuthProvider('googleImagine'); + } + return self::$GOOGLEIMAGINE; + } } \ No newline at end of file diff --git a/src/Appwrite/Enums/Roles.php b/src/Appwrite/Enums/Roles.php deleted file mode 100644 index 635c725..0000000 --- a/src/Appwrite/Enums/Roles.php +++ /dev/null @@ -1,51 +0,0 @@ -value = $value; - } - - public function __toString(): string - { - return $this->value; - } - - public function jsonSerialize(): string - { - return $this->value; - } - - public static function ADMIN(): Roles - { - if (!isset(self::$ADMIN)) { - self::$ADMIN = new Roles('admin'); - } - return self::$ADMIN; - } - public static function DEVELOPER(): Roles - { - if (!isset(self::$DEVELOPER)) { - self::$DEVELOPER = new Roles('developer'); - } - return self::$DEVELOPER; - } - public static function OWNER(): Roles - { - if (!isset(self::$OWNER)) { - self::$OWNER = new Roles('owner'); - } - return self::$OWNER; - } -} \ No newline at end of file diff --git a/src/Appwrite/Enums/Runtime.php b/src/Appwrite/Enums/Runtime.php index 75e78e5..0c5eeab 100644 --- a/src/Appwrite/Enums/Runtime.php +++ b/src/Appwrite/Enums/Runtime.php @@ -28,9 +28,6 @@ class Runtime implements JsonSerializable private static Runtime $PYTHON312; private static Runtime $PYTHONML311; private static Runtime $PYTHONML312; - private static Runtime $DENO121; - private static Runtime $DENO124; - private static Runtime $DENO135; private static Runtime $DENO140; private static Runtime $DENO146; private static Runtime $DENO20; @@ -45,6 +42,7 @@ class Runtime implements JsonSerializable private static Runtime $DART35; private static Runtime $DART38; private static Runtime $DART39; + private static Runtime $DART310; private static Runtime $DOTNET60; private static Runtime $DOTNET70; private static Runtime $DOTNET80; @@ -73,6 +71,7 @@ class Runtime implements JsonSerializable private static Runtime $FLUTTER329; private static Runtime $FLUTTER332; private static Runtime $FLUTTER335; + private static Runtime $FLUTTER338; private string $value; @@ -245,27 +244,6 @@ public static function PYTHONML312(): Runtime } return self::$PYTHONML312; } - public static function DENO121(): Runtime - { - if (!isset(self::$DENO121)) { - self::$DENO121 = new Runtime('deno-1.21'); - } - return self::$DENO121; - } - public static function DENO124(): Runtime - { - if (!isset(self::$DENO124)) { - self::$DENO124 = new Runtime('deno-1.24'); - } - return self::$DENO124; - } - public static function DENO135(): Runtime - { - if (!isset(self::$DENO135)) { - self::$DENO135 = new Runtime('deno-1.35'); - } - return self::$DENO135; - } public static function DENO140(): Runtime { if (!isset(self::$DENO140)) { @@ -364,6 +342,13 @@ public static function DART39(): Runtime } return self::$DART39; } + public static function DART310(): Runtime + { + if (!isset(self::$DART310)) { + self::$DART310 = new Runtime('dart-3.10'); + } + return self::$DART310; + } public static function DOTNET60(): Runtime { if (!isset(self::$DOTNET60)) { @@ -560,4 +545,11 @@ public static function FLUTTER335(): Runtime } return self::$FLUTTER335; } + public static function FLUTTER338(): Runtime + { + if (!isset(self::$FLUTTER338)) { + self::$FLUTTER338 = new Runtime('flutter-3.38'); + } + return self::$FLUTTER338; + } } \ No newline at end of file diff --git a/src/Appwrite/Enums/Scopes.php b/src/Appwrite/Enums/Scopes.php index aa82645..9634724 100644 --- a/src/Appwrite/Enums/Scopes.php +++ b/src/Appwrite/Enums/Scopes.php @@ -61,6 +61,14 @@ class Scopes implements JsonSerializable private static Scopes $ASSISTANTREAD; private static Scopes $TOKENSREAD; private static Scopes $TOKENSWRITE; + private static Scopes $POLICIESWRITE; + private static Scopes $POLICIESREAD; + private static Scopes $ARCHIVESREAD; + private static Scopes $ARCHIVESWRITE; + private static Scopes $RESTORATIONSREAD; + private static Scopes $RESTORATIONSWRITE; + private static Scopes $DOMAINSREAD; + private static Scopes $DOMAINSWRITE; private string $value; @@ -464,4 +472,60 @@ public static function TOKENSWRITE(): Scopes } return self::$TOKENSWRITE; } + public static function POLICIESWRITE(): Scopes + { + if (!isset(self::$POLICIESWRITE)) { + self::$POLICIESWRITE = new Scopes('policies.write'); + } + return self::$POLICIESWRITE; + } + public static function POLICIESREAD(): Scopes + { + if (!isset(self::$POLICIESREAD)) { + self::$POLICIESREAD = new Scopes('policies.read'); + } + return self::$POLICIESREAD; + } + public static function ARCHIVESREAD(): Scopes + { + if (!isset(self::$ARCHIVESREAD)) { + self::$ARCHIVESREAD = new Scopes('archives.read'); + } + return self::$ARCHIVESREAD; + } + public static function ARCHIVESWRITE(): Scopes + { + if (!isset(self::$ARCHIVESWRITE)) { + self::$ARCHIVESWRITE = new Scopes('archives.write'); + } + return self::$ARCHIVESWRITE; + } + public static function RESTORATIONSREAD(): Scopes + { + if (!isset(self::$RESTORATIONSREAD)) { + self::$RESTORATIONSREAD = new Scopes('restorations.read'); + } + return self::$RESTORATIONSREAD; + } + public static function RESTORATIONSWRITE(): Scopes + { + if (!isset(self::$RESTORATIONSWRITE)) { + self::$RESTORATIONSWRITE = new Scopes('restorations.write'); + } + return self::$RESTORATIONSWRITE; + } + public static function DOMAINSREAD(): Scopes + { + if (!isset(self::$DOMAINSREAD)) { + self::$DOMAINSREAD = new Scopes('domains.read'); + } + return self::$DOMAINSREAD; + } + public static function DOMAINSWRITE(): Scopes + { + if (!isset(self::$DOMAINSWRITE)) { + self::$DOMAINSWRITE = new Scopes('domains.write'); + } + return self::$DOMAINSWRITE; + } } \ No newline at end of file diff --git a/src/Appwrite/Services/Account.php b/src/Appwrite/Services/Account.php index c9d6b77..0460a23 100644 --- a/src/Appwrite/Services/Account.php +++ b/src/Appwrite/Services/Account.php @@ -6,6 +6,7 @@ use Appwrite\Client; use Appwrite\Service; use Appwrite\InputFile; +use Appwrite\Enums\Scopes; use Appwrite\Enums\AuthenticatorType; use Appwrite\Enums\AuthenticationFactor; use Appwrite\Enums\OAuthProvider; @@ -226,6 +227,165 @@ public function createJWT(?int $duration = null): array ); } + /** + * Get a list of all API keys from the current account. + * + * @param ?bool $total + * @throws AppwriteException + * @return array + */ + public function listKeys(?bool $total = null): array + { + $apiPath = str_replace( + [], + [], + '/account/keys' + ); + + $apiParams = []; + + if (!is_null($total)) { + $apiParams['total'] = $total; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Create a new account API key. + * + * @param string $name + * @param array $scopes + * @param ?string $expire + * @throws AppwriteException + * @return array + */ + public function createKey(string $name, array $scopes, ?string $expire = null): array + { + $apiPath = str_replace( + [], + [], + '/account/keys' + ); + + $apiParams = []; + $apiParams['name'] = $name; + $apiParams['scopes'] = $scopes; + $apiParams['expire'] = $expire; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Get a key by its unique ID. This endpoint returns details about a specific + * API key in your account including it's scopes. + * + * @param string $keyId + * @throws AppwriteException + * @return array + */ + public function getKey(string $keyId): array + { + $apiPath = str_replace( + ['{keyId}'], + [$keyId], + '/account/keys/{keyId}' + ); + + $apiParams = []; + $apiParams['keyId'] = $keyId; + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Update a key by its unique ID. Use this endpoint to update the name, + * scopes, or expiration time of an API key. + * + * @param string $keyId + * @param string $name + * @param array $scopes + * @param ?string $expire + * @throws AppwriteException + * @return array + */ + public function updateKey(string $keyId, string $name, array $scopes, ?string $expire = null): array + { + $apiPath = str_replace( + ['{keyId}'], + [$keyId], + '/account/keys/{keyId}' + ); + + $apiParams = []; + $apiParams['keyId'] = $keyId; + $apiParams['name'] = $name; + $apiParams['scopes'] = $scopes; + $apiParams['expire'] = $expire; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_PUT, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Delete a key by its unique ID. Once deleted, the key can no longer be used + * to authenticate API calls. + * + * @param string $keyId + * @throws AppwriteException + * @return string + */ + public function deleteKey(string $keyId): string + { + $apiPath = str_replace( + ['{keyId}'], + [$keyId], + '/account/keys/{keyId}' + ); + + $apiParams = []; + $apiParams['keyId'] = $keyId; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_DELETE, + $apiPath, + $apiHeaders, + $apiParams + ); + } + /** * Get the list of latest security activity logs for the currently logged in * user. Each log returns user IP address, location and date and time of log. diff --git a/src/Appwrite/Services/Backups.php b/src/Appwrite/Services/Backups.php new file mode 100644 index 0000000..bca41ac --- /dev/null +++ b/src/Appwrite/Services/Backups.php @@ -0,0 +1,411 @@ +client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Create a new archive asynchronously for a project. + * + * @param array $services + * @param ?string $resourceId + * @throws AppwriteException + * @return array + */ + public function createArchive(array $services, ?string $resourceId = null): array + { + $apiPath = str_replace( + [], + [], + '/backups/archives' + ); + + $apiParams = []; + $apiParams['services'] = $services; + $apiParams['resourceId'] = $resourceId; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Get a backup archive using it's ID. + * + * @param string $archiveId + * @throws AppwriteException + * @return array + */ + public function getArchive(string $archiveId): array + { + $apiPath = str_replace( + ['{archiveId}'], + [$archiveId], + '/backups/archives/{archiveId}' + ); + + $apiParams = []; + $apiParams['archiveId'] = $archiveId; + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Delete an existing archive for a project. + * + * @param string $archiveId + * @throws AppwriteException + * @return string + */ + public function deleteArchive(string $archiveId): string + { + $apiPath = str_replace( + ['{archiveId}'], + [$archiveId], + '/backups/archives/{archiveId}' + ); + + $apiParams = []; + $apiParams['archiveId'] = $archiveId; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_DELETE, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * List all policies for a project. + * + * @param ?array $queries + * @throws AppwriteException + * @return array + */ + public function listPolicies(?array $queries = null): array + { + $apiPath = str_replace( + [], + [], + '/backups/policies' + ); + + $apiParams = []; + + if (!is_null($queries)) { + $apiParams['queries'] = $queries; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Create a new backup policy. + * + * @param string $policyId + * @param array $services + * @param int $retention + * @param string $schedule + * @param ?string $name + * @param ?string $resourceId + * @param ?bool $enabled + * @throws AppwriteException + * @return array + */ + public function createPolicy(string $policyId, array $services, int $retention, string $schedule, ?string $name = null, ?string $resourceId = null, ?bool $enabled = null): array + { + $apiPath = str_replace( + [], + [], + '/backups/policies' + ); + + $apiParams = []; + $apiParams['policyId'] = $policyId; + $apiParams['services'] = $services; + $apiParams['retention'] = $retention; + $apiParams['schedule'] = $schedule; + + if (!is_null($name)) { + $apiParams['name'] = $name; + } + $apiParams['resourceId'] = $resourceId; + + if (!is_null($enabled)) { + $apiParams['enabled'] = $enabled; + } + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Get a backup policy using it's ID. + * + * @param string $policyId + * @throws AppwriteException + * @return array + */ + public function getPolicy(string $policyId): array + { + $apiPath = str_replace( + ['{policyId}'], + [$policyId], + '/backups/policies/{policyId}' + ); + + $apiParams = []; + $apiParams['policyId'] = $policyId; + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Update an existing policy using it's ID. + * + * @param string $policyId + * @param ?string $name + * @param ?int $retention + * @param ?string $schedule + * @param ?bool $enabled + * @throws AppwriteException + * @return array + */ + public function updatePolicy(string $policyId, ?string $name = null, ?int $retention = null, ?string $schedule = null, ?bool $enabled = null): array + { + $apiPath = str_replace( + ['{policyId}'], + [$policyId], + '/backups/policies/{policyId}' + ); + + $apiParams = []; + $apiParams['policyId'] = $policyId; + $apiParams['name'] = $name; + $apiParams['retention'] = $retention; + + if (!is_null($schedule)) { + $apiParams['schedule'] = $schedule; + } + $apiParams['enabled'] = $enabled; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_PATCH, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Delete a policy using it's ID. + * + * @param string $policyId + * @throws AppwriteException + * @return string + */ + public function deletePolicy(string $policyId): string + { + $apiPath = str_replace( + ['{policyId}'], + [$policyId], + '/backups/policies/{policyId}' + ); + + $apiParams = []; + $apiParams['policyId'] = $policyId; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_DELETE, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Create and trigger a new restoration for a backup on a project. + * + * @param string $archiveId + * @param array $services + * @param ?string $newResourceId + * @param ?string $newResourceName + * @throws AppwriteException + * @return array + */ + public function createRestoration(string $archiveId, array $services, ?string $newResourceId = null, ?string $newResourceName = null): array + { + $apiPath = str_replace( + [], + [], + '/backups/restoration' + ); + + $apiParams = []; + $apiParams['archiveId'] = $archiveId; + $apiParams['services'] = $services; + + if (!is_null($newResourceId)) { + $apiParams['newResourceId'] = $newResourceId; + } + + if (!is_null($newResourceName)) { + $apiParams['newResourceName'] = $newResourceName; + } + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_POST, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * List all backup restorations for a project. + * + * @param ?array $queries + * @throws AppwriteException + * @return array + */ + public function listRestorations(?array $queries = null): array + { + $apiPath = str_replace( + [], + [], + '/backups/restorations' + ); + + $apiParams = []; + + if (!is_null($queries)) { + $apiParams['queries'] = $queries; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Get the current status of a backup restoration. + * + * @param string $restorationId + * @throws AppwriteException + * @return array + */ + public function getRestoration(string $restorationId): array + { + $apiPath = str_replace( + ['{restorationId}'], + [$restorationId], + '/backups/restorations/{restorationId}' + ); + + $apiParams = []; + $apiParams['restorationId'] = $restorationId; + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } +} \ No newline at end of file diff --git a/src/Appwrite/Services/Health.php b/src/Appwrite/Services/Health.php index c4a694b..0644a0f 100644 --- a/src/Appwrite/Services/Health.php +++ b/src/Appwrite/Services/Health.php @@ -209,6 +209,68 @@ public function getQueueAudits(?int $threshold = null): array ); } + /** + * Get billing project aggregation queue. + * + * @param ?int $threshold + * @throws AppwriteException + * @return array + */ + public function getQueueBillingProjectAggregation(?int $threshold = null): array + { + $apiPath = str_replace( + [], + [], + '/health/queue/billing-project-aggregation' + ); + + $apiParams = []; + + if (!is_null($threshold)) { + $apiParams['threshold'] = $threshold; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Get billing team aggregation queue. + * + * @param ?int $threshold + * @throws AppwriteException + * @return array + */ + public function getQueueBillingTeamAggregation(?int $threshold = null): array + { + $apiPath = str_replace( + [], + [], + '/health/queue/billing-team-aggregation' + ); + + $apiParams = []; + + if (!is_null($threshold)) { + $apiParams['threshold'] = $threshold; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + /** * Get the number of builds that are waiting to be processed in the Appwrite * internal queue server. @@ -241,6 +303,37 @@ public function getQueueBuilds(?int $threshold = null): array ); } + /** + * Get the priority builds queue size. + * + * @param ?int $threshold + * @throws AppwriteException + * @return array + */ + public function getQueuePriorityBuilds(?int $threshold = null): array + { + $apiPath = str_replace( + [], + [], + '/health/queue/builds-priority' + ); + + $apiParams = []; + + if (!is_null($threshold)) { + $apiParams['threshold'] = $threshold; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + /** * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue @@ -537,6 +630,37 @@ public function getQueueMigrations(?int $threshold = null): array ); } + /** + * Get region manager queue. + * + * @param ?int $threshold + * @throws AppwriteException + * @return array + */ + public function getQueueRegionManager(?int $threshold = null): array + { + $apiPath = str_replace( + [], + [], + '/health/queue/region-manager' + ); + + $apiParams = []; + + if (!is_null($threshold)) { + $apiParams['threshold'] = $threshold; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + /** * Get the number of metrics that are waiting to be processed in the Appwrite * stats resources queue. @@ -601,6 +725,37 @@ public function getQueueUsage(?int $threshold = null): array ); } + /** + * Get threats queue. + * + * @param ?int $threshold + * @throws AppwriteException + * @return array + */ + public function getQueueThreats(?int $threshold = null): array + { + $apiPath = str_replace( + [], + [], + '/health/queue/threats' + ); + + $apiParams = []; + + if (!is_null($threshold)) { + $apiParams['threshold'] = $threshold; + } + + $apiHeaders = []; + + return $this->client->call( + Client::METHOD_GET, + $apiPath, + $apiHeaders, + $apiParams + ); + } + /** * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. diff --git a/src/Appwrite/Services/Organizations.php b/src/Appwrite/Services/Organizations.php new file mode 100644 index 0000000..9e340ab --- /dev/null +++ b/src/Appwrite/Services/Organizations.php @@ -0,0 +1,74 @@ +client->call( + Client::METHOD_DELETE, + $apiPath, + $apiHeaders, + $apiParams + ); + } + + /** + * Get estimation for deleting an organization. + * + * @param string $organizationId + * @throws AppwriteException + * @return array + */ + public function estimationDeleteOrganization(string $organizationId): array + { + $apiPath = str_replace( + ['{organizationId}'], + [$organizationId], + '/organizations/{organizationId}/estimations/delete-organization' + ); + + $apiParams = []; + $apiParams['organizationId'] = $organizationId; + + $apiHeaders = []; + $apiHeaders['content-type'] = 'application/json'; + + return $this->client->call( + Client::METHOD_PATCH, + $apiPath, + $apiHeaders, + $apiParams + ); + } +} \ No newline at end of file diff --git a/src/Appwrite/Services/Teams.php b/src/Appwrite/Services/Teams.php index 99c5226..3f3480e 100644 --- a/src/Appwrite/Services/Teams.php +++ b/src/Appwrite/Services/Teams.php @@ -6,7 +6,6 @@ use Appwrite\Client; use Appwrite\Service; use Appwrite\InputFile; -use Appwrite\Enums\Roles; class Teams extends Service { diff --git a/tests/Appwrite/Services/AccountTest.php b/tests/Appwrite/Services/AccountTest.php index d38511b..0f53979 100644 --- a/tests/Appwrite/Services/AccountTest.php +++ b/tests/Appwrite/Services/AccountTest.php @@ -6,6 +6,7 @@ use Appwrite\InputFile; use Mockery; use PHPUnit\Framework\TestCase; +use Appwrite\Enums\Scopes; use Appwrite\Enums\AuthenticatorType; use Appwrite\Enums\AuthenticationFactor; use Appwrite\Enums\OAuthProvider; @@ -160,6 +161,112 @@ public function testMethodCreateJWT(): void { $this->assertSame($data, $response); } + public function testMethodListKeys(): void { + + $data = array( + "total" => 5, + "keys" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->account->listKeys( + ); + + $this->assertSame($data, $response); + } + + public function testMethodCreateKey(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "name" => "My API Key", + "expire" => "2020-10-15T06:38:00.000+00:00", + "scopes" => array(), + "secret" => "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt" => "2020-10-15T06:38:00.000+00:00", + "sdks" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->account->createKey( + "", + array(Scopes::ACCOUNT()) + ); + + $this->assertSame($data, $response); + } + + public function testMethodGetKey(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "name" => "My API Key", + "expire" => "2020-10-15T06:38:00.000+00:00", + "scopes" => array(), + "secret" => "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt" => "2020-10-15T06:38:00.000+00:00", + "sdks" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->account->getKey( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodUpdateKey(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "name" => "My API Key", + "expire" => "2020-10-15T06:38:00.000+00:00", + "scopes" => array(), + "secret" => "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt" => "2020-10-15T06:38:00.000+00:00", + "sdks" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->account->updateKey( + "", + "", + array(Scopes::ACCOUNT()) + ); + + $this->assertSame($data, $response); + } + + public function testMethodDeleteKey(): void { + + $data = ''; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->account->deleteKey( + "" + ); + + $this->assertSame($data, $response); + } + public function testMethodListLogs(): void { $data = array( diff --git a/tests/Appwrite/Services/BackupsTest.php b/tests/Appwrite/Services/BackupsTest.php new file mode 100644 index 0000000..c485ef7 --- /dev/null +++ b/tests/Appwrite/Services/BackupsTest.php @@ -0,0 +1,276 @@ +client = Mockery::mock(Client::class); + $this->backups = new Backups($this->client); + } + + public function testMethodListArchives(): void { + + $data = array( + "total" => 5, + "archives" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->listArchives( + ); + + $this->assertSame($data, $response); + } + + public function testMethodCreateArchive(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "policyId" => "did8jx6ws45jana098ab7", + "size" => 100000, + "status" => "completed", + "startedAt" => "2020-10-15T06:38:00.000+00:00", + "migrationId" => "did8jx6ws45jana098ab7", + "services" => array(), + "resources" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->createArchive( + array(BackupServices::DATABASES()) + ); + + $this->assertSame($data, $response); + } + + public function testMethodGetArchive(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "policyId" => "did8jx6ws45jana098ab7", + "size" => 100000, + "status" => "completed", + "startedAt" => "2020-10-15T06:38:00.000+00:00", + "migrationId" => "did8jx6ws45jana098ab7", + "services" => array(), + "resources" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->getArchive( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodDeleteArchive(): void { + + $data = ''; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->deleteArchive( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodListPolicies(): void { + + $data = array( + "total" => 5, + "policies" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->listPolicies( + ); + + $this->assertSame($data, $response); + } + + public function testMethodCreatePolicy(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "name" => "Hourly backups", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "services" => array(), + "resources" => array(), + "retention" => 7, + "schedule" => "0 * * * *", + "enabled" => true); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->createPolicy( + "", + array(BackupServices::DATABASES()), + 1, + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodGetPolicy(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "name" => "Hourly backups", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "services" => array(), + "resources" => array(), + "retention" => 7, + "schedule" => "0 * * * *", + "enabled" => true); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->getPolicy( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodUpdatePolicy(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "name" => "Hourly backups", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "services" => array(), + "resources" => array(), + "retention" => 7, + "schedule" => "0 * * * *", + "enabled" => true); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->updatePolicy( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodDeletePolicy(): void { + + $data = ''; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->deletePolicy( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodCreateRestoration(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "archiveId" => "did8jx6ws45jana098ab7", + "policyId" => "did8jx6ws45jana098ab7", + "status" => "completed", + "startedAt" => "2020-10-15T06:38:00.000+00:00", + "migrationId" => "did8jx6ws45jana098ab7", + "services" => array(), + "resources" => array(), + "options" => "{databases.database[{oldId, newId, newName}]}"); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->createRestoration( + "", + array(BackupServices::DATABASES()) + ); + + $this->assertSame($data, $response); + } + + public function testMethodListRestorations(): void { + + $data = array( + "total" => 5, + "restorations" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->listRestorations( + ); + + $this->assertSame($data, $response); + } + + public function testMethodGetRestoration(): void { + + $data = array( + "\$id" => "5e5ea5c16897e", + "\$createdAt" => "2020-10-15T06:38:00.000+00:00", + "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", + "archiveId" => "did8jx6ws45jana098ab7", + "policyId" => "did8jx6ws45jana098ab7", + "status" => "completed", + "startedAt" => "2020-10-15T06:38:00.000+00:00", + "migrationId" => "did8jx6ws45jana098ab7", + "services" => array(), + "resources" => array(), + "options" => "{databases.database[{oldId, newId, newName}]}"); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->backups->getRestoration( + "" + ); + + $this->assertSame($data, $response); + } + +} diff --git a/tests/Appwrite/Services/DatabasesTest.php b/tests/Appwrite/Services/DatabasesTest.php index 23f2d44..551944c 100644 --- a/tests/Appwrite/Services/DatabasesTest.php +++ b/tests/Appwrite/Services/DatabasesTest.php @@ -44,7 +44,9 @@ public function testMethodCreate(): void { "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, - "type" => "legacy"); + "type" => "legacy", + "policies" => array(), + "archives" => array()); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -180,7 +182,9 @@ public function testMethodGet(): void { "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, - "type" => "legacy"); + "type" => "legacy", + "policies" => array(), + "archives" => array()); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -201,7 +205,9 @@ public function testMethodUpdate(): void { "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, - "type" => "legacy"); + "type" => "legacy", + "policies" => array(), + "archives" => array()); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -258,7 +264,9 @@ public function testMethodCreateCollection(): void { "enabled" => true, "documentSecurity" => true, "attributes" => array(), - "indexes" => array()); + "indexes" => array(), + "bytesMax" => 65535, + "bytesUsed" => 1500); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -285,7 +293,9 @@ public function testMethodGetCollection(): void { "enabled" => true, "documentSecurity" => true, "attributes" => array(), - "indexes" => array()); + "indexes" => array(), + "bytesMax" => 65535, + "bytesUsed" => 1500); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -311,7 +321,9 @@ public function testMethodUpdateCollection(): void { "enabled" => true, "documentSecurity" => true, "attributes" => array(), - "indexes" => array()); + "indexes" => array(), + "bytesMax" => 65535, + "bytesUsed" => 1500); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) diff --git a/tests/Appwrite/Services/HealthTest.php b/tests/Appwrite/Services/HealthTest.php index 28c637c..bf501d9 100644 --- a/tests/Appwrite/Services/HealthTest.php +++ b/tests/Appwrite/Services/HealthTest.php @@ -133,6 +133,36 @@ public function testMethodGetQueueAudits(): void { $this->assertSame($data, $response); } + public function testMethodGetQueueBillingProjectAggregation(): void { + + $data = array( + "size" => 8); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->health->getQueueBillingProjectAggregation( + ); + + $this->assertSame($data, $response); + } + + public function testMethodGetQueueBillingTeamAggregation(): void { + + $data = array( + "size" => 8); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->health->getQueueBillingTeamAggregation( + ); + + $this->assertSame($data, $response); + } + public function testMethodGetQueueBuilds(): void { $data = array( @@ -148,6 +178,21 @@ public function testMethodGetQueueBuilds(): void { $this->assertSame($data, $response); } + public function testMethodGetQueuePriorityBuilds(): void { + + $data = array( + "size" => 8); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->health->getQueuePriorityBuilds( + ); + + $this->assertSame($data, $response); + } + public function testMethodGetQueueCertificates(): void { $data = array( @@ -284,6 +329,21 @@ public function testMethodGetQueueMigrations(): void { $this->assertSame($data, $response); } + public function testMethodGetQueueRegionManager(): void { + + $data = array( + "size" => 8); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->health->getQueueRegionManager( + ); + + $this->assertSame($data, $response); + } + public function testMethodGetQueueStatsResources(): void { $data = array( @@ -314,6 +374,21 @@ public function testMethodGetQueueUsage(): void { $this->assertSame($data, $response); } + public function testMethodGetQueueThreats(): void { + + $data = array( + "size" => 8); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->health->getQueueThreats( + ); + + $this->assertSame($data, $response); + } + public function testMethodGetQueueWebhooks(): void { $data = array( diff --git a/tests/Appwrite/Services/OrganizationsTest.php b/tests/Appwrite/Services/OrganizationsTest.php new file mode 100644 index 0000000..ad96680 --- /dev/null +++ b/tests/Appwrite/Services/OrganizationsTest.php @@ -0,0 +1,50 @@ +client = Mockery::mock(Client::class); + $this->organizations = new Organizations($this->client); + } + + public function testMethodDelete(): void { + + $data = ''; + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->organizations->delete( + "" + ); + + $this->assertSame($data, $response); + } + + public function testMethodEstimationDeleteOrganization(): void { + + $data = array( + "unpaidInvoices" => array()); + + $this->client + ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) + ->andReturn($data); + + $response = $this->organizations->estimationDeleteOrganization( + "" + ); + + $this->assertSame($data, $response); + } + +} diff --git a/tests/Appwrite/Services/TablesDBTest.php b/tests/Appwrite/Services/TablesDBTest.php index 38893c1..fb91185 100644 --- a/tests/Appwrite/Services/TablesDBTest.php +++ b/tests/Appwrite/Services/TablesDBTest.php @@ -44,7 +44,9 @@ public function testMethodCreate(): void { "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, - "type" => "legacy"); + "type" => "legacy", + "policies" => array(), + "archives" => array()); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -180,7 +182,9 @@ public function testMethodGet(): void { "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, - "type" => "legacy"); + "type" => "legacy", + "policies" => array(), + "archives" => array()); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -201,7 +205,9 @@ public function testMethodUpdate(): void { "\$createdAt" => "2020-10-15T06:38:00.000+00:00", "\$updatedAt" => "2020-10-15T06:38:00.000+00:00", "enabled" => true, - "type" => "legacy"); + "type" => "legacy", + "policies" => array(), + "archives" => array()); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -258,7 +264,9 @@ public function testMethodCreateTable(): void { "enabled" => true, "rowSecurity" => true, "columns" => array(), - "indexes" => array()); + "indexes" => array(), + "bytesMax" => 65535, + "bytesUsed" => 1500); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -285,7 +293,9 @@ public function testMethodGetTable(): void { "enabled" => true, "rowSecurity" => true, "columns" => array(), - "indexes" => array()); + "indexes" => array(), + "bytesMax" => 65535, + "bytesUsed" => 1500); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) @@ -311,7 +321,9 @@ public function testMethodUpdateTable(): void { "enabled" => true, "rowSecurity" => true, "columns" => array(), - "indexes" => array()); + "indexes" => array(), + "bytesMax" => 65535, + "bytesUsed" => 1500); $this->client ->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any()) diff --git a/tests/Appwrite/Services/TeamsTest.php b/tests/Appwrite/Services/TeamsTest.php index f9438d5..d909af5 100644 --- a/tests/Appwrite/Services/TeamsTest.php +++ b/tests/Appwrite/Services/TeamsTest.php @@ -6,7 +6,6 @@ use Appwrite\InputFile; use Mockery; use PHPUnit\Framework\TestCase; -use Appwrite\Enums\Roles; final class TeamsTest extends TestCase { private $client; @@ -153,7 +152,7 @@ public function testMethodCreateMembership(): void { $response = $this->teams->createMembership( "", - array(Roles::ADMIN()) + array() ); $this->assertSame($data, $response); @@ -212,7 +211,7 @@ public function testMethodUpdateMembership(): void { $response = $this->teams->updateMembership( "", "", - array(Roles::ADMIN()) + array() ); $this->assertSame($data, $response); From df2ef65e4f9c574d9465d42c429c539d67493737 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 10 Feb 2026 06:02:09 +0000 Subject: [PATCH 2/2] resync-with-docs --- CHANGELOG.md | 7 +++++++ README.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a26e4..5d87856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 20.0.1 + +* Update SDK as per latest server specs, these include - + * Introduces Backups module for managing Database backups + * Introduces Organization module + * Introduce Account level keys, Backup Service & Models + ## 18.0.1 * Fix `TablesDB` service to use correct file name diff --git a/README.md b/README.md index 6f4db85..9713e5d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).** +**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).** Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)